DeliveryClientOptions
@ebitex/content-sdk — the framework-agnostic half.
- Low-level:
createDeliveryClient— one method per Content Delivery API endpoint, the delivered vocabulary as types (types.ts) and runtime guards (guards.ts), typed errors. - High-level:
createContentClient—resolveLocation(location)for router changes: site from the page’s own host, locale from the browser’s languages against the organization’s tree, the context bag, afull/normalizedresolve strategy, caching and cancellation.
Nothing here imports React; the rendering layer is @ebitex/content-sdk/react. Both clients
run in a browser (with a browser-safe delivery key) and in Node (any key).
Extended by
Section titled “Extended by”Properties
Section titled “Properties”apiKey
Section titled “apiKey”apiKey:
string
A Content delivery key, created on the Content app’s Delivery page. A key with an allowed-origins or allowed-IP-ranges restriction is browser-safe and may ship in a bundle; a key with neither is a server-side key and must never reach a browser — it works from any origin and any address. The SDK cannot tell the two apart; only the Delivery page can, so decide where this client runs before choosing a key.
baseUrl?
Section titled “baseUrl?”
optionalbaseUrl?:string
Defaults to ebitex’s production API. Override for a self-hosted or local deployment.
fetch?
Section titled “fetch?”
optionalfetch?: {(input,init?):Promise<Response>; (input,init?):Promise<Response>; }
Injectable for testing or for a runtime with a non-global fetch.
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”URL | RequestInfo
RequestInit
Returns
Section titled “Returns”Promise<Response>
Call Signature
Section titled “Call Signature”(
input,init?):Promise<Response>
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
onAudienceStatus?
Section titled “onAudienceStatus?”
optionalonAudienceStatus?: (status) =>void
Called when a response carries X-Ebitex-Audiences-Status: expired | invalid: the audience token this client sent is no longer good, and the caller should obtain a fresh one. The
high-level client wires this to its audience session; a direct user of this client may ignore it.
Parameters
Section titled “Parameters”status
Section titled “status”"expired" | "invalid"
Returns
Section titled “Returns”void
onSandbox?
Section titled “onSandbox?”
optionalonSandbox?: (mode) =>void
Called when the mode the API reports for this organization changes: development or cutover while it is a sandbox an agency is building for a client, null once it is an
ordinary organization (or if it never was). Read it off any response, so the first call after the organization goes live is the one that clears it.
Parameters
Section titled “Parameters”SandboxMode | null
Returns
Section titled “Returns”void