@hatchet-dev/typescript-sdk 1.21.1 → 1.21.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/package.json
CHANGED
|
@@ -178,6 +178,10 @@ export interface AssignedAction {
|
|
|
178
178
|
workflowVersionId?: string | undefined;
|
|
179
179
|
/** (optional) the invocation count for durable task events (required for durable events, otherwise null) */
|
|
180
180
|
durableTaskInvocationCount?: number | undefined;
|
|
181
|
+
/** (optional) the external id of the event that triggered this workflow run (if any) */
|
|
182
|
+
triggeringEventExternalId?: string | undefined;
|
|
183
|
+
/** (optional) the key of the event that triggered this workflow run (if any) */
|
|
184
|
+
triggeringEventKey?: string | undefined;
|
|
181
185
|
}
|
|
182
186
|
export interface WorkerListenRequest {
|
|
183
187
|
/** the id of the worker */
|
|
@@ -1262,6 +1262,8 @@ function createBaseAssignedAction() {
|
|
|
1262
1262
|
workflowId: undefined,
|
|
1263
1263
|
workflowVersionId: undefined,
|
|
1264
1264
|
durableTaskInvocationCount: undefined,
|
|
1265
|
+
triggeringEventExternalId: undefined,
|
|
1266
|
+
triggeringEventKey: undefined,
|
|
1265
1267
|
};
|
|
1266
1268
|
}
|
|
1267
1269
|
exports.AssignedAction = {
|
|
@@ -1329,6 +1331,12 @@ exports.AssignedAction = {
|
|
|
1329
1331
|
if (message.durableTaskInvocationCount !== undefined) {
|
|
1330
1332
|
writer.uint32(168).int32(message.durableTaskInvocationCount);
|
|
1331
1333
|
}
|
|
1334
|
+
if (message.triggeringEventExternalId !== undefined) {
|
|
1335
|
+
writer.uint32(178).string(message.triggeringEventExternalId);
|
|
1336
|
+
}
|
|
1337
|
+
if (message.triggeringEventKey !== undefined) {
|
|
1338
|
+
writer.uint32(186).string(message.triggeringEventKey);
|
|
1339
|
+
}
|
|
1332
1340
|
return writer;
|
|
1333
1341
|
},
|
|
1334
1342
|
decode(input, length) {
|
|
@@ -1485,6 +1493,20 @@ exports.AssignedAction = {
|
|
|
1485
1493
|
message.durableTaskInvocationCount = reader.int32();
|
|
1486
1494
|
continue;
|
|
1487
1495
|
}
|
|
1496
|
+
case 22: {
|
|
1497
|
+
if (tag !== 178) {
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
message.triggeringEventExternalId = reader.string();
|
|
1501
|
+
continue;
|
|
1502
|
+
}
|
|
1503
|
+
case 23: {
|
|
1504
|
+
if (tag !== 186) {
|
|
1505
|
+
break;
|
|
1506
|
+
}
|
|
1507
|
+
message.triggeringEventKey = reader.string();
|
|
1508
|
+
continue;
|
|
1509
|
+
}
|
|
1488
1510
|
}
|
|
1489
1511
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1490
1512
|
break;
|
|
@@ -1596,6 +1618,16 @@ exports.AssignedAction = {
|
|
|
1596
1618
|
: isSet(object.durable_task_invocation_count)
|
|
1597
1619
|
? globalThis.Number(object.durable_task_invocation_count)
|
|
1598
1620
|
: undefined,
|
|
1621
|
+
triggeringEventExternalId: isSet(object.triggeringEventExternalId)
|
|
1622
|
+
? globalThis.String(object.triggeringEventExternalId)
|
|
1623
|
+
: isSet(object.triggering_event_external_id)
|
|
1624
|
+
? globalThis.String(object.triggering_event_external_id)
|
|
1625
|
+
: undefined,
|
|
1626
|
+
triggeringEventKey: isSet(object.triggeringEventKey)
|
|
1627
|
+
? globalThis.String(object.triggeringEventKey)
|
|
1628
|
+
: isSet(object.triggering_event_key)
|
|
1629
|
+
? globalThis.String(object.triggering_event_key)
|
|
1630
|
+
: undefined,
|
|
1599
1631
|
};
|
|
1600
1632
|
},
|
|
1601
1633
|
toJSON(message) {
|
|
@@ -1663,13 +1695,19 @@ exports.AssignedAction = {
|
|
|
1663
1695
|
if (message.durableTaskInvocationCount !== undefined) {
|
|
1664
1696
|
obj.durableTaskInvocationCount = Math.round(message.durableTaskInvocationCount);
|
|
1665
1697
|
}
|
|
1698
|
+
if (message.triggeringEventExternalId !== undefined) {
|
|
1699
|
+
obj.triggeringEventExternalId = message.triggeringEventExternalId;
|
|
1700
|
+
}
|
|
1701
|
+
if (message.triggeringEventKey !== undefined) {
|
|
1702
|
+
obj.triggeringEventKey = message.triggeringEventKey;
|
|
1703
|
+
}
|
|
1666
1704
|
return obj;
|
|
1667
1705
|
},
|
|
1668
1706
|
create(base) {
|
|
1669
1707
|
return exports.AssignedAction.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1670
1708
|
},
|
|
1671
1709
|
fromPartial(object) {
|
|
1672
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1710
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
1673
1711
|
const message = createBaseAssignedAction();
|
|
1674
1712
|
message.tenantId = (_a = object.tenantId) !== null && _a !== void 0 ? _a : '';
|
|
1675
1713
|
message.workflowRunId = (_b = object.workflowRunId) !== null && _b !== void 0 ? _b : '';
|
|
@@ -1692,6 +1730,8 @@ exports.AssignedAction = {
|
|
|
1692
1730
|
message.workflowId = (_u = object.workflowId) !== null && _u !== void 0 ? _u : undefined;
|
|
1693
1731
|
message.workflowVersionId = (_v = object.workflowVersionId) !== null && _v !== void 0 ? _v : undefined;
|
|
1694
1732
|
message.durableTaskInvocationCount = (_w = object.durableTaskInvocationCount) !== null && _w !== void 0 ? _w : undefined;
|
|
1733
|
+
message.triggeringEventExternalId = (_x = object.triggeringEventExternalId) !== null && _x !== void 0 ? _x : undefined;
|
|
1734
|
+
message.triggeringEventKey = (_y = object.triggeringEventKey) !== null && _y !== void 0 ? _y : undefined;
|
|
1695
1735
|
return message;
|
|
1696
1736
|
},
|
|
1697
1737
|
};
|
|
@@ -306,6 +306,16 @@ export declare class Context<T, K = {}> {
|
|
|
306
306
|
*/
|
|
307
307
|
parentWorkflowRunId(): string | undefined;
|
|
308
308
|
priority(): Priority | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* Gets the external ID of the event that triggered this workflow run, if any.
|
|
311
|
+
* @returns The triggering event external ID, or undefined if the workflow was not triggered by an event.
|
|
312
|
+
*/
|
|
313
|
+
triggeringEventId(): string | undefined;
|
|
314
|
+
/**
|
|
315
|
+
* Gets the key of the event that triggered this workflow run, if any.
|
|
316
|
+
* @returns The triggering event key, or undefined if the workflow was not triggered by an event.
|
|
317
|
+
*/
|
|
318
|
+
triggeringEventKey(): string | undefined;
|
|
309
319
|
/**
|
|
310
320
|
* Get the output of a task.
|
|
311
321
|
* @param task - The name of the task to get the output for.
|
|
@@ -506,6 +506,20 @@ class Context {
|
|
|
506
506
|
return undefined;
|
|
507
507
|
}
|
|
508
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* Gets the external ID of the event that triggered this workflow run, if any.
|
|
511
|
+
* @returns The triggering event external ID, or undefined if the workflow was not triggered by an event.
|
|
512
|
+
*/
|
|
513
|
+
triggeringEventId() {
|
|
514
|
+
return this.action.triggeringEventExternalId;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Gets the key of the event that triggered this workflow run, if any.
|
|
518
|
+
* @returns The triggering event key, or undefined if the workflow was not triggered by an event.
|
|
519
|
+
*/
|
|
520
|
+
triggeringEventKey() {
|
|
521
|
+
return this.action.triggeringEventKey;
|
|
522
|
+
}
|
|
509
523
|
// FIXME: drop these at some point soon
|
|
510
524
|
/**
|
|
511
525
|
* Get the output of a task.
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.21.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.21.2";
|
package/version.js
CHANGED