Config

Interface: Config<T>

Defined in: api/client/types.gen.ts:19

Extends

  • Omit<CreateAxiosDefaults, "auth" | "baseURL" | "headers" | "method">.Config

Extended by

Type Parameters

T

T *extends* ClientOptions = ClientOptions

Properties

auth?

optional auth?: ((auth) => AuthToken | Promise<AuthToken>) | AuthToken

Defined in: api/core/types.gen.ts:40

Auth token or a function returning auth token. The resolved value will be added to the request payload as defined by its security array.

Inherited from

Config.auth


axios?

optional axios?: AxiosStatic | AxiosInstance

Defined in: api/client/types.gen.ts:27

Axios implementation. You can use this option to provide either an

AxiosStatic or an AxiosInstance.

Default

axios

baseURL?

optional baseURL?: T["baseURL"]

Defined in: api/client/types.gen.ts:31

Base URL for all requests made by this client.


bodySerializer?

optional bodySerializer?: BodySerializer | null

Defined in: api/core/types.gen.ts:45

A function for serializing request body parameter. By default, JSON.stringify() will be used.

Inherited from

Config.bodySerializer


headers?

optional headers?: AxiosRequestHeaders | Record<string, unknown>

Defined in: api/client/types.gen.ts:38

An object containing any HTTP headers that you want to pre-populate your

Headers object with.

See more

Overrides

Config.headers


method?

optional method?: "CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE"

Defined in: api/core/types.gen.ts:63

The request method.

See more

Inherited from

Config.method


querySerializer?

optional querySerializer?: QuerySerializer | QuerySerializerOptions

Defined in: api/core/types.gen.ts:74

A function for serializing request query parameters. By default, arrays will be exploded in form style, objects will be exploded in deepObject style, and reserved characters are percent-encoded.

This method will have no effect if the native paramsSerializer() Axios API function is used.

View examples

Inherited from

Config.querySerializer


requestValidator?

optional requestValidator?: (data) => Promise<unknown>

Defined in: api/core/types.gen.ts:80

A function validating request data. This is useful if you want to ensure the request conforms to the desired shape, so it can be safely sent to the server.

Parameters

data
[object Object]

Returns

Promise<unknown>

Inherited from

Config.requestValidator


responseTransformer?

optional responseTransformer?: (data) => Promise<unknown>

Defined in: api/core/types.gen.ts:85

A function transforming response data before it's returned. This is useful for post-processing data, e.g., converting ISO strings into Date objects.

Parameters

data
[object Object]

Returns

Promise<unknown>

Inherited from

Config.responseTransformer


responseValidator?

optional responseValidator?: (data) => Promise<unknown>

Defined in: api/core/types.gen.ts:91

A function validating response data. This is useful if you want to ensure the response conforms to the desired shape, so it can be safely passed to the transformers and returned to the user.

Parameters

data
[object Object]

Returns

Promise<unknown>

Inherited from

Config.responseValidator


throwOnError?

optional throwOnError?: T["throwOnError"]

Defined in: api/client/types.gen.ts:49

Throw an error instead of returning it in the response?

Default

false

On this page