@cubickle/core
v0.2.0
Published
Core Cubickle SDK client, types, errors, and idempotency helpers.
Downloads
103
Maintainers
Readme
@cubickle/core
Shared Cubickle SDK package.
What it contains:
- typed Cubickle API client
- auth token handling
- idempotency helper
- backend contract types
- normalized API errors
Typical usage:
import { CubickleClient, createIdempotencyKey } from "@cubickle/core";
const client = new CubickleClient({
baseUrl: "http://localhost:8000",
appToken: "<key_id>.<raw_secret>",
});
const room = await client.createRoom(
{ name: "Team Sync", external_id: "team-sync-001" },
{ idempotencyKey: createIdempotencyKey("room") },
);