export type BreakConfig = { condition: string; }; export type ReturnConfig = { data: string; }; export type WaitConfig = { condition: string; }; export type ThrowConfig = { error: string; }; export declare enum WAIT_NUM { WAIT_UNSPECIFIED = 0, WAIT_ALL = 1, WAIT_NONE = 2 } export declare enum WAIT_STR { WAIT_UNSPECIFIED = "WAIT_UNSPECIFIED", WAIT_ALL = "WAIT_ALL", WAIT_NONE = "WAIT_NONE" } export type ParallelConfig = { wait: WAIT_NUM | WAIT_STR; poolSize?: number; static?: { paths: Record; }; dynamic?: { variables: { item: string; }; paths: string; blocks?: BaseBlock[]; }; }; type Condition = { condition: string; blocks?: BaseBlock[]; }; export type ConditionalConfig = { if?: Condition; elseIf?: Condition[]; else?: { blocks?: BaseBlock[]; }; }; export declare enum LOOP_TYPE { UNSPECIFIED = "TYPE_UNSPECIFIED", FOR = "TYPE_FOR", FOREACH = "TYPE_FOREACH", WHILE = "TYPE_WHILE" } export type LoopConfig = { variables: { index: string; item: string; }; range: string; blocks?: BaseBlock[]; type: LOOP_TYPE; }; export type TryCatchConfig = { variables: { error: string; }; try?: { blocks?: BaseBlock[]; }; catch?: { blocks?: BaseBlock[]; }; finally?: { blocks?: BaseBlock[]; }; }; export declare enum VariableType { UNSPECIFIED = "TYPE_UNSPECIFIED", SIMPLE = "TYPE_SIMPLE", ADVANCED = "TYPE_ADVANCED" } export declare enum VariableMode { UNSPECIFIED = "MODE_UNSPECIFIED", READ = "MODE_READ", READWRITE = "MODE_READWRITE" } type VariableConfig = { value: string; key: string; type: VariableType; mode: VariableMode; }; export type VariablesConfig = { items: Array; }; export type SendConfig = { message: string; }; export type StreamConfig = { variables: { item: string; }; trigger?: BaseBlock; process?: { blocks?: BaseBlock[]; }; options?: { disable_auto_send: boolean; }; }; type StepPluginType = string; export type StepConfig = { integration?: string; } & { [plugin in StepPluginType]?: unknown; }; export type BaseBlock = { name: string; break?: BreakConfig; return?: ReturnConfig; wait?: WaitConfig; throw?: ThrowConfig; parallel?: ParallelConfig; conditional?: ConditionalConfig; loop?: LoopConfig; tryCatch?: TryCatchConfig; step?: StepConfig; stream?: StreamConfig; send?: SendConfig; variables?: VariablesConfig; }; export declare const BlockType: { readonly CONDITION: "CONDITION"; readonly LOOP: "LOOP"; readonly PARALLEL: "PARALLEL"; readonly TRY_CATCH: "TRY_CATCH"; readonly VARIABLES: "VARIABLES"; readonly RETURN: "RETURN"; readonly BREAK: "BREAK"; readonly WAIT: "WAIT"; readonly THROW: "THROW"; readonly STEP: "STEP"; readonly SEND: "SEND"; readonly STREAM: "STREAM"; }; type BlockType = (typeof BlockType)[keyof typeof BlockType]; export type GenericBlock = { type: BlockType; config: StepConfig | ConditionalConfig | LoopConfig | ParallelConfig | TryCatchConfig | VariableConfig | ReturnConfig | BreakConfig | WaitConfig | ThrowConfig | SendConfig | StreamConfig; }; export type StepBlock = { type: 'STEP'; config: StepConfig; }; export type ControlBlock = { type: Exclude; config: ConditionalConfig | LoopConfig | ParallelConfig | TryCatchConfig | VariableConfig | ReturnConfig | BreakConfig | WaitConfig | ThrowConfig | SendConfig | StreamConfig; }; export declare function convertBlock(backendBlock: BaseBlock): GenericBlock | null; export declare function isStepBlock(block: GenericBlock): block is StepBlock; export declare function isControlBlock(block: GenericBlock): block is ControlBlock; export declare function getPluginType(block: GenericBlock): StepPluginType | null; export {}; //# sourceMappingURL=control-flow.d.ts.map