// This file was auto-generated by Fern from our API Definition.

/**
 * A workflow export containing the complete workflow configuration.
 */
export interface WorkflowExport {
    /** The version of the export format. */
    export_version?: string;
    /** The timestamp when the export was generated. */
    exported_at?: string;
    /** The workspace identifier. */
    app_id?: number;
    /** The workflow configuration. */
    workflow?: WorkflowExport.Workflow;
}

export namespace WorkflowExport {
    /**
     * The workflow configuration.
     */
    export interface Workflow {
        /** The unique identifier for the workflow. */
        id?: string;
        /** The title of the workflow. */
        title?: string;
        /** The description of the workflow. */
        description?: string;
        /** The type of trigger that starts this workflow. */
        trigger_type?: string;
        /** The current state of the workflow. */
        state?: Workflow.State;
        /** The channels this workflow targets. */
        target_channels?: string[];
        /** The preferred devices for this workflow. */
        preferred_devices?: string[];
        /** When the workflow was created. */
        created_at?: string;
        /** When the workflow was last updated. */
        updated_at?: string;
        /** The targeting rules for this workflow. */
        targeting?: Record<string, unknown>;
        /** The current snapshot of workflow steps and configuration. */
        snapshot?: Record<string, unknown>;
        /** Custom attributes defined for this workflow. */
        attributes?: Record<string, unknown>[];
        /** Rules embedded within the workflow steps. */
        embedded_rules?: Record<string, unknown>[];
    }

    export namespace Workflow {
        /** The current state of the workflow. */
        export const State = {
            Live: "live",
            Draft: "draft",
            Paused: "paused",
        } as const;
        export type State = (typeof State)[keyof typeof State];
    }
}
