@temporalio/common 1.9.0 → 1.9.2
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/lib/interfaces.d.ts +13 -0
- package/package.json +3 -3
- package/src/interfaces.ts +7 -0
package/lib/interfaces.d.ts
CHANGED
|
@@ -4,8 +4,21 @@ export type Payload = temporal.api.common.v1.IPayload;
|
|
|
4
4
|
export type WorkflowReturnType = Promise<any>;
|
|
5
5
|
export type WorkflowUpdateType = (...args: any[]) => Promise<any> | any;
|
|
6
6
|
export type WorkflowUpdateValidatorType = (...args: any[]) => void;
|
|
7
|
+
export type WorkflowUpdateAnnotatedType = {
|
|
8
|
+
handler: WorkflowUpdateType;
|
|
9
|
+
validator?: WorkflowUpdateValidatorType;
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
7
12
|
export type WorkflowSignalType = (...args: any[]) => Promise<void> | void;
|
|
13
|
+
export type WorkflowSignalAnnotatedType = {
|
|
14
|
+
handler: WorkflowSignalType;
|
|
15
|
+
description?: string;
|
|
16
|
+
};
|
|
8
17
|
export type WorkflowQueryType = (...args: any[]) => any;
|
|
18
|
+
export type WorkflowQueryAnnotatedType = {
|
|
19
|
+
handler: WorkflowQueryType;
|
|
20
|
+
description?: string;
|
|
21
|
+
};
|
|
9
22
|
/**
|
|
10
23
|
* Broad Workflow function definition, specific Workflows will typically use a narrower type definition, e.g:
|
|
11
24
|
* ```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporalio/common",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "Common library for code that's used across the Client, Worker, and/or Workflow",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"author": "Temporal Technologies Inc. <sdk@temporal.io>",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@temporalio/proto": "1.9.
|
|
15
|
+
"@temporalio/proto": "^1.9.2",
|
|
16
16
|
"long": "^5.2.3",
|
|
17
17
|
"ms": "^3.0.0-canary.1",
|
|
18
18
|
"proto3-json-serializer": "^2.0.0"
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"src",
|
|
37
37
|
"lib"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "5fd66f5787deece0b30f085808db7651187600b1"
|
|
40
40
|
}
|
package/src/interfaces.ts
CHANGED
|
@@ -6,8 +6,15 @@ export type Payload = temporal.api.common.v1.IPayload;
|
|
|
6
6
|
export type WorkflowReturnType = Promise<any>;
|
|
7
7
|
export type WorkflowUpdateType = (...args: any[]) => Promise<any> | any;
|
|
8
8
|
export type WorkflowUpdateValidatorType = (...args: any[]) => void;
|
|
9
|
+
export type WorkflowUpdateAnnotatedType = {
|
|
10
|
+
handler: WorkflowUpdateType;
|
|
11
|
+
validator?: WorkflowUpdateValidatorType;
|
|
12
|
+
description?: string;
|
|
13
|
+
};
|
|
9
14
|
export type WorkflowSignalType = (...args: any[]) => Promise<void> | void;
|
|
15
|
+
export type WorkflowSignalAnnotatedType = { handler: WorkflowSignalType; description?: string };
|
|
10
16
|
export type WorkflowQueryType = (...args: any[]) => any;
|
|
17
|
+
export type WorkflowQueryAnnotatedType = { handler: WorkflowQueryType; description?: string };
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* Broad Workflow function definition, specific Workflows will typically use a narrower type definition, e.g:
|