@hatchet-dev/typescript-sdk 1.17.0 → 1.17.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/clients/listeners/durable-listener/durable-listener-client.d.ts +1 -0
- package/clients/listeners/durable-listener/durable-listener-client.js +1 -0
- package/package.json +1 -1
- package/protoc/dispatcher/dispatcher.js +401 -100
- package/protoc/events/events.js +54 -14
- package/protoc/google/protobuf/timestamp.js +1 -1
- package/protoc/v1/dispatcher.d.ts +1 -0
- package/protoc/v1/dispatcher.js +227 -58
- package/protoc/v1/shared/condition.js +37 -11
- package/protoc/v1/shared/trigger.js +45 -14
- package/protoc/v1/workflows.js +214 -68
- package/protoc/workflows/workflows.js +141 -38
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/protoc/v1/workflows.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v2.
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
5
|
// protoc v3.19.1
|
|
6
6
|
// source: v1/workflows.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -264,7 +264,9 @@ exports.CancelTasksRequest = {
|
|
|
264
264
|
return {
|
|
265
265
|
externalIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.externalIds)
|
|
266
266
|
? object.externalIds.map((e) => globalThis.String(e))
|
|
267
|
-
:
|
|
267
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.external_ids)
|
|
268
|
+
? object.external_ids.map((e) => globalThis.String(e))
|
|
269
|
+
: [],
|
|
268
270
|
filter: isSet(object.filter) ? exports.TasksFilter.fromJSON(object.filter) : undefined,
|
|
269
271
|
};
|
|
270
272
|
},
|
|
@@ -339,7 +341,9 @@ exports.ReplayTasksRequest = {
|
|
|
339
341
|
return {
|
|
340
342
|
externalIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.externalIds)
|
|
341
343
|
? object.externalIds.map((e) => globalThis.String(e))
|
|
342
|
-
:
|
|
344
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.external_ids)
|
|
345
|
+
? object.external_ids.map((e) => globalThis.String(e))
|
|
346
|
+
: [],
|
|
343
347
|
filter: isSet(object.filter) ? exports.TasksFilter.fromJSON(object.filter) : undefined,
|
|
344
348
|
};
|
|
345
349
|
},
|
|
@@ -455,10 +459,14 @@ exports.TasksFilter = {
|
|
|
455
459
|
until: isSet(object.until) ? fromJsonTimestamp(object.until) : undefined,
|
|
456
460
|
workflowIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflowIds)
|
|
457
461
|
? object.workflowIds.map((e) => globalThis.String(e))
|
|
458
|
-
:
|
|
462
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflow_ids)
|
|
463
|
+
? object.workflow_ids.map((e) => globalThis.String(e))
|
|
464
|
+
: [],
|
|
459
465
|
additionalMetadata: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.additionalMetadata)
|
|
460
466
|
? object.additionalMetadata.map((e) => globalThis.String(e))
|
|
461
|
-
:
|
|
467
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.additional_metadata)
|
|
468
|
+
? object.additional_metadata.map((e) => globalThis.String(e))
|
|
469
|
+
: [],
|
|
462
470
|
};
|
|
463
471
|
},
|
|
464
472
|
toJSON(message) {
|
|
@@ -531,7 +539,9 @@ exports.CancelTasksResponse = {
|
|
|
531
539
|
return {
|
|
532
540
|
cancelledTasks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cancelledTasks)
|
|
533
541
|
? object.cancelledTasks.map((e) => globalThis.String(e))
|
|
534
|
-
:
|
|
542
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cancelled_tasks)
|
|
543
|
+
? object.cancelled_tasks.map((e) => globalThis.String(e))
|
|
544
|
+
: [],
|
|
535
545
|
};
|
|
536
546
|
},
|
|
537
547
|
toJSON(message) {
|
|
@@ -588,7 +598,9 @@ exports.ReplayTasksResponse = {
|
|
|
588
598
|
return {
|
|
589
599
|
replayedTasks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.replayedTasks)
|
|
590
600
|
? object.replayedTasks.map((e) => globalThis.String(e))
|
|
591
|
-
:
|
|
601
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.replayed_tasks)
|
|
602
|
+
? object.replayed_tasks.map((e) => globalThis.String(e))
|
|
603
|
+
: [],
|
|
592
604
|
};
|
|
593
605
|
},
|
|
594
606
|
toJSON(message) {
|
|
@@ -632,7 +644,7 @@ exports.TriggerWorkflowRunRequest = {
|
|
|
632
644
|
if (message.priority !== undefined) {
|
|
633
645
|
writer.uint32(32).int32(message.priority);
|
|
634
646
|
}
|
|
635
|
-
Object.entries(message.desiredWorkerLabels).forEach(([key, value]) => {
|
|
647
|
+
globalThis.Object.entries(message.desiredWorkerLabels).forEach(([key, value]) => {
|
|
636
648
|
exports.TriggerWorkflowRunRequest_DesiredWorkerLabelsEntry.encode({ key: key, value }, writer.uint32(42).fork()).join();
|
|
637
649
|
});
|
|
638
650
|
return writer;
|
|
@@ -692,18 +704,29 @@ exports.TriggerWorkflowRunRequest = {
|
|
|
692
704
|
},
|
|
693
705
|
fromJSON(object) {
|
|
694
706
|
return {
|
|
695
|
-
workflowName: isSet(object.workflowName)
|
|
707
|
+
workflowName: isSet(object.workflowName)
|
|
708
|
+
? globalThis.String(object.workflowName)
|
|
709
|
+
: isSet(object.workflow_name)
|
|
710
|
+
? globalThis.String(object.workflow_name)
|
|
711
|
+
: '',
|
|
696
712
|
input: isSet(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
|
|
697
713
|
additionalMetadata: isSet(object.additionalMetadata)
|
|
698
714
|
? bytesFromBase64(object.additionalMetadata)
|
|
699
|
-
:
|
|
715
|
+
: isSet(object.additional_metadata)
|
|
716
|
+
? bytesFromBase64(object.additional_metadata)
|
|
717
|
+
: new Uint8Array(0),
|
|
700
718
|
priority: isSet(object.priority) ? globalThis.Number(object.priority) : undefined,
|
|
701
719
|
desiredWorkerLabels: isObject(object.desiredWorkerLabels)
|
|
702
|
-
? Object.entries(object.desiredWorkerLabels).reduce((acc, [key, value]) => {
|
|
720
|
+
? globalThis.Object.entries(object.desiredWorkerLabels).reduce((acc, [key, value]) => {
|
|
703
721
|
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
704
722
|
return acc;
|
|
705
723
|
}, {})
|
|
706
|
-
:
|
|
724
|
+
: isObject(object.desired_worker_labels)
|
|
725
|
+
? globalThis.Object.entries(object.desired_worker_labels).reduce((acc, [key, value]) => {
|
|
726
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
727
|
+
return acc;
|
|
728
|
+
}, {})
|
|
729
|
+
: {},
|
|
707
730
|
};
|
|
708
731
|
},
|
|
709
732
|
toJSON(message) {
|
|
@@ -721,7 +744,7 @@ exports.TriggerWorkflowRunRequest = {
|
|
|
721
744
|
obj.priority = Math.round(message.priority);
|
|
722
745
|
}
|
|
723
746
|
if (message.desiredWorkerLabels) {
|
|
724
|
-
const entries = Object.entries(message.desiredWorkerLabels);
|
|
747
|
+
const entries = globalThis.Object.entries(message.desiredWorkerLabels);
|
|
725
748
|
if (entries.length > 0) {
|
|
726
749
|
obj.desiredWorkerLabels = {};
|
|
727
750
|
entries.forEach(([k, v]) => {
|
|
@@ -741,7 +764,7 @@ exports.TriggerWorkflowRunRequest = {
|
|
|
741
764
|
message.input = (_b = object.input) !== null && _b !== void 0 ? _b : new Uint8Array(0);
|
|
742
765
|
message.additionalMetadata = (_c = object.additionalMetadata) !== null && _c !== void 0 ? _c : new Uint8Array(0);
|
|
743
766
|
message.priority = (_d = object.priority) !== null && _d !== void 0 ? _d : undefined;
|
|
744
|
-
message.desiredWorkerLabels = Object.entries((_e = object.desiredWorkerLabels) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
767
|
+
message.desiredWorkerLabels = globalThis.Object.entries((_e = object.desiredWorkerLabels) !== null && _e !== void 0 ? _e : {}).reduce((acc, [key, value]) => {
|
|
745
768
|
if (value !== undefined) {
|
|
746
769
|
acc[key] = trigger_1.DesiredWorkerLabels.fromPartial(value);
|
|
747
770
|
}
|
|
@@ -855,7 +878,13 @@ exports.TriggerWorkflowRunResponse = {
|
|
|
855
878
|
return message;
|
|
856
879
|
},
|
|
857
880
|
fromJSON(object) {
|
|
858
|
-
return {
|
|
881
|
+
return {
|
|
882
|
+
externalId: isSet(object.externalId)
|
|
883
|
+
? globalThis.String(object.externalId)
|
|
884
|
+
: isSet(object.external_id)
|
|
885
|
+
? globalThis.String(object.external_id)
|
|
886
|
+
: '',
|
|
887
|
+
};
|
|
859
888
|
},
|
|
860
889
|
toJSON(message) {
|
|
861
890
|
const obj = {};
|
|
@@ -928,9 +957,21 @@ exports.BranchDurableTaskRequest = {
|
|
|
928
957
|
},
|
|
929
958
|
fromJSON(object) {
|
|
930
959
|
return {
|
|
931
|
-
taskExternalId: isSet(object.taskExternalId)
|
|
932
|
-
|
|
933
|
-
|
|
960
|
+
taskExternalId: isSet(object.taskExternalId)
|
|
961
|
+
? globalThis.String(object.taskExternalId)
|
|
962
|
+
: isSet(object.task_external_id)
|
|
963
|
+
? globalThis.String(object.task_external_id)
|
|
964
|
+
: '',
|
|
965
|
+
nodeId: isSet(object.nodeId)
|
|
966
|
+
? globalThis.Number(object.nodeId)
|
|
967
|
+
: isSet(object.node_id)
|
|
968
|
+
? globalThis.Number(object.node_id)
|
|
969
|
+
: 0,
|
|
970
|
+
branchId: isSet(object.branchId)
|
|
971
|
+
? globalThis.Number(object.branchId)
|
|
972
|
+
: isSet(object.branch_id)
|
|
973
|
+
? globalThis.Number(object.branch_id)
|
|
974
|
+
: 0,
|
|
934
975
|
};
|
|
935
976
|
},
|
|
936
977
|
toJSON(message) {
|
|
@@ -1012,9 +1053,21 @@ exports.BranchDurableTaskResponse = {
|
|
|
1012
1053
|
},
|
|
1013
1054
|
fromJSON(object) {
|
|
1014
1055
|
return {
|
|
1015
|
-
taskExternalId: isSet(object.taskExternalId)
|
|
1016
|
-
|
|
1017
|
-
|
|
1056
|
+
taskExternalId: isSet(object.taskExternalId)
|
|
1057
|
+
? globalThis.String(object.taskExternalId)
|
|
1058
|
+
: isSet(object.task_external_id)
|
|
1059
|
+
? globalThis.String(object.task_external_id)
|
|
1060
|
+
: '',
|
|
1061
|
+
nodeId: isSet(object.nodeId)
|
|
1062
|
+
? globalThis.Number(object.nodeId)
|
|
1063
|
+
: isSet(object.node_id)
|
|
1064
|
+
? globalThis.Number(object.node_id)
|
|
1065
|
+
: 0,
|
|
1066
|
+
branchId: isSet(object.branchId)
|
|
1067
|
+
? globalThis.Number(object.branchId)
|
|
1068
|
+
: isSet(object.branch_id)
|
|
1069
|
+
? globalThis.Number(object.branch_id)
|
|
1070
|
+
: 0,
|
|
1018
1071
|
};
|
|
1019
1072
|
},
|
|
1020
1073
|
toJSON(message) {
|
|
@@ -1226,31 +1279,49 @@ exports.CreateWorkflowVersionRequest = {
|
|
|
1226
1279
|
version: isSet(object.version) ? globalThis.String(object.version) : '',
|
|
1227
1280
|
eventTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.eventTriggers)
|
|
1228
1281
|
? object.eventTriggers.map((e) => globalThis.String(e))
|
|
1229
|
-
:
|
|
1282
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.event_triggers)
|
|
1283
|
+
? object.event_triggers.map((e) => globalThis.String(e))
|
|
1284
|
+
: [],
|
|
1230
1285
|
cronTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cronTriggers)
|
|
1231
1286
|
? object.cronTriggers.map((e) => globalThis.String(e))
|
|
1232
|
-
:
|
|
1287
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cron_triggers)
|
|
1288
|
+
? object.cron_triggers.map((e) => globalThis.String(e))
|
|
1289
|
+
: [],
|
|
1233
1290
|
tasks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tasks)
|
|
1234
1291
|
? object.tasks.map((e) => exports.CreateTaskOpts.fromJSON(e))
|
|
1235
1292
|
: [],
|
|
1236
1293
|
concurrency: isSet(object.concurrency) ? exports.Concurrency.fromJSON(object.concurrency) : undefined,
|
|
1237
|
-
cronInput: isSet(object.cronInput)
|
|
1294
|
+
cronInput: isSet(object.cronInput)
|
|
1295
|
+
? globalThis.String(object.cronInput)
|
|
1296
|
+
: isSet(object.cron_input)
|
|
1297
|
+
? globalThis.String(object.cron_input)
|
|
1298
|
+
: undefined,
|
|
1238
1299
|
onFailureTask: isSet(object.onFailureTask)
|
|
1239
1300
|
? exports.CreateTaskOpts.fromJSON(object.onFailureTask)
|
|
1240
|
-
:
|
|
1301
|
+
: isSet(object.on_failure_task)
|
|
1302
|
+
? exports.CreateTaskOpts.fromJSON(object.on_failure_task)
|
|
1303
|
+
: undefined,
|
|
1241
1304
|
sticky: isSet(object.sticky) ? stickyStrategyFromJSON(object.sticky) : undefined,
|
|
1242
1305
|
defaultPriority: isSet(object.defaultPriority)
|
|
1243
1306
|
? globalThis.Number(object.defaultPriority)
|
|
1244
|
-
:
|
|
1307
|
+
: isSet(object.default_priority)
|
|
1308
|
+
? globalThis.Number(object.default_priority)
|
|
1309
|
+
: undefined,
|
|
1245
1310
|
concurrencyArr: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.concurrencyArr)
|
|
1246
1311
|
? object.concurrencyArr.map((e) => exports.Concurrency.fromJSON(e))
|
|
1247
|
-
:
|
|
1312
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.concurrency_arr)
|
|
1313
|
+
? object.concurrency_arr.map((e) => exports.Concurrency.fromJSON(e))
|
|
1314
|
+
: [],
|
|
1248
1315
|
defaultFilters: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.defaultFilters)
|
|
1249
1316
|
? object.defaultFilters.map((e) => exports.DefaultFilter.fromJSON(e))
|
|
1250
|
-
:
|
|
1317
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.default_filters)
|
|
1318
|
+
? object.default_filters.map((e) => exports.DefaultFilter.fromJSON(e))
|
|
1319
|
+
: [],
|
|
1251
1320
|
inputJsonSchema: isSet(object.inputJsonSchema)
|
|
1252
1321
|
? bytesFromBase64(object.inputJsonSchema)
|
|
1253
|
-
:
|
|
1322
|
+
: isSet(object.input_json_schema)
|
|
1323
|
+
? bytesFromBase64(object.input_json_schema)
|
|
1324
|
+
: undefined,
|
|
1254
1325
|
};
|
|
1255
1326
|
},
|
|
1256
1327
|
toJSON(message) {
|
|
@@ -1468,10 +1539,16 @@ exports.Concurrency = {
|
|
|
1468
1539
|
fromJSON(object) {
|
|
1469
1540
|
return {
|
|
1470
1541
|
expression: isSet(object.expression) ? globalThis.String(object.expression) : '',
|
|
1471
|
-
maxRuns: isSet(object.maxRuns)
|
|
1542
|
+
maxRuns: isSet(object.maxRuns)
|
|
1543
|
+
? globalThis.Number(object.maxRuns)
|
|
1544
|
+
: isSet(object.max_runs)
|
|
1545
|
+
? globalThis.Number(object.max_runs)
|
|
1546
|
+
: undefined,
|
|
1472
1547
|
limitStrategy: isSet(object.limitStrategy)
|
|
1473
1548
|
? concurrencyLimitStrategyFromJSON(object.limitStrategy)
|
|
1474
|
-
:
|
|
1549
|
+
: isSet(object.limit_strategy)
|
|
1550
|
+
? concurrencyLimitStrategyFromJSON(object.limit_strategy)
|
|
1551
|
+
: undefined,
|
|
1475
1552
|
};
|
|
1476
1553
|
},
|
|
1477
1554
|
toJSON(message) {
|
|
@@ -1541,7 +1618,7 @@ exports.CreateTaskOpts = {
|
|
|
1541
1618
|
for (const v of message.rateLimits) {
|
|
1542
1619
|
exports.CreateTaskRateLimit.encode(v, writer.uint32(58).fork()).join();
|
|
1543
1620
|
}
|
|
1544
|
-
Object.entries(message.workerLabels).forEach(([key, value]) => {
|
|
1621
|
+
globalThis.Object.entries(message.workerLabels).forEach(([key, value]) => {
|
|
1545
1622
|
exports.CreateTaskOpts_WorkerLabelsEntry.encode({ key: key, value }, writer.uint32(66).fork()).join();
|
|
1546
1623
|
});
|
|
1547
1624
|
if (message.backoffFactor !== undefined) {
|
|
@@ -1562,7 +1639,7 @@ exports.CreateTaskOpts = {
|
|
|
1562
1639
|
if (message.isDurable !== false) {
|
|
1563
1640
|
writer.uint32(112).bool(message.isDurable);
|
|
1564
1641
|
}
|
|
1565
|
-
Object.entries(message.slotRequests).forEach(([key, value]) => {
|
|
1642
|
+
globalThis.Object.entries(message.slotRequests).forEach(([key, value]) => {
|
|
1566
1643
|
exports.CreateTaskOpts_SlotRequestsEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
|
|
1567
1644
|
});
|
|
1568
1645
|
return writer;
|
|
@@ -1695,7 +1772,11 @@ exports.CreateTaskOpts = {
|
|
|
1695
1772
|
},
|
|
1696
1773
|
fromJSON(object) {
|
|
1697
1774
|
return {
|
|
1698
|
-
readableId: isSet(object.readableId)
|
|
1775
|
+
readableId: isSet(object.readableId)
|
|
1776
|
+
? globalThis.String(object.readableId)
|
|
1777
|
+
: isSet(object.readable_id)
|
|
1778
|
+
? globalThis.String(object.readable_id)
|
|
1779
|
+
: '',
|
|
1699
1780
|
action: isSet(object.action) ? globalThis.String(object.action) : '',
|
|
1700
1781
|
timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : '',
|
|
1701
1782
|
inputs: isSet(object.inputs) ? globalThis.String(object.inputs) : '',
|
|
@@ -1705,33 +1786,55 @@ exports.CreateTaskOpts = {
|
|
|
1705
1786
|
retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
|
|
1706
1787
|
rateLimits: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rateLimits)
|
|
1707
1788
|
? object.rateLimits.map((e) => exports.CreateTaskRateLimit.fromJSON(e))
|
|
1708
|
-
:
|
|
1789
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rate_limits)
|
|
1790
|
+
? object.rate_limits.map((e) => exports.CreateTaskRateLimit.fromJSON(e))
|
|
1791
|
+
: [],
|
|
1709
1792
|
workerLabels: isObject(object.workerLabels)
|
|
1710
|
-
? Object.entries(object.workerLabels).reduce((acc, [key, value]) => {
|
|
1793
|
+
? globalThis.Object.entries(object.workerLabels).reduce((acc, [key, value]) => {
|
|
1711
1794
|
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
1712
1795
|
return acc;
|
|
1713
1796
|
}, {})
|
|
1714
|
-
:
|
|
1797
|
+
: isObject(object.worker_labels)
|
|
1798
|
+
? globalThis.Object.entries(object.worker_labels).reduce((acc, [key, value]) => {
|
|
1799
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
1800
|
+
return acc;
|
|
1801
|
+
}, {})
|
|
1802
|
+
: {},
|
|
1715
1803
|
backoffFactor: isSet(object.backoffFactor)
|
|
1716
1804
|
? globalThis.Number(object.backoffFactor)
|
|
1717
|
-
:
|
|
1805
|
+
: isSet(object.backoff_factor)
|
|
1806
|
+
? globalThis.Number(object.backoff_factor)
|
|
1807
|
+
: undefined,
|
|
1718
1808
|
backoffMaxSeconds: isSet(object.backoffMaxSeconds)
|
|
1719
1809
|
? globalThis.Number(object.backoffMaxSeconds)
|
|
1720
|
-
:
|
|
1810
|
+
: isSet(object.backoff_max_seconds)
|
|
1811
|
+
? globalThis.Number(object.backoff_max_seconds)
|
|
1812
|
+
: undefined,
|
|
1721
1813
|
concurrency: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.concurrency)
|
|
1722
1814
|
? object.concurrency.map((e) => exports.Concurrency.fromJSON(e))
|
|
1723
1815
|
: [],
|
|
1724
1816
|
conditions: isSet(object.conditions) ? condition_1.TaskConditions.fromJSON(object.conditions) : undefined,
|
|
1725
1817
|
scheduleTimeout: isSet(object.scheduleTimeout)
|
|
1726
1818
|
? globalThis.String(object.scheduleTimeout)
|
|
1727
|
-
:
|
|
1728
|
-
|
|
1819
|
+
: isSet(object.schedule_timeout)
|
|
1820
|
+
? globalThis.String(object.schedule_timeout)
|
|
1821
|
+
: undefined,
|
|
1822
|
+
isDurable: isSet(object.isDurable)
|
|
1823
|
+
? globalThis.Boolean(object.isDurable)
|
|
1824
|
+
: isSet(object.is_durable)
|
|
1825
|
+
? globalThis.Boolean(object.is_durable)
|
|
1826
|
+
: false,
|
|
1729
1827
|
slotRequests: isObject(object.slotRequests)
|
|
1730
|
-
? Object.entries(object.slotRequests).reduce((acc, [key, value]) => {
|
|
1731
|
-
acc[key] = Number(value);
|
|
1828
|
+
? globalThis.Object.entries(object.slotRequests).reduce((acc, [key, value]) => {
|
|
1829
|
+
acc[key] = globalThis.Number(value);
|
|
1732
1830
|
return acc;
|
|
1733
1831
|
}, {})
|
|
1734
|
-
:
|
|
1832
|
+
: isObject(object.slot_requests)
|
|
1833
|
+
? globalThis.Object.entries(object.slot_requests).reduce((acc, [key, value]) => {
|
|
1834
|
+
acc[key] = globalThis.Number(value);
|
|
1835
|
+
return acc;
|
|
1836
|
+
}, {})
|
|
1837
|
+
: {},
|
|
1735
1838
|
};
|
|
1736
1839
|
},
|
|
1737
1840
|
toJSON(message) {
|
|
@@ -1759,7 +1862,7 @@ exports.CreateTaskOpts = {
|
|
|
1759
1862
|
obj.rateLimits = message.rateLimits.map((e) => exports.CreateTaskRateLimit.toJSON(e));
|
|
1760
1863
|
}
|
|
1761
1864
|
if (message.workerLabels) {
|
|
1762
|
-
const entries = Object.entries(message.workerLabels);
|
|
1865
|
+
const entries = globalThis.Object.entries(message.workerLabels);
|
|
1763
1866
|
if (entries.length > 0) {
|
|
1764
1867
|
obj.workerLabels = {};
|
|
1765
1868
|
entries.forEach(([k, v]) => {
|
|
@@ -1786,7 +1889,7 @@ exports.CreateTaskOpts = {
|
|
|
1786
1889
|
obj.isDurable = message.isDurable;
|
|
1787
1890
|
}
|
|
1788
1891
|
if (message.slotRequests) {
|
|
1789
|
-
const entries = Object.entries(message.slotRequests);
|
|
1892
|
+
const entries = globalThis.Object.entries(message.slotRequests);
|
|
1790
1893
|
if (entries.length > 0) {
|
|
1791
1894
|
obj.slotRequests = {};
|
|
1792
1895
|
entries.forEach(([k, v]) => {
|
|
@@ -1809,7 +1912,7 @@ exports.CreateTaskOpts = {
|
|
|
1809
1912
|
message.parents = ((_e = object.parents) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
|
|
1810
1913
|
message.retries = (_f = object.retries) !== null && _f !== void 0 ? _f : 0;
|
|
1811
1914
|
message.rateLimits = ((_g = object.rateLimits) === null || _g === void 0 ? void 0 : _g.map((e) => exports.CreateTaskRateLimit.fromPartial(e))) || [];
|
|
1812
|
-
message.workerLabels = Object.entries((_h = object.workerLabels) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
|
|
1915
|
+
message.workerLabels = globalThis.Object.entries((_h = object.workerLabels) !== null && _h !== void 0 ? _h : {}).reduce((acc, [key, value]) => {
|
|
1813
1916
|
if (value !== undefined) {
|
|
1814
1917
|
acc[key] = trigger_1.DesiredWorkerLabels.fromPartial(value);
|
|
1815
1918
|
}
|
|
@@ -1824,7 +1927,7 @@ exports.CreateTaskOpts = {
|
|
|
1824
1927
|
: undefined;
|
|
1825
1928
|
message.scheduleTimeout = (_m = object.scheduleTimeout) !== null && _m !== void 0 ? _m : undefined;
|
|
1826
1929
|
message.isDurable = (_o = object.isDurable) !== null && _o !== void 0 ? _o : false;
|
|
1827
|
-
message.slotRequests = Object.entries((_p = object.slotRequests) !== null && _p !== void 0 ? _p : {}).reduce((acc, [key, value]) => {
|
|
1930
|
+
message.slotRequests = globalThis.Object.entries((_p = object.slotRequests) !== null && _p !== void 0 ? _p : {}).reduce((acc, [key, value]) => {
|
|
1828
1931
|
if (value !== undefined) {
|
|
1829
1932
|
acc[key] = globalThis.Number(value);
|
|
1830
1933
|
}
|
|
@@ -2067,11 +2170,21 @@ exports.CreateTaskRateLimit = {
|
|
|
2067
2170
|
return {
|
|
2068
2171
|
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
2069
2172
|
units: isSet(object.units) ? globalThis.Number(object.units) : undefined,
|
|
2070
|
-
keyExpr: isSet(object.keyExpr)
|
|
2071
|
-
|
|
2173
|
+
keyExpr: isSet(object.keyExpr)
|
|
2174
|
+
? globalThis.String(object.keyExpr)
|
|
2175
|
+
: isSet(object.key_expr)
|
|
2176
|
+
? globalThis.String(object.key_expr)
|
|
2177
|
+
: undefined,
|
|
2178
|
+
unitsExpr: isSet(object.unitsExpr)
|
|
2179
|
+
? globalThis.String(object.unitsExpr)
|
|
2180
|
+
: isSet(object.units_expr)
|
|
2181
|
+
? globalThis.String(object.units_expr)
|
|
2182
|
+
: undefined,
|
|
2072
2183
|
limitValuesExpr: isSet(object.limitValuesExpr)
|
|
2073
2184
|
? globalThis.String(object.limitValuesExpr)
|
|
2074
|
-
:
|
|
2185
|
+
: isSet(object.limit_values_expr)
|
|
2186
|
+
? globalThis.String(object.limit_values_expr)
|
|
2187
|
+
: undefined,
|
|
2075
2188
|
duration: isSet(object.duration) ? rateLimitDurationFromJSON(object.duration) : undefined,
|
|
2076
2189
|
};
|
|
2077
2190
|
},
|
|
@@ -2157,7 +2270,11 @@ exports.CreateWorkflowVersionResponse = {
|
|
|
2157
2270
|
fromJSON(object) {
|
|
2158
2271
|
return {
|
|
2159
2272
|
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
2160
|
-
workflowId: isSet(object.workflowId)
|
|
2273
|
+
workflowId: isSet(object.workflowId)
|
|
2274
|
+
? globalThis.String(object.workflowId)
|
|
2275
|
+
: isSet(object.workflow_id)
|
|
2276
|
+
? globalThis.String(object.workflow_id)
|
|
2277
|
+
: '',
|
|
2161
2278
|
};
|
|
2162
2279
|
},
|
|
2163
2280
|
toJSON(message) {
|
|
@@ -2214,7 +2331,13 @@ exports.GetRunDetailsRequest = {
|
|
|
2214
2331
|
return message;
|
|
2215
2332
|
},
|
|
2216
2333
|
fromJSON(object) {
|
|
2217
|
-
return {
|
|
2334
|
+
return {
|
|
2335
|
+
externalId: isSet(object.externalId)
|
|
2336
|
+
? globalThis.String(object.externalId)
|
|
2337
|
+
: isSet(object.external_id)
|
|
2338
|
+
? globalThis.String(object.external_id)
|
|
2339
|
+
: '',
|
|
2340
|
+
};
|
|
2218
2341
|
},
|
|
2219
2342
|
toJSON(message) {
|
|
2220
2343
|
const obj = {};
|
|
@@ -2324,12 +2447,24 @@ exports.TaskRunDetail = {
|
|
|
2324
2447
|
},
|
|
2325
2448
|
fromJSON(object) {
|
|
2326
2449
|
return {
|
|
2327
|
-
externalId: isSet(object.externalId)
|
|
2450
|
+
externalId: isSet(object.externalId)
|
|
2451
|
+
? globalThis.String(object.externalId)
|
|
2452
|
+
: isSet(object.external_id)
|
|
2453
|
+
? globalThis.String(object.external_id)
|
|
2454
|
+
: '',
|
|
2328
2455
|
status: isSet(object.status) ? runStatusFromJSON(object.status) : 0,
|
|
2329
2456
|
error: isSet(object.error) ? globalThis.String(object.error) : undefined,
|
|
2330
2457
|
output: isSet(object.output) ? bytesFromBase64(object.output) : undefined,
|
|
2331
|
-
readableId: isSet(object.readableId)
|
|
2332
|
-
|
|
2458
|
+
readableId: isSet(object.readableId)
|
|
2459
|
+
? globalThis.String(object.readableId)
|
|
2460
|
+
: isSet(object.readable_id)
|
|
2461
|
+
? globalThis.String(object.readable_id)
|
|
2462
|
+
: '',
|
|
2463
|
+
isEvicted: isSet(object.isEvicted)
|
|
2464
|
+
? globalThis.Boolean(object.isEvicted)
|
|
2465
|
+
: isSet(object.is_evicted)
|
|
2466
|
+
? globalThis.Boolean(object.is_evicted)
|
|
2467
|
+
: false,
|
|
2333
2468
|
};
|
|
2334
2469
|
},
|
|
2335
2470
|
toJSON(message) {
|
|
@@ -2387,7 +2522,7 @@ exports.GetRunDetailsResponse = {
|
|
|
2387
2522
|
if (message.status !== 0) {
|
|
2388
2523
|
writer.uint32(16).int32(message.status);
|
|
2389
2524
|
}
|
|
2390
|
-
Object.entries(message.taskRuns).forEach(([key, value]) => {
|
|
2525
|
+
globalThis.Object.entries(message.taskRuns).forEach(([key, value]) => {
|
|
2391
2526
|
exports.GetRunDetailsResponse_TaskRunsEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
|
|
2392
2527
|
});
|
|
2393
2528
|
if (message.done !== false) {
|
|
@@ -2466,16 +2601,27 @@ exports.GetRunDetailsResponse = {
|
|
|
2466
2601
|
input: isSet(object.input) ? bytesFromBase64(object.input) : new Uint8Array(0),
|
|
2467
2602
|
status: isSet(object.status) ? runStatusFromJSON(object.status) : 0,
|
|
2468
2603
|
taskRuns: isObject(object.taskRuns)
|
|
2469
|
-
? Object.entries(object.taskRuns).reduce((acc, [key, value]) => {
|
|
2604
|
+
? globalThis.Object.entries(object.taskRuns).reduce((acc, [key, value]) => {
|
|
2470
2605
|
acc[key] = exports.TaskRunDetail.fromJSON(value);
|
|
2471
2606
|
return acc;
|
|
2472
2607
|
}, {})
|
|
2473
|
-
:
|
|
2608
|
+
: isObject(object.task_runs)
|
|
2609
|
+
? globalThis.Object.entries(object.task_runs).reduce((acc, [key, value]) => {
|
|
2610
|
+
acc[key] = exports.TaskRunDetail.fromJSON(value);
|
|
2611
|
+
return acc;
|
|
2612
|
+
}, {})
|
|
2613
|
+
: {},
|
|
2474
2614
|
done: isSet(object.done) ? globalThis.Boolean(object.done) : false,
|
|
2475
|
-
isEvicted: isSet(object.isEvicted) ? globalThis.Boolean(object.isEvicted) : false,
|
|
2476
2615
|
additionalMetadata: isSet(object.additionalMetadata)
|
|
2477
2616
|
? bytesFromBase64(object.additionalMetadata)
|
|
2478
|
-
:
|
|
2617
|
+
: isSet(object.additional_metadata)
|
|
2618
|
+
? bytesFromBase64(object.additional_metadata)
|
|
2619
|
+
: new Uint8Array(0),
|
|
2620
|
+
isEvicted: isSet(object.isEvicted)
|
|
2621
|
+
? globalThis.Boolean(object.isEvicted)
|
|
2622
|
+
: isSet(object.is_evicted)
|
|
2623
|
+
? globalThis.Boolean(object.is_evicted)
|
|
2624
|
+
: false,
|
|
2479
2625
|
};
|
|
2480
2626
|
},
|
|
2481
2627
|
toJSON(message) {
|
|
@@ -2487,7 +2633,7 @@ exports.GetRunDetailsResponse = {
|
|
|
2487
2633
|
obj.status = runStatusToJSON(message.status);
|
|
2488
2634
|
}
|
|
2489
2635
|
if (message.taskRuns) {
|
|
2490
|
-
const entries = Object.entries(message.taskRuns);
|
|
2636
|
+
const entries = globalThis.Object.entries(message.taskRuns);
|
|
2491
2637
|
if (entries.length > 0) {
|
|
2492
2638
|
obj.taskRuns = {};
|
|
2493
2639
|
entries.forEach(([k, v]) => {
|
|
@@ -2498,12 +2644,12 @@ exports.GetRunDetailsResponse = {
|
|
|
2498
2644
|
if (message.done !== false) {
|
|
2499
2645
|
obj.done = message.done;
|
|
2500
2646
|
}
|
|
2501
|
-
if (message.isEvicted !== false) {
|
|
2502
|
-
obj.isEvicted = message.isEvicted;
|
|
2503
|
-
}
|
|
2504
2647
|
if (message.additionalMetadata.length !== 0) {
|
|
2505
2648
|
obj.additionalMetadata = base64FromBytes(message.additionalMetadata);
|
|
2506
2649
|
}
|
|
2650
|
+
if (message.isEvicted !== false) {
|
|
2651
|
+
obj.isEvicted = message.isEvicted;
|
|
2652
|
+
}
|
|
2507
2653
|
return obj;
|
|
2508
2654
|
},
|
|
2509
2655
|
create(base) {
|
|
@@ -2514,15 +2660,15 @@ exports.GetRunDetailsResponse = {
|
|
|
2514
2660
|
const message = createBaseGetRunDetailsResponse();
|
|
2515
2661
|
message.input = (_a = object.input) !== null && _a !== void 0 ? _a : new Uint8Array(0);
|
|
2516
2662
|
message.status = (_b = object.status) !== null && _b !== void 0 ? _b : 0;
|
|
2517
|
-
message.taskRuns = Object.entries((_c = object.taskRuns) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
2663
|
+
message.taskRuns = globalThis.Object.entries((_c = object.taskRuns) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
|
|
2518
2664
|
if (value !== undefined) {
|
|
2519
2665
|
acc[key] = exports.TaskRunDetail.fromPartial(value);
|
|
2520
2666
|
}
|
|
2521
2667
|
return acc;
|
|
2522
2668
|
}, {});
|
|
2523
2669
|
message.done = (_d = object.done) !== null && _d !== void 0 ? _d : false;
|
|
2524
|
-
message.
|
|
2525
|
-
message.
|
|
2670
|
+
message.additionalMetadata = (_e = object.additionalMetadata) !== null && _e !== void 0 ? _e : new Uint8Array(0);
|
|
2671
|
+
message.isEvicted = (_f = object.isEvicted) !== null && _f !== void 0 ? _f : false;
|
|
2526
2672
|
return message;
|
|
2527
2673
|
},
|
|
2528
2674
|
};
|