Loading article…
Client SDKClient SDKs
QB Flex / v0.1
Documentation lives with the code. API references are generated from the same contracts.

DocsLoading article…
The two SDK packages share the same transport, authentication and authorization semantics. Choose the React package for component-level state and caching, or the framework-independent package for direct calls.
| Application | Packages | Guide |
|---|---|---|
| React 19 | @qbflex/client, @qbflex/react | React quickstart |
| Vanilla JavaScript | @qbflex/client | JavaScript quickstart |
SDK artifacts are built and packed locally. They are not yet published to the npm registry. Workspace examples import the local packages. External applications can install the generated tarballs from dist/packages.
bun run sdk:packRelease owners should follow SDK publishing and maintenance. Its publish command is dry-run by default and does not authorize a registry release.
Provide an API URL, project ID, branch alias/ID and publishable key. Set an exact application origin in project settings. Create one browser client for the application. SSR applications must create a separate client and query cache per request.
Methods return successful data envelopes and throw QBError for failures. Inspect its code, status and retryable fields. Validation, policy denials and conflicts should be corrected by the application; repeatedly retrying them does not help.
Subscriptions expose explicit cleanup. Session refresh is single-flight. Safe reads and explicitly idempotent writes receive bounded retries. Requests support timeout and AbortSignal cancellation.
React Native, encrypted offline writes, background tasks and Expo push are accepted expanded-release requirements but not implemented. See native/push scope. GraphQL, functions and AI remain deferred product candidates. Browser React and JavaScript are the current implemented client tracks.
The shared client supports browser passkeys and application TOTP, conditional PATCH/DELETE revisions, cancellation and optional upload checksums. Generated JavaScript declarations and React declarations remain the precise signatures; there is no published native package or push helper to install yet.