UNPKG

durable-execution-storage-drizzle

Version:

Drizzle ORM storage implementation for durable-execution

75 lines 3.31 kB
import { type DurableExecutionErrorStorageValue, type TaskExecutionCloseStatus, type TaskExecutionOnChildrenFinishedProcessingStatus, type TaskExecutionStatus, type TaskExecutionStorageUpdate, type TaskExecutionStorageValue, type TaskExecutionSummary, type TaskRetryOptions } from 'durable-execution'; export type TaskExecutionDBValue = { rootTaskId?: string | null; rootExecutionId?: string | null; parentTaskId?: string | null; parentExecutionId?: string | null; indexInParentChildren?: number | null; isOnlyChildOfParent?: boolean | null; isFinalizeOfParent?: boolean | null; taskId: string; executionId: string; isSleepingTask: boolean; sleepingTaskUniqueId?: string | null; retryOptions: TaskRetryOptions; sleepMsBeforeRun: number; timeoutMs: number; areChildrenSequential: boolean; input: string; executorId?: string | null; status: TaskExecutionStatus; isFinished: boolean; runOutput?: string | null; output?: string | null; error?: DurableExecutionErrorStorageValue | null; retryAttempts: number; startAt: number; startedAt?: number | null; expiresAt?: number | null; waitingForChildrenStartedAt?: number | null; waitingForFinalizeStartedAt?: number | null; finishedAt?: number | null; children?: Array<TaskExecutionSummary> | null; activeChildrenCount: number; onChildrenFinishedProcessingStatus: TaskExecutionOnChildrenFinishedProcessingStatus; onChildrenFinishedProcessingExpiresAt?: number | null; onChildrenFinishedProcessingFinishedAt?: number | null; finalize?: TaskExecutionSummary | null; closeStatus: TaskExecutionCloseStatus; closeExpiresAt?: number | null; closedAt?: number | null; needsPromiseCancellation: boolean; createdAt: number; updatedAt: number; }; export type TaskExecutionDBUpdate = { executorId?: string | null; status?: TaskExecutionStatus; isFinished?: boolean; runOutput?: string | null; output?: string; error?: DurableExecutionErrorStorageValue | null; retryAttempts?: number; startAt?: number; startedAt?: number | null; expiresAt?: number | null; waitingForChildrenStartedAt?: number; waitingForFinalizeStartedAt?: number; finishedAt?: number; children?: Array<TaskExecutionSummary>; activeChildrenCount?: number; shouldDecrementParentActiveChildrenCount?: boolean; onChildrenFinishedProcessingStatus?: TaskExecutionOnChildrenFinishedProcessingStatus; onChildrenFinishedProcessingExpiresAt?: number | null; onChildrenFinishedProcessingFinishedAt?: number; finalize?: TaskExecutionSummary; closeStatus?: TaskExecutionCloseStatus; closeExpiresAt?: number | null; closedAt?: number; needsPromiseCancellation?: boolean; updatedAt: number; }; export declare function taskExecutionStorageValueToDBValue(value: TaskExecutionStorageValue): TaskExecutionDBValue; export declare function taskExecutionDBValueToStorageValue(dbValue: TaskExecutionDBValue, update?: TaskExecutionStorageUpdate, updateExpiresAtWithStartedAt?: number): TaskExecutionStorageValue; export declare function taskExecutionStorageUpdateToDBUpdate(update: TaskExecutionStorageUpdate): TaskExecutionDBUpdate; //# sourceMappingURL=common.d.ts.map