@camunda8/orchestration-cluster-api 10.0.0-alpha.27 → 10.0.0-alpha.28

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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ # [10.0.0-alpha.28](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.27...v10.0.0-alpha.28) (2026-08-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **examples:** group plannedChanges by physical tenant ([d494ce7](https://github.com/camunda/orchestration-cluster-api-js/commit/d494ce716fa83a6ef4d406dd77d9e0ffc0797f35))
7
+ * **examples:** group plannedChanges by physical tenant ([525c176](https://github.com/camunda/orchestration-cluster-api-js/commit/525c1760c6f9fe6f7ef0efb06fd6eefa95f2cc8d))
8
+
9
+
10
+ ### Features
11
+
12
+ * **examples:** add cluster admin and history backup example coverage ([185071c](https://github.com/camunda/orchestration-cluster-api-js/commit/185071c9a62eb7d8cf24f903ca36d66342c4e2bf))
13
+
1
14
  # [10.0.0-alpha.27](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.26...v10.0.0-alpha.27) (2026-08-12)
2
15
 
3
16
 
@@ -1731,6 +1731,38 @@ var getRuntimeBackup = (options) => (options.client ?? client).get({
1731
1731
  url: "/backups/runtime/{backupId}",
1732
1732
  ...options
1733
1733
  });
1734
+ var listHistoryBackups = (options) => (options?.client ?? client).get({
1735
+ requestValidator: void 0,
1736
+ responseValidator: void 0,
1737
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
1738
+ url: "/backups/history",
1739
+ ...options
1740
+ });
1741
+ var takeHistoryBackup = (options) => (options.client ?? client).post({
1742
+ requestValidator: void 0,
1743
+ responseValidator: void 0,
1744
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
1745
+ url: "/backups/history",
1746
+ ...options,
1747
+ headers: {
1748
+ "Content-Type": "application/json",
1749
+ ...options.headers
1750
+ }
1751
+ });
1752
+ var deleteHistoryBackup = (options) => (options.client ?? client).delete({
1753
+ requestValidator: void 0,
1754
+ responseValidator: void 0,
1755
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
1756
+ url: "/backups/history/{backupId}",
1757
+ ...options
1758
+ });
1759
+ var getHistoryBackup = (options) => (options.client ?? client).get({
1760
+ requestValidator: void 0,
1761
+ responseValidator: void 0,
1762
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
1763
+ url: "/backups/history/{backupId}",
1764
+ ...options
1765
+ });
1734
1766
  var searchBatchOperationItems = (options) => (options?.client ?? client).post({
1735
1767
  requestValidator: void 0,
1736
1768
  responseValidator: void 0,
@@ -3179,12 +3211,6 @@ var getStatus = (options) => (options?.client ?? client).get({
3179
3211
  url: "/status",
3180
3212
  ...options
3181
3213
  });
3182
- var getClusterStatus = (options) => (options?.client ?? client).get({
3183
- requestValidator: void 0,
3184
- responseValidator: void 0,
3185
- url: "/cluster/v2/status",
3186
- ...options
3187
- });
3188
3214
  var getUsageMetrics = (options) => (options.client ?? client).get({
3189
3215
  requestValidator: void 0,
3190
3216
  responseValidator: void 0,
@@ -3403,6 +3429,19 @@ var restore = (options) => (options.client ?? client).post({
3403
3429
  ...options.headers
3404
3430
  }
3405
3431
  });
3432
+ var changeClusterModeAsClusterAdmin = (options) => (options.client ?? client).patch({
3433
+ requestValidator: void 0,
3434
+ responseValidator: void 0,
3435
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3436
+ url: "/cluster/v2/mode",
3437
+ ...options
3438
+ });
3439
+ var getClusterStatus = (options) => (options?.client ?? client).get({
3440
+ requestValidator: void 0,
3441
+ responseValidator: void 0,
3442
+ url: "/cluster/v2/status",
3443
+ ...options
3444
+ });
3406
3445
  var createUser = (options) => (options.client ?? client).post({
3407
3446
  requestValidator: void 0,
3408
3447
  responseValidator: void 0,
@@ -4917,7 +4956,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
4917
4956
  }
4918
4957
 
4919
4958
  // src/runtime/version.ts
4920
- var packageVersion = "10.0.0-alpha.27";
4959
+ var packageVersion = "10.0.0-alpha.28";
4921
4960
 
4922
4961
  // src/runtime/supportLogger.ts
4923
4962
  var NoopSupportLogger = class {
@@ -6632,7 +6671,7 @@ function deepFreeze2(obj) {
6632
6671
  }
6633
6672
  return obj;
6634
6673
  }
6635
- var VOID_RESPONSES = /* @__PURE__ */ new Set(["zDeleteAuthorizationResponse", "zUpdateAuthorizationResponse", "zDeleteRuntimeBackupStateResponse", "zDeleteRuntimeBackupResponse", "zCancelBatchOperationResponse", "zResumeBatchOperationResponse", "zSuspendBatchOperationResponse", "zPinClockResponse", "zResetClockResponse", "zDeleteGlobalClusterVariableResponse", "zDeleteTenantClusterVariableResponse", "zDeleteDecisionInstanceResponse", "zDeleteDocumentResponse", "zActivateAdHocSubProcessActivitiesResponse", "zCreateElementInstanceVariablesResponse", "zPauseExportingResponse", "zResumeExportingResponse", "zDeleteGlobalTaskListenerResponse", "zDeleteGroupResponse", "zUnassignClientFromGroupResponse", "zAssignClientToGroupResponse", "zUnassignMappingRuleFromGroupResponse", "zAssignMappingRuleToGroupResponse", "zUnassignUserFromGroupResponse", "zAssignUserToGroupResponse", "zResolveIncidentResponse", "zUpdateJobResponse", "zCompleteJobResponse", "zThrowJobErrorResponse", "zFailJobResponse", "zDeleteMappingRuleResponse", "zAssignProcessInstanceBusinessIdResponse", "zCancelProcessInstanceResponse", "zDeleteProcessInstanceResponse", "zMigrateProcessInstanceResponse", "zModifyProcessInstanceResponse", "zResumeProcessInstanceResponse", "zSuspendProcessInstanceResponse", "zDeleteRoleResponse", "zUnassignRoleFromClientResponse", "zAssignRoleToClientResponse", "zUnassignRoleFromGroupResponse", "zAssignRoleToGroupResponse", "zUnassignRoleFromMappingRuleResponse", "zAssignRoleToMappingRuleResponse", "zUnassignRoleFromUserResponse", "zAssignRoleToUserResponse", "zGetStatusResponse", "zDeleteTenantResponse", "zUnassignClientFromTenantResponse", "zAssignClientToTenantResponse", "zUnassignGroupFromTenantResponse", "zAssignGroupToTenantResponse", "zUnassignMappingRuleFromTenantResponse", "zAssignMappingRuleToTenantResponse", "zUnassignRoleFromTenantResponse", "zAssignRoleToTenantResponse", "zUnassignUserFromTenantResponse", "zAssignUserToTenantResponse", "zDeleteUserResponse", "zUpdateUserTaskResponse", "zUnassignUserTaskResponse", "zAssignUserTaskResponse", "zCompleteUserTaskResponse"]);
6674
+ var VOID_RESPONSES = /* @__PURE__ */ new Set(["zDeleteAuthorizationResponse", "zUpdateAuthorizationResponse", "zDeleteRuntimeBackupStateResponse", "zDeleteRuntimeBackupResponse", "zDeleteHistoryBackupResponse", "zCancelBatchOperationResponse", "zResumeBatchOperationResponse", "zSuspendBatchOperationResponse", "zPinClockResponse", "zResetClockResponse", "zDeleteGlobalClusterVariableResponse", "zDeleteTenantClusterVariableResponse", "zDeleteDecisionInstanceResponse", "zDeleteDocumentResponse", "zActivateAdHocSubProcessActivitiesResponse", "zCreateElementInstanceVariablesResponse", "zPauseExportingResponse", "zResumeExportingResponse", "zDeleteGlobalTaskListenerResponse", "zDeleteGroupResponse", "zUnassignClientFromGroupResponse", "zAssignClientToGroupResponse", "zUnassignMappingRuleFromGroupResponse", "zAssignMappingRuleToGroupResponse", "zUnassignUserFromGroupResponse", "zAssignUserToGroupResponse", "zResolveIncidentResponse", "zUpdateJobResponse", "zCompleteJobResponse", "zThrowJobErrorResponse", "zFailJobResponse", "zDeleteMappingRuleResponse", "zAssignProcessInstanceBusinessIdResponse", "zCancelProcessInstanceResponse", "zDeleteProcessInstanceResponse", "zMigrateProcessInstanceResponse", "zModifyProcessInstanceResponse", "zResumeProcessInstanceResponse", "zSuspendProcessInstanceResponse", "zDeleteRoleResponse", "zUnassignRoleFromClientResponse", "zAssignRoleToClientResponse", "zUnassignRoleFromGroupResponse", "zAssignRoleToGroupResponse", "zUnassignRoleFromMappingRuleResponse", "zAssignRoleToMappingRuleResponse", "zUnassignRoleFromUserResponse", "zAssignRoleToUserResponse", "zGetStatusResponse", "zDeleteTenantResponse", "zUnassignClientFromTenantResponse", "zAssignClientToTenantResponse", "zUnassignGroupFromTenantResponse", "zAssignGroupToTenantResponse", "zUnassignMappingRuleFromTenantResponse", "zAssignMappingRuleToTenantResponse", "zUnassignRoleFromTenantResponse", "zAssignRoleToTenantResponse", "zUnassignUserFromTenantResponse", "zAssignUserToTenantResponse", "zDeleteUserResponse", "zUpdateUserTaskResponse", "zUnassignUserTaskResponse", "zAssignUserTaskResponse", "zCompleteUserTaskResponse"]);
6636
6675
  var CancelError = class extends Error {
6637
6676
  constructor() {
6638
6677
  super("Cancelled");
@@ -6936,7 +6975,7 @@ var CamundaClient = class {
6936
6975
  _schemasPromise = null;
6937
6976
  _loadSchemas() {
6938
6977
  if (!this._schemasPromise) {
6939
- this._schemasPromise = import("./zod.gen-MZNYXG52.js");
6978
+ this._schemasPromise = import("./zod.gen-AXFHZMWR.js");
6940
6979
  }
6941
6980
  return this._schemasPromise;
6942
6981
  }
@@ -8189,6 +8228,60 @@ var CamundaClient = class {
8189
8228
  return this._invokeWithRetry(() => call(), { opId: "changeClusterMode", exempt: false, retryOverride: options?.retry });
8190
8229
  });
8191
8230
  }
8231
+ changeClusterModeAsClusterAdmin(arg, options) {
8232
+ return toCancelable2(async (signal) => {
8233
+ const { mode, physicalTenantId, dryRun } = arg || {};
8234
+ let envelope = {};
8235
+ envelope.query = { mode, physicalTenantId, dryRun };
8236
+ if (this._validation.settings.req !== "none") {
8237
+ const _schemas = await this._loadSchemas();
8238
+ if (envelope.query !== void 0) {
8239
+ const maybeQuery = await this._validation.gateRequest("changeClusterModeAsClusterAdmin", _schemas.zChangeClusterModeAsClusterAdminQuery, envelope.query);
8240
+ if (this._validation.settings.req === "strict") envelope.query = maybeQuery;
8241
+ }
8242
+ }
8243
+ const opts = { client: this._client, signal, throwOnError: false };
8244
+ if (envelope.query) opts.query = envelope.query;
8245
+ const call = async () => {
8246
+ try {
8247
+ const _raw = await changeClusterModeAsClusterAdmin(opts);
8248
+ let data = this._evaluateResponse(_raw, "changeClusterModeAsClusterAdmin", (resp) => {
8249
+ const st = resp.status ?? resp.response?.status;
8250
+ if (!st) return void 0;
8251
+ const candidate = st === 429 || st === 503 || st === 500;
8252
+ if (!candidate) return void 0;
8253
+ let prob = void 0;
8254
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
8255
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
8256
+ err.status = st;
8257
+ err.name = "HttpSdkError";
8258
+ if (prob) {
8259
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
8260
+ }
8261
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
8262
+ if (!isBp) err.nonRetryable = true;
8263
+ return err;
8264
+ });
8265
+ const _respSchemaName = "zChangeClusterModeAsClusterAdminResponse";
8266
+ if (this._isVoidResponse(_respSchemaName)) {
8267
+ data = void 0;
8268
+ }
8269
+ if (this._validation.settings.res !== "none") {
8270
+ const _schemas = await this._loadSchemas();
8271
+ const _schema = _schemas.zChangeClusterModeAsClusterAdminResponse;
8272
+ if (_schema) {
8273
+ const maybeR = await this._validation.gateResponse("changeClusterModeAsClusterAdmin", _schema, data);
8274
+ if (this._validation.settings.res === "strict") data = maybeR;
8275
+ }
8276
+ }
8277
+ return data;
8278
+ } catch (e) {
8279
+ throw e;
8280
+ }
8281
+ };
8282
+ return this._invokeWithRetry(() => call(), { opId: "changeClusterModeAsClusterAdmin", exempt: false, retryOverride: options?.retry });
8283
+ });
8284
+ }
8192
8285
  completeJob(arg, options) {
8193
8286
  return toCancelable2(async (signal) => {
8194
8287
  const { jobKey, ..._body } = arg || {};
@@ -9793,6 +9886,60 @@ var CamundaClient = class {
9793
9886
  return this._invokeWithRetry(() => call(), { opId: "deleteGroup", exempt: false, retryOverride: options?.retry });
9794
9887
  });
9795
9888
  }
9889
+ deleteHistoryBackup(arg, options) {
9890
+ return toCancelable2(async (signal) => {
9891
+ const { backupId } = arg || {};
9892
+ let envelope = {};
9893
+ envelope.path = { backupId };
9894
+ if (this._validation.settings.req !== "none") {
9895
+ const _schemas = await this._loadSchemas();
9896
+ if (envelope.path !== void 0) {
9897
+ const maybePath = await this._validation.gateRequest("deleteHistoryBackup", _schemas.zDeleteHistoryBackupPath, envelope.path);
9898
+ if (this._validation.settings.req === "strict") envelope.path = maybePath;
9899
+ }
9900
+ }
9901
+ const opts = { client: this._client, signal, throwOnError: false };
9902
+ if (envelope.path) opts.path = envelope.path;
9903
+ const call = async () => {
9904
+ try {
9905
+ const _raw = await deleteHistoryBackup(opts);
9906
+ let data = this._evaluateResponse(_raw, "deleteHistoryBackup", (resp) => {
9907
+ const st = resp.status ?? resp.response?.status;
9908
+ if (!st) return void 0;
9909
+ const candidate = st === 429 || st === 503 || st === 500;
9910
+ if (!candidate) return void 0;
9911
+ let prob = void 0;
9912
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
9913
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
9914
+ err.status = st;
9915
+ err.name = "HttpSdkError";
9916
+ if (prob) {
9917
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
9918
+ }
9919
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
9920
+ if (!isBp) err.nonRetryable = true;
9921
+ return err;
9922
+ });
9923
+ const _respSchemaName = "zDeleteHistoryBackupResponse";
9924
+ if (this._isVoidResponse(_respSchemaName)) {
9925
+ data = void 0;
9926
+ }
9927
+ if (this._validation.settings.res !== "none") {
9928
+ const _schemas = await this._loadSchemas();
9929
+ const _schema = _schemas.zDeleteHistoryBackupResponse;
9930
+ if (_schema) {
9931
+ const maybeR = await this._validation.gateResponse("deleteHistoryBackup", _schema, data);
9932
+ if (this._validation.settings.res === "strict") data = maybeR;
9933
+ }
9934
+ }
9935
+ return data;
9936
+ } catch (e) {
9937
+ throw e;
9938
+ }
9939
+ };
9940
+ return this._invokeWithRetry(() => call(), { opId: "deleteHistoryBackup", exempt: false, retryOverride: options?.retry });
9941
+ });
9942
+ }
9796
9943
  deleteMappingRule(arg, options) {
9797
9944
  return toCancelable2(async (signal) => {
9798
9945
  const { mappingRuleId } = arg || {};
@@ -11685,6 +11832,60 @@ var CamundaClient = class {
11685
11832
  return invoke();
11686
11833
  });
11687
11834
  }
11835
+ getHistoryBackup(arg, options) {
11836
+ return toCancelable2(async (signal) => {
11837
+ const { backupId } = arg || {};
11838
+ let envelope = {};
11839
+ envelope.path = { backupId };
11840
+ if (this._validation.settings.req !== "none") {
11841
+ const _schemas = await this._loadSchemas();
11842
+ if (envelope.path !== void 0) {
11843
+ const maybePath = await this._validation.gateRequest("getHistoryBackup", _schemas.zGetHistoryBackupPath, envelope.path);
11844
+ if (this._validation.settings.req === "strict") envelope.path = maybePath;
11845
+ }
11846
+ }
11847
+ const opts = { client: this._client, signal, throwOnError: false };
11848
+ if (envelope.path) opts.path = envelope.path;
11849
+ const call = async () => {
11850
+ try {
11851
+ const _raw = await getHistoryBackup(opts);
11852
+ let data = this._evaluateResponse(_raw, "getHistoryBackup", (resp) => {
11853
+ const st = resp.status ?? resp.response?.status;
11854
+ if (!st) return void 0;
11855
+ const candidate = st === 429 || st === 503 || st === 500;
11856
+ if (!candidate) return void 0;
11857
+ let prob = void 0;
11858
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
11859
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
11860
+ err.status = st;
11861
+ err.name = "HttpSdkError";
11862
+ if (prob) {
11863
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
11864
+ }
11865
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
11866
+ if (!isBp) err.nonRetryable = true;
11867
+ return err;
11868
+ });
11869
+ const _respSchemaName = "zGetHistoryBackupResponse";
11870
+ if (this._isVoidResponse(_respSchemaName)) {
11871
+ data = void 0;
11872
+ }
11873
+ if (this._validation.settings.res !== "none") {
11874
+ const _schemas = await this._loadSchemas();
11875
+ const _schema = _schemas.zGetHistoryBackupResponse;
11876
+ if (_schema) {
11877
+ const maybeR = await this._validation.gateResponse("getHistoryBackup", _schema, data);
11878
+ if (this._validation.settings.res === "strict") data = maybeR;
11879
+ }
11880
+ }
11881
+ return data;
11882
+ } catch (e) {
11883
+ throw e;
11884
+ }
11885
+ };
11886
+ return this._invokeWithRetry(() => call(), { opId: "getHistoryBackup", exempt: false, retryOverride: options?.retry });
11887
+ });
11888
+ }
11688
11889
  getIncident(arg, consistencyManagement, options) {
11689
11890
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
11690
11891
  const useConsistency = consistencyManagement.consistency;
@@ -13801,6 +14002,60 @@ var CamundaClient = class {
13801
14002
  return invoke();
13802
14003
  });
13803
14004
  }
14005
+ listHistoryBackups(arg, options) {
14006
+ return toCancelable2(async (signal) => {
14007
+ const { prefix, verbose } = arg || {};
14008
+ let envelope = {};
14009
+ envelope.query = { prefix, verbose };
14010
+ if (this._validation.settings.req !== "none") {
14011
+ const _schemas = await this._loadSchemas();
14012
+ if (envelope.query !== void 0) {
14013
+ const maybeQuery = await this._validation.gateRequest("listHistoryBackups", _schemas.zListHistoryBackupsQuery, envelope.query);
14014
+ if (this._validation.settings.req === "strict") envelope.query = maybeQuery;
14015
+ }
14016
+ }
14017
+ const opts = { client: this._client, signal, throwOnError: false };
14018
+ if (envelope.query) opts.query = envelope.query;
14019
+ const call = async () => {
14020
+ try {
14021
+ const _raw = await listHistoryBackups(opts);
14022
+ let data = this._evaluateResponse(_raw, "listHistoryBackups", (resp) => {
14023
+ const st = resp.status ?? resp.response?.status;
14024
+ if (!st) return void 0;
14025
+ const candidate = st === 429 || st === 503 || st === 500;
14026
+ if (!candidate) return void 0;
14027
+ let prob = void 0;
14028
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
14029
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
14030
+ err.status = st;
14031
+ err.name = "HttpSdkError";
14032
+ if (prob) {
14033
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
14034
+ }
14035
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
14036
+ if (!isBp) err.nonRetryable = true;
14037
+ return err;
14038
+ });
14039
+ const _respSchemaName = "zListHistoryBackupsResponse";
14040
+ if (this._isVoidResponse(_respSchemaName)) {
14041
+ data = void 0;
14042
+ }
14043
+ if (this._validation.settings.res !== "none") {
14044
+ const _schemas = await this._loadSchemas();
14045
+ const _schema = _schemas.zListHistoryBackupsResponse;
14046
+ if (_schema) {
14047
+ const maybeR = await this._validation.gateResponse("listHistoryBackups", _schema, data);
14048
+ if (this._validation.settings.res === "strict") data = maybeR;
14049
+ }
14050
+ }
14051
+ return data;
14052
+ } catch (e) {
14053
+ throw e;
14054
+ }
14055
+ };
14056
+ return this._invokeWithRetry(() => call(), { opId: "listHistoryBackups", exempt: false, retryOverride: options?.retry });
14057
+ });
14058
+ }
13804
14059
  listRuntimeBackups(arg, options) {
13805
14060
  return toCancelable2(async (signal) => {
13806
14061
  const { prefix } = arg || {};
@@ -14570,8 +14825,9 @@ var CamundaClient = class {
14570
14825
  }
14571
14826
  restore(arg, options) {
14572
14827
  return toCancelable2(async (signal) => {
14573
- const _body = arg;
14828
+ const { dryRun, ..._body } = arg || {};
14574
14829
  let envelope = {};
14830
+ envelope.query = { dryRun };
14575
14831
  envelope.body = _body;
14576
14832
  if (this._validation.settings.req !== "none") {
14577
14833
  const _schemas = await this._loadSchemas();
@@ -14585,6 +14841,7 @@ var CamundaClient = class {
14585
14841
  }
14586
14842
  }
14587
14843
  const opts = { client: this._client, signal, throwOnError: false };
14844
+ if (envelope.query) opts.query = envelope.query;
14588
14845
  if (envelope.body !== void 0) opts.body = envelope.body;
14589
14846
  const call = async () => {
14590
14847
  try {
@@ -17988,6 +18245,60 @@ var CamundaClient = class {
17988
18245
  return this._invokeWithRetry(() => call(), { opId: "syncRuntimeBackupState", exempt: false, retryOverride: options?.retry });
17989
18246
  });
17990
18247
  }
18248
+ takeHistoryBackup(arg, options) {
18249
+ return toCancelable2(async (signal) => {
18250
+ const _body = arg;
18251
+ let envelope = {};
18252
+ envelope.body = _body;
18253
+ if (this._validation.settings.req !== "none") {
18254
+ const _schemas = await this._loadSchemas();
18255
+ if (envelope.body !== void 0) {
18256
+ const maybeBody = await this._validation.gateRequest("takeHistoryBackup", _schemas.zTakeHistoryBackupBody, envelope.body);
18257
+ if (this._validation.settings.req === "strict") envelope.body = maybeBody;
18258
+ }
18259
+ }
18260
+ const opts = { client: this._client, signal, throwOnError: false };
18261
+ if (envelope.body !== void 0) opts.body = envelope.body;
18262
+ const call = async () => {
18263
+ try {
18264
+ const _raw = await takeHistoryBackup(opts);
18265
+ let data = this._evaluateResponse(_raw, "takeHistoryBackup", (resp) => {
18266
+ const st = resp.status ?? resp.response?.status;
18267
+ if (!st) return void 0;
18268
+ const candidate = st === 429 || st === 503 || st === 500;
18269
+ if (!candidate) return void 0;
18270
+ let prob = void 0;
18271
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
18272
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
18273
+ err.status = st;
18274
+ err.name = "HttpSdkError";
18275
+ if (prob) {
18276
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
18277
+ }
18278
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
18279
+ if (!isBp) err.nonRetryable = true;
18280
+ return err;
18281
+ });
18282
+ const _respSchemaName = "zTakeHistoryBackupResponse";
18283
+ if (this._isVoidResponse(_respSchemaName)) {
18284
+ data = void 0;
18285
+ }
18286
+ if (this._validation.settings.res !== "none") {
18287
+ const _schemas = await this._loadSchemas();
18288
+ const _schema = _schemas.zTakeHistoryBackupResponse;
18289
+ if (_schema) {
18290
+ const maybeR = await this._validation.gateResponse("takeHistoryBackup", _schema, data);
18291
+ if (this._validation.settings.res === "strict") data = maybeR;
18292
+ }
18293
+ }
18294
+ return data;
18295
+ } catch (e) {
18296
+ throw e;
18297
+ }
18298
+ };
18299
+ return this._invokeWithRetry(() => call(), { opId: "takeHistoryBackup", exempt: false, retryOverride: options?.retry });
18300
+ });
18301
+ }
17991
18302
  takeRuntimeBackup(arg, options) {
17992
18303
  return toCancelable2(async (signal) => {
17993
18304
  const _body = arg;
@@ -19950,4 +20261,4 @@ export {
19950
20261
  withTimeoutTE,
19951
20262
  eventuallyTE
19952
20263
  };
19953
- //# sourceMappingURL=chunk-JXLQEQ7J.js.map
20264
+ //# sourceMappingURL=chunk-H6DTQLKK.js.map