import { FExceptionArgument } from '@freemework/common'; export declare namespace WorkflowModel { interface WorkflowId { /** * Big integer */ readonly workflowId: string; } interface TickId { /** * Big integer */ readonly tickId: string; } interface Data { readonly workflowUuid: string; readonly activityUuid: string; readonly activityVersion: string; } namespace Tick { interface General { readonly workflowVirtualMachineSnapshot: unknown; readonly latestExecutedBreakpoint: string | null; readonly executedAt: Date; readonly nextTickTags: ReadonlyArray | null; } interface Operational extends General { readonly workflowStatus: Exclude; } interface Crash extends General { readonly workflowStatus: Status.CRASHED; readonly crashReport: string; } } type Tick = Tick.Operational | Tick.Crash; interface Creation { readonly createdAt: Date; } enum Status { WORKING = "WORKING", SLEEPING = "SLEEPING", CRASHED = "CRASHED", TERMINATED = "TERMINATED" } namespace Status { function guard(state: string): state is Status; function parse(fiatCurrency: string): Status; class UnreachableNotSupportedWorkflowApplicationStateError extends FExceptionArgument { constructor(state: never); } } } export type WorkflowModel = WorkflowModel.WorkflowId & WorkflowModel.TickId & WorkflowModel.Data & WorkflowModel.Tick & WorkflowModel.Creation;