/** * The SDK generator (SPEC.md §48, §121). * * It reads the Schema Registry snapshot — plain data, which is why this package * depends on nothing but `@assemora/schema` — and emits TypeScript. A resource or a * route that exists is therefore a resource or a route the SDK can call, without * anyone writing a client by hand (SPEC.md §3.7). * * "A resource that exists" means one this application *serves*, and the snapshot says * which: the `routes` section is written when a route is mounted, and a server refuses * to start when the two disagree (SPEC.md §98). The `resources` section is a different * question — what content this application has — and answering the first with the * second is how the client came to publish addresses that answer 404: a resource whose * four `api` flags are off, one a version publishes and the bare paths do not, and a * collection that was registered after the routes were mounted (SPEC.md §37, §43). */ import type { JsonSchema } from '@assemora/schema'; export type RegistrySnapshot = Readonly>[]>>; export type GenerateOptions = { /** Where the runtime client is imported from in the emitted file. */ readonly clientModule?: string; }; /** JSON Schema as TypeScript. What travels over the wire, not what the server holds. */ export declare const toTypeScript: (schema: JsonSchema | undefined, indent?: string) => string; /** Emits the whole client: record types, resource accessors and route methods. */ export declare const generateSdk: (snapshot: RegistrySnapshot, options?: GenerateOptions) => string; //# sourceMappingURL=generate.d.ts.map