client.gen.ts 881 B

12345678910111213141516171819202122
  1. // This file is auto-generated by @hey-api/openapi-ts
  2. import type { ClientOptions } from "./types.gen.js"
  3. import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from "./client/index.js"
  4. /**
  5. * The `createClientConfig()` function will be called on client initialization
  6. * and the returned object will become the client's initial configuration.
  7. *
  8. * You may want to initialize your client this way instead of calling
  9. * `setConfig()`. This is useful for example if you're using Next.js
  10. * to ensure your client always has the correct values.
  11. */
  12. export type CreateClientConfig<T extends DefaultClientOptions = ClientOptions> = (
  13. override?: Config<DefaultClientOptions & T>,
  14. ) => Config<Required<DefaultClientOptions> & T>
  15. export const client = createClient(
  16. createConfig<ClientOptions>({
  17. baseUrl: "http://localhost:4096",
  18. }),
  19. )