@camunda8/orchestration-cluster-api 10.0.0-alpha.39 → 10.0.0-alpha.40

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/dist/index.cjs CHANGED
@@ -5100,9 +5100,7 @@ var init_zod_gen = __esm({
5100
5100
  claimValue: z.string().register(z.globalRegistry, {
5101
5101
  description: "The value of the claim to match."
5102
5102
  }).optional(),
5103
- name: z.string().register(z.globalRegistry, {
5104
- description: "The name of the mapping rule."
5105
- }).optional(),
5103
+ name: zStringFilterProperty.optional(),
5106
5104
  mappingRuleId: zMappingRuleId.optional()
5107
5105
  }).register(z.globalRegistry, {
5108
5106
  description: "Mapping rule search filter."
@@ -5784,9 +5782,7 @@ var init_zod_gen = __esm({
5784
5782
  });
5785
5783
  zRoleFilter = z.object({
5786
5784
  roleId: zRoleId.optional(),
5787
- name: z.string().register(z.globalRegistry, {
5788
- description: "The role name search filters."
5789
- }).optional()
5785
+ name: zStringFilterProperty.optional()
5790
5786
  }).register(z.globalRegistry, {
5791
5787
  description: "Role filter request"
5792
5788
  });
@@ -9665,7 +9661,7 @@ function createSseClient({
9665
9661
  ...options
9666
9662
  }) {
9667
9663
  let lastEventId;
9668
- const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
9664
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
9669
9665
  const createStream = async function* () {
9670
9666
  let retryDelay = sseDefaultRetryDelay ?? 3e3;
9671
9667
  let attempt = 0;
@@ -9769,7 +9765,7 @@ function createSseClient({
9769
9765
  break;
9770
9766
  }
9771
9767
  const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
9772
- await sleep2(backoff);
9768
+ await sleep(backoff);
9773
9769
  }
9774
9770
  }
9775
9771
  };
@@ -12712,6 +12708,66 @@ var getVariable = (options) => (options.client ?? client).get({
12712
12708
  ...options
12713
12709
  });
12714
12710
 
12711
+ // src/runtime/clock.ts
12712
+ var SLEW_DIVISOR = 16;
12713
+ var MAX_TIMER_MS = 2147483647;
12714
+ function scheduleLong(ms, onElapsed) {
12715
+ let remaining = Math.max(0, ms);
12716
+ let timer;
12717
+ const step = () => {
12718
+ const slice = Math.min(remaining, MAX_TIMER_MS);
12719
+ remaining -= slice;
12720
+ timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
12721
+ };
12722
+ step();
12723
+ return () => clearTimeout(timer);
12724
+ }
12725
+ function createLiveClock(source = () => Date.now()) {
12726
+ let lastSource = source();
12727
+ let offsetMs = 0;
12728
+ let slewCreditMs = 0;
12729
+ const now = () => {
12730
+ const observed = source();
12731
+ if (observed < lastSource) {
12732
+ offsetMs += lastSource - observed;
12733
+ } else if (offsetMs > 0) {
12734
+ slewCreditMs += observed - lastSource;
12735
+ const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
12736
+ if (repay > 0) {
12737
+ slewCreditMs -= repay * SLEW_DIVISOR;
12738
+ offsetMs -= Math.min(offsetMs, repay);
12739
+ }
12740
+ }
12741
+ lastSource = observed;
12742
+ return observed + offsetMs;
12743
+ };
12744
+ const sleep = (ms, signal) => new Promise((resolve, reject) => {
12745
+ if (signal?.aborted) {
12746
+ reject(signal.reason);
12747
+ return;
12748
+ }
12749
+ const cancel = scheduleLong(ms, () => {
12750
+ signal?.removeEventListener("abort", onAbort);
12751
+ resolve();
12752
+ });
12753
+ function onAbort() {
12754
+ cancel();
12755
+ reject(signal?.reason);
12756
+ }
12757
+ signal?.addEventListener("abort", onAbort, { once: true });
12758
+ });
12759
+ const deadline = (ms) => {
12760
+ const controller = new AbortController();
12761
+ const cancel = scheduleLong(
12762
+ ms,
12763
+ () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
12764
+ );
12765
+ return { signal: controller.signal, dispose: cancel };
12766
+ };
12767
+ return { now, sleep, deadline };
12768
+ }
12769
+ var liveClock = createLiveClock();
12770
+
12715
12771
  // src/runtime/auth.ts
12716
12772
  var CamundaAuthError = class extends Error {
12717
12773
  constructor(code, message, cause) {
@@ -12724,11 +12780,12 @@ var CamundaAuthError = class extends Error {
12724
12780
  cause;
12725
12781
  };
12726
12782
  var OAuthManager = class {
12727
- constructor(cfg, logger, tHooks, correlationProvider) {
12783
+ constructor(cfg, logger, tHooks, correlationProvider, clock = liveClock) {
12728
12784
  this.cfg = cfg;
12729
12785
  this.logger = logger;
12730
12786
  this.tHooks = tHooks;
12731
12787
  this.correlationProvider = correlationProvider;
12788
+ this.clock = clock;
12732
12789
  const hashBase = `${cfg.oauth.oauthUrl}|${cfg.oauth.clientId || ""}|${cfg.tokenAudience}|${cfg.oauth.scope || ""}`;
12733
12790
  this.storageKey = `camunda_oauth_token_cache_${this.simpleHash(hashBase)}`;
12734
12791
  this.session = this.isBrowser && typeof window.sessionStorage !== "undefined" ? window.sessionStorage : null;
@@ -12738,6 +12795,7 @@ var OAuthManager = class {
12738
12795
  logger;
12739
12796
  tHooks;
12740
12797
  correlationProvider;
12798
+ clock;
12741
12799
  refreshing = null;
12742
12800
  token = null;
12743
12801
  storageKey;
@@ -12754,7 +12812,7 @@ var OAuthManager = class {
12754
12812
  this.logger.debug(...args);
12755
12813
  }
12756
12814
  now() {
12757
- return Date.now();
12815
+ return this.clock.now();
12758
12816
  }
12759
12817
  loadPersisted() {
12760
12818
  if (this.session) {
@@ -12808,13 +12866,13 @@ var OAuthManager = class {
12808
12866
  return t.expires_at_epoch_ms;
12809
12867
  }
12810
12868
  shouldRefresh(t) {
12811
- const now2 = this.now();
12812
- if (now2 < t.obtained_at_epoch_ms - 3e4) {
12869
+ const now = this.now();
12870
+ if (now < t.obtained_at_epoch_ms - 3e4) {
12813
12871
  this.log("Clock skew backwards detected; invalidating token");
12814
12872
  return true;
12815
12873
  }
12816
12874
  const refreshLead = 5e3;
12817
- return now2 >= this.effectiveExpiry(t) - refreshLead;
12875
+ return now >= this.effectiveExpiry(t) - refreshLead;
12818
12876
  }
12819
12877
  async getToken(fetcher) {
12820
12878
  if (this.token && !this.shouldRefresh(this.token)) return this.token.access_token;
@@ -12869,9 +12927,11 @@ var OAuthManager = class {
12869
12927
  const base = this.cfg.oauth.retry.baseDelayMs || 1e3;
12870
12928
  let attempt = 0;
12871
12929
  let lastErr;
12930
+ const startedAt = liveClock.now();
12872
12931
  while (attempt < max) {
12873
12932
  const controller = new AbortController();
12874
- const timeout = setTimeout(() => controller.abort(), this.cfg.oauth.timeoutMs);
12933
+ const timeout = liveClock.deadline(this.cfg.oauth.timeoutMs);
12934
+ timeout.signal.addEventListener("abort", () => controller.abort(), { once: true });
12875
12935
  try {
12876
12936
  if (attempt === 0) {
12877
12937
  const evt = {
@@ -12894,7 +12954,7 @@ var OAuthManager = class {
12894
12954
  body: body.toString(),
12895
12955
  signal: controller.signal
12896
12956
  });
12897
- clearTimeout(timeout);
12957
+ timeout.dispose();
12898
12958
  if (!res.ok) {
12899
12959
  lastErr = new Error(`HTTP ${res.status}`);
12900
12960
  throw lastErr;
@@ -12905,15 +12965,15 @@ var OAuthManager = class {
12905
12965
  "TOKEN_PARSE_FAILED" /* TOKEN_PARSE_FAILED */,
12906
12966
  "Missing access_token or expires_in in response"
12907
12967
  );
12908
- const now2 = this.now();
12968
+ const now = this.now();
12909
12969
  const lifetimeMs = json.expires_in * 1e3;
12910
12970
  const skewBuffer = Math.max(3e4, Math.floor(lifetimeMs * 0.05));
12911
12971
  const entry = {
12912
12972
  access_token: json.access_token,
12913
12973
  token_type: json.token_type,
12914
12974
  scope: json.scope,
12915
- obtained_at_epoch_ms: now2,
12916
- expires_at_epoch_ms: now2 + lifetimeMs - skewBuffer,
12975
+ obtained_at_epoch_ms: now,
12976
+ expires_at_epoch_ms: now + lifetimeMs - skewBuffer,
12917
12977
  oauth_url: this.cfg.oauth.oauthUrl,
12918
12978
  client_id: this.cfg.oauth.clientId,
12919
12979
  audience: this.cfg.tokenAudience
@@ -12922,7 +12982,7 @@ var OAuthManager = class {
12922
12982
  this.persist();
12923
12983
  this.logger.info(
12924
12984
  "Token fetched; effective expiry (s)=",
12925
- Math.round((entry.expires_at_epoch_ms - now2) / 1e3)
12985
+ Math.round((entry.expires_at_epoch_ms - now) / 1e3)
12926
12986
  );
12927
12987
  try {
12928
12988
  const evt = {
@@ -12931,8 +12991,8 @@ var OAuthManager = class {
12931
12991
  audience: this.cfg.tokenAudience,
12932
12992
  endpoint: this.cfg.oauth.oauthUrl,
12933
12993
  cached: false,
12934
- durationMs: Date.now() - now2,
12935
- expiresInSec: Math.round((entry.expires_at_epoch_ms - now2) / 1e3),
12994
+ durationMs: liveClock.now() - startedAt,
12995
+ expiresInSec: Math.round((entry.expires_at_epoch_ms - now) / 1e3),
12936
12996
  scopes: entry.scope ? String(entry.scope).split(/\s+/) : void 0,
12937
12997
  correlationId: this.correlationProvider?.()
12938
12998
  };
@@ -12941,26 +13001,26 @@ var OAuthManager = class {
12941
13001
  }
12942
13002
  return entry.access_token;
12943
13003
  } catch (e) {
12944
- clearTimeout(timeout);
13004
+ timeout.dispose();
12945
13005
  lastErr = e;
12946
13006
  attempt++;
12947
13007
  if (attempt >= max) break;
12948
13008
  const delay = base * 2 ** (attempt - 1);
12949
13009
  const jitter = delay * 0.2 * (Math.random() - 0.5);
12950
- const sleep2 = delay + jitter;
13010
+ const sleep = delay + jitter;
12951
13011
  try {
12952
13012
  this.tHooks?.retry?.({
12953
13013
  type: "retry",
12954
13014
  ts: Date.now(),
12955
13015
  attempt,
12956
- nextDelayMs: Math.round(sleep2),
13016
+ nextDelayMs: Math.round(sleep),
12957
13017
  reason: lastErr?.message || "error",
12958
13018
  domain: "auth",
12959
13019
  correlationId: this.correlationProvider?.()
12960
13020
  });
12961
13021
  } catch {
12962
13022
  }
12963
- await new Promise((r) => setTimeout(r, sleep2));
13023
+ await this.clock.sleep(sleep);
12964
13024
  }
12965
13025
  }
12966
13026
  try {
@@ -12969,7 +13029,7 @@ var OAuthManager = class {
12969
13029
  ts: Date.now(),
12970
13030
  audience: this.cfg.tokenAudience,
12971
13031
  endpoint: this.cfg.oauth.oauthUrl,
12972
- durationMs: 0,
13032
+ durationMs: liveClock.now() - startedAt,
12973
13033
  status: lastErr?.message?.match(/HTTP (\d+)/)?.[1] ? parseInt(RegExp.$1, 10) : void 0,
12974
13034
  message: lastErr?.message || String(lastErr),
12975
13035
  correlationId: this.correlationProvider?.()
@@ -13034,7 +13094,13 @@ function createAuthFacade(config, opts) {
13034
13094
  let oauth = null;
13035
13095
  let basic = null;
13036
13096
  if (cfg.auth.strategy === "OAUTH")
13037
- oauth = new OAuthManager(cfg, authLogger.scope("oauth"), tHooks, opts?.correlationProvider);
13097
+ oauth = new OAuthManager(
13098
+ cfg,
13099
+ authLogger.scope("oauth"),
13100
+ tHooks,
13101
+ opts?.correlationProvider,
13102
+ opts?.clock ?? liveClock
13103
+ );
13038
13104
  else if (cfg.auth.strategy === "BASIC") basic = new BasicAuthManager(cfg);
13039
13105
  const fetcher = (input, init) => opts?.fetch ? opts.fetch(input, init) : fetch(input, init);
13040
13106
  let nodeAgent = null;
@@ -13978,11 +14044,9 @@ function toCancelable(factory) {
13978
14044
  };
13979
14045
  return p;
13980
14046
  }
13981
- function now() {
13982
- return Date.now();
13983
- }
13984
14047
  function eventualPoll(operationId, isGet, invoke, options) {
13985
14048
  const { waitUpToMs, predicate, onAttempt, onComplete, abortSignal, trace } = options;
14049
+ const clock = options.clock ?? liveClock;
13986
14050
  const elog = options.logger?.scope("eventual");
13987
14051
  const pollDefaultMs = hydrateConfig().config.eventual?.pollDefaultMs || 500;
13988
14052
  const userInterval = options.pollIntervalMs;
@@ -14000,7 +14064,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
14000
14064
  }
14001
14065
  return toCancelable((outerSignal) => {
14002
14066
  let attempts = 0;
14003
- const started = now();
14067
+ const started = clock.now();
14004
14068
  let cancelled = false;
14005
14069
  const abortImmediateStatuses = /* @__PURE__ */ new Set([400, 401, 403, 409, 422]);
14006
14070
  const externalAbort = () => {
@@ -14050,7 +14114,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
14050
14114
  } catch (e) {
14051
14115
  return settleErr(e);
14052
14116
  }
14053
- const elapsed = now() - started;
14117
+ const elapsed = clock.now() - started;
14054
14118
  const remaining = waitUpToMs - elapsed;
14055
14119
  if (ok) {
14056
14120
  onAttempt?.({
@@ -14092,11 +14156,15 @@ function eventualPoll(operationId, isGet, invoke, options) {
14092
14156
  elog?.debug?.(() => [
14093
14157
  `op=${operationId} attempt=${attempts} status=200 predicate=false nextDelay=${delay}ms remaining=${remaining}`
14094
14158
  ]);
14095
- setTimeout(() => loop(resolve, reject), delay);
14159
+ void clock.sleep(delay, outerSignal).then(
14160
+ () => loop(resolve, reject),
14161
+ () => {
14162
+ }
14163
+ );
14096
14164
  }).catch((err) => {
14097
14165
  if (cancelled || outerSignal.aborted) return settleErr(new Error("Cancelled"));
14098
14166
  const status = err?.status;
14099
- const elapsed = now() - started;
14167
+ const elapsed = clock.now() - started;
14100
14168
  const remaining = waitUpToMs - elapsed;
14101
14169
  if (status === 404 && isGet && remaining > 0) {
14102
14170
  const delay = Math.min(pollInterval, remaining);
@@ -14108,7 +14176,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
14108
14176
  predicateResult: false,
14109
14177
  nextDelayMs: delay
14110
14178
  });
14111
- return setTimeout(() => loop(resolve, reject), delay);
14179
+ void clock.sleep(delay, outerSignal).then(
14180
+ () => loop(resolve, reject),
14181
+ () => {
14182
+ }
14183
+ );
14184
+ return;
14112
14185
  }
14113
14186
  if (status === 429 && remaining > 0) {
14114
14187
  let delay = pollInterval * 2;
@@ -14128,7 +14201,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
14128
14201
  predicateResult: false,
14129
14202
  nextDelayMs: delay
14130
14203
  });
14131
- return setTimeout(() => loop(resolve, reject), delay);
14204
+ void clock.sleep(delay, outerSignal).then(
14205
+ () => loop(resolve, reject),
14206
+ () => {
14207
+ }
14208
+ );
14209
+ return;
14132
14210
  }
14133
14211
  if (status && (abortImmediateStatuses.has(status) || status >= 500))
14134
14212
  return settleErr(err);
@@ -14241,7 +14319,7 @@ function createLogger(opts = {}) {
14241
14319
  }
14242
14320
 
14243
14321
  // src/runtime/version.ts
14244
- var packageVersion = "10.0.0-alpha.39";
14322
+ var packageVersion = "10.0.0-alpha.40";
14245
14323
 
14246
14324
  // src/runtime/supportLogger.ts
14247
14325
  var NoopSupportLogger = class {
@@ -14967,11 +15045,9 @@ var ValidationManager = class {
14967
15045
  };
14968
15046
 
14969
15047
  // src/runtime/retry.ts
14970
- async function sleep(ms) {
14971
- return new Promise((r) => setTimeout(r, ms));
14972
- }
14973
15048
  function createRetryExecutor(opts) {
14974
15049
  const rand = opts.random || Math.random;
15050
+ const clock = opts.clock ?? liveClock;
14975
15051
  return async function execute(op, classify) {
14976
15052
  const { maxAttempts, baseDelayMs, maxDelayMs } = opts.policy;
14977
15053
  let attempt = 0;
@@ -14996,7 +15072,7 @@ function createRetryExecutor(opts) {
14996
15072
  ]);
14997
15073
  } catch {
14998
15074
  }
14999
- await sleep(delay);
15075
+ await clock.sleep(delay);
15000
15076
  }
15001
15077
  }
15002
15078
  throw lastErr;
@@ -15034,8 +15110,8 @@ function defaultHttpClassifier(err) {
15034
15110
  }
15035
15111
  return { retryable: false, reason: "non-retryable" };
15036
15112
  }
15037
- async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt) {
15038
- const exec = createRetryExecutor({ policy, logger, onAttempt });
15113
+ async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt, clock) {
15114
+ const exec = createRetryExecutor({ policy, logger, onAttempt, clock });
15039
15115
  return exec(fn, classify);
15040
15116
  }
15041
15117
 
@@ -15163,8 +15239,8 @@ var BackpressureManager = class {
15163
15239
  }
15164
15240
  recordBackpressure() {
15165
15241
  if (!this.cfg.enabled && !this.observeOnly) return;
15166
- const now2 = this.now();
15167
- this.lastEventAt = now2;
15242
+ const now = this.now();
15243
+ this.lastEventAt = now;
15168
15244
  this.consecutive++;
15169
15245
  this.healthySince = 0;
15170
15246
  if (!this.observeOnly) {
@@ -15200,8 +15276,8 @@ var BackpressureManager = class {
15200
15276
  this.backoffMs = 0;
15201
15277
  this.log("backoff.clear", { reason: "healthy-hint" });
15202
15278
  }
15203
- const now2 = this.now();
15204
- this.maybeRecover(now2);
15279
+ const now = this.now();
15280
+ this.maybeRecover(now);
15205
15281
  }
15206
15282
  scalePermits(factor) {
15207
15283
  if (this.permitsMax === null) return;
@@ -15211,16 +15287,16 @@ var BackpressureManager = class {
15211
15287
  this.log("permits.scale", { max: this.permitsMax });
15212
15288
  }
15213
15289
  }
15214
- maybeRecover(now2 = this.now()) {
15290
+ maybeRecover(now = this.now()) {
15215
15291
  if (this.permitsMax === null || this.observeOnly) return;
15216
- if (now2 - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
15217
- this.lastRecoverCheck = now2;
15218
- if (now2 - this.lastEventAt > this.cfg.decayQuietMs) {
15292
+ if (now - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
15293
+ this.lastRecoverCheck = now;
15294
+ if (now - this.lastEventAt > this.cfg.decayQuietMs) {
15219
15295
  const prev = this.severity;
15220
15296
  if (this.severity === "severe") this.severity = "soft";
15221
15297
  else if (this.severity === "soft") {
15222
15298
  this.severity = "healthy";
15223
- this.healthySince = now2;
15299
+ this.healthySince = now;
15224
15300
  }
15225
15301
  if (this.severity === "healthy") this.consecutive = 0;
15226
15302
  if (prev !== this.severity) {
@@ -15244,7 +15320,7 @@ var BackpressureManager = class {
15244
15320
  this.release();
15245
15321
  }
15246
15322
  } else {
15247
- if (this.healthySince > 0 && now2 - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
15323
+ if (this.healthySince > 0 && now - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
15248
15324
  this.permitsMax = null;
15249
15325
  this.permitsCurrent = 0;
15250
15326
  this.backoffMs = 0;
@@ -15273,66 +15349,6 @@ var BackpressureManager = class {
15273
15349
  }
15274
15350
  };
15275
15351
 
15276
- // src/runtime/clock.ts
15277
- var SLEW_DIVISOR = 16;
15278
- var MAX_TIMER_MS = 2147483647;
15279
- function scheduleLong(ms, onElapsed) {
15280
- let remaining = Math.max(0, ms);
15281
- let timer;
15282
- const step = () => {
15283
- const slice = Math.min(remaining, MAX_TIMER_MS);
15284
- remaining -= slice;
15285
- timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
15286
- };
15287
- step();
15288
- return () => clearTimeout(timer);
15289
- }
15290
- function createLiveClock(source = Date.now) {
15291
- let lastSource = source();
15292
- let offsetMs = 0;
15293
- let slewCreditMs = 0;
15294
- const now2 = () => {
15295
- const observed = source();
15296
- if (observed < lastSource) {
15297
- offsetMs += lastSource - observed;
15298
- } else if (offsetMs > 0) {
15299
- slewCreditMs += observed - lastSource;
15300
- const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
15301
- if (repay > 0) {
15302
- slewCreditMs -= repay * SLEW_DIVISOR;
15303
- offsetMs -= Math.min(offsetMs, repay);
15304
- }
15305
- }
15306
- lastSource = observed;
15307
- return observed + offsetMs;
15308
- };
15309
- const sleep2 = (ms, signal) => new Promise((resolve, reject) => {
15310
- if (signal?.aborted) {
15311
- reject(signal.reason);
15312
- return;
15313
- }
15314
- const cancel = scheduleLong(ms, () => {
15315
- signal?.removeEventListener("abort", onAbort);
15316
- resolve();
15317
- });
15318
- function onAbort() {
15319
- cancel();
15320
- reject(signal?.reason);
15321
- }
15322
- signal?.addEventListener("abort", onAbort, { once: true });
15323
- });
15324
- const deadline = (ms) => {
15325
- const controller = new AbortController();
15326
- const cancel = scheduleLong(
15327
- ms,
15328
- () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
15329
- );
15330
- return { signal: controller.signal, dispose: cancel };
15331
- };
15332
- return { now: now2, sleep: sleep2, deadline };
15333
- }
15334
- var liveClock = createLiveClock();
15335
-
15336
15352
  // src/runtime/typedVariables.ts
15337
15353
  var TypedVariablesError = class extends Error {
15338
15354
  constructor(message, options) {
@@ -15445,8 +15461,8 @@ var VariableCollector = class {
15445
15461
  }
15446
15462
  };
15447
15463
  var realClock = {
15448
- now: () => Date.now(),
15449
- sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
15464
+ now: () => liveClock.now(),
15465
+ sleep: (ms) => liveClock.sleep(ms)
15450
15466
  };
15451
15467
  async function collectAllPages(params) {
15452
15468
  const remaining = new Set(params.names);
@@ -15667,7 +15683,7 @@ var JobWorker = class {
15667
15683
  _name;
15668
15684
  _activeJobs = 0;
15669
15685
  _stopped = false;
15670
- _pollTimer = null;
15686
+ _pollWait = null;
15671
15687
  _inFlightActivation = null;
15672
15688
  // CancelablePromise-like
15673
15689
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
@@ -15741,8 +15757,8 @@ var JobWorker = class {
15741
15757
  }
15742
15758
  stop() {
15743
15759
  this._stopped = true;
15744
- if (this._pollTimer) clearTimeout(this._pollTimer);
15745
- this._pollTimer = null;
15760
+ this._pollWait?.abort();
15761
+ this._pollWait = null;
15746
15762
  if (this._inFlightActivation?.cancel) {
15747
15763
  try {
15748
15764
  this._inFlightActivation.cancel();
@@ -15761,8 +15777,8 @@ var JobWorker = class {
15761
15777
  {
15762
15778
  haltPolling: () => {
15763
15779
  this._stopped = true;
15764
- if (this._pollTimer) clearTimeout(this._pollTimer);
15765
- this._pollTimer = null;
15780
+ this._pollWait?.abort();
15781
+ this._pollWait = null;
15766
15782
  },
15767
15783
  activeJobs: () => this._activeJobs,
15768
15784
  inFlightActivation: () => this._inFlightActivation,
@@ -15773,10 +15789,18 @@ var JobWorker = class {
15773
15789
  }
15774
15790
  _scheduleNext(delayMs) {
15775
15791
  if (this._stopped) return;
15776
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
15792
+ const wait = new AbortController();
15793
+ this._pollWait = wait;
15794
+ void this._client.clock.sleep(delayMs, wait.signal).then(
15795
+ () => {
15796
+ if (this._pollWait === wait) this._pollWait = null;
15797
+ void this._poll();
15798
+ },
15799
+ () => {
15800
+ }
15801
+ );
15777
15802
  }
15778
15803
  async _poll() {
15779
- this._pollTimer = null;
15780
15804
  if (this._stopped) return;
15781
15805
  if (this._activeJobs >= this._maxParallelJobs) {
15782
15806
  this._scheduleNext(this._cfg.pollIntervalMs);
@@ -15969,7 +15993,7 @@ var ThreadedJobWorker = class {
15969
15993
  _name;
15970
15994
  _activeJobs = 0;
15971
15995
  _stopped = false;
15972
- _pollTimer = null;
15996
+ _pollWait = null;
15973
15997
  _inFlightActivation = null;
15974
15998
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
15975
15999
  _consecutiveActivationErrors = 0;
@@ -16051,8 +16075,8 @@ var ThreadedJobWorker = class {
16051
16075
  }
16052
16076
  stop() {
16053
16077
  this._stopped = true;
16054
- if (this._pollTimer) clearTimeout(this._pollTimer);
16055
- this._pollTimer = null;
16078
+ this._pollWait?.abort();
16079
+ this._pollWait = null;
16056
16080
  if (this._inFlightActivation?.cancel) {
16057
16081
  try {
16058
16082
  this._inFlightActivation.cancel();
@@ -16066,8 +16090,8 @@ var ThreadedJobWorker = class {
16066
16090
  {
16067
16091
  haltPolling: () => {
16068
16092
  this._stopped = true;
16069
- if (this._pollTimer) clearTimeout(this._pollTimer);
16070
- this._pollTimer = null;
16093
+ this._pollWait?.abort();
16094
+ this._pollWait = null;
16071
16095
  },
16072
16096
  activeJobs: () => this._activeJobs,
16073
16097
  inFlightActivation: () => this._inFlightActivation,
@@ -16163,10 +16187,18 @@ var ThreadedJobWorker = class {
16163
16187
  // ─── Polling (same pattern as JobWorker) ───
16164
16188
  _scheduleNext(delayMs) {
16165
16189
  if (this._stopped) return;
16166
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
16190
+ const wait = new AbortController();
16191
+ this._pollWait = wait;
16192
+ void this._client.clock.sleep(delayMs, wait.signal).then(
16193
+ () => {
16194
+ if (this._pollWait === wait) this._pollWait = null;
16195
+ void this._poll();
16196
+ },
16197
+ () => {
16198
+ }
16199
+ );
16167
16200
  }
16168
16201
  async _poll() {
16169
- this._pollTimer = null;
16170
16202
  if (this._stopped) return;
16171
16203
  await this._pool.ready;
16172
16204
  if (this._activeJobs >= this._maxParallelJobs) {
@@ -16757,7 +16789,7 @@ var CamundaClientBase = class {
16757
16789
  _validation = new ValidationManager({ req: "none", res: "none" });
16758
16790
  _log = createLogger();
16759
16791
  _bp;
16760
- _clock = liveClock;
16792
+ _clock;
16761
16793
  /** Registered job workers created via createJobWorker (lifecycle managed by user). */
16762
16794
  _workers = [];
16763
16795
  /** Shared thread pool for all threaded job workers (lazy-initialised on first use). */
@@ -16772,7 +16804,7 @@ var CamundaClientBase = class {
16772
16804
  _overrides = {};
16773
16805
  constructor(opts = {}) {
16774
16806
  if (opts.config) this._overrides = { ...opts.config };
16775
- this._clock = opts.clock ?? liveClock;
16807
+ this._clock = opts.clock ?? createLiveClock();
16776
16808
  const { config } = hydrateConfig({ overrides: this._overrides, env: opts.env });
16777
16809
  this._config = deepFreeze2(config);
16778
16810
  this._log = createLogger({
@@ -16831,6 +16863,7 @@ var CamundaClientBase = class {
16831
16863
  this._auth = createAuthFacade(this._config, {
16832
16864
  fetch: this._fetch,
16833
16865
  logger: this._log,
16866
+ clock: this._clock,
16834
16867
  telemetryHooks: opts.telemetry?.hooks,
16835
16868
  correlationProvider: opts.telemetry?.correlation || !opts.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
16836
16869
  });
@@ -16933,6 +16966,7 @@ var CamundaClientBase = class {
16933
16966
  this._auth = createAuthFacade(this._config, {
16934
16967
  fetch: this._fetch,
16935
16968
  logger: this._log,
16969
+ clock: this._clock,
16936
16970
  telemetryHooks: next.telemetry?.hooks,
16937
16971
  correlationProvider: next.telemetry?.correlation || !next.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
16938
16972
  });
@@ -17034,7 +17068,9 @@ var CamundaClientBase = class {
17034
17068
  this._bp.recordBackpressure();
17035
17069
  }
17036
17070
  return decision;
17037
- }
17071
+ },
17072
+ void 0,
17073
+ this._clock
17038
17074
  );
17039
17075
  this._bp.recordHealthyHint();
17040
17076
  return result;
@@ -20966,7 +21002,7 @@ var CamundaClientBase = class {
20966
21002
  }
20967
21003
  };
20968
21004
  const invoke = () => toCancelable2(() => call());
20969
- if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log });
21005
+ if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
20970
21006
  return invoke();
20971
21007
  });
20972
21008
  }
@@ -21024,7 +21060,7 @@ var CamundaClientBase = class {
21024
21060
  }
21025
21061
  };
21026
21062
  const invoke = () => toCancelable2(() => call());
21027
- if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log });
21063
+ if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21028
21064
  return invoke();
21029
21065
  });
21030
21066
  }
@@ -21082,7 +21118,7 @@ var CamundaClientBase = class {
21082
21118
  }
21083
21119
  };
21084
21120
  const invoke = () => toCancelable2(() => call());
21085
- if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log });
21121
+ if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21086
21122
  return invoke();
21087
21123
  });
21088
21124
  }
@@ -21183,7 +21219,7 @@ var CamundaClientBase = class {
21183
21219
  }
21184
21220
  };
21185
21221
  const invoke = () => toCancelable2(() => call());
21186
- if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log });
21222
+ if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21187
21223
  return invoke();
21188
21224
  });
21189
21225
  }
@@ -21241,7 +21277,7 @@ var CamundaClientBase = class {
21241
21277
  }
21242
21278
  };
21243
21279
  const invoke = () => toCancelable2(() => call());
21244
- if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log });
21280
+ if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21245
21281
  return invoke();
21246
21282
  });
21247
21283
  }
@@ -21471,7 +21507,7 @@ var CamundaClientBase = class {
21471
21507
  }
21472
21508
  };
21473
21509
  const invoke = () => toCancelable2(() => call());
21474
- if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log });
21510
+ if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21475
21511
  return invoke();
21476
21512
  });
21477
21513
  }
@@ -21529,7 +21565,7 @@ var CamundaClientBase = class {
21529
21565
  }
21530
21566
  };
21531
21567
  const invoke = () => toCancelable2(() => call());
21532
- if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
21568
+ if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21533
21569
  return invoke();
21534
21570
  });
21535
21571
  }
@@ -21587,7 +21623,7 @@ var CamundaClientBase = class {
21587
21623
  }
21588
21624
  };
21589
21625
  const invoke = () => toCancelable2(() => call());
21590
- if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log });
21626
+ if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21591
21627
  return invoke();
21592
21628
  });
21593
21629
  }
@@ -21645,7 +21681,7 @@ var CamundaClientBase = class {
21645
21681
  }
21646
21682
  };
21647
21683
  const invoke = () => toCancelable2(() => call());
21648
- if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log });
21684
+ if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21649
21685
  return invoke();
21650
21686
  });
21651
21687
  }
@@ -21703,7 +21739,7 @@ var CamundaClientBase = class {
21703
21739
  }
21704
21740
  };
21705
21741
  const invoke = () => toCancelable2(() => call());
21706
- if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log });
21742
+ if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21707
21743
  return invoke();
21708
21744
  });
21709
21745
  }
@@ -21821,7 +21857,7 @@ var CamundaClientBase = class {
21821
21857
  }
21822
21858
  };
21823
21859
  const invoke = () => toCancelable2(() => call());
21824
- if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log });
21860
+ if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21825
21861
  return invoke();
21826
21862
  });
21827
21863
  }
@@ -21922,7 +21958,7 @@ var CamundaClientBase = class {
21922
21958
  }
21923
21959
  };
21924
21960
  const invoke = () => toCancelable2(() => call());
21925
- if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log });
21961
+ if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21926
21962
  return invoke();
21927
21963
  });
21928
21964
  }
@@ -21980,7 +22016,7 @@ var CamundaClientBase = class {
21980
22016
  }
21981
22017
  };
21982
22018
  const invoke = () => toCancelable2(() => call());
21983
- if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
22019
+ if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21984
22020
  return invoke();
21985
22021
  });
21986
22022
  }
@@ -22038,7 +22074,7 @@ var CamundaClientBase = class {
22038
22074
  }
22039
22075
  };
22040
22076
  const invoke = () => toCancelable2(() => call());
22041
- if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log });
22077
+ if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22042
22078
  return invoke();
22043
22079
  });
22044
22080
  }
@@ -22096,7 +22132,7 @@ var CamundaClientBase = class {
22096
22132
  }
22097
22133
  };
22098
22134
  const invoke = () => toCancelable2(() => call());
22099
- if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log });
22135
+ if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22100
22136
  return invoke();
22101
22137
  });
22102
22138
  }
@@ -22154,7 +22190,7 @@ var CamundaClientBase = class {
22154
22190
  }
22155
22191
  };
22156
22192
  const invoke = () => toCancelable2(() => call());
22157
- if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log });
22193
+ if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22158
22194
  return invoke();
22159
22195
  });
22160
22196
  }
@@ -22326,7 +22362,7 @@ var CamundaClientBase = class {
22326
22362
  }
22327
22363
  };
22328
22364
  const invoke = () => toCancelable2(() => call());
22329
- if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log });
22365
+ if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22330
22366
  return invoke();
22331
22367
  });
22332
22368
  }
@@ -22384,7 +22420,7 @@ var CamundaClientBase = class {
22384
22420
  }
22385
22421
  };
22386
22422
  const invoke = () => toCancelable2(() => call());
22387
- if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log });
22423
+ if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22388
22424
  return invoke();
22389
22425
  });
22390
22426
  }
@@ -22442,7 +22478,7 @@ var CamundaClientBase = class {
22442
22478
  }
22443
22479
  };
22444
22480
  const invoke = () => toCancelable2(() => call());
22445
- if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log });
22481
+ if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22446
22482
  return invoke();
22447
22483
  });
22448
22484
  }
@@ -22500,7 +22536,7 @@ var CamundaClientBase = class {
22500
22536
  }
22501
22537
  };
22502
22538
  const invoke = () => toCancelable2(() => call());
22503
- if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log });
22539
+ if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22504
22540
  return invoke();
22505
22541
  });
22506
22542
  }
@@ -22558,7 +22594,7 @@ var CamundaClientBase = class {
22558
22594
  }
22559
22595
  };
22560
22596
  const invoke = () => toCancelable2(() => call());
22561
- if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log });
22597
+ if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22562
22598
  return invoke();
22563
22599
  });
22564
22600
  }
@@ -22659,7 +22695,7 @@ var CamundaClientBase = class {
22659
22695
  }
22660
22696
  };
22661
22697
  const invoke = () => toCancelable2(() => call());
22662
- if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log });
22698
+ if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22663
22699
  return invoke();
22664
22700
  });
22665
22701
  }
@@ -22717,7 +22753,7 @@ var CamundaClientBase = class {
22717
22753
  }
22718
22754
  };
22719
22755
  const invoke = () => toCancelable2(() => call());
22720
- if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log });
22756
+ if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22721
22757
  return invoke();
22722
22758
  });
22723
22759
  }
@@ -22775,7 +22811,7 @@ var CamundaClientBase = class {
22775
22811
  }
22776
22812
  };
22777
22813
  const invoke = () => toCancelable2(() => call());
22778
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log });
22814
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22779
22815
  return invoke();
22780
22816
  });
22781
22817
  }
@@ -22833,7 +22869,7 @@ var CamundaClientBase = class {
22833
22869
  }
22834
22870
  };
22835
22871
  const invoke = () => toCancelable2(() => call());
22836
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22872
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22837
22873
  return invoke();
22838
22874
  });
22839
22875
  }
@@ -22891,7 +22927,7 @@ var CamundaClientBase = class {
22891
22927
  }
22892
22928
  };
22893
22929
  const invoke = () => toCancelable2(() => call());
22894
- if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22930
+ if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22895
22931
  return invoke();
22896
22932
  });
22897
22933
  }
@@ -22955,7 +22991,7 @@ var CamundaClientBase = class {
22955
22991
  }
22956
22992
  };
22957
22993
  const invoke = () => toCancelable2(() => call());
22958
- if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22994
+ if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22959
22995
  return invoke();
22960
22996
  });
22961
22997
  }
@@ -23013,7 +23049,7 @@ var CamundaClientBase = class {
23013
23049
  }
23014
23050
  };
23015
23051
  const invoke = () => toCancelable2(() => call());
23016
- if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
23052
+ if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23017
23053
  return invoke();
23018
23054
  });
23019
23055
  }
@@ -23071,7 +23107,7 @@ var CamundaClientBase = class {
23071
23107
  }
23072
23108
  };
23073
23109
  const invoke = () => toCancelable2(() => call());
23074
- if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log });
23110
+ if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23075
23111
  return invoke();
23076
23112
  });
23077
23113
  }
@@ -23129,7 +23165,7 @@ var CamundaClientBase = class {
23129
23165
  }
23130
23166
  };
23131
23167
  const invoke = () => toCancelable2(() => call());
23132
- if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log });
23168
+ if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23133
23169
  return invoke();
23134
23170
  });
23135
23171
  }
@@ -23187,7 +23223,7 @@ var CamundaClientBase = class {
23187
23223
  }
23188
23224
  };
23189
23225
  const invoke = () => toCancelable2(() => call());
23190
- if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log });
23226
+ if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23191
23227
  return invoke();
23192
23228
  });
23193
23229
  }
@@ -23245,7 +23281,7 @@ var CamundaClientBase = class {
23245
23281
  }
23246
23282
  };
23247
23283
  const invoke = () => toCancelable2(() => call());
23248
- if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log });
23284
+ if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23249
23285
  return invoke();
23250
23286
  });
23251
23287
  }
@@ -23303,7 +23339,7 @@ var CamundaClientBase = class {
23303
23339
  }
23304
23340
  };
23305
23341
  const invoke = () => toCancelable2(() => call());
23306
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log });
23342
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23307
23343
  return invoke();
23308
23344
  });
23309
23345
  }
@@ -23361,7 +23397,7 @@ var CamundaClientBase = class {
23361
23397
  }
23362
23398
  };
23363
23399
  const invoke = () => toCancelable2(() => call());
23364
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log });
23400
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23365
23401
  return invoke();
23366
23402
  });
23367
23403
  }
@@ -23419,7 +23455,7 @@ var CamundaClientBase = class {
23419
23455
  }
23420
23456
  };
23421
23457
  const invoke = () => toCancelable2(() => call());
23422
- if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log });
23458
+ if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23423
23459
  return invoke();
23424
23460
  });
23425
23461
  }
@@ -23477,7 +23513,7 @@ var CamundaClientBase = class {
23477
23513
  }
23478
23514
  };
23479
23515
  const invoke = () => toCancelable2(() => call());
23480
- if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log });
23516
+ if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23481
23517
  return invoke();
23482
23518
  });
23483
23519
  }
@@ -23535,7 +23571,7 @@ var CamundaClientBase = class {
23535
23571
  }
23536
23572
  };
23537
23573
  const invoke = () => toCancelable2(() => call());
23538
- if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log });
23574
+ if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23539
23575
  return invoke();
23540
23576
  });
23541
23577
  }
@@ -23593,7 +23629,7 @@ var CamundaClientBase = class {
23593
23629
  }
23594
23630
  };
23595
23631
  const invoke = () => toCancelable2(() => call());
23596
- if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log });
23632
+ if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23597
23633
  return invoke();
23598
23634
  });
23599
23635
  }
@@ -23694,7 +23730,7 @@ var CamundaClientBase = class {
23694
23730
  }
23695
23731
  };
23696
23732
  const invoke = () => toCancelable2(() => call());
23697
- if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log });
23733
+ if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23698
23734
  return invoke();
23699
23735
  });
23700
23736
  }
@@ -23963,7 +23999,7 @@ var CamundaClientBase = class {
23963
23999
  }
23964
24000
  };
23965
24001
  const invoke = () => toCancelable2(() => call());
23966
- if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log });
24002
+ if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23967
24003
  return invoke();
23968
24004
  });
23969
24005
  }
@@ -24107,7 +24143,7 @@ var CamundaClientBase = class {
24107
24143
  }
24108
24144
  };
24109
24145
  const invoke = () => toCancelable2(() => call());
24110
- if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log });
24146
+ if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24111
24147
  return invoke();
24112
24148
  });
24113
24149
  }
@@ -24165,7 +24201,7 @@ var CamundaClientBase = class {
24165
24201
  }
24166
24202
  };
24167
24203
  const invoke = () => toCancelable2(() => call());
24168
- if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
24204
+ if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24169
24205
  return invoke();
24170
24206
  });
24171
24207
  }
@@ -24266,7 +24302,7 @@ var CamundaClientBase = class {
24266
24302
  }
24267
24303
  };
24268
24304
  const invoke = () => toCancelable2(() => call());
24269
- if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log });
24305
+ if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24270
24306
  return invoke();
24271
24307
  });
24272
24308
  }
@@ -24324,7 +24360,7 @@ var CamundaClientBase = class {
24324
24360
  }
24325
24361
  };
24326
24362
  const invoke = () => toCancelable2(() => call());
24327
- if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log });
24363
+ if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24328
24364
  return invoke();
24329
24365
  });
24330
24366
  }
@@ -24382,7 +24418,7 @@ var CamundaClientBase = class {
24382
24418
  }
24383
24419
  };
24384
24420
  const invoke = () => toCancelable2(() => call());
24385
- if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log });
24421
+ if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24386
24422
  return invoke();
24387
24423
  });
24388
24424
  }
@@ -24440,7 +24476,7 @@ var CamundaClientBase = class {
24440
24476
  }
24441
24477
  };
24442
24478
  const invoke = () => toCancelable2(() => call());
24443
- if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log });
24479
+ if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24444
24480
  return invoke();
24445
24481
  });
24446
24482
  }
@@ -24498,7 +24534,7 @@ var CamundaClientBase = class {
24498
24534
  }
24499
24535
  };
24500
24536
  const invoke = () => toCancelable2(() => call());
24501
- if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log });
24537
+ if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24502
24538
  return invoke();
24503
24539
  });
24504
24540
  }
@@ -25919,7 +25955,7 @@ var CamundaClientBase = class {
25919
25955
  }
25920
25956
  };
25921
25957
  const invoke = () => toCancelable2(() => call());
25922
- if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log });
25958
+ if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
25923
25959
  return invoke();
25924
25960
  });
25925
25961
  }
@@ -25983,7 +26019,7 @@ var CamundaClientBase = class {
25983
26019
  }
25984
26020
  };
25985
26021
  const invoke = () => toCancelable2(() => call());
25986
- if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log });
26022
+ if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
25987
26023
  return invoke();
25988
26024
  });
25989
26025
  }
@@ -26041,7 +26077,7 @@ var CamundaClientBase = class {
26041
26077
  }
26042
26078
  };
26043
26079
  const invoke = () => toCancelable2(() => call());
26044
- if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log });
26080
+ if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26045
26081
  return invoke();
26046
26082
  });
26047
26083
  }
@@ -26099,7 +26135,7 @@ var CamundaClientBase = class {
26099
26135
  }
26100
26136
  };
26101
26137
  const invoke = () => toCancelable2(() => call());
26102
- if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
26138
+ if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26103
26139
  return invoke();
26104
26140
  });
26105
26141
  }
@@ -26157,7 +26193,7 @@ var CamundaClientBase = class {
26157
26193
  }
26158
26194
  };
26159
26195
  const invoke = () => toCancelable2(() => call());
26160
- if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
26196
+ if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26161
26197
  return invoke();
26162
26198
  });
26163
26199
  }
@@ -26215,7 +26251,7 @@ var CamundaClientBase = class {
26215
26251
  }
26216
26252
  };
26217
26253
  const invoke = () => toCancelable2(() => call());
26218
- if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log });
26254
+ if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26219
26255
  return invoke();
26220
26256
  });
26221
26257
  }
@@ -26273,7 +26309,7 @@ var CamundaClientBase = class {
26273
26309
  }
26274
26310
  };
26275
26311
  const invoke = () => toCancelable2(() => call());
26276
- if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log });
26312
+ if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26277
26313
  return invoke();
26278
26314
  });
26279
26315
  }
@@ -26337,7 +26373,7 @@ var CamundaClientBase = class {
26337
26373
  }
26338
26374
  };
26339
26375
  const invoke = () => toCancelable2(() => call());
26340
- if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log });
26376
+ if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26341
26377
  return invoke();
26342
26378
  });
26343
26379
  }
@@ -26401,7 +26437,7 @@ var CamundaClientBase = class {
26401
26437
  }
26402
26438
  };
26403
26439
  const invoke = () => toCancelable2(() => call());
26404
- if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log });
26440
+ if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26405
26441
  return invoke();
26406
26442
  });
26407
26443
  }
@@ -26465,7 +26501,7 @@ var CamundaClientBase = class {
26465
26501
  }
26466
26502
  };
26467
26503
  const invoke = () => toCancelable2(() => call());
26468
- if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log });
26504
+ if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26469
26505
  return invoke();
26470
26506
  });
26471
26507
  }
@@ -26529,7 +26565,7 @@ var CamundaClientBase = class {
26529
26565
  }
26530
26566
  };
26531
26567
  const invoke = () => toCancelable2(() => call());
26532
- if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log });
26568
+ if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26533
26569
  return invoke();
26534
26570
  });
26535
26571
  }
@@ -26587,7 +26623,7 @@ var CamundaClientBase = class {
26587
26623
  }
26588
26624
  };
26589
26625
  const invoke = () => toCancelable2(() => call());
26590
- if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
26626
+ if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26591
26627
  return invoke();
26592
26628
  });
26593
26629
  }
@@ -26645,7 +26681,7 @@ var CamundaClientBase = class {
26645
26681
  }
26646
26682
  };
26647
26683
  const invoke = () => toCancelable2(() => call());
26648
- if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log });
26684
+ if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26649
26685
  return invoke();
26650
26686
  });
26651
26687
  }
@@ -26703,7 +26739,7 @@ var CamundaClientBase = class {
26703
26739
  }
26704
26740
  };
26705
26741
  const invoke = () => toCancelable2(() => call());
26706
- if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log });
26742
+ if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26707
26743
  return invoke();
26708
26744
  });
26709
26745
  }
@@ -26761,7 +26797,7 @@ var CamundaClientBase = class {
26761
26797
  }
26762
26798
  };
26763
26799
  const invoke = () => toCancelable2(() => call());
26764
- if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log });
26800
+ if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26765
26801
  return invoke();
26766
26802
  });
26767
26803
  }
@@ -26825,7 +26861,7 @@ var CamundaClientBase = class {
26825
26861
  }
26826
26862
  };
26827
26863
  const invoke = () => toCancelable2(() => call());
26828
- if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
26864
+ if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26829
26865
  return invoke();
26830
26866
  });
26831
26867
  }
@@ -26883,7 +26919,7 @@ var CamundaClientBase = class {
26883
26919
  }
26884
26920
  };
26885
26921
  const invoke = () => toCancelable2(() => call());
26886
- if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log });
26922
+ if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26887
26923
  return invoke();
26888
26924
  });
26889
26925
  }
@@ -26941,7 +26977,7 @@ var CamundaClientBase = class {
26941
26977
  }
26942
26978
  };
26943
26979
  const invoke = () => toCancelable2(() => call());
26944
- if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log });
26980
+ if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26945
26981
  return invoke();
26946
26982
  });
26947
26983
  }
@@ -26999,7 +27035,7 @@ var CamundaClientBase = class {
26999
27035
  }
27000
27036
  };
27001
27037
  const invoke = () => toCancelable2(() => call());
27002
- if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log });
27038
+ if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27003
27039
  return invoke();
27004
27040
  });
27005
27041
  }
@@ -27063,7 +27099,7 @@ var CamundaClientBase = class {
27063
27099
  }
27064
27100
  };
27065
27101
  const invoke = () => toCancelable2(() => call());
27066
- if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log });
27102
+ if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27067
27103
  return invoke();
27068
27104
  });
27069
27105
  }
@@ -27121,7 +27157,7 @@ var CamundaClientBase = class {
27121
27157
  }
27122
27158
  };
27123
27159
  const invoke = () => toCancelable2(() => call());
27124
- if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log });
27160
+ if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27125
27161
  return invoke();
27126
27162
  });
27127
27163
  }
@@ -27185,7 +27221,7 @@ var CamundaClientBase = class {
27185
27221
  }
27186
27222
  };
27187
27223
  const invoke = () => toCancelable2(() => call());
27188
- if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log });
27224
+ if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27189
27225
  return invoke();
27190
27226
  });
27191
27227
  }
@@ -27243,7 +27279,7 @@ var CamundaClientBase = class {
27243
27279
  }
27244
27280
  };
27245
27281
  const invoke = () => toCancelable2(() => call());
27246
- if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log });
27282
+ if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27247
27283
  return invoke();
27248
27284
  });
27249
27285
  }
@@ -27301,7 +27337,7 @@ var CamundaClientBase = class {
27301
27337
  }
27302
27338
  };
27303
27339
  const invoke = () => toCancelable2(() => call());
27304
- if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log });
27340
+ if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27305
27341
  return invoke();
27306
27342
  });
27307
27343
  }
@@ -27359,7 +27395,7 @@ var CamundaClientBase = class {
27359
27395
  }
27360
27396
  };
27361
27397
  const invoke = () => toCancelable2(() => call());
27362
- if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log });
27398
+ if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27363
27399
  return invoke();
27364
27400
  });
27365
27401
  }
@@ -27423,7 +27459,7 @@ var CamundaClientBase = class {
27423
27459
  }
27424
27460
  };
27425
27461
  const invoke = () => toCancelable2(() => call());
27426
- if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log });
27462
+ if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27427
27463
  return invoke();
27428
27464
  });
27429
27465
  }
@@ -27487,7 +27523,7 @@ var CamundaClientBase = class {
27487
27523
  }
27488
27524
  };
27489
27525
  const invoke = () => toCancelable2(() => call());
27490
- if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log });
27526
+ if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27491
27527
  return invoke();
27492
27528
  });
27493
27529
  }
@@ -27551,7 +27587,7 @@ var CamundaClientBase = class {
27551
27587
  }
27552
27588
  };
27553
27589
  const invoke = () => toCancelable2(() => call());
27554
- if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log });
27590
+ if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27555
27591
  return invoke();
27556
27592
  });
27557
27593
  }
@@ -27609,7 +27645,7 @@ var CamundaClientBase = class {
27609
27645
  }
27610
27646
  };
27611
27647
  const invoke = () => toCancelable2(() => call());
27612
- if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
27648
+ if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27613
27649
  return invoke();
27614
27650
  });
27615
27651
  }
@@ -27667,7 +27703,7 @@ var CamundaClientBase = class {
27667
27703
  }
27668
27704
  };
27669
27705
  const invoke = () => toCancelable2(() => call());
27670
- if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
27706
+ if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27671
27707
  return invoke();
27672
27708
  });
27673
27709
  }
@@ -27725,7 +27761,7 @@ var CamundaClientBase = class {
27725
27761
  }
27726
27762
  };
27727
27763
  const invoke = () => toCancelable2(() => call());
27728
- if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log });
27764
+ if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27729
27765
  return invoke();
27730
27766
  });
27731
27767
  }
@@ -27789,7 +27825,7 @@ var CamundaClientBase = class {
27789
27825
  }
27790
27826
  };
27791
27827
  const invoke = () => toCancelable2(() => call());
27792
- if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log });
27828
+ if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27793
27829
  return invoke();
27794
27830
  });
27795
27831
  }
@@ -27853,7 +27889,7 @@ var CamundaClientBase = class {
27853
27889
  }
27854
27890
  };
27855
27891
  const invoke = () => toCancelable2(() => call());
27856
- if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
27892
+ if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27857
27893
  return invoke();
27858
27894
  });
27859
27895
  }
@@ -27911,7 +27947,7 @@ var CamundaClientBase = class {
27911
27947
  }
27912
27948
  };
27913
27949
  const invoke = () => toCancelable2(() => call());
27914
- if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log });
27950
+ if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27915
27951
  return invoke();
27916
27952
  });
27917
27953
  }
@@ -27969,7 +28005,7 @@ var CamundaClientBase = class {
27969
28005
  }
27970
28006
  };
27971
28007
  const invoke = () => toCancelable2(() => call());
27972
- if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log });
28008
+ if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27973
28009
  return invoke();
27974
28010
  });
27975
28011
  }
@@ -28027,7 +28063,7 @@ var CamundaClientBase = class {
28027
28063
  }
28028
28064
  };
28029
28065
  const invoke = () => toCancelable2(() => call());
28030
- if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log });
28066
+ if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28031
28067
  return invoke();
28032
28068
  });
28033
28069
  }
@@ -28091,7 +28127,7 @@ var CamundaClientBase = class {
28091
28127
  }
28092
28128
  };
28093
28129
  const invoke = () => toCancelable2(() => call());
28094
- if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log });
28130
+ if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28095
28131
  return invoke();
28096
28132
  });
28097
28133
  }
@@ -28155,7 +28191,7 @@ var CamundaClientBase = class {
28155
28191
  }
28156
28192
  };
28157
28193
  const invoke = () => toCancelable2(() => call());
28158
- if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log });
28194
+ if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28159
28195
  return invoke();
28160
28196
  });
28161
28197
  }
@@ -28213,7 +28249,7 @@ var CamundaClientBase = class {
28213
28249
  }
28214
28250
  };
28215
28251
  const invoke = () => toCancelable2(() => call());
28216
- if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log });
28252
+ if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28217
28253
  return invoke();
28218
28254
  });
28219
28255
  }
@@ -28271,7 +28307,7 @@ var CamundaClientBase = class {
28271
28307
  }
28272
28308
  };
28273
28309
  const invoke = () => toCancelable2(() => call());
28274
- if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log });
28310
+ if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28275
28311
  return invoke();
28276
28312
  });
28277
28313
  }
@@ -28335,7 +28371,7 @@ var CamundaClientBase = class {
28335
28371
  }
28336
28372
  };
28337
28373
  const invoke = () => toCancelable2(() => call());
28338
- if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log });
28374
+ if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28339
28375
  return invoke();
28340
28376
  });
28341
28377
  }
@@ -28399,7 +28435,7 @@ var CamundaClientBase = class {
28399
28435
  }
28400
28436
  };
28401
28437
  const invoke = () => toCancelable2(() => call());
28402
- if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log });
28438
+ if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28403
28439
  return invoke();
28404
28440
  });
28405
28441
  }
@@ -28463,7 +28499,7 @@ var CamundaClientBase = class {
28463
28499
  }
28464
28500
  };
28465
28501
  const invoke = () => toCancelable2(() => call());
28466
- if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log });
28502
+ if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28467
28503
  return invoke();
28468
28504
  });
28469
28505
  }
@@ -28527,7 +28563,7 @@ var CamundaClientBase = class {
28527
28563
  }
28528
28564
  };
28529
28565
  const invoke = () => toCancelable2(() => call());
28530
- if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
28566
+ if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28531
28567
  return invoke();
28532
28568
  });
28533
28569
  }
@@ -28597,7 +28633,7 @@ var CamundaClientBase = class {
28597
28633
  }
28598
28634
  };
28599
28635
  const invoke = () => toCancelable2(() => call());
28600
- if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log });
28636
+ if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28601
28637
  return invoke();
28602
28638
  });
28603
28639
  }
@@ -28655,7 +28691,7 @@ var CamundaClientBase = class {
28655
28691
  }
28656
28692
  };
28657
28693
  const invoke = () => toCancelable2(() => call());
28658
- if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log });
28694
+ if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28659
28695
  return invoke();
28660
28696
  });
28661
28697
  }
@@ -28725,7 +28761,7 @@ var CamundaClientBase = class {
28725
28761
  }
28726
28762
  };
28727
28763
  const invoke = () => toCancelable2(() => call());
28728
- if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log });
28764
+ if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28729
28765
  return invoke();
28730
28766
  });
28731
28767
  }
@@ -28789,7 +28825,7 @@ var CamundaClientBase = class {
28789
28825
  }
28790
28826
  };
28791
28827
  const invoke = () => toCancelable2(() => call());
28792
- if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log });
28828
+ if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28793
28829
  return invoke();
28794
28830
  });
28795
28831
  }
@@ -31122,7 +31158,7 @@ function createCamundaClientLoose(...args) {
31122
31158
  }
31123
31159
 
31124
31160
  // src/gen/specHash.ts
31125
- var SPEC_HASH = "sha256:518a106a4191aa1cdabbf2e7d62d464fd913571eb84367d02dd80b30604a0e7b";
31161
+ var SPEC_HASH = "sha256:d3638a40f5d0c82477c3bceaab0d0a3f9fd2e5804bc363fd39ff7a9d2b9306a8";
31126
31162
 
31127
31163
  // src/gen/types.gen.ts
31128
31164
  var AgentDefinitionTypeEnum = {