Existing-backend interfaces
Connect the workflow to infrastructure you already operate. A transport-neutral adapter separates calendar mutation decisions from REST, GraphQL, RPC, local-first storage, or another customer system.
Loading interactive demo…
What you configure
- sendMutation
- Deliver the mutation, actor, and record context using your transport.
- result status
- Return committed, conflict, rejected, or retry.
- persistQueue / persistAudit
- Optionally store pending work and append audit evidence in customer-owned systems.
Essential integration
This assumes the shared Quick start already provides premiumLicense and, for UI views, premiumCalendarOptions. Only the feature-specific setup is shown.
import { EnterpriseCalendarWorkflow } from '@wts-calendar/core/enterprise-workflow';
import type {
EnterpriseWorkflowActor,
EnterpriseWorkflowBackendAdapter,
} from '@wts-calendar/core/enterprise-workflow';
// Supply a customer-owned authenticated transport. WTS provides no /api endpoint.
export function connectBackend(
actor: EnterpriseWorkflowActor,
backend: EnterpriseWorkflowBackendAdapter,
) {
return new EnterpriseCalendarWorkflow({
license,
actor,
backend,
online: true,
autoFlush: false,
events: [
{
id: 'release',
title: 'Release window',
start: '2026-09-07T09:00:00Z',
end: '2026-09-07T10:00:00Z',
},
],
defaultPermission: 'deny',
permissionPolicies: [
{ id: 'editors', effect: 'allow', actions: ['update', 'flush'], roles: ['editor'] },
],
});
}
// Wrap your REST/GraphQL/RPC implementation; preserve the typed result contract.
export function createBackend(
sendMutation: EnterpriseWorkflowBackendAdapter['sendMutation'],
persistQueue: NonNullable<EnterpriseWorkflowBackendAdapter['persistQueue']>,
persistAudit: NonNullable<EnterpriseWorkflowBackendAdapter['persistAudit']>,
): EnterpriseWorkflowBackendAdapter {
return { sendMutation, persistQueue, persistAudit };
}
// sendMutation(context, signal) must return a Promise resolving to:
// { status: 'committed', record? } | { status: 'conflict' | 'rejected' | 'retry', message? }
// Then await workflow.submit(...); await workflow.flush({ signal });Behavior and lifecycle
- A committed response may normalize event data and assign the authoritative record version.
- The workflow engine does not choose a database, authentication scheme, or delivery protocol.
Limits and responsibilities
- The adapter interface is not a hosted backend or a preconfigured integration with every service.
- Authenticate actors, enforce policies, validate versions, and operate durable storage in infrastructure you control.
Premium
Enable this capability
- Optional module
- @wts-calendar/core/enterprise-workflow
- Local capability ID
- enterprise-workflow · enabled by package-wide Premium
Use the request form to describe your project and deployment origins. Pricing and terms are confirmed privately. A WTS license is separate from provider credentials; do not send passwords or production access tokens.
The live example uses a browser-visible deployment key restricted to this package and approved origins. It does not collect license keys or visitor credentials.