@temporalio/client 0.17.2 → 0.19.0-rc.1

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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/@temporalio/client?style=for-the-badge)](https://www.npmjs.com/package/@temporalio/client)
4
4
 
5
- Part of the [Temporal](https://temporal.io) [TypeScript SDK](https://www.npmjs.com/package/temporalio).
5
+ Part of [Temporal](https://temporal.io)'s [TypeScript SDK](https://docs.temporal.io/docs/typescript/introduction/).
6
6
 
7
- - See API reference [here](https://typescript.temporal.io/api/namespaces/client)
8
- - See code samples [here](https://github.com/temporalio/samples-typescript)
9
- - See full introduction on the [docs site](https://docs.temporal.io/docs/typescript/introduction)
7
+ - [Client docs](https://docs.temporal.io/docs/typescript/clients)
8
+ - [API reference](https://typescript.temporal.io/api/namespaces/client)
9
+ - [Sample projects](https://github.com/temporalio/samples-typescript)
@@ -1,4 +1,4 @@
1
- import { DataConverter } from '@temporalio/common';
1
+ import { DataConverter, LoadedDataConverter } from '@temporalio/common';
2
2
  import { WorkflowService } from './connection';
3
3
  /**
4
4
  * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat
@@ -62,6 +62,7 @@ export interface FullActivityId {
62
62
  export declare class AsyncCompletionClient {
63
63
  readonly service: WorkflowService;
64
64
  readonly options: AsyncCompletionClientOptionsWithDefaults;
65
+ protected readonly dataConverter: LoadedDataConverter;
65
66
  constructor(service?: WorkflowService, options?: AsyncCompletionClientOptions);
66
67
  /**
67
68
  * Transforms grpc errors into well defined TS errors.
@@ -4,10 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AsyncCompletionClient = exports.defaultAsyncCompletionClientOptions = exports.ActivityCancelledError = exports.ActivityCompletionError = exports.ActivityNotFoundError = void 0;
7
- const os_1 = __importDefault(require("os"));
8
7
  const constants_1 = require("@grpc/grpc-js/build/src/constants");
9
8
  const common_1 = require("@temporalio/common");
9
+ const internal_non_workflow_common_1 = require("@temporalio/internal-non-workflow-common");
10
+ const os_1 = __importDefault(require("os"));
10
11
  const connection_1 = require("./connection");
12
+ const errors_1 = require("./errors");
11
13
  /**
12
14
  * Thrown by {@link AsyncCompletionClient} when trying to complete or heartbeat
13
15
  * an Activity which does not exist in the system.
@@ -41,16 +43,9 @@ class ActivityCancelledError extends Error {
41
43
  }
42
44
  }
43
45
  exports.ActivityCancelledError = ActivityCancelledError;
44
- /**
45
- * Type assertion helper, assertion is mostly empty because any additional
46
- * properties are optional.
47
- */
48
- function isServerErrorResponse(err) {
49
- return err instanceof Error;
50
- }
51
46
  function defaultAsyncCompletionClientOptions() {
52
47
  return {
53
- dataConverter: common_1.defaultDataConverter,
48
+ dataConverter: {},
54
49
  identity: `${process.pid}@${os_1.default.hostname()}`,
55
50
  namespace: 'default',
56
51
  };
@@ -62,19 +57,20 @@ exports.defaultAsyncCompletionClientOptions = defaultAsyncCompletionClientOption
62
57
  class AsyncCompletionClient {
63
58
  constructor(service = new connection_1.Connection().service, options) {
64
59
  this.service = service;
65
- this.options = { ...defaultAsyncCompletionClientOptions(), ...(0, common_1.filterNullAndUndefined)(options ?? {}) };
60
+ this.dataConverter = (0, internal_non_workflow_common_1.loadDataConverter)(options?.dataConverter);
61
+ this.options = { ...defaultAsyncCompletionClientOptions(), ...(0, internal_non_workflow_common_1.filterNullAndUndefined)(options ?? {}) };
66
62
  }
67
63
  /**
68
64
  * Transforms grpc errors into well defined TS errors.
69
65
  */
70
66
  handleError(err) {
71
- if (isServerErrorResponse(err)) {
67
+ if ((0, errors_1.isServerErrorResponse)(err)) {
72
68
  if (err.code === constants_1.Status.NOT_FOUND) {
73
69
  throw new ActivityNotFoundError('Not found');
74
70
  }
75
71
  throw new ActivityCompletionError(err.details || err.message);
76
72
  }
77
- throw new ActivityCompletionError('Unexpeced failure');
73
+ throw new ActivityCompletionError('Unexpected failure');
78
74
  }
79
75
  async complete(taskTokenOrFullActivityId, result) {
80
76
  try {
@@ -83,7 +79,7 @@ class AsyncCompletionClient {
83
79
  identity: this.options.identity,
84
80
  namespace: this.options.namespace,
85
81
  taskToken: taskTokenOrFullActivityId,
86
- result: { payloads: await this.options.dataConverter.toPayloads(result) },
82
+ result: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, result) },
87
83
  });
88
84
  }
89
85
  else {
@@ -91,7 +87,7 @@ class AsyncCompletionClient {
91
87
  identity: this.options.identity,
92
88
  namespace: this.options.namespace,
93
89
  ...taskTokenOrFullActivityId,
94
- result: { payloads: await this.options.dataConverter.toPayloads(result) },
90
+ result: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, result) },
95
91
  });
96
92
  }
97
93
  }
@@ -106,7 +102,7 @@ class AsyncCompletionClient {
106
102
  identity: this.options.identity,
107
103
  namespace: this.options.namespace,
108
104
  taskToken: taskTokenOrFullActivityId,
109
- failure: await (0, common_1.errorToFailure)((0, common_1.ensureTemporalFailure)(err), this.options.dataConverter),
105
+ failure: await (0, internal_non_workflow_common_1.encodeErrorToFailure)(this.dataConverter, (0, common_1.ensureTemporalFailure)(err)),
110
106
  });
111
107
  }
112
108
  else {
@@ -114,7 +110,7 @@ class AsyncCompletionClient {
114
110
  identity: this.options.identity,
115
111
  namespace: this.options.namespace,
116
112
  ...taskTokenOrFullActivityId,
117
- failure: await (0, common_1.errorToFailure)(err, this.options.dataConverter),
113
+ failure: await (0, internal_non_workflow_common_1.encodeErrorToFailure)(this.dataConverter, err),
118
114
  });
119
115
  }
120
116
  }
@@ -129,7 +125,7 @@ class AsyncCompletionClient {
129
125
  identity: this.options.identity,
130
126
  namespace: this.options.namespace,
131
127
  taskToken: taskTokenOrFullActivityId,
132
- details: { payloads: await this.options.dataConverter.toPayloads(details) },
128
+ details: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, details) },
133
129
  });
134
130
  }
135
131
  else {
@@ -137,7 +133,7 @@ class AsyncCompletionClient {
137
133
  identity: this.options.identity,
138
134
  namespace: this.options.namespace,
139
135
  ...taskTokenOrFullActivityId,
140
- details: { payloads: await this.options.dataConverter.toPayloads(details) },
136
+ details: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, details) },
141
137
  });
142
138
  }
143
139
  }
@@ -152,7 +148,7 @@ class AsyncCompletionClient {
152
148
  identity: this.options.identity,
153
149
  namespace: this.options.namespace,
154
150
  taskToken: taskTokenOrFullActivityId,
155
- details: { payloads: await this.options.dataConverter.toPayloads(details) },
151
+ details: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, details) },
156
152
  });
157
153
  if (cancelRequested) {
158
154
  throw new ActivityCancelledError('cancelled');
@@ -163,7 +159,7 @@ class AsyncCompletionClient {
163
159
  identity: this.options.identity,
164
160
  namespace: this.options.namespace,
165
161
  ...taskTokenOrFullActivityId,
166
- details: { payloads: await this.options.dataConverter.toPayloads(details) },
162
+ details: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.dataConverter, details) },
167
163
  });
168
164
  if (cancelRequested) {
169
165
  throw new ActivityCancelledError('cancelled');
@@ -1 +1 @@
1
- {"version":3,"file":"async-completion-client.js","sourceRoot":"","sources":["../src/async-completion-client.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AAEpB,iEAA2D;AAC3D,+CAM4B;AAC5B,6CAA2D;AAE3D;;;GAGG;AACH,MAAa,qBAAsB,SAAQ,KAAK;IAAhD;;QACkB,SAAI,GAAG,uBAAuB,CAAC;IACjD,CAAC;CAAA;AAFD,sDAEC;AAED;;;GAGG;AACH,MAAa,uBAAwB,SAAQ,KAAK;IAAlD;;QACkB,SAAI,GAAG,yBAAyB,CAAC;IACnD,CAAC;CAAA;AAFD,0DAEC;AAED;;;GAGG;AACH,MAAa,sBAAuB,SAAQ,KAAK;IAAjD;;QACkB,SAAI,GAAG,wB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,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,2BAA2B,CAAC;oBACzE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;oBAC/B,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;oBACjC,SAAS,EAAE,yBAAyB;oBACpC,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,IAAA,+CAAgB,EAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE;iBAC3E,CAAC,CAAC;gBACH,IAAI,eAAe,EAAE;oBACnB,MAAM,IAAI,sBAAsB,CAAC,WAAW,CAAC,CAAC;iBAC/C;aACF;iBAAM;gBACL,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,+BAA+B,CAAC;oBAC7E,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ;oBAC/B,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS;oBACjC,GAAG,yBAAyB;oBAC5B,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,IAAA,+CAAgB,EAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE;iBAC3E,CAAC,CAAC;gBACH,IAAI,eAAe,EAAE;oBACnB,MAAM,IAAI,sBAAsB,CAAC,WAAW,CAAC,CAAC;iBAC/C;aACF;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,GAAG,YAAY,sBAAsB,EAAE;gBACzC,MAAM,GAAG,CAAC;aACX;YACD,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;SACvB;IACH,CAAC;CACF;AA7JD,sDA6JC"}
@@ -1,6 +1,6 @@
1
1
  import * as grpc from '@grpc/grpc-js';
2
2
  import { temporal } from '@temporalio/proto';
3
- import { TLSConfig } from '@temporalio/common';
3
+ import { TLSConfig } from '@temporalio/internal-non-workflow-common';
4
4
  export declare type WorkflowService = temporal.api.workflowservice.v1.WorkflowService;
5
5
  export declare const WorkflowService: typeof temporal.api.workflowservice.v1.WorkflowService;
6
6
  /**
@@ -49,7 +49,7 @@ export declare function defaultConnectionOpts(): ConnectionOptionsWithDefaults;
49
49
  * Client connection to the Temporal Service
50
50
  */
51
51
  export declare class Connection {
52
- static readonly Client: import("@grpc/grpc-js/build/src/make-client").ServiceClientConstructor;
52
+ static readonly Client: grpc.ServiceClientConstructor;
53
53
  readonly options: ConnectionOptionsWithDefaults;
54
54
  readonly client: grpc.Client;
55
55
  /**
package/lib/connection.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -22,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
22
26
  exports.Connection = exports.defaultConnectionOpts = exports.LOCAL_DOCKER_TARGET = exports.WorkflowService = void 0;
23
27
  const grpc = __importStar(require("@grpc/grpc-js"));
24
28
  const proto_1 = require("@temporalio/proto");
25
- const common_1 = require("@temporalio/common");
29
+ const internal_non_workflow_common_1 = require("@temporalio/internal-non-workflow-common");
26
30
  const grpc_retry_1 = require("./grpc-retry");
27
31
  exports.WorkflowService = proto_1.temporal.api.workflowservice.v1.WorkflowService;
28
32
  exports.LOCAL_DOCKER_TARGET = '127.0.0.1:7233';
@@ -48,7 +52,7 @@ function normalizeGRPCConfig(options) {
48
52
  port = port || '7233';
49
53
  rest.address = `${host}:${port}`;
50
54
  }
51
- const tls = (0, common_1.normalizeTlsConfig)(tlsFromConfig);
55
+ const tls = (0, internal_non_workflow_common_1.normalizeTlsConfig)(tlsFromConfig);
52
56
  if (tls) {
53
57
  if (credentials) {
54
58
  throw new TypeError('Both `tls` and `credentials` ConnectionOptions were provided');
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oDAAsC;AACtC,6CAA6C;AAC7C,+CAAmE;AACnE,6CAAiF;AAGlE,uBAAe,GAAK,gBAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,iBAAC;AAgDtD,QAAA,mBAAmB,GAAG,gBAAgB,CAAC;AAEpD,SAAgB,qBAAqB;IACnC,OAAO;QACL,OAAO,EAAE,2BAAmB;QAC5B,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE;QAC9C,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,CAAC,IAAA,qCAAwB,EAAC,IAAA,oCAAuB,GAAE,CAAC,CAAC;KACpE,CAAC;AACJ,CAAC;AAPD,sDAOC;AAED;;;;GAIG;AACH,SAAS,mBAAmB,CAAC,OAA2B;IACtD,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACnE,IAAI,IAAI,CAAC,OAAO,EAAE;QAChB,wCAAwC;QACxC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAI,GAAG,IAAI,IAAI,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;KAClC;IACD,MAAM,GAAG,GAAG,IAAA,2BAAkB,EAAC,aAAa,CAAC,CAAC;IAC9C,IAAI,GAAG,EAAE;QACP,IAAI,WAAW,EAAE;YACf,MAAM,IAAI,SAAS,CAAC,8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AAM,OAAO,GAAG,CAAC,MAAwB,EAAE,WAAgB,EAAE,QAAmC,EAAE,EAAE;YAClG,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CACjC,oDAAoD,MAAM,CAAC,IAAI,EAAE,EACjE,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,EACjB,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,EACjB,WAAW;YACX,+CAA+C;YAC/C,IAAI,IAAI,CAAC,QAAQ,EAAE,EACnB,EAAE,YAAY,EAAE,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAC3C,QAAQ,CACT,CAAC;QACJ,CAAC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,IAAI,uBAAe,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,UAAU,CAAC,UAAU,GAAG,IAAI;QACvC,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE;gBACxD,IAAI,GAAG,EAAE;oBACP,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;qBAAM;oBACL,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;;AAjDH,gCAkDC;AAjDwB,iBAAM,GAAG,IAAI,CAAC,4BAA4B,CAAC,EAAE,EAAE,iBAAiB,EAAE,EAAE,CAAC,CAAC"}
package/lib/errors.d.ts CHANGED
@@ -1,4 +1,16 @@
1
+ import { ServerErrorResponse } from '@grpc/grpc-js';
1
2
  import { RetryState, TemporalFailure } from '@temporalio/common';
3
+ export { WorkflowExecutionAlreadyStartedError } from '@temporalio/common';
4
+ /**
5
+ * Generic Error class for errors coming from the service
6
+ */
7
+ export declare class ServiceError extends Error {
8
+ readonly name: string;
9
+ readonly cause?: Error;
10
+ constructor(message: string, opts?: {
11
+ cause: Error;
12
+ });
13
+ }
2
14
  /**
3
15
  * Thrown by the client while waiting on Workflow execution result if execution
4
16
  * completes with failure.
@@ -25,3 +37,8 @@ export declare class WorkflowContinuedAsNewError extends Error {
25
37
  readonly name: string;
26
38
  constructor(message: string, newExecutionRunId: string);
27
39
  }
40
+ /**
41
+ * Type assertion helper, assertion is mostly empty because any additional
42
+ * properties are optional.
43
+ */
44
+ export declare function isServerErrorResponse(err: unknown): err is ServerErrorResponse;
package/lib/errors.js CHANGED
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WorkflowContinuedAsNewError = exports.WorkflowFailedError = void 0;
3
+ exports.isServerErrorResponse = exports.WorkflowContinuedAsNewError = exports.WorkflowFailedError = exports.ServiceError = exports.WorkflowExecutionAlreadyStartedError = void 0;
4
+ var common_1 = require("@temporalio/common");
5
+ Object.defineProperty(exports, "WorkflowExecutionAlreadyStartedError", { enumerable: true, get: function () { return common_1.WorkflowExecutionAlreadyStartedError; } });
6
+ /**
7
+ * Generic Error class for errors coming from the service
8
+ */
9
+ class ServiceError extends Error {
10
+ constructor(message, opts) {
11
+ super(message);
12
+ this.name = 'ServiceError';
13
+ this.cause = opts?.cause;
14
+ }
15
+ }
16
+ exports.ServiceError = ServiceError;
4
17
  /**
5
18
  * Thrown by the client while waiting on Workflow execution result if execution
6
19
  * completes with failure.
@@ -33,4 +46,12 @@ class WorkflowContinuedAsNewError extends Error {
33
46
  }
34
47
  }
35
48
  exports.WorkflowContinuedAsNewError = WorkflowContinuedAsNewError;
49
+ /**
50
+ * Type assertion helper, assertion is mostly empty because any additional
51
+ * properties are optional.
52
+ */
53
+ function isServerErrorResponse(err) {
54
+ return err instanceof Error;
55
+ }
56
+ exports.isServerErrorResponse = isServerErrorResponse;
36
57
  //# sourceMappingURL=errors.js.map
package/lib/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;GAQG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAE5C,YACE,OAAe,EACC,KAAkC,EAClC,UAAsB;QAEtC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,UAAK,GAAL,KAAK,CAA6B;QAClC,eAAU,GAAV,UAAU,CAAY;QAJxB,SAAI,GAAW,8BAA8B,CAAC;IAO9D,CAAC;CACF;AATD,kDASC;AAED;;;;;GAKG;AACH,MAAa,2BAA4B,SAAQ,KAAK;IAEpD,YAAmB,OAAe,EAAkB,iBAAyB;QAC3E,KAAK,CAAC,OAAO,CAAC,CAAC;QADmC,sBAAiB,GAAjB,iBAAiB,CAAQ;QAD7D,SAAI,GAAW,sCAAsC,CAAC;IAGtE,CAAC;CACF;AALD,kEAKC"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAEA,6CAA0E;AAAjE,8HAAA,oCAAoC,OAAA;AAE7C;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IAIrC,YAAY,OAAe,EAAE,IAAuB;QAClD,KAAK,CAAC,OAAO,CAAC,CAAC;QAJD,SAAI,GAAW,cAAc,CAAC;QAK5C,IAAI,CAAC,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC;IAC3B,CAAC;CACF;AARD,oCAQC;AAED;;;;;;;;GAQG;AACH,MAAa,mBAAoB,SAAQ,KAAK;IAE5C,YACE,OAAe,EACC,KAAkC,EAClC,UAAsB;QAEtC,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,UAAK,GAAL,KAAK,CAA6B;QAClC,eAAU,GAAV,UAAU,CAAY;QAJxB,SAAI,GAAW,8BAA8B,CAAC;IAO9D,CAAC;CACF;AATD,kDASC;AAED;;;;;GAKG;AACH,MAAa,2BAA4B,SAAQ,KAAK;IAEpD,YAAmB,OAAe,EAAkB,iBAAyB;QAC3E,KAAK,CAAC,OAAO,CAAC,CAAC;QADmC,sBAAiB,GAAjB,iBAAiB,CAAQ;QAD7D,SAAI,GAAW,sCAAsC,CAAC;IAGtE,CAAC;CACF;AALD,kEAKC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,GAAY;IAChD,OAAO,GAAG,YAAY,KAAK,CAAC;AAC9B,CAAC;AAFD,sDAEC"}
package/lib/grpc-retry.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -1 +1 @@
1
- {"version":3,"file":"grpc-retry.js","sourceRoot":"","sources":["../src/grpc-retry.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAOuB;AACvB,oDAAsC;AAkBtC,SAAgB,uBAAuB;IACrC,OAAO;QACL,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,aAAa;QAC5B,gBAAgB,EAAE,gBAAgB;KACnC,CAAC;AACJ,CAAC;AAND,0DAMC;AAED,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC;IAC7B,IAAI,CAAC,MAAM,CAAC,OAAO;IACnB,IAAI,CAAC,MAAM,CAAC,kBAAkB;IAC9B,IAAI,CAAC,MAAM,CAAC,WAAW;IACvB,IAAI,CAAC,MAAM,CAAC,OAAO;IACnB,IAAI,CAAC,MAAM,CAAC,SAAS;IACrB,IAAI,CAAC,MAAM,CAAC,YAAY;CACzB,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BAAgB,EAAE,aAAa,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;iBAClF;qBAAM;oBACL,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;oBACtC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACd;YACH,CAAC,CAAC;iBACD,KAAK,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;QAC9B,CAAC,CAAC;aACD,eAAe,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE;YACjC,gBAAgB,GAAG,OAAO,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC,CAAC;aACD,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,0BAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC,CAAC;AACJ,CAAC;AA7DD,4DA6DC"}
package/lib/index.d.ts CHANGED
@@ -8,11 +8,12 @@
8
8
  * <!--SNIPEND-->
9
9
  * @module
10
10
  */
11
- export * from './workflow-client';
11
+ export { ActivityFailure, ApplicationFailure, CancelledFailure, ChildWorkflowFailure, DataConverter, defaultPayloadConverter, ProtoFailure, ServerFailure, TemporalFailure, TerminatedFailure, TimeoutFailure, } from '@temporalio/common';
12
+ export { RetryPolicy } from '@temporalio/internal-workflow-common';
12
13
  export * from './async-completion-client';
13
14
  export * from './connection';
14
- export * from './types';
15
15
  export * from './errors';
16
- export * from './workflow-options';
17
16
  export * from './interceptors';
18
- export { DataConverter, defaultDataConverter, ActivityFailure, ApplicationFailure, ChildWorkflowFailure, CancelledFailure, ServerFailure, TemporalFailure, TerminatedFailure, TimeoutFailure, ProtoFailure, RetryPolicy, } from '@temporalio/common';
17
+ export * from './types';
18
+ export * from './workflow-client';
19
+ export * from './workflow-options';
package/lib/index.js CHANGED
@@ -11,7 +11,11 @@
11
11
  */
12
12
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
13
  if (k2 === undefined) k2 = k;
14
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
14
+ var desc = Object.getOwnPropertyDescriptor(m, k);
15
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
+ desc = { enumerable: true, get: function() { return m[k]; } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
15
19
  }) : (function(o, m, k, k2) {
16
20
  if (k2 === undefined) k2 = k;
17
21
  o[k2] = m[k];
@@ -20,22 +24,22 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
24
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
25
  };
22
26
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.TimeoutFailure = exports.TerminatedFailure = exports.TemporalFailure = exports.ServerFailure = exports.CancelledFailure = exports.ChildWorkflowFailure = exports.ApplicationFailure = exports.ActivityFailure = exports.defaultDataConverter = void 0;
24
- __exportStar(require("./workflow-client"), exports);
25
- __exportStar(require("./async-completion-client"), exports);
26
- __exportStar(require("./connection"), exports);
27
- __exportStar(require("./types"), exports);
28
- __exportStar(require("./errors"), exports);
29
- __exportStar(require("./workflow-options"), exports);
30
- __exportStar(require("./interceptors"), exports);
27
+ exports.TimeoutFailure = exports.TerminatedFailure = exports.TemporalFailure = exports.ServerFailure = exports.defaultPayloadConverter = exports.ChildWorkflowFailure = exports.CancelledFailure = exports.ApplicationFailure = exports.ActivityFailure = void 0;
31
28
  var common_1 = require("@temporalio/common");
32
- Object.defineProperty(exports, "defaultDataConverter", { enumerable: true, get: function () { return common_1.defaultDataConverter; } });
33
29
  Object.defineProperty(exports, "ActivityFailure", { enumerable: true, get: function () { return common_1.ActivityFailure; } });
34
30
  Object.defineProperty(exports, "ApplicationFailure", { enumerable: true, get: function () { return common_1.ApplicationFailure; } });
35
- Object.defineProperty(exports, "ChildWorkflowFailure", { enumerable: true, get: function () { return common_1.ChildWorkflowFailure; } });
36
31
  Object.defineProperty(exports, "CancelledFailure", { enumerable: true, get: function () { return common_1.CancelledFailure; } });
32
+ Object.defineProperty(exports, "ChildWorkflowFailure", { enumerable: true, get: function () { return common_1.ChildWorkflowFailure; } });
33
+ Object.defineProperty(exports, "defaultPayloadConverter", { enumerable: true, get: function () { return common_1.defaultPayloadConverter; } });
37
34
  Object.defineProperty(exports, "ServerFailure", { enumerable: true, get: function () { return common_1.ServerFailure; } });
38
35
  Object.defineProperty(exports, "TemporalFailure", { enumerable: true, get: function () { return common_1.TemporalFailure; } });
39
36
  Object.defineProperty(exports, "TerminatedFailure", { enumerable: true, get: function () { return common_1.TerminatedFailure; } });
40
37
  Object.defineProperty(exports, "TimeoutFailure", { enumerable: true, get: function () { return common_1.TimeoutFailure; } });
38
+ __exportStar(require("./async-completion-client"), exports);
39
+ __exportStar(require("./connection"), exports);
40
+ __exportStar(require("./errors"), exports);
41
+ __exportStar(require("./interceptors"), exports);
42
+ __exportStar(require("./types"), exports);
43
+ __exportStar(require("./workflow-client"), exports);
44
+ __exportStar(require("./workflow-options"), exports);
41
45
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;AAEH,oDAAkC;AAClC,4DAA0C;AAC1C,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,qDAAmC;AACnC,iDAA+B;AAC/B,6CAa4B;AAX1B,8GAAA,oBAAoB,OAAA;AACpB,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,8GAAA,oBAAoB,OAAA;AACpB,0GAAA,gBAAgB,OAAA;AAChB,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,wGAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;AAEH,6CAY4B;AAX1B,yGAAA,eAAe,OAAA;AACf,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AAEpB,iHAAA,uBAAuB,OAAA;AAEvB,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,2GAAA,iBAAiB,OAAA;AACjB,wGAAA,cAAc,OAAA;AAGhB,4DAA0C;AAC1C,+CAA6B;AAC7B,2CAAyB;AACzB,iDAA+B;AAC/B,0CAAwB;AACxB,oDAAkC;AAClC,qDAAmC"}
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { Next, Headers } from '@temporalio/common';
6
+ import { Next, Headers } from '@temporalio/internal-workflow-common';
7
7
  import { temporal } from '@temporalio/proto';
8
8
  import { CompiledWorkflowOptions } from './workflow-options';
9
9
  import { RequestCancelWorkflowExecutionResponse, TerminateWorkflowExecutionResponse, WorkflowExecution } from './types';
@@ -41,10 +41,12 @@ export interface WorkflowTerminateInput {
41
41
  readonly workflowExecution: WorkflowExecution;
42
42
  readonly reason?: string;
43
43
  readonly details?: unknown[];
44
+ readonly firstExecutionRunId?: string;
44
45
  }
45
46
  /** Input for WorkflowClientCallsInterceptor.cancel */
46
47
  export interface WorkflowCancelInput {
47
48
  readonly workflowExecution: WorkflowExecution;
49
+ readonly firstExecutionRunId?: string;
48
50
  }
49
51
  /**
50
52
  * Implement any of these methods to intercept WorkflowClient outbound calls
package/lib/types.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { temporal } from '@temporalio/proto';
2
- export declare type WorkflowExecution = temporal.api.common.v1.IWorkflowExecution;
2
+ export interface WorkflowExecution {
3
+ workflowId: string;
4
+ runId?: string;
5
+ }
3
6
  export declare type StartWorkflowExecutionRequest = temporal.api.workflowservice.v1.IStartWorkflowExecutionRequest;
4
7
  export declare type GetWorkflowExecutionHistoryRequest = temporal.api.workflowservice.v1.IGetWorkflowExecutionHistoryRequest;
5
8
  export declare type DescribeWorkflowExecutionResponse = temporal.api.workflowservice.v1.IDescribeWorkflowExecutionResponse;
@@ -1,10 +1,10 @@
1
+ import { DataConverter, LoadedDataConverter } from '@temporalio/common';
2
+ import { BaseWorkflowHandle, QueryDefinition, WithWorkflowArgs, Workflow, WorkflowResultType } from '@temporalio/internal-workflow-common';
1
3
  import { temporal } from '@temporalio/proto';
2
- import { WorkflowClientInterceptors } from './interceptors';
3
- import { DataConverter, Workflow, BaseWorkflowHandle, QueryDefinition, WorkflowResultType, WithWorkflowArgs } from '@temporalio/common';
4
- import { WorkflowOptions, WorkflowSignalWithStartOptions } from './workflow-options';
5
- import { WorkflowCancelInput, WorkflowClientCallsInterceptor, WorkflowQueryInput, WorkflowSignalInput, WorkflowSignalWithStartInput, WorkflowStartInput, WorkflowTerminateInput } from './interceptors';
6
- import { DescribeWorkflowExecutionResponse, TerminateWorkflowExecutionResponse, RequestCancelWorkflowExecutionResponse } from './types';
7
4
  import { WorkflowService } from './connection';
5
+ import { WorkflowCancelInput, WorkflowClientCallsInterceptor, WorkflowClientInterceptors, WorkflowQueryInput, WorkflowSignalInput, WorkflowSignalWithStartInput, WorkflowStartInput, WorkflowTerminateInput } from './interceptors';
6
+ import { DescribeWorkflowExecutionResponse, RequestCancelWorkflowExecutionResponse, TerminateWorkflowExecutionResponse, WorkflowExecution } from './types';
7
+ import { WorkflowOptions, WorkflowSignalWithStartOptions } from './workflow-options';
8
8
  /**
9
9
  * A client side handle to a single Workflow instance.
10
10
  * It can be used to start, signal, query, wait for completion, terminate and cancel a Workflow execution.
@@ -102,6 +102,9 @@ export interface WorkflowClientOptions {
102
102
  queryRejectCondition?: temporal.api.enums.v1.QueryRejectCondition;
103
103
  }
104
104
  export declare type WorkflowClientOptionsWithDefaults = Required<WorkflowClientOptions>;
105
+ export declare type LoadedWorkflowClientOptions = WorkflowClientOptionsWithDefaults & {
106
+ loadedDataConverter: LoadedDataConverter;
107
+ };
105
108
  export declare function defaultWorkflowClientOptions(): WorkflowClientOptionsWithDefaults;
106
109
  /**
107
110
  * Options for getting a result of a Workflow execution.
@@ -115,7 +118,30 @@ export interface WorkflowResultOptions {
115
118
  *
116
119
  * @default true
117
120
  */
118
- followRuns: boolean;
121
+ followRuns?: boolean;
122
+ }
123
+ export interface GetWorkflowHandleOptions extends WorkflowResultOptions {
124
+ /**
125
+ * ID of the first execution in the Workflow execution chain.
126
+ *
127
+ * When getting a handle with no `runId`, pass this option to ensure some
128
+ * {@link WorkflowHandle} methods (e.g. `terminate` and `cancel`) don't
129
+ * affect executions from another chain.
130
+ */
131
+ firstExecutionRunId?: string;
132
+ }
133
+ interface WorkflowHandleOptions extends GetWorkflowHandleOptions {
134
+ workflowId: string;
135
+ runId?: string;
136
+ interceptors: WorkflowClientCallsInterceptor[];
137
+ /**
138
+ * A runId to use for getting the workflow's result.
139
+ *
140
+ * - When creating a handle using `getHandle`, uses the provided runId or firstExecutionRunId
141
+ * - When creating a handle using `start`, uses the returned runId (first in the chain)
142
+ * - When creating a handle using `signalWithStart`, uses the the returned runId
143
+ */
144
+ runIdForResult?: string;
119
145
  }
120
146
  /**
121
147
  * Options for starting a Workflow
@@ -126,7 +152,7 @@ export declare type WorkflowStartOptions<T extends Workflow = Workflow> = WithWo
126
152
  */
127
153
  export declare class WorkflowClient {
128
154
  readonly service: WorkflowService;
129
- readonly options: WorkflowClientOptionsWithDefaults;
155
+ readonly options: LoadedWorkflowClientOptions;
130
156
  constructor(service?: WorkflowService, options?: WorkflowClientOptions);
131
157
  /**
132
158
  * Start a new Workflow execution.
@@ -166,6 +192,7 @@ export declare class WorkflowClient {
166
192
  * Follows the chain of execution in case Workflow continues as new, or has a cron schedule or retry policy.
167
193
  */
168
194
  result<T extends Workflow>(workflowId: string, runId?: string, opts?: WorkflowResultOptions): Promise<WorkflowResultType<T>>;
195
+ protected rethrowGrpcError(err: unknown, workflowExecution: WorkflowExecution, fallbackMessage: string): never;
169
196
  /**
170
197
  * Uses given input to make a queryWorkflow call to the service
171
198
  *
@@ -205,17 +232,18 @@ export declare class WorkflowClient {
205
232
  /**
206
233
  * Create a new workflow handle for new or existing Workflow execution
207
234
  */
208
- protected _createWorkflowHandle<T extends Workflow>(workflowId: string, runId: string | undefined, interceptors: WorkflowClientCallsInterceptor[], resultOptions: WorkflowResultOptions): WorkflowHandle<T>;
235
+ protected _createWorkflowHandle<T extends Workflow>({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }: WorkflowHandleOptions): WorkflowHandle<T>;
209
236
  /**
210
237
  * Creates a Workflow handle for existing Workflow using `workflowId` and optional `runId`.
211
238
  *
212
239
  * This method does not validate `workflowId`. If there is no Workflow Execution with the given `workflowId`, handle
213
240
  * methods like `handle.describe()` will throw a `NOT_FOUND` error.
214
241
  */
215
- getHandle<T extends Workflow>(workflowId: string, runId?: string, options?: WorkflowResultOptions): WorkflowHandle<T>;
242
+ getHandle<T extends Workflow>(workflowId: string, runId?: string, options?: GetWorkflowHandleOptions): WorkflowHandle<T>;
216
243
  }
217
244
  export declare class QueryRejectedError extends Error {
218
245
  readonly status: temporal.api.enums.v1.WorkflowExecutionStatus;
219
246
  readonly name: string;
220
247
  constructor(status: temporal.api.enums.v1.WorkflowExecutionStatus);
221
248
  }
249
+ export {};
@@ -4,16 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.QueryRejectedError = exports.WorkflowClient = exports.defaultWorkflowClientOptions = void 0;
7
- const os_1 = __importDefault(require("os"));
7
+ const grpc_js_1 = require("@grpc/grpc-js");
8
+ const common_1 = require("@temporalio/common");
9
+ const internal_non_workflow_common_1 = require("@temporalio/internal-non-workflow-common");
10
+ const internal_workflow_common_1 = require("@temporalio/internal-workflow-common");
8
11
  const proto_1 = require("@temporalio/proto");
12
+ const os_1 = __importDefault(require("os"));
9
13
  const uuid_1 = require("uuid");
10
- const common_1 = require("@temporalio/common");
11
- const workflow_options_1 = require("./workflow-options");
12
- const errors_1 = require("./errors");
13
14
  const connection_1 = require("./connection");
15
+ const errors_1 = require("./errors");
16
+ const workflow_options_1 = require("./workflow-options");
14
17
  function defaultWorkflowClientOptions() {
15
18
  return {
16
- dataConverter: common_1.defaultDataConverter,
19
+ dataConverter: {},
17
20
  // The equivalent in Java is ManagementFactory.getRuntimeMXBean().getName()
18
21
  identity: `${process.pid}@${os_1.default.hostname()}`,
19
22
  interceptors: {},
@@ -40,7 +43,11 @@ function ensureArgs(opts) {
40
43
  class WorkflowClient {
41
44
  constructor(service = new connection_1.Connection().service, options) {
42
45
  this.service = service;
43
- this.options = { ...defaultWorkflowClientOptions(), ...options };
46
+ this.options = {
47
+ ...defaultWorkflowClientOptions(),
48
+ ...options,
49
+ loadedDataConverter: (0, internal_non_workflow_common_1.loadDataConverter)(options?.dataConverter),
50
+ };
44
51
  }
45
52
  /**
46
53
  * Start a new Workflow execution.
@@ -51,7 +58,7 @@ class WorkflowClient {
51
58
  const workflowType = typeof workflowTypeOrFunc === 'string' ? workflowTypeOrFunc : workflowTypeOrFunc.name;
52
59
  assertRequiredWorkflowOptions(options);
53
60
  const compiledOptions = (0, workflow_options_1.compileWorkflowOptions)(ensureArgs(options));
54
- const start = (0, common_1.composeInterceptors)(interceptors, 'start', this._startWorkflowHandler.bind(this));
61
+ const start = (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'start', this._startWorkflowHandler.bind(this));
55
62
  return start({
56
63
  options: compiledOptions,
57
64
  headers: {},
@@ -69,7 +76,7 @@ class WorkflowClient {
69
76
  const { signal, signalArgs, ...rest } = options;
70
77
  assertRequiredWorkflowOptions(rest);
71
78
  const compiledOptions = (0, workflow_options_1.compileWorkflowOptions)(ensureArgs(rest));
72
- const signalWithStart = (0, common_1.composeInterceptors)(interceptors, 'signalWithStart', this._signalWithStartWorkflowHandler.bind(this));
79
+ const signalWithStart = (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'signalWithStart', this._signalWithStartWorkflowHandler.bind(this));
73
80
  return signalWithStart({
74
81
  options: compiledOptions,
75
82
  headers: {},
@@ -88,7 +95,14 @@ class WorkflowClient {
88
95
  // Cast is needed because it's impossible to deduce the type in this situation
89
96
  const interceptors = (this.options.interceptors.calls ?? []).map((ctor) => ctor({ workflowId }));
90
97
  const runId = await this._start(workflowTypeOrFunc, { ...options, workflowId }, interceptors);
91
- const handle = this._createWorkflowHandle(workflowId, runId, interceptors, {
98
+ // runId is not used in handles created with `start*` calls because these
99
+ // handles should allow interacting with the workflow if it continues as new.
100
+ const handle = this._createWorkflowHandle({
101
+ workflowId,
102
+ runId: undefined,
103
+ firstExecutionRunId: runId,
104
+ runIdForResult: runId,
105
+ interceptors,
92
106
  followRuns: options.followRuns ?? true,
93
107
  }); // Cast is safe because we know we add the originalRunId below
94
108
  handle /* readonly */.originalRunId = runId;
@@ -104,7 +118,14 @@ class WorkflowClient {
104
118
  const { workflowId } = options;
105
119
  const interceptors = (this.options.interceptors.calls ?? []).map((ctor) => ctor({ workflowId }));
106
120
  const runId = await this._signalWithStart(workflowTypeOrFunc, options, interceptors);
107
- const handle = this._createWorkflowHandle(workflowId, runId, interceptors, {
121
+ // runId is not used in handles created with `start*` calls because these
122
+ // handles should allow interacting with the workflow if it continues as new.
123
+ const handle = this._createWorkflowHandle({
124
+ workflowId,
125
+ runId: undefined,
126
+ firstExecutionRunId: undefined,
127
+ runIdForResult: runId,
128
+ interceptors,
108
129
  followRuns: options.followRuns ?? true,
109
130
  }); // Cast is safe because we know we add the originalRunId below
110
131
  handle /* readonly */.originalRunId = runId;
@@ -140,7 +161,13 @@ class WorkflowClient {
140
161
  };
141
162
  let ev;
142
163
  for (;;) {
143
- const res = await this.service.getWorkflowExecutionHistory(req);
164
+ let res;
165
+ try {
166
+ res = await this.service.getWorkflowExecutionHistory(req);
167
+ }
168
+ catch (err) {
169
+ this.rethrowGrpcError(err, { workflowId, runId }, 'Failed to get Workflow execution history');
170
+ }
144
171
  if (!res.history) {
145
172
  throw new Error('No history returned by service');
146
173
  }
@@ -164,7 +191,7 @@ class WorkflowClient {
164
191
  }
165
192
  // Note that we can only return one value from our workflow function in JS.
166
193
  // Ignore any other payloads in result
167
- const [result] = await (0, common_1.arrayFromPayloads)(this.options.dataConverter, ev.workflowExecutionCompletedEventAttributes.result?.payloads);
194
+ const [result] = await (0, internal_non_workflow_common_1.decodeArrayFromPayloads)(this.options.loadedDataConverter, ev.workflowExecutionCompletedEventAttributes.result?.payloads);
168
195
  return result;
169
196
  }
170
197
  else if (ev.workflowExecutionFailedEventAttributes) {
@@ -173,11 +200,11 @@ class WorkflowClient {
173
200
  req.nextPageToken = undefined;
174
201
  continue;
175
202
  }
176
- const { failure } = ev.workflowExecutionFailedEventAttributes;
177
- throw new errors_1.WorkflowFailedError('Workflow execution failed', await (0, common_1.optionalFailureToOptionalError)(failure, this.options.dataConverter), common_1.RetryState.RETRY_STATE_NON_RETRYABLE_FAILURE);
203
+ const { failure, retryState } = ev.workflowExecutionFailedEventAttributes;
204
+ throw new errors_1.WorkflowFailedError('Workflow execution failed', await (0, internal_non_workflow_common_1.decodeOptionalFailureToOptionalError)(this.options.loadedDataConverter, failure), retryState ?? common_1.RetryState.RETRY_STATE_UNSPECIFIED);
178
205
  }
179
206
  else if (ev.workflowExecutionCanceledEventAttributes) {
180
- const failure = new common_1.CancelledFailure('Workflow canceled', await (0, common_1.arrayFromPayloads)(this.options.dataConverter, ev.workflowExecutionCanceledEventAttributes.details?.payloads));
207
+ const failure = new common_1.CancelledFailure('Workflow canceled', await (0, internal_non_workflow_common_1.decodeArrayFromPayloads)(this.options.loadedDataConverter, ev.workflowExecutionCanceledEventAttributes.details?.payloads));
181
208
  failure.stack = '';
182
209
  throw new errors_1.WorkflowFailedError('Workflow execution cancelled', failure, common_1.RetryState.RETRY_STATE_NON_RETRYABLE_FAILURE);
183
210
  }
@@ -187,7 +214,7 @@ class WorkflowClient {
187
214
  throw new errors_1.WorkflowFailedError(ev.workflowExecutionTerminatedEventAttributes.reason || 'Workflow execution terminated', failure, common_1.RetryState.RETRY_STATE_NON_RETRYABLE_FAILURE);
188
215
  }
189
216
  else if (ev.workflowExecutionTimedOutEventAttributes) {
190
- if (ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId) {
217
+ if (followRuns && ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId) {
191
218
  execution.runId = ev.workflowExecutionTimedOutEventAttributes.newExecutionRunId;
192
219
  req.nextPageToken = undefined;
193
220
  continue;
@@ -210,21 +237,36 @@ class WorkflowClient {
210
237
  }
211
238
  }
212
239
  }
240
+ rethrowGrpcError(err, workflowExecution, fallbackMessage) {
241
+ if ((0, errors_1.isServerErrorResponse)(err)) {
242
+ if (err.code === grpc_js_1.status.NOT_FOUND) {
243
+ throw new internal_workflow_common_1.WorkflowNotFoundError(err.details ?? 'Workflow not found', workflowExecution.workflowId, workflowExecution.runId);
244
+ }
245
+ throw new errors_1.ServiceError(fallbackMessage, { cause: err });
246
+ }
247
+ throw new errors_1.ServiceError('Unexpected error while making gRPC request');
248
+ }
213
249
  /**
214
250
  * Uses given input to make a queryWorkflow call to the service
215
251
  *
216
252
  * Used as the final function of the query interceptor chain
217
253
  */
218
254
  async _queryWorkflowHandler(input) {
219
- const response = await this.service.queryWorkflow({
220
- queryRejectCondition: input.queryRejectCondition,
221
- namespace: this.options.namespace,
222
- execution: input.workflowExecution,
223
- query: {
224
- queryType: input.queryType,
225
- queryArgs: { payloads: await this.options.dataConverter.toPayloads(...input.args) },
226
- },
227
- });
255
+ let response;
256
+ try {
257
+ response = await this.service.queryWorkflow({
258
+ queryRejectCondition: input.queryRejectCondition,
259
+ namespace: this.options.namespace,
260
+ execution: input.workflowExecution,
261
+ query: {
262
+ queryType: input.queryType,
263
+ queryArgs: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...input.args) },
264
+ },
265
+ });
266
+ }
267
+ catch (err) {
268
+ this.rethrowGrpcError(err, input.workflowExecution, 'Failed to query Workflow');
269
+ }
228
270
  if (response.queryRejected) {
229
271
  if (response.queryRejected.status === undefined || response.queryRejected.status === null) {
230
272
  throw new TypeError('Received queryRejected from server with no status');
@@ -235,7 +277,7 @@ class WorkflowClient {
235
277
  throw new TypeError('Invalid response from server');
236
278
  }
237
279
  // We ignore anything but the first result
238
- return this.options.dataConverter.fromPayloads(0, response.queryResult?.payloads);
280
+ return await (0, internal_non_workflow_common_1.decodeFromPayloadsAtIndex)(this.options.loadedDataConverter, 0, response.queryResult?.payloads);
239
281
  }
240
282
  /**
241
283
  * Uses given input to make a signalWorkflowExecution call to the service
@@ -243,15 +285,20 @@ class WorkflowClient {
243
285
  * Used as the final function of the signal interceptor chain
244
286
  */
245
287
  async _signalWorkflowHandler(input) {
246
- await this.service.signalWorkflowExecution({
247
- identity: this.options.identity,
248
- namespace: this.options.namespace,
249
- workflowExecution: input.workflowExecution,
250
- requestId: (0, uuid_1.v4)(),
251
- // control is unused,
252
- signalName: input.signalName,
253
- input: { payloads: await this.options.dataConverter.toPayloads(...input.args) },
254
- });
288
+ try {
289
+ await this.service.signalWorkflowExecution({
290
+ identity: this.options.identity,
291
+ namespace: this.options.namespace,
292
+ workflowExecution: input.workflowExecution,
293
+ requestId: (0, uuid_1.v4)(),
294
+ // control is unused,
295
+ signalName: input.signalName,
296
+ input: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...input.args) },
297
+ });
298
+ }
299
+ catch (err) {
300
+ this.rethrowGrpcError(err, input.workflowExecution, 'Failed to signal Workflow');
301
+ }
255
302
  }
256
303
  /**
257
304
  * Uses given input to make a signalWithStartWorkflowExecution call to the service
@@ -259,36 +306,43 @@ class WorkflowClient {
259
306
  * Used as the final function of the signalWithStart interceptor chain
260
307
  */
261
308
  async _signalWithStartWorkflowHandler(input) {
262
- const { identity, dataConverter } = this.options;
309
+ const { identity } = this.options;
263
310
  const { options, workflowType, signalName, signalArgs, headers } = input;
264
- const { runId } = await this.service.signalWithStartWorkflowExecution({
265
- namespace: this.options.namespace,
266
- identity,
267
- requestId: (0, uuid_1.v4)(),
268
- workflowId: options.workflowId,
269
- workflowIdReusePolicy: options.workflowIdReusePolicy,
270
- workflowType: { name: workflowType },
271
- input: { payloads: await dataConverter.toPayloads(...options.args) },
272
- signalName,
273
- signalInput: { payloads: await dataConverter.toPayloads(...signalArgs) },
274
- taskQueue: {
275
- kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_UNSPECIFIED,
276
- name: options.taskQueue,
277
- },
278
- workflowExecutionTimeout: options.workflowExecutionTimeout,
279
- workflowRunTimeout: options.workflowRunTimeout,
280
- workflowTaskTimeout: options.workflowTaskTimeout,
281
- retryPolicy: options.retry ? (0, common_1.compileRetryPolicy)(options.retry) : undefined,
282
- memo: options.memo ? { fields: await (0, common_1.mapToPayloads)(dataConverter, options.memo) } : undefined,
283
- searchAttributes: options.searchAttributes
284
- ? {
285
- indexedFields: await (0, common_1.mapToPayloads)(dataConverter, options.searchAttributes),
286
- }
287
- : undefined,
288
- cronSchedule: options.cronSchedule,
289
- header: { fields: headers },
290
- });
291
- return runId;
311
+ try {
312
+ const { runId } = await this.service.signalWithStartWorkflowExecution({
313
+ namespace: this.options.namespace,
314
+ identity,
315
+ requestId: (0, uuid_1.v4)(),
316
+ workflowId: options.workflowId,
317
+ workflowIdReusePolicy: options.workflowIdReusePolicy,
318
+ workflowType: { name: workflowType },
319
+ input: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...options.args) },
320
+ signalName,
321
+ signalInput: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...signalArgs) },
322
+ taskQueue: {
323
+ kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_UNSPECIFIED,
324
+ name: options.taskQueue,
325
+ },
326
+ workflowExecutionTimeout: options.workflowExecutionTimeout,
327
+ workflowRunTimeout: options.workflowRunTimeout,
328
+ workflowTaskTimeout: options.workflowTaskTimeout,
329
+ retryPolicy: options.retry ? (0, internal_workflow_common_1.compileRetryPolicy)(options.retry) : undefined,
330
+ memo: options.memo
331
+ ? { fields: await (0, internal_non_workflow_common_1.encodeMapToPayloads)(this.options.loadedDataConverter, options.memo) }
332
+ : undefined,
333
+ searchAttributes: options.searchAttributes
334
+ ? {
335
+ indexedFields: await (0, internal_non_workflow_common_1.encodeMapToPayloads)(this.options.loadedDataConverter, options.searchAttributes),
336
+ }
337
+ : undefined,
338
+ cronSchedule: options.cronSchedule,
339
+ header: { fields: headers },
340
+ });
341
+ return runId;
342
+ }
343
+ catch (err) {
344
+ this.rethrowGrpcError(err, { workflowId: options.workflowId }, 'Failed to signalWithStart Workflow');
345
+ }
292
346
  }
293
347
  /**
294
348
  * Uses given input to make startWorkflowExecution call to the service
@@ -296,16 +350,16 @@ class WorkflowClient {
296
350
  * Used as the final function of the start interceptor chain
297
351
  */
298
352
  async _startWorkflowHandler(input) {
299
- const { options: opts, workflowType: name, headers } = input;
300
- const { identity, dataConverter } = this.options;
353
+ const { options: opts, workflowType, headers } = input;
354
+ const { identity } = this.options;
301
355
  const req = {
302
356
  namespace: this.options.namespace,
303
357
  identity,
304
358
  requestId: (0, uuid_1.v4)(),
305
359
  workflowId: opts.workflowId,
306
360
  workflowIdReusePolicy: opts.workflowIdReusePolicy,
307
- workflowType: { name },
308
- input: { payloads: await dataConverter.toPayloads(...opts.args) },
361
+ workflowType: { name: workflowType },
362
+ input: { payloads: await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...opts.args) },
309
363
  taskQueue: {
310
364
  kind: proto_1.temporal.api.enums.v1.TaskQueueKind.TASK_QUEUE_KIND_UNSPECIFIED,
311
365
  name: opts.taskQueue,
@@ -313,18 +367,26 @@ class WorkflowClient {
313
367
  workflowExecutionTimeout: opts.workflowExecutionTimeout,
314
368
  workflowRunTimeout: opts.workflowRunTimeout,
315
369
  workflowTaskTimeout: opts.workflowTaskTimeout,
316
- retryPolicy: opts.retry ? (0, common_1.compileRetryPolicy)(opts.retry) : undefined,
317
- memo: opts.memo ? { fields: await (0, common_1.mapToPayloads)(dataConverter, opts.memo) } : undefined,
370
+ retryPolicy: opts.retry ? (0, internal_workflow_common_1.compileRetryPolicy)(opts.retry) : undefined,
371
+ memo: opts.memo ? { fields: await (0, internal_non_workflow_common_1.encodeMapToPayloads)(this.options.loadedDataConverter, opts.memo) } : undefined,
318
372
  searchAttributes: opts.searchAttributes
319
373
  ? {
320
- indexedFields: await (0, common_1.mapToPayloads)(dataConverter, opts.searchAttributes),
374
+ indexedFields: await (0, internal_non_workflow_common_1.encodeMapToPayloads)(this.options.loadedDataConverter, opts.searchAttributes),
321
375
  }
322
376
  : undefined,
323
377
  cronSchedule: opts.cronSchedule,
324
378
  header: { fields: headers },
325
379
  };
326
- const res = await this.service.startWorkflowExecution(req);
327
- return res.runId;
380
+ try {
381
+ const res = await this.service.startWorkflowExecution(req);
382
+ return res.runId;
383
+ }
384
+ catch (err) {
385
+ if (err.code === grpc_js_1.status.ALREADY_EXISTS) {
386
+ throw new errors_1.WorkflowExecutionAlreadyStartedError('Workflow execution already started', opts.workflowId, workflowType);
387
+ }
388
+ this.rethrowGrpcError(err, { workflowId: opts.workflowId }, 'Failed to start Workflow');
389
+ }
328
390
  }
329
391
  /**
330
392
  * Uses given input to make terminateWorkflowExecution call to the service
@@ -332,12 +394,22 @@ class WorkflowClient {
332
394
  * Used as the final function of the terminate interceptor chain
333
395
  */
334
396
  async _terminateWorkflowHandler(input) {
335
- return await this.service.terminateWorkflowExecution({
336
- namespace: this.options.namespace,
337
- identity: this.options.identity,
338
- ...input,
339
- details: { payloads: await this.options.dataConverter.toPayloads(input.details) },
340
- });
397
+ try {
398
+ return await this.service.terminateWorkflowExecution({
399
+ namespace: this.options.namespace,
400
+ identity: this.options.identity,
401
+ ...input,
402
+ details: {
403
+ payloads: input.details
404
+ ? await (0, internal_non_workflow_common_1.encodeToPayloads)(this.options.loadedDataConverter, ...input.details)
405
+ : undefined,
406
+ },
407
+ firstExecutionRunId: input.firstExecutionRunId,
408
+ });
409
+ }
410
+ catch (err) {
411
+ this.rethrowGrpcError(err, input.workflowExecution, 'Failed to terminate Workflow');
412
+ }
341
413
  }
342
414
  /**
343
415
  * Uses given input to make requestCancelWorkflowExecution call to the service
@@ -345,37 +417,45 @@ class WorkflowClient {
345
417
  * Used as the final function of the cancel interceptor chain
346
418
  */
347
419
  async _cancelWorkflowHandler(input) {
348
- return await this.service.requestCancelWorkflowExecution({
349
- namespace: this.options.namespace,
350
- identity: this.options.identity,
351
- requestId: (0, uuid_1.v4)(),
352
- workflowExecution: input.workflowExecution,
353
- });
420
+ try {
421
+ return await this.service.requestCancelWorkflowExecution({
422
+ namespace: this.options.namespace,
423
+ identity: this.options.identity,
424
+ requestId: (0, uuid_1.v4)(),
425
+ workflowExecution: input.workflowExecution,
426
+ firstExecutionRunId: input.firstExecutionRunId,
427
+ });
428
+ }
429
+ catch (err) {
430
+ this.rethrowGrpcError(err, input.workflowExecution, 'Failed to cancel workflow');
431
+ }
354
432
  }
355
433
  /**
356
434
  * Create a new workflow handle for new or existing Workflow execution
357
435
  */
358
- _createWorkflowHandle(workflowId, runId, interceptors, resultOptions) {
436
+ _createWorkflowHandle({ workflowId, runId, firstExecutionRunId, interceptors, runIdForResult, ...resultOptions }) {
359
437
  const namespace = this.options.namespace;
360
438
  return {
361
439
  client: this,
362
440
  workflowId,
363
441
  async result() {
364
- return this.client.result(workflowId, runId, resultOptions);
442
+ return this.client.result(workflowId, runIdForResult, resultOptions);
365
443
  },
366
444
  async terminate(reason) {
367
445
  const next = this.client._terminateWorkflowHandler.bind(this.client);
368
- const fn = interceptors.length ? (0, common_1.composeInterceptors)(interceptors, 'terminate', next) : next;
446
+ const fn = interceptors.length ? (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'terminate', next) : next;
369
447
  return await fn({
370
448
  workflowExecution: { workflowId, runId },
371
449
  reason,
450
+ firstExecutionRunId,
372
451
  });
373
452
  },
374
453
  async cancel() {
375
454
  const next = this.client._cancelWorkflowHandler.bind(this.client);
376
- const fn = interceptors.length ? (0, common_1.composeInterceptors)(interceptors, 'cancel', next) : next;
455
+ const fn = interceptors.length ? (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'cancel', next) : next;
377
456
  return await fn({
378
457
  workflowExecution: { workflowId, runId },
458
+ firstExecutionRunId,
379
459
  });
380
460
  },
381
461
  async describe() {
@@ -389,7 +469,7 @@ class WorkflowClient {
389
469
  },
390
470
  async signal(def, ...args) {
391
471
  const next = this.client._signalWorkflowHandler.bind(this.client);
392
- const fn = interceptors.length ? (0, common_1.composeInterceptors)(interceptors, 'signal', next) : next;
472
+ const fn = interceptors.length ? (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'signal', next) : next;
393
473
  await fn({
394
474
  workflowExecution: { workflowId, runId },
395
475
  signalName: typeof def === 'string' ? def : def.name,
@@ -398,7 +478,7 @@ class WorkflowClient {
398
478
  },
399
479
  async query(def, ...args) {
400
480
  const next = this.client._queryWorkflowHandler.bind(this.client);
401
- const fn = interceptors.length ? (0, common_1.composeInterceptors)(interceptors, 'query', next) : next;
481
+ const fn = interceptors.length ? (0, internal_workflow_common_1.composeInterceptors)(interceptors, 'query', next) : next;
402
482
  return fn({
403
483
  workflowExecution: { workflowId, runId },
404
484
  queryRejectCondition: this.client.options.queryRejectCondition,
@@ -416,7 +496,12 @@ class WorkflowClient {
416
496
  */
417
497
  getHandle(workflowId, runId, options) {
418
498
  const interceptors = (this.options.interceptors.calls ?? []).map((ctor) => ctor({ workflowId, runId }));
419
- return this._createWorkflowHandle(workflowId, runId, interceptors, {
499
+ return this._createWorkflowHandle({
500
+ workflowId,
501
+ runId,
502
+ firstExecutionRunId: options?.firstExecutionRunId,
503
+ runIdForResult: runId ?? options?.firstExecutionRunId,
504
+ interceptors,
420
505
  followRuns: options?.followRuns ?? true,
421
506
  });
422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C,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBACzF,OAAO,EAAE,CAAC;oBACR,iBAAiB,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;oBACxC,oBAAoB,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB;oBAC9D,SAAS,EAAE,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI;oBACnD,IAAI;iBACL,CAAiB,CAAC;YACrB,CAAC;SACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,UAAkB,EAClB,KAAc,EACd,OAAkC;QAElC,MAAM,YAAY,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QAExG,OAAO,IAAI,CAAC,qBAAqB,CAAC;YAChC,UAAU;YACV,KAAK;YACL,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;YACjD,cAAc,EAAE,KAAK,IAAI,OAAO,EAAE,mBAAmB;YACrD,YAAY;YACZ,UAAU,EAAE,OAAO,EAAE,UAAU,IAAI,IAAI;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AA1iBD,wCA0iBC;AAED,MAAa,kBAAmB,SAAQ,KAAK;IAE3C,YAA4B,MAAqD;QAC/E,KAAK,CAAC,gBAAgB,CAAC,CAAC;QADE,WAAM,GAAN,MAAM,CAA+C;QADjE,SAAI,GAAW,oBAAoB,CAAC;IAGpD,CAAC;CACF;AALD,gDAKC"}
@@ -1,5 +1,5 @@
1
- import { WithCompiledWorkflowDurationOptions, CommonWorkflowOptions, SignalDefinition } from '@temporalio/common';
2
- export { WithCompiledWorkflowDurationOptions, compileWorkflowOptions } from '@temporalio/common';
1
+ import { CommonWorkflowOptions, SignalDefinition, WithCompiledWorkflowDurationOptions } from '@temporalio/internal-workflow-common';
2
+ export { compileWorkflowOptions, WithCompiledWorkflowDurationOptions } from '@temporalio/internal-workflow-common';
3
3
  export interface CompiledWorkflowOptions extends WithCompiledWorkflowDurationOptions<WorkflowOptions> {
4
4
  args: unknown[];
5
5
  }
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.compileWorkflowOptions = void 0;
4
- var common_1 = require("@temporalio/common");
5
- Object.defineProperty(exports, "compileWorkflowOptions", { enumerable: true, get: function () { return common_1.compileWorkflowOptions; } });
4
+ var internal_workflow_common_1 = require("@temporalio/internal-workflow-common");
5
+ Object.defineProperty(exports, "compileWorkflowOptions", { enumerable: true, get: function () { return internal_workflow_common_1.compileWorkflowOptions; } });
6
6
  // export interface WorkflowOptionsWithDefaults<T extends Workflow> extends CommonWorkflowOptionsWithDefaults<T> {
7
7
  // /**
8
8
  // * If set to true, instructs the client to follow the chain of execution before returning a Workflow's result.
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-options.js","sourceRoot":"","sources":["../src/workflow-options.ts"],"names":[],"mappings":";;;AAEA,6CAAiG;AAAnD,gHAAA,sBAAsB,OAAA;AA4CpE,kHAAkH;AAClH,QAAQ;AACR,mHAAmH;AACnH,OAAO;AACP,oHAAoH;AACpH,iCAAiC;AACjC,OAAO;AACP,qBAAqB;AACrB,QAAQ;AACR,yBAAyB;AACzB,IAAI;AACJ,EAAE;AACF,MAAM;AACN,gGAAgG;AAChG,MAAM;AACN,mDAAmD;AACnD,+CAA+C;AAC/C,sCAAsC;AACtC,gDAAgD;AAChD,aAAa;AACb,wBAAwB;AACxB,wBAAwB;AACxB,yCAAyC;AACzC,eAAe;AACf,OAAO;AACP,IAAI"}
1
+ {"version":3,"file":"workflow-options.js","sourceRoot":"","sources":["../src/workflow-options.ts"],"names":[],"mappings":";;;AAMA,iFAAmH;AAA1G,kIAAA,sBAAsB,OAAA;AA4C/B,kHAAkH;AAClH,QAAQ;AACR,mHAAmH;AACnH,OAAO;AACP,oHAAoH;AACpH,iCAAiC;AACjC,OAAO;AACP,qBAAqB;AACrB,QAAQ;AACR,yBAAyB;AACzB,IAAI;AACJ,EAAE;AACF,MAAM;AACN,gGAAgG;AAChG,MAAM;AACN,mDAAmD;AACnD,+CAA+C;AAC/C,sCAAsC;AACtC,gDAAgD;AAChD,aAAa;AACb,wBAAwB;AACxB,wBAAwB;AACxB,yCAAyC;AACzC,eAAe;AACf,OAAO;AACP,IAAI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@temporalio/client",
3
- "version": "0.17.2",
3
+ "version": "0.19.0-rc.1",
4
4
  "description": "Temporal.io SDK Client sub-package",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -14,8 +14,10 @@
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
16
  "@grpc/grpc-js": "^1.3.7",
17
- "@temporalio/common": "^0.17.2",
18
- "@temporalio/proto": "^0.17.2",
17
+ "@temporalio/common": "^0.19.0-rc.1",
18
+ "@temporalio/internal-non-workflow-common": "^0.19.0-rc.1",
19
+ "@temporalio/internal-workflow-common": "^0.19.0-rc.1",
20
+ "@temporalio/proto": "^0.19.0-rc.1",
19
21
  "ms": "^2.1.3",
20
22
  "protobufjs": "^6.11.2",
21
23
  "uuid": "^8.3.2"
@@ -30,5 +32,5 @@
30
32
  "publishConfig": {
31
33
  "access": "public"
32
34
  },
33
- "gitHead": "2232465a4f9b0cade28f0c21c2d7856053678728"
35
+ "gitHead": "186341ed7285e468c145121433f2c239e53934a6"
34
36
  }