Skip to content

JsonApiClientOptions

Defined in: packages/json-api-client/src/types.ts:6

Extends ApiClientOptions to add JSON:API Specific options.

  • ApiClientOptions
optional apiPrefix?: string;

Defined in: packages/api-client/dist/index.d.mts:15

The base path for the JSON:API endpoint

ApiClientOptions.apiPrefix

optional authentication?: Authentication;

Defined in: packages/api-client/dist/index.d.mts:32

The authentication configuration to use for authenticated API requests.

ApiClientOptions.authentication

optional cache?: Cache;

Defined in: packages/api-client/dist/index.d.mts:20

Default cache implementation Cache

ApiClientOptions.cache

optional customFetch?: (input, init?) => Promise<Response>;

Defined in: packages/api-client/dist/index.d.mts:28

Custom fetch method overrides fetch in the ApiClient

URL | RequestInfo

input to the customFetch

RequestInit

additional configuration for the request like the method to use, headers, etc.

Promise<Response>

a Response wrapped in a promise

https://developer.mozilla.org/en-US/docs/Web/API/fetch

ApiClientOptions.customFetch

optional debug?: boolean;

Defined in: packages/api-client/dist/index.d.mts:52

If true, logs debug messages to the console.

ApiClientOptions.debug

optional decoupledRouterApiPrefix?: string;

Defined in: packages/json-api-client/src/types.ts:14

The api prefix to use for decoupled router


optional defaultLocale?: string;

Defined in: packages/api-client/dist/index.d.mts:37

The default locale to use for all API requests.

Locale

ApiClientOptions.defaultLocale

optional indexLookup?: boolean;

Defined in: packages/json-api-client/src/types.ts:10

If true, the client will use the JSON:API index endpoint to discover the available resources.


optional logger?: object;

Defined in: packages/api-client/dist/index.d.mts:46

Represents a logger object with optional logging methods for various log levels.

optional debug?: LogMethod;
optional error?: LogMethod;
optional http?: LogMethod;
optional info?: LogMethod;
optional silly?: LogMethod;
optional verbose?: LogMethod;
optional warn?: LogMethod;
ApiClientOptions.logger

optional serializer?: Serializer;

Defined in: packages/api-client/dist/index.d.mts:42

Custom serializer to use for deserializing api response.

ApiClientOptions.serializer