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.
- 🔄 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
# Using npm
npm install @watzon/baserow
# Using yarn
yarn add @watzon/baserow
# Using pnpm
pnpm add @watzon/baserow
bun install @watzon/baserow
// Import from npm registry in your script
import { BaserowClient } from "npm:@watzon/baserow";
import { BaserowClient } from "@watzon/baserow";
// Initialize the client
const client = new BaserowClient({
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
const workspaces = await client.workspace.getAll();
console.log(workspaces);
// Example: Create a row in a table
const newRow = await client.databaseRows.create(
tableId,
{ field_1: "Value 1", field_2: "Value 2" }
);
The client is organized into logical operation groups that match Baserow's API structure:
// Health check operations
client.health.getFullHealthCheck();
// Admin operations
client.admin.getUserList();
// Workspace operations
client.workspace.getAll();
// Database row operations
client.databaseRows.getAll(tableId);
- Base client with authentication handling
- Request/response handling with error management
- TypeScript type definitions
- Comprehensive documentation
- Full test coverage
- Browser bundle optimization
- Health Operations - Server health checks and diagnostics
- Admin Operations - User, instance and settings management
- License Operations - License management
- Job Operations - Background job management
- Template Operations - Template management
- Workspace Operations - Creating and managing workspaces/groups
- User Operations - User profile and settings
- Team Operations - Team management
- Role Assignment Operations - Permissions and role management
- SSO Operations - Single Sign-On integrations
- User Source Operations - External user sources
- Database Row Operations - CRUD operations for table rows
- Database Table Operations - Table creation and management
- Database Field Operations - Field definition and customization
- Database View Operations - View creation and configuration
- Database Webhook Operations - Webhook management
- Database Token Operations - API token management
- User File Operations - User file management
- Secure File Operations - Secure file handling
- Application Operations - Application management
- Integration Operations - Third-party integrations
- Builder Operations - Page builder functionality
- Dashboard Operations - Dashboard creation and management
- Notification Operations - User notifications
- Trash Operations - Trash management and restoration
- Node.js compatibility
- Bun compatibility
- Deno compatibility (needs testing)
- Browser compatibility (needs testing)
- React Native compatibility (needs testing)
- API Reference
- Usage Examples
- Migration Guide
- Contributing Guide
For development and testing instructions, please refer to the test directory README.
MIT
Contributions are welcome! Please feel free to submit a Pull Request.