A comprehensive TypeScript client library for the Baserow API. This client provides a clean interface to interact with all aspects of the Baserow API from JavaScript environments, including Node.js, Bun, Deno, and the browser.
Features
🔄 Full TypeScript support with comprehensive type definitions
🔌 Universal compatibility (Node.js, Bun, Deno, and browser environments)
🧩 Modular API with logical operation grouping
🔐 Built-in authentication handling
🚦 Proper error handling with detailed error information
Installation
Node.js
# Using npm npminstall@watzon/baserow
# Using yarn yarnadd@watzon/baserow
# Using pnpm pnpmadd@watzon/baserow
Bun
buninstall@watzon/baserow
Deno
// Import from npm registry in your script import { BaserowClient } from"npm:@watzon/baserow";
Quick Start
import { BaserowClient } from"@watzon/baserow";
// Initialize the client constclient = newBaserowClient({ url:"https://api.baserow.io", token:"YOUR_API_TOKEN", // Optional: tokenType defaults to "Token", can be "JWT" for JWT tokens tokenType:"Token", });
// Basic example: Get workspace list constworkspaces = awaitclient.workspace.getAll(); console.log(workspaces);
// Example: Create a row in a table constnewRow = awaitclient.databaseRows.create( tableId, { field_1:"Value 1", field_2:"Value 2" } );
API Structure
The client is organized into logical operation groups that match Baserow's API structure:
// Health check operations client.health.getFullHealthCheck();