@sybilion/sdk
v0.0.1
Published
TypeScript SDK for the Sybilion HTTP API
Readme
@sybilion/sdk
TypeScript client for the Sybilion HTTP API (browser or Node with fetch).
Install
yarn add @sybilion/sdkSetup
import { createSybilionSDK } from '@sybilion/sdk';
const sdk = createSybilionSDK({
/** API origin, no trailing slash. Use `''` for same-origin requests. */
baseUrl: 'https://api.example.com',
/** Prepended before paths; default `'/api'`. Final URL: `{baseUrl}{apiPrefix}/v1/...` */
apiPrefix: '/api',
getToken: () => myJwtGetter(),
onUnauthorized: () => myLogout(),
logger: { warn: console.warn, error: console.error }, // optional
});Surfaces
| Surface | Role |
| -------- | ---- |
| sdk.auth | Auth0 bootstrap (loginWithAuth0Identity), session user (getMe), profile (updateMe). |
| sdk.raw | Low-level accessors for /v1/... responses as parsed JSON (e.g. raw.analyses.driversMapOnce for a single GET without inner retries). |
| sdk.resources | Composed helpers: datasets, drivers, subscriptions — parsing and convenience on top of raw. |
Helpers executeWithRetry and MAX_RETRY_COUNT are exported from the package root for queue / timeout polling patterns.
License
See repository LICENSE if present.
