The generated types for the key's schema
What chelabase gen types writes for the same secret key and options, byte for byte: the TypeScript module (Database and the runtime types map for @chelabase/client), or with format=json the runtime types map alone. It is built from exactly what GET /data/v1/schema gives the key. The ETag is the body's hash: send it back as If-None-Match for a 304 while the schema is unchanged. Not cached (Cache-Control: no-store): the schema follows the key.
Authorization
bearer A data API key (chk_pub_… or chk_sec_…) as Authorization: Bearer <key>
In: header
Query Parameters
ts (the default): the TypeScript module chelabase gen types writes. json: the
runtime types map alone, exactly what the module's types constant holds.
Value in
- "ts"
- "json"
Generate this database (not the main one) as Database. It must be served and, when
the key has a database list, on it. Not with all_databases.
true: every database the key reaches, as Databases and a types map keyed by
name (main as main). With only main reachable, the one-database module.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/data/v1/types"{}The schema as the key's role sees it GET
The tables, views, columns, functions and enums the secret key's role can reach in the database (without privileges), and the databases the key may reach. `chelabase gen types` reads it.
Access per route
The credential and access level every route requires, generated from the route table the gateway and services share.