mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-10-06 10:39:06 +00:00
- Add machine-readable OpenAPI spec for Storage, Database, PubSub - Document HTTP endpoints, auth, migrations, and SDK patterns - Provide minimal TypeScript SDK example and code - Update README and add example SDK files and configs - Bump version to 0.40.0-beta
DeBros Gateway TypeScript SDK (Minimal Example)
Minimal, dependency-light wrapper around the HTTP Gateway.
Usage:
npm i
export GATEWAY_BASE_URL=http://127.0.0.1:8080
export GATEWAY_API_KEY=your_api_key
import { GatewayClient } from './src/client';
const c = new GatewayClient(process.env.GATEWAY_BASE_URL!, process.env.GATEWAY_API_KEY!);
await c.createTable('CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT)');
await c.transaction([
'INSERT INTO users (id,name) VALUES (1,\'Alice\')'
]);
const res = await c.query('SELECT name FROM users WHERE id = ?', [1]);
console.log(res.rows);