client.gen.ts 890 B

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