import type { OpenApiDocument } from './openapi'; /** Options for {@link generateClient}. */ export interface GenerateClientOptions { /** Name of the generated factory function (default `"createClient"`); emitted as `export function `, so it must be a valid JS identifier. */ clientName?: string; } /** * Generate a self-contained, dependency-free typed client module (TypeScript * source) from an OpenAPI document. Each operation becomes a method typed from * its path/query parameters, request body, and 2xx response schema; the client * builds the URL, query string, and JSON body and calls an injectable `fetch`. * * ```ts * const source = generateClient(app.openapi({ info: { title: 'API', version: '1' } })) * await Bun.write('client.ts', source) * ``` * * @param doc - the OpenAPI document to generate the client from * @param options - generation options (e.g. the generated `clientName`) * @returns TypeScript source for a self-contained typed client module */ export declare function generateClient(doc: OpenApiDocument, options?: GenerateClientOptions): string; //# sourceMappingURL=codegen.d.ts.map