Skip to content

Extensive Baserow client library supporting Node, Bun, Deno, and the web.

License

Notifications You must be signed in to change notification settings

watzon/baserow-client

Repository files navigation

Baserow JavaScript Client

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
npm install @watzon/baserow

# Using yarn
yarn add @watzon/baserow

# Using pnpm
pnpm add @watzon/baserow

Bun

bun install @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
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" }
);

API Structure

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);

Roadmap

Core Infrastructure

  • Base client with authentication handling
  • Request/response handling with error management
  • TypeScript type definitions
  • Comprehensive documentation
  • Full test coverage
  • Browser bundle optimization

API Operations

System & Administration

  • 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

User & Workspace 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 Operations

  • 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

File Operations

  • User File Operations - User file management
  • Secure File Operations - Secure file handling

Additional Features

  • 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

Platform Support

  • Node.js compatibility
  • Bun compatibility
  • Deno compatibility (needs testing)
  • Browser compatibility (needs testing)
  • React Native compatibility (needs testing)

Documentation

  • API Reference
  • Usage Examples
  • Migration Guide
  • Contributing Guide

Development

For development and testing instructions, please refer to the test directory README.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Extensive Baserow client library supporting Node, Bun, Deno, and the web.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published