JavaScript SDK
Official JavaScript SDK for integrating Mimasa AI into your web applications. It wraps the REST API with a typed client so you do not need to construct requests by hand.
Installation
Install the SDK with npm install @mimasa/sdk or the equivalent command for your package manager of choice. The package ships TypeScript types out of the box, so editors provide autocomplete for every resource method without any additional configuration. It works in both Node.js backends and modern browser bundlers, though browser usage should rely on OAuth rather than embedding an API key in client-side code.
Configuration
Create a client instance with new MimasaClient({ apiKey }) for server-to-server use, or with an OAuth access token for delegated access, and the client will target https://api.mimasa.ai/v1 by default. Optional configuration controls request timeout and retry behavior for 429 and 5xx responses, which are retried with backoff automatically. A single client instance can be reused across your application since it is stateless aside from its credential.
Usage Examples
Typical usage looks like const dashboards = await client.dashboards.list() to page through dashboards, or await client.workflows.execute(id, { input }) to trigger a workflow run and inspect its result. Write calls accept an idempotencyKey option so retried calls do not create duplicate resources. Errors surface as a typed MimasaApiError with the same stable code returned by the REST API, so error handling logic can be shared with server-side Python usage.
