/** * Count schedules pinned to an exact `(type, revision)` (WFT-20). Wired into * `catalog-removal.ts`'s `countWorkflowRevisionReferences()`, replacing the * `pinnedSchedules: 0` stub WFT-12 left in place pending this batch (see * that field's own doc comment: "always 0 until WFT-20"). * * Mirrors `nonterminal-revision-count.ts`'s bounded-scan shape exactly: only * top-level `schedule:{id}` records are schedule states — `schedule:{id}:*` * suffix keys (timer index, run metadata) share the `schedule:` prefix but * are not, the same skip `listSchedules`/`recoverOrphanedScheduleTimers` * already apply. * * @module core/engine/pinned-schedule-revision-count */ import type { Storage } from '../../storage/interface.ts'; /** * Scan `storage` for schedules whose `workflowType` and `pinnedRevision` * match exactly, returning the count. Only `revisionPolicy: 'pinned'` * schedules ever count — an `'active-at-fire'` schedule against the same * `(type, revision)` never blocks removal, since it resolves whatever is * active at each future fire regardless of what is being removed now. A * `'cancelled'` pinned schedule is excluded too: it will never fire again, * so it must not block removal of the revision it once pinned. A `'paused'` * pinned schedule still counts — it can be resumed and fire again later. */ export declare function countPinnedSchedulesForRevision(storage: Storage, type: string, revision: string): Promise;