Skip to content

TypeScript API / @contentia/decap / CreateContentiaBackendOptions

Interface: CreateContentiaBackendOptions ​

Options for creating a Contentia backend

Properties ​

assetsApiBaseUrl? ​

ts
assetsApiBaseUrl?: string;

Base URL for the assets API (used by default factory)


documentsApiBaseUrl? ​

ts
documentsApiBaseUrl?: string;

Base URL for the documents API (used by default factory)


getAssetsRepository? ​

ts
getAssetsRepository?: (options) => AssetsRepository;

Factory function to create an AssetsRepository for media/binary files. Defaults to creating an AssetsJsonApiProxyRepository.

Parameters ​

ParameterType
optionsGetAssetsRepositoryOptions

Returns ​

AssetsRepository


getDocumentsRepository? ​

ts
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 ​

ParameterType
optionsGetDocumentsRepositoryOptions

Returns ​

DocumentsRepository


onWarning? ​

ts
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 ​

ParameterType
errorContentiaError

Returns ​

void