@proompteng/temporal-bun-sdk 0.9.0 → 0.10.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 +18 -0
- package/dist/agent-readiness.json +191 -5
- package/dist/production-readiness.json +409 -15
- package/dist/src/activities/lifecycle.d.ts.map +1 -1
- package/dist/src/activities/lifecycle.js +12 -5
- package/dist/src/activities/lifecycle.js.map +1 -1
- package/dist/src/bin/lint-workflows-command.d.ts +3 -3
- package/dist/src/bin/lint-workflows-command.d.ts.map +1 -1
- package/dist/src/bin/lint-workflows-command.js +5 -1
- package/dist/src/bin/lint-workflows-command.js.map +1 -1
- package/dist/src/bin/replay-command.d.ts +2 -2
- package/dist/src/bin/replay-command.d.ts.map +1 -1
- package/dist/src/bin/replay-command.js +9 -5
- package/dist/src/bin/replay-command.js.map +1 -1
- package/dist/src/bin/temporal-bun.d.ts +2 -2
- package/dist/src/client/interceptors.d.ts.map +1 -1
- package/dist/src/client/interceptors.js +1 -1
- package/dist/src/client/interceptors.js.map +1 -1
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +102 -35
- package/dist/src/client.js.map +1 -1
- package/dist/src/common/payloads/codecs.d.ts +4 -4
- package/dist/src/common/payloads/codecs.d.ts.map +1 -1
- package/dist/src/config.d.ts +10 -10
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/interceptors/types.d.ts.map +1 -1
- package/dist/src/interceptors/types.js +6 -4
- package/dist/src/interceptors/types.js.map +1 -1
- package/dist/src/otel/auto-instrumentations-node.d.ts +1 -1
- package/dist/src/otel/auto-instrumentations-node.d.ts.map +1 -1
- package/dist/src/worker/runtime.d.ts.map +1 -1
- package/dist/src/worker/runtime.js +169 -24
- package/dist/src/worker/runtime.js.map +1 -1
- package/dist/src/workflow/command-event-matrix.d.ts +13 -0
- package/dist/src/workflow/command-event-matrix.d.ts.map +1 -0
- package/dist/src/workflow/command-event-matrix.js +158 -0
- package/dist/src/workflow/command-event-matrix.js.map +1 -0
- package/dist/src/workflow/context.d.ts.map +1 -1
- package/dist/src/workflow/context.js +0 -11
- package/dist/src/workflow/context.js.map +1 -1
- package/dist/src/workflow/determinism.d.ts.map +1 -1
- package/dist/src/workflow/determinism.js +27 -1
- package/dist/src/workflow/determinism.js.map +1 -1
- package/dist/src/workflow/executor.d.ts.map +1 -1
- package/dist/src/workflow/executor.js +22 -21
- package/dist/src/workflow/executor.js.map +1 -1
- package/dist/src/workflow/guards.d.ts.map +1 -1
- package/dist/src/workflow/guards.js +141 -48
- package/dist/src/workflow/guards.js.map +1 -1
- package/dist/src/workflow/index.d.ts +1 -0
- package/dist/src/workflow/index.d.ts.map +1 -1
- package/dist/src/workflow/index.js +1 -0
- package/dist/src/workflow/index.js.map +1 -1
- package/docs/agent-adoption-guide.md +42 -1
- package/docs/default-choice-hardening-plan.md +183 -0
- package/docs/feature-matrix.md +23 -21
- package/docs/production-design.md +1 -1
- package/docs/production-readiness-implementation-plan.md +42 -22
- package/docs/semantic-readiness.md +133 -0
- package/docs/support-policy.md +16 -9
- package/package.json +9 -7
package/dist/src/client.js
CHANGED
|
@@ -17,13 +17,18 @@ import { CloudService } from './proto/temporal/api/cloud/cloudservice/v1/service
|
|
|
17
17
|
import { WorkflowExecutionSchema, } from './proto/temporal/api/common/v1/message_pb';
|
|
18
18
|
import { UpdateWorkflowExecutionLifecycleStage } from './proto/temporal/api/enums/v1/update_pb';
|
|
19
19
|
import { HistoryEventFilterType, VersioningBehavior } from './proto/temporal/api/enums/v1/workflow_pb';
|
|
20
|
+
import { WorkflowExecutionAlreadyStartedFailureSchema } from './proto/temporal/api/errordetails/v1/message_pb';
|
|
20
21
|
import { AddSearchAttributesRequestSchema, CreateNexusEndpointRequestSchema, DeleteNexusEndpointRequestSchema, GetNexusEndpointRequestSchema, ListNexusEndpointsRequestSchema, ListSearchAttributesRequestSchema, RemoveSearchAttributesRequestSchema, UpdateNexusEndpointRequestSchema, } from './proto/temporal/api/operatorservice/v1/request_response_pb';
|
|
21
22
|
import { OperatorService } from './proto/temporal/api/operatorservice/v1/service_pb';
|
|
22
23
|
import { BackfillRequestSchema, SchedulePatchSchema, TriggerImmediatelyRequestSchema, } from './proto/temporal/api/schedule/v1/message_pb';
|
|
23
|
-
import { CreateScheduleRequestSchema, DeleteScheduleRequestSchema, DeleteWorkerDeploymentRequestSchema, DeleteWorkerDeploymentVersionRequestSchema, DescribeDeploymentRequestSchema, DescribeNamespaceRequestSchema, DescribeNamespaceResponseSchema, DescribeScheduleRequestSchema, DescribeWorkerDeploymentRequestSchema, DescribeWorkerRequestSchema, FetchWorkerConfigRequestSchema, GetCurrentDeploymentRequestSchema, GetDeploymentReachabilityRequestSchema, GetWorkerVersioningRulesRequestSchema, GetWorkflowExecutionHistoryRequestSchema, ListDeploymentsRequestSchema, ListScheduleMatchingTimesRequestSchema, ListSchedulesRequestSchema, ListWorkerDeploymentsRequestSchema, ListWorkersRequestSchema, PatchScheduleRequestSchema, PauseWorkflowExecutionRequestSchema, ResetStickyTaskQueueRequestSchema, SetCurrentDeploymentRequestSchema, SetWorkerDeploymentCurrentVersionRequestSchema, SetWorkerDeploymentManagerRequestSchema, SetWorkerDeploymentRampingVersionRequestSchema, UnpauseWorkflowExecutionRequestSchema, UpdateScheduleRequestSchema, UpdateTaskQueueConfigRequestSchema, UpdateWorkerConfigRequestSchema, UpdateWorkerDeploymentVersionMetadataRequestSchema, UpdateWorkerVersioningRulesRequestSchema, UpdateWorkflowExecutionOptionsRequestSchema, } from './proto/temporal/api/workflowservice/v1/request_response_pb';
|
|
24
|
+
import { CreateScheduleRequestSchema, DeleteScheduleRequestSchema, DeleteWorkerDeploymentRequestSchema, DeleteWorkerDeploymentVersionRequestSchema, DescribeDeploymentRequestSchema, DescribeNamespaceRequestSchema, DescribeNamespaceResponseSchema, DescribeScheduleRequestSchema, DescribeWorkerDeploymentRequestSchema, DescribeWorkerRequestSchema, FetchWorkerConfigRequestSchema, GetCurrentDeploymentRequestSchema, GetDeploymentReachabilityRequestSchema, GetWorkerVersioningRulesRequestSchema, GetWorkflowExecutionHistoryRequestSchema, ListDeploymentsRequestSchema, ListScheduleMatchingTimesRequestSchema, ListSchedulesRequestSchema, ListWorkerDeploymentsRequestSchema, ListWorkersRequestSchema, PatchScheduleRequestSchema, PauseWorkflowExecutionRequestSchema, ResetStickyTaskQueueRequestSchema, SetCurrentDeploymentRequestSchema, SetWorkerDeploymentCurrentVersionRequestSchema, SetWorkerDeploymentManagerRequestSchema, SetWorkerDeploymentRampingVersionRequestSchema, StartWorkflowExecutionResponseSchema, UnpauseWorkflowExecutionRequestSchema, UpdateScheduleRequestSchema, UpdateTaskQueueConfigRequestSchema, UpdateWorkerConfigRequestSchema, UpdateWorkerDeploymentVersionMetadataRequestSchema, UpdateWorkerVersioningRulesRequestSchema, UpdateWorkflowExecutionOptionsRequestSchema, } from './proto/temporal/api/workflowservice/v1/request_response_pb';
|
|
24
25
|
import { WorkflowService } from './proto/temporal/api/workflowservice/v1/service_pb';
|
|
25
26
|
import { DataConverterService, LoggerService, MetricsExporterService, MetricsService, TemporalConfigService, WorkflowServiceClientService, } from './runtime/effect-layers';
|
|
26
27
|
import { createTypedSearchAttributes } from './search-attributes';
|
|
28
|
+
const omitProtoMetadata = (request) => {
|
|
29
|
+
const { $typeName: _typeName, $unknown: _unknown, ...payload } = (request ?? {});
|
|
30
|
+
return payload;
|
|
31
|
+
};
|
|
27
32
|
export const temporalCallOptions = (options) => {
|
|
28
33
|
const copy = { ...options };
|
|
29
34
|
Object.defineProperty(copy, CALL_OPTIONS_MARKER, {
|
|
@@ -105,6 +110,24 @@ const normalizeUnknownError = (error) => {
|
|
|
105
110
|
};
|
|
106
111
|
return unwrap(error);
|
|
107
112
|
};
|
|
113
|
+
const withStartRequestId = (options) => ({
|
|
114
|
+
...options,
|
|
115
|
+
requestId: options.requestId ?? randomUUID(),
|
|
116
|
+
});
|
|
117
|
+
const extractMatchingAlreadyStartedRunId = (error, requestId) => {
|
|
118
|
+
if (!requestId) {
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
const normalized = normalizeUnknownError(error);
|
|
122
|
+
if (!(normalized instanceof ConnectError) || normalized.code !== Code.AlreadyExists) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
const [detail] = normalized
|
|
126
|
+
.findDetails(WorkflowExecutionAlreadyStartedFailureSchema)
|
|
127
|
+
.filter((candidate) => candidate.startRequestId === requestId);
|
|
128
|
+
const runId = detail?.runId?.trim();
|
|
129
|
+
return runId ? runId : undefined;
|
|
130
|
+
};
|
|
108
131
|
const isCallOptionsCandidate = (value) => {
|
|
109
132
|
if (!value || typeof value !== 'object') {
|
|
110
133
|
return false;
|
|
@@ -484,7 +507,7 @@ class TemporalClientImpl {
|
|
|
484
507
|
};
|
|
485
508
|
}
|
|
486
509
|
async startWorkflow(options, callOptions) {
|
|
487
|
-
const parsedOptions = sanitizeStartWorkflowOptions(options);
|
|
510
|
+
const parsedOptions = withStartRequestId(sanitizeStartWorkflowOptions(options));
|
|
488
511
|
return this.#instrumentOperation('workflow.start', async () => {
|
|
489
512
|
this.ensureOpen();
|
|
490
513
|
const request = await buildStartWorkflowRequest({
|
|
@@ -495,7 +518,26 @@ class TemporalClientImpl {
|
|
|
495
518
|
taskQueue: this.defaultTaskQueue,
|
|
496
519
|
},
|
|
497
520
|
}, this.dataConverter);
|
|
498
|
-
|
|
521
|
+
let response;
|
|
522
|
+
try {
|
|
523
|
+
response = await this.executeRpc('startWorkflow', (rpcOptions) => this.workflowService.startWorkflowExecution(request, rpcOptions), callOptions);
|
|
524
|
+
}
|
|
525
|
+
catch (error) {
|
|
526
|
+
const recoveredRunId = extractMatchingAlreadyStartedRunId(error, request.requestId);
|
|
527
|
+
if (!recoveredRunId) {
|
|
528
|
+
throw error;
|
|
529
|
+
}
|
|
530
|
+
this.#log('info', 'temporal rpc startWorkflow recovered already-started request', {
|
|
531
|
+
operation: 'startWorkflow',
|
|
532
|
+
workflowId: request.workflowId,
|
|
533
|
+
runId: recoveredRunId,
|
|
534
|
+
requestId: request.requestId,
|
|
535
|
+
});
|
|
536
|
+
response = create(StartWorkflowExecutionResponseSchema, {
|
|
537
|
+
runId: recoveredRunId,
|
|
538
|
+
started: true,
|
|
539
|
+
});
|
|
540
|
+
}
|
|
499
541
|
return this.toStartWorkflowResult(response, {
|
|
500
542
|
workflowId: request.workflowId,
|
|
501
543
|
namespace: request.namespace,
|
|
@@ -623,7 +665,7 @@ class TemporalClientImpl {
|
|
|
623
665
|
}, { workflowId: resolvedHandle.workflowId, runId: resolvedHandle.runId });
|
|
624
666
|
}
|
|
625
667
|
async signalWithStart(options, callOptions) {
|
|
626
|
-
const startOptions = sanitizeStartWorkflowOptions(options);
|
|
668
|
+
const startOptions = withStartRequestId(sanitizeStartWorkflowOptions(options));
|
|
627
669
|
return this.#instrumentOperation('workflow.signalWithStart', async () => {
|
|
628
670
|
this.ensureOpen();
|
|
629
671
|
const signalName = ensureNonEmptyString(options.signalName, 'signalName');
|
|
@@ -784,7 +826,12 @@ class TemporalClientImpl {
|
|
|
784
826
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
785
827
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
786
828
|
const requestId = ensureRequestId(request.requestId);
|
|
787
|
-
const payload = create(CreateScheduleRequestSchema, {
|
|
829
|
+
const payload = create(CreateScheduleRequestSchema, {
|
|
830
|
+
...omitProtoMetadata(request),
|
|
831
|
+
namespace,
|
|
832
|
+
scheduleId,
|
|
833
|
+
requestId,
|
|
834
|
+
});
|
|
788
835
|
return await this.executeRpc('createSchedule', (rpcOptions) => this.workflowService.createSchedule(payload, rpcOptions), callOptions);
|
|
789
836
|
}, { namespace: request.namespace ?? this.namespace });
|
|
790
837
|
}
|
|
@@ -793,7 +840,7 @@ class TemporalClientImpl {
|
|
|
793
840
|
this.ensureOpen();
|
|
794
841
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
795
842
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
796
|
-
const payload = create(DescribeScheduleRequestSchema, { ...request, namespace, scheduleId });
|
|
843
|
+
const payload = create(DescribeScheduleRequestSchema, { ...omitProtoMetadata(request), namespace, scheduleId });
|
|
797
844
|
return await this.executeRpc('describeSchedule', (rpcOptions) => this.workflowService.describeSchedule(payload, rpcOptions), callOptions);
|
|
798
845
|
}, { namespace: request.namespace ?? this.namespace });
|
|
799
846
|
}
|
|
@@ -803,7 +850,12 @@ class TemporalClientImpl {
|
|
|
803
850
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
804
851
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
805
852
|
const requestId = ensureRequestId(request.requestId);
|
|
806
|
-
const payload = create(UpdateScheduleRequestSchema, {
|
|
853
|
+
const payload = create(UpdateScheduleRequestSchema, {
|
|
854
|
+
...omitProtoMetadata(request),
|
|
855
|
+
namespace,
|
|
856
|
+
scheduleId,
|
|
857
|
+
requestId,
|
|
858
|
+
});
|
|
807
859
|
return await this.executeRpc('updateSchedule', (rpcOptions) => this.workflowService.updateSchedule(payload, rpcOptions), callOptions);
|
|
808
860
|
}, { namespace: request.namespace ?? this.namespace });
|
|
809
861
|
}
|
|
@@ -813,7 +865,12 @@ class TemporalClientImpl {
|
|
|
813
865
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
814
866
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
815
867
|
const requestId = ensureRequestId(request.requestId);
|
|
816
|
-
const payload = create(PatchScheduleRequestSchema, {
|
|
868
|
+
const payload = create(PatchScheduleRequestSchema, {
|
|
869
|
+
...omitProtoMetadata(request),
|
|
870
|
+
namespace,
|
|
871
|
+
scheduleId,
|
|
872
|
+
requestId,
|
|
873
|
+
});
|
|
817
874
|
return await this.executeRpc('patchSchedule', (rpcOptions) => this.workflowService.patchSchedule(payload, rpcOptions), callOptions);
|
|
818
875
|
}, { namespace: request.namespace ?? this.namespace });
|
|
819
876
|
}
|
|
@@ -821,7 +878,7 @@ class TemporalClientImpl {
|
|
|
821
878
|
return this.#instrumentOperation('schedule.list', async () => {
|
|
822
879
|
this.ensureOpen();
|
|
823
880
|
const namespace = ensureNonEmptyString(request?.namespace ?? this.namespace, 'namespace');
|
|
824
|
-
const payload = create(ListSchedulesRequestSchema, { ...request, namespace });
|
|
881
|
+
const payload = create(ListSchedulesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
825
882
|
return await this.executeRpc('listSchedules', (rpcOptions) => this.workflowService.listSchedules(payload, rpcOptions), callOptions);
|
|
826
883
|
}, { namespace: request?.namespace ?? this.namespace });
|
|
827
884
|
}
|
|
@@ -830,7 +887,11 @@ class TemporalClientImpl {
|
|
|
830
887
|
this.ensureOpen();
|
|
831
888
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
832
889
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
833
|
-
const payload = create(ListScheduleMatchingTimesRequestSchema, {
|
|
890
|
+
const payload = create(ListScheduleMatchingTimesRequestSchema, {
|
|
891
|
+
...omitProtoMetadata(request),
|
|
892
|
+
namespace,
|
|
893
|
+
scheduleId,
|
|
894
|
+
});
|
|
834
895
|
return await this.executeRpc('listScheduleMatchingTimes', (rpcOptions) => this.workflowService.listScheduleMatchingTimes(payload, rpcOptions), callOptions);
|
|
835
896
|
}, { namespace: request.namespace ?? this.namespace });
|
|
836
897
|
}
|
|
@@ -839,7 +900,7 @@ class TemporalClientImpl {
|
|
|
839
900
|
this.ensureOpen();
|
|
840
901
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
841
902
|
const scheduleId = ensureNonEmptyString(request.scheduleId, 'scheduleId');
|
|
842
|
-
const payload = create(DeleteScheduleRequestSchema, { ...request, namespace, scheduleId });
|
|
903
|
+
const payload = create(DeleteScheduleRequestSchema, { ...omitProtoMetadata(request), namespace, scheduleId });
|
|
843
904
|
return await this.executeRpc('deleteSchedule', (rpcOptions) => this.workflowService.deleteSchedule(payload, rpcOptions), callOptions);
|
|
844
905
|
}, { namespace: request.namespace ?? this.namespace });
|
|
845
906
|
}
|
|
@@ -917,7 +978,10 @@ class TemporalClientImpl {
|
|
|
917
978
|
return this.#instrumentOperation('workflow.updateOptions', async () => {
|
|
918
979
|
this.ensureOpen();
|
|
919
980
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
920
|
-
const payload = create(UpdateWorkflowExecutionOptionsRequestSchema, {
|
|
981
|
+
const payload = create(UpdateWorkflowExecutionOptionsRequestSchema, {
|
|
982
|
+
...omitProtoMetadata(request),
|
|
983
|
+
namespace,
|
|
984
|
+
});
|
|
921
985
|
return await this.executeRpc('updateWorkflowExecutionOptions', (rpcOptions) => this.workflowService.updateWorkflowExecutionOptions(payload, rpcOptions), callOptions);
|
|
922
986
|
}, { namespace: request.namespace ?? this.namespace });
|
|
923
987
|
}
|
|
@@ -925,7 +989,7 @@ class TemporalClientImpl {
|
|
|
925
989
|
return this.#instrumentOperation('workflow.pause', async () => {
|
|
926
990
|
this.ensureOpen();
|
|
927
991
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
928
|
-
const payload = create(PauseWorkflowExecutionRequestSchema, { ...request, namespace });
|
|
992
|
+
const payload = create(PauseWorkflowExecutionRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
929
993
|
return await this.executeRpc('pauseWorkflowExecution', (rpcOptions) => this.workflowService.pauseWorkflowExecution(payload, rpcOptions), callOptions);
|
|
930
994
|
}, { namespace: request.namespace ?? this.namespace });
|
|
931
995
|
}
|
|
@@ -933,7 +997,7 @@ class TemporalClientImpl {
|
|
|
933
997
|
return this.#instrumentOperation('workflow.unpause', async () => {
|
|
934
998
|
this.ensureOpen();
|
|
935
999
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
936
|
-
const payload = create(UnpauseWorkflowExecutionRequestSchema, { ...request, namespace });
|
|
1000
|
+
const payload = create(UnpauseWorkflowExecutionRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
937
1001
|
return await this.executeRpc('unpauseWorkflowExecution', (rpcOptions) => this.workflowService.unpauseWorkflowExecution(payload, rpcOptions), callOptions);
|
|
938
1002
|
}, { namespace: request.namespace ?? this.namespace });
|
|
939
1003
|
}
|
|
@@ -941,7 +1005,7 @@ class TemporalClientImpl {
|
|
|
941
1005
|
return this.#instrumentOperation('workflow.resetStickyTaskQueue', async () => {
|
|
942
1006
|
this.ensureOpen();
|
|
943
1007
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
944
|
-
const payload = create(ResetStickyTaskQueueRequestSchema, { ...request, namespace });
|
|
1008
|
+
const payload = create(ResetStickyTaskQueueRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
945
1009
|
return await this.executeRpc('resetStickyTaskQueue', (rpcOptions) => this.workflowService.resetStickyTaskQueue(payload, rpcOptions), callOptions);
|
|
946
1010
|
}, { namespace: request.namespace ?? this.namespace });
|
|
947
1011
|
}
|
|
@@ -949,7 +1013,7 @@ class TemporalClientImpl {
|
|
|
949
1013
|
return this.#instrumentOperation('worker.list', async () => {
|
|
950
1014
|
this.ensureOpen();
|
|
951
1015
|
const namespace = ensureNonEmptyString(request?.namespace ?? this.namespace, 'namespace');
|
|
952
|
-
const payload = create(ListWorkersRequestSchema, { ...request, namespace });
|
|
1016
|
+
const payload = create(ListWorkersRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
953
1017
|
return await this.executeRpc('listWorkers', (rpcOptions) => this.workflowService.listWorkers(payload, rpcOptions), callOptions);
|
|
954
1018
|
}, { namespace: request?.namespace ?? this.namespace });
|
|
955
1019
|
}
|
|
@@ -957,7 +1021,7 @@ class TemporalClientImpl {
|
|
|
957
1021
|
return this.#instrumentOperation('worker.describe', async () => {
|
|
958
1022
|
this.ensureOpen();
|
|
959
1023
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
960
|
-
const payload = create(DescribeWorkerRequestSchema, { ...request, namespace });
|
|
1024
|
+
const payload = create(DescribeWorkerRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
961
1025
|
return await this.executeRpc('describeWorker', (rpcOptions) => this.workflowService.describeWorker(payload, rpcOptions), callOptions);
|
|
962
1026
|
}, { namespace: request.namespace ?? this.namespace });
|
|
963
1027
|
}
|
|
@@ -965,7 +1029,7 @@ class TemporalClientImpl {
|
|
|
965
1029
|
return this.#instrumentOperation('worker.fetchConfig', async () => {
|
|
966
1030
|
this.ensureOpen();
|
|
967
1031
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
968
|
-
const payload = create(FetchWorkerConfigRequestSchema, { ...request, namespace });
|
|
1032
|
+
const payload = create(FetchWorkerConfigRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
969
1033
|
return await this.executeRpc('fetchWorkerConfig', (rpcOptions) => this.workflowService.fetchWorkerConfig(payload, rpcOptions), callOptions);
|
|
970
1034
|
}, { namespace: request.namespace ?? this.namespace });
|
|
971
1035
|
}
|
|
@@ -973,7 +1037,7 @@ class TemporalClientImpl {
|
|
|
973
1037
|
return this.#instrumentOperation('worker.updateConfig', async () => {
|
|
974
1038
|
this.ensureOpen();
|
|
975
1039
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
976
|
-
const payload = create(UpdateWorkerConfigRequestSchema, { ...request, namespace });
|
|
1040
|
+
const payload = create(UpdateWorkerConfigRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
977
1041
|
return await this.executeRpc('updateWorkerConfig', (rpcOptions) => this.workflowService.updateWorkerConfig(payload, rpcOptions), callOptions);
|
|
978
1042
|
}, { namespace: request.namespace ?? this.namespace });
|
|
979
1043
|
}
|
|
@@ -981,7 +1045,7 @@ class TemporalClientImpl {
|
|
|
981
1045
|
return this.#instrumentOperation('worker.updateTaskQueueConfig', async () => {
|
|
982
1046
|
this.ensureOpen();
|
|
983
1047
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
984
|
-
const payload = create(UpdateTaskQueueConfigRequestSchema, { ...request, namespace });
|
|
1048
|
+
const payload = create(UpdateTaskQueueConfigRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
985
1049
|
return await this.executeRpc('updateTaskQueueConfig', (rpcOptions) => this.workflowService.updateTaskQueueConfig(payload, rpcOptions), callOptions);
|
|
986
1050
|
}, { namespace: request.namespace ?? this.namespace });
|
|
987
1051
|
}
|
|
@@ -989,7 +1053,7 @@ class TemporalClientImpl {
|
|
|
989
1053
|
return this.#instrumentOperation('worker.getVersioningRules', async () => {
|
|
990
1054
|
this.ensureOpen();
|
|
991
1055
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
992
|
-
const payload = create(GetWorkerVersioningRulesRequestSchema, { ...request, namespace });
|
|
1056
|
+
const payload = create(GetWorkerVersioningRulesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
993
1057
|
return await this.executeRpc('getWorkerVersioningRules', (rpcOptions) => this.workflowService.getWorkerVersioningRules(payload, rpcOptions), callOptions);
|
|
994
1058
|
}, { namespace: request.namespace ?? this.namespace });
|
|
995
1059
|
}
|
|
@@ -997,7 +1061,7 @@ class TemporalClientImpl {
|
|
|
997
1061
|
return this.#instrumentOperation('worker.updateVersioningRules', async () => {
|
|
998
1062
|
this.ensureOpen();
|
|
999
1063
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1000
|
-
const payload = create(UpdateWorkerVersioningRulesRequestSchema, { ...request, namespace });
|
|
1064
|
+
const payload = create(UpdateWorkerVersioningRulesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1001
1065
|
return await this.executeRpc('updateWorkerVersioningRules', (rpcOptions) => this.workflowService.updateWorkerVersioningRules(payload, rpcOptions), callOptions);
|
|
1002
1066
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1003
1067
|
}
|
|
@@ -1005,7 +1069,7 @@ class TemporalClientImpl {
|
|
|
1005
1069
|
return this.#instrumentOperation('deployment.listWorkerDeployments', async () => {
|
|
1006
1070
|
this.ensureOpen();
|
|
1007
1071
|
const namespace = ensureNonEmptyString(request?.namespace ?? this.namespace, 'namespace');
|
|
1008
|
-
const payload = create(ListWorkerDeploymentsRequestSchema, { ...request, namespace });
|
|
1072
|
+
const payload = create(ListWorkerDeploymentsRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1009
1073
|
return await this.executeRpc('listWorkerDeployments', (rpcOptions) => this.workflowService.listWorkerDeployments(payload, rpcOptions), callOptions);
|
|
1010
1074
|
}, { namespace: request?.namespace ?? this.namespace });
|
|
1011
1075
|
}
|
|
@@ -1024,7 +1088,7 @@ class TemporalClientImpl {
|
|
|
1024
1088
|
return this.#instrumentOperation('deployment.list', async () => {
|
|
1025
1089
|
this.ensureOpen();
|
|
1026
1090
|
const namespace = ensureNonEmptyString(request?.namespace ?? this.namespace, 'namespace');
|
|
1027
|
-
const payload = create(ListDeploymentsRequestSchema, { ...request, namespace });
|
|
1091
|
+
const payload = create(ListDeploymentsRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1028
1092
|
return await this.executeRpc('listDeployments', (rpcOptions) => this.workflowService.listDeployments(payload, rpcOptions), callOptions);
|
|
1029
1093
|
}, { namespace: request?.namespace ?? this.namespace });
|
|
1030
1094
|
}
|
|
@@ -1032,7 +1096,7 @@ class TemporalClientImpl {
|
|
|
1032
1096
|
return this.#instrumentOperation('deployment.describe', async () => {
|
|
1033
1097
|
this.ensureOpen();
|
|
1034
1098
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1035
|
-
const payload = create(DescribeDeploymentRequestSchema, { ...request, namespace });
|
|
1099
|
+
const payload = create(DescribeDeploymentRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1036
1100
|
return await this.executeRpc('describeDeployment', (rpcOptions) => this.workflowService.describeDeployment(payload, rpcOptions), callOptions);
|
|
1037
1101
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1038
1102
|
}
|
|
@@ -1040,7 +1104,7 @@ class TemporalClientImpl {
|
|
|
1040
1104
|
return this.#instrumentOperation('deployment.getCurrent', async () => {
|
|
1041
1105
|
this.ensureOpen();
|
|
1042
1106
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1043
|
-
const payload = create(GetCurrentDeploymentRequestSchema, { ...request, namespace });
|
|
1107
|
+
const payload = create(GetCurrentDeploymentRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1044
1108
|
return await this.executeRpc('getCurrentDeployment', (rpcOptions) => this.workflowService.getCurrentDeployment(payload, rpcOptions), callOptions);
|
|
1045
1109
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1046
1110
|
}
|
|
@@ -1048,7 +1112,7 @@ class TemporalClientImpl {
|
|
|
1048
1112
|
return this.#instrumentOperation('deployment.setCurrent', async () => {
|
|
1049
1113
|
this.ensureOpen();
|
|
1050
1114
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1051
|
-
const payload = create(SetCurrentDeploymentRequestSchema, { ...request, namespace });
|
|
1115
|
+
const payload = create(SetCurrentDeploymentRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1052
1116
|
return await this.executeRpc('setCurrentDeployment', (rpcOptions) => this.workflowService.setCurrentDeployment(payload, rpcOptions), callOptions);
|
|
1053
1117
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1054
1118
|
}
|
|
@@ -1056,7 +1120,7 @@ class TemporalClientImpl {
|
|
|
1056
1120
|
return this.#instrumentOperation('deployment.reachability', async () => {
|
|
1057
1121
|
this.ensureOpen();
|
|
1058
1122
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1059
|
-
const payload = create(GetDeploymentReachabilityRequestSchema, { ...request, namespace });
|
|
1123
|
+
const payload = create(GetDeploymentReachabilityRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1060
1124
|
return await this.executeRpc('getDeploymentReachability', (rpcOptions) => this.workflowService.getDeploymentReachability(payload, rpcOptions), callOptions);
|
|
1061
1125
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1062
1126
|
}
|
|
@@ -1099,7 +1163,10 @@ class TemporalClientImpl {
|
|
|
1099
1163
|
return this.#instrumentOperation('deployment.updateVersionMetadata', async () => {
|
|
1100
1164
|
this.ensureOpen();
|
|
1101
1165
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1102
|
-
const payload = create(UpdateWorkerDeploymentVersionMetadataRequestSchema, {
|
|
1166
|
+
const payload = create(UpdateWorkerDeploymentVersionMetadataRequestSchema, {
|
|
1167
|
+
...omitProtoMetadata(request),
|
|
1168
|
+
namespace,
|
|
1169
|
+
});
|
|
1103
1170
|
return await this.executeRpc('updateWorkerDeploymentVersionMetadata', (rpcOptions) => this.workflowService.updateWorkerDeploymentVersionMetadata(payload, rpcOptions), callOptions);
|
|
1104
1171
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1105
1172
|
}
|
|
@@ -1107,7 +1174,7 @@ class TemporalClientImpl {
|
|
|
1107
1174
|
return this.#instrumentOperation('deployment.deleteVersion', async () => {
|
|
1108
1175
|
this.ensureOpen();
|
|
1109
1176
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1110
|
-
const payload = create(DeleteWorkerDeploymentVersionRequestSchema, { ...request, namespace });
|
|
1177
|
+
const payload = create(DeleteWorkerDeploymentVersionRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1111
1178
|
return await this.executeRpc('deleteWorkerDeploymentVersion', (rpcOptions) => this.workflowService.deleteWorkerDeploymentVersion(payload, rpcOptions), callOptions);
|
|
1112
1179
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1113
1180
|
}
|
|
@@ -1115,7 +1182,7 @@ class TemporalClientImpl {
|
|
|
1115
1182
|
return this.#instrumentOperation('deployment.delete', async () => {
|
|
1116
1183
|
this.ensureOpen();
|
|
1117
1184
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1118
|
-
const payload = create(DeleteWorkerDeploymentRequestSchema, { ...request, namespace });
|
|
1185
|
+
const payload = create(DeleteWorkerDeploymentRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1119
1186
|
return await this.executeRpc('deleteWorkerDeployment', (rpcOptions) => this.workflowService.deleteWorkerDeployment(payload, rpcOptions), callOptions);
|
|
1120
1187
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1121
1188
|
}
|
|
@@ -1123,7 +1190,7 @@ class TemporalClientImpl {
|
|
|
1123
1190
|
return this.#instrumentOperation('deployment.setManager', async () => {
|
|
1124
1191
|
this.ensureOpen();
|
|
1125
1192
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1126
|
-
const payload = create(SetWorkerDeploymentManagerRequestSchema, { ...request, namespace });
|
|
1193
|
+
const payload = create(SetWorkerDeploymentManagerRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1127
1194
|
return await this.executeRpc('setWorkerDeploymentManager', (rpcOptions) => this.workflowService.setWorkerDeploymentManager(payload, rpcOptions), callOptions);
|
|
1128
1195
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1129
1196
|
}
|
|
@@ -1132,7 +1199,7 @@ class TemporalClientImpl {
|
|
|
1132
1199
|
this.ensureOpen();
|
|
1133
1200
|
const operator = this.#requireOperatorService();
|
|
1134
1201
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1135
|
-
const payload = create(AddSearchAttributesRequestSchema, { ...request, namespace });
|
|
1202
|
+
const payload = create(AddSearchAttributesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1136
1203
|
return await this.executeRpc('addSearchAttributes', (rpcOptions) => operator.addSearchAttributes(payload, rpcOptions), callOptions);
|
|
1137
1204
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1138
1205
|
}
|
|
@@ -1141,7 +1208,7 @@ class TemporalClientImpl {
|
|
|
1141
1208
|
this.ensureOpen();
|
|
1142
1209
|
const operator = this.#requireOperatorService();
|
|
1143
1210
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1144
|
-
const payload = create(RemoveSearchAttributesRequestSchema, { ...request, namespace });
|
|
1211
|
+
const payload = create(RemoveSearchAttributesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1145
1212
|
return await this.executeRpc('removeSearchAttributes', (rpcOptions) => operator.removeSearchAttributes(payload, rpcOptions), callOptions);
|
|
1146
1213
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1147
1214
|
}
|
|
@@ -1150,7 +1217,7 @@ class TemporalClientImpl {
|
|
|
1150
1217
|
this.ensureOpen();
|
|
1151
1218
|
const operator = this.#requireOperatorService();
|
|
1152
1219
|
const namespace = ensureNonEmptyString(request.namespace ?? this.namespace, 'namespace');
|
|
1153
|
-
const payload = create(ListSearchAttributesRequestSchema, { ...request, namespace });
|
|
1220
|
+
const payload = create(ListSearchAttributesRequestSchema, { ...omitProtoMetadata(request), namespace });
|
|
1154
1221
|
return await this.executeRpc('listSearchAttributes', (rpcOptions) => operator.listSearchAttributes(payload, rpcOptions), callOptions);
|
|
1155
1222
|
}, { namespace: request.namespace ?? this.namespace });
|
|
1156
1223
|
}
|