@camunda8/orchestration-cluster-api 10.0.0-alpha.12 → 10.0.0-alpha.14

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,18 @@
1
+ # [10.0.0-alpha.14](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.13...v10.0.0-alpha.14) (2026-07-01)
2
+
3
+
4
+ ### Features
5
+
6
+ * add example coverage for getProcessInstanceWaitStateStatistics ([9fa53ca](https://github.com/camunda/orchestration-cluster-api-js/commit/9fa53ca512a266ed29b23ceec6ccc9199240e4c8)), closes [camunda/orchestration-cluster-api-js#300](https://github.com/camunda/orchestration-cluster-api-js/issues/300)
7
+
8
+ # [10.0.0-alpha.13](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.12...v10.0.0-alpha.13) (2026-06-28)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **client:** make generated fetch client work on Deno and Bun ([9260000](https://github.com/camunda/orchestration-cluster-api-js/commit/92600004f344a41d7ea5a5158484a98a440c2be3))
14
+ * **client:** sanitize SSE onRequest init and harden the compat hook ([12eff25](https://github.com/camunda/orchestration-cluster-api-js/commit/12eff25fadac6ce45ca28f2c469ccdeb878bf98d))
15
+
1
16
  # [10.0.0-alpha.12](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.11...v10.0.0-alpha.12) (2026-06-18)
2
17
 
3
18
 
@@ -549,6 +549,32 @@ var JobWorker = class {
549
549
  };
550
550
 
551
551
  // src/gen/core/serverSentEvents.gen.ts
552
+ var __STANDARD_REQUEST_INIT_KEYS = [
553
+ "method",
554
+ "headers",
555
+ "body",
556
+ "mode",
557
+ "credentials",
558
+ "cache",
559
+ "redirect",
560
+ "referrer",
561
+ "referrerPolicy",
562
+ "integrity",
563
+ "keepalive",
564
+ "signal",
565
+ "window",
566
+ "duplex",
567
+ "priority"
568
+ ];
569
+ var sanitizeRequestInit = (init) => {
570
+ if (!init || typeof init !== "object") return init;
571
+ const out = {};
572
+ for (const key of __STANDARD_REQUEST_INIT_KEYS) {
573
+ const value = init[key];
574
+ if (value !== void 0) out[key] = value;
575
+ }
576
+ return out;
577
+ };
552
578
  var createSseClient = ({
553
579
  onRequest,
554
580
  onSseError,
@@ -583,9 +609,9 @@ var createSseClient = ({
583
609
  headers,
584
610
  signal
585
611
  };
586
- let request = new Request(url, requestInit);
612
+ let request = new Request(url, sanitizeRequestInit(requestInit));
587
613
  if (onRequest) {
588
- request = await onRequest(url, requestInit);
614
+ request = await onRequest(url, sanitizeRequestInit(requestInit));
589
615
  }
590
616
  const _fetch = options.fetch ?? globalThis.fetch;
591
617
  const response = await _fetch(request);
@@ -1178,6 +1204,32 @@ var createConfig = (override = {}) => ({
1178
1204
  });
1179
1205
 
1180
1206
  // src/gen/client/client.gen.ts
1207
+ var __STANDARD_REQUEST_INIT_KEYS2 = [
1208
+ "method",
1209
+ "headers",
1210
+ "body",
1211
+ "mode",
1212
+ "credentials",
1213
+ "cache",
1214
+ "redirect",
1215
+ "referrer",
1216
+ "referrerPolicy",
1217
+ "integrity",
1218
+ "keepalive",
1219
+ "signal",
1220
+ "window",
1221
+ "duplex",
1222
+ "priority"
1223
+ ];
1224
+ var sanitizeRequestInit2 = (init) => {
1225
+ if (!init || typeof init !== "object") return init;
1226
+ const out = {};
1227
+ for (const key of __STANDARD_REQUEST_INIT_KEYS2) {
1228
+ const value = init[key];
1229
+ if (value !== void 0) out[key] = value;
1230
+ }
1231
+ return out;
1232
+ };
1181
1233
  var createClient = (config = {}) => {
1182
1234
  let _config = mergeConfigs(createConfig(), config);
1183
1235
  const getConfig = () => ({ ..._config });
@@ -1219,7 +1271,7 @@ var createClient = (config = {}) => {
1219
1271
  ...opts,
1220
1272
  body: getValidRequestBody(opts)
1221
1273
  };
1222
- let request2 = new Request(url, requestInit);
1274
+ let request2 = new Request(url, sanitizeRequestInit2(requestInit));
1223
1275
  for (const fn of interceptors.request.fns) {
1224
1276
  if (fn) {
1225
1277
  request2 = await fn(request2, opts);
@@ -1321,7 +1373,7 @@ var createClient = (config = {}) => {
1321
1373
  headers: opts.headers,
1322
1374
  method,
1323
1375
  onRequest: async (url2, init) => {
1324
- let request2 = new Request(url2, init);
1376
+ let request2 = new Request(url2, sanitizeRequestInit2(init));
1325
1377
  for (const fn of interceptors.request.fns) {
1326
1378
  if (fn) {
1327
1379
  request2 = await fn(request2, opts);
@@ -3200,6 +3252,28 @@ var failJob = (options) => {
3200
3252
  }
3201
3253
  });
3202
3254
  };
3255
+ var updateJobsBatchOperation = (options) => {
3256
+ return (options.client ?? client).post({
3257
+ requestValidator: void 0,
3258
+ responseValidator: void 0,
3259
+ security: [
3260
+ {
3261
+ scheme: "bearer",
3262
+ type: "http"
3263
+ },
3264
+ {
3265
+ scheme: "basic",
3266
+ type: "http"
3267
+ }
3268
+ ],
3269
+ url: "/jobs/batch-update",
3270
+ ...options,
3271
+ headers: {
3272
+ "Content-Type": "application/json",
3273
+ ...options.headers
3274
+ }
3275
+ });
3276
+ };
3203
3277
  var getGlobalJobStatistics = (options) => {
3204
3278
  return (options.client ?? client).get({
3205
3279
  requestValidator: void 0,
@@ -4000,6 +4074,24 @@ var getProcessInstanceStatistics = (options) => {
4000
4074
  ...options
4001
4075
  });
4002
4076
  };
4077
+ var getProcessInstanceWaitStateStatistics = (options) => {
4078
+ return (options.client ?? client).get({
4079
+ requestValidator: void 0,
4080
+ responseValidator: void 0,
4081
+ security: [
4082
+ {
4083
+ scheme: "bearer",
4084
+ type: "http"
4085
+ },
4086
+ {
4087
+ scheme: "basic",
4088
+ type: "http"
4089
+ }
4090
+ ],
4091
+ url: "/process-instances/{processInstanceKey}/statistics/wait-states",
4092
+ ...options
4093
+ });
4094
+ };
4003
4095
  var searchResources = (options) => {
4004
4096
  return (options?.client ?? client).post({
4005
4097
  requestValidator: void 0,
@@ -6608,7 +6700,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
6608
6700
  }
6609
6701
 
6610
6702
  // src/runtime/version.ts
6611
- var packageVersion = "10.0.0-alpha.12";
6703
+ var packageVersion = "10.0.0-alpha.14";
6612
6704
 
6613
6705
  // src/runtime/supportLogger.ts
6614
6706
  var NoopSupportLogger = class {
@@ -8585,7 +8677,7 @@ var CamundaClient = class {
8585
8677
  _schemasPromise = null;
8586
8678
  _loadSchemas() {
8587
8679
  if (!this._schemasPromise) {
8588
- this._schemasPromise = import("./zod.gen-RVXPM54Y.js");
8680
+ this._schemasPromise = import("./zod.gen-7PI6QBPP.js");
8589
8681
  }
8590
8682
  return this._schemasPromise;
8591
8683
  }
@@ -13806,6 +13898,62 @@ var CamundaClient = class {
13806
13898
  return invoke();
13807
13899
  });
13808
13900
  }
13901
+ getProcessInstanceWaitStateStatistics(arg, consistencyManagement, options) {
13902
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
13903
+ const useConsistency = consistencyManagement.consistency;
13904
+ return toCancelable2(async (signal) => {
13905
+ const { processInstanceKey } = arg || {};
13906
+ let envelope = {};
13907
+ envelope.path = { processInstanceKey };
13908
+ if (this._validation.settings.req !== "none") {
13909
+ const _schemas = await this._loadSchemas();
13910
+ const maybe = await this._validation.gateRequest("getProcessInstanceWaitStateStatistics", _schemas.zGetProcessInstanceWaitStateStatisticsData, envelope);
13911
+ if (this._validation.settings.req === "strict") envelope = maybe;
13912
+ }
13913
+ const opts = { client: this._client, signal, throwOnError: false };
13914
+ if (envelope.path) opts.path = envelope.path;
13915
+ const call = async () => {
13916
+ try {
13917
+ const _raw = await getProcessInstanceWaitStateStatistics(opts);
13918
+ let data = this._evaluateResponse(_raw, "getProcessInstanceWaitStateStatistics", (resp) => {
13919
+ const st = resp.status ?? resp.response?.status;
13920
+ if (!st) return void 0;
13921
+ const candidate = st === 429 || st === 503 || st === 500;
13922
+ if (!candidate) return void 0;
13923
+ let prob = void 0;
13924
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
13925
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
13926
+ err.status = st;
13927
+ err.name = "HttpSdkError";
13928
+ if (prob) {
13929
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
13930
+ }
13931
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
13932
+ if (!isBp) err.nonRetryable = true;
13933
+ return err;
13934
+ });
13935
+ const _respSchemaName = "zGetProcessInstanceWaitStateStatisticsResponse";
13936
+ if (this._isVoidResponse(_respSchemaName)) {
13937
+ data = void 0;
13938
+ }
13939
+ if (this._validation.settings.res !== "none") {
13940
+ const _schemas = await this._loadSchemas();
13941
+ const _schema = _schemas.zGetProcessInstanceWaitStateStatisticsResponse;
13942
+ if (_schema) {
13943
+ const maybeR = await this._validation.gateResponse("getProcessInstanceWaitStateStatistics", _schema, data);
13944
+ if (this._validation.settings.res === "strict") data = maybeR;
13945
+ }
13946
+ }
13947
+ return data;
13948
+ } catch (e) {
13949
+ throw e;
13950
+ }
13951
+ };
13952
+ const invoke = () => toCancelable2(() => call());
13953
+ if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log });
13954
+ return invoke();
13955
+ });
13956
+ }
13809
13957
  getResource(arg, consistencyManagement, options) {
13810
13958
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
13811
13959
  const useConsistency = consistencyManagement.consistency;
@@ -18856,6 +19004,58 @@ var CamundaClient = class {
18856
19004
  return this._invokeWithRetry(() => call(), { opId: "updateJob", exempt: false, retryOverride: options?.retry });
18857
19005
  });
18858
19006
  }
19007
+ updateJobsBatchOperation(arg, options) {
19008
+ return toCancelable2(async (signal) => {
19009
+ const _body = arg;
19010
+ let envelope = {};
19011
+ envelope.body = _body;
19012
+ if (this._validation.settings.req !== "none") {
19013
+ const _schemas = await this._loadSchemas();
19014
+ const maybe = await this._validation.gateRequest("updateJobsBatchOperation", _schemas.zUpdateJobsBatchOperationData, envelope);
19015
+ if (this._validation.settings.req === "strict") envelope = maybe;
19016
+ }
19017
+ const opts = { client: this._client, signal, throwOnError: false };
19018
+ if (envelope.body !== void 0) opts.body = envelope.body;
19019
+ const call = async () => {
19020
+ try {
19021
+ const _raw = await updateJobsBatchOperation(opts);
19022
+ let data = this._evaluateResponse(_raw, "updateJobsBatchOperation", (resp) => {
19023
+ const st = resp.status ?? resp.response?.status;
19024
+ if (!st) return void 0;
19025
+ const candidate = st === 429 || st === 503 || st === 500;
19026
+ if (!candidate) return void 0;
19027
+ let prob = void 0;
19028
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
19029
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
19030
+ err.status = st;
19031
+ err.name = "HttpSdkError";
19032
+ if (prob) {
19033
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
19034
+ }
19035
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
19036
+ if (!isBp) err.nonRetryable = true;
19037
+ return err;
19038
+ });
19039
+ const _respSchemaName = "zUpdateJobsBatchOperationResponse";
19040
+ if (this._isVoidResponse(_respSchemaName)) {
19041
+ data = void 0;
19042
+ }
19043
+ if (this._validation.settings.res !== "none") {
19044
+ const _schemas = await this._loadSchemas();
19045
+ const _schema = _schemas.zUpdateJobsBatchOperationResponse;
19046
+ if (_schema) {
19047
+ const maybeR = await this._validation.gateResponse("updateJobsBatchOperation", _schema, data);
19048
+ if (this._validation.settings.res === "strict") data = maybeR;
19049
+ }
19050
+ }
19051
+ return data;
19052
+ } catch (e) {
19053
+ throw e;
19054
+ }
19055
+ };
19056
+ return this._invokeWithRetry(() => call(), { opId: "updateJobsBatchOperation", exempt: false, retryOverride: options?.retry });
19057
+ });
19058
+ }
18859
19059
  updateMappingRule(arg, options) {
18860
19060
  return toCancelable2(async (signal) => {
18861
19061
  const { mappingRuleId, ..._body } = arg || {};
@@ -19552,4 +19752,4 @@ export {
19552
19752
  withTimeoutTE,
19553
19753
  eventuallyTE
19554
19754
  };
19555
- //# sourceMappingURL=chunk-5MVQWZJT.js.map
19755
+ //# sourceMappingURL=chunk-IV7WMOID.js.map