Client SDK
Installation
# Using bun
bun add @tablecraft/client
# Using npm
npm install @tablecraft/client
# Using pnpm
pnpm add @tablecraft/client
# Using yarn
yarn add @tablecraft/clientQuick Start
1. Create a Client
import { createClient } from '@tablecraft/client';
const tc = createClient({
baseUrl: '/api/engine', // Your TableCraft API endpoint
});2. Query a Table
3. Fetch Metadata
API Reference
createClient(options)
createClient(options)Options
Option
Type
Required
Description
Examples
tc.table<T>(name)
tc.table<T>(name)table.query(params?)
table.query(params?)Query Parameters
Parameter
Type
Description
Filter Syntax
Operator
Description
Sorting
Selecting Fields
Return Type
table.meta()
table.meta()Return Type
Column Metadata
table.count(params?)
table.count(params?)table.export(format, params?)
table.export(format, params?)table.buildUrl(params?)
table.buildUrl(params?)React Hooks
useTableQuery(client, initialParams?)
useTableQuery(client, initialParams?)Return Values
Property
Type
Description
useTableMeta(client)
useTableMeta(client)Return Values
Property
Type
Description
TypeScript Integration
Type-Safe Rows
With Generated Types
Error Handling
Common Error Codes
Code
HTTP Status
Description
Framework Support
Feature
React
Vue
Svelte
Vanilla JS
What's Supported
What's NOT Included (Yet)
Non-React Usage
Vanilla JS
Vue 3
Svelte
Best Practices
1. Create a Shared Client Instance
2. Use Type Assertions for Better DX
3. Combine with DataTable Component
4. Cache Metadata for Performance
Contributing
Help Wanted
Framework
Status
What's Needed
How to Contribute
Vue 3 Composable Example (Expected API)
Svelte Store Example (Expected API)
FAQ
Does using axios increase my bundle size?
Your Choice
Bundle Size Impact
When should I use axios vs fetch?
Use fetch (default) when
Use axios when
Can I use other HTTP libraries?
Last updated
Was this helpful?
