Skip to content

JsonApiClientOptions

Extends ApiClientOptions to add JSON:API Specific options.

Extends

  • ApiClientOptions

Properties

apiPrefix?

optional apiPrefix: string;

The base path for the JSON:API endpoint

Inherited from

ApiClientOptions.apiPrefix

Source

api-client/dist/index.d.mts:15


authentication?

optional authentication: Authentication;

The authentication configuration to use for authenticated API requests.

Inherited from

ApiClientOptions.authentication

Source

api-client/dist/index.d.mts:32


cache?

optional cache: Cache;

Default cache implementation Cache

Inherited from

ApiClientOptions.cache

Source

api-client/dist/index.d.mts:20


customFetch()?

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

Custom fetch method overrides fetch in the ApiClient

See

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

Parameters

input: RequestInfo | URL

input to the customFetch

init?: RequestInit

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

Returns

Promise<Response>

Inherited from

ApiClientOptions.customFetch

Source

api-client/dist/index.d.mts:28


debug?

optional debug: boolean;

If true, logs debug messages to the console.

Inherited from

ApiClientOptions.debug

Source

api-client/dist/index.d.mts:52


decoupledRouterApiPrefix?

optional decoupledRouterApiPrefix: string;

The api prefix to use for decoupled router

Source

json-api-client/src/types.ts:14


defaultLocale?

optional defaultLocale: string;

The default locale to use for all API requests.

See

Locale

Inherited from

ApiClientOptions.defaultLocale

Source

api-client/dist/index.d.mts:37


indexLookup?

optional indexLookup: boolean;

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

Source

json-api-client/src/types.ts:10


logger?

optional logger: object;

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

debug

debug: undefined | LogMethod;

error

error: undefined | LogMethod;

http

http: undefined | LogMethod;

info

info: undefined | LogMethod;

silly

silly: undefined | LogMethod;

verbose

verbose: undefined | LogMethod;

warn

warn: undefined | LogMethod;

Inherited from

ApiClientOptions.logger

Source

api-client/dist/index.d.mts:46


serializer?

optional serializer: Serializer;

Custom serializer to use for deserializing api response.

Inherited from

ApiClientOptions.serializer

Source

api-client/dist/index.d.mts:42