@camunda8/orchestration-cluster-api 10.0.0-alpha.34 → 10.0.0-alpha.35

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.
@@ -3621,6 +3621,31 @@ var changeClusterModeAsClusterAdmin = (options) => (options.client ?? client).pa
3621
3621
  url: "/cluster/v2/mode",
3622
3622
  ...options
3623
3623
  });
3624
+ var cancelClusterRebalance = (options) => (options?.client ?? client).delete({
3625
+ requestValidator: void 0,
3626
+ responseValidator: void 0,
3627
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3628
+ url: "/cluster/v2/rebalance",
3629
+ ...options
3630
+ });
3631
+ var getClusterRebalance = (options) => (options?.client ?? client).get({
3632
+ requestValidator: void 0,
3633
+ responseValidator: void 0,
3634
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3635
+ url: "/cluster/v2/rebalance",
3636
+ ...options
3637
+ });
3638
+ var triggerClusterRebalance = (options) => (options?.client ?? client).post({
3639
+ requestValidator: void 0,
3640
+ responseValidator: void 0,
3641
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3642
+ url: "/cluster/v2/rebalance",
3643
+ ...options,
3644
+ headers: {
3645
+ "Content-Type": "application/json",
3646
+ ...options?.headers
3647
+ }
3648
+ });
3624
3649
  var restoreAsClusterAdmin = (options) => (options.client ?? client).post({
3625
3650
  requestValidator: void 0,
3626
3651
  responseValidator: void 0,
@@ -5159,7 +5184,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
5159
5184
  }
5160
5185
 
5161
5186
  // src/runtime/version.ts
5162
- var packageVersion = "10.0.0-alpha.34";
5187
+ var packageVersion = "10.0.0-alpha.35";
5163
5188
 
5164
5189
  // src/runtime/supportLogger.ts
5165
5190
  var NoopSupportLogger = class {
@@ -7243,7 +7268,7 @@ var CamundaClientBase = class {
7243
7268
  _schemasPromise = null;
7244
7269
  _loadSchemas() {
7245
7270
  if (!this._schemasPromise) {
7246
- this._schemasPromise = import("./zod.gen-GHFW5D76.js");
7271
+ this._schemasPromise = import("./zod.gen-JARMY5IR.js");
7247
7272
  }
7248
7273
  return this._schemasPromise;
7249
7274
  }
@@ -8328,6 +8353,49 @@ var CamundaClientBase = class {
8328
8353
  return this._invokeWithRetry(() => call(), { opId: "cancelBatchOperation", exempt: false, retryOverride: options?.retry });
8329
8354
  });
8330
8355
  }
8356
+ cancelClusterRebalance(arg, options) {
8357
+ return toCancelable2(async (signal) => {
8358
+ const opts = { client: this._client, signal, throwOnError: false };
8359
+ const call = async () => {
8360
+ try {
8361
+ const _raw = await cancelClusterRebalance(opts);
8362
+ let data = this._evaluateResponse(_raw, "cancelClusterRebalance", (resp) => {
8363
+ const st = resp.status ?? resp.response?.status;
8364
+ if (!st) return void 0;
8365
+ const candidate = st === 429 || st === 503 || st === 500;
8366
+ if (!candidate) return void 0;
8367
+ let prob = void 0;
8368
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
8369
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
8370
+ err.status = st;
8371
+ err.name = "HttpSdkError";
8372
+ if (prob) {
8373
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
8374
+ }
8375
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
8376
+ if (!isBp) err.nonRetryable = true;
8377
+ return err;
8378
+ });
8379
+ const _respSchemaName = "zCancelClusterRebalanceResponse";
8380
+ if (this._isVoidResponse(_respSchemaName)) {
8381
+ data = void 0;
8382
+ }
8383
+ if (this._validation.settings.res !== "none") {
8384
+ const _schemas = await this._loadSchemas();
8385
+ const _schema = _schemas.zCancelClusterRebalanceResponse;
8386
+ if (_schema) {
8387
+ const maybeR = await this._validation.gateResponse("cancelClusterRebalance", _schema, data);
8388
+ if (this._validation.settings.res === "strict") data = maybeR;
8389
+ }
8390
+ }
8391
+ return data;
8392
+ } catch (e) {
8393
+ throw e;
8394
+ }
8395
+ };
8396
+ return this._invokeWithRetry(() => call(), { opId: "cancelClusterRebalance", exempt: false, retryOverride: options?.retry });
8397
+ });
8398
+ }
8331
8399
  cancelProcessInstance(arg, options) {
8332
8400
  return toCancelable2(async (signal) => {
8333
8401
  const { processInstanceKey, ..._body } = arg || {};
@@ -11533,6 +11601,49 @@ var CamundaClientBase = class {
11533
11601
  return this._invokeWithRetry(() => call(), { opId: "getClusterExportingStatus", exempt: false, retryOverride: options?.retry });
11534
11602
  });
11535
11603
  }
11604
+ getClusterRebalance(arg, options) {
11605
+ return toCancelable2(async (signal) => {
11606
+ const opts = { client: this._client, signal, throwOnError: false };
11607
+ const call = async () => {
11608
+ try {
11609
+ const _raw = await getClusterRebalance(opts);
11610
+ let data = this._evaluateResponse(_raw, "getClusterRebalance", (resp) => {
11611
+ const st = resp.status ?? resp.response?.status;
11612
+ if (!st) return void 0;
11613
+ const candidate = st === 429 || st === 503 || st === 500;
11614
+ if (!candidate) return void 0;
11615
+ let prob = void 0;
11616
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
11617
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
11618
+ err.status = st;
11619
+ err.name = "HttpSdkError";
11620
+ if (prob) {
11621
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
11622
+ }
11623
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
11624
+ if (!isBp) err.nonRetryable = true;
11625
+ return err;
11626
+ });
11627
+ const _respSchemaName = "zGetClusterRebalanceResponse";
11628
+ if (this._isVoidResponse(_respSchemaName)) {
11629
+ data = void 0;
11630
+ }
11631
+ if (this._validation.settings.res !== "none") {
11632
+ const _schemas = await this._loadSchemas();
11633
+ const _schema = _schemas.zGetClusterRebalanceResponse;
11634
+ if (_schema) {
11635
+ const maybeR = await this._validation.gateResponse("getClusterRebalance", _schema, data);
11636
+ if (this._validation.settings.res === "strict") data = maybeR;
11637
+ }
11638
+ }
11639
+ return data;
11640
+ } catch (e) {
11641
+ throw e;
11642
+ }
11643
+ };
11644
+ return this._invokeWithRetry(() => call(), { opId: "getClusterRebalance", exempt: false, retryOverride: options?.retry });
11645
+ });
11646
+ }
11536
11647
  getClusterStatus(arg, options) {
11537
11648
  return toCancelable2(async (signal) => {
11538
11649
  const opts = { client: this._client, signal, throwOnError: false };
@@ -19554,6 +19665,66 @@ var CamundaClientBase = class {
19554
19665
  return this._invokeWithRetry(() => call(), { opId: "throwJobError", exempt: true, retryOverride: options?.retry });
19555
19666
  });
19556
19667
  }
19668
+ triggerClusterRebalance(arg, options) {
19669
+ return toCancelable2(async (signal) => {
19670
+ const { dryRun, ..._body } = arg || {};
19671
+ let envelope = {};
19672
+ envelope.query = { dryRun };
19673
+ envelope.body = _body;
19674
+ if (this._validation.settings.req !== "none") {
19675
+ const _schemas = await this._loadSchemas();
19676
+ if (envelope.body !== void 0) {
19677
+ const maybeBody = await this._validation.gateRequest("triggerClusterRebalance", _schemas.zTriggerClusterRebalanceBody, envelope.body);
19678
+ if (this._validation.settings.req === "strict") envelope.body = maybeBody;
19679
+ }
19680
+ if (envelope.query !== void 0) {
19681
+ const maybeQuery = await this._validation.gateRequest("triggerClusterRebalance", _schemas.zTriggerClusterRebalanceQuery, envelope.query);
19682
+ if (this._validation.settings.req === "strict") envelope.query = maybeQuery;
19683
+ }
19684
+ }
19685
+ const opts = { client: this._client, signal, throwOnError: false };
19686
+ if (envelope.query) opts.query = envelope.query;
19687
+ if (envelope.body !== void 0) opts.body = envelope.body;
19688
+ const call = async () => {
19689
+ try {
19690
+ const _raw = await triggerClusterRebalance(opts);
19691
+ let data = this._evaluateResponse(_raw, "triggerClusterRebalance", (resp) => {
19692
+ const st = resp.status ?? resp.response?.status;
19693
+ if (!st) return void 0;
19694
+ const candidate = st === 429 || st === 503 || st === 500;
19695
+ if (!candidate) return void 0;
19696
+ let prob = void 0;
19697
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
19698
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
19699
+ err.status = st;
19700
+ err.name = "HttpSdkError";
19701
+ if (prob) {
19702
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
19703
+ }
19704
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
19705
+ if (!isBp) err.nonRetryable = true;
19706
+ return err;
19707
+ });
19708
+ const _respSchemaName = "zTriggerClusterRebalanceResponse";
19709
+ if (this._isVoidResponse(_respSchemaName)) {
19710
+ data = void 0;
19711
+ }
19712
+ if (this._validation.settings.res !== "none") {
19713
+ const _schemas = await this._loadSchemas();
19714
+ const _schema = _schemas.zTriggerClusterRebalanceResponse;
19715
+ if (_schema) {
19716
+ const maybeR = await this._validation.gateResponse("triggerClusterRebalance", _schema, data);
19717
+ if (this._validation.settings.res === "strict") data = maybeR;
19718
+ }
19719
+ }
19720
+ return data;
19721
+ } catch (e) {
19722
+ throw e;
19723
+ }
19724
+ };
19725
+ return this._invokeWithRetry(() => call(), { opId: "triggerClusterRebalance", exempt: false, retryOverride: options?.retry });
19726
+ });
19727
+ }
19557
19728
  unassignClientFromGroup(arg, options) {
19558
19729
  return toCancelable2(async (signal) => {
19559
19730
  const { groupId, clientId } = arg || {};
@@ -21275,4 +21446,4 @@ export {
21275
21446
  createCamundaClient,
21276
21447
  CamundaClient
21277
21448
  };
21278
- //# sourceMappingURL=chunk-DVCU3RZY.js.map
21449
+ //# sourceMappingURL=chunk-2SYK2XZI.js.map