@hatchet-dev/typescript-sdk 1.16.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/README.md +14 -2
- package/clients/admin/admin-client.d.ts +2 -2
- package/clients/dispatcher/action-listener.d.ts +3 -6
- package/clients/dispatcher/action-listener.js +12 -17
- package/clients/listeners/durable-listener/durable-listener-client.d.ts +116 -15
- package/clients/listeners/durable-listener/durable-listener-client.js +770 -19
- package/clients/listeners/durable-listener/pooled-durable-listener-client.js +1 -14
- package/clients/listeners/run-listener/pooled-child-listener-client.js +1 -14
- package/clients/rest/generated/Api.d.ts +5 -1
- package/clients/rest/generated/data-contracts.d.ts +16 -2
- package/clients/rest/generated/data-contracts.js +7 -3
- package/legacy/examples/affinity-workers.js +2 -2
- package/legacy/legacy-client.js +1 -1
- package/legacy/step.d.ts +2 -2
- package/legacy/step.js +3 -2
- package/legacy/workflow.d.ts +25 -25
- package/package.json +1 -1
- package/protoc/dispatcher/dispatcher.d.ts +20 -0
- package/protoc/dispatcher/dispatcher.js +535 -100
- package/protoc/events/events.js +54 -14
- package/protoc/google/protobuf/timestamp.js +1 -1
- package/protoc/v1/dispatcher.d.ts +169 -0
- package/protoc/v1/dispatcher.js +2096 -8
- package/protoc/v1/shared/condition.js +37 -11
- package/protoc/v1/shared/trigger.d.ts +89 -0
- package/protoc/v1/shared/trigger.js +524 -0
- package/protoc/v1/workflows.d.ts +34 -34
- package/protoc/v1/workflows.js +452 -254
- package/protoc/workflows/workflows.d.ts +2 -75
- package/protoc/workflows/workflows.js +157 -529
- package/util/abort-error.d.ts +10 -0
- package/util/abort-error.js +15 -0
- package/util/errors/eviction-not-supported-error.d.ts +5 -0
- package/util/errors/eviction-not-supported-error.js +18 -0
- package/util/errors/non-determinism-error.d.ts +7 -0
- package/util/errors/non-determinism-error.js +21 -0
- package/util/errors/task-run-terminated-error.d.ts +6 -0
- package/util/errors/task-run-terminated-error.js +15 -0
- package/util/hatchet-promise/hatchet-promise.d.ts +2 -1
- package/util/hatchet-promise/hatchet-promise.js +10 -1
- package/util/sleep.d.ts +3 -2
- package/util/sleep.js +6 -4
- package/v1/client/admin.d.ts +2 -2
- package/v1/client/client.js +1 -1
- package/v1/client/duration.d.ts +11 -1
- package/v1/client/duration.js +44 -0
- package/v1/client/features/runs.d.ts +16 -3
- package/v1/client/features/runs.js +38 -3
- package/v1/client/worker/context.d.ts +101 -6
- package/v1/client/worker/context.js +247 -21
- package/v1/client/worker/deprecated/index.d.ts +1 -1
- package/v1/client/worker/deprecated/index.js +2 -1
- package/v1/client/worker/deprecated/legacy-worker.d.ts +5 -0
- package/v1/client/worker/deprecated/legacy-worker.js +32 -23
- package/v1/client/worker/deprecated/pre-eviction.d.ts +12 -0
- package/v1/client/worker/deprecated/pre-eviction.js +37 -0
- package/v1/client/worker/engine-version.d.ts +5 -0
- package/v1/client/worker/engine-version.js +14 -0
- package/v1/client/worker/eviction/eviction-cache.d.ts +33 -0
- package/v1/client/worker/eviction/eviction-cache.js +139 -0
- package/v1/client/worker/eviction/eviction-manager.d.ts +42 -0
- package/v1/client/worker/eviction/eviction-manager.js +132 -0
- package/v1/client/worker/eviction/eviction-policy.d.ts +19 -0
- package/v1/client/worker/eviction/eviction-policy.js +8 -0
- package/v1/client/worker/eviction/index.d.ts +3 -0
- package/v1/client/worker/eviction/index.js +11 -0
- package/v1/client/worker/worker-internal.d.ts +23 -4
- package/v1/client/worker/worker-internal.js +177 -138
- package/v1/client/worker/worker.d.ts +1 -0
- package/v1/client/worker/worker.js +34 -1
- package/v1/conditions/sleep-condition.js +2 -1
- package/v1/conditions/transformer.js +2 -1
- package/v1/declaration.d.ts +5 -3
- package/v1/declaration.js +8 -0
- package/v1/examples/__e2e__/harness.d.ts +5 -0
- package/v1/examples/__e2e__/harness.js +13 -0
- package/v1/examples/concurrency_workflow_level/workflow.d.ts +1 -1
- package/v1/examples/concurrency_workflow_level/workflow.js +1 -1
- package/v1/examples/durable/workflow.d.ts +57 -0
- package/v1/examples/durable/workflow.js +162 -7
- package/v1/examples/durable-event/workflow.js +2 -7
- package/v1/examples/durable_event/workflow.d.ts +1 -0
- package/v1/examples/durable_event/workflow.js +4 -9
- package/v1/examples/durable_eviction/capacity-worker.d.ts +1 -0
- package/v1/examples/durable_eviction/capacity-worker.js +31 -0
- package/v1/examples/durable_eviction/worker.d.ts +1 -0
- package/v1/examples/durable_eviction/worker.js +34 -0
- package/v1/examples/durable_eviction/workflow.d.ts +44 -0
- package/v1/examples/durable_eviction/workflow.js +129 -0
- package/v1/examples/e2e-worker.js +42 -19
- package/v1/index.d.ts +5 -0
- package/v1/index.js +10 -0
- package/v1/parent-run-context-vars.d.ts +6 -0
- package/v1/task.d.ts +10 -2
- package/v1/task.js +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,24 +1,23 @@
|
|
|
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: workflows/workflows.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.WorkflowServiceDefinition = exports.PutRateLimitResponse = exports.PutRateLimitRequest = exports.TriggerWorkflowResponse = exports.
|
|
8
|
+
exports.WorkflowServiceDefinition = exports.PutRateLimitResponse = exports.PutRateLimitRequest = exports.TriggerWorkflowResponse = exports.BulkTriggerWorkflowResponse = exports.BulkTriggerWorkflowRequest = exports.WorkflowTriggerCronRef = exports.WorkflowTriggerEventRef = exports.WorkflowVersion = exports.ScheduledWorkflow = exports.ScheduleWorkflowRequest = exports.ListWorkflowsRequest = exports.CreateStepRateLimit = exports.CreateWorkflowStepOpts_WorkerLabelsEntry = exports.CreateWorkflowStepOpts = exports.CreateWorkflowJobOpts = exports.WorkflowConcurrencyOpts = exports.CreateWorkflowVersionOpts = exports.PutWorkflowRequest = exports.RateLimitDuration = exports.ConcurrencyLimitStrategy = exports.WorkflowKind = exports.StickyStrategy = exports.protobufPackage = void 0;
|
|
9
9
|
exports.stickyStrategyFromJSON = stickyStrategyFromJSON;
|
|
10
10
|
exports.stickyStrategyToJSON = stickyStrategyToJSON;
|
|
11
11
|
exports.workflowKindFromJSON = workflowKindFromJSON;
|
|
12
12
|
exports.workflowKindToJSON = workflowKindToJSON;
|
|
13
13
|
exports.concurrencyLimitStrategyFromJSON = concurrencyLimitStrategyFromJSON;
|
|
14
14
|
exports.concurrencyLimitStrategyToJSON = concurrencyLimitStrategyToJSON;
|
|
15
|
-
exports.workerLabelComparatorFromJSON = workerLabelComparatorFromJSON;
|
|
16
|
-
exports.workerLabelComparatorToJSON = workerLabelComparatorToJSON;
|
|
17
15
|
exports.rateLimitDurationFromJSON = rateLimitDurationFromJSON;
|
|
18
16
|
exports.rateLimitDurationToJSON = rateLimitDurationToJSON;
|
|
19
17
|
/* eslint-disable */
|
|
20
18
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
21
19
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
20
|
+
const trigger_1 = require("../v1/shared/trigger");
|
|
22
21
|
exports.protobufPackage = '';
|
|
23
22
|
var StickyStrategy;
|
|
24
23
|
(function (StickyStrategy) {
|
|
@@ -139,61 +138,6 @@ function concurrencyLimitStrategyToJSON(object) {
|
|
|
139
138
|
return 'UNRECOGNIZED';
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
|
-
var WorkerLabelComparator;
|
|
143
|
-
(function (WorkerLabelComparator) {
|
|
144
|
-
WorkerLabelComparator[WorkerLabelComparator["EQUAL"] = 0] = "EQUAL";
|
|
145
|
-
WorkerLabelComparator[WorkerLabelComparator["NOT_EQUAL"] = 1] = "NOT_EQUAL";
|
|
146
|
-
WorkerLabelComparator[WorkerLabelComparator["GREATER_THAN"] = 2] = "GREATER_THAN";
|
|
147
|
-
WorkerLabelComparator[WorkerLabelComparator["GREATER_THAN_OR_EQUAL"] = 3] = "GREATER_THAN_OR_EQUAL";
|
|
148
|
-
WorkerLabelComparator[WorkerLabelComparator["LESS_THAN"] = 4] = "LESS_THAN";
|
|
149
|
-
WorkerLabelComparator[WorkerLabelComparator["LESS_THAN_OR_EQUAL"] = 5] = "LESS_THAN_OR_EQUAL";
|
|
150
|
-
WorkerLabelComparator[WorkerLabelComparator["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
151
|
-
})(WorkerLabelComparator || (exports.WorkerLabelComparator = WorkerLabelComparator = {}));
|
|
152
|
-
function workerLabelComparatorFromJSON(object) {
|
|
153
|
-
switch (object) {
|
|
154
|
-
case 0:
|
|
155
|
-
case 'EQUAL':
|
|
156
|
-
return WorkerLabelComparator.EQUAL;
|
|
157
|
-
case 1:
|
|
158
|
-
case 'NOT_EQUAL':
|
|
159
|
-
return WorkerLabelComparator.NOT_EQUAL;
|
|
160
|
-
case 2:
|
|
161
|
-
case 'GREATER_THAN':
|
|
162
|
-
return WorkerLabelComparator.GREATER_THAN;
|
|
163
|
-
case 3:
|
|
164
|
-
case 'GREATER_THAN_OR_EQUAL':
|
|
165
|
-
return WorkerLabelComparator.GREATER_THAN_OR_EQUAL;
|
|
166
|
-
case 4:
|
|
167
|
-
case 'LESS_THAN':
|
|
168
|
-
return WorkerLabelComparator.LESS_THAN;
|
|
169
|
-
case 5:
|
|
170
|
-
case 'LESS_THAN_OR_EQUAL':
|
|
171
|
-
return WorkerLabelComparator.LESS_THAN_OR_EQUAL;
|
|
172
|
-
case -1:
|
|
173
|
-
case 'UNRECOGNIZED':
|
|
174
|
-
default:
|
|
175
|
-
return WorkerLabelComparator.UNRECOGNIZED;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function workerLabelComparatorToJSON(object) {
|
|
179
|
-
switch (object) {
|
|
180
|
-
case WorkerLabelComparator.EQUAL:
|
|
181
|
-
return 'EQUAL';
|
|
182
|
-
case WorkerLabelComparator.NOT_EQUAL:
|
|
183
|
-
return 'NOT_EQUAL';
|
|
184
|
-
case WorkerLabelComparator.GREATER_THAN:
|
|
185
|
-
return 'GREATER_THAN';
|
|
186
|
-
case WorkerLabelComparator.GREATER_THAN_OR_EQUAL:
|
|
187
|
-
return 'GREATER_THAN_OR_EQUAL';
|
|
188
|
-
case WorkerLabelComparator.LESS_THAN:
|
|
189
|
-
return 'LESS_THAN';
|
|
190
|
-
case WorkerLabelComparator.LESS_THAN_OR_EQUAL:
|
|
191
|
-
return 'LESS_THAN_OR_EQUAL';
|
|
192
|
-
case WorkerLabelComparator.UNRECOGNIZED:
|
|
193
|
-
default:
|
|
194
|
-
return 'UNRECOGNIZED';
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
141
|
var RateLimitDuration;
|
|
198
142
|
(function (RateLimitDuration) {
|
|
199
143
|
RateLimitDuration[RateLimitDuration["SECOND"] = 0] = "SECOND";
|
|
@@ -495,13 +439,19 @@ exports.CreateWorkflowVersionOpts = {
|
|
|
495
439
|
version: isSet(object.version) ? globalThis.String(object.version) : '',
|
|
496
440
|
eventTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.eventTriggers)
|
|
497
441
|
? object.eventTriggers.map((e) => globalThis.String(e))
|
|
498
|
-
:
|
|
442
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.event_triggers)
|
|
443
|
+
? object.event_triggers.map((e) => globalThis.String(e))
|
|
444
|
+
: [],
|
|
499
445
|
cronTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cronTriggers)
|
|
500
446
|
? object.cronTriggers.map((e) => globalThis.String(e))
|
|
501
|
-
:
|
|
447
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.cron_triggers)
|
|
448
|
+
? object.cron_triggers.map((e) => globalThis.String(e))
|
|
449
|
+
: [],
|
|
502
450
|
scheduledTriggers: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.scheduledTriggers)
|
|
503
451
|
? object.scheduledTriggers.map((e) => fromJsonTimestamp(e))
|
|
504
|
-
:
|
|
452
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.scheduled_triggers)
|
|
453
|
+
? object.scheduled_triggers.map((e) => fromJsonTimestamp(e))
|
|
454
|
+
: [],
|
|
505
455
|
jobs: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.jobs)
|
|
506
456
|
? object.jobs.map((e) => exports.CreateWorkflowJobOpts.fromJSON(e))
|
|
507
457
|
: [],
|
|
@@ -510,16 +460,26 @@ exports.CreateWorkflowVersionOpts = {
|
|
|
510
460
|
: undefined,
|
|
511
461
|
scheduleTimeout: isSet(object.scheduleTimeout)
|
|
512
462
|
? globalThis.String(object.scheduleTimeout)
|
|
513
|
-
:
|
|
514
|
-
|
|
463
|
+
: isSet(object.schedule_timeout)
|
|
464
|
+
? globalThis.String(object.schedule_timeout)
|
|
465
|
+
: undefined,
|
|
466
|
+
cronInput: isSet(object.cronInput)
|
|
467
|
+
? globalThis.String(object.cronInput)
|
|
468
|
+
: isSet(object.cron_input)
|
|
469
|
+
? globalThis.String(object.cron_input)
|
|
470
|
+
: undefined,
|
|
515
471
|
onFailureJob: isSet(object.onFailureJob)
|
|
516
472
|
? exports.CreateWorkflowJobOpts.fromJSON(object.onFailureJob)
|
|
517
|
-
:
|
|
473
|
+
: isSet(object.on_failure_job)
|
|
474
|
+
? exports.CreateWorkflowJobOpts.fromJSON(object.on_failure_job)
|
|
475
|
+
: undefined,
|
|
518
476
|
sticky: isSet(object.sticky) ? stickyStrategyFromJSON(object.sticky) : undefined,
|
|
519
477
|
kind: isSet(object.kind) ? workflowKindFromJSON(object.kind) : undefined,
|
|
520
478
|
defaultPriority: isSet(object.defaultPriority)
|
|
521
479
|
? globalThis.Number(object.defaultPriority)
|
|
522
|
-
:
|
|
480
|
+
: isSet(object.default_priority)
|
|
481
|
+
? globalThis.Number(object.default_priority)
|
|
482
|
+
: undefined,
|
|
523
483
|
};
|
|
524
484
|
},
|
|
525
485
|
toJSON(message) {
|
|
@@ -663,10 +623,16 @@ exports.WorkflowConcurrencyOpts = {
|
|
|
663
623
|
fromJSON(object) {
|
|
664
624
|
return {
|
|
665
625
|
action: isSet(object.action) ? globalThis.String(object.action) : undefined,
|
|
666
|
-
maxRuns: isSet(object.maxRuns)
|
|
626
|
+
maxRuns: isSet(object.maxRuns)
|
|
627
|
+
? globalThis.Number(object.maxRuns)
|
|
628
|
+
: isSet(object.max_runs)
|
|
629
|
+
? globalThis.Number(object.max_runs)
|
|
630
|
+
: undefined,
|
|
667
631
|
limitStrategy: isSet(object.limitStrategy)
|
|
668
632
|
? concurrencyLimitStrategyFromJSON(object.limitStrategy)
|
|
669
|
-
:
|
|
633
|
+
: isSet(object.limit_strategy)
|
|
634
|
+
? concurrencyLimitStrategyFromJSON(object.limit_strategy)
|
|
635
|
+
: undefined,
|
|
670
636
|
expression: isSet(object.expression) ? globalThis.String(object.expression) : undefined,
|
|
671
637
|
};
|
|
672
638
|
},
|
|
@@ -786,128 +752,6 @@ exports.CreateWorkflowJobOpts = {
|
|
|
786
752
|
return message;
|
|
787
753
|
},
|
|
788
754
|
};
|
|
789
|
-
function createBaseDesiredWorkerLabels() {
|
|
790
|
-
return {
|
|
791
|
-
strValue: undefined,
|
|
792
|
-
intValue: undefined,
|
|
793
|
-
required: undefined,
|
|
794
|
-
comparator: undefined,
|
|
795
|
-
weight: undefined,
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
exports.DesiredWorkerLabels = {
|
|
799
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
800
|
-
if (message.strValue !== undefined) {
|
|
801
|
-
writer.uint32(10).string(message.strValue);
|
|
802
|
-
}
|
|
803
|
-
if (message.intValue !== undefined) {
|
|
804
|
-
writer.uint32(16).int32(message.intValue);
|
|
805
|
-
}
|
|
806
|
-
if (message.required !== undefined) {
|
|
807
|
-
writer.uint32(24).bool(message.required);
|
|
808
|
-
}
|
|
809
|
-
if (message.comparator !== undefined) {
|
|
810
|
-
writer.uint32(32).int32(message.comparator);
|
|
811
|
-
}
|
|
812
|
-
if (message.weight !== undefined) {
|
|
813
|
-
writer.uint32(40).int32(message.weight);
|
|
814
|
-
}
|
|
815
|
-
return writer;
|
|
816
|
-
},
|
|
817
|
-
decode(input, length) {
|
|
818
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
819
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
820
|
-
const message = createBaseDesiredWorkerLabels();
|
|
821
|
-
while (reader.pos < end) {
|
|
822
|
-
const tag = reader.uint32();
|
|
823
|
-
switch (tag >>> 3) {
|
|
824
|
-
case 1: {
|
|
825
|
-
if (tag !== 10) {
|
|
826
|
-
break;
|
|
827
|
-
}
|
|
828
|
-
message.strValue = reader.string();
|
|
829
|
-
continue;
|
|
830
|
-
}
|
|
831
|
-
case 2: {
|
|
832
|
-
if (tag !== 16) {
|
|
833
|
-
break;
|
|
834
|
-
}
|
|
835
|
-
message.intValue = reader.int32();
|
|
836
|
-
continue;
|
|
837
|
-
}
|
|
838
|
-
case 3: {
|
|
839
|
-
if (tag !== 24) {
|
|
840
|
-
break;
|
|
841
|
-
}
|
|
842
|
-
message.required = reader.bool();
|
|
843
|
-
continue;
|
|
844
|
-
}
|
|
845
|
-
case 4: {
|
|
846
|
-
if (tag !== 32) {
|
|
847
|
-
break;
|
|
848
|
-
}
|
|
849
|
-
message.comparator = reader.int32();
|
|
850
|
-
continue;
|
|
851
|
-
}
|
|
852
|
-
case 5: {
|
|
853
|
-
if (tag !== 40) {
|
|
854
|
-
break;
|
|
855
|
-
}
|
|
856
|
-
message.weight = reader.int32();
|
|
857
|
-
continue;
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
861
|
-
break;
|
|
862
|
-
}
|
|
863
|
-
reader.skip(tag & 7);
|
|
864
|
-
}
|
|
865
|
-
return message;
|
|
866
|
-
},
|
|
867
|
-
fromJSON(object) {
|
|
868
|
-
return {
|
|
869
|
-
strValue: isSet(object.strValue) ? globalThis.String(object.strValue) : undefined,
|
|
870
|
-
intValue: isSet(object.intValue) ? globalThis.Number(object.intValue) : undefined,
|
|
871
|
-
required: isSet(object.required) ? globalThis.Boolean(object.required) : undefined,
|
|
872
|
-
comparator: isSet(object.comparator)
|
|
873
|
-
? workerLabelComparatorFromJSON(object.comparator)
|
|
874
|
-
: undefined,
|
|
875
|
-
weight: isSet(object.weight) ? globalThis.Number(object.weight) : undefined,
|
|
876
|
-
};
|
|
877
|
-
},
|
|
878
|
-
toJSON(message) {
|
|
879
|
-
const obj = {};
|
|
880
|
-
if (message.strValue !== undefined) {
|
|
881
|
-
obj.strValue = message.strValue;
|
|
882
|
-
}
|
|
883
|
-
if (message.intValue !== undefined) {
|
|
884
|
-
obj.intValue = Math.round(message.intValue);
|
|
885
|
-
}
|
|
886
|
-
if (message.required !== undefined) {
|
|
887
|
-
obj.required = message.required;
|
|
888
|
-
}
|
|
889
|
-
if (message.comparator !== undefined) {
|
|
890
|
-
obj.comparator = workerLabelComparatorToJSON(message.comparator);
|
|
891
|
-
}
|
|
892
|
-
if (message.weight !== undefined) {
|
|
893
|
-
obj.weight = Math.round(message.weight);
|
|
894
|
-
}
|
|
895
|
-
return obj;
|
|
896
|
-
},
|
|
897
|
-
create(base) {
|
|
898
|
-
return exports.DesiredWorkerLabels.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
899
|
-
},
|
|
900
|
-
fromPartial(object) {
|
|
901
|
-
var _a, _b, _c, _d, _e;
|
|
902
|
-
const message = createBaseDesiredWorkerLabels();
|
|
903
|
-
message.strValue = (_a = object.strValue) !== null && _a !== void 0 ? _a : undefined;
|
|
904
|
-
message.intValue = (_b = object.intValue) !== null && _b !== void 0 ? _b : undefined;
|
|
905
|
-
message.required = (_c = object.required) !== null && _c !== void 0 ? _c : undefined;
|
|
906
|
-
message.comparator = (_d = object.comparator) !== null && _d !== void 0 ? _d : undefined;
|
|
907
|
-
message.weight = (_e = object.weight) !== null && _e !== void 0 ? _e : undefined;
|
|
908
|
-
return message;
|
|
909
|
-
},
|
|
910
|
-
};
|
|
911
755
|
function createBaseCreateWorkflowStepOpts() {
|
|
912
756
|
return {
|
|
913
757
|
readableId: '',
|
|
@@ -949,7 +793,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
949
793
|
for (const v of message.rateLimits) {
|
|
950
794
|
exports.CreateStepRateLimit.encode(v, writer.uint32(66).fork()).join();
|
|
951
795
|
}
|
|
952
|
-
Object.entries(message.workerLabels).forEach(([key, value]) => {
|
|
796
|
+
globalThis.Object.entries(message.workerLabels).forEach(([key, value]) => {
|
|
953
797
|
exports.CreateWorkflowStepOpts_WorkerLabelsEntry.encode({ key: key, value }, writer.uint32(74).fork()).join();
|
|
954
798
|
});
|
|
955
799
|
if (message.backoffFactor !== undefined) {
|
|
@@ -1057,30 +901,49 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1057
901
|
},
|
|
1058
902
|
fromJSON(object) {
|
|
1059
903
|
return {
|
|
1060
|
-
readableId: isSet(object.readableId)
|
|
904
|
+
readableId: isSet(object.readableId)
|
|
905
|
+
? globalThis.String(object.readableId)
|
|
906
|
+
: isSet(object.readable_id)
|
|
907
|
+
? globalThis.String(object.readable_id)
|
|
908
|
+
: '',
|
|
1061
909
|
action: isSet(object.action) ? globalThis.String(object.action) : '',
|
|
1062
910
|
timeout: isSet(object.timeout) ? globalThis.String(object.timeout) : '',
|
|
1063
911
|
inputs: isSet(object.inputs) ? globalThis.String(object.inputs) : '',
|
|
1064
912
|
parents: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.parents)
|
|
1065
913
|
? object.parents.map((e) => globalThis.String(e))
|
|
1066
914
|
: [],
|
|
1067
|
-
userData: isSet(object.userData)
|
|
915
|
+
userData: isSet(object.userData)
|
|
916
|
+
? globalThis.String(object.userData)
|
|
917
|
+
: isSet(object.user_data)
|
|
918
|
+
? globalThis.String(object.user_data)
|
|
919
|
+
: '',
|
|
1068
920
|
retries: isSet(object.retries) ? globalThis.Number(object.retries) : 0,
|
|
1069
921
|
rateLimits: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rateLimits)
|
|
1070
922
|
? object.rateLimits.map((e) => exports.CreateStepRateLimit.fromJSON(e))
|
|
1071
|
-
:
|
|
923
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.rate_limits)
|
|
924
|
+
? object.rate_limits.map((e) => exports.CreateStepRateLimit.fromJSON(e))
|
|
925
|
+
: [],
|
|
1072
926
|
workerLabels: isObject(object.workerLabels)
|
|
1073
|
-
? Object.entries(object.workerLabels).reduce((acc, [key, value]) => {
|
|
1074
|
-
acc[key] =
|
|
927
|
+
? globalThis.Object.entries(object.workerLabels).reduce((acc, [key, value]) => {
|
|
928
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
1075
929
|
return acc;
|
|
1076
930
|
}, {})
|
|
1077
|
-
:
|
|
931
|
+
: isObject(object.worker_labels)
|
|
932
|
+
? globalThis.Object.entries(object.worker_labels).reduce((acc, [key, value]) => {
|
|
933
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
934
|
+
return acc;
|
|
935
|
+
}, {})
|
|
936
|
+
: {},
|
|
1078
937
|
backoffFactor: isSet(object.backoffFactor)
|
|
1079
938
|
? globalThis.Number(object.backoffFactor)
|
|
1080
|
-
:
|
|
939
|
+
: isSet(object.backoff_factor)
|
|
940
|
+
? globalThis.Number(object.backoff_factor)
|
|
941
|
+
: undefined,
|
|
1081
942
|
backoffMaxSeconds: isSet(object.backoffMaxSeconds)
|
|
1082
943
|
? globalThis.Number(object.backoffMaxSeconds)
|
|
1083
|
-
:
|
|
944
|
+
: isSet(object.backoff_max_seconds)
|
|
945
|
+
? globalThis.Number(object.backoff_max_seconds)
|
|
946
|
+
: undefined,
|
|
1084
947
|
};
|
|
1085
948
|
},
|
|
1086
949
|
toJSON(message) {
|
|
@@ -1111,11 +974,11 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1111
974
|
obj.rateLimits = message.rateLimits.map((e) => exports.CreateStepRateLimit.toJSON(e));
|
|
1112
975
|
}
|
|
1113
976
|
if (message.workerLabels) {
|
|
1114
|
-
const entries = Object.entries(message.workerLabels);
|
|
977
|
+
const entries = globalThis.Object.entries(message.workerLabels);
|
|
1115
978
|
if (entries.length > 0) {
|
|
1116
979
|
obj.workerLabels = {};
|
|
1117
980
|
entries.forEach(([k, v]) => {
|
|
1118
|
-
obj.workerLabels[k] =
|
|
981
|
+
obj.workerLabels[k] = trigger_1.DesiredWorkerLabels.toJSON(v);
|
|
1119
982
|
});
|
|
1120
983
|
}
|
|
1121
984
|
}
|
|
@@ -1141,9 +1004,9 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1141
1004
|
message.userData = (_f = object.userData) !== null && _f !== void 0 ? _f : '';
|
|
1142
1005
|
message.retries = (_g = object.retries) !== null && _g !== void 0 ? _g : 0;
|
|
1143
1006
|
message.rateLimits = ((_h = object.rateLimits) === null || _h === void 0 ? void 0 : _h.map((e) => exports.CreateStepRateLimit.fromPartial(e))) || [];
|
|
1144
|
-
message.workerLabels = Object.entries((_j = object.workerLabels) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
|
|
1007
|
+
message.workerLabels = globalThis.Object.entries((_j = object.workerLabels) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
|
|
1145
1008
|
if (value !== undefined) {
|
|
1146
|
-
acc[key] =
|
|
1009
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromPartial(value);
|
|
1147
1010
|
}
|
|
1148
1011
|
return acc;
|
|
1149
1012
|
}, {});
|
|
@@ -1161,7 +1024,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1161
1024
|
writer.uint32(10).string(message.key);
|
|
1162
1025
|
}
|
|
1163
1026
|
if (message.value !== undefined) {
|
|
1164
|
-
|
|
1027
|
+
trigger_1.DesiredWorkerLabels.encode(message.value, writer.uint32(18).fork()).join();
|
|
1165
1028
|
}
|
|
1166
1029
|
return writer;
|
|
1167
1030
|
},
|
|
@@ -1183,7 +1046,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1183
1046
|
if (tag !== 18) {
|
|
1184
1047
|
break;
|
|
1185
1048
|
}
|
|
1186
|
-
message.value =
|
|
1049
|
+
message.value = trigger_1.DesiredWorkerLabels.decode(reader, reader.uint32());
|
|
1187
1050
|
continue;
|
|
1188
1051
|
}
|
|
1189
1052
|
}
|
|
@@ -1197,7 +1060,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1197
1060
|
fromJSON(object) {
|
|
1198
1061
|
return {
|
|
1199
1062
|
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
1200
|
-
value: isSet(object.value) ?
|
|
1063
|
+
value: isSet(object.value) ? trigger_1.DesiredWorkerLabels.fromJSON(object.value) : undefined,
|
|
1201
1064
|
};
|
|
1202
1065
|
},
|
|
1203
1066
|
toJSON(message) {
|
|
@@ -1206,7 +1069,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1206
1069
|
obj.key = message.key;
|
|
1207
1070
|
}
|
|
1208
1071
|
if (message.value !== undefined) {
|
|
1209
|
-
obj.value =
|
|
1072
|
+
obj.value = trigger_1.DesiredWorkerLabels.toJSON(message.value);
|
|
1210
1073
|
}
|
|
1211
1074
|
return obj;
|
|
1212
1075
|
},
|
|
@@ -1219,7 +1082,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1219
1082
|
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : '';
|
|
1220
1083
|
message.value =
|
|
1221
1084
|
object.value !== undefined && object.value !== null
|
|
1222
|
-
?
|
|
1085
|
+
? trigger_1.DesiredWorkerLabels.fromPartial(object.value)
|
|
1223
1086
|
: undefined;
|
|
1224
1087
|
return message;
|
|
1225
1088
|
},
|
|
@@ -1317,11 +1180,21 @@ exports.CreateStepRateLimit = {
|
|
|
1317
1180
|
return {
|
|
1318
1181
|
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
1319
1182
|
units: isSet(object.units) ? globalThis.Number(object.units) : undefined,
|
|
1320
|
-
keyExpr: isSet(object.keyExpr)
|
|
1321
|
-
|
|
1183
|
+
keyExpr: isSet(object.keyExpr)
|
|
1184
|
+
? globalThis.String(object.keyExpr)
|
|
1185
|
+
: isSet(object.key_expr)
|
|
1186
|
+
? globalThis.String(object.key_expr)
|
|
1187
|
+
: undefined,
|
|
1188
|
+
unitsExpr: isSet(object.unitsExpr)
|
|
1189
|
+
? globalThis.String(object.unitsExpr)
|
|
1190
|
+
: isSet(object.units_expr)
|
|
1191
|
+
? globalThis.String(object.units_expr)
|
|
1192
|
+
: undefined,
|
|
1322
1193
|
limitValuesExpr: isSet(object.limitValuesExpr)
|
|
1323
1194
|
? globalThis.String(object.limitValuesExpr)
|
|
1324
|
-
:
|
|
1195
|
+
: isSet(object.limit_values_expr)
|
|
1196
|
+
? globalThis.String(object.limit_values_expr)
|
|
1197
|
+
: undefined,
|
|
1325
1198
|
duration: isSet(object.duration) ? rateLimitDurationFromJSON(object.duration) : undefined,
|
|
1326
1199
|
};
|
|
1327
1200
|
},
|
|
@@ -1528,15 +1401,31 @@ exports.ScheduleWorkflowRequest = {
|
|
|
1528
1401
|
? object.schedules.map((e) => fromJsonTimestamp(e))
|
|
1529
1402
|
: [],
|
|
1530
1403
|
input: isSet(object.input) ? globalThis.String(object.input) : '',
|
|
1531
|
-
parentId: isSet(object.parentId)
|
|
1404
|
+
parentId: isSet(object.parentId)
|
|
1405
|
+
? globalThis.String(object.parentId)
|
|
1406
|
+
: isSet(object.parent_id)
|
|
1407
|
+
? globalThis.String(object.parent_id)
|
|
1408
|
+
: undefined,
|
|
1532
1409
|
parentTaskRunExternalId: isSet(object.parentTaskRunExternalId)
|
|
1533
1410
|
? globalThis.String(object.parentTaskRunExternalId)
|
|
1534
|
-
:
|
|
1535
|
-
|
|
1536
|
-
|
|
1411
|
+
: isSet(object.parent_task_run_external_id)
|
|
1412
|
+
? globalThis.String(object.parent_task_run_external_id)
|
|
1413
|
+
: undefined,
|
|
1414
|
+
childIndex: isSet(object.childIndex)
|
|
1415
|
+
? globalThis.Number(object.childIndex)
|
|
1416
|
+
: isSet(object.child_index)
|
|
1417
|
+
? globalThis.Number(object.child_index)
|
|
1418
|
+
: undefined,
|
|
1419
|
+
childKey: isSet(object.childKey)
|
|
1420
|
+
? globalThis.String(object.childKey)
|
|
1421
|
+
: isSet(object.child_key)
|
|
1422
|
+
? globalThis.String(object.child_key)
|
|
1423
|
+
: undefined,
|
|
1537
1424
|
additionalMetadata: isSet(object.additionalMetadata)
|
|
1538
1425
|
? globalThis.String(object.additionalMetadata)
|
|
1539
|
-
:
|
|
1426
|
+
: isSet(object.additional_metadata)
|
|
1427
|
+
? globalThis.String(object.additional_metadata)
|
|
1428
|
+
: undefined,
|
|
1540
1429
|
priority: isSet(object.priority) ? globalThis.Number(object.priority) : undefined,
|
|
1541
1430
|
};
|
|
1542
1431
|
},
|
|
@@ -1635,7 +1524,11 @@ exports.ScheduledWorkflow = {
|
|
|
1635
1524
|
fromJSON(object) {
|
|
1636
1525
|
return {
|
|
1637
1526
|
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
1638
|
-
triggerAt: isSet(object.triggerAt)
|
|
1527
|
+
triggerAt: isSet(object.triggerAt)
|
|
1528
|
+
? fromJsonTimestamp(object.triggerAt)
|
|
1529
|
+
: isSet(object.trigger_at)
|
|
1530
|
+
? fromJsonTimestamp(object.trigger_at)
|
|
1531
|
+
: undefined,
|
|
1639
1532
|
};
|
|
1640
1533
|
},
|
|
1641
1534
|
toJSON(message) {
|
|
@@ -1762,14 +1655,28 @@ exports.WorkflowVersion = {
|
|
|
1762
1655
|
fromJSON(object) {
|
|
1763
1656
|
return {
|
|
1764
1657
|
id: isSet(object.id) ? globalThis.String(object.id) : '',
|
|
1765
|
-
createdAt: isSet(object.createdAt)
|
|
1766
|
-
|
|
1658
|
+
createdAt: isSet(object.createdAt)
|
|
1659
|
+
? fromJsonTimestamp(object.createdAt)
|
|
1660
|
+
: isSet(object.created_at)
|
|
1661
|
+
? fromJsonTimestamp(object.created_at)
|
|
1662
|
+
: undefined,
|
|
1663
|
+
updatedAt: isSet(object.updatedAt)
|
|
1664
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
1665
|
+
: isSet(object.updated_at)
|
|
1666
|
+
? fromJsonTimestamp(object.updated_at)
|
|
1667
|
+
: undefined,
|
|
1767
1668
|
version: isSet(object.version) ? globalThis.String(object.version) : '',
|
|
1768
1669
|
order: isSet(object.order) ? globalThis.Number(object.order) : 0,
|
|
1769
|
-
workflowId: isSet(object.workflowId)
|
|
1670
|
+
workflowId: isSet(object.workflowId)
|
|
1671
|
+
? globalThis.String(object.workflowId)
|
|
1672
|
+
: isSet(object.workflow_id)
|
|
1673
|
+
? globalThis.String(object.workflow_id)
|
|
1674
|
+
: '',
|
|
1770
1675
|
scheduledWorkflows: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.scheduledWorkflows)
|
|
1771
1676
|
? object.scheduledWorkflows.map((e) => exports.ScheduledWorkflow.fromJSON(e))
|
|
1772
|
-
:
|
|
1677
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.scheduled_workflows)
|
|
1678
|
+
? object.scheduled_workflows.map((e) => exports.ScheduledWorkflow.fromJSON(e))
|
|
1679
|
+
: [],
|
|
1773
1680
|
};
|
|
1774
1681
|
},
|
|
1775
1682
|
toJSON(message) {
|
|
@@ -1859,8 +1766,16 @@ exports.WorkflowTriggerEventRef = {
|
|
|
1859
1766
|
},
|
|
1860
1767
|
fromJSON(object) {
|
|
1861
1768
|
return {
|
|
1862
|
-
parentId: isSet(object.parentId)
|
|
1863
|
-
|
|
1769
|
+
parentId: isSet(object.parentId)
|
|
1770
|
+
? globalThis.String(object.parentId)
|
|
1771
|
+
: isSet(object.parent_id)
|
|
1772
|
+
? globalThis.String(object.parent_id)
|
|
1773
|
+
: '',
|
|
1774
|
+
eventKey: isSet(object.eventKey)
|
|
1775
|
+
? globalThis.String(object.eventKey)
|
|
1776
|
+
: isSet(object.event_key)
|
|
1777
|
+
? globalThis.String(object.event_key)
|
|
1778
|
+
: '',
|
|
1864
1779
|
};
|
|
1865
1780
|
},
|
|
1866
1781
|
toJSON(message) {
|
|
@@ -1928,7 +1843,11 @@ exports.WorkflowTriggerCronRef = {
|
|
|
1928
1843
|
},
|
|
1929
1844
|
fromJSON(object) {
|
|
1930
1845
|
return {
|
|
1931
|
-
parentId: isSet(object.parentId)
|
|
1846
|
+
parentId: isSet(object.parentId)
|
|
1847
|
+
? globalThis.String(object.parentId)
|
|
1848
|
+
: isSet(object.parent_id)
|
|
1849
|
+
? globalThis.String(object.parent_id)
|
|
1850
|
+
: '',
|
|
1932
1851
|
cron: isSet(object.cron) ? globalThis.String(object.cron) : '',
|
|
1933
1852
|
};
|
|
1934
1853
|
},
|
|
@@ -1959,7 +1878,7 @@ function createBaseBulkTriggerWorkflowRequest() {
|
|
|
1959
1878
|
exports.BulkTriggerWorkflowRequest = {
|
|
1960
1879
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1961
1880
|
for (const v of message.workflows) {
|
|
1962
|
-
|
|
1881
|
+
trigger_1.TriggerWorkflowRequest.encode(v, writer.uint32(10).fork()).join();
|
|
1963
1882
|
}
|
|
1964
1883
|
return writer;
|
|
1965
1884
|
},
|
|
@@ -1974,7 +1893,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1974
1893
|
if (tag !== 10) {
|
|
1975
1894
|
break;
|
|
1976
1895
|
}
|
|
1977
|
-
message.workflows.push(
|
|
1896
|
+
message.workflows.push(trigger_1.TriggerWorkflowRequest.decode(reader, reader.uint32()));
|
|
1978
1897
|
continue;
|
|
1979
1898
|
}
|
|
1980
1899
|
}
|
|
@@ -1988,7 +1907,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1988
1907
|
fromJSON(object) {
|
|
1989
1908
|
return {
|
|
1990
1909
|
workflows: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflows)
|
|
1991
|
-
? object.workflows.map((e) =>
|
|
1910
|
+
? object.workflows.map((e) => trigger_1.TriggerWorkflowRequest.fromJSON(e))
|
|
1992
1911
|
: [],
|
|
1993
1912
|
};
|
|
1994
1913
|
},
|
|
@@ -1996,7 +1915,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1996
1915
|
var _a;
|
|
1997
1916
|
const obj = {};
|
|
1998
1917
|
if ((_a = message.workflows) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1999
|
-
obj.workflows = message.workflows.map((e) =>
|
|
1918
|
+
obj.workflows = message.workflows.map((e) => trigger_1.TriggerWorkflowRequest.toJSON(e));
|
|
2000
1919
|
}
|
|
2001
1920
|
return obj;
|
|
2002
1921
|
},
|
|
@@ -2006,7 +1925,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
2006
1925
|
fromPartial(object) {
|
|
2007
1926
|
var _a;
|
|
2008
1927
|
const message = createBaseBulkTriggerWorkflowRequest();
|
|
2009
|
-
message.workflows = ((_a = object.workflows) === null || _a === void 0 ? void 0 : _a.map((e) =>
|
|
1928
|
+
message.workflows = ((_a = object.workflows) === null || _a === void 0 ? void 0 : _a.map((e) => trigger_1.TriggerWorkflowRequest.fromPartial(e))) || [];
|
|
2010
1929
|
return message;
|
|
2011
1930
|
},
|
|
2012
1931
|
};
|
|
@@ -2046,7 +1965,9 @@ exports.BulkTriggerWorkflowResponse = {
|
|
|
2046
1965
|
return {
|
|
2047
1966
|
workflowRunIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflowRunIds)
|
|
2048
1967
|
? object.workflowRunIds.map((e) => globalThis.String(e))
|
|
2049
|
-
:
|
|
1968
|
+
: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflow_run_ids)
|
|
1969
|
+
? object.workflow_run_ids.map((e) => globalThis.String(e))
|
|
1970
|
+
: [],
|
|
2050
1971
|
};
|
|
2051
1972
|
},
|
|
2052
1973
|
toJSON(message) {
|
|
@@ -2067,303 +1988,6 @@ exports.BulkTriggerWorkflowResponse = {
|
|
|
2067
1988
|
return message;
|
|
2068
1989
|
},
|
|
2069
1990
|
};
|
|
2070
|
-
function createBaseTriggerWorkflowRequest() {
|
|
2071
|
-
return {
|
|
2072
|
-
name: '',
|
|
2073
|
-
input: '',
|
|
2074
|
-
parentId: undefined,
|
|
2075
|
-
parentTaskRunExternalId: undefined,
|
|
2076
|
-
childIndex: undefined,
|
|
2077
|
-
childKey: undefined,
|
|
2078
|
-
additionalMetadata: undefined,
|
|
2079
|
-
desiredWorkerId: undefined,
|
|
2080
|
-
priority: undefined,
|
|
2081
|
-
desiredWorkerLabels: {},
|
|
2082
|
-
};
|
|
2083
|
-
}
|
|
2084
|
-
exports.TriggerWorkflowRequest = {
|
|
2085
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2086
|
-
if (message.name !== '') {
|
|
2087
|
-
writer.uint32(10).string(message.name);
|
|
2088
|
-
}
|
|
2089
|
-
if (message.input !== '') {
|
|
2090
|
-
writer.uint32(18).string(message.input);
|
|
2091
|
-
}
|
|
2092
|
-
if (message.parentId !== undefined) {
|
|
2093
|
-
writer.uint32(26).string(message.parentId);
|
|
2094
|
-
}
|
|
2095
|
-
if (message.parentTaskRunExternalId !== undefined) {
|
|
2096
|
-
writer.uint32(34).string(message.parentTaskRunExternalId);
|
|
2097
|
-
}
|
|
2098
|
-
if (message.childIndex !== undefined) {
|
|
2099
|
-
writer.uint32(40).int32(message.childIndex);
|
|
2100
|
-
}
|
|
2101
|
-
if (message.childKey !== undefined) {
|
|
2102
|
-
writer.uint32(50).string(message.childKey);
|
|
2103
|
-
}
|
|
2104
|
-
if (message.additionalMetadata !== undefined) {
|
|
2105
|
-
writer.uint32(58).string(message.additionalMetadata);
|
|
2106
|
-
}
|
|
2107
|
-
if (message.desiredWorkerId !== undefined) {
|
|
2108
|
-
writer.uint32(66).string(message.desiredWorkerId);
|
|
2109
|
-
}
|
|
2110
|
-
if (message.priority !== undefined) {
|
|
2111
|
-
writer.uint32(72).int32(message.priority);
|
|
2112
|
-
}
|
|
2113
|
-
Object.entries(message.desiredWorkerLabels).forEach(([key, value]) => {
|
|
2114
|
-
exports.TriggerWorkflowRequest_DesiredWorkerLabelsEntry.encode({ key: key, value }, writer.uint32(82).fork()).join();
|
|
2115
|
-
});
|
|
2116
|
-
return writer;
|
|
2117
|
-
},
|
|
2118
|
-
decode(input, length) {
|
|
2119
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2120
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2121
|
-
const message = createBaseTriggerWorkflowRequest();
|
|
2122
|
-
while (reader.pos < end) {
|
|
2123
|
-
const tag = reader.uint32();
|
|
2124
|
-
switch (tag >>> 3) {
|
|
2125
|
-
case 1: {
|
|
2126
|
-
if (tag !== 10) {
|
|
2127
|
-
break;
|
|
2128
|
-
}
|
|
2129
|
-
message.name = reader.string();
|
|
2130
|
-
continue;
|
|
2131
|
-
}
|
|
2132
|
-
case 2: {
|
|
2133
|
-
if (tag !== 18) {
|
|
2134
|
-
break;
|
|
2135
|
-
}
|
|
2136
|
-
message.input = reader.string();
|
|
2137
|
-
continue;
|
|
2138
|
-
}
|
|
2139
|
-
case 3: {
|
|
2140
|
-
if (tag !== 26) {
|
|
2141
|
-
break;
|
|
2142
|
-
}
|
|
2143
|
-
message.parentId = reader.string();
|
|
2144
|
-
continue;
|
|
2145
|
-
}
|
|
2146
|
-
case 4: {
|
|
2147
|
-
if (tag !== 34) {
|
|
2148
|
-
break;
|
|
2149
|
-
}
|
|
2150
|
-
message.parentTaskRunExternalId = reader.string();
|
|
2151
|
-
continue;
|
|
2152
|
-
}
|
|
2153
|
-
case 5: {
|
|
2154
|
-
if (tag !== 40) {
|
|
2155
|
-
break;
|
|
2156
|
-
}
|
|
2157
|
-
message.childIndex = reader.int32();
|
|
2158
|
-
continue;
|
|
2159
|
-
}
|
|
2160
|
-
case 6: {
|
|
2161
|
-
if (tag !== 50) {
|
|
2162
|
-
break;
|
|
2163
|
-
}
|
|
2164
|
-
message.childKey = reader.string();
|
|
2165
|
-
continue;
|
|
2166
|
-
}
|
|
2167
|
-
case 7: {
|
|
2168
|
-
if (tag !== 58) {
|
|
2169
|
-
break;
|
|
2170
|
-
}
|
|
2171
|
-
message.additionalMetadata = reader.string();
|
|
2172
|
-
continue;
|
|
2173
|
-
}
|
|
2174
|
-
case 8: {
|
|
2175
|
-
if (tag !== 66) {
|
|
2176
|
-
break;
|
|
2177
|
-
}
|
|
2178
|
-
message.desiredWorkerId = reader.string();
|
|
2179
|
-
continue;
|
|
2180
|
-
}
|
|
2181
|
-
case 9: {
|
|
2182
|
-
if (tag !== 72) {
|
|
2183
|
-
break;
|
|
2184
|
-
}
|
|
2185
|
-
message.priority = reader.int32();
|
|
2186
|
-
continue;
|
|
2187
|
-
}
|
|
2188
|
-
case 10: {
|
|
2189
|
-
if (tag !== 82) {
|
|
2190
|
-
break;
|
|
2191
|
-
}
|
|
2192
|
-
const entry10 = exports.TriggerWorkflowRequest_DesiredWorkerLabelsEntry.decode(reader, reader.uint32());
|
|
2193
|
-
if (entry10.value !== undefined) {
|
|
2194
|
-
message.desiredWorkerLabels[entry10.key] = entry10.value;
|
|
2195
|
-
}
|
|
2196
|
-
continue;
|
|
2197
|
-
}
|
|
2198
|
-
}
|
|
2199
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2200
|
-
break;
|
|
2201
|
-
}
|
|
2202
|
-
reader.skip(tag & 7);
|
|
2203
|
-
}
|
|
2204
|
-
return message;
|
|
2205
|
-
},
|
|
2206
|
-
fromJSON(object) {
|
|
2207
|
-
return {
|
|
2208
|
-
name: isSet(object.name) ? globalThis.String(object.name) : '',
|
|
2209
|
-
input: isSet(object.input) ? globalThis.String(object.input) : '',
|
|
2210
|
-
parentId: isSet(object.parentId) ? globalThis.String(object.parentId) : undefined,
|
|
2211
|
-
parentTaskRunExternalId: isSet(object.parentTaskRunExternalId)
|
|
2212
|
-
? globalThis.String(object.parentTaskRunExternalId)
|
|
2213
|
-
: undefined,
|
|
2214
|
-
childIndex: isSet(object.childIndex) ? globalThis.Number(object.childIndex) : undefined,
|
|
2215
|
-
childKey: isSet(object.childKey) ? globalThis.String(object.childKey) : undefined,
|
|
2216
|
-
additionalMetadata: isSet(object.additionalMetadata)
|
|
2217
|
-
? globalThis.String(object.additionalMetadata)
|
|
2218
|
-
: undefined,
|
|
2219
|
-
desiredWorkerId: isSet(object.desiredWorkerId)
|
|
2220
|
-
? globalThis.String(object.desiredWorkerId)
|
|
2221
|
-
: undefined,
|
|
2222
|
-
priority: isSet(object.priority) ? globalThis.Number(object.priority) : undefined,
|
|
2223
|
-
desiredWorkerLabels: isObject(object.desiredWorkerLabels)
|
|
2224
|
-
? Object.entries(object.desiredWorkerLabels).reduce((acc, [key, value]) => {
|
|
2225
|
-
acc[key] = exports.DesiredWorkerLabels.fromJSON(value);
|
|
2226
|
-
return acc;
|
|
2227
|
-
}, {})
|
|
2228
|
-
: {},
|
|
2229
|
-
};
|
|
2230
|
-
},
|
|
2231
|
-
toJSON(message) {
|
|
2232
|
-
const obj = {};
|
|
2233
|
-
if (message.name !== '') {
|
|
2234
|
-
obj.name = message.name;
|
|
2235
|
-
}
|
|
2236
|
-
if (message.input !== '') {
|
|
2237
|
-
obj.input = message.input;
|
|
2238
|
-
}
|
|
2239
|
-
if (message.parentId !== undefined) {
|
|
2240
|
-
obj.parentId = message.parentId;
|
|
2241
|
-
}
|
|
2242
|
-
if (message.parentTaskRunExternalId !== undefined) {
|
|
2243
|
-
obj.parentTaskRunExternalId = message.parentTaskRunExternalId;
|
|
2244
|
-
}
|
|
2245
|
-
if (message.childIndex !== undefined) {
|
|
2246
|
-
obj.childIndex = Math.round(message.childIndex);
|
|
2247
|
-
}
|
|
2248
|
-
if (message.childKey !== undefined) {
|
|
2249
|
-
obj.childKey = message.childKey;
|
|
2250
|
-
}
|
|
2251
|
-
if (message.additionalMetadata !== undefined) {
|
|
2252
|
-
obj.additionalMetadata = message.additionalMetadata;
|
|
2253
|
-
}
|
|
2254
|
-
if (message.desiredWorkerId !== undefined) {
|
|
2255
|
-
obj.desiredWorkerId = message.desiredWorkerId;
|
|
2256
|
-
}
|
|
2257
|
-
if (message.priority !== undefined) {
|
|
2258
|
-
obj.priority = Math.round(message.priority);
|
|
2259
|
-
}
|
|
2260
|
-
if (message.desiredWorkerLabels) {
|
|
2261
|
-
const entries = Object.entries(message.desiredWorkerLabels);
|
|
2262
|
-
if (entries.length > 0) {
|
|
2263
|
-
obj.desiredWorkerLabels = {};
|
|
2264
|
-
entries.forEach(([k, v]) => {
|
|
2265
|
-
obj.desiredWorkerLabels[k] = exports.DesiredWorkerLabels.toJSON(v);
|
|
2266
|
-
});
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
return obj;
|
|
2270
|
-
},
|
|
2271
|
-
create(base) {
|
|
2272
|
-
return exports.TriggerWorkflowRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2273
|
-
},
|
|
2274
|
-
fromPartial(object) {
|
|
2275
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2276
|
-
const message = createBaseTriggerWorkflowRequest();
|
|
2277
|
-
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : '';
|
|
2278
|
-
message.input = (_b = object.input) !== null && _b !== void 0 ? _b : '';
|
|
2279
|
-
message.parentId = (_c = object.parentId) !== null && _c !== void 0 ? _c : undefined;
|
|
2280
|
-
message.parentTaskRunExternalId = (_d = object.parentTaskRunExternalId) !== null && _d !== void 0 ? _d : undefined;
|
|
2281
|
-
message.childIndex = (_e = object.childIndex) !== null && _e !== void 0 ? _e : undefined;
|
|
2282
|
-
message.childKey = (_f = object.childKey) !== null && _f !== void 0 ? _f : undefined;
|
|
2283
|
-
message.additionalMetadata = (_g = object.additionalMetadata) !== null && _g !== void 0 ? _g : undefined;
|
|
2284
|
-
message.desiredWorkerId = (_h = object.desiredWorkerId) !== null && _h !== void 0 ? _h : undefined;
|
|
2285
|
-
message.priority = (_j = object.priority) !== null && _j !== void 0 ? _j : undefined;
|
|
2286
|
-
message.desiredWorkerLabels = Object.entries((_k = object.desiredWorkerLabels) !== null && _k !== void 0 ? _k : {}).reduce((acc, [key, value]) => {
|
|
2287
|
-
if (value !== undefined) {
|
|
2288
|
-
acc[key] = exports.DesiredWorkerLabels.fromPartial(value);
|
|
2289
|
-
}
|
|
2290
|
-
return acc;
|
|
2291
|
-
}, {});
|
|
2292
|
-
return message;
|
|
2293
|
-
},
|
|
2294
|
-
};
|
|
2295
|
-
function createBaseTriggerWorkflowRequest_DesiredWorkerLabelsEntry() {
|
|
2296
|
-
return { key: '', value: undefined };
|
|
2297
|
-
}
|
|
2298
|
-
exports.TriggerWorkflowRequest_DesiredWorkerLabelsEntry = {
|
|
2299
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2300
|
-
if (message.key !== '') {
|
|
2301
|
-
writer.uint32(10).string(message.key);
|
|
2302
|
-
}
|
|
2303
|
-
if (message.value !== undefined) {
|
|
2304
|
-
exports.DesiredWorkerLabels.encode(message.value, writer.uint32(18).fork()).join();
|
|
2305
|
-
}
|
|
2306
|
-
return writer;
|
|
2307
|
-
},
|
|
2308
|
-
decode(input, length) {
|
|
2309
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2310
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2311
|
-
const message = createBaseTriggerWorkflowRequest_DesiredWorkerLabelsEntry();
|
|
2312
|
-
while (reader.pos < end) {
|
|
2313
|
-
const tag = reader.uint32();
|
|
2314
|
-
switch (tag >>> 3) {
|
|
2315
|
-
case 1: {
|
|
2316
|
-
if (tag !== 10) {
|
|
2317
|
-
break;
|
|
2318
|
-
}
|
|
2319
|
-
message.key = reader.string();
|
|
2320
|
-
continue;
|
|
2321
|
-
}
|
|
2322
|
-
case 2: {
|
|
2323
|
-
if (tag !== 18) {
|
|
2324
|
-
break;
|
|
2325
|
-
}
|
|
2326
|
-
message.value = exports.DesiredWorkerLabels.decode(reader, reader.uint32());
|
|
2327
|
-
continue;
|
|
2328
|
-
}
|
|
2329
|
-
}
|
|
2330
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2331
|
-
break;
|
|
2332
|
-
}
|
|
2333
|
-
reader.skip(tag & 7);
|
|
2334
|
-
}
|
|
2335
|
-
return message;
|
|
2336
|
-
},
|
|
2337
|
-
fromJSON(object) {
|
|
2338
|
-
return {
|
|
2339
|
-
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
2340
|
-
value: isSet(object.value) ? exports.DesiredWorkerLabels.fromJSON(object.value) : undefined,
|
|
2341
|
-
};
|
|
2342
|
-
},
|
|
2343
|
-
toJSON(message) {
|
|
2344
|
-
const obj = {};
|
|
2345
|
-
if (message.key !== '') {
|
|
2346
|
-
obj.key = message.key;
|
|
2347
|
-
}
|
|
2348
|
-
if (message.value !== undefined) {
|
|
2349
|
-
obj.value = exports.DesiredWorkerLabels.toJSON(message.value);
|
|
2350
|
-
}
|
|
2351
|
-
return obj;
|
|
2352
|
-
},
|
|
2353
|
-
create(base) {
|
|
2354
|
-
return exports.TriggerWorkflowRequest_DesiredWorkerLabelsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2355
|
-
},
|
|
2356
|
-
fromPartial(object) {
|
|
2357
|
-
var _a;
|
|
2358
|
-
const message = createBaseTriggerWorkflowRequest_DesiredWorkerLabelsEntry();
|
|
2359
|
-
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : '';
|
|
2360
|
-
message.value =
|
|
2361
|
-
object.value !== undefined && object.value !== null
|
|
2362
|
-
? exports.DesiredWorkerLabels.fromPartial(object.value)
|
|
2363
|
-
: undefined;
|
|
2364
|
-
return message;
|
|
2365
|
-
},
|
|
2366
|
-
};
|
|
2367
1991
|
function createBaseTriggerWorkflowResponse() {
|
|
2368
1992
|
return { workflowRunId: '' };
|
|
2369
1993
|
}
|
|
@@ -2398,7 +2022,11 @@ exports.TriggerWorkflowResponse = {
|
|
|
2398
2022
|
},
|
|
2399
2023
|
fromJSON(object) {
|
|
2400
2024
|
return {
|
|
2401
|
-
workflowRunId: isSet(object.workflowRunId)
|
|
2025
|
+
workflowRunId: isSet(object.workflowRunId)
|
|
2026
|
+
? globalThis.String(object.workflowRunId)
|
|
2027
|
+
: isSet(object.workflow_run_id)
|
|
2028
|
+
? globalThis.String(object.workflow_run_id)
|
|
2029
|
+
: '',
|
|
2402
2030
|
};
|
|
2403
2031
|
},
|
|
2404
2032
|
toJSON(message) {
|
|
@@ -2561,7 +2189,7 @@ exports.WorkflowServiceDefinition = {
|
|
|
2561
2189
|
},
|
|
2562
2190
|
triggerWorkflow: {
|
|
2563
2191
|
name: 'TriggerWorkflow',
|
|
2564
|
-
requestType:
|
|
2192
|
+
requestType: trigger_1.TriggerWorkflowRequest,
|
|
2565
2193
|
requestStream: false,
|
|
2566
2194
|
responseType: exports.TriggerWorkflowResponse,
|
|
2567
2195
|
responseStream: false,
|