Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

@salla.sa/embedded-sdk

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salla.sa/embedded-sdk

Communication bridge SDK for embedded apps in Salla Dashboard

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
2
Created
Source

@salla.sa/embedded-sdk

Communication bridge SDK for third-party apps embedded in the Salla Merchant Dashboard.

Installation

npm install @salla.sa/embedded-sdk
# or
pnpm add @salla.sa/embedded-sdk
# or
yarn add @salla.sa/embedded-sdk

Quick Start

import { embedded } from "@salla.sa/embedded-sdk";

async function bootstrap() {
  try {
    // Initialize SDK
    const { layout } = await embedded.init({ debug: true });

    // Get token
    const token = embedded.auth.getToken();
    if (!token) throw new Error("No token found");

    // Verify token with your backend before signaling ready
    const isValid = await fetch("/api/verify-token", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({ token }),
    }).then((res) => res.ok);

    if (!isValid) throw new Error("Token is invalid");

    // Signal app is ready only after successful verification
    embedded.ready();

    // Set up your app
    embedded.page.setTitle("My App");
  } catch (err) {
    embedded.destroy();
  }
}

bootstrap();

Browser Global

<script src="https://unpkg.com/@salla.sa/embedded-sdk/dist/umd/index.js"></script>
<script>
  const embedded = Salla.embedded;
  embedded.init({ debug: true }).then((result) => {
    console.log("Layout:", result.layout);
    embedded.ready();
  });
</script>

API Overview

The SDK provides modules for authentication, UI components, navigation, and page management:

  • Auth: getToken(), getAppId(), refresh(), introspect()
  • UI: loading, toast, modal, confirm
  • Page: setTitle(), navigate(), redirect(), resize()
  • Nav: setAction(), onActionClick(), clearAction()

TypeScript

Full TypeScript support with exported types. See documentation for complete type reference.

Build Formats

FormatFile
ESMdist/esm/index.js
CommonJSdist/cjs/index.js
UMDdist/umd/index.js
SystemJSdist/system/index.js

Documentation

For complete API documentation, examples, and advanced usage, see the full documentation.

Keywords

salla

FAQs

Package last updated on 01 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts