import type { DatabaseSchema } from "./schema.js"; import { type KeyPropertyName, type Sync, type SyncChangeDelete, type SyncChangeUpsert } from "./sync.js"; export type WorkflowSyncTriggerResult = { status: "queued"; }; export type WorkflowSyncApplyResult = { upserted: number; deleted: number; skipped: number; }; export type WorkflowSyncClient = { /** * Queue a run of the sync's own handler with its persisted state. Resolves * when the run is queued, not when the sync cycle finishes. */ trigger(syncDefinition: Sync): Promise; /** * Write event-driven changes through the sync without running its handler. * Pass `state` to replace the sync's persisted state (for example, its * cursor); omit it to leave the state unchanged. */ apply, State>(syncDefinition: Sync, args: { changes: Array, "type" | "key" | "properties" | "upstreamUpdatedAt"> | SyncChangeDelete>; state?: State; }): Promise; }; export declare function createWorkflowSyncClient(): WorkflowSyncClient; //# sourceMappingURL=workflow-sync.d.ts.map