Skip to content

DecoupledRouterClientOptions

Defined in: decoupled-router-client/src/types.ts:6

Extends ApiClientOptions with decoupled router specific options.

  • ApiClientOptions
optional apiPrefix?: string;

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

The base path for the JSON:API endpoint

ApiClientOptions.apiPrefix

optional authentication?: Authentication;

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

The authentication configuration to use for authenticated API requests.

ApiClientOptions.authentication

optional cache?: Cache;

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

Default cache implementation Cache

ApiClientOptions.cache

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

Defined in: 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: api-client/dist/index.d.mts:52

If true, logs debug messages to the console.

ApiClientOptions.debug

optional defaultLocale?: string;

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

The default locale to use for all API requests.

Locale

ApiClientOptions.defaultLocale

optional languagePathPrefix?: boolean;

Defined in: decoupled-router-client/src/types.ts:16

Whether to send the targeted language as a /{locale}/ URL path prefix. Defaults to true, which is how a translated path alias resolves on a site using URL path prefix language negotiation. Set to false for a backend that does not serve /{locale}/ URLs; a translated path alias then resolves from the path alone, and a backend with the jsonapi_multilingual module reports the resolved language as entity.langcode (ResolvedPath).


optional logger?: object;

Defined in: 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: api-client/dist/index.d.mts:42

Custom serializer to use for deserializing api response.

ApiClientOptions.serializer