@camunda8/orchestration-cluster-api 10.0.0-alpha.4 → 10.0.0-alpha.6

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,19 @@
1
+ # [10.0.0-alpha.6](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.5...v10.0.0-alpha.6) (2026-05-13)
2
+
3
+
4
+ ### Features
5
+
6
+ * add example coverage for 4 new operations ([3a2c875](https://github.com/camunda/orchestration-cluster-api-js/commit/3a2c87577bcca87996cc77546216c68fb5124ec5))
7
+ * add example coverage for 4 new operations ([6d757a4](https://github.com/camunda/orchestration-cluster-api-js/commit/6d757a4be85ba733f07bcd08c1b6ae33aacd6c15))
8
+
9
+ # [10.0.0-alpha.5](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.4...v10.0.0-alpha.5) (2026-05-08)
10
+
11
+
12
+ ### Features
13
+
14
+ * add agent instance example coverage ([8a0072d](https://github.com/camunda/orchestration-cluster-api-js/commit/8a0072d03cf426ea895863d7cbdd87178c2e7e2f))
15
+ * v10 migration — bundler 2.4.1, branded type examples, README ([dd4a714](https://github.com/camunda/orchestration-cluster-api-js/commit/dd4a7149682b89d1f8f9c0f627dfef5645b10ea7)), closes [#203](https://github.com/camunda/orchestration-cluster-api-js/issues/203) [#204](https://github.com/camunda/orchestration-cluster-api-js/issues/204)
16
+
1
17
  # [10.0.0-alpha.4](https://github.com/camunda/orchestration-cluster-api-js/compare/v10.0.0-alpha.3...v10.0.0-alpha.4) (2026-04-29)
2
18
 
3
19
 
package/README.md CHANGED
@@ -149,10 +149,51 @@ await camunda.createDeployment({
149
149
  });
150
150
  ```
151
151
 
152
- `TenantId.assumeExists()` validates the string against the tenant ID pattern and brands it at zero runtime cost. See [Branded Keys](#branded-keys) for more on this pattern.
152
+ `TenantId.assumeExists()` validates the string against the tenant ID pattern and returns a branded value. The branded value is just a string at runtime, but `assumeExists()` performs validation and can throw if the input is malformed. See [Branded Keys](#branded-keys) for more on this pattern.
153
153
 
154
154
  > **Tip**: If your tenant ID comes from a validated source (environment variable, config file), call `TenantId.assumeExists()` once at startup and pass the branded value throughout your application.
155
155
 
156
+ ## Migrating from 8.9
157
+
158
+ SDK 10.x (for Camunda 8.10) promotes several identifier and name fields from plain `string` to **branded types** via `CamundaKey<T>`. The wire format and runtime API are unchanged — branded values are still plain strings at runtime and are assignable anywhere a `string` is expected (template literals, logging, JSON serialization). Callers need to brand values using `.assumeExists()` (which performs validation) to satisfy the new types.
159
+
160
+ ### New branded types
161
+
162
+ | Brand | Used for |
163
+ |-------|----------|
164
+ | `RoleId` | Role identifiers |
165
+ | `GroupId` | Group identifiers |
166
+ | `ClientId` | OAuth client identifiers |
167
+ | `MappingRuleId` | Mapping-rule identifiers |
168
+ | `ClusterVariableName` | Cluster variable names |
169
+ | `AgentInstanceKey` | Agent-instance system keys |
170
+
171
+ ### Migration
172
+
173
+ <!-- snippet-source: examples/readme.ts | regions: V9ToV10Migration -->
174
+
175
+ ```ts
176
+ // v9 — plain strings were accepted
177
+ // await camunda.assignRoleToGroup({
178
+ // roleId: 'developer',
179
+ // groupId: 'engineering',
180
+ // });
181
+
182
+ // v10 — use the branded type helpers at the boundary
183
+ await camunda.assignRoleToGroup({
184
+ roleId: RoleId.assumeExists('developer'),
185
+ groupId: GroupId.assumeExists('engineering'),
186
+ });
187
+ ```
188
+
189
+ Each branded type has an `.assumeExists()` method that validates the string and returns the branded value. Validation runs at call time and can throw if the input is malformed, so call it once at the boundary (startup, config parsing, API response) and pass the branded value through your application. See [Branded Keys](#branded-keys) for more on this pattern.
190
+
191
+ ### What does NOT change
192
+
193
+ - The wire format is unchanged — all values are still strings on the wire.
194
+ - No method signatures changed name or arity.
195
+ - Branded values are assignable anywhere a `string` is expected (template literals, logging, JSON serialization), so existing string-handling code continues to work.
196
+
156
197
  ## Quick Start (Zero‑Config – Recommended)
157
198
 
158
199
  Keep configuration out of application code. Let the factory read `CAMUNDA_*` variables from the environment (12‑factor style). This makes rotation, secret management, and environment promotion safer & simpler.
@@ -681,6 +722,7 @@ Example patterns:
681
722
  return job.complete({ variables: { processed: true } });
682
723
 
683
724
  // GOOD: No-arg completion example, sentinel stored for ultimate return
725
+ // biome-ignore lint/correctness/noUnreachable: intentional — showing multiple completion patterns
684
726
  const ack = await job.complete();
685
727
  // ...
686
728
  return ack;
@@ -1166,6 +1166,50 @@ var client = createClient(createConfig({
1166
1166
  }));
1167
1167
 
1168
1168
  // src/gen/sdk.gen.ts
1169
+ var createAgentInstance = (options) => {
1170
+ return (options.client ?? client).post({
1171
+ requestValidator: void 0,
1172
+ responseValidator: void 0,
1173
+ url: "/agent-instances",
1174
+ ...options,
1175
+ headers: {
1176
+ "Content-Type": "application/json",
1177
+ ...options.headers
1178
+ }
1179
+ });
1180
+ };
1181
+ var getAgentInstance = (options) => {
1182
+ return (options.client ?? client).get({
1183
+ requestValidator: void 0,
1184
+ responseValidator: void 0,
1185
+ url: "/agent-instances/{agentInstanceKey}",
1186
+ ...options
1187
+ });
1188
+ };
1189
+ var updateAgentInstance = (options) => {
1190
+ return (options.client ?? client).patch({
1191
+ requestValidator: void 0,
1192
+ responseValidator: void 0,
1193
+ url: "/agent-instances/{agentInstanceKey}",
1194
+ ...options,
1195
+ headers: {
1196
+ "Content-Type": "application/json",
1197
+ ...options.headers
1198
+ }
1199
+ });
1200
+ };
1201
+ var searchAgentInstances = (options) => {
1202
+ return (options?.client ?? client).post({
1203
+ requestValidator: void 0,
1204
+ responseValidator: void 0,
1205
+ url: "/agent-instances/search",
1206
+ ...options,
1207
+ headers: {
1208
+ "Content-Type": "application/json",
1209
+ ...options?.headers
1210
+ }
1211
+ });
1212
+ };
1169
1213
  var searchAuditLogs = (options) => {
1170
1214
  return (options?.client ?? client).post({
1171
1215
  requestValidator: void 0,
@@ -1703,6 +1747,14 @@ var evaluateExpression = (options) => {
1703
1747
  }
1704
1748
  });
1705
1749
  };
1750
+ var getFormByKey = (options) => {
1751
+ return (options.client ?? client).get({
1752
+ requestValidator: void 0,
1753
+ responseValidator: void 0,
1754
+ url: "/forms/{formKey}",
1755
+ ...options
1756
+ });
1757
+ };
1706
1758
  var createGlobalTaskListener = (options) => {
1707
1759
  return (options.client ?? client).post({
1708
1760
  requestValidator: void 0,
@@ -2451,6 +2503,18 @@ var getProcessInstanceStatistics = (options) => {
2451
2503
  ...options
2452
2504
  });
2453
2505
  };
2506
+ var searchResources = (options) => {
2507
+ return (options?.client ?? client).post({
2508
+ requestValidator: void 0,
2509
+ responseValidator: void 0,
2510
+ url: "/resources/search",
2511
+ ...options,
2512
+ headers: {
2513
+ "Content-Type": "application/json",
2514
+ ...options?.headers
2515
+ }
2516
+ });
2517
+ };
2454
2518
  var getResource = (options) => {
2455
2519
  return (options.client ?? client).get({
2456
2520
  requestValidator: void 0,
@@ -2467,6 +2531,14 @@ var getResourceContent = (options) => {
2467
2531
  ...options
2468
2532
  });
2469
2533
  };
2534
+ var getResourceContentBinary = (options) => {
2535
+ return (options.client ?? client).get({
2536
+ requestValidator: void 0,
2537
+ responseValidator: void 0,
2538
+ url: "/resources/{resourceKey}/content/binary",
2539
+ ...options
2540
+ });
2541
+ };
2470
2542
  var deleteResource = (options) => {
2471
2543
  return (options.client ?? client).post({
2472
2544
  requestValidator: void 0,
@@ -4409,7 +4481,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
4409
4481
  }
4410
4482
 
4411
4483
  // src/runtime/version.ts
4412
- var packageVersion = "10.0.0-alpha.4";
4484
+ var packageVersion = "10.0.0-alpha.6";
4413
4485
 
4414
4486
  // src/runtime/supportLogger.ts
4415
4487
  var NoopSupportLogger = class {
@@ -6082,7 +6154,7 @@ function deepFreeze2(obj) {
6082
6154
  }
6083
6155
  return obj;
6084
6156
  }
6085
- var VOID_RESPONSES = /* @__PURE__ */ new Set(["zDeleteAuthorizationResponse", "zUpdateAuthorizationResponse", "zCancelBatchOperationResponse", "zResumeBatchOperationResponse", "zSuspendBatchOperationResponse", "zPinClockResponse", "zResetClockResponse", "zDeleteGlobalClusterVariableResponse", "zDeleteTenantClusterVariableResponse", "zDeleteDecisionInstanceResponse", "zDeleteDocumentResponse", "zActivateAdHocSubProcessActivitiesResponse", "zCreateElementInstanceVariablesResponse", "zDeleteGlobalTaskListenerResponse", "zDeleteGroupResponse", "zUnassignClientFromGroupResponse", "zAssignClientToGroupResponse", "zUnassignMappingRuleFromGroupResponse", "zAssignMappingRuleToGroupResponse", "zUnassignUserFromGroupResponse", "zAssignUserToGroupResponse", "zResolveIncidentResponse", "zUpdateJobResponse", "zCompleteJobResponse", "zThrowJobErrorResponse", "zFailJobResponse", "zDeleteMappingRuleResponse", "zCancelProcessInstanceResponse", "zDeleteProcessInstanceResponse", "zMigrateProcessInstanceResponse", "zModifyProcessInstanceResponse", "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"]);
6157
+ var VOID_RESPONSES = /* @__PURE__ */ new Set(["zUpdateAgentInstanceResponse", "zDeleteAuthorizationResponse", "zUpdateAuthorizationResponse", "zCancelBatchOperationResponse", "zResumeBatchOperationResponse", "zSuspendBatchOperationResponse", "zPinClockResponse", "zResetClockResponse", "zDeleteGlobalClusterVariableResponse", "zDeleteTenantClusterVariableResponse", "zDeleteDecisionInstanceResponse", "zDeleteDocumentResponse", "zActivateAdHocSubProcessActivitiesResponse", "zCreateElementInstanceVariablesResponse", "zDeleteGlobalTaskListenerResponse", "zDeleteGroupResponse", "zUnassignClientFromGroupResponse", "zAssignClientToGroupResponse", "zUnassignMappingRuleFromGroupResponse", "zAssignMappingRuleToGroupResponse", "zUnassignUserFromGroupResponse", "zAssignUserToGroupResponse", "zResolveIncidentResponse", "zUpdateJobResponse", "zCompleteJobResponse", "zThrowJobErrorResponse", "zFailJobResponse", "zDeleteMappingRuleResponse", "zCancelProcessInstanceResponse", "zDeleteProcessInstanceResponse", "zMigrateProcessInstanceResponse", "zModifyProcessInstanceResponse", "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"]);
6086
6158
  var CancelError = class extends Error {
6087
6159
  constructor() {
6088
6160
  super("Cancelled");
@@ -6386,7 +6458,7 @@ var CamundaClient = class {
6386
6458
  _schemasPromise = null;
6387
6459
  _loadSchemas() {
6388
6460
  if (!this._schemasPromise) {
6389
- this._schemasPromise = import("./zod.gen-WZT74U4Q.js");
6461
+ this._schemasPromise = import("./zod.gen-SZE2T4QF.js");
6390
6462
  }
6391
6463
  return this._schemasPromise;
6392
6464
  }
@@ -7687,6 +7759,58 @@ var CamundaClient = class {
7687
7759
  return this._invokeWithRetry(() => call(), { opId: "createAdminUser", exempt: false, retryOverride: options?.retry });
7688
7760
  });
7689
7761
  }
7762
+ createAgentInstance(arg, options) {
7763
+ return toCancelable2(async (signal) => {
7764
+ const _body = arg;
7765
+ let envelope = {};
7766
+ envelope.body = _body;
7767
+ if (this._validation.settings.req !== "none") {
7768
+ const _schemas = await this._loadSchemas();
7769
+ const maybe = await this._validation.gateRequest("createAgentInstance", _schemas.zCreateAgentInstanceData, envelope);
7770
+ if (this._validation.settings.req === "strict") envelope = maybe;
7771
+ }
7772
+ const opts = { client: this._client, signal, throwOnError: false };
7773
+ if (envelope.body !== void 0) opts.body = envelope.body;
7774
+ const call = async () => {
7775
+ try {
7776
+ const _raw = await createAgentInstance(opts);
7777
+ let data = this._evaluateResponse(_raw, "createAgentInstance", (resp) => {
7778
+ const st = resp.status ?? resp.response?.status;
7779
+ if (!st) return void 0;
7780
+ const candidate = st === 429 || st === 503 || st === 500;
7781
+ if (!candidate) return void 0;
7782
+ let prob = void 0;
7783
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
7784
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
7785
+ err.status = st;
7786
+ err.name = "HttpSdkError";
7787
+ if (prob) {
7788
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
7789
+ }
7790
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
7791
+ if (!isBp) err.nonRetryable = true;
7792
+ return err;
7793
+ });
7794
+ const _respSchemaName = "zCreateAgentInstanceResponse";
7795
+ if (this._isVoidResponse(_respSchemaName)) {
7796
+ data = void 0;
7797
+ }
7798
+ if (this._validation.settings.res !== "none") {
7799
+ const _schemas = await this._loadSchemas();
7800
+ const _schema = _schemas.zCreateAgentInstanceResponse;
7801
+ if (_schema) {
7802
+ const maybeR = await this._validation.gateResponse("createAgentInstance", _schema, data);
7803
+ if (this._validation.settings.res === "strict") data = maybeR;
7804
+ }
7805
+ }
7806
+ return data;
7807
+ } catch (e) {
7808
+ throw e;
7809
+ }
7810
+ };
7811
+ return this._invokeWithRetry(() => call(), { opId: "createAgentInstance", exempt: false, retryOverride: options?.retry });
7812
+ });
7813
+ }
7690
7814
  createAuthorization(arg, options) {
7691
7815
  return toCancelable2(async (signal) => {
7692
7816
  const _body = arg;
@@ -9511,6 +9635,62 @@ var CamundaClient = class {
9511
9635
  return this._invokeWithRetry(() => call(), { opId: "failJob", exempt: true, retryOverride: options?.retry });
9512
9636
  });
9513
9637
  }
9638
+ getAgentInstance(arg, consistencyManagement, options) {
9639
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
9640
+ const useConsistency = consistencyManagement.consistency;
9641
+ return toCancelable2(async (signal) => {
9642
+ const { agentInstanceKey } = arg || {};
9643
+ let envelope = {};
9644
+ envelope.path = { agentInstanceKey };
9645
+ if (this._validation.settings.req !== "none") {
9646
+ const _schemas = await this._loadSchemas();
9647
+ const maybe = await this._validation.gateRequest("getAgentInstance", _schemas.zGetAgentInstanceData, envelope);
9648
+ if (this._validation.settings.req === "strict") envelope = maybe;
9649
+ }
9650
+ const opts = { client: this._client, signal, throwOnError: false };
9651
+ if (envelope.path) opts.path = envelope.path;
9652
+ const call = async () => {
9653
+ try {
9654
+ const _raw = await getAgentInstance(opts);
9655
+ let data = this._evaluateResponse(_raw, "getAgentInstance", (resp) => {
9656
+ const st = resp.status ?? resp.response?.status;
9657
+ if (!st) return void 0;
9658
+ const candidate = st === 429 || st === 503 || st === 500;
9659
+ if (!candidate) return void 0;
9660
+ let prob = void 0;
9661
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
9662
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
9663
+ err.status = st;
9664
+ err.name = "HttpSdkError";
9665
+ if (prob) {
9666
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
9667
+ }
9668
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
9669
+ if (!isBp) err.nonRetryable = true;
9670
+ return err;
9671
+ });
9672
+ const _respSchemaName = "zGetAgentInstanceResponse";
9673
+ if (this._isVoidResponse(_respSchemaName)) {
9674
+ data = void 0;
9675
+ }
9676
+ if (this._validation.settings.res !== "none") {
9677
+ const _schemas = await this._loadSchemas();
9678
+ const _schema = _schemas.zGetAgentInstanceResponse;
9679
+ if (_schema) {
9680
+ const maybeR = await this._validation.gateResponse("getAgentInstance", _schema, data);
9681
+ if (this._validation.settings.res === "strict") data = maybeR;
9682
+ }
9683
+ }
9684
+ return data;
9685
+ } catch (e) {
9686
+ throw e;
9687
+ }
9688
+ };
9689
+ const invoke = () => toCancelable2(() => call());
9690
+ if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log });
9691
+ return invoke();
9692
+ });
9693
+ }
9514
9694
  getAuditLog(arg, consistencyManagement, options) {
9515
9695
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
9516
9696
  const useConsistency = consistencyManagement.consistency;
@@ -10112,6 +10292,62 @@ var CamundaClient = class {
10112
10292
  return invoke();
10113
10293
  });
10114
10294
  }
10295
+ getFormByKey(arg, consistencyManagement, options) {
10296
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
10297
+ const useConsistency = consistencyManagement.consistency;
10298
+ return toCancelable2(async (signal) => {
10299
+ const { formKey } = arg || {};
10300
+ let envelope = {};
10301
+ envelope.path = { formKey };
10302
+ if (this._validation.settings.req !== "none") {
10303
+ const _schemas = await this._loadSchemas();
10304
+ const maybe = await this._validation.gateRequest("getFormByKey", _schemas.zGetFormByKeyData, envelope);
10305
+ if (this._validation.settings.req === "strict") envelope = maybe;
10306
+ }
10307
+ const opts = { client: this._client, signal, throwOnError: false };
10308
+ if (envelope.path) opts.path = envelope.path;
10309
+ const call = async () => {
10310
+ try {
10311
+ const _raw = await getFormByKey(opts);
10312
+ let data = this._evaluateResponse(_raw, "getFormByKey", (resp) => {
10313
+ const st = resp.status ?? resp.response?.status;
10314
+ if (!st) return void 0;
10315
+ const candidate = st === 429 || st === 503 || st === 500;
10316
+ if (!candidate) return void 0;
10317
+ let prob = void 0;
10318
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
10319
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
10320
+ err.status = st;
10321
+ err.name = "HttpSdkError";
10322
+ if (prob) {
10323
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
10324
+ }
10325
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
10326
+ if (!isBp) err.nonRetryable = true;
10327
+ return err;
10328
+ });
10329
+ const _respSchemaName = "zGetFormByKeyResponse";
10330
+ if (this._isVoidResponse(_respSchemaName)) {
10331
+ data = void 0;
10332
+ }
10333
+ if (this._validation.settings.res !== "none") {
10334
+ const _schemas = await this._loadSchemas();
10335
+ const _schema = _schemas.zGetFormByKeyResponse;
10336
+ if (_schema) {
10337
+ const maybeR = await this._validation.gateResponse("getFormByKey", _schema, data);
10338
+ if (this._validation.settings.res === "strict") data = maybeR;
10339
+ }
10340
+ }
10341
+ return data;
10342
+ } catch (e) {
10343
+ throw e;
10344
+ }
10345
+ };
10346
+ const invoke = () => toCancelable2(() => call());
10347
+ if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log });
10348
+ return invoke();
10349
+ });
10350
+ }
10115
10351
  getGlobalClusterVariable(arg, consistencyManagement, options) {
10116
10352
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
10117
10353
  const useConsistency = consistencyManagement.consistency;
@@ -11501,6 +11737,62 @@ var CamundaClient = class {
11501
11737
  return invoke();
11502
11738
  });
11503
11739
  }
11740
+ getResourceContentBinary(arg, consistencyManagement, options) {
11741
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
11742
+ const useConsistency = consistencyManagement.consistency;
11743
+ return toCancelable2(async (signal) => {
11744
+ const { resourceKey } = arg || {};
11745
+ let envelope = {};
11746
+ envelope.path = { resourceKey };
11747
+ if (this._validation.settings.req !== "none") {
11748
+ const _schemas = await this._loadSchemas();
11749
+ const maybe = await this._validation.gateRequest("getResourceContentBinary", _schemas.zGetResourceContentBinaryData, envelope);
11750
+ if (this._validation.settings.req === "strict") envelope = maybe;
11751
+ }
11752
+ const opts = { client: this._client, signal, throwOnError: false };
11753
+ if (envelope.path) opts.path = envelope.path;
11754
+ const call = async () => {
11755
+ try {
11756
+ const _raw = await getResourceContentBinary(opts);
11757
+ let data = this._evaluateResponse(_raw, "getResourceContentBinary", (resp) => {
11758
+ const st = resp.status ?? resp.response?.status;
11759
+ if (!st) return void 0;
11760
+ const candidate = st === 429 || st === 503 || st === 500;
11761
+ if (!candidate) return void 0;
11762
+ let prob = void 0;
11763
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
11764
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
11765
+ err.status = st;
11766
+ err.name = "HttpSdkError";
11767
+ if (prob) {
11768
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
11769
+ }
11770
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
11771
+ if (!isBp) err.nonRetryable = true;
11772
+ return err;
11773
+ });
11774
+ const _respSchemaName = "zGetResourceContentBinaryResponse";
11775
+ if (this._isVoidResponse(_respSchemaName)) {
11776
+ data = void 0;
11777
+ }
11778
+ if (this._validation.settings.res !== "none") {
11779
+ const _schemas = await this._loadSchemas();
11780
+ const _schema = _schemas.zGetResourceContentBinaryResponse;
11781
+ if (_schema) {
11782
+ const maybeR = await this._validation.gateResponse("getResourceContentBinary", _schema, data);
11783
+ if (this._validation.settings.res === "strict") data = maybeR;
11784
+ }
11785
+ }
11786
+ return data;
11787
+ } catch (e) {
11788
+ throw e;
11789
+ }
11790
+ };
11791
+ const invoke = () => toCancelable2(() => call());
11792
+ if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log });
11793
+ return invoke();
11794
+ });
11795
+ }
11504
11796
  getRole(arg, consistencyManagement, options) {
11505
11797
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
11506
11798
  const useConsistency = consistencyManagement.consistency;
@@ -12709,6 +13001,62 @@ var CamundaClient = class {
12709
13001
  return this._invokeWithRetry(() => call(), { opId: "resumeBatchOperation", exempt: false, retryOverride: options?.retry });
12710
13002
  });
12711
13003
  }
13004
+ searchAgentInstances(arg, consistencyManagement, options) {
13005
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
13006
+ const useConsistency = consistencyManagement.consistency;
13007
+ return toCancelable2(async (signal) => {
13008
+ const _body = arg;
13009
+ let envelope = {};
13010
+ envelope.body = _body;
13011
+ if (this._validation.settings.req !== "none") {
13012
+ const _schemas = await this._loadSchemas();
13013
+ const maybe = await this._validation.gateRequest("searchAgentInstances", _schemas.zSearchAgentInstancesData, envelope);
13014
+ if (this._validation.settings.req === "strict") envelope = maybe;
13015
+ }
13016
+ const opts = { client: this._client, signal, throwOnError: false };
13017
+ if (envelope.body !== void 0) opts.body = envelope.body;
13018
+ const call = async () => {
13019
+ try {
13020
+ const _raw = await searchAgentInstances(opts);
13021
+ let data = this._evaluateResponse(_raw, "searchAgentInstances", (resp) => {
13022
+ const st = resp.status ?? resp.response?.status;
13023
+ if (!st) return void 0;
13024
+ const candidate = st === 429 || st === 503 || st === 500;
13025
+ if (!candidate) return void 0;
13026
+ let prob = void 0;
13027
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
13028
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
13029
+ err.status = st;
13030
+ err.name = "HttpSdkError";
13031
+ if (prob) {
13032
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
13033
+ }
13034
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
13035
+ if (!isBp) err.nonRetryable = true;
13036
+ return err;
13037
+ });
13038
+ const _respSchemaName = "zSearchAgentInstancesResponse";
13039
+ if (this._isVoidResponse(_respSchemaName)) {
13040
+ data = void 0;
13041
+ }
13042
+ if (this._validation.settings.res !== "none") {
13043
+ const _schemas = await this._loadSchemas();
13044
+ const _schema = _schemas.zSearchAgentInstancesResponse;
13045
+ if (_schema) {
13046
+ const maybeR = await this._validation.gateResponse("searchAgentInstances", _schema, data);
13047
+ if (this._validation.settings.res === "strict") data = maybeR;
13048
+ }
13049
+ }
13050
+ return data;
13051
+ } catch (e) {
13052
+ throw e;
13053
+ }
13054
+ };
13055
+ const invoke = () => toCancelable2(() => call());
13056
+ if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log });
13057
+ return invoke();
13058
+ });
13059
+ }
12712
13060
  searchAuditLogs(arg, consistencyManagement, options) {
12713
13061
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
12714
13062
  const useConsistency = consistencyManagement.consistency;
@@ -14299,6 +14647,62 @@ var CamundaClient = class {
14299
14647
  return invoke();
14300
14648
  });
14301
14649
  }
14650
+ searchResources(arg, consistencyManagement, options) {
14651
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
14652
+ const useConsistency = consistencyManagement.consistency;
14653
+ return toCancelable2(async (signal) => {
14654
+ const _body = arg;
14655
+ let envelope = {};
14656
+ envelope.body = _body;
14657
+ if (this._validation.settings.req !== "none") {
14658
+ const _schemas = await this._loadSchemas();
14659
+ const maybe = await this._validation.gateRequest("searchResources", _schemas.zSearchResourcesData, envelope);
14660
+ if (this._validation.settings.req === "strict") envelope = maybe;
14661
+ }
14662
+ const opts = { client: this._client, signal, throwOnError: false };
14663
+ if (envelope.body !== void 0) opts.body = envelope.body;
14664
+ const call = async () => {
14665
+ try {
14666
+ const _raw = await searchResources(opts);
14667
+ let data = this._evaluateResponse(_raw, "searchResources", (resp) => {
14668
+ const st = resp.status ?? resp.response?.status;
14669
+ if (!st) return void 0;
14670
+ const candidate = st === 429 || st === 503 || st === 500;
14671
+ if (!candidate) return void 0;
14672
+ let prob = void 0;
14673
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
14674
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
14675
+ err.status = st;
14676
+ err.name = "HttpSdkError";
14677
+ if (prob) {
14678
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
14679
+ }
14680
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
14681
+ if (!isBp) err.nonRetryable = true;
14682
+ return err;
14683
+ });
14684
+ const _respSchemaName = "zSearchResourcesResponse";
14685
+ if (this._isVoidResponse(_respSchemaName)) {
14686
+ data = void 0;
14687
+ }
14688
+ if (this._validation.settings.res !== "none") {
14689
+ const _schemas = await this._loadSchemas();
14690
+ const _schema = _schemas.zSearchResourcesResponse;
14691
+ if (_schema) {
14692
+ const maybeR = await this._validation.gateResponse("searchResources", _schema, data);
14693
+ if (this._validation.settings.res === "strict") data = maybeR;
14694
+ }
14695
+ }
14696
+ return data;
14697
+ } catch (e) {
14698
+ throw e;
14699
+ }
14700
+ };
14701
+ const invoke = () => toCancelable2(() => call());
14702
+ if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log });
14703
+ return invoke();
14704
+ });
14705
+ }
14302
14706
  searchRoles(arg, consistencyManagement, options) {
14303
14707
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
14304
14708
  const useConsistency = consistencyManagement.consistency;
@@ -15833,6 +16237,60 @@ var CamundaClient = class {
15833
16237
  return this._invokeWithRetry(() => call(), { opId: "unassignUserTask", exempt: false, retryOverride: options?.retry });
15834
16238
  });
15835
16239
  }
16240
+ updateAgentInstance(arg, options) {
16241
+ return toCancelable2(async (signal) => {
16242
+ const { agentInstanceKey, ..._body } = arg || {};
16243
+ let envelope = {};
16244
+ envelope.path = { agentInstanceKey };
16245
+ envelope.body = _body;
16246
+ if (this._validation.settings.req !== "none") {
16247
+ const _schemas = await this._loadSchemas();
16248
+ const maybe = await this._validation.gateRequest("updateAgentInstance", _schemas.zUpdateAgentInstanceData, envelope);
16249
+ if (this._validation.settings.req === "strict") envelope = maybe;
16250
+ }
16251
+ const opts = { client: this._client, signal, throwOnError: false };
16252
+ if (envelope.path) opts.path = envelope.path;
16253
+ if (envelope.body !== void 0) opts.body = envelope.body;
16254
+ const call = async () => {
16255
+ try {
16256
+ const _raw = await updateAgentInstance(opts);
16257
+ let data = this._evaluateResponse(_raw, "updateAgentInstance", (resp) => {
16258
+ const st = resp.status ?? resp.response?.status;
16259
+ if (!st) return void 0;
16260
+ const candidate = st === 429 || st === 503 || st === 500;
16261
+ if (!candidate) return void 0;
16262
+ let prob = void 0;
16263
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
16264
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
16265
+ err.status = st;
16266
+ err.name = "HttpSdkError";
16267
+ if (prob) {
16268
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
16269
+ }
16270
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
16271
+ if (!isBp) err.nonRetryable = true;
16272
+ return err;
16273
+ });
16274
+ const _respSchemaName = "zUpdateAgentInstanceResponse";
16275
+ if (this._isVoidResponse(_respSchemaName)) {
16276
+ data = void 0;
16277
+ }
16278
+ if (this._validation.settings.res !== "none") {
16279
+ const _schemas = await this._loadSchemas();
16280
+ const _schema = _schemas.zUpdateAgentInstanceResponse;
16281
+ if (_schema) {
16282
+ const maybeR = await this._validation.gateResponse("updateAgentInstance", _schema, data);
16283
+ if (this._validation.settings.res === "strict") data = maybeR;
16284
+ }
16285
+ }
16286
+ return data;
16287
+ } catch (e) {
16288
+ throw e;
16289
+ }
16290
+ };
16291
+ return this._invokeWithRetry(() => call(), { opId: "updateAgentInstance", exempt: false, retryOverride: options?.retry });
16292
+ });
16293
+ }
15836
16294
  updateAuthorization(arg, options) {
15837
16295
  return toCancelable2(async (signal) => {
15838
16296
  const { authorizationKey, ..._body } = arg || {};
@@ -16727,4 +17185,4 @@ export {
16727
17185
  withTimeoutTE,
16728
17186
  eventuallyTE
16729
17187
  };
16730
- //# sourceMappingURL=chunk-YMG6EGPW.js.map
17188
+ //# sourceMappingURL=chunk-IWEXAQX4.js.map