@camunda8/orchestration-cluster-api 11.0.0-alpha.8 → 11.0.0-alpha.9

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,10 @@
1
+ # [11.0.0-alpha.9](https://github.com/camunda/orchestration-cluster-api-js/compare/v11.0.0-alpha.8...v11.0.0-alpha.9) (2026-11-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * inject default tenant per union-variant body shape (Closes [#704](https://github.com/camunda/orchestration-cluster-api-js/issues/704)) ([#705](https://github.com/camunda/orchestration-cluster-api-js/issues/705)) ([af1c2b1](https://github.com/camunda/orchestration-cluster-api-js/commit/af1c2b1e258be4bd1088a820ac6bda14ff26df47))
7
+
1
8
  # [11.0.0-alpha.8](https://github.com/camunda/orchestration-cluster-api-js/compare/v11.0.0-alpha.7...v11.0.0-alpha.8) (2026-11-20)
2
9
 
3
10
 
@@ -1188,7 +1188,7 @@ var createClient = (config = {}) => {
1188
1188
  };
1189
1189
 
1190
1190
  // src/runtime/version.ts
1191
- var packageVersion = "11.0.0-alpha.8";
1191
+ var packageVersion = "11.0.0-alpha.9";
1192
1192
 
1193
1193
  // src/runtime/userAgent.ts
1194
1194
  import { node } from "#platform";
@@ -3664,6 +3664,14 @@ function deepFreeze2(obj) {
3664
3664
  }
3665
3665
  return obj;
3666
3666
  }
3667
+ function _bodyHasOptionalTenantIdVariant(body, variants) {
3668
+ if (typeof body !== "object" || body === null || Array.isArray(body)) return false;
3669
+ const rec = body;
3670
+ if (rec.tenantId !== void 0 && rec.tenantId !== null) return false;
3671
+ return variants.some(
3672
+ (required) => required.every((p) => Object.hasOwn(rec, p) && rec[p] !== void 0 && rec[p] !== null)
3673
+ );
3674
+ }
3667
3675
  function createCamundaCore(options) {
3668
3676
  return new CamundaCore(options);
3669
3677
  }
@@ -8054,7 +8062,7 @@ function broadcastSignal2(core, arg, options) {
8054
8062
  const _body = arg;
8055
8063
  let envelope = {};
8056
8064
  envelope.body = _body;
8057
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
8065
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
8058
8066
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
8059
8067
  rt._log.trace(() => ["tenant.default.inject", { op: "broadcastSignal", tenant: rt._config.defaultTenantId }]);
8060
8068
  }
@@ -8566,7 +8574,7 @@ function correlateMessage2(core, arg, options) {
8566
8574
  const _body = arg;
8567
8575
  let envelope = {};
8568
8576
  envelope.body = _body;
8569
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
8577
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
8570
8578
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
8571
8579
  rt._log.trace(() => ["tenant.default.inject", { op: "correlateMessage", tenant: rt._config.defaultTenantId }]);
8572
8580
  }
@@ -8790,7 +8798,7 @@ function createDeployment2(core, arg, options) {
8790
8798
  const _body = arg;
8791
8799
  let envelope = {};
8792
8800
  envelope.body = _body;
8793
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
8801
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
8794
8802
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
8795
8803
  rt._log.trace(() => ["tenant.default.inject", { op: "createDeployment", tenant: rt._config.defaultTenantId }]);
8796
8804
  }
@@ -9333,7 +9341,7 @@ function createProcessInstance2(core, arg, options) {
9333
9341
  const _body = arg;
9334
9342
  let envelope = {};
9335
9343
  envelope.body = _body;
9336
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
9344
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
9337
9345
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
9338
9346
  rt._log.trace(() => ["tenant.default.inject", { op: "createProcessInstance", tenant: rt._config.defaultTenantId }]);
9339
9347
  }
@@ -10798,7 +10806,7 @@ function evaluateConditionals2(core, arg, options) {
10798
10806
  const _body = arg;
10799
10807
  let envelope = {};
10800
10808
  envelope.body = _body;
10801
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
10809
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
10802
10810
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
10803
10811
  rt._log.trace(() => ["tenant.default.inject", { op: "evaluateConditionals", tenant: rt._config.defaultTenantId }]);
10804
10812
  }
@@ -10857,7 +10865,7 @@ function evaluateDecision2(core, arg, options) {
10857
10865
  const _body = arg;
10858
10866
  let envelope = {};
10859
10867
  envelope.body = _body;
10860
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
10868
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
10861
10869
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
10862
10870
  rt._log.trace(() => ["tenant.default.inject", { op: "evaluateDecision", tenant: rt._config.defaultTenantId }]);
10863
10871
  }
@@ -10916,7 +10924,7 @@ function evaluateExpression2(core, arg, options) {
10916
10924
  const _body = arg;
10917
10925
  let envelope = {};
10918
10926
  envelope.body = _body;
10919
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
10927
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
10920
10928
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
10921
10929
  rt._log.trace(() => ["tenant.default.inject", { op: "evaluateExpression", tenant: rt._config.defaultTenantId }]);
10922
10930
  }
@@ -15512,7 +15520,7 @@ function publishMessage2(core, arg, options) {
15512
15520
  const _body = arg;
15513
15521
  let envelope = {};
15514
15522
  envelope.body = _body;
15515
- if (envelope.body && (envelope.body.tenantId === void 0 || envelope.body.tenantId === null)) {
15523
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [[]])) {
15516
15524
  envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
15517
15525
  rt._log.trace(() => ["tenant.default.inject", { op: "publishMessage", tenant: rt._config.defaultTenantId }]);
15518
15526
  }
@@ -16112,6 +16120,10 @@ function resumeProcessDefinitions2(core, arg, options) {
16112
16120
  const _body = arg;
16113
16121
  let envelope = {};
16114
16122
  envelope.body = _body;
16123
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [["processDefinitionId"]])) {
16124
+ envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
16125
+ rt._log.trace(() => ["tenant.default.inject", { op: "resumeProcessDefinitions", tenant: rt._config.defaultTenantId }]);
16126
+ }
16115
16127
  if (rt._validation.settings.req !== "none") {
16116
16128
  const _schemas = await import("./resumeProcessDefinitions.gen-DEH3L6T4.js");
16117
16129
  if (envelope.body !== void 0) {
@@ -19320,6 +19332,10 @@ function suspendProcessDefinitions2(core, arg, options) {
19320
19332
  const _body = arg;
19321
19333
  let envelope = {};
19322
19334
  envelope.body = _body;
19335
+ if (_bodyHasOptionalTenantIdVariant(envelope.body, [["processDefinitionId"]])) {
19336
+ envelope.body = { ...envelope.body, tenantId: rt._config.defaultTenantId };
19337
+ rt._log.trace(() => ["tenant.default.inject", { op: "suspendProcessDefinitions", tenant: rt._config.defaultTenantId }]);
19338
+ }
19323
19339
  if (rt._validation.settings.req !== "none") {
19324
19340
  const _schemas = await import("./suspendProcessDefinitions.gen-ZB5VUV6F.js");
19325
19341
  if (envelope.body !== void 0) {
@@ -21730,4 +21746,4 @@ export {
21730
21746
  updateUser2 as updateUser,
21731
21747
  updateUserTask2 as updateUserTask
21732
21748
  };
21733
- //# sourceMappingURL=chunk-ZPMWQRAE.js.map
21749
+ //# sourceMappingURL=chunk-F5FJDGNY.js.map