SDKs
TypeScript / JavaScript SDK
Official Node.js and browser client for the MUDBASE API with full TypeScript support.
Installation
bash
npm install mudbase-sdknpm install mudbase-sdkQuick Start
Construct a Configuration plus the API classes you need — there is no unified client wrapper:
typescript
import { Configuration, AuthenticationApi, DataApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
apiKey: process.env.MUDBASE_API_KEY!,
});
const auth = new AuthenticationApi(configuration);
const dataApi = new DataApi(configuration);
// Log in an end-user of your project
const { data: session } = await auth.loginUser({
email: 'morgan.chen@northwind.dev',
password: 'hunter2',
});
// List documents in a collection
const { data: items } = await dataApi.listData(projectId, collectionId);import { Configuration, AuthenticationApi, DataApi } from 'mudbase-sdk';
const configuration = new Configuration({
basePath: 'https://cloud.mudbase.dev',
apiKey: process.env.MUDBASE_API_KEY!,
});
const auth = new AuthenticationApi(configuration);
const dataApi = new DataApi(configuration);
// Log in an end-user of your project
const { data: session } = await auth.loginUser({
email: 'morgan.chen@northwind.dev',
password: 'hunter2',
});
// List documents in a collection
const { data: items } = await dataApi.listData(projectId, collectionId);More
For installation in other languages, error handling, and pagination, see the SDKs Overview.