fork of hey-api/openapi-ts because I need some additional things
at main 30 lines 953 B view raw
1// This file is auto-generated by @hey-api/openapi-ts 2 3import { createClientConfig } from '../hey-api'; 4import { 5 type ClientOptions, 6 type Config, 7 createClient, 8 createConfig, 9} from './client'; 10import type { ClientOptions as ClientOptions2 } from './types.gen'; 11 12/** 13 * The `createClientConfig()` function will be called on client initialization 14 * and the returned object will become the client's initial configuration. 15 * 16 * You may want to initialize your client this way instead of calling 17 * `setConfig()`. This is useful for example if you're using Next.js 18 * to ensure your client always has the correct values. 19 */ 20export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = ( 21 override?: Config<ClientOptions & T>, 22) => Config<Required<ClientOptions> & T>; 23 24export const client = createClient( 25 createClientConfig( 26 createConfig<ClientOptions2>({ 27 baseUrl: 'https://petstore3.swagger.io/api/v3', 28 }), 29 ), 30);