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

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.
@@ -1652,17 +1652,6 @@ var searchAgentInstances = (options) => (options?.client ?? client).post({
1652
1652
  ...options?.headers
1653
1653
  }
1654
1654
  });
1655
- var createAgentInstanceHistoryItem = (options) => (options.client ?? client).post({
1656
- requestValidator: void 0,
1657
- responseValidator: void 0,
1658
- security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
1659
- url: "/agent-instances/{agentInstanceKey}/history",
1660
- ...options,
1661
- headers: {
1662
- "Content-Type": "application/json",
1663
- ...options.headers
1664
- }
1665
- });
1666
1655
  var searchAgentInstanceHistory = (options) => (options.client ?? client).post({
1667
1656
  requestValidator: void 0,
1668
1657
  responseValidator: void 0,
@@ -3621,6 +3610,31 @@ var changeClusterModeAsClusterAdmin = (options) => (options.client ?? client).pa
3621
3610
  url: "/cluster/v2/mode",
3622
3611
  ...options
3623
3612
  });
3613
+ var cancelClusterRebalance = (options) => (options?.client ?? client).delete({
3614
+ requestValidator: void 0,
3615
+ responseValidator: void 0,
3616
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3617
+ url: "/cluster/v2/rebalance",
3618
+ ...options
3619
+ });
3620
+ var getClusterRebalance = (options) => (options?.client ?? client).get({
3621
+ requestValidator: void 0,
3622
+ responseValidator: void 0,
3623
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3624
+ url: "/cluster/v2/rebalance",
3625
+ ...options
3626
+ });
3627
+ var triggerClusterRebalance = (options) => (options?.client ?? client).post({
3628
+ requestValidator: void 0,
3629
+ responseValidator: void 0,
3630
+ security: [{ scheme: "bearer", type: "http" }, { scheme: "basic", type: "http" }],
3631
+ url: "/cluster/v2/rebalance",
3632
+ ...options,
3633
+ headers: {
3634
+ "Content-Type": "application/json",
3635
+ ...options?.headers
3636
+ }
3637
+ });
3624
3638
  var restoreAsClusterAdmin = (options) => (options.client ?? client).post({
3625
3639
  requestValidator: void 0,
3626
3640
  responseValidator: void 0,
@@ -5159,7 +5173,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
5159
5173
  }
5160
5174
 
5161
5175
  // src/runtime/version.ts
5162
- var packageVersion = "10.0.0-alpha.34";
5176
+ var packageVersion = "10.0.0-alpha.36";
5163
5177
 
5164
5178
  // src/runtime/supportLogger.ts
5165
5179
  var NoopSupportLogger = class {
@@ -7243,7 +7257,7 @@ var CamundaClientBase = class {
7243
7257
  _schemasPromise = null;
7244
7258
  _loadSchemas() {
7245
7259
  if (!this._schemasPromise) {
7246
- this._schemasPromise = import("./zod.gen-GHFW5D76.js");
7260
+ this._schemasPromise = import("./zod.gen-FH5QFVZD.js");
7247
7261
  }
7248
7262
  return this._schemasPromise;
7249
7263
  }
@@ -8328,6 +8342,49 @@ var CamundaClientBase = class {
8328
8342
  return this._invokeWithRetry(() => call(), { opId: "cancelBatchOperation", exempt: false, retryOverride: options?.retry });
8329
8343
  });
8330
8344
  }
8345
+ cancelClusterRebalance(arg, options) {
8346
+ return toCancelable2(async (signal) => {
8347
+ const opts = { client: this._client, signal, throwOnError: false };
8348
+ const call = async () => {
8349
+ try {
8350
+ const _raw = await cancelClusterRebalance(opts);
8351
+ let data = this._evaluateResponse(_raw, "cancelClusterRebalance", (resp) => {
8352
+ const st = resp.status ?? resp.response?.status;
8353
+ if (!st) return void 0;
8354
+ const candidate = st === 429 || st === 503 || st === 500;
8355
+ if (!candidate) return void 0;
8356
+ let prob = void 0;
8357
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
8358
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
8359
+ err.status = st;
8360
+ err.name = "HttpSdkError";
8361
+ if (prob) {
8362
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
8363
+ }
8364
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
8365
+ if (!isBp) err.nonRetryable = true;
8366
+ return err;
8367
+ });
8368
+ const _respSchemaName = "zCancelClusterRebalanceResponse";
8369
+ if (this._isVoidResponse(_respSchemaName)) {
8370
+ data = void 0;
8371
+ }
8372
+ if (this._validation.settings.res !== "none") {
8373
+ const _schemas = await this._loadSchemas();
8374
+ const _schema = _schemas.zCancelClusterRebalanceResponse;
8375
+ if (_schema) {
8376
+ const maybeR = await this._validation.gateResponse("cancelClusterRebalance", _schema, data);
8377
+ if (this._validation.settings.res === "strict") data = maybeR;
8378
+ }
8379
+ }
8380
+ return data;
8381
+ } catch (e) {
8382
+ throw e;
8383
+ }
8384
+ };
8385
+ return this._invokeWithRetry(() => call(), { opId: "cancelClusterRebalance", exempt: false, retryOverride: options?.retry });
8386
+ });
8387
+ }
8331
8388
  cancelProcessInstance(arg, options) {
8332
8389
  return toCancelable2(async (signal) => {
8333
8390
  const { processInstanceKey, ..._body } = arg || {};
@@ -8836,66 +8893,6 @@ var CamundaClientBase = class {
8836
8893
  return this._invokeWithRetry(() => call(), { opId: "createAgentInstance", exempt: false, retryOverride: options?.retry });
8837
8894
  });
8838
8895
  }
8839
- createAgentInstanceHistoryItem(arg, options) {
8840
- return toCancelable2(async (signal) => {
8841
- const { agentInstanceKey, ..._body } = arg || {};
8842
- let envelope = {};
8843
- envelope.path = { agentInstanceKey };
8844
- envelope.body = _body;
8845
- if (this._validation.settings.req !== "none") {
8846
- const _schemas = await this._loadSchemas();
8847
- if (envelope.body !== void 0) {
8848
- const maybeBody = await this._validation.gateRequest("createAgentInstanceHistoryItem", _schemas.zCreateAgentInstanceHistoryItemBody, envelope.body);
8849
- if (this._validation.settings.req === "strict") envelope.body = maybeBody;
8850
- }
8851
- if (envelope.path !== void 0) {
8852
- const maybePath = await this._validation.gateRequest("createAgentInstanceHistoryItem", _schemas.zCreateAgentInstanceHistoryItemPath, envelope.path);
8853
- if (this._validation.settings.req === "strict") envelope.path = maybePath;
8854
- }
8855
- }
8856
- const opts = { client: this._client, signal, throwOnError: false };
8857
- if (envelope.path) opts.path = envelope.path;
8858
- if (envelope.body !== void 0) opts.body = envelope.body;
8859
- const call = async () => {
8860
- try {
8861
- const _raw = await createAgentInstanceHistoryItem(opts);
8862
- let data = this._evaluateResponse(_raw, "createAgentInstanceHistoryItem", (resp) => {
8863
- const st = resp.status ?? resp.response?.status;
8864
- if (!st) return void 0;
8865
- const candidate = st === 429 || st === 503 || st === 500;
8866
- if (!candidate) return void 0;
8867
- let prob = void 0;
8868
- if (resp.error && typeof resp.error === "object") prob = resp.error;
8869
- const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
8870
- err.status = st;
8871
- err.name = "HttpSdkError";
8872
- if (prob) {
8873
- for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
8874
- }
8875
- const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
8876
- if (!isBp) err.nonRetryable = true;
8877
- return err;
8878
- });
8879
- const _respSchemaName = "zCreateAgentInstanceHistoryItemResponse";
8880
- if (this._isVoidResponse(_respSchemaName)) {
8881
- data = void 0;
8882
- }
8883
- if (this._validation.settings.res !== "none") {
8884
- const _schemas = await this._loadSchemas();
8885
- const _schema = _schemas.zCreateAgentInstanceHistoryItemResponse;
8886
- if (_schema) {
8887
- const maybeR = await this._validation.gateResponse("createAgentInstanceHistoryItem", _schema, data);
8888
- if (this._validation.settings.res === "strict") data = maybeR;
8889
- }
8890
- }
8891
- return data;
8892
- } catch (e) {
8893
- throw e;
8894
- }
8895
- };
8896
- return this._invokeWithRetry(() => call(), { opId: "createAgentInstanceHistoryItem", exempt: false, retryOverride: options?.retry });
8897
- });
8898
- }
8899
8896
  createAuthorization(arg, options) {
8900
8897
  return toCancelable2(async (signal) => {
8901
8898
  const _body = arg;
@@ -11533,6 +11530,49 @@ var CamundaClientBase = class {
11533
11530
  return this._invokeWithRetry(() => call(), { opId: "getClusterExportingStatus", exempt: false, retryOverride: options?.retry });
11534
11531
  });
11535
11532
  }
11533
+ getClusterRebalance(arg, options) {
11534
+ return toCancelable2(async (signal) => {
11535
+ const opts = { client: this._client, signal, throwOnError: false };
11536
+ const call = async () => {
11537
+ try {
11538
+ const _raw = await getClusterRebalance(opts);
11539
+ let data = this._evaluateResponse(_raw, "getClusterRebalance", (resp) => {
11540
+ const st = resp.status ?? resp.response?.status;
11541
+ if (!st) return void 0;
11542
+ const candidate = st === 429 || st === 503 || st === 500;
11543
+ if (!candidate) return void 0;
11544
+ let prob = void 0;
11545
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
11546
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
11547
+ err.status = st;
11548
+ err.name = "HttpSdkError";
11549
+ if (prob) {
11550
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
11551
+ }
11552
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
11553
+ if (!isBp) err.nonRetryable = true;
11554
+ return err;
11555
+ });
11556
+ const _respSchemaName = "zGetClusterRebalanceResponse";
11557
+ if (this._isVoidResponse(_respSchemaName)) {
11558
+ data = void 0;
11559
+ }
11560
+ if (this._validation.settings.res !== "none") {
11561
+ const _schemas = await this._loadSchemas();
11562
+ const _schema = _schemas.zGetClusterRebalanceResponse;
11563
+ if (_schema) {
11564
+ const maybeR = await this._validation.gateResponse("getClusterRebalance", _schema, data);
11565
+ if (this._validation.settings.res === "strict") data = maybeR;
11566
+ }
11567
+ }
11568
+ return data;
11569
+ } catch (e) {
11570
+ throw e;
11571
+ }
11572
+ };
11573
+ return this._invokeWithRetry(() => call(), { opId: "getClusterRebalance", exempt: false, retryOverride: options?.retry });
11574
+ });
11575
+ }
11536
11576
  getClusterStatus(arg, options) {
11537
11577
  return toCancelable2(async (signal) => {
11538
11578
  const opts = { client: this._client, signal, throwOnError: false };
@@ -19554,6 +19594,66 @@ var CamundaClientBase = class {
19554
19594
  return this._invokeWithRetry(() => call(), { opId: "throwJobError", exempt: true, retryOverride: options?.retry });
19555
19595
  });
19556
19596
  }
19597
+ triggerClusterRebalance(arg, options) {
19598
+ return toCancelable2(async (signal) => {
19599
+ const { dryRun, ..._body } = arg || {};
19600
+ let envelope = {};
19601
+ envelope.query = { dryRun };
19602
+ envelope.body = _body;
19603
+ if (this._validation.settings.req !== "none") {
19604
+ const _schemas = await this._loadSchemas();
19605
+ if (envelope.body !== void 0) {
19606
+ const maybeBody = await this._validation.gateRequest("triggerClusterRebalance", _schemas.zTriggerClusterRebalanceBody, envelope.body);
19607
+ if (this._validation.settings.req === "strict") envelope.body = maybeBody;
19608
+ }
19609
+ if (envelope.query !== void 0) {
19610
+ const maybeQuery = await this._validation.gateRequest("triggerClusterRebalance", _schemas.zTriggerClusterRebalanceQuery, envelope.query);
19611
+ if (this._validation.settings.req === "strict") envelope.query = maybeQuery;
19612
+ }
19613
+ }
19614
+ const opts = { client: this._client, signal, throwOnError: false };
19615
+ if (envelope.query) opts.query = envelope.query;
19616
+ if (envelope.body !== void 0) opts.body = envelope.body;
19617
+ const call = async () => {
19618
+ try {
19619
+ const _raw = await triggerClusterRebalance(opts);
19620
+ let data = this._evaluateResponse(_raw, "triggerClusterRebalance", (resp) => {
19621
+ const st = resp.status ?? resp.response?.status;
19622
+ if (!st) return void 0;
19623
+ const candidate = st === 429 || st === 503 || st === 500;
19624
+ if (!candidate) return void 0;
19625
+ let prob = void 0;
19626
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
19627
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
19628
+ err.status = st;
19629
+ err.name = "HttpSdkError";
19630
+ if (prob) {
19631
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
19632
+ }
19633
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
19634
+ if (!isBp) err.nonRetryable = true;
19635
+ return err;
19636
+ });
19637
+ const _respSchemaName = "zTriggerClusterRebalanceResponse";
19638
+ if (this._isVoidResponse(_respSchemaName)) {
19639
+ data = void 0;
19640
+ }
19641
+ if (this._validation.settings.res !== "none") {
19642
+ const _schemas = await this._loadSchemas();
19643
+ const _schema = _schemas.zTriggerClusterRebalanceResponse;
19644
+ if (_schema) {
19645
+ const maybeR = await this._validation.gateResponse("triggerClusterRebalance", _schema, data);
19646
+ if (this._validation.settings.res === "strict") data = maybeR;
19647
+ }
19648
+ }
19649
+ return data;
19650
+ } catch (e) {
19651
+ throw e;
19652
+ }
19653
+ };
19654
+ return this._invokeWithRetry(() => call(), { opId: "triggerClusterRebalance", exempt: false, retryOverride: options?.retry });
19655
+ });
19656
+ }
19557
19657
  unassignClientFromGroup(arg, options) {
19558
19658
  return toCancelable2(async (signal) => {
19559
19659
  const { groupId, clientId } = arg || {};
@@ -21275,4 +21375,4 @@ export {
21275
21375
  createCamundaClient,
21276
21376
  CamundaClient
21277
21377
  };
21278
- //# sourceMappingURL=chunk-DVCU3RZY.js.map
21378
+ //# sourceMappingURL=chunk-TC46CX7T.js.map