@devvibex/sdk
v0.1.0
Published
JavaScript SDK for the Vibex frontend API.
Maintainers
Readme
Vibex Frontend SDK
JavaScript (ESM) client for the Vibex frontend API: entities, auth, integrations, edge functions, and dynamic modules.
Repository: lh-vibex-frontend-sdk
Prerequisites
- Node.js >= 20.x (for local development and bundlers)
- npm >= 9.x
The built bundle is ESM and targets environments with fetch (browsers and modern Node).
Installation
npm install @devvibex/sdkQuick start
import { createClient } from "@devvibex/sdk";
const client = createClient({
serverUrl: "https://your-api.example.com/entities/",
});
// Example: list an entity (names depend on your backend)
const rows = await client.entities.YourEntity.list({
limit: 10,
skip: 0,
});Alternate entry (@devvibex/sdk/sdk)
Namespaces exports under devvibex (multi-SDK layout):
import { vibex } from "@devvibex/sdk/sdk";
const client = vibex.createClient({ serverUrl: "https://…/entities/" });Configuration
createClient(config) requires:
| Option | Type | Description |
|--------|------|-------------|
| serverUrl | string | Base URL for the entities API (typically ends with /entities/). |
| token | string | Optional initial Bearer token. |
| fetchImpl | typeof fetch | Optional custom fetch (defaults to global fetch). |
Tokens are also read from localStorage key access_token when window is available.
Documentation
- API reference —
createClient,entities,auth,integrations,functions, dynamic modules, and errors.
Development
Clone the GitHub repo, then:
npm install
npm run build