Skip to content

PathOptions

@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: createContentClientresolveLocation(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, a full/normalized resolve 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).

optional ctx?: ContextBag

The personalization context. Present = server-resolve (personalization collapsed, tokens injected); absent = client-resolve (unresolved variant-set envelopes come back).

ReadOptions.ctx


optional host?: string

The hostname (no port) the page is served under — for a localeHost site, where the host is the locale. The server turns it into the site and the locale in one lookup, so send it instead of site and locale. A query parameter rather than the Host header, because every request to the API arrives with the API’s own host.


optional locale?: string

One locale code. The server resolves its fallback chain; the high-level client picks the code.

ReadOptions.locale


optional raw?: boolean

Keep Localizable envelopes unresolved. Never sent by the high-level client.

ReadOptions.raw


optional referencePaths?: boolean

Attach every reference descriptor’s own published address(es) — wire include=referencePaths. The paths member is the same one listComponents({ paths: true }) puts on an item, with the same rules, but on the references inside a document: a post’s series, a parent article, a related-reading list. [] means the target is bound at no live node; the member being absent means this option was not sent.

Present at any depth and whether or not the descriptor was expanded, so a resolve: 0 read is enough to build navigation. Pick one with pathForSite.

ReadOptions.referencePaths


optional resolve?: number

Expansion depth (an integer, capped at 10 server-side). Omitted = 0, descriptors only.

ReadOptions.resolve


optional signal?: AbortSignal

ReadOptions.signal


optional site?: string

A site’s rootNodeId (from listSites). Required from a browser — the server’s Host inference can only fire for a request arriving on the site’s own hostname.