import type { EnqueueWorkflowEventInput, DurableWorkflowExecution, ProcessPendingExecutionsInput, ProcessPendingExecutionsResult } from "@duraflows/core"; import { WorkflowHandle } from "@duraflows/core"; import type { WorkflowRuntime, CreateWorkflowInstanceInput, TriggerWorkflowEventInput, GetAvailableEventsInput, WorkflowDefinition, WorkflowInstance, WorkflowExecutionResult, AvailableWorkflowEvent, WorkflowHistoryRecord, DefinitionVersionSummary, MigrateInstancesInput, MigrateInstancesResult } from "@duraflows/core"; export declare class WorkflowService { private readonly runtime; constructor(runtime: WorkflowRuntime); createInstance(input: CreateWorkflowInstanceInput): Promise; /** * Type-safe variant of {@link createInstance} that binds the resulting * instance's `currentState` to the state union of the supplied * `WorkflowDefinition`. Use when the caller has a typed definition in * hand and wants to avoid widening `currentState` to `string`. * * The `workflowName` is read from the definition; callers pass only the * non-name portion of `CreateWorkflowInstanceInput`. */ createInstanceFor(definition: WorkflowDefinition, input?: Omit): Promise>; triggerEvent(input: TriggerWorkflowEventInput): Promise; /** * Type-safe variant of {@link triggerEvent} that narrows the resulting * `fromState`/`toState` to the state union of the supplied * `WorkflowDefinition`. Use when the caller has a typed definition in * hand and wants to avoid widening to `string`. * * Does not validate at runtime that the instance belongs to the given * definition — that is the caller's responsibility (typically enforced * upstream when the instance was created via `createInstanceFor`). */ triggerEventFor(definition: WorkflowDefinition, input: TriggerWorkflowEventInput): Promise>; enqueueEvent(input: EnqueueWorkflowEventInput): Promise; getExecution(uuid: string): Promise; processPendingExecutions(input?: ProcessPendingExecutionsInput): Promise; retryExecution(uuid: string): Promise; cancelExecution(uuid: string): Promise; getAvailableEvents(input: GetAvailableEventsInput): Promise; getInstance(uuid: string): Promise; getHistory(workflowInstanceUuid: string, options?: { limit?: number; offset?: number; }): Promise; listDefinitionVersions(workflowName: string): Promise; migrateInstances(input: MigrateInstancesInput): Promise; getHandle(uuid: string): WorkflowHandle; } //# sourceMappingURL=workflow.service.d.ts.map