UNPKG

@hey-api/openapi-ts

Version:

🚀 The OpenAPI to TypeScript codegen. Generate clients, SDKs, validators, and more.

40 lines (33 loc) • 1.55 kB
import { P as PluginHandler, S as StringCase, U as UserConfig, C as Client, I as IR } from './types.d-CAqtwzfv.js'; export { b as Client, L as LegacyIR, O as OpenApi, a as OpenApiSchemaObject, c as Plugin, d as defaultPlugins } from './types.d-CAqtwzfv.js'; import 'node:fs'; import 'typescript'; declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"]; declare const clientDefaultConfig: { readonly _dependencies: readonly ["@hey-api/typescript"]; readonly _tags: readonly ["client"]; readonly baseUrl: true; readonly bundle: true; readonly exportFromIndex: false; readonly output: "client"; }; declare const clientPluginHandler: PluginHandler; declare const utils: { stringCase: ({ case: _case, stripLeadingSeparators, value, }: { readonly case: StringCase | undefined; stripLeadingSeparators?: boolean; value: string; }) => string; }; type Configs = UserConfig | (() => UserConfig) | (() => Promise<UserConfig>); /** * Generate a client from the provided configuration. * * @param userConfig User provided {@link UserConfig} configuration. */ declare const createClient: (userConfig?: Configs) => Promise<ReadonlyArray<Client | IR.Context>>; /** * Type helper for openapi-ts.config.ts, returns {@link UserConfig} object */ declare const defineConfig: (config: Configs) => Promise<UserConfig>; export { IR, UserConfig, clientDefaultConfig, clientPluginHandler, createClient, defaultPaginationKeywords, defineConfig, utils };