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.

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.
Integration code example
- Implement the backend adapter around your existing authentication and transport contracts.
- Return canonical event records or explicit failure decisions with appropriate version handling.
- Subscribe to workflow snapshots, apply them to the calendar, and unsubscribe during teardown.
Copy this TypeScript into your application, not the browser console. Replace YOUR_WTS_LICENSE_KEY with an entitlement issued for your deployment origin. A WTS license is not a Google, Microsoft or CalDAV credential. These examples are documentation only and never execute on this page.
npm install @wts-calendar/coreimport { verifyCalendarLicense } from '@wts-calendar/core';
import { EnterpriseCalendarWorkflow } from '@wts-calendar/core/enterprise-workflow';
import type {
EnterpriseWorkflowActor,
EnterpriseWorkflowBackendAdapter,
} from '@wts-calendar/core/enterprise-workflow';
const license = await verifyCalendarLicense('YOUR_WTS_LICENSE_KEY');
// 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 });Application responsibilities
Implement the transport and storage callbacks using your existing systems; there is no pretend successful backend in this example.
Authenticate actors on the server, validate versions and permissions, use mutation IDs for idempotency, and return conflicts or rejections instead of acknowledging failed writes.
persistQueue and persistAudit only provide callbacks; retention, encrypted storage, recovery and trusted audit checkpoints remain customer responsibilities.
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.
Enable this capability
- Optional module
- @wts-calendar/core/enterprise-workflow
- Signed entitlement
- enterprise-workflow
Request the required features and deployment origins by email. Pricing and terms are confirmed privately. A WTS license is separate from provider credentials; do not send passwords or production access tokens.
Email for a license key →This public guide does not execute Premium modules or collect license tokens.