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