···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import { type ClientOptions, type Config, createClient, createConfig } from './client';
44+import type { ClientOptions as ClientOptions2 } from './types.gen';
55+66+/**
77+ * The `createClientConfig()` function will be called on client initialization
88+ * and the returned object will become the client's initial configuration.
99+ *
1010+ * You may want to initialize your client this way instead of calling
1111+ * `setConfig()`. This is useful for example if you're using Next.js
1212+ * to ensure your client always has the correct values.
1313+ */
1414+export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515+1616+export const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'http://localhost:3000/base' }));
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import type { Auth, AuthToken } from './auth.gen';
44+import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';
55+66+export type HttpMethod =
77+ | 'connect'
88+ | 'delete'
99+ | 'get'
1010+ | 'head'
1111+ | 'options'
1212+ | 'patch'
1313+ | 'post'
1414+ | 'put'
1515+ | 'trace';
1616+1717+export type Client<
1818+ RequestFn = never,
1919+ Config = unknown,
2020+ MethodFn = never,
2121+ BuildUrlFn = never,
2222+ SseFn = never,
2323+> = {
2424+ /**
2525+ * Returns the final request URL.
2626+ */
2727+ buildUrl: BuildUrlFn;
2828+ getConfig: () => Config;
2929+ request: RequestFn;
3030+ setConfig: (config: Config) => Config;
3131+} & {
3232+ [K in HttpMethod]: MethodFn;
3333+} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });
3434+3535+export interface Config {
3636+ /**
3737+ * Auth token or a function returning auth token. The resolved value will be
3838+ * added to the request payload as defined by its `security` array.
3939+ */
4040+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
4141+ /**
4242+ * A function for serializing request body parameter. By default,
4343+ * {@link JSON.stringify()} will be used.
4444+ */
4545+ bodySerializer?: BodySerializer | null;
4646+ /**
4747+ * An object containing any HTTP headers that you want to pre-populate your
4848+ * `Headers` object with.
4949+ *
5050+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
5151+ */
5252+ headers?:
5353+ | RequestInit['headers']
5454+ | Record<
5555+ string,
5656+ string | number | boolean | (string | number | boolean)[] | null | undefined | unknown
5757+ >;
5858+ /**
5959+ * The request method.
6060+ *
6161+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
6262+ */
6363+ method?: Uppercase<HttpMethod>;
6464+ /**
6565+ * A function for serializing request query parameters. By default, arrays
6666+ * will be exploded in form style, objects will be exploded in deepObject
6767+ * style, and reserved characters are percent-encoded.
6868+ *
6969+ * This method will have no effect if the native `paramsSerializer()` Axios
7070+ * API function is used.
7171+ *
7272+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
7373+ */
7474+ querySerializer?: QuerySerializer | QuerySerializerOptions;
7575+ /**
7676+ * A function validating request data. This is useful if you want to ensure
7777+ * the request conforms to the desired shape, so it can be safely sent to
7878+ * the server.
7979+ */
8080+ requestValidator?: (data: unknown) => Promise<unknown>;
8181+ /**
8282+ * A function transforming response data before it's returned. This is useful
8383+ * for post-processing data, e.g. converting ISO strings into Date objects.
8484+ */
8585+ responseTransformer?: (data: unknown) => Promise<unknown>;
8686+ /**
8787+ * A function validating response data. This is useful if you want to ensure
8888+ * the response conforms to the desired shape, so it can be safely passed to
8989+ * the transformers and returned to the user.
9090+ */
9191+ responseValidator?: (data: unknown) => Promise<unknown>;
9292+}
9393+9494+type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
9595+ ? true
9696+ : [T] extends [never | undefined]
9797+ ? [undefined] extends [T]
9898+ ? false
9999+ : true
100100+ : false;
101101+102102+export type OmitNever<T extends Record<string, unknown>> = {
103103+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
104104+};
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import { type ClientOptions, type Config, createClient, createConfig } from './client';
44+import type { ClientOptions as ClientOptions2 } from './types.gen';
55+66+/**
77+ * The `createClientConfig()` function will be called on client initialization
88+ * and the returned object will become the client's initial configuration.
99+ *
1010+ * You may want to initialize your client this way instead of calling
1111+ * `setConfig()`. This is useful for example if you're using Next.js
1212+ * to ensure your client always has the correct values.
1313+ */
1414+export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515+1616+export const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'http://localhost:3000/base' }));
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import type { Auth, AuthToken } from './auth.gen';
44+import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';
55+66+export type HttpMethod =
77+ | 'connect'
88+ | 'delete'
99+ | 'get'
1010+ | 'head'
1111+ | 'options'
1212+ | 'patch'
1313+ | 'post'
1414+ | 'put'
1515+ | 'trace';
1616+1717+export type Client<
1818+ RequestFn = never,
1919+ Config = unknown,
2020+ MethodFn = never,
2121+ BuildUrlFn = never,
2222+ SseFn = never,
2323+> = {
2424+ /**
2525+ * Returns the final request URL.
2626+ */
2727+ buildUrl: BuildUrlFn;
2828+ getConfig: () => Config;
2929+ request: RequestFn;
3030+ setConfig: (config: Config) => Config;
3131+} & {
3232+ [K in HttpMethod]: MethodFn;
3333+} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });
3434+3535+export interface Config {
3636+ /**
3737+ * Auth token or a function returning auth token. The resolved value will be
3838+ * added to the request payload as defined by its `security` array.
3939+ */
4040+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
4141+ /**
4242+ * A function for serializing request body parameter. By default,
4343+ * {@link JSON.stringify()} will be used.
4444+ */
4545+ bodySerializer?: BodySerializer | null;
4646+ /**
4747+ * An object containing any HTTP headers that you want to pre-populate your
4848+ * `Headers` object with.
4949+ *
5050+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
5151+ */
5252+ headers?:
5353+ | RequestInit['headers']
5454+ | Record<
5555+ string,
5656+ string | number | boolean | (string | number | boolean)[] | null | undefined | unknown
5757+ >;
5858+ /**
5959+ * The request method.
6060+ *
6161+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
6262+ */
6363+ method?: Uppercase<HttpMethod>;
6464+ /**
6565+ * A function for serializing request query parameters. By default, arrays
6666+ * will be exploded in form style, objects will be exploded in deepObject
6767+ * style, and reserved characters are percent-encoded.
6868+ *
6969+ * This method will have no effect if the native `paramsSerializer()` Axios
7070+ * API function is used.
7171+ *
7272+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
7373+ */
7474+ querySerializer?: QuerySerializer | QuerySerializerOptions;
7575+ /**
7676+ * A function validating request data. This is useful if you want to ensure
7777+ * the request conforms to the desired shape, so it can be safely sent to
7878+ * the server.
7979+ */
8080+ requestValidator?: (data: unknown) => Promise<unknown>;
8181+ /**
8282+ * A function transforming response data before it's returned. This is useful
8383+ * for post-processing data, e.g. converting ISO strings into Date objects.
8484+ */
8585+ responseTransformer?: (data: unknown) => Promise<unknown>;
8686+ /**
8787+ * A function validating response data. This is useful if you want to ensure
8888+ * the response conforms to the desired shape, so it can be safely passed to
8989+ * the transformers and returned to the user.
9090+ */
9191+ responseValidator?: (data: unknown) => Promise<unknown>;
9292+}
9393+9494+type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
9595+ ? true
9696+ : [T] extends [never | undefined]
9797+ ? [undefined] extends [T]
9898+ ? false
9999+ : true
100100+ : false;
101101+102102+export type OmitNever<T extends Record<string, unknown>> = {
103103+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
104104+};
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import { type ClientOptions, type Config, createClient, createConfig } from './client';
44+import type { ClientOptions as ClientOptions2 } from './types.gen';
55+66+/**
77+ * The `createClientConfig()` function will be called on client initialization
88+ * and the returned object will become the client's initial configuration.
99+ *
1010+ * You may want to initialize your client this way instead of calling
1111+ * `setConfig()`. This is useful for example if you're using Next.js
1212+ * to ensure your client always has the correct values.
1313+ */
1414+export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
1515+1616+export const client = createClient(createConfig<ClientOptions2>({ baseUrl: 'http://localhost:3000/base' }));
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+import type { Auth, AuthToken } from './auth.gen';
44+import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen';
55+66+export type HttpMethod =
77+ | 'connect'
88+ | 'delete'
99+ | 'get'
1010+ | 'head'
1111+ | 'options'
1212+ | 'patch'
1313+ | 'post'
1414+ | 'put'
1515+ | 'trace';
1616+1717+export type Client<
1818+ RequestFn = never,
1919+ Config = unknown,
2020+ MethodFn = never,
2121+ BuildUrlFn = never,
2222+ SseFn = never,
2323+> = {
2424+ /**
2525+ * Returns the final request URL.
2626+ */
2727+ buildUrl: BuildUrlFn;
2828+ getConfig: () => Config;
2929+ request: RequestFn;
3030+ setConfig: (config: Config) => Config;
3131+} & {
3232+ [K in HttpMethod]: MethodFn;
3333+} & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });
3434+3535+export interface Config {
3636+ /**
3737+ * Auth token or a function returning auth token. The resolved value will be
3838+ * added to the request payload as defined by its `security` array.
3939+ */
4040+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
4141+ /**
4242+ * A function for serializing request body parameter. By default,
4343+ * {@link JSON.stringify()} will be used.
4444+ */
4545+ bodySerializer?: BodySerializer | null;
4646+ /**
4747+ * An object containing any HTTP headers that you want to pre-populate your
4848+ * `Headers` object with.
4949+ *
5050+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
5151+ */
5252+ headers?:
5353+ | RequestInit['headers']
5454+ | Record<
5555+ string,
5656+ string | number | boolean | (string | number | boolean)[] | null | undefined | unknown
5757+ >;
5858+ /**
5959+ * The request method.
6060+ *
6161+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
6262+ */
6363+ method?: Uppercase<HttpMethod>;
6464+ /**
6565+ * A function for serializing request query parameters. By default, arrays
6666+ * will be exploded in form style, objects will be exploded in deepObject
6767+ * style, and reserved characters are percent-encoded.
6868+ *
6969+ * This method will have no effect if the native `paramsSerializer()` Axios
7070+ * API function is used.
7171+ *
7272+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
7373+ */
7474+ querySerializer?: QuerySerializer | QuerySerializerOptions;
7575+ /**
7676+ * A function validating request data. This is useful if you want to ensure
7777+ * the request conforms to the desired shape, so it can be safely sent to
7878+ * the server.
7979+ */
8080+ requestValidator?: (data: unknown) => Promise<unknown>;
8181+ /**
8282+ * A function transforming response data before it's returned. This is useful
8383+ * for post-processing data, e.g. converting ISO strings into Date objects.
8484+ */
8585+ responseTransformer?: (data: unknown) => Promise<unknown>;
8686+ /**
8787+ * A function validating response data. This is useful if you want to ensure
8888+ * the response conforms to the desired shape, so it can be safely passed to
8989+ * the transformers and returned to the user.
9090+ */
9191+ responseValidator?: (data: unknown) => Promise<unknown>;
9292+}
9393+9494+type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
9595+ ? true
9696+ : [T] extends [never | undefined]
9797+ ? [undefined] extends [T]
9898+ ? false
9999+ : true
100100+ : false;
101101+102102+export type OmitNever<T extends Record<string, unknown>> = {
103103+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
104104+};