Interface ClientOptions
interface ClientOptions {
baseUrl: string;
credentials?: RequestCredentials;
fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
getAccessToken?: () => string | Promise<string | undefined> | undefined;
}
baseUrl: string;
credentials?: RequestCredentials;
fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
getAccessToken?: () => string | Promise<string | undefined> | undefined;
}
Hierarchy (View Summary)
- ClientOptions
Properties
base Url
baseUrl: string
Installation origin without /api/shop. Use an empty string for same-origin shop calls.
Optionalcredentials
credentials?: RequestCredentials
Cookie policy for direct booking fetches; public calls default to omit. Optional; omitted unless supplied by the host or backend.
Optionalfetch
fetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>
Optional host fetch implementation. Optional; omitted unless supplied by the host or backend.
Optionalget Access Token
getAccessToken?: () => string | Promise<string | undefined> | undefined
Authenticated consumers can supply a Bearer token without coupling to a router.
Transport and authentication options for direct booking API calls.