@hatchet-dev/typescript-sdk 1.15.2 → 1.17.0
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/admin/admin-client.js +8 -9
- package/clients/dispatcher/action-listener.d.ts +3 -6
- package/clients/dispatcher/action-listener.js +54 -23
- package/clients/dispatcher/dispatcher-client.js +5 -8
- package/clients/dispatcher/heartbeat/heartbeat-worker.js +7 -4
- package/clients/event/event-client.d.ts +2 -2
- package/clients/event/event-client.js +5 -11
- package/clients/hatchet-client/hatchet-logger.js +8 -17
- package/clients/listeners/durable-listener/durable-listener-client.d.ts +115 -15
- package/clients/listeners/durable-listener/durable-listener-client.js +769 -19
- package/clients/listeners/durable-listener/pooled-durable-listener-client.js +11 -22
- package/clients/listeners/run-listener/child-listener-client.d.ts +1 -1
- package/clients/listeners/run-listener/child-listener-client.js +34 -30
- package/clients/listeners/run-listener/pooled-child-listener-client.js +9 -19
- package/clients/rest/generated/Api.d.ts +25 -1
- package/clients/rest/generated/Api.js +20 -0
- package/clients/rest/generated/data-contracts.d.ts +60 -1
- package/clients/rest/generated/data-contracts.js +9 -1
- package/legacy/examples/affinity-workers.js +2 -3
- package/legacy/examples/byo-logger.js +0 -2
- package/legacy/examples/concurrency/cancel-in-progress/concurrency-worker.js +4 -2
- package/legacy/examples/concurrency/group-round-robin/concurrency-event.js +0 -1
- package/legacy/examples/concurrency/group-round-robin/concurrency-worker-expression.js +4 -2
- package/legacy/examples/concurrency/group-round-robin/concurrency-worker-key-fn.js +4 -2
- package/legacy/examples/example-event.js +0 -3
- package/legacy/examples/logger.js +0 -1
- package/legacy/examples/sticky-worker-with-check.js +0 -1
- package/legacy/examples/sticky-worker.js +0 -1
- package/legacy/legacy-client.js +2 -2
- package/legacy/legacy-transformer.js +2 -4
- package/legacy/step.d.ts +16 -16
- package/legacy/step.js +8 -17
- package/legacy/workflow.d.ts +81 -81
- package/package.json +20 -29
- package/protoc/dispatcher/dispatcher.d.ts +20 -0
- package/protoc/dispatcher/dispatcher.js +136 -2
- package/protoc/v1/dispatcher.d.ts +168 -0
- package/protoc/v1/dispatcher.js +1920 -1
- package/protoc/v1/shared/trigger.d.ts +89 -0
- package/protoc/v1/shared/trigger.js +493 -0
- package/protoc/v1/workflows.d.ts +34 -34
- package/protoc/v1/workflows.js +252 -200
- package/protoc/workflows/workflows.d.ts +2 -75
- package/protoc/workflows/workflows.js +16 -491
- package/util/abort-error.d.ts +15 -1
- package/util/abort-error.js +30 -5
- package/util/config-loader/config-loader.js +4 -3
- package/util/config-loader/token.js +9 -2
- package/util/errors/eviction-not-supported-error.d.ts +5 -0
- package/util/errors/eviction-not-supported-error.js +18 -0
- package/util/errors/hatchet-error.d.ts +9 -1
- package/util/errors/hatchet-error.js +23 -2
- 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/grpc-error.d.ts +9 -0
- package/util/grpc-error.js +25 -0
- package/util/hatchet-promise/hatchet-promise.d.ts +6 -1
- package/util/hatchet-promise/hatchet-promise.js +16 -2
- package/util/logger/logger.js +0 -1
- package/util/parse.d.ts +1 -1
- package/util/parse.js +4 -2
- package/util/retrier.js +2 -3
- package/util/sleep.d.ts +3 -2
- package/util/sleep.js +6 -4
- package/util/workflow-run-ref.js +5 -3
- package/v1/client/admin.d.ts +2 -2
- package/v1/client/admin.js +2 -6
- package/v1/client/client.d.ts +7 -11
- package/v1/client/client.interface.d.ts +5 -8
- package/v1/client/client.js +34 -40
- package/v1/client/duration.d.ts +11 -1
- package/v1/client/duration.js +44 -0
- package/v1/client/features/cel.js +1 -1
- package/v1/client/features/crons.js +2 -2
- package/v1/client/features/index.d.ts +5 -0
- package/v1/client/features/index.js +5 -0
- package/v1/client/features/logs.d.ts +37 -0
- package/v1/client/features/logs.js +46 -0
- package/v1/client/features/runs.d.ts +16 -3
- package/v1/client/features/runs.js +38 -4
- package/v1/client/features/schedules.js +4 -4
- package/v1/client/features/webhooks.js +4 -2
- package/v1/client/features/workflows.js +1 -1
- package/v1/client/worker/context.d.ts +101 -6
- package/v1/client/worker/context.js +257 -44
- package/v1/client/worker/deprecated/deprecation.js +8 -4
- 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 +33 -24
- 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/health-server.js +3 -3
- package/v1/client/worker/slot-utils.js +0 -3
- package/v1/client/worker/worker-internal.d.ts +23 -4
- package/v1/client/worker/worker-internal.js +216 -148
- package/v1/client/worker/worker.d.ts +1 -0
- package/v1/client/worker/worker.js +34 -0
- package/v1/conditions/base.js +0 -1
- package/v1/conditions/index.js +2 -4
- package/v1/conditions/sleep-condition.js +2 -1
- package/v1/conditions/transformer.js +2 -1
- package/v1/declaration.d.ts +6 -4
- package/v1/declaration.js +20 -7
- package/v1/examples/__e2e__/harness.d.ts +5 -0
- package/v1/examples/__e2e__/harness.js +17 -3
- package/v1/examples/affinity/affinity-workers.js +0 -1
- package/v1/examples/bulk_operations/workflow.js +0 -1
- package/v1/examples/cancellation/run.js +0 -1
- package/v1/examples/cancellations/run.js +0 -1
- package/v1/examples/child_workflows/run.js +0 -2
- package/v1/examples/child_workflows/workflow.js +0 -1
- package/v1/examples/concurrency-rr/load.js +0 -1
- package/v1/examples/concurrency-rr/run.js +0 -3
- package/v1/examples/concurrency_limit_rr/load.js +0 -1
- package/v1/examples/concurrency_limit_rr/run.js +0 -3
- package/v1/examples/concurrency_workflow_level/workflow.d.ts +1 -1
- package/v1/examples/concurrency_workflow_level/workflow.js +1 -1
- package/v1/examples/conditions/event.js +0 -1
- package/v1/examples/conditions/run.js +0 -1
- package/v1/examples/dag/run.js +0 -1
- package/v1/examples/dag_match_condition/event.js +0 -1
- package/v1/examples/dag_match_condition/run.js +0 -1
- package/v1/examples/deep/run.js +0 -2
- package/v1/examples/durable/workflow.d.ts +57 -0
- package/v1/examples/durable/workflow.js +164 -10
- package/v1/examples/durable-event/event.js +0 -1
- package/v1/examples/durable-event/run.js +0 -2
- package/v1/examples/durable-event/workflow.js +2 -7
- package/v1/examples/durable-sleep/event.js +0 -1
- package/v1/examples/durable-sleep/run.js +0 -2
- package/v1/examples/durable_event/event.js +0 -1
- package/v1/examples/durable_event/run.js +0 -2
- 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/durable_sleep/event.js +0 -1
- package/v1/examples/durable_sleep/run.js +0 -2
- package/v1/examples/e2e-worker.js +42 -19
- package/v1/examples/events/event.js +0 -1
- package/v1/examples/high-memory/run.js +0 -1
- package/v1/examples/inferred-typing/run.js +0 -1
- package/v1/examples/landing_page/durable-excution.js +0 -1
- package/v1/examples/landing_page/queues.js +0 -1
- package/v1/examples/legacy/run.js +0 -1
- package/v1/examples/logger/byo-logger.js +0 -2
- package/v1/examples/logger/logger.js +0 -1
- package/v1/examples/logging/byo-logger.js +0 -2
- package/v1/examples/logging/logger.js +0 -1
- package/v1/examples/middleware/recipes.js +3 -1
- package/v1/examples/migration-guides/mergent.js +2 -1
- package/v1/examples/multiple_wf_concurrency/run.js +0 -3
- package/v1/examples/non_retryable/run.js +0 -1
- package/v1/examples/on_event/event.js +0 -1
- package/v1/examples/on_failure/run.js +0 -1
- package/v1/examples/on_failure/workflow.js +0 -1
- package/v1/examples/on_success/run.js +0 -1
- package/v1/examples/on_success/workflow.js +0 -1
- package/v1/examples/priority/run.js +0 -1
- package/v1/examples/priority/workflow.js +0 -1
- package/v1/examples/retries/run.js +0 -1
- package/v1/examples/retries/workflow.js +0 -1
- package/v1/examples/simple/bulk.js +0 -1
- package/v1/examples/simple/cron.js +0 -2
- package/v1/examples/simple/delay.js +0 -1
- package/v1/examples/simple/enqueue.js +0 -2
- package/v1/examples/simple/run.js +0 -1
- package/v1/examples/simple/schedule.js +0 -1
- package/v1/examples/simple/workflow-with-child.js +10 -4
- package/v1/examples/sticky/run.js +0 -1
- package/v1/examples/sticky/workflow.js +0 -1
- package/v1/examples/streaming/nextjs-proxy.js +0 -1
- package/v1/examples/streaming/run.js +0 -1
- package/v1/examples/timeout/run.js +0 -1
- package/v1/examples/timeouts/run.js +0 -1
- 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/slot-types.js +0 -1
- package/v1/task.d.ts +10 -2
- package/v1/task.js +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -5,20 +5,19 @@
|
|
|
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";
|
|
@@ -786,128 +730,6 @@ exports.CreateWorkflowJobOpts = {
|
|
|
786
730
|
return message;
|
|
787
731
|
},
|
|
788
732
|
};
|
|
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
733
|
function createBaseCreateWorkflowStepOpts() {
|
|
912
734
|
return {
|
|
913
735
|
readableId: '',
|
|
@@ -1071,7 +893,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1071
893
|
: [],
|
|
1072
894
|
workerLabels: isObject(object.workerLabels)
|
|
1073
895
|
? Object.entries(object.workerLabels).reduce((acc, [key, value]) => {
|
|
1074
|
-
acc[key] =
|
|
896
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromJSON(value);
|
|
1075
897
|
return acc;
|
|
1076
898
|
}, {})
|
|
1077
899
|
: {},
|
|
@@ -1115,7 +937,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1115
937
|
if (entries.length > 0) {
|
|
1116
938
|
obj.workerLabels = {};
|
|
1117
939
|
entries.forEach(([k, v]) => {
|
|
1118
|
-
obj.workerLabels[k] =
|
|
940
|
+
obj.workerLabels[k] = trigger_1.DesiredWorkerLabels.toJSON(v);
|
|
1119
941
|
});
|
|
1120
942
|
}
|
|
1121
943
|
}
|
|
@@ -1143,7 +965,7 @@ exports.CreateWorkflowStepOpts = {
|
|
|
1143
965
|
message.rateLimits = ((_h = object.rateLimits) === null || _h === void 0 ? void 0 : _h.map((e) => exports.CreateStepRateLimit.fromPartial(e))) || [];
|
|
1144
966
|
message.workerLabels = Object.entries((_j = object.workerLabels) !== null && _j !== void 0 ? _j : {}).reduce((acc, [key, value]) => {
|
|
1145
967
|
if (value !== undefined) {
|
|
1146
|
-
acc[key] =
|
|
968
|
+
acc[key] = trigger_1.DesiredWorkerLabels.fromPartial(value);
|
|
1147
969
|
}
|
|
1148
970
|
return acc;
|
|
1149
971
|
}, {});
|
|
@@ -1161,7 +983,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1161
983
|
writer.uint32(10).string(message.key);
|
|
1162
984
|
}
|
|
1163
985
|
if (message.value !== undefined) {
|
|
1164
|
-
|
|
986
|
+
trigger_1.DesiredWorkerLabels.encode(message.value, writer.uint32(18).fork()).join();
|
|
1165
987
|
}
|
|
1166
988
|
return writer;
|
|
1167
989
|
},
|
|
@@ -1183,7 +1005,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1183
1005
|
if (tag !== 18) {
|
|
1184
1006
|
break;
|
|
1185
1007
|
}
|
|
1186
|
-
message.value =
|
|
1008
|
+
message.value = trigger_1.DesiredWorkerLabels.decode(reader, reader.uint32());
|
|
1187
1009
|
continue;
|
|
1188
1010
|
}
|
|
1189
1011
|
}
|
|
@@ -1197,7 +1019,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1197
1019
|
fromJSON(object) {
|
|
1198
1020
|
return {
|
|
1199
1021
|
key: isSet(object.key) ? globalThis.String(object.key) : '',
|
|
1200
|
-
value: isSet(object.value) ?
|
|
1022
|
+
value: isSet(object.value) ? trigger_1.DesiredWorkerLabels.fromJSON(object.value) : undefined,
|
|
1201
1023
|
};
|
|
1202
1024
|
},
|
|
1203
1025
|
toJSON(message) {
|
|
@@ -1206,7 +1028,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1206
1028
|
obj.key = message.key;
|
|
1207
1029
|
}
|
|
1208
1030
|
if (message.value !== undefined) {
|
|
1209
|
-
obj.value =
|
|
1031
|
+
obj.value = trigger_1.DesiredWorkerLabels.toJSON(message.value);
|
|
1210
1032
|
}
|
|
1211
1033
|
return obj;
|
|
1212
1034
|
},
|
|
@@ -1219,7 +1041,7 @@ exports.CreateWorkflowStepOpts_WorkerLabelsEntry = {
|
|
|
1219
1041
|
message.key = (_a = object.key) !== null && _a !== void 0 ? _a : '';
|
|
1220
1042
|
message.value =
|
|
1221
1043
|
object.value !== undefined && object.value !== null
|
|
1222
|
-
?
|
|
1044
|
+
? trigger_1.DesiredWorkerLabels.fromPartial(object.value)
|
|
1223
1045
|
: undefined;
|
|
1224
1046
|
return message;
|
|
1225
1047
|
},
|
|
@@ -1959,7 +1781,7 @@ function createBaseBulkTriggerWorkflowRequest() {
|
|
|
1959
1781
|
exports.BulkTriggerWorkflowRequest = {
|
|
1960
1782
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
1961
1783
|
for (const v of message.workflows) {
|
|
1962
|
-
|
|
1784
|
+
trigger_1.TriggerWorkflowRequest.encode(v, writer.uint32(10).fork()).join();
|
|
1963
1785
|
}
|
|
1964
1786
|
return writer;
|
|
1965
1787
|
},
|
|
@@ -1974,7 +1796,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1974
1796
|
if (tag !== 10) {
|
|
1975
1797
|
break;
|
|
1976
1798
|
}
|
|
1977
|
-
message.workflows.push(
|
|
1799
|
+
message.workflows.push(trigger_1.TriggerWorkflowRequest.decode(reader, reader.uint32()));
|
|
1978
1800
|
continue;
|
|
1979
1801
|
}
|
|
1980
1802
|
}
|
|
@@ -1988,7 +1810,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1988
1810
|
fromJSON(object) {
|
|
1989
1811
|
return {
|
|
1990
1812
|
workflows: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.workflows)
|
|
1991
|
-
? object.workflows.map((e) =>
|
|
1813
|
+
? object.workflows.map((e) => trigger_1.TriggerWorkflowRequest.fromJSON(e))
|
|
1992
1814
|
: [],
|
|
1993
1815
|
};
|
|
1994
1816
|
},
|
|
@@ -1996,7 +1818,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
1996
1818
|
var _a;
|
|
1997
1819
|
const obj = {};
|
|
1998
1820
|
if ((_a = message.workflows) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1999
|
-
obj.workflows = message.workflows.map((e) =>
|
|
1821
|
+
obj.workflows = message.workflows.map((e) => trigger_1.TriggerWorkflowRequest.toJSON(e));
|
|
2000
1822
|
}
|
|
2001
1823
|
return obj;
|
|
2002
1824
|
},
|
|
@@ -2006,7 +1828,7 @@ exports.BulkTriggerWorkflowRequest = {
|
|
|
2006
1828
|
fromPartial(object) {
|
|
2007
1829
|
var _a;
|
|
2008
1830
|
const message = createBaseBulkTriggerWorkflowRequest();
|
|
2009
|
-
message.workflows = ((_a = object.workflows) === null || _a === void 0 ? void 0 : _a.map((e) =>
|
|
1831
|
+
message.workflows = ((_a = object.workflows) === null || _a === void 0 ? void 0 : _a.map((e) => trigger_1.TriggerWorkflowRequest.fromPartial(e))) || [];
|
|
2010
1832
|
return message;
|
|
2011
1833
|
},
|
|
2012
1834
|
};
|
|
@@ -2067,303 +1889,6 @@ exports.BulkTriggerWorkflowResponse = {
|
|
|
2067
1889
|
return message;
|
|
2068
1890
|
},
|
|
2069
1891
|
};
|
|
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
1892
|
function createBaseTriggerWorkflowResponse() {
|
|
2368
1893
|
return { workflowRunId: '' };
|
|
2369
1894
|
}
|
|
@@ -2561,7 +2086,7 @@ exports.WorkflowServiceDefinition = {
|
|
|
2561
2086
|
},
|
|
2562
2087
|
triggerWorkflow: {
|
|
2563
2088
|
name: 'TriggerWorkflow',
|
|
2564
|
-
requestType:
|
|
2089
|
+
requestType: trigger_1.TriggerWorkflowRequest,
|
|
2565
2090
|
requestStream: false,
|
|
2566
2091
|
responseType: exports.TriggerWorkflowResponse,
|
|
2567
2092
|
responseStream: false,
|
package/util/abort-error.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare class AbortError extends Error {
|
|
2
|
+
readonly code = "ABORT_ERR";
|
|
3
|
+
constructor(message?: string);
|
|
4
|
+
}
|
|
5
|
+
export declare function createAbortError(message?: string): AbortError;
|
|
2
6
|
export declare function isAbortError(err: unknown): err is Error;
|
|
3
7
|
/**
|
|
4
8
|
* Helper to be used inside broad `catch` blocks so cancellation isn't accidentally swallowed.
|
|
@@ -9,6 +13,16 @@ export declare function isAbortError(err: unknown): err is Error;
|
|
|
9
13
|
* ```
|
|
10
14
|
*/
|
|
11
15
|
export declare function rethrowIfAborted(err: unknown): void;
|
|
16
|
+
/**
|
|
17
|
+
* Attach an `abort` listener to a signal, disabling the Node.js
|
|
18
|
+
* `MaxListenersExceededWarning` first.
|
|
19
|
+
*
|
|
20
|
+
* A single durable task can attach many concurrent listeners to the same signal
|
|
21
|
+
* (fan-out children, parallel waitFor calls, etc.), easily exceeding the default
|
|
22
|
+
* cap of 10. Setting max to 0 (unlimited) is safe here because every listener is
|
|
23
|
+
* removed on settlement.
|
|
24
|
+
*/
|
|
25
|
+
export declare function bindAbortSignalHandler(signal: AbortSignal, handler: () => void): void;
|
|
12
26
|
export type ThrowIfAbortedOpts = {
|
|
13
27
|
/**
|
|
14
28
|
* Optional: called before throwing when the signal is aborted.
|