@temporal-contract/worker 0.2.0 → 1.0.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.
- package/README.md +7 -8
- package/dist/activity.cjs +44 -119
- package/dist/activity.d.cts +37 -27
- package/dist/activity.d.cts.map +1 -1
- package/dist/activity.d.mts +37 -27
- package/dist/activity.d.mts.map +1 -1
- package/dist/activity.mjs +32 -107
- package/dist/activity.mjs.map +1 -1
- package/dist/{errors-4jH78z8m.d.cts → errors-CG1y7SHO.d.cts} +14 -2
- package/dist/{errors-4jH78z8m.d.cts.map → errors-CG1y7SHO.d.cts.map} +1 -1
- package/dist/{errors-CmTXZ3JW.d.mts → errors-DZhaNhwr.d.mts} +14 -2
- package/dist/{errors-CmTXZ3JW.d.mts.map → errors-DZhaNhwr.d.mts.map} +1 -1
- package/dist/internal-BoNcEtYh.mjs +354 -0
- package/dist/internal-BoNcEtYh.mjs.map +1 -0
- package/dist/internal-Tj4m4f_K.cjs +453 -0
- package/dist/worker.cjs +2 -4
- package/dist/worker.mjs +1 -2
- package/dist/worker.mjs.map +1 -1
- package/dist/workflow.cjs +247 -136
- package/dist/workflow.d.cts +154 -31
- package/dist/workflow.d.cts.map +1 -1
- package/dist/workflow.d.mts +154 -31
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +231 -120
- package/dist/workflow.mjs.map +1 -1
- package/package.json +23 -24
- package/dist/activity-utils-B3vP03_P.d.mts +0 -68
- package/dist/activity-utils-B3vP03_P.d.mts.map +0 -1
- package/dist/activity-utils-RsXOceIH.d.cts +0 -68
- package/dist/activity-utils-RsXOceIH.d.cts.map +0 -1
- package/dist/errors-Di6Ja4Rt.mjs +0 -156
- package/dist/errors-Di6Ja4Rt.mjs.map +0 -1
- package/dist/errors-DjSZg-93.cjs +0 -227
package/dist/workflow.d.cts
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
1
|
-
import { a as ChildWorkflowNotFoundError, c as SignalInputValidationError, d as
|
|
1
|
+
import { _ as WorkerInferOutput, a as ChildWorkflowNotFoundError, c as SignalInputValidationError, d as WorkflowCancelledError, f as WorkflowInputValidationError, g as WorkerInferInput, h as ClientInferOutput, i as ChildWorkflowError, l as UpdateInputValidationError, m as ClientInferInput, n as ActivityInputValidationError, o as QueryInputValidationError, p as WorkflowOutputValidationError, r as ActivityOutputValidationError, s as QueryOutputValidationError, u as UpdateOutputValidationError } from "./errors-CG1y7SHO.cjs";
|
|
2
2
|
import { ActivityDefinition, ContractDefinition, QueryDefinition, SignalDefinition, UpdateDefinition, WorkflowDefinition } from "@temporal-contract/contract";
|
|
3
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
3
4
|
import { Future, Result } from "@temporal-contract/boxed";
|
|
4
|
-
import { ActivityOptions, ChildWorkflowOptions, WorkflowInfo } from "@temporalio/workflow";
|
|
5
|
+
import { ActivityOptions, ChildWorkflowOptions, ContinueAsNewOptions, WorkflowInfo } from "@temporalio/workflow";
|
|
5
6
|
|
|
7
|
+
//#region src/handlers.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Signal handler implementation
|
|
10
|
+
*
|
|
11
|
+
* Processes signal input and can optionally perform asynchronous operations.
|
|
12
|
+
* Should not return a value (signals are fire-and-forget).
|
|
13
|
+
*/
|
|
14
|
+
type SignalHandlerImplementation<TSignal extends SignalDefinition> = (args: WorkerInferInput<TSignal>) => void | Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Query handler implementation
|
|
17
|
+
*
|
|
18
|
+
* Processes query input and returns a synchronous response.
|
|
19
|
+
* Must be synchronous to satisfy Temporal's query constraints.
|
|
20
|
+
*/
|
|
21
|
+
type QueryHandlerImplementation<TQuery extends QueryDefinition> = (args: WorkerInferInput<TQuery>) => WorkerInferOutput<TQuery>;
|
|
22
|
+
/**
|
|
23
|
+
* Update handler implementation
|
|
24
|
+
*
|
|
25
|
+
* Processes update input and returns a validated response after modifying workflow state.
|
|
26
|
+
* Can perform asynchronous operations.
|
|
27
|
+
*/
|
|
28
|
+
type UpdateHandlerImplementation<TUpdate extends UpdateDefinition> = (args: WorkerInferInput<TUpdate>) => Promise<WorkerInferOutput<TUpdate>>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/internal.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* Continue-as-new options the typed wrapper does not own. `workflowType` and
|
|
33
|
+
* `taskQueue` are derived from the contract; everything else is forwarded to
|
|
34
|
+
* Temporal's `makeContinueAsNewFunc`.
|
|
35
|
+
*/
|
|
36
|
+
type TypedContinueAsNewOptions = Omit<ContinueAsNewOptions, "workflowType" | "taskQueue">;
|
|
37
|
+
//#endregion
|
|
6
38
|
//#region src/workflow.d.ts
|
|
7
39
|
/**
|
|
8
40
|
* Create a typed workflow implementation with automatic validation
|
|
@@ -27,6 +59,15 @@ import { ActivityOptions, ChildWorkflowOptions, WorkflowInfo } from "@temporalio
|
|
|
27
59
|
* activityOptions: {
|
|
28
60
|
* startToCloseTimeout: '1 minute',
|
|
29
61
|
* },
|
|
62
|
+
* // Optional: override `activityOptions` for specific activities. Each
|
|
63
|
+
* // entry shallow-merges over the workflow default — the override wins on
|
|
64
|
+
* // every property it specifies, including the whole `retry` block.
|
|
65
|
+
* activityOptionsByName: {
|
|
66
|
+
* chargePayment: {
|
|
67
|
+
* startToCloseTimeout: '5 minutes',
|
|
68
|
+
* retry: { maximumAttempts: 5 },
|
|
69
|
+
* },
|
|
70
|
+
* },
|
|
30
71
|
* implementation: async (context, args) => {
|
|
31
72
|
* // context.activities: typed activities (workflow + global)
|
|
32
73
|
* // context.info: WorkflowInfo
|
|
@@ -72,29 +113,14 @@ declare function declareWorkflow<TContract extends ContractDefinition, TWorkflow
|
|
|
72
113
|
workflowName,
|
|
73
114
|
contract,
|
|
74
115
|
implementation,
|
|
75
|
-
activityOptions
|
|
116
|
+
activityOptions,
|
|
117
|
+
activityOptionsByName
|
|
76
118
|
}: DeclareWorkflowOptions<TContract, TWorkflowName>): (...args: unknown[]) => Promise<WorkerInferOutput<TContract["workflows"][TWorkflowName]>>;
|
|
77
119
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* Processes signal input and can optionally perform asynchronous operations.
|
|
81
|
-
* Should not return a value (signals are fire-and-forget).
|
|
82
|
-
*/
|
|
83
|
-
type SignalHandlerImplementation<TSignal extends SignalDefinition> = (args: WorkerInferInput<TSignal>) => void | Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* Query handler implementation
|
|
86
|
-
*
|
|
87
|
-
* Processes query input and returns a synchronous response.
|
|
88
|
-
* Must be synchronous to satisfy Temporal's query constraints.
|
|
120
|
+
* Union of all activity names available to a workflow — the workflow-local
|
|
121
|
+
* activities plus the contract's global activities.
|
|
89
122
|
*/
|
|
90
|
-
type
|
|
91
|
-
/**
|
|
92
|
-
* Update handler implementation
|
|
93
|
-
*
|
|
94
|
-
* Processes update input and returns a validated response after modifying workflow state.
|
|
95
|
-
* Can perform asynchronous operations.
|
|
96
|
-
*/
|
|
97
|
-
type UpdateHandlerImplementation<TUpdate extends UpdateDefinition> = (args: WorkerInferInput<TUpdate>) => Promise<WorkerInferOutput<TUpdate>>;
|
|
123
|
+
type ActivityNamesFor<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = (TContract["workflows"][TWorkflowName]["activities"] extends Record<string, ActivityDefinition> ? keyof TContract["workflows"][TWorkflowName]["activities"] & string : never) | (TContract["activities"] extends Record<string, ActivityDefinition> ? keyof TContract["activities"] & string : never);
|
|
98
124
|
/**
|
|
99
125
|
* Options for declaring a workflow implementation
|
|
100
126
|
*/
|
|
@@ -103,23 +129,48 @@ type DeclareWorkflowOptions<TContract extends ContractDefinition, TWorkflowName
|
|
|
103
129
|
contract: TContract;
|
|
104
130
|
implementation: WorkflowImplementation<TContract, TWorkflowName>;
|
|
105
131
|
/**
|
|
106
|
-
* Default activity options applied to
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* -
|
|
111
|
-
* -
|
|
112
|
-
* -
|
|
132
|
+
* Default activity options applied to every activity reachable from this
|
|
133
|
+
* workflow (workflow-local + global) unless overridden in
|
|
134
|
+
* {@link activityOptionsByName}. See Temporal's `ActivityOptions` for the
|
|
135
|
+
* full set of fields:
|
|
136
|
+
* - `startToCloseTimeout`: Maximum time for a single attempt to run
|
|
137
|
+
* - `scheduleToCloseTimeout`: End-to-end timeout including queuing and retries
|
|
138
|
+
* - `scheduleToStartTimeout`: Maximum time the activity can wait in the queue
|
|
139
|
+
* - `heartbeatTimeout`: Time between heartbeats before the activity is considered dead
|
|
140
|
+
* - `retry`: Retry policy for failed activities
|
|
113
141
|
*
|
|
114
142
|
* @example
|
|
115
143
|
* ```ts
|
|
116
144
|
* activityOptions: {
|
|
117
145
|
* startToCloseTimeout: '5m',
|
|
118
|
-
* retry: { maximumAttempts: 3 }
|
|
146
|
+
* retry: { maximumAttempts: 3 },
|
|
119
147
|
* }
|
|
120
148
|
* ```
|
|
121
149
|
*/
|
|
122
150
|
activityOptions: ActivityOptions;
|
|
151
|
+
/**
|
|
152
|
+
* Per-activity `ActivityOptions` overrides. Each entry shallow-merges over
|
|
153
|
+
* {@link activityOptions} for that activity only — the override wins on
|
|
154
|
+
* every property it specifies, replacing the default value (including the
|
|
155
|
+
* entire nested `retry` block when present, matching Temporal's
|
|
156
|
+
* single-options-per-`proxyActivities`-call semantics).
|
|
157
|
+
*
|
|
158
|
+
* Activity names are typed against the contract; typos surface as TypeScript
|
|
159
|
+
* errors rather than running silently with the default options.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* activityOptions: { startToCloseTimeout: '1 minute' }, // default
|
|
164
|
+
* activityOptionsByName: {
|
|
165
|
+
* chargePayment: {
|
|
166
|
+
* startToCloseTimeout: '5 minutes',
|
|
167
|
+
* retry: { maximumAttempts: 5 },
|
|
168
|
+
* },
|
|
169
|
+
* fastValidation: { startToCloseTimeout: '5 seconds' },
|
|
170
|
+
* },
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
activityOptionsByName?: Partial<Record<ActivityNamesFor<TContract, TWorkflowName>, ActivityOptions>>;
|
|
123
174
|
};
|
|
124
175
|
/**
|
|
125
176
|
* Workflow implementation function
|
|
@@ -254,6 +305,78 @@ type WorkflowContext<TContract extends ContractDefinition, TWorkflowName extends
|
|
|
254
305
|
* ```
|
|
255
306
|
*/
|
|
256
307
|
executeChildWorkflow: <TChildContract extends ContractDefinition, TChildWorkflowName extends keyof TChildContract["workflows"]>(contract: TChildContract, workflowName: TChildWorkflowName, options: TypedChildWorkflowOptions<TChildContract, TChildWorkflowName>) => Future<Result<ClientInferOutput<TChildContract["workflows"][TChildWorkflowName]>, ChildWorkflowError>>;
|
|
308
|
+
/**
|
|
309
|
+
* Run `fn` inside a cancellable Temporal scope. If the workflow (or an
|
|
310
|
+
* ancestor scope) is cancelled while `fn` is in flight, the resulting
|
|
311
|
+
* Future resolves to `Result.Error(WorkflowCancelledError)` instead of
|
|
312
|
+
* rejecting — letting callers handle cancellation explicitly, typically
|
|
313
|
+
* to perform a graceful exit from the current step.
|
|
314
|
+
*
|
|
315
|
+
* Non-cancellation errors thrown by `fn` propagate as Future rejections
|
|
316
|
+
* unchanged, preserving their identity for upstream `try/catch` blocks.
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```ts
|
|
320
|
+
* implementation: async (context, args) => {
|
|
321
|
+
* const result = await context.cancellableScope(async () => {
|
|
322
|
+
* return context.activities.processStep(args);
|
|
323
|
+
* });
|
|
324
|
+
*
|
|
325
|
+
* if (result.isError()) {
|
|
326
|
+
* // workflow was cancelled — perform cleanup that must not be cancelled:
|
|
327
|
+
* await context.nonCancellableScope(async () => {
|
|
328
|
+
* await context.activities.releaseResources(args);
|
|
329
|
+
* });
|
|
330
|
+
* return { status: "cancelled" };
|
|
331
|
+
* }
|
|
332
|
+
*
|
|
333
|
+
* return { status: "ok" };
|
|
334
|
+
* }
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
cancellableScope: <T>(fn: () => T | Promise<T>) => Future<Result<T, WorkflowCancelledError>>;
|
|
338
|
+
/**
|
|
339
|
+
* Run `fn` inside a non-cancellable Temporal scope. Cancellation requests
|
|
340
|
+
* from outside the scope are ignored for its duration — the idiomatic way
|
|
341
|
+
* to perform cleanup work that must not be interrupted.
|
|
342
|
+
*
|
|
343
|
+
* Returns the same `Future<Result<...>>` shape as
|
|
344
|
+
* {@link WorkflowContext.cancellableScope} for symmetry; the
|
|
345
|
+
* `Result.Error` branch only triggers when cancellation is raised from
|
|
346
|
+
* *inside* the scope, which is rare.
|
|
347
|
+
*/
|
|
348
|
+
nonCancellableScope: <T>(fn: () => T | Promise<T>) => Future<Result<T, WorkflowCancelledError>>;
|
|
349
|
+
/**
|
|
350
|
+
* Continue this workflow execution as a new run, optionally with a different
|
|
351
|
+
* workflow type from another contract.
|
|
352
|
+
*
|
|
353
|
+
* Args are validated against the destination workflow's input schema before
|
|
354
|
+
* Temporal's `continueAsNew` is invoked. On validation failure, throws a
|
|
355
|
+
* {@link WorkflowInputValidationError}; on success, Temporal terminates the
|
|
356
|
+
* current execution and starts a fresh one — which is why the function
|
|
357
|
+
* never returns normally (`Promise<never>`).
|
|
358
|
+
*
|
|
359
|
+
* Idiomatic usage:
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```ts
|
|
363
|
+
* // Same workflow, validated args
|
|
364
|
+
* implementation: async (context, args) => {
|
|
365
|
+
* if (shouldRoll(args)) {
|
|
366
|
+
* return context.continueAsNew({ ...args, retryCount: args.retryCount + 1 });
|
|
367
|
+
* }
|
|
368
|
+
* return ...;
|
|
369
|
+
* }
|
|
370
|
+
*
|
|
371
|
+
* // Cross-contract continueAsNew (less common — taskQueue and workflow type
|
|
372
|
+
* // come from the other contract)
|
|
373
|
+
* return context.continueAsNew(otherContract, "otherWorkflow", { ...newArgs });
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
continueAsNew: {
|
|
377
|
+
/** Same-workflow continuation — args typed against this workflow's input. */(args: ClientInferInput<TContract["workflows"][TWorkflowName]>, options?: TypedContinueAsNewOptions): Promise<never>; /** Cross-contract continuation — args typed against the destination workflow. */
|
|
378
|
+
<TOtherContract extends ContractDefinition, TOtherWorkflowName extends keyof TOtherContract["workflows"]>(contract: TOtherContract, workflowName: TOtherWorkflowName, args: ClientInferInput<TOtherContract["workflows"][TOtherWorkflowName]>, options?: TypedContinueAsNewOptions): Promise<never>;
|
|
379
|
+
};
|
|
257
380
|
};
|
|
258
381
|
/**
|
|
259
382
|
* Options for starting a child workflow
|
|
@@ -295,5 +418,5 @@ type WorkflowInferWorkflowActivities<T extends WorkflowDefinition> = T["activiti
|
|
|
295
418
|
*/
|
|
296
419
|
type WorkflowInferWorkflowContextActivities<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = WorkflowInferWorkflowActivities<TContract["workflows"][TWorkflowName]> & WorkflowInferActivities<TContract>; //# sourceMappingURL=workflow.d.ts.map
|
|
297
420
|
//#endregion
|
|
298
|
-
export { ActivityInputValidationError, ActivityOutputValidationError, ChildWorkflowError, ChildWorkflowNotFoundError, QueryInputValidationError, QueryOutputValidationError, SignalInputValidationError, UpdateInputValidationError, UpdateOutputValidationError, WorkflowInputValidationError, WorkflowOutputValidationError, declareWorkflow };
|
|
421
|
+
export { ActivityInputValidationError, ActivityOutputValidationError, ChildWorkflowError, ChildWorkflowNotFoundError, QueryInputValidationError, QueryOutputValidationError, SignalInputValidationError, UpdateInputValidationError, UpdateOutputValidationError, WorkflowCancelledError, WorkflowInputValidationError, WorkflowOutputValidationError, declareWorkflow };
|
|
299
422
|
//# sourceMappingURL=workflow.d.cts.map
|
package/dist/workflow.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.cts","names":[],"sources":["../src/workflow.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.cts","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IAAA,EAAM,gBAAA,CAAiB,SAAA,MACpB,OAAA,CAAQ,iBAAA,CAAkB,SAAA;;;;KAK1B,uBAAA,mBAA0C,kBAAA,IAC7C,SAAA,uBAAgC,MAAA,SAAe,kBAAA,kBAE7B,SAAA,iBAA0B,qBAAA,CAAsB,SAAA,eAAwB,CAAA;;;;KAOvF,+BAAA,WAA0C,kBAAA,IAC7C,CAAA,uBAAwB,MAAA,SAAe,kBAAA,kBAErB,CAAA,iBAAkB,qBAAA,CAAsB,CAAA,eAAgB,CAAA;;;;;;KASvE,sCAAA,mBACe,kBAAA,8BACU,SAAA,iBAC1B,+BAAA,CAAgC,SAAA,cAAuB,aAAA,KACzD,uBAAA,CAAwB,SAAA"}
|
package/dist/workflow.d.mts
CHANGED
|
@@ -1,8 +1,40 @@
|
|
|
1
|
-
import { a as ChildWorkflowNotFoundError, c as SignalInputValidationError, d as
|
|
1
|
+
import { _ as WorkerInferOutput, a as ChildWorkflowNotFoundError, c as SignalInputValidationError, d as WorkflowCancelledError, f as WorkflowInputValidationError, g as WorkerInferInput, h as ClientInferOutput, i as ChildWorkflowError, l as UpdateInputValidationError, m as ClientInferInput, n as ActivityInputValidationError, o as QueryInputValidationError, p as WorkflowOutputValidationError, r as ActivityOutputValidationError, s as QueryOutputValidationError, u as UpdateOutputValidationError } from "./errors-DZhaNhwr.mjs";
|
|
2
|
+
import { ActivityOptions, ChildWorkflowOptions, ContinueAsNewOptions, WorkflowInfo } from "@temporalio/workflow";
|
|
2
3
|
import { Future, Result } from "@temporal-contract/boxed";
|
|
3
|
-
import { ActivityOptions, ChildWorkflowOptions, WorkflowInfo } from "@temporalio/workflow";
|
|
4
4
|
import { ActivityDefinition, ContractDefinition, QueryDefinition, SignalDefinition, UpdateDefinition, WorkflowDefinition } from "@temporal-contract/contract";
|
|
5
|
+
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
6
|
|
|
7
|
+
//#region src/handlers.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Signal handler implementation
|
|
10
|
+
*
|
|
11
|
+
* Processes signal input and can optionally perform asynchronous operations.
|
|
12
|
+
* Should not return a value (signals are fire-and-forget).
|
|
13
|
+
*/
|
|
14
|
+
type SignalHandlerImplementation<TSignal extends SignalDefinition> = (args: WorkerInferInput<TSignal>) => void | Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Query handler implementation
|
|
17
|
+
*
|
|
18
|
+
* Processes query input and returns a synchronous response.
|
|
19
|
+
* Must be synchronous to satisfy Temporal's query constraints.
|
|
20
|
+
*/
|
|
21
|
+
type QueryHandlerImplementation<TQuery extends QueryDefinition> = (args: WorkerInferInput<TQuery>) => WorkerInferOutput<TQuery>;
|
|
22
|
+
/**
|
|
23
|
+
* Update handler implementation
|
|
24
|
+
*
|
|
25
|
+
* Processes update input and returns a validated response after modifying workflow state.
|
|
26
|
+
* Can perform asynchronous operations.
|
|
27
|
+
*/
|
|
28
|
+
type UpdateHandlerImplementation<TUpdate extends UpdateDefinition> = (args: WorkerInferInput<TUpdate>) => Promise<WorkerInferOutput<TUpdate>>;
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/internal.d.ts
|
|
31
|
+
/**
|
|
32
|
+
* Continue-as-new options the typed wrapper does not own. `workflowType` and
|
|
33
|
+
* `taskQueue` are derived from the contract; everything else is forwarded to
|
|
34
|
+
* Temporal's `makeContinueAsNewFunc`.
|
|
35
|
+
*/
|
|
36
|
+
type TypedContinueAsNewOptions = Omit<ContinueAsNewOptions, "workflowType" | "taskQueue">;
|
|
37
|
+
//#endregion
|
|
6
38
|
//#region src/workflow.d.ts
|
|
7
39
|
/**
|
|
8
40
|
* Create a typed workflow implementation with automatic validation
|
|
@@ -27,6 +59,15 @@ import { ActivityDefinition, ContractDefinition, QueryDefinition, SignalDefiniti
|
|
|
27
59
|
* activityOptions: {
|
|
28
60
|
* startToCloseTimeout: '1 minute',
|
|
29
61
|
* },
|
|
62
|
+
* // Optional: override `activityOptions` for specific activities. Each
|
|
63
|
+
* // entry shallow-merges over the workflow default — the override wins on
|
|
64
|
+
* // every property it specifies, including the whole `retry` block.
|
|
65
|
+
* activityOptionsByName: {
|
|
66
|
+
* chargePayment: {
|
|
67
|
+
* startToCloseTimeout: '5 minutes',
|
|
68
|
+
* retry: { maximumAttempts: 5 },
|
|
69
|
+
* },
|
|
70
|
+
* },
|
|
30
71
|
* implementation: async (context, args) => {
|
|
31
72
|
* // context.activities: typed activities (workflow + global)
|
|
32
73
|
* // context.info: WorkflowInfo
|
|
@@ -72,29 +113,14 @@ declare function declareWorkflow<TContract extends ContractDefinition, TWorkflow
|
|
|
72
113
|
workflowName,
|
|
73
114
|
contract,
|
|
74
115
|
implementation,
|
|
75
|
-
activityOptions
|
|
116
|
+
activityOptions,
|
|
117
|
+
activityOptionsByName
|
|
76
118
|
}: DeclareWorkflowOptions<TContract, TWorkflowName>): (...args: unknown[]) => Promise<WorkerInferOutput<TContract["workflows"][TWorkflowName]>>;
|
|
77
119
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* Processes signal input and can optionally perform asynchronous operations.
|
|
81
|
-
* Should not return a value (signals are fire-and-forget).
|
|
82
|
-
*/
|
|
83
|
-
type SignalHandlerImplementation<TSignal extends SignalDefinition> = (args: WorkerInferInput<TSignal>) => void | Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* Query handler implementation
|
|
86
|
-
*
|
|
87
|
-
* Processes query input and returns a synchronous response.
|
|
88
|
-
* Must be synchronous to satisfy Temporal's query constraints.
|
|
120
|
+
* Union of all activity names available to a workflow — the workflow-local
|
|
121
|
+
* activities plus the contract's global activities.
|
|
89
122
|
*/
|
|
90
|
-
type
|
|
91
|
-
/**
|
|
92
|
-
* Update handler implementation
|
|
93
|
-
*
|
|
94
|
-
* Processes update input and returns a validated response after modifying workflow state.
|
|
95
|
-
* Can perform asynchronous operations.
|
|
96
|
-
*/
|
|
97
|
-
type UpdateHandlerImplementation<TUpdate extends UpdateDefinition> = (args: WorkerInferInput<TUpdate>) => Promise<WorkerInferOutput<TUpdate>>;
|
|
123
|
+
type ActivityNamesFor<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = (TContract["workflows"][TWorkflowName]["activities"] extends Record<string, ActivityDefinition> ? keyof TContract["workflows"][TWorkflowName]["activities"] & string : never) | (TContract["activities"] extends Record<string, ActivityDefinition> ? keyof TContract["activities"] & string : never);
|
|
98
124
|
/**
|
|
99
125
|
* Options for declaring a workflow implementation
|
|
100
126
|
*/
|
|
@@ -103,23 +129,48 @@ type DeclareWorkflowOptions<TContract extends ContractDefinition, TWorkflowName
|
|
|
103
129
|
contract: TContract;
|
|
104
130
|
implementation: WorkflowImplementation<TContract, TWorkflowName>;
|
|
105
131
|
/**
|
|
106
|
-
* Default activity options applied to
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* -
|
|
111
|
-
* -
|
|
112
|
-
* -
|
|
132
|
+
* Default activity options applied to every activity reachable from this
|
|
133
|
+
* workflow (workflow-local + global) unless overridden in
|
|
134
|
+
* {@link activityOptionsByName}. See Temporal's `ActivityOptions` for the
|
|
135
|
+
* full set of fields:
|
|
136
|
+
* - `startToCloseTimeout`: Maximum time for a single attempt to run
|
|
137
|
+
* - `scheduleToCloseTimeout`: End-to-end timeout including queuing and retries
|
|
138
|
+
* - `scheduleToStartTimeout`: Maximum time the activity can wait in the queue
|
|
139
|
+
* - `heartbeatTimeout`: Time between heartbeats before the activity is considered dead
|
|
140
|
+
* - `retry`: Retry policy for failed activities
|
|
113
141
|
*
|
|
114
142
|
* @example
|
|
115
143
|
* ```ts
|
|
116
144
|
* activityOptions: {
|
|
117
145
|
* startToCloseTimeout: '5m',
|
|
118
|
-
* retry: { maximumAttempts: 3 }
|
|
146
|
+
* retry: { maximumAttempts: 3 },
|
|
119
147
|
* }
|
|
120
148
|
* ```
|
|
121
149
|
*/
|
|
122
150
|
activityOptions: ActivityOptions;
|
|
151
|
+
/**
|
|
152
|
+
* Per-activity `ActivityOptions` overrides. Each entry shallow-merges over
|
|
153
|
+
* {@link activityOptions} for that activity only — the override wins on
|
|
154
|
+
* every property it specifies, replacing the default value (including the
|
|
155
|
+
* entire nested `retry` block when present, matching Temporal's
|
|
156
|
+
* single-options-per-`proxyActivities`-call semantics).
|
|
157
|
+
*
|
|
158
|
+
* Activity names are typed against the contract; typos surface as TypeScript
|
|
159
|
+
* errors rather than running silently with the default options.
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* ```ts
|
|
163
|
+
* activityOptions: { startToCloseTimeout: '1 minute' }, // default
|
|
164
|
+
* activityOptionsByName: {
|
|
165
|
+
* chargePayment: {
|
|
166
|
+
* startToCloseTimeout: '5 minutes',
|
|
167
|
+
* retry: { maximumAttempts: 5 },
|
|
168
|
+
* },
|
|
169
|
+
* fastValidation: { startToCloseTimeout: '5 seconds' },
|
|
170
|
+
* },
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
activityOptionsByName?: Partial<Record<ActivityNamesFor<TContract, TWorkflowName>, ActivityOptions>>;
|
|
123
174
|
};
|
|
124
175
|
/**
|
|
125
176
|
* Workflow implementation function
|
|
@@ -254,6 +305,78 @@ type WorkflowContext<TContract extends ContractDefinition, TWorkflowName extends
|
|
|
254
305
|
* ```
|
|
255
306
|
*/
|
|
256
307
|
executeChildWorkflow: <TChildContract extends ContractDefinition, TChildWorkflowName extends keyof TChildContract["workflows"]>(contract: TChildContract, workflowName: TChildWorkflowName, options: TypedChildWorkflowOptions<TChildContract, TChildWorkflowName>) => Future<Result<ClientInferOutput<TChildContract["workflows"][TChildWorkflowName]>, ChildWorkflowError>>;
|
|
308
|
+
/**
|
|
309
|
+
* Run `fn` inside a cancellable Temporal scope. If the workflow (or an
|
|
310
|
+
* ancestor scope) is cancelled while `fn` is in flight, the resulting
|
|
311
|
+
* Future resolves to `Result.Error(WorkflowCancelledError)` instead of
|
|
312
|
+
* rejecting — letting callers handle cancellation explicitly, typically
|
|
313
|
+
* to perform a graceful exit from the current step.
|
|
314
|
+
*
|
|
315
|
+
* Non-cancellation errors thrown by `fn` propagate as Future rejections
|
|
316
|
+
* unchanged, preserving their identity for upstream `try/catch` blocks.
|
|
317
|
+
*
|
|
318
|
+
* @example
|
|
319
|
+
* ```ts
|
|
320
|
+
* implementation: async (context, args) => {
|
|
321
|
+
* const result = await context.cancellableScope(async () => {
|
|
322
|
+
* return context.activities.processStep(args);
|
|
323
|
+
* });
|
|
324
|
+
*
|
|
325
|
+
* if (result.isError()) {
|
|
326
|
+
* // workflow was cancelled — perform cleanup that must not be cancelled:
|
|
327
|
+
* await context.nonCancellableScope(async () => {
|
|
328
|
+
* await context.activities.releaseResources(args);
|
|
329
|
+
* });
|
|
330
|
+
* return { status: "cancelled" };
|
|
331
|
+
* }
|
|
332
|
+
*
|
|
333
|
+
* return { status: "ok" };
|
|
334
|
+
* }
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
cancellableScope: <T>(fn: () => T | Promise<T>) => Future<Result<T, WorkflowCancelledError>>;
|
|
338
|
+
/**
|
|
339
|
+
* Run `fn` inside a non-cancellable Temporal scope. Cancellation requests
|
|
340
|
+
* from outside the scope are ignored for its duration — the idiomatic way
|
|
341
|
+
* to perform cleanup work that must not be interrupted.
|
|
342
|
+
*
|
|
343
|
+
* Returns the same `Future<Result<...>>` shape as
|
|
344
|
+
* {@link WorkflowContext.cancellableScope} for symmetry; the
|
|
345
|
+
* `Result.Error` branch only triggers when cancellation is raised from
|
|
346
|
+
* *inside* the scope, which is rare.
|
|
347
|
+
*/
|
|
348
|
+
nonCancellableScope: <T>(fn: () => T | Promise<T>) => Future<Result<T, WorkflowCancelledError>>;
|
|
349
|
+
/**
|
|
350
|
+
* Continue this workflow execution as a new run, optionally with a different
|
|
351
|
+
* workflow type from another contract.
|
|
352
|
+
*
|
|
353
|
+
* Args are validated against the destination workflow's input schema before
|
|
354
|
+
* Temporal's `continueAsNew` is invoked. On validation failure, throws a
|
|
355
|
+
* {@link WorkflowInputValidationError}; on success, Temporal terminates the
|
|
356
|
+
* current execution and starts a fresh one — which is why the function
|
|
357
|
+
* never returns normally (`Promise<never>`).
|
|
358
|
+
*
|
|
359
|
+
* Idiomatic usage:
|
|
360
|
+
*
|
|
361
|
+
* @example
|
|
362
|
+
* ```ts
|
|
363
|
+
* // Same workflow, validated args
|
|
364
|
+
* implementation: async (context, args) => {
|
|
365
|
+
* if (shouldRoll(args)) {
|
|
366
|
+
* return context.continueAsNew({ ...args, retryCount: args.retryCount + 1 });
|
|
367
|
+
* }
|
|
368
|
+
* return ...;
|
|
369
|
+
* }
|
|
370
|
+
*
|
|
371
|
+
* // Cross-contract continueAsNew (less common — taskQueue and workflow type
|
|
372
|
+
* // come from the other contract)
|
|
373
|
+
* return context.continueAsNew(otherContract, "otherWorkflow", { ...newArgs });
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
continueAsNew: {
|
|
377
|
+
/** Same-workflow continuation — args typed against this workflow's input. */(args: ClientInferInput<TContract["workflows"][TWorkflowName]>, options?: TypedContinueAsNewOptions): Promise<never>; /** Cross-contract continuation — args typed against the destination workflow. */
|
|
378
|
+
<TOtherContract extends ContractDefinition, TOtherWorkflowName extends keyof TOtherContract["workflows"]>(contract: TOtherContract, workflowName: TOtherWorkflowName, args: ClientInferInput<TOtherContract["workflows"][TOtherWorkflowName]>, options?: TypedContinueAsNewOptions): Promise<never>;
|
|
379
|
+
};
|
|
257
380
|
};
|
|
258
381
|
/**
|
|
259
382
|
* Options for starting a child workflow
|
|
@@ -295,5 +418,5 @@ type WorkflowInferWorkflowActivities<T extends WorkflowDefinition> = T["activiti
|
|
|
295
418
|
*/
|
|
296
419
|
type WorkflowInferWorkflowContextActivities<TContract extends ContractDefinition, TWorkflowName extends keyof TContract["workflows"]> = WorkflowInferWorkflowActivities<TContract["workflows"][TWorkflowName]> & WorkflowInferActivities<TContract>; //# sourceMappingURL=workflow.d.ts.map
|
|
297
420
|
//#endregion
|
|
298
|
-
export { ActivityInputValidationError, ActivityOutputValidationError, ChildWorkflowError, ChildWorkflowNotFoundError, QueryInputValidationError, QueryOutputValidationError, SignalInputValidationError, UpdateInputValidationError, UpdateOutputValidationError, WorkflowInputValidationError, WorkflowOutputValidationError, declareWorkflow };
|
|
421
|
+
export { ActivityInputValidationError, ActivityOutputValidationError, ChildWorkflowError, ChildWorkflowNotFoundError, QueryInputValidationError, QueryOutputValidationError, SignalInputValidationError, UpdateInputValidationError, UpdateOutputValidationError, WorkflowCancelledError, WorkflowInputValidationError, WorkflowOutputValidationError, declareWorkflow };
|
|
299
422
|
//# sourceMappingURL=workflow.d.mts.map
|
package/dist/workflow.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.mts","names":[],"sources":["../src/workflow.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow.d.mts","names":[],"sources":["../src/handlers.ts","../src/internal.ts","../src/workflow.ts"],"mappings":";;;;;;;;;;;;AAkCA;KAAY,2BAAA,iBAA4C,gBAAA,KACtD,IAAA,EAAM,gBAAA,CAAiB,OAAA,aACb,OAAA;;;;;;;KAQA,0BAAA,gBAA0C,eAAA,KACpD,IAAA,EAAM,gBAAA,CAAiB,MAAA,MACpB,iBAAA,CAAkB,MAAA;;;;;;;KAQX,2BAAA,iBAA4C,gBAAA,KACtD,IAAA,EAAM,gBAAA,CAAiB,OAAA,MACpB,OAAA,CAAQ,iBAAA,CAAkB,OAAA;;;;;;;;KC2DnB,yBAAA,GAA4B,IAAA,CAAK,oBAAA;;;;;;;;;;;;;;;;;;;ADvE7C;;;;;;;;;;;;;;;;;;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;AC6DA;;;;;;;;AC8BA;;;;;;iBAAgB,eAAA,mBACI,kBAAA,8BACU,SAAA,cAAA,CAAA;EAE5B,YAAA;EACA,QAAA;EACA,cAAA;EACA,eAAA;EACA;AAAA,GACC,sBAAA,CAAuB,SAAA,EAAW,aAAA,QAChC,IAAA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