Type shoalrun.content.RestContentSourceOptions
type RestContentSourceOptions = {
baseUrl: string | URL;
publication: ContentPublication;
revision?: string;
fetch?: typeof globalThis.fetch;
signal?: AbortSignal;
limits?: ContentDeliveryLimits;
};
Options for a REST inventory and its revision-pinned resource reads.
Fields
| Name | Type | Required / default | Description |
|---|---|---|---|
baseUrl |
string | URL |
Required | REST mount URL, such as /content/v1. Browser requests must use the application's origin. |
fetch |
((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined |
Optional | Fetch implementation. Defaults to globalThis.fetch. |
limits |
ContentDeliveryLimits | undefined |
Optional | Inventory and representation bounds. |
publication |
ContentPublication |
Required | Exact publication to request; include product for a product-scoped source. |
revision |
string | undefined |
Optional | Expected inventory revision. Omit it to open the current revision. |
signal |
AbortSignal | undefined |
Optional | Cancel the inventory-opening request. |
shoalrun.content.RestContentSourceOptions.baseUrl
Property shoalrun.content.RestContentSourceOptions.baseUrl
baseUrl: string | URL
REST mount URL, such as /content/v1. Browser requests must use the application's origin.
Type: string | URL
Required
shoalrun.content.RestContentSourceOptions.fetch
Property shoalrun.content.RestContentSourceOptions.fetch
fetch?: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined
Fetch implementation. Defaults to globalThis.fetch.
Type: ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined
Optional
shoalrun.content.RestContentSourceOptions.limits
Property shoalrun.content.RestContentSourceOptions.limits
limits?: ContentDeliveryLimits | undefined
Inventory and representation bounds.
Type: ContentDeliveryLimits | undefined
Optional
shoalrun.content.RestContentSourceOptions.publication
Property shoalrun.content.RestContentSourceOptions.publication
publication: ContentPublication
Exact publication to request; include product for a product-scoped source.
Type: ContentPublication
Required
shoalrun.content.RestContentSourceOptions.revision
Property shoalrun.content.RestContentSourceOptions.revision
revision?: string | undefined
Expected inventory revision. Omit it to open the current revision.
Type: string | undefined
Optional
shoalrun.content.RestContentSourceOptions.signal
Property shoalrun.content.RestContentSourceOptions.signal
signal?: AbortSignal | undefined
Cancel the inventory-opening request.
Type: AbortSignal | undefined
Optional