@camunda8/orchestration-cluster-api 10.0.0-alpha.15 → 10.0.0-alpha.16

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.
@@ -331,12 +331,12 @@ var JobWorker = class {
331
331
  constructor(client2, cfg) {
332
332
  this._client = client2;
333
333
  this._cfg = {
334
- pollIntervalMs: 1,
335
- autoStart: true,
336
- validateSchemas: false,
337
- maxParallelJobs: 10,
338
- jobTimeoutMs: 6e4,
339
- ...cfg
334
+ ...cfg,
335
+ pollIntervalMs: cfg.pollIntervalMs ?? 1,
336
+ autoStart: cfg.autoStart ?? true,
337
+ validateSchemas: cfg.validateSchemas ?? false,
338
+ maxParallelJobs: cfg.maxParallelJobs ?? 10,
339
+ jobTimeoutMs: cfg.jobTimeoutMs ?? 6e4
340
340
  };
341
341
  this._maxParallelJobs = this._cfg.maxParallelJobs;
342
342
  this._jobTimeoutMs = this._cfg.jobTimeoutMs;
@@ -3680,6 +3680,28 @@ var getProcessDefinitionStatistics = (options) => {
3680
3680
  }
3681
3681
  });
3682
3682
  };
3683
+ var searchProcessDefinitionVariableNames = (options) => {
3684
+ return (options.client ?? client).post({
3685
+ requestValidator: void 0,
3686
+ responseValidator: void 0,
3687
+ security: [
3688
+ {
3689
+ scheme: "bearer",
3690
+ type: "http"
3691
+ },
3692
+ {
3693
+ scheme: "basic",
3694
+ type: "http"
3695
+ }
3696
+ ],
3697
+ url: "/process-definitions/{processDefinitionKey}/variable-names/search",
3698
+ ...options,
3699
+ headers: {
3700
+ "Content-Type": "application/json",
3701
+ ...options.headers
3702
+ }
3703
+ });
3704
+ };
3683
3705
  var getProcessDefinitionXml = (options) => {
3684
3706
  return (options.client ?? client).get({
3685
3707
  requestValidator: void 0,
@@ -3852,6 +3874,28 @@ var modifyProcessInstancesBatchOperation = (options) => {
3852
3874
  }
3853
3875
  });
3854
3876
  };
3877
+ var resumeProcessInstancesBatchOperation = (options) => {
3878
+ return (options.client ?? client).post({
3879
+ requestValidator: void 0,
3880
+ responseValidator: void 0,
3881
+ security: [
3882
+ {
3883
+ scheme: "bearer",
3884
+ type: "http"
3885
+ },
3886
+ {
3887
+ scheme: "basic",
3888
+ type: "http"
3889
+ }
3890
+ ],
3891
+ url: "/process-instances/resumption",
3892
+ ...options,
3893
+ headers: {
3894
+ "Content-Type": "application/json",
3895
+ ...options.headers
3896
+ }
3897
+ });
3898
+ };
3855
3899
  var searchProcessInstances = (options) => {
3856
3900
  return (options?.client ?? client).post({
3857
3901
  requestValidator: void 0,
@@ -3874,6 +3918,28 @@ var searchProcessInstances = (options) => {
3874
3918
  }
3875
3919
  });
3876
3920
  };
3921
+ var suspendProcessInstancesBatchOperation = (options) => {
3922
+ return (options.client ?? client).post({
3923
+ requestValidator: void 0,
3924
+ responseValidator: void 0,
3925
+ security: [
3926
+ {
3927
+ scheme: "bearer",
3928
+ type: "http"
3929
+ },
3930
+ {
3931
+ scheme: "basic",
3932
+ type: "http"
3933
+ }
3934
+ ],
3935
+ url: "/process-instances/suspension",
3936
+ ...options,
3937
+ headers: {
3938
+ "Content-Type": "application/json",
3939
+ ...options.headers
3940
+ }
3941
+ });
3942
+ };
3877
3943
  var getProcessInstance = (options) => {
3878
3944
  return (options.client ?? client).get({
3879
3945
  requestValidator: void 0,
@@ -3892,6 +3958,28 @@ var getProcessInstance = (options) => {
3892
3958
  ...options
3893
3959
  });
3894
3960
  };
3961
+ var assignProcessInstanceBusinessId = (options) => {
3962
+ return (options.client ?? client).post({
3963
+ requestValidator: void 0,
3964
+ responseValidator: void 0,
3965
+ security: [
3966
+ {
3967
+ scheme: "bearer",
3968
+ type: "http"
3969
+ },
3970
+ {
3971
+ scheme: "basic",
3972
+ type: "http"
3973
+ }
3974
+ ],
3975
+ url: "/process-instances/{processInstanceKey}/business-id-assignment",
3976
+ ...options,
3977
+ headers: {
3978
+ "Content-Type": "application/json",
3979
+ ...options.headers
3980
+ }
3981
+ });
3982
+ };
3895
3983
  var getProcessInstanceCallHierarchy = (options) => {
3896
3984
  return (options.client ?? client).get({
3897
3985
  requestValidator: void 0,
@@ -4038,6 +4126,28 @@ var modifyProcessInstance = (options) => {
4038
4126
  }
4039
4127
  });
4040
4128
  };
4129
+ var resumeProcessInstance = (options) => {
4130
+ return (options.client ?? client).post({
4131
+ requestValidator: void 0,
4132
+ responseValidator: void 0,
4133
+ security: [
4134
+ {
4135
+ scheme: "bearer",
4136
+ type: "http"
4137
+ },
4138
+ {
4139
+ scheme: "basic",
4140
+ type: "http"
4141
+ }
4142
+ ],
4143
+ url: "/process-instances/{processInstanceKey}/resumption",
4144
+ ...options,
4145
+ headers: {
4146
+ "Content-Type": "application/json",
4147
+ ...options.headers
4148
+ }
4149
+ });
4150
+ };
4041
4151
  var getProcessInstanceSequenceFlows = (options) => {
4042
4152
  return (options.client ?? client).get({
4043
4153
  requestValidator: void 0,
@@ -4092,6 +4202,28 @@ var getProcessInstanceWaitStateStatistics = (options) => {
4092
4202
  ...options
4093
4203
  });
4094
4204
  };
4205
+ var suspendProcessInstance = (options) => {
4206
+ return (options.client ?? client).post({
4207
+ requestValidator: void 0,
4208
+ responseValidator: void 0,
4209
+ security: [
4210
+ {
4211
+ scheme: "bearer",
4212
+ type: "http"
4213
+ },
4214
+ {
4215
+ scheme: "basic",
4216
+ type: "http"
4217
+ }
4218
+ ],
4219
+ url: "/process-instances/{processInstanceKey}/suspension",
4220
+ ...options,
4221
+ headers: {
4222
+ "Content-Type": "application/json",
4223
+ ...options.headers
4224
+ }
4225
+ });
4226
+ };
4095
4227
  var searchResources = (options) => {
4096
4228
  return (options?.client ?? client).post({
4097
4229
  requestValidator: void 0,
@@ -4524,6 +4656,28 @@ var assignRoleToUser = (options) => {
4524
4656
  ...options
4525
4657
  });
4526
4658
  };
4659
+ var resolveSecrets = (options) => {
4660
+ return (options.client ?? client).post({
4661
+ requestValidator: void 0,
4662
+ responseValidator: void 0,
4663
+ security: [
4664
+ {
4665
+ scheme: "bearer",
4666
+ type: "http"
4667
+ },
4668
+ {
4669
+ scheme: "basic",
4670
+ type: "http"
4671
+ }
4672
+ ],
4673
+ url: "/secrets/resolve",
4674
+ ...options,
4675
+ headers: {
4676
+ "Content-Type": "application/json",
4677
+ ...options.headers
4678
+ }
4679
+ });
4680
+ };
4527
4681
  var createAdminUser = (options) => {
4528
4682
  return (options.client ?? client).post({
4529
4683
  requestValidator: void 0,
@@ -5012,6 +5166,46 @@ var getTopology = (options) => {
5012
5166
  ...options
5013
5167
  });
5014
5168
  };
5169
+ var changeClusterMode = (options) => {
5170
+ return (options.client ?? client).patch({
5171
+ requestValidator: void 0,
5172
+ responseValidator: void 0,
5173
+ security: [
5174
+ {
5175
+ scheme: "bearer",
5176
+ type: "http"
5177
+ },
5178
+ {
5179
+ scheme: "basic",
5180
+ type: "http"
5181
+ }
5182
+ ],
5183
+ url: "/mode",
5184
+ ...options
5185
+ });
5186
+ };
5187
+ var restore = (options) => {
5188
+ return (options.client ?? client).post({
5189
+ requestValidator: void 0,
5190
+ responseValidator: void 0,
5191
+ security: [
5192
+ {
5193
+ scheme: "bearer",
5194
+ type: "http"
5195
+ },
5196
+ {
5197
+ scheme: "basic",
5198
+ type: "http"
5199
+ }
5200
+ ],
5201
+ url: "/restore",
5202
+ ...options,
5203
+ headers: {
5204
+ "Content-Type": "application/json",
5205
+ ...options.headers
5206
+ }
5207
+ });
5208
+ };
5015
5209
  var createUser = (options) => {
5016
5210
  return (options.client ?? client).post({
5017
5211
  requestValidator: void 0,
@@ -5751,7 +5945,8 @@ var SCHEMA = {
5751
5945
  CAMUNDA_REST_ADDRESS: {
5752
5946
  type: "string",
5753
5947
  default: "http://localhost:8080/v2",
5754
- doc: "Base REST endpoint address."
5948
+ aliases: ["ZEEBE_REST_ADDRESS"],
5949
+ doc: "Base REST endpoint address. Legacy alias: ZEEBE_REST_ADDRESS (used only when CAMUNDA_REST_ADDRESS is unset)."
5755
5950
  },
5756
5951
  CAMUNDA_SDK_HTTP_RETRY_MAX_ATTEMPTS: {
5757
5952
  desc: "Maximum total HTTP attempts (including the initial attempt) for transient failures (429,503, network).",
@@ -5982,6 +6177,12 @@ function isSecret(key) {
5982
6177
  function requiredWhen(key) {
5983
6178
  return SCHEMA[key].requiredWhen;
5984
6179
  }
6180
+ function aliases(key) {
6181
+ return SCHEMA[key].aliases ?? [];
6182
+ }
6183
+ function defaultValue(key) {
6184
+ return SCHEMA[key].default;
6185
+ }
5985
6186
  function schemaEntry(key) {
5986
6187
  return SCHEMA[key];
5987
6188
  }
@@ -6194,30 +6395,56 @@ function hydrateConfig(options = {}) {
6194
6395
  if (envInput.CAMUNDA_SUPPORT_LOG_ENABLED === void 0 && envInput.CAMUNDA_SUPPORT_LOGGER !== void 0) {
6195
6396
  envInput.CAMUNDA_SUPPORT_LOG_ENABLED = envInput.CAMUNDA_SUPPORT_LOGGER;
6196
6397
  }
6197
- if (envInput.CAMUNDA_REST_ADDRESS === void 0 && baseEnv.ZEEBE_REST_ADDRESS !== void 0 && baseEnv.ZEEBE_REST_ADDRESS.trim() !== "") {
6198
- envInput.CAMUNDA_REST_ADDRESS = baseEnv.ZEEBE_REST_ADDRESS.trim();
6199
- }
6200
- if ((envInput.CAMUNDA_AUTH_STRATEGY === void 0 || envInput.CAMUNDA_AUTH_STRATEGY.trim() === "") && envInput.CAMUNDA_OAUTH_URL !== void 0 && envInput.CAMUNDA_OAUTH_URL.trim() !== "" && envInput.CAMUNDA_CLIENT_ID !== void 0 && envInput.CAMUNDA_CLIENT_ID.trim() !== "" && envInput.CAMUNDA_CLIENT_SECRET !== void 0 && envInput.CAMUNDA_CLIENT_SECRET.trim() !== "") {
6201
- envInput.CAMUNDA_AUTH_STRATEGY = "OAUTH";
6398
+ for (const k of allKeys()) {
6399
+ if (envInput[k] !== void 0) continue;
6400
+ for (const alias of aliases(k)) {
6401
+ const aliasVal = baseEnv[alias];
6402
+ if (aliasVal !== void 0 && aliasVal.trim() !== "") {
6403
+ envInput[k] = aliasVal.trim();
6404
+ break;
6405
+ }
6406
+ }
6202
6407
  }
6203
6408
  let envTyped = {};
6204
6409
  envTyped = createEnv(typedEnvSchema, { env: envInput });
6205
6410
  for (const k of allKeys()) {
6206
6411
  const entry = schemaEntry(k);
6207
6412
  const rawProvided = envInput[k];
6413
+ const providedIsEmpty = rawProvided !== void 0 && rawProvided.trim() === "";
6208
6414
  const val = envTyped[k];
6209
- if (val !== void 0 && val !== null) {
6415
+ const valIsEmptyString = typeof val === "string" && val.trim() === "";
6416
+ if (val !== void 0 && val !== null && !valIsEmptyString) {
6210
6417
  rawMap[k] = typeof val === "string" ? val : String(val);
6211
- } else if (rawProvided !== void 0) {
6418
+ } else if (rawProvided !== void 0 && !providedIsEmpty && val === void 0) {
6212
6419
  } else if (entry.default !== void 0) {
6213
6420
  rawMap[k] = String(entry.default);
6214
6421
  }
6215
6422
  }
6216
- if (!userSetStrategy && rawMap.CAMUNDA_AUTH_STRATEGY === "NONE" && rawMap.CAMUNDA_OAUTH_URL && rawMap.CAMUNDA_OAUTH_URL.trim() !== "" && rawMap.CAMUNDA_CLIENT_ID && rawMap.CAMUNDA_CLIENT_ID.trim() !== "" && rawMap.CAMUNDA_CLIENT_SECRET && rawMap.CAMUNDA_CLIENT_SECRET.trim() !== "") {
6423
+ if (!userSetStrategy && rawMap.CAMUNDA_AUTH_STRATEGY === "NONE" && rawMap.CAMUNDA_OAUTH_URL?.trim() && rawMap.CAMUNDA_CLIENT_ID?.trim() && rawMap.CAMUNDA_CLIENT_SECRET?.trim()) {
6217
6424
  rawMap.CAMUNDA_AUTH_STRATEGY = "OAUTH";
6218
6425
  }
6219
- const authStrategyRaw = (rawMap.CAMUNDA_AUTH_STRATEGY || "NONE").toString();
6220
- const authStrategy = authStrategyRaw.trim().toUpperCase();
6426
+ const reqStr = (k) => {
6427
+ const v = rawMap[k];
6428
+ if (v !== void 0 && v.trim() !== "") return v;
6429
+ const d = defaultValue(k);
6430
+ if (d !== void 0) return String(d);
6431
+ if (v !== void 0) return v;
6432
+ throw new Error(`Internal configuration error: no value or schema default for ${k}`);
6433
+ };
6434
+ const reqInt = (k) => {
6435
+ const n = parseInt(reqStr(k), 10);
6436
+ if (Number.isNaN(n)) {
6437
+ throw new Error(`Internal configuration error: ${k} is not a valid integer`);
6438
+ }
6439
+ return n;
6440
+ };
6441
+ const reqBool = (k) => {
6442
+ const typed = envTyped[k];
6443
+ if (typeof typed === "boolean") return typed;
6444
+ return reqStr(k).trim().toLowerCase() === "true";
6445
+ };
6446
+ const authStrategyRaw = reqStr("CAMUNDA_AUTH_STRATEGY");
6447
+ const authStrategy = authStrategyRaw;
6221
6448
  if (!["NONE", "OAUTH", "BASIC"].includes(authStrategy)) {
6222
6449
  errors.push({
6223
6450
  code: "CONFIG_INVALID_ENUM" /* CONFIG_INVALID_ENUM */,
@@ -6265,7 +6492,7 @@ function hydrateConfig(options = {}) {
6265
6492
  message: "CAMUNDA_MTLS_KEY_PASSPHRASE is set but no client key was provided."
6266
6493
  });
6267
6494
  }
6268
- const validationRaw = rawMap.CAMUNDA_SDK_VALIDATION || "req:none,res:none";
6495
+ const validationRaw = reqStr("CAMUNDA_SDK_VALIDATION");
6269
6496
  const validation = parseValidation(validationRaw, errors);
6270
6497
  if (errors.length) {
6271
6498
  errors.sort((a, b) => (a.key || "").localeCompare(b.key || "") || a.code.localeCompare(b.code));
@@ -6280,7 +6507,7 @@ function hydrateConfig(options = {}) {
6280
6507
  if (isSecret(k) && v) redacted[k] = redactSecret(v);
6281
6508
  else redacted[k] = v;
6282
6509
  }
6283
- let _restAddress = rawMap.CAMUNDA_REST_ADDRESS;
6510
+ let _restAddress = reqStr("CAMUNDA_REST_ADDRESS");
6284
6511
  if (_restAddress) {
6285
6512
  _restAddress = _restAddress.trim();
6286
6513
  if (!/\/v2\/?$/i.test(_restAddress)) {
@@ -6288,21 +6515,22 @@ function hydrateConfig(options = {}) {
6288
6515
  } else {
6289
6516
  }
6290
6517
  }
6291
- const profile = (rawMap.CAMUNDA_SDK_BACKPRESSURE_PROFILE || "BALANCED").toString().toUpperCase();
6518
+ const profile = reqStr("CAMUNDA_SDK_BACKPRESSURE_PROFILE");
6519
+ const schemaBpDefaults = {
6520
+ initialMax: reqInt("CAMUNDA_SDK_BACKPRESSURE_INITIAL_MAX"),
6521
+ soft: reqInt("CAMUNDA_SDK_BACKPRESSURE_SOFT_FACTOR"),
6522
+ severe: reqInt("CAMUNDA_SDK_BACKPRESSURE_SEVERE_FACTOR"),
6523
+ recoveryInterval: reqInt("CAMUNDA_SDK_BACKPRESSURE_RECOVERY_INTERVAL_MS"),
6524
+ recoveryStep: reqInt("CAMUNDA_SDK_BACKPRESSURE_RECOVERY_STEP"),
6525
+ quietMs: reqInt("CAMUNDA_SDK_BACKPRESSURE_DECAY_QUIET_MS"),
6526
+ floor: reqInt("CAMUNDA_SDK_BACKPRESSURE_FLOOR"),
6527
+ severeThreshold: reqInt("CAMUNDA_SDK_BACKPRESSURE_SEVERE_THRESHOLD"),
6528
+ maxWaiters: reqInt("CAMUNDA_SDK_BACKPRESSURE_MAX_WAITERS"),
6529
+ healthyRecoveryMultiplier: reqInt("CAMUNDA_SDK_BACKPRESSURE_HEALTHY_RECOVERY_MULTIPLIER"),
6530
+ unlimitedAfterHealthyMs: reqInt("CAMUNDA_SDK_BACKPRESSURE_UNLIMITED_AFTER_HEALTHY_MS")
6531
+ };
6292
6532
  const PRESETS = {
6293
- BALANCED: {
6294
- initialMax: 16,
6295
- soft: 70,
6296
- severe: 50,
6297
- recoveryInterval: 1e3,
6298
- recoveryStep: 1,
6299
- quietMs: 2e3,
6300
- floor: 1,
6301
- severeThreshold: 3,
6302
- maxWaiters: 1e3,
6303
- healthyRecoveryMultiplier: 150,
6304
- unlimitedAfterHealthyMs: 3e4
6305
- },
6533
+ BALANCED: schemaBpDefaults,
6306
6534
  CONSERVATIVE: {
6307
6535
  initialMax: 12,
6308
6536
  soft: 60,
@@ -6329,20 +6557,8 @@ function hydrateConfig(options = {}) {
6329
6557
  healthyRecoveryMultiplier: 200,
6330
6558
  unlimitedAfterHealthyMs: 15e3
6331
6559
  },
6332
- LEGACY: {
6333
- // observe-only: we still need plausible defaults if user overrides individual knobs
6334
- initialMax: 16,
6335
- soft: 70,
6336
- severe: 50,
6337
- recoveryInterval: 1e3,
6338
- recoveryStep: 1,
6339
- quietMs: 2e3,
6340
- floor: 1,
6341
- severeThreshold: 3,
6342
- maxWaiters: 1e3,
6343
- healthyRecoveryMultiplier: 150,
6344
- unlimitedAfterHealthyMs: 3e4
6345
- }
6560
+ // observe-only: still needs plausible defaults if the user overrides individual knobs
6561
+ LEGACY: schemaBpDefaults
6346
6562
  };
6347
6563
  const preset = PRESETS[profile] || PRESETS.BALANCED;
6348
6564
  function ensure(k, val) {
@@ -6361,60 +6577,45 @@ function hydrateConfig(options = {}) {
6361
6577
  ensure("CAMUNDA_SDK_BACKPRESSURE_UNLIMITED_AFTER_HEALTHY_MS", preset.unlimitedAfterHealthyMs);
6362
6578
  const config = {
6363
6579
  restAddress: _restAddress,
6364
- tokenAudience: rawMap.CAMUNDA_TOKEN_AUDIENCE,
6365
- defaultTenantId: rawMap.CAMUNDA_DEFAULT_TENANT_ID || "<default>",
6580
+ tokenAudience: reqStr("CAMUNDA_TOKEN_AUDIENCE"),
6581
+ defaultTenantId: reqStr("CAMUNDA_DEFAULT_TENANT_ID"),
6366
6582
  httpRetry: {
6367
- maxAttempts: parseInt(rawMap.CAMUNDA_SDK_HTTP_RETRY_MAX_ATTEMPTS || "3", 10),
6368
- baseDelayMs: parseInt(rawMap.CAMUNDA_SDK_HTTP_RETRY_BASE_DELAY_MS || "100", 10),
6369
- maxDelayMs: parseInt(rawMap.CAMUNDA_SDK_HTTP_RETRY_MAX_DELAY_MS || "2000", 10)
6583
+ maxAttempts: reqInt("CAMUNDA_SDK_HTTP_RETRY_MAX_ATTEMPTS"),
6584
+ baseDelayMs: reqInt("CAMUNDA_SDK_HTTP_RETRY_BASE_DELAY_MS"),
6585
+ maxDelayMs: reqInt("CAMUNDA_SDK_HTTP_RETRY_MAX_DELAY_MS")
6370
6586
  },
6371
6587
  backpressure: {
6372
6588
  enabled: profile !== "LEGACY",
6373
6589
  profile,
6374
6590
  observeOnly: profile === "LEGACY",
6375
- initialMax: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_INITIAL_MAX || "16", 10),
6376
- softFactor: Math.min(
6377
- 1,
6378
- Math.max(
6379
- 0.01,
6380
- (parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_SOFT_FACTOR || "70", 10) || 70) / 100
6381
- )
6382
- ),
6591
+ initialMax: reqInt("CAMUNDA_SDK_BACKPRESSURE_INITIAL_MAX"),
6592
+ softFactor: Math.min(1, Math.max(0.01, reqInt("CAMUNDA_SDK_BACKPRESSURE_SOFT_FACTOR") / 100)),
6383
6593
  severeFactor: Math.min(
6384
6594
  1,
6385
- Math.max(
6386
- 0.01,
6387
- (parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_SEVERE_FACTOR || "50", 10) || 50) / 100
6388
- )
6389
- ),
6390
- recoveryIntervalMs: parseInt(
6391
- rawMap.CAMUNDA_SDK_BACKPRESSURE_RECOVERY_INTERVAL_MS || "1000",
6392
- 10
6595
+ Math.max(0.01, reqInt("CAMUNDA_SDK_BACKPRESSURE_SEVERE_FACTOR") / 100)
6393
6596
  ),
6394
- recoveryStep: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_RECOVERY_STEP || "1", 10),
6395
- decayQuietMs: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_DECAY_QUIET_MS || "2000", 10),
6396
- floor: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_FLOOR || "1", 10),
6397
- severeThreshold: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_SEVERE_THRESHOLD || "3", 10),
6398
- maxWaiters: parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_MAX_WAITERS || "1000", 10),
6597
+ recoveryIntervalMs: reqInt("CAMUNDA_SDK_BACKPRESSURE_RECOVERY_INTERVAL_MS"),
6598
+ recoveryStep: reqInt("CAMUNDA_SDK_BACKPRESSURE_RECOVERY_STEP"),
6599
+ decayQuietMs: reqInt("CAMUNDA_SDK_BACKPRESSURE_DECAY_QUIET_MS"),
6600
+ floor: reqInt("CAMUNDA_SDK_BACKPRESSURE_FLOOR"),
6601
+ severeThreshold: reqInt("CAMUNDA_SDK_BACKPRESSURE_SEVERE_THRESHOLD"),
6602
+ maxWaiters: reqInt("CAMUNDA_SDK_BACKPRESSURE_MAX_WAITERS"),
6399
6603
  healthyRecoveryMultiplier: Math.max(
6400
6604
  1,
6401
- (parseInt(rawMap.CAMUNDA_SDK_BACKPRESSURE_HEALTHY_RECOVERY_MULTIPLIER || "150", 10) || 150) / 100
6605
+ reqInt("CAMUNDA_SDK_BACKPRESSURE_HEALTHY_RECOVERY_MULTIPLIER") / 100
6402
6606
  ),
6403
- unlimitedAfterHealthyMs: parseInt(
6404
- rawMap.CAMUNDA_SDK_BACKPRESSURE_UNLIMITED_AFTER_HEALTHY_MS || "30000",
6405
- 10
6406
- )
6607
+ unlimitedAfterHealthyMs: reqInt("CAMUNDA_SDK_BACKPRESSURE_UNLIMITED_AFTER_HEALTHY_MS")
6407
6608
  },
6408
6609
  oauth: {
6409
6610
  clientId: rawMap.CAMUNDA_CLIENT_ID?.trim() || void 0,
6410
6611
  clientSecret: rawMap.CAMUNDA_CLIENT_SECRET?.trim() || void 0,
6411
- oauthUrl: rawMap.CAMUNDA_OAUTH_URL,
6412
- grantType: rawMap.CAMUNDA_OAUTH_GRANT_TYPE,
6612
+ oauthUrl: reqStr("CAMUNDA_OAUTH_URL"),
6613
+ grantType: reqStr("CAMUNDA_OAUTH_GRANT_TYPE"),
6413
6614
  scope: rawMap.CAMUNDA_OAUTH_SCOPE?.trim() || void 0,
6414
- timeoutMs: parseInt(rawMap.CAMUNDA_OAUTH_TIMEOUT_MS, 10),
6615
+ timeoutMs: reqInt("CAMUNDA_OAUTH_TIMEOUT_MS"),
6415
6616
  retry: {
6416
- max: parseInt(rawMap.CAMUNDA_OAUTH_RETRY_MAX, 10),
6417
- baseDelayMs: parseInt(rawMap.CAMUNDA_OAUTH_RETRY_BASE_DELAY_MS, 10)
6617
+ max: reqInt("CAMUNDA_OAUTH_RETRY_MAX"),
6618
+ baseDelayMs: reqInt("CAMUNDA_OAUTH_RETRY_BASE_DELAY_MS")
6418
6619
  },
6419
6620
  cacheDir: rawMap.CAMUNDA_OAUTH_CACHE_DIR?.trim() || void 0
6420
6621
  },
@@ -6426,9 +6627,9 @@ function hydrateConfig(options = {}) {
6426
6627
  } : void 0
6427
6628
  },
6428
6629
  validation: { req: validation.req, res: validation.res, raw: validation.raw },
6429
- logLevel: rawMap.CAMUNDA_SDK_LOG_LEVEL || "info",
6630
+ logLevel: reqStr("CAMUNDA_SDK_LOG_LEVEL"),
6430
6631
  eventual: {
6431
- pollDefaultMs: parseInt(rawMap.CAMUNDA_SDK_EVENTUAL_POLL_DEFAULT_MS || "500", 10)
6632
+ pollDefaultMs: reqInt("CAMUNDA_SDK_EVENTUAL_POLL_DEFAULT_MS")
6432
6633
  },
6433
6634
  mtls: rawMap.CAMUNDA_MTLS_CERT_PATH || rawMap.CAMUNDA_MTLS_KEY_PATH || rawMap.CAMUNDA_MTLS_CA_PATH || rawMap.CAMUNDA_MTLS_CERT || rawMap.CAMUNDA_MTLS_KEY || rawMap.CAMUNDA_MTLS_CA || rawMap.CAMUNDA_MTLS_KEY_PASSPHRASE ? {
6434
6635
  cert: rawMap.CAMUNDA_MTLS_CERT || void 0,
@@ -6440,11 +6641,11 @@ function hydrateConfig(options = {}) {
6440
6641
  caPath: rawMap.CAMUNDA_MTLS_CA_PATH || void 0
6441
6642
  } : void 0,
6442
6643
  telemetry: {
6443
- log: (rawMap.CAMUNDA_SDK_TELEMETRY_LOG || "false").toString().toLowerCase() === "true",
6444
- correlation: (rawMap.CAMUNDA_SDK_TELEMETRY_CORRELATION || "false").toString().toLowerCase() === "true"
6644
+ log: reqBool("CAMUNDA_SDK_TELEMETRY_LOG"),
6645
+ correlation: reqBool("CAMUNDA_SDK_TELEMETRY_CORRELATION")
6445
6646
  },
6446
6647
  supportLog: {
6447
- enabled: (rawMap.CAMUNDA_SUPPORT_LOG_ENABLED || "false").toString().toLowerCase() === "true",
6648
+ enabled: reqBool("CAMUNDA_SUPPORT_LOG_ENABLED"),
6448
6649
  filePath: rawMap.CAMUNDA_SUPPORT_LOG_FILE_PATH || (typeof process !== "undefined" && typeof process.cwd === "function" ? path.join(process.cwd(), "camunda-support.log") : "camunda-support.log")
6449
6650
  },
6450
6651
  workerDefaults: rawMap.CAMUNDA_WORKER_TIMEOUT || rawMap.CAMUNDA_WORKER_MAX_CONCURRENT_JOBS || rawMap.CAMUNDA_WORKER_REQUEST_TIMEOUT || rawMap.CAMUNDA_WORKER_NAME || rawMap.CAMUNDA_WORKER_STARTUP_JITTER_MAX_SECONDS ? {
@@ -6700,7 +6901,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
6700
6901
  }
6701
6902
 
6702
6903
  // src/runtime/version.ts
6703
- var packageVersion = "10.0.0-alpha.15";
6904
+ var packageVersion = "10.0.0-alpha.16";
6704
6905
 
6705
6906
  // src/runtime/supportLogger.ts
6706
6907
  var NoopSupportLogger = class {
@@ -7810,12 +8011,12 @@ var ThreadedJobWorker = class {
7810
8011
  this._client = client2;
7811
8012
  this._pool = pool;
7812
8013
  this._cfg = {
7813
- pollIntervalMs: 1,
7814
- autoStart: true,
7815
- validateSchemas: false,
7816
- maxParallelJobs: 10,
7817
- jobTimeoutMs: 6e4,
7818
- ...cfg
8014
+ ...cfg,
8015
+ pollIntervalMs: cfg.pollIntervalMs ?? 1,
8016
+ autoStart: cfg.autoStart ?? true,
8017
+ validateSchemas: cfg.validateSchemas ?? false,
8018
+ maxParallelJobs: cfg.maxParallelJobs ?? 10,
8019
+ jobTimeoutMs: cfg.jobTimeoutMs ?? 6e4
7819
8020
  };
7820
8021
  this._maxParallelJobs = this._cfg.maxParallelJobs;
7821
8022
  this._jobTimeoutMs = this._cfg.jobTimeoutMs;
@@ -8373,7 +8574,7 @@ function deepFreeze2(obj) {
8373
8574
  }
8374
8575
  return obj;
8375
8576
  }
8376
- 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"]);
8577
+ 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", "zAssignProcessInstanceBusinessIdResponse", "zCancelProcessInstanceResponse", "zDeleteProcessInstanceResponse", "zMigrateProcessInstanceResponse", "zModifyProcessInstanceResponse", "zResumeProcessInstanceResponse", "zSuspendProcessInstanceResponse", "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"]);
8377
8578
  var CancelError = class extends Error {
8378
8579
  constructor() {
8379
8580
  super("Cancelled");
@@ -8677,7 +8878,7 @@ var CamundaClient = class {
8677
8878
  _schemasPromise = null;
8678
8879
  _loadSchemas() {
8679
8880
  if (!this._schemasPromise) {
8680
- this._schemasPromise = import("./zod.gen-2Z6CY4DY.js");
8881
+ this._schemasPromise = import("./zod.gen-EOOTXFM5.js");
8681
8882
  }
8682
8883
  return this._schemasPromise;
8683
8884
  }
@@ -9128,6 +9329,60 @@ var CamundaClient = class {
9128
9329
  return this._invokeWithRetry(() => call(), { opId: "assignMappingRuleToTenant", exempt: false, retryOverride: options?.retry });
9129
9330
  });
9130
9331
  }
9332
+ assignProcessInstanceBusinessId(arg, options) {
9333
+ return toCancelable2(async (signal) => {
9334
+ const { processInstanceKey, ..._body } = arg || {};
9335
+ let envelope = {};
9336
+ envelope.path = { processInstanceKey };
9337
+ envelope.body = _body;
9338
+ if (this._validation.settings.req !== "none") {
9339
+ const _schemas = await this._loadSchemas();
9340
+ const maybe = await this._validation.gateRequest("assignProcessInstanceBusinessId", _schemas.zAssignProcessInstanceBusinessIdData, envelope);
9341
+ if (this._validation.settings.req === "strict") envelope = maybe;
9342
+ }
9343
+ const opts = { client: this._client, signal, throwOnError: false };
9344
+ if (envelope.path) opts.path = envelope.path;
9345
+ if (envelope.body !== void 0) opts.body = envelope.body;
9346
+ const call = async () => {
9347
+ try {
9348
+ const _raw = await assignProcessInstanceBusinessId(opts);
9349
+ let data = this._evaluateResponse(_raw, "assignProcessInstanceBusinessId", (resp) => {
9350
+ const st = resp.status ?? resp.response?.status;
9351
+ if (!st) return void 0;
9352
+ const candidate = st === 429 || st === 503 || st === 500;
9353
+ if (!candidate) return void 0;
9354
+ let prob = void 0;
9355
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
9356
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
9357
+ err.status = st;
9358
+ err.name = "HttpSdkError";
9359
+ if (prob) {
9360
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
9361
+ }
9362
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
9363
+ if (!isBp) err.nonRetryable = true;
9364
+ return err;
9365
+ });
9366
+ const _respSchemaName = "zAssignProcessInstanceBusinessIdResponse";
9367
+ if (this._isVoidResponse(_respSchemaName)) {
9368
+ data = void 0;
9369
+ }
9370
+ if (this._validation.settings.res !== "none") {
9371
+ const _schemas = await this._loadSchemas();
9372
+ const _schema = _schemas.zAssignProcessInstanceBusinessIdResponse;
9373
+ if (_schema) {
9374
+ const maybeR = await this._validation.gateResponse("assignProcessInstanceBusinessId", _schema, data);
9375
+ if (this._validation.settings.res === "strict") data = maybeR;
9376
+ }
9377
+ }
9378
+ return data;
9379
+ } catch (e) {
9380
+ throw e;
9381
+ }
9382
+ };
9383
+ return this._invokeWithRetry(() => call(), { opId: "assignProcessInstanceBusinessId", exempt: false, retryOverride: options?.retry });
9384
+ });
9385
+ }
9131
9386
  assignRoleToClient(arg, options) {
9132
9387
  return toCancelable2(async (signal) => {
9133
9388
  const { roleId, clientId } = arg || {};
@@ -9762,20 +10017,72 @@ var CamundaClient = class {
9762
10017
  return this._invokeWithRetry(() => call(), { opId: "cancelProcessInstancesBatchOperation", exempt: false, retryOverride: options?.retry });
9763
10018
  });
9764
10019
  }
9765
- completeJob(arg, options) {
10020
+ changeClusterMode(arg, options) {
9766
10021
  return toCancelable2(async (signal) => {
9767
- const { jobKey, ..._body } = arg || {};
10022
+ const { mode, dryRun } = arg || {};
9768
10023
  let envelope = {};
9769
- envelope.path = { jobKey };
9770
- envelope.body = _body;
10024
+ envelope.query = { mode, dryRun };
9771
10025
  if (this._validation.settings.req !== "none") {
9772
10026
  const _schemas = await this._loadSchemas();
9773
- const maybe = await this._validation.gateRequest("completeJob", _schemas.zCompleteJobData, envelope);
10027
+ const maybe = await this._validation.gateRequest("changeClusterMode", _schemas.zChangeClusterModeData, envelope);
9774
10028
  if (this._validation.settings.req === "strict") envelope = maybe;
9775
10029
  }
9776
10030
  const opts = { client: this._client, signal, throwOnError: false };
9777
- if (envelope.path) opts.path = envelope.path;
9778
- if (envelope.body !== void 0) opts.body = envelope.body;
10031
+ if (envelope.query) opts.query = envelope.query;
10032
+ const call = async () => {
10033
+ try {
10034
+ const _raw = await changeClusterMode(opts);
10035
+ let data = this._evaluateResponse(_raw, "changeClusterMode", (resp) => {
10036
+ const st = resp.status ?? resp.response?.status;
10037
+ if (!st) return void 0;
10038
+ const candidate = st === 429 || st === 503 || st === 500;
10039
+ if (!candidate) return void 0;
10040
+ let prob = void 0;
10041
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
10042
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
10043
+ err.status = st;
10044
+ err.name = "HttpSdkError";
10045
+ if (prob) {
10046
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
10047
+ }
10048
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
10049
+ if (!isBp) err.nonRetryable = true;
10050
+ return err;
10051
+ });
10052
+ const _respSchemaName = "zChangeClusterModeResponse";
10053
+ if (this._isVoidResponse(_respSchemaName)) {
10054
+ data = void 0;
10055
+ }
10056
+ if (this._validation.settings.res !== "none") {
10057
+ const _schemas = await this._loadSchemas();
10058
+ const _schema = _schemas.zChangeClusterModeResponse;
10059
+ if (_schema) {
10060
+ const maybeR = await this._validation.gateResponse("changeClusterMode", _schema, data);
10061
+ if (this._validation.settings.res === "strict") data = maybeR;
10062
+ }
10063
+ }
10064
+ return data;
10065
+ } catch (e) {
10066
+ throw e;
10067
+ }
10068
+ };
10069
+ return this._invokeWithRetry(() => call(), { opId: "changeClusterMode", exempt: false, retryOverride: options?.retry });
10070
+ });
10071
+ }
10072
+ completeJob(arg, options) {
10073
+ return toCancelable2(async (signal) => {
10074
+ const { jobKey, ..._body } = arg || {};
10075
+ let envelope = {};
10076
+ envelope.path = { jobKey };
10077
+ envelope.body = _body;
10078
+ if (this._validation.settings.req !== "none") {
10079
+ const _schemas = await this._loadSchemas();
10080
+ const maybe = await this._validation.gateRequest("completeJob", _schemas.zCompleteJobData, envelope);
10081
+ if (this._validation.settings.req === "strict") envelope = maybe;
10082
+ }
10083
+ const opts = { client: this._client, signal, throwOnError: false };
10084
+ if (envelope.path) opts.path = envelope.path;
10085
+ if (envelope.body !== void 0) opts.body = envelope.body;
9779
10086
  const call = async () => {
9780
10087
  try {
9781
10088
  const _raw = await completeJob(opts);
@@ -15276,6 +15583,110 @@ var CamundaClient = class {
15276
15583
  return this._invokeWithRetry(() => call(), { opId: "resolveProcessInstanceIncidents", exempt: false, retryOverride: options?.retry });
15277
15584
  });
15278
15585
  }
15586
+ resolveSecrets(arg, options) {
15587
+ return toCancelable2(async (signal) => {
15588
+ const _body = arg;
15589
+ let envelope = {};
15590
+ envelope.body = _body;
15591
+ if (this._validation.settings.req !== "none") {
15592
+ const _schemas = await this._loadSchemas();
15593
+ const maybe = await this._validation.gateRequest("resolveSecrets", _schemas.zResolveSecretsData, envelope);
15594
+ if (this._validation.settings.req === "strict") envelope = maybe;
15595
+ }
15596
+ const opts = { client: this._client, signal, throwOnError: false };
15597
+ if (envelope.body !== void 0) opts.body = envelope.body;
15598
+ const call = async () => {
15599
+ try {
15600
+ const _raw = await resolveSecrets(opts);
15601
+ let data = this._evaluateResponse(_raw, "resolveSecrets", (resp) => {
15602
+ const st = resp.status ?? resp.response?.status;
15603
+ if (!st) return void 0;
15604
+ const candidate = st === 429 || st === 503 || st === 500;
15605
+ if (!candidate) return void 0;
15606
+ let prob = void 0;
15607
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
15608
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
15609
+ err.status = st;
15610
+ err.name = "HttpSdkError";
15611
+ if (prob) {
15612
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
15613
+ }
15614
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
15615
+ if (!isBp) err.nonRetryable = true;
15616
+ return err;
15617
+ });
15618
+ const _respSchemaName = "zResolveSecretsResponse";
15619
+ if (this._isVoidResponse(_respSchemaName)) {
15620
+ data = void 0;
15621
+ }
15622
+ if (this._validation.settings.res !== "none") {
15623
+ const _schemas = await this._loadSchemas();
15624
+ const _schema = _schemas.zResolveSecretsResponse;
15625
+ if (_schema) {
15626
+ const maybeR = await this._validation.gateResponse("resolveSecrets", _schema, data);
15627
+ if (this._validation.settings.res === "strict") data = maybeR;
15628
+ }
15629
+ }
15630
+ return data;
15631
+ } catch (e) {
15632
+ throw e;
15633
+ }
15634
+ };
15635
+ return this._invokeWithRetry(() => call(), { opId: "resolveSecrets", exempt: false, retryOverride: options?.retry });
15636
+ });
15637
+ }
15638
+ restore(arg, options) {
15639
+ return toCancelable2(async (signal) => {
15640
+ const _body = arg;
15641
+ let envelope = {};
15642
+ envelope.body = _body;
15643
+ if (this._validation.settings.req !== "none") {
15644
+ const _schemas = await this._loadSchemas();
15645
+ const maybe = await this._validation.gateRequest("restore", _schemas.zRestoreData, envelope);
15646
+ if (this._validation.settings.req === "strict") envelope = maybe;
15647
+ }
15648
+ const opts = { client: this._client, signal, throwOnError: false };
15649
+ if (envelope.body !== void 0) opts.body = envelope.body;
15650
+ const call = async () => {
15651
+ try {
15652
+ const _raw = await restore(opts);
15653
+ let data = this._evaluateResponse(_raw, "restore", (resp) => {
15654
+ const st = resp.status ?? resp.response?.status;
15655
+ if (!st) return void 0;
15656
+ const candidate = st === 429 || st === 503 || st === 500;
15657
+ if (!candidate) return void 0;
15658
+ let prob = void 0;
15659
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
15660
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
15661
+ err.status = st;
15662
+ err.name = "HttpSdkError";
15663
+ if (prob) {
15664
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
15665
+ }
15666
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
15667
+ if (!isBp) err.nonRetryable = true;
15668
+ return err;
15669
+ });
15670
+ const _respSchemaName = "zRestoreResponse";
15671
+ if (this._isVoidResponse(_respSchemaName)) {
15672
+ data = void 0;
15673
+ }
15674
+ if (this._validation.settings.res !== "none") {
15675
+ const _schemas = await this._loadSchemas();
15676
+ const _schema = _schemas.zRestoreResponse;
15677
+ if (_schema) {
15678
+ const maybeR = await this._validation.gateResponse("restore", _schema, data);
15679
+ if (this._validation.settings.res === "strict") data = maybeR;
15680
+ }
15681
+ }
15682
+ return data;
15683
+ } catch (e) {
15684
+ throw e;
15685
+ }
15686
+ };
15687
+ return this._invokeWithRetry(() => call(), { opId: "restore", exempt: false, retryOverride: options?.retry });
15688
+ });
15689
+ }
15279
15690
  resumeBatchOperation(arg, options) {
15280
15691
  return toCancelable2(async (signal) => {
15281
15692
  const { batchOperationKey, ..._body } = arg || {};
@@ -15330,6 +15741,112 @@ var CamundaClient = class {
15330
15741
  return this._invokeWithRetry(() => call(), { opId: "resumeBatchOperation", exempt: false, retryOverride: options?.retry });
15331
15742
  });
15332
15743
  }
15744
+ resumeProcessInstance(arg, options) {
15745
+ return toCancelable2(async (signal) => {
15746
+ const { processInstanceKey, ..._body } = arg || {};
15747
+ let envelope = {};
15748
+ envelope.path = { processInstanceKey };
15749
+ envelope.body = _body;
15750
+ if (this._validation.settings.req !== "none") {
15751
+ const _schemas = await this._loadSchemas();
15752
+ const maybe = await this._validation.gateRequest("resumeProcessInstance", _schemas.zResumeProcessInstanceData, envelope);
15753
+ if (this._validation.settings.req === "strict") envelope = maybe;
15754
+ }
15755
+ const opts = { client: this._client, signal, throwOnError: false };
15756
+ if (envelope.path) opts.path = envelope.path;
15757
+ if (envelope.body !== void 0) opts.body = envelope.body;
15758
+ const call = async () => {
15759
+ try {
15760
+ const _raw = await resumeProcessInstance(opts);
15761
+ let data = this._evaluateResponse(_raw, "resumeProcessInstance", (resp) => {
15762
+ const st = resp.status ?? resp.response?.status;
15763
+ if (!st) return void 0;
15764
+ const candidate = st === 429 || st === 503 || st === 500;
15765
+ if (!candidate) return void 0;
15766
+ let prob = void 0;
15767
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
15768
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
15769
+ err.status = st;
15770
+ err.name = "HttpSdkError";
15771
+ if (prob) {
15772
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
15773
+ }
15774
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
15775
+ if (!isBp) err.nonRetryable = true;
15776
+ return err;
15777
+ });
15778
+ const _respSchemaName = "zResumeProcessInstanceResponse";
15779
+ if (this._isVoidResponse(_respSchemaName)) {
15780
+ data = void 0;
15781
+ }
15782
+ if (this._validation.settings.res !== "none") {
15783
+ const _schemas = await this._loadSchemas();
15784
+ const _schema = _schemas.zResumeProcessInstanceResponse;
15785
+ if (_schema) {
15786
+ const maybeR = await this._validation.gateResponse("resumeProcessInstance", _schema, data);
15787
+ if (this._validation.settings.res === "strict") data = maybeR;
15788
+ }
15789
+ }
15790
+ return data;
15791
+ } catch (e) {
15792
+ throw e;
15793
+ }
15794
+ };
15795
+ return this._invokeWithRetry(() => call(), { opId: "resumeProcessInstance", exempt: false, retryOverride: options?.retry });
15796
+ });
15797
+ }
15798
+ resumeProcessInstancesBatchOperation(arg, options) {
15799
+ return toCancelable2(async (signal) => {
15800
+ const _body = arg;
15801
+ let envelope = {};
15802
+ envelope.body = _body;
15803
+ if (this._validation.settings.req !== "none") {
15804
+ const _schemas = await this._loadSchemas();
15805
+ const maybe = await this._validation.gateRequest("resumeProcessInstancesBatchOperation", _schemas.zResumeProcessInstancesBatchOperationData, envelope);
15806
+ if (this._validation.settings.req === "strict") envelope = maybe;
15807
+ }
15808
+ const opts = { client: this._client, signal, throwOnError: false };
15809
+ if (envelope.body !== void 0) opts.body = envelope.body;
15810
+ const call = async () => {
15811
+ try {
15812
+ const _raw = await resumeProcessInstancesBatchOperation(opts);
15813
+ let data = this._evaluateResponse(_raw, "resumeProcessInstancesBatchOperation", (resp) => {
15814
+ const st = resp.status ?? resp.response?.status;
15815
+ if (!st) return void 0;
15816
+ const candidate = st === 429 || st === 503 || st === 500;
15817
+ if (!candidate) return void 0;
15818
+ let prob = void 0;
15819
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
15820
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
15821
+ err.status = st;
15822
+ err.name = "HttpSdkError";
15823
+ if (prob) {
15824
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
15825
+ }
15826
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
15827
+ if (!isBp) err.nonRetryable = true;
15828
+ return err;
15829
+ });
15830
+ const _respSchemaName = "zResumeProcessInstancesBatchOperationResponse";
15831
+ if (this._isVoidResponse(_respSchemaName)) {
15832
+ data = void 0;
15833
+ }
15834
+ if (this._validation.settings.res !== "none") {
15835
+ const _schemas = await this._loadSchemas();
15836
+ const _schema = _schemas.zResumeProcessInstancesBatchOperationResponse;
15837
+ if (_schema) {
15838
+ const maybeR = await this._validation.gateResponse("resumeProcessInstancesBatchOperation", _schema, data);
15839
+ if (this._validation.settings.res === "strict") data = maybeR;
15840
+ }
15841
+ }
15842
+ return data;
15843
+ } catch (e) {
15844
+ throw e;
15845
+ }
15846
+ };
15847
+ return this._invokeWithRetry(() => call(), { opId: "resumeProcessInstancesBatchOperation", exempt: false, retryOverride: options?.retry });
15848
+ });
15849
+ }
15333
15850
  searchAgentInstanceHistory(arg, consistencyManagement, options) {
15334
15851
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
15335
15852
  const useConsistency = consistencyManagement.consistency;
@@ -16976,6 +17493,64 @@ var CamundaClient = class {
16976
17493
  return invoke();
16977
17494
  });
16978
17495
  }
17496
+ searchProcessDefinitionVariableNames(arg, consistencyManagement, options) {
17497
+ if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
17498
+ const useConsistency = consistencyManagement.consistency;
17499
+ return toCancelable2(async (signal) => {
17500
+ const { processDefinitionKey, ..._body } = arg || {};
17501
+ let envelope = {};
17502
+ envelope.path = { processDefinitionKey };
17503
+ envelope.body = _body;
17504
+ if (this._validation.settings.req !== "none") {
17505
+ const _schemas = await this._loadSchemas();
17506
+ const maybe = await this._validation.gateRequest("searchProcessDefinitionVariableNames", _schemas.zSearchProcessDefinitionVariableNamesData, envelope);
17507
+ if (this._validation.settings.req === "strict") envelope = maybe;
17508
+ }
17509
+ const opts = { client: this._client, signal, throwOnError: false };
17510
+ if (envelope.path) opts.path = envelope.path;
17511
+ if (envelope.body !== void 0) opts.body = envelope.body;
17512
+ const call = async () => {
17513
+ try {
17514
+ const _raw = await searchProcessDefinitionVariableNames(opts);
17515
+ let data = this._evaluateResponse(_raw, "searchProcessDefinitionVariableNames", (resp) => {
17516
+ const st = resp.status ?? resp.response?.status;
17517
+ if (!st) return void 0;
17518
+ const candidate = st === 429 || st === 503 || st === 500;
17519
+ if (!candidate) return void 0;
17520
+ let prob = void 0;
17521
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
17522
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
17523
+ err.status = st;
17524
+ err.name = "HttpSdkError";
17525
+ if (prob) {
17526
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
17527
+ }
17528
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
17529
+ if (!isBp) err.nonRetryable = true;
17530
+ return err;
17531
+ });
17532
+ const _respSchemaName = "zSearchProcessDefinitionVariableNamesResponse";
17533
+ if (this._isVoidResponse(_respSchemaName)) {
17534
+ data = void 0;
17535
+ }
17536
+ if (this._validation.settings.res !== "none") {
17537
+ const _schemas = await this._loadSchemas();
17538
+ const _schema = _schemas.zSearchProcessDefinitionVariableNamesResponse;
17539
+ if (_schema) {
17540
+ const maybeR = await this._validation.gateResponse("searchProcessDefinitionVariableNames", _schema, data);
17541
+ if (this._validation.settings.res === "strict") data = maybeR;
17542
+ }
17543
+ }
17544
+ return data;
17545
+ } catch (e) {
17546
+ throw e;
17547
+ }
17548
+ };
17549
+ const invoke = () => toCancelable2(() => call());
17550
+ if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log });
17551
+ return invoke();
17552
+ });
17553
+ }
16979
17554
  searchProcessInstanceIncidents(arg, consistencyManagement, options) {
16980
17555
  if (!consistencyManagement) throw new Error("Missing consistencyManagement parameter for eventually consistent endpoint");
16981
17556
  const useConsistency = consistencyManagement.consistency;
@@ -17950,6 +18525,112 @@ var CamundaClient = class {
17950
18525
  return this._invokeWithRetry(() => call(), { opId: "suspendBatchOperation", exempt: false, retryOverride: options?.retry });
17951
18526
  });
17952
18527
  }
18528
+ suspendProcessInstance(arg, options) {
18529
+ return toCancelable2(async (signal) => {
18530
+ const { processInstanceKey, ..._body } = arg || {};
18531
+ let envelope = {};
18532
+ envelope.path = { processInstanceKey };
18533
+ envelope.body = _body;
18534
+ if (this._validation.settings.req !== "none") {
18535
+ const _schemas = await this._loadSchemas();
18536
+ const maybe = await this._validation.gateRequest("suspendProcessInstance", _schemas.zSuspendProcessInstanceData, envelope);
18537
+ if (this._validation.settings.req === "strict") envelope = maybe;
18538
+ }
18539
+ const opts = { client: this._client, signal, throwOnError: false };
18540
+ if (envelope.path) opts.path = envelope.path;
18541
+ if (envelope.body !== void 0) opts.body = envelope.body;
18542
+ const call = async () => {
18543
+ try {
18544
+ const _raw = await suspendProcessInstance(opts);
18545
+ let data = this._evaluateResponse(_raw, "suspendProcessInstance", (resp) => {
18546
+ const st = resp.status ?? resp.response?.status;
18547
+ if (!st) return void 0;
18548
+ const candidate = st === 429 || st === 503 || st === 500;
18549
+ if (!candidate) return void 0;
18550
+ let prob = void 0;
18551
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
18552
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
18553
+ err.status = st;
18554
+ err.name = "HttpSdkError";
18555
+ if (prob) {
18556
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
18557
+ }
18558
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
18559
+ if (!isBp) err.nonRetryable = true;
18560
+ return err;
18561
+ });
18562
+ const _respSchemaName = "zSuspendProcessInstanceResponse";
18563
+ if (this._isVoidResponse(_respSchemaName)) {
18564
+ data = void 0;
18565
+ }
18566
+ if (this._validation.settings.res !== "none") {
18567
+ const _schemas = await this._loadSchemas();
18568
+ const _schema = _schemas.zSuspendProcessInstanceResponse;
18569
+ if (_schema) {
18570
+ const maybeR = await this._validation.gateResponse("suspendProcessInstance", _schema, data);
18571
+ if (this._validation.settings.res === "strict") data = maybeR;
18572
+ }
18573
+ }
18574
+ return data;
18575
+ } catch (e) {
18576
+ throw e;
18577
+ }
18578
+ };
18579
+ return this._invokeWithRetry(() => call(), { opId: "suspendProcessInstance", exempt: false, retryOverride: options?.retry });
18580
+ });
18581
+ }
18582
+ suspendProcessInstancesBatchOperation(arg, options) {
18583
+ return toCancelable2(async (signal) => {
18584
+ const _body = arg;
18585
+ let envelope = {};
18586
+ envelope.body = _body;
18587
+ if (this._validation.settings.req !== "none") {
18588
+ const _schemas = await this._loadSchemas();
18589
+ const maybe = await this._validation.gateRequest("suspendProcessInstancesBatchOperation", _schemas.zSuspendProcessInstancesBatchOperationData, envelope);
18590
+ if (this._validation.settings.req === "strict") envelope = maybe;
18591
+ }
18592
+ const opts = { client: this._client, signal, throwOnError: false };
18593
+ if (envelope.body !== void 0) opts.body = envelope.body;
18594
+ const call = async () => {
18595
+ try {
18596
+ const _raw = await suspendProcessInstancesBatchOperation(opts);
18597
+ let data = this._evaluateResponse(_raw, "suspendProcessInstancesBatchOperation", (resp) => {
18598
+ const st = resp.status ?? resp.response?.status;
18599
+ if (!st) return void 0;
18600
+ const candidate = st === 429 || st === 503 || st === 500;
18601
+ if (!candidate) return void 0;
18602
+ let prob = void 0;
18603
+ if (resp.error && typeof resp.error === "object") prob = resp.error;
18604
+ const err = new Error(prob && (prob.title || prob.detail) ? prob.title || prob.detail : "HTTP " + st);
18605
+ err.status = st;
18606
+ err.name = "HttpSdkError";
18607
+ if (prob) {
18608
+ for (const k of ["type", "title", "detail", "instance"]) if (prob[k] !== void 0) err[k] = prob[k];
18609
+ }
18610
+ const isBp = st === 429 || st === 503 && err.title === "RESOURCE_EXHAUSTED" || st === 500 && (typeof err.detail === "string" && /RESOURCE_EXHAUSTED/.test(err.detail));
18611
+ if (!isBp) err.nonRetryable = true;
18612
+ return err;
18613
+ });
18614
+ const _respSchemaName = "zSuspendProcessInstancesBatchOperationResponse";
18615
+ if (this._isVoidResponse(_respSchemaName)) {
18616
+ data = void 0;
18617
+ }
18618
+ if (this._validation.settings.res !== "none") {
18619
+ const _schemas = await this._loadSchemas();
18620
+ const _schema = _schemas.zSuspendProcessInstancesBatchOperationResponse;
18621
+ if (_schema) {
18622
+ const maybeR = await this._validation.gateResponse("suspendProcessInstancesBatchOperation", _schema, data);
18623
+ if (this._validation.settings.res === "strict") data = maybeR;
18624
+ }
18625
+ }
18626
+ return data;
18627
+ } catch (e) {
18628
+ throw e;
18629
+ }
18630
+ };
18631
+ return this._invokeWithRetry(() => call(), { opId: "suspendProcessInstancesBatchOperation", exempt: false, retryOverride: options?.retry });
18632
+ });
18633
+ }
17953
18634
  throwJobError(arg, options) {
17954
18635
  return toCancelable2(async (signal) => {
17955
18636
  const { jobKey, ..._body } = arg || {};
@@ -19752,4 +20433,4 @@ export {
19752
20433
  withTimeoutTE,
19753
20434
  eventuallyTE
19754
20435
  };
19755
- //# sourceMappingURL=chunk-BDHUY2UM.js.map
20436
+ //# sourceMappingURL=chunk-RTRUW7ZX.js.map