/** * @since 1.0.0 */ import type { NonEmptyReadonlyArray } from "effect/Array"; import * as Cause from "effect/Cause"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import type * as Exit from "effect/Exit"; import * as Schedule from "effect/Schedule"; import * as Schema from "effect/Schema"; import type { Scope } from "effect/Scope"; import type * as Types from "effect/Types"; import type { WorkflowEngine, WorkflowInstance } from "./WorkflowEngine.js"; /** * @since 1.0.0 * @category Symbols */ export declare const TypeId: unique symbol; /** * @since 1.0.0 * @category Symbols */ export type TypeId = typeof TypeId; /** * @since 1.0.0 * @category Models */ export interface Activity extends Effect.Effect { readonly [TypeId]: TypeId; readonly name: string; readonly successSchema: Success; readonly errorSchema: Error; readonly exitSchema: Schema.Schema, Exit.Exit, Success["Context"] | Error["Context"]>; readonly execute: Effect.Effect; readonly executeEncoded: Effect.Effect; } /** * @since 1.0.0 * @category Models */ export interface Any { readonly [TypeId]: TypeId; readonly name: string; readonly successSchema: Schema.Schema.Any; readonly errorSchema: Schema.Schema.All; readonly execute: Effect.Effect; readonly executeEncoded: Effect.Effect; } /** * @since 1.0.0 * @category Constructors */ export declare const make: (options: { readonly name: string; readonly success?: Success | undefined; readonly error?: Error | undefined; readonly execute: Effect.Effect; readonly interruptRetryPolicy?: Schedule.Schedule> | undefined; }) => Activity>; /** * @since 1.0.0 * @category Error handling */ export declare const retry: { /** * @since 1.0.0 * @category Error handling */ , "schedule">, O>>(options: O): (self: Effect.Effect) => Effect.Retry.Return; /** * @since 1.0.0 * @category Error handling */ , "schedule">, O>>(self: Effect.Effect, options: O): Effect.Retry.Return; }; declare const CurrentAttempt_base: Context.ReferenceClass; /** * @since 1.0.0 * @category Attempts */ export declare class CurrentAttempt extends CurrentAttempt_base { } /** * @since 1.0.0 * @category Idempotency */ export declare const idempotencyKey: (name: string, options?: { readonly includeAttempt?: boolean | undefined; } | undefined) => Effect.Effect; /** * @since 1.0.0 * @category Racing */ export declare const raceAll: >(name: string, activities: Activities) => Effect.Effect<(Activities[number] extends Activity ? _A["Type"] : never), (Activities[number] extends Activity ? _E_1["Type"] : never), (Activities[number] extends Activity ? Success["Context"] | Error["Context"] | R : never) | WorkflowEngine | WorkflowInstance>; export {}; //# sourceMappingURL=Activity.d.ts.map