TypeScript API / @contentia/decap / CreateContentiaBackendOptions
Interface: CreateContentiaBackendOptions
Options for creating a Contentia backend
Properties
assetsApiBaseUrl?
assetsApiBaseUrl?: string;Base URL for the assets API (used by default factory)
documentsApiBaseUrl?
documentsApiBaseUrl?: string;Base URL for the documents API (used by default factory)
getAssetsRepository?
getAssetsRepository?: (options) => AssetsRepository;Factory function to create an AssetsRepository for media/binary files. Defaults to creating an AssetsJsonApiProxyRepository.
Parameters
| Parameter | Type |
|---|---|
options | GetAssetsRepositoryOptions |
Returns
getDocumentsRepository?
getDocumentsRepository?: (options) => DocumentsRepository;Factory function to create a DocumentsRepository. Defaults to creating a DocumentsJsonApiProxyRepository. The repository handles all collections - routing can be done internally if needed.
Parameters
| Parameter | Type |
|---|---|
options | GetDocumentsRepositoryOptions |
Returns
onWarning?
onWarning?: (error) => void;Optional handler invoked for every recoverable warning emitted by a ContentiaTask or ContentiaStream the backend runs. Use this to route warnings into your own observability (toasts, Sentry, metrics, structured logs).
Defaults to a console.warn line, so partial-success states surface in the Decap UI's devtools even if the host application doesn't wire its own handler.
Parameters
| Parameter | Type |
|---|---|
error | ContentiaError |
Returns
void