مستقر حزمة SDK v1.2.2

Vanilla JS SDK

The framework-agnostic core. Pure TypeScript — API client, auth, storage, i18n, and event helpers — with zero React or DOM dependencies. Drop into any host (vanilla site, Vue, Svelte, server worker).

المصدر على GitHub →

التثبيت

pnpm add @reqdesk/sdk-core
# or
npm install @reqdesk/sdk-core

@reqdesk/sdk-core is the foundation every other Reqdesk SDK builds on. It exposes an ofetch-based typed client, an OIDC auth helper, a tiny event bus, the i18n catalogue, and the type definitions used across the widget, React bindings, and the browser extension. If you’re embedding into a Vue, Svelte, or vanilla site — or talking to Reqdesk from a worker — this is the package to install.

What’s in the box

  • Typed API client — request/response interceptors honor the API’s snake_case wire shape; consumers stay in camelCase.
  • OIDC helper — wraps oidc-spa for the authenticated paths; includes the manual access-token retrieval pattern the widget uses.
  • Event bus — strongly-typed pub/sub for ticket-created, reply-sent, and lifecycle hooks.
  • Storage adapter — localStorage / sessionStorage / cookie strategies behind a single interface.
  • i18n primitives — the same translation lookup the marketing site and widget use, so an embedded surface stays consistent with your other Reqdesk surfaces.

When to use this directly

If you ship a Vue or Svelte app, this is the cheapest path to a Reqdesk integration — pull in the client + types and render whatever UI you want. If you ship a React app, install @reqdesk/sdk-react instead; it bundles this core and adds the ledger primitives + provider hooks.