import type { AttributeChange } from '#compiled/@workflow/world/index.js'; import type { Serializable } from './schemas.js'; export interface StepInvocationQueueItem { type: 'step'; correlationId: string; stepName: string; args: Serializable[]; closureVars?: Record; thisVal?: Serializable; hasCreatedEvent?: boolean; } export interface HookInvocationQueueItem { type: 'hook'; correlationId: string; token: string; metadata?: Serializable; hasCreatedEvent?: boolean; /** Whether the workflow is awaiting `hook.getConflict()` for this hook */ hasConflictAwaiter?: boolean; disposed?: boolean; isWebhook?: boolean; isSystem?: boolean; abortRequested?: boolean; abortReason?: unknown; } export interface WaitInvocationQueueItem { type: 'wait'; correlationId: string; resumeAt: Date; hasCreatedEvent?: boolean; } export interface AttributeInvocationQueueItem { type: 'attribute'; correlationId: string; changes: AttributeChange[]; allowReservedAttributes?: true; } export type QueueItem = StepInvocationQueueItem | HookInvocationQueueItem | WaitInvocationQueueItem | AttributeInvocationQueueItem; /** * An error that is thrown when one or more operations (steps/hooks/etc.) are called but do * not yet have corresponding entries in the event log. The workflow * dispatcher will catch this error and push the operations * onto the queue. */ export declare class WorkflowSuspension extends Error { steps: QueueItem[]; globalThis: typeof globalThis; stepCount: number; hookCount: number; waitCount: number; attributeCount: number; hookDisposedCount: number; abortCount: number; constructor(stepsInput: Map, global: typeof globalThis); static is(value: unknown): value is WorkflowSuspension; } export declare function ENOTSUP(): never; //# sourceMappingURL=global.d.ts.map