import { z } from 'zod';

/**
 * Flow Node Types
 */
declare const FlowNodeAction: z.ZodEnum<{
    loop: "loop";
    start: "start";
    end: "end";
    script: "script";
    decision: "decision";
    create_record: "create_record";
    update_record: "update_record";
    delete_record: "delete_record";
    wait: "wait";
    connector_action: "connector_action";
    assignment: "assignment";
    get_record: "get_record";
    http_request: "http_request";
    screen: "screen";
    subflow: "subflow";
    parallel_gateway: "parallel_gateway";
    join_gateway: "join_gateway";
    boundary_event: "boundary_event";
}>;
/**
 * Flow Variable Schema
 * Variables available within the flow execution context.
 */
declare const FlowVariableSchema: z.ZodObject<{
    name: z.ZodString;
    type: z.ZodString;
    isInput: z.ZodDefault<z.ZodBoolean>;
    isOutput: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/**
 * Flow Node Schema
 * A single step in the visual logic graph.
 *
 * @example Decision Node
 * {
 *   id: "dec_1",
 *   type: "decision",
 *   label: "Is High Value?",
 *   config: {
 *     conditions: [
 *       { label: "Yes", expression: "{amount} > 10000" },
 *       { label: "No", expression: "true" } // default
 *     ]
 *   },
 *   position: { x: 300, y: 200 }
 * }
 */
declare const FlowNodeSchema: z.ZodObject<{
    id: z.ZodString;
    type: z.ZodEnum<{
        loop: "loop";
        start: "start";
        end: "end";
        script: "script";
        decision: "decision";
        create_record: "create_record";
        update_record: "update_record";
        delete_record: "delete_record";
        wait: "wait";
        connector_action: "connector_action";
        assignment: "assignment";
        get_record: "get_record";
        http_request: "http_request";
        screen: "screen";
        subflow: "subflow";
        parallel_gateway: "parallel_gateway";
        join_gateway: "join_gateway";
        boundary_event: "boundary_event";
    }>;
    label: z.ZodString;
    config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    connectorConfig: z.ZodOptional<z.ZodObject<{
        connectorId: z.ZodString;
        actionId: z.ZodString;
        input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    }, z.core.$strip>>;
    position: z.ZodOptional<z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>>;
    timeoutMs: z.ZodOptional<z.ZodNumber>;
    inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        type: z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            object: "object";
            array: "array";
        }>;
        required: z.ZodDefault<z.ZodBoolean>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        type: z.ZodEnum<{
            string: "string";
            number: "number";
            boolean: "boolean";
            object: "object";
            array: "array";
        }>;
        description: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>>;
    waitEventConfig: z.ZodOptional<z.ZodObject<{
        eventType: z.ZodEnum<{
            condition: "condition";
            manual: "manual";
            webhook: "webhook";
            timer: "timer";
            signal: "signal";
        }>;
        timerDuration: z.ZodOptional<z.ZodString>;
        signalName: z.ZodOptional<z.ZodString>;
        timeoutMs: z.ZodOptional<z.ZodNumber>;
        onTimeout: z.ZodDefault<z.ZodEnum<{
            continue: "continue";
            fail: "fail";
        }>>;
    }, z.core.$strip>>;
    boundaryConfig: z.ZodOptional<z.ZodObject<{
        attachedToNodeId: z.ZodString;
        eventType: z.ZodEnum<{
            error: "error";
            timer: "timer";
            signal: "signal";
            cancel: "cancel";
        }>;
        interrupting: z.ZodDefault<z.ZodBoolean>;
        errorCode: z.ZodOptional<z.ZodString>;
        timerDuration: z.ZodOptional<z.ZodString>;
        signalName: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Flow Edge Schema
 * Connections between nodes.
 */
declare const FlowEdgeSchema: z.ZodObject<{
    id: z.ZodString;
    source: z.ZodString;
    target: z.ZodString;
    condition: z.ZodOptional<z.ZodString>;
    type: z.ZodDefault<z.ZodEnum<{
        default: "default";
        conditional: "conditional";
        fault: "fault";
    }>>;
    label: z.ZodOptional<z.ZodString>;
    isDefault: z.ZodDefault<z.ZodBoolean>;
}, z.core.$strip>;
/**
 * Flow Schema
 * Visual Business Logic Orchestration.
 *
 * @example Simple Approval Logic
 * {
 *   name: "approve_order_flow",
 *   label: "Approve Large Orders",
 *   type: "record_change",
 *   status: "active",
 *   nodes: [
 *     { id: "start", type: "start", label: "Start", position: {x: 0, y: 0} },
 *     { id: "check_amount", type: "decision", label: "Check Amount", position: {x: 0, y: 100} },
 *     { id: "auto_approve", type: "update_record", label: "Auto Approve", position: {x: -100, y: 200} },
 *     { id: "submit_for_approval", type: "connector_action", label: "Submit", position: {x: 100, y: 200} }
 *   ],
 *   edges: [
 *     { id: "e1", source: "start", target: "check_amount" },
 *     { id: "e2", source: "check_amount", target: "auto_approve", condition: "{amount} < 500" },
 *     { id: "e3", source: "check_amount", target: "submit_for_approval", condition: "{amount} >= 500" }
 *   ]
 * }
 */
declare const FlowSchema: z.ZodObject<{
    name: z.ZodString;
    label: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    version: z.ZodDefault<z.ZodNumber>;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        draft: "draft";
        obsolete: "obsolete";
        invalid: "invalid";
    }>>;
    template: z.ZodDefault<z.ZodBoolean>;
    type: z.ZodEnum<{
        api: "api";
        schedule: "schedule";
        screen: "screen";
        autolaunched: "autolaunched";
        record_change: "record_change";
    }>;
    variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        type: z.ZodString;
        isInput: z.ZodDefault<z.ZodBoolean>;
        isOutput: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>>;
    nodes: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        type: z.ZodEnum<{
            loop: "loop";
            start: "start";
            end: "end";
            script: "script";
            decision: "decision";
            create_record: "create_record";
            update_record: "update_record";
            delete_record: "delete_record";
            wait: "wait";
            connector_action: "connector_action";
            assignment: "assignment";
            get_record: "get_record";
            http_request: "http_request";
            screen: "screen";
            subflow: "subflow";
            parallel_gateway: "parallel_gateway";
            join_gateway: "join_gateway";
            boundary_event: "boundary_event";
        }>;
        label: z.ZodString;
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        connectorConfig: z.ZodOptional<z.ZodObject<{
            connectorId: z.ZodString;
            actionId: z.ZodString;
            input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
        }, z.core.$strip>>;
        position: z.ZodOptional<z.ZodObject<{
            x: z.ZodNumber;
            y: z.ZodNumber;
        }, z.core.$strip>>;
        timeoutMs: z.ZodOptional<z.ZodNumber>;
        inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            type: z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
                object: "object";
                array: "array";
            }>;
            required: z.ZodDefault<z.ZodBoolean>;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            type: z.ZodEnum<{
                string: "string";
                number: "number";
                boolean: "boolean";
                object: "object";
                array: "array";
            }>;
            description: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>;
        waitEventConfig: z.ZodOptional<z.ZodObject<{
            eventType: z.ZodEnum<{
                condition: "condition";
                manual: "manual";
                webhook: "webhook";
                timer: "timer";
                signal: "signal";
            }>;
            timerDuration: z.ZodOptional<z.ZodString>;
            signalName: z.ZodOptional<z.ZodString>;
            timeoutMs: z.ZodOptional<z.ZodNumber>;
            onTimeout: z.ZodDefault<z.ZodEnum<{
                continue: "continue";
                fail: "fail";
            }>>;
        }, z.core.$strip>>;
        boundaryConfig: z.ZodOptional<z.ZodObject<{
            attachedToNodeId: z.ZodString;
            eventType: z.ZodEnum<{
                error: "error";
                timer: "timer";
                signal: "signal";
                cancel: "cancel";
            }>;
            interrupting: z.ZodDefault<z.ZodBoolean>;
            errorCode: z.ZodOptional<z.ZodString>;
            timerDuration: z.ZodOptional<z.ZodString>;
            signalName: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>>;
    edges: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        source: z.ZodString;
        target: z.ZodString;
        condition: z.ZodOptional<z.ZodString>;
        type: z.ZodDefault<z.ZodEnum<{
            default: "default";
            conditional: "conditional";
            fault: "fault";
        }>>;
        label: z.ZodOptional<z.ZodString>;
        isDefault: z.ZodDefault<z.ZodBoolean>;
    }, z.core.$strip>>;
    active: z.ZodDefault<z.ZodBoolean>;
    runAs: z.ZodDefault<z.ZodEnum<{
        user: "user";
        system: "system";
    }>>;
    errorHandling: z.ZodOptional<z.ZodObject<{
        strategy: z.ZodDefault<z.ZodEnum<{
            continue: "continue";
            retry: "retry";
            fail: "fail";
        }>>;
        maxRetries: z.ZodDefault<z.ZodNumber>;
        retryDelayMs: z.ZodDefault<z.ZodNumber>;
        backoffMultiplier: z.ZodDefault<z.ZodNumber>;
        maxRetryDelayMs: z.ZodDefault<z.ZodNumber>;
        jitter: z.ZodDefault<z.ZodBoolean>;
        fallbackNodeId: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Type-safe factory for creating flow definitions.
 *
 * Validates the config at creation time using Zod `.parse()`.
 *
 * @example
 * ```ts
 * const onCreateFlow = defineFlow({
 *   name: 'on_task_create',
 *   label: 'On Task Create',
 *   type: 'record_change',
 *   nodes: [
 *     { id: 'start', type: 'start', label: 'Start' },
 *     { id: 'end', type: 'end', label: 'End' },
 *   ],
 *   edges: [{ id: 'e1', source: 'start', target: 'end' }],
 * });
 * ```
 */
declare function defineFlow(config: z.input<typeof FlowSchema>): FlowParsed;
type Flow = z.input<typeof FlowSchema>;
type FlowParsed = z.infer<typeof FlowSchema>;
type FlowNode = z.input<typeof FlowNodeSchema>;
type FlowNodeParsed = z.infer<typeof FlowNodeSchema>;
type FlowEdge = z.input<typeof FlowEdgeSchema>;
type FlowEdgeParsed = z.infer<typeof FlowEdgeSchema>;
/**
 * Flow Version History Schema
 * Tracks historical versions of flow definitions for rollback support.
 *
 * Industry alignment: Salesforce Flow Versions, n8n Workflow History.
 */
declare const FlowVersionHistorySchema: z.ZodObject<{
    flowName: z.ZodString;
    version: z.ZodNumber;
    definition: z.ZodObject<{
        name: z.ZodString;
        label: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        version: z.ZodDefault<z.ZodNumber>;
        status: z.ZodDefault<z.ZodEnum<{
            active: "active";
            draft: "draft";
            obsolete: "obsolete";
            invalid: "invalid";
        }>>;
        template: z.ZodDefault<z.ZodBoolean>;
        type: z.ZodEnum<{
            api: "api";
            schedule: "schedule";
            screen: "screen";
            autolaunched: "autolaunched";
            record_change: "record_change";
        }>;
        variables: z.ZodOptional<z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            type: z.ZodString;
            isInput: z.ZodDefault<z.ZodBoolean>;
            isOutput: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>>;
        nodes: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            type: z.ZodEnum<{
                loop: "loop";
                start: "start";
                end: "end";
                script: "script";
                decision: "decision";
                create_record: "create_record";
                update_record: "update_record";
                delete_record: "delete_record";
                wait: "wait";
                connector_action: "connector_action";
                assignment: "assignment";
                get_record: "get_record";
                http_request: "http_request";
                screen: "screen";
                subflow: "subflow";
                parallel_gateway: "parallel_gateway";
                join_gateway: "join_gateway";
                boundary_event: "boundary_event";
            }>;
            label: z.ZodString;
            config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            connectorConfig: z.ZodOptional<z.ZodObject<{
                connectorId: z.ZodString;
                actionId: z.ZodString;
                input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            }, z.core.$strip>>;
            position: z.ZodOptional<z.ZodObject<{
                x: z.ZodNumber;
                y: z.ZodNumber;
            }, z.core.$strip>>;
            timeoutMs: z.ZodOptional<z.ZodNumber>;
            inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
                type: z.ZodEnum<{
                    string: "string";
                    number: "number";
                    boolean: "boolean";
                    object: "object";
                    array: "array";
                }>;
                required: z.ZodDefault<z.ZodBoolean>;
                description: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>>;
            outputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
                type: z.ZodEnum<{
                    string: "string";
                    number: "number";
                    boolean: "boolean";
                    object: "object";
                    array: "array";
                }>;
                description: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>>;
            waitEventConfig: z.ZodOptional<z.ZodObject<{
                eventType: z.ZodEnum<{
                    condition: "condition";
                    manual: "manual";
                    webhook: "webhook";
                    timer: "timer";
                    signal: "signal";
                }>;
                timerDuration: z.ZodOptional<z.ZodString>;
                signalName: z.ZodOptional<z.ZodString>;
                timeoutMs: z.ZodOptional<z.ZodNumber>;
                onTimeout: z.ZodDefault<z.ZodEnum<{
                    continue: "continue";
                    fail: "fail";
                }>>;
            }, z.core.$strip>>;
            boundaryConfig: z.ZodOptional<z.ZodObject<{
                attachedToNodeId: z.ZodString;
                eventType: z.ZodEnum<{
                    error: "error";
                    timer: "timer";
                    signal: "signal";
                    cancel: "cancel";
                }>;
                interrupting: z.ZodDefault<z.ZodBoolean>;
                errorCode: z.ZodOptional<z.ZodString>;
                timerDuration: z.ZodOptional<z.ZodString>;
                signalName: z.ZodOptional<z.ZodString>;
            }, z.core.$strip>>;
        }, z.core.$strip>>;
        edges: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            source: z.ZodString;
            target: z.ZodString;
            condition: z.ZodOptional<z.ZodString>;
            type: z.ZodDefault<z.ZodEnum<{
                default: "default";
                conditional: "conditional";
                fault: "fault";
            }>>;
            label: z.ZodOptional<z.ZodString>;
            isDefault: z.ZodDefault<z.ZodBoolean>;
        }, z.core.$strip>>;
        active: z.ZodDefault<z.ZodBoolean>;
        runAs: z.ZodDefault<z.ZodEnum<{
            user: "user";
            system: "system";
        }>>;
        errorHandling: z.ZodOptional<z.ZodObject<{
            strategy: z.ZodDefault<z.ZodEnum<{
                continue: "continue";
                retry: "retry";
                fail: "fail";
            }>>;
            maxRetries: z.ZodDefault<z.ZodNumber>;
            retryDelayMs: z.ZodDefault<z.ZodNumber>;
            backoffMultiplier: z.ZodDefault<z.ZodNumber>;
            maxRetryDelayMs: z.ZodDefault<z.ZodNumber>;
            jitter: z.ZodDefault<z.ZodBoolean>;
            fallbackNodeId: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
    }, z.core.$strip>;
    createdAt: z.ZodString;
    createdBy: z.ZodOptional<z.ZodString>;
    changeNote: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type FlowVersionHistory = z.input<typeof FlowVersionHistorySchema>;
type FlowVersionHistoryParsed = z.infer<typeof FlowVersionHistorySchema>;

/**
 * Automation Execution Protocol
 *
 * Defines schemas for execution logging, error tracking, checkpointing,
 * concurrency control, and scheduled execution persistence.
 *
 * Industry alignment: Salesforce Flow Interviews, Temporal Workflow History,
 * AWS Step Functions execution logs.
 */
/**
 * Execution Status Enum
 * Tracks the lifecycle of a flow execution instance.
 */
declare const ExecutionStatus: z.ZodEnum<{
    running: "running";
    completed: "completed";
    failed: "failed";
    cancelled: "cancelled";
    pending: "pending";
    paused: "paused";
    timed_out: "timed_out";
    retrying: "retrying";
}>;
type ExecutionStatus = z.infer<typeof ExecutionStatus>;
/**
 * Execution Step Log Entry
 * Records the result of executing a single node in the flow graph.
 */
declare const ExecutionStepLogSchema: z.ZodObject<{
    nodeId: z.ZodString;
    nodeType: z.ZodString;
    nodeLabel: z.ZodOptional<z.ZodString>;
    status: z.ZodEnum<{
        success: "success";
        skipped: "skipped";
        failure: "failure";
    }>;
    startedAt: z.ZodString;
    completedAt: z.ZodOptional<z.ZodString>;
    durationMs: z.ZodOptional<z.ZodNumber>;
    input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    error: z.ZodOptional<z.ZodObject<{
        code: z.ZodString;
        message: z.ZodString;
        stack: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    retryAttempt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
type ExecutionStepLog = z.infer<typeof ExecutionStepLogSchema>;
/**
 * Execution Log Schema
 * Full execution history for a single flow run.
 *
 * @example
 * {
 *   id: 'exec_001',
 *   flowName: 'approve_order_flow',
 *   flowVersion: 1,
 *   status: 'completed',
 *   trigger: { type: 'record_change', recordId: 'rec_123', object: 'order' },
 *   steps: [
 *     { nodeId: 'start', nodeType: 'start', status: 'success', startedAt: '...', durationMs: 1 },
 *     { nodeId: 'check_amount', nodeType: 'decision', status: 'success', startedAt: '...', durationMs: 5 },
 *   ],
 *   startedAt: '2026-02-01T10:00:00Z',
 *   completedAt: '2026-02-01T10:00:01Z',
 *   durationMs: 1050,
 * }
 */
declare const ExecutionLogSchema: z.ZodObject<{
    id: z.ZodString;
    flowName: z.ZodString;
    flowVersion: z.ZodOptional<z.ZodNumber>;
    status: z.ZodEnum<{
        running: "running";
        completed: "completed";
        failed: "failed";
        cancelled: "cancelled";
        pending: "pending";
        paused: "paused";
        timed_out: "timed_out";
        retrying: "retrying";
    }>;
    trigger: z.ZodObject<{
        type: z.ZodString;
        recordId: z.ZodOptional<z.ZodString>;
        object: z.ZodOptional<z.ZodString>;
        userId: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, z.core.$strip>;
    steps: z.ZodArray<z.ZodObject<{
        nodeId: z.ZodString;
        nodeType: z.ZodString;
        nodeLabel: z.ZodOptional<z.ZodString>;
        status: z.ZodEnum<{
            success: "success";
            skipped: "skipped";
            failure: "failure";
        }>;
        startedAt: z.ZodString;
        completedAt: z.ZodOptional<z.ZodString>;
        durationMs: z.ZodOptional<z.ZodNumber>;
        input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        error: z.ZodOptional<z.ZodObject<{
            code: z.ZodString;
            message: z.ZodString;
            stack: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>;
        retryAttempt: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
    variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    startedAt: z.ZodString;
    completedAt: z.ZodOptional<z.ZodString>;
    durationMs: z.ZodOptional<z.ZodNumber>;
    runAs: z.ZodOptional<z.ZodEnum<{
        user: "user";
        system: "system";
    }>>;
    tenantId: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ExecutionLog = z.infer<typeof ExecutionLogSchema>;
/**
 * Execution Error Severity
 */
declare const ExecutionErrorSeverity: z.ZodEnum<{
    error: "error";
    warning: "warning";
    critical: "critical";
}>;
type ExecutionErrorSeverity = z.infer<typeof ExecutionErrorSeverity>;
/**
 * Execution Error Schema
 * Detailed error record for diagnostics and troubleshooting.
 */
declare const ExecutionErrorSchema: z.ZodObject<{
    id: z.ZodString;
    executionId: z.ZodString;
    nodeId: z.ZodOptional<z.ZodString>;
    severity: z.ZodEnum<{
        error: "error";
        warning: "warning";
        critical: "critical";
    }>;
    code: z.ZodString;
    message: z.ZodString;
    stack: z.ZodOptional<z.ZodString>;
    context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    timestamp: z.ZodString;
    retryable: z.ZodDefault<z.ZodBoolean>;
    resolvedAt: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ExecutionError = z.infer<typeof ExecutionErrorSchema>;
/**
 * Checkpoint Schema
 * Captures the execution state at a specific node for pause/resume.
 *
 * Used by wait nodes, user-input screens, and crash recovery.
 */
declare const CheckpointSchema: z.ZodObject<{
    id: z.ZodString;
    executionId: z.ZodString;
    flowName: z.ZodString;
    currentNodeId: z.ZodString;
    variables: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    completedNodeIds: z.ZodArray<z.ZodString>;
    createdAt: z.ZodString;
    expiresAt: z.ZodOptional<z.ZodString>;
    reason: z.ZodEnum<{
        error: "error";
        approval: "approval";
        wait: "wait";
        boundary_event: "boundary_event";
        screen_input: "screen_input";
        manual_pause: "manual_pause";
        parallel_join: "parallel_join";
    }>;
}, z.core.$strip>;
type Checkpoint = z.infer<typeof CheckpointSchema>;
/**
 * Concurrency Policy Schema
 * Controls how concurrent executions of the same flow are handled.
 *
 * Industry alignment: Salesforce "Allow multiple instances", Temporal "Workflow ID reuse policy"
 */
declare const ConcurrencyPolicySchema: z.ZodObject<{
    maxConcurrent: z.ZodDefault<z.ZodNumber>;
    onConflict: z.ZodDefault<z.ZodEnum<{
        reject: "reject";
        queue: "queue";
        cancel_existing: "cancel_existing";
    }>>;
    lockScope: z.ZodDefault<z.ZodEnum<{
        global: "global";
        per_record: "per_record";
        per_user: "per_user";
    }>>;
    queueTimeoutMs: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
type ConcurrencyPolicy = z.infer<typeof ConcurrencyPolicySchema>;
/**
 * Schedule State Schema
 * Tracks the runtime state of scheduled flow executions.
 *
 * Persists next-run times, pause/resume state, and execution history references.
 */
declare const ScheduleStateSchema: z.ZodObject<{
    id: z.ZodString;
    flowName: z.ZodString;
    cronExpression: z.ZodString;
    timezone: z.ZodDefault<z.ZodString>;
    status: z.ZodDefault<z.ZodEnum<{
        active: "active";
        disabled: "disabled";
        expired: "expired";
        paused: "paused";
    }>>;
    nextRunAt: z.ZodOptional<z.ZodString>;
    lastRunAt: z.ZodOptional<z.ZodString>;
    lastExecutionId: z.ZodOptional<z.ZodString>;
    lastRunStatus: z.ZodOptional<z.ZodEnum<{
        running: "running";
        completed: "completed";
        failed: "failed";
        cancelled: "cancelled";
        pending: "pending";
        paused: "paused";
        timed_out: "timed_out";
        retrying: "retrying";
    }>>;
    totalRuns: z.ZodDefault<z.ZodNumber>;
    consecutiveFailures: z.ZodDefault<z.ZodNumber>;
    startDate: z.ZodOptional<z.ZodString>;
    endDate: z.ZodOptional<z.ZodString>;
    maxRuns: z.ZodOptional<z.ZodNumber>;
    createdAt: z.ZodString;
    updatedAt: z.ZodOptional<z.ZodString>;
    createdBy: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
type ScheduleState = z.infer<typeof ScheduleStateSchema>;
type ExecutionStepLogParsed = z.infer<typeof ExecutionStepLogSchema>;
type ExecutionLogParsed = z.infer<typeof ExecutionLogSchema>;
type ExecutionErrorParsed = z.infer<typeof ExecutionErrorSchema>;
type CheckpointParsed = z.infer<typeof CheckpointSchema>;
type ConcurrencyPolicyParsed = z.infer<typeof ConcurrencyPolicySchema>;
type ScheduleStateParsed = z.infer<typeof ScheduleStateSchema>;

export { type FlowVersionHistory as A, type FlowVersionHistoryParsed as B, type Checkpoint as C, FlowVersionHistorySchema as D, type ExecutionError as E, type Flow as F, type ScheduleStateParsed as G, ScheduleStateSchema as H, type ScheduleState as S, type CheckpointParsed as a, CheckpointSchema as b, type ConcurrencyPolicy as c, defineFlow as d, type ConcurrencyPolicyParsed as e, ConcurrencyPolicySchema as f, type ExecutionErrorParsed as g, ExecutionErrorSchema as h, ExecutionErrorSeverity as i, type ExecutionLog as j, type ExecutionLogParsed as k, ExecutionLogSchema as l, ExecutionStatus as m, type ExecutionStepLog as n, type ExecutionStepLogParsed as o, ExecutionStepLogSchema as p, type FlowEdge as q, type FlowEdgeParsed as r, FlowEdgeSchema as s, type FlowNode as t, FlowNodeAction as u, type FlowNodeParsed as v, FlowNodeSchema as w, type FlowParsed as x, FlowSchema as y, FlowVariableSchema as z };
