DurableDeferred
Combinators
Signature
declare const done: { <Success extends Any, Error extends All>(options: { readonly exit: Exit.Exit<Success["Type"], Error["Type"]>; readonly token: Token; }): (self: DurableDeferred<Success, Error>) => Effect<void, never, WorkflowEngine | Success["Context"] | Error["Context"]>; <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>, options: { readonly exit: Exit.Exit<Success["Type"], Error["Type"]>; readonly token: Token; }): Effect<void, never, WorkflowEngine | Success["Context"] | Error["Context"]>;}Signature
declare const fail: { <Success extends Any, Error extends All>(options: { readonly error: Error["Type"]; readonly token: Token; }): (self: DurableDeferred<Success, Error>) => Effect<void, never, WorkflowEngine | Error["Context"]>; <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>, options: { readonly error: Error["Type"]; readonly token: Token; }): Effect<void, never, WorkflowEngine | Error["Context"]>;}Signature
declare const failCause: { <Success extends Any, Error extends All>(options: { readonly cause: Cause.Cause<Error["Type"]>; readonly token: Token; }): (self: DurableDeferred<Success, Error>) => Effect<void, never, WorkflowEngine | Error["Context"]>; <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>, options: { readonly cause: Cause.Cause<Error["Type"]>; readonly token: Token; }): Effect<void, never, WorkflowEngine | Error["Context"]>;}Signature
declare const into: { <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>): <R>(effect: Effect<Success["Type"], Error["Type"], R>) => Effect<Success["Type"], Error["Type"], WorkflowEngine | WorkflowInstance | R | Success["Context"] | Error["Context"]>; <Success extends Any, Error extends All, R>(effect: Effect<Success["Type"], Error["Type"], R>, self: DurableDeferred<Success, Error>): Effect<Success["Type"], Error["Type"], WorkflowEngine | WorkflowInstance | R | Success["Context"] | Error["Context"]>;}Signature
declare const succeed: { <Success extends Any, Error extends All>(options: { readonly token: Token; readonly value: Success["Type"]; }): (self: DurableDeferred<Success, Error>) => Effect<void, never, WorkflowEngine | Success["Context"]>; <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>, options: { readonly token: Token; readonly value: Success["Type"]; }): Effect<void, never, WorkflowEngine | Success["Context"]>;}Constructors
Models
Signature
interface Any { readonly [TypeId]: typeof TypeId; readonly errorSchema: All; readonly exitSchema: ExitFromSelf<any, any, any>; readonly name: string; readonly successSchema: Any;}DurableDeferred interface
Added in v1.0.0
Source
Signature
interface DurableDeferred<Success extends Schema.Schema.Any, Error extends Schema.Schema.All = typeof Schema.Never> { readonly [TypeId]: typeof TypeId; readonly errorSchema: Error; readonly exitSchema: ExitFromSelf<Success, Error, (options?: ErrorOptions) => Defect>; readonly name: string; readonly successSchema: Success; readonly withActivityAttempt: Effect<DurableDeferred<Success, Error>>;}Other
Racing
Signature
declare function raceAll<Effects extends readonly [Effect<any, any, any>, Effect<any, any, any>], SI, SR, EI, ER>(options: { effects: Effects; error: any; name: string; success: any;}): Effect<Effects[number] extends Effect<_A, _E, _R> ? _A : never, Effects[number] extends Effect<_A, _E, _R> ? _E : never, WorkflowEngine | WorkflowInstance | SR | ER | Effects[number] extends Effect<_A, _R, R> ? R : never>Symbols
Token
Signature
declare const token: <Success extends Schema.Schema.Any, Error extends Schema.Schema.All>(self: DurableDeferred<Success, Error>) => Effect.Effect<Token, never, WorkflowInstance>Signature
declare const Token: brand<String, typeof TokenTypeId>Signature
type Token = Brand.Branded<string, TokenTypeId>tokenFromExecutionId
Added in v1.0.0
Source
Signature
declare const tokenFromExecutionId: { (options: { readonly executionId: string; readonly workflow: Workflow.Any; }): <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>) => Token; <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>, options: { readonly executionId: string; readonly workflow: Workflow.Any; }): Token;}tokenFromPayload
Added in v1.0.0
Source
Signature
declare const tokenFromPayload: { <W extends Any>(options: { readonly payload: Schema.Simplify<Schema.Struct.Constructor<W["payloadSchema"]["fields"]>>; readonly workflow: W; }): <Success extends Any, Error extends All>(self: DurableDeferred<Success, Error>) => Effect<Token>; <Success extends Any, Error extends All, W extends Any>(self: DurableDeferred<Success, Error>, options: { readonly payload: Schema.Simplify<Schema.Struct.Constructor<W["payloadSchema"]["fields"]>>; readonly workflow: W; }): Effect<Token>;}TokenParsed
Added in v1.0.0
Source
Signature
declare class TokenParsed extends { readonly deferredName: string; readonly executionId: string; readonly workflowName: string;} { constructor(...args: [props: { readonly deferredName: string; readonly executionId: string; readonly workflowName: string; }, options?: MakeOptions]); static readonly encode: (input: any, options?: ParseOptions) => any; static readonly fromString: (input: any, options?: ParseOptions) => any; static readonly FromString: any; asToken: Token;}TokenTypeId
Added in v1.0.0
Source
Signature
declare const TokenTypeId: unique symbolTokenTypeId type
Added in v1.0.0
Source
Signature
type TokenTypeId = typeof TokenTypeId