@hasna/loops 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ import type { ExecutorResult, Loop, LoopRun, WorkflowSpec } from "../types.js";
2
+ import { preflightTarget, type ExecuteOptions } from "./executor.js";
3
+ import type { Store } from "./store.js";
4
+ export interface ExecuteWorkflowOptions extends ExecuteOptions {
5
+ loop?: Loop;
6
+ loopRun?: LoopRun;
7
+ scheduledFor?: string;
8
+ idempotencyKey?: string;
9
+ cancelPollMs?: number;
10
+ signalTimeoutMessage?: () => string | undefined;
11
+ }
12
+ export declare function executeWorkflow(store: Store, workflow: WorkflowSpec, opts?: ExecuteWorkflowOptions): Promise<ExecutorResult>;
13
+ export declare function preflightWorkflow(workflow: WorkflowSpec, opts?: ExecuteOptions): ReturnType<typeof preflightTarget>[];
14
+ export declare function executeLoopTarget(store: Store, loop: Loop, run: LoopRun, opts?: ExecuteOptions): Promise<ExecutorResult>;
@@ -0,0 +1,5 @@
1
+ import type { CreateWorkflowInput, WorkflowSpec, WorkflowStep } from "../types.js";
2
+ export type WorkflowSpecBody = Pick<WorkflowSpec, "name" | "description" | "version" | "steps">;
3
+ export declare function normalizeCreateWorkflowInput(input: CreateWorkflowInput): CreateWorkflowInput;
4
+ export declare function workflowExecutionOrder(workflow: Pick<WorkflowSpec, "steps">): WorkflowStep[];
5
+ export declare function workflowBodyFromJson(value: unknown, fallbackName?: string): CreateWorkflowInput;