@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.
@@ -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
  });
@@ -9580,7 +9576,7 @@ function createSseClient({
9580
9576
  ...options
9581
9577
  }) {
9582
9578
  let lastEventId;
9583
- const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
9579
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
9584
9580
  const createStream = async function* () {
9585
9581
  let retryDelay = sseDefaultRetryDelay ?? 3e3;
9586
9582
  let attempt = 0;
@@ -9684,7 +9680,7 @@ function createSseClient({
9684
9680
  break;
9685
9681
  }
9686
9682
  const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
9687
- await sleep2(backoff);
9683
+ await sleep(backoff);
9688
9684
  }
9689
9685
  }
9690
9686
  };
@@ -12627,6 +12623,66 @@ var getVariable = (options) => (options.client ?? client).get({
12627
12623
  ...options
12628
12624
  });
12629
12625
 
12626
+ // src/runtime/clock.ts
12627
+ var SLEW_DIVISOR = 16;
12628
+ var MAX_TIMER_MS = 2147483647;
12629
+ function scheduleLong(ms, onElapsed) {
12630
+ let remaining = Math.max(0, ms);
12631
+ let timer;
12632
+ const step = () => {
12633
+ const slice = Math.min(remaining, MAX_TIMER_MS);
12634
+ remaining -= slice;
12635
+ timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
12636
+ };
12637
+ step();
12638
+ return () => clearTimeout(timer);
12639
+ }
12640
+ function createLiveClock(source = () => Date.now()) {
12641
+ let lastSource = source();
12642
+ let offsetMs = 0;
12643
+ let slewCreditMs = 0;
12644
+ const now = () => {
12645
+ const observed = source();
12646
+ if (observed < lastSource) {
12647
+ offsetMs += lastSource - observed;
12648
+ } else if (offsetMs > 0) {
12649
+ slewCreditMs += observed - lastSource;
12650
+ const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
12651
+ if (repay > 0) {
12652
+ slewCreditMs -= repay * SLEW_DIVISOR;
12653
+ offsetMs -= Math.min(offsetMs, repay);
12654
+ }
12655
+ }
12656
+ lastSource = observed;
12657
+ return observed + offsetMs;
12658
+ };
12659
+ const sleep = (ms, signal) => new Promise((resolve, reject) => {
12660
+ if (signal?.aborted) {
12661
+ reject(signal.reason);
12662
+ return;
12663
+ }
12664
+ const cancel = scheduleLong(ms, () => {
12665
+ signal?.removeEventListener("abort", onAbort);
12666
+ resolve();
12667
+ });
12668
+ function onAbort() {
12669
+ cancel();
12670
+ reject(signal?.reason);
12671
+ }
12672
+ signal?.addEventListener("abort", onAbort, { once: true });
12673
+ });
12674
+ const deadline = (ms) => {
12675
+ const controller = new AbortController();
12676
+ const cancel = scheduleLong(
12677
+ ms,
12678
+ () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
12679
+ );
12680
+ return { signal: controller.signal, dispose: cancel };
12681
+ };
12682
+ return { now, sleep, deadline };
12683
+ }
12684
+ var liveClock = createLiveClock();
12685
+
12630
12686
  // src/runtime/auth.ts
12631
12687
  var CamundaAuthError = class extends Error {
12632
12688
  constructor(code, message, cause) {
@@ -12639,11 +12695,12 @@ var CamundaAuthError = class extends Error {
12639
12695
  cause;
12640
12696
  };
12641
12697
  var OAuthManager = class {
12642
- constructor(cfg, logger, tHooks, correlationProvider) {
12698
+ constructor(cfg, logger, tHooks, correlationProvider, clock = liveClock) {
12643
12699
  this.cfg = cfg;
12644
12700
  this.logger = logger;
12645
12701
  this.tHooks = tHooks;
12646
12702
  this.correlationProvider = correlationProvider;
12703
+ this.clock = clock;
12647
12704
  const hashBase = `${cfg.oauth.oauthUrl}|${cfg.oauth.clientId || ""}|${cfg.tokenAudience}|${cfg.oauth.scope || ""}`;
12648
12705
  this.storageKey = `camunda_oauth_token_cache_${this.simpleHash(hashBase)}`;
12649
12706
  this.session = this.isBrowser && typeof window.sessionStorage !== "undefined" ? window.sessionStorage : null;
@@ -12653,6 +12710,7 @@ var OAuthManager = class {
12653
12710
  logger;
12654
12711
  tHooks;
12655
12712
  correlationProvider;
12713
+ clock;
12656
12714
  refreshing = null;
12657
12715
  token = null;
12658
12716
  storageKey;
@@ -12669,7 +12727,7 @@ var OAuthManager = class {
12669
12727
  this.logger.debug(...args);
12670
12728
  }
12671
12729
  now() {
12672
- return Date.now();
12730
+ return this.clock.now();
12673
12731
  }
12674
12732
  loadPersisted() {
12675
12733
  if (this.session) {
@@ -12723,13 +12781,13 @@ var OAuthManager = class {
12723
12781
  return t.expires_at_epoch_ms;
12724
12782
  }
12725
12783
  shouldRefresh(t) {
12726
- const now2 = this.now();
12727
- if (now2 < t.obtained_at_epoch_ms - 3e4) {
12784
+ const now = this.now();
12785
+ if (now < t.obtained_at_epoch_ms - 3e4) {
12728
12786
  this.log("Clock skew backwards detected; invalidating token");
12729
12787
  return true;
12730
12788
  }
12731
12789
  const refreshLead = 5e3;
12732
- return now2 >= this.effectiveExpiry(t) - refreshLead;
12790
+ return now >= this.effectiveExpiry(t) - refreshLead;
12733
12791
  }
12734
12792
  async getToken(fetcher) {
12735
12793
  if (this.token && !this.shouldRefresh(this.token)) return this.token.access_token;
@@ -12784,9 +12842,11 @@ var OAuthManager = class {
12784
12842
  const base = this.cfg.oauth.retry.baseDelayMs || 1e3;
12785
12843
  let attempt = 0;
12786
12844
  let lastErr;
12845
+ const startedAt = liveClock.now();
12787
12846
  while (attempt < max) {
12788
12847
  const controller = new AbortController();
12789
- const timeout = setTimeout(() => controller.abort(), this.cfg.oauth.timeoutMs);
12848
+ const timeout = liveClock.deadline(this.cfg.oauth.timeoutMs);
12849
+ timeout.signal.addEventListener("abort", () => controller.abort(), { once: true });
12790
12850
  try {
12791
12851
  if (attempt === 0) {
12792
12852
  const evt = {
@@ -12809,7 +12869,7 @@ var OAuthManager = class {
12809
12869
  body: body.toString(),
12810
12870
  signal: controller.signal
12811
12871
  });
12812
- clearTimeout(timeout);
12872
+ timeout.dispose();
12813
12873
  if (!res.ok) {
12814
12874
  lastErr = new Error(`HTTP ${res.status}`);
12815
12875
  throw lastErr;
@@ -12820,15 +12880,15 @@ var OAuthManager = class {
12820
12880
  "TOKEN_PARSE_FAILED" /* TOKEN_PARSE_FAILED */,
12821
12881
  "Missing access_token or expires_in in response"
12822
12882
  );
12823
- const now2 = this.now();
12883
+ const now = this.now();
12824
12884
  const lifetimeMs = json.expires_in * 1e3;
12825
12885
  const skewBuffer = Math.max(3e4, Math.floor(lifetimeMs * 0.05));
12826
12886
  const entry = {
12827
12887
  access_token: json.access_token,
12828
12888
  token_type: json.token_type,
12829
12889
  scope: json.scope,
12830
- obtained_at_epoch_ms: now2,
12831
- expires_at_epoch_ms: now2 + lifetimeMs - skewBuffer,
12890
+ obtained_at_epoch_ms: now,
12891
+ expires_at_epoch_ms: now + lifetimeMs - skewBuffer,
12832
12892
  oauth_url: this.cfg.oauth.oauthUrl,
12833
12893
  client_id: this.cfg.oauth.clientId,
12834
12894
  audience: this.cfg.tokenAudience
@@ -12837,7 +12897,7 @@ var OAuthManager = class {
12837
12897
  this.persist();
12838
12898
  this.logger.info(
12839
12899
  "Token fetched; effective expiry (s)=",
12840
- Math.round((entry.expires_at_epoch_ms - now2) / 1e3)
12900
+ Math.round((entry.expires_at_epoch_ms - now) / 1e3)
12841
12901
  );
12842
12902
  try {
12843
12903
  const evt = {
@@ -12846,8 +12906,8 @@ var OAuthManager = class {
12846
12906
  audience: this.cfg.tokenAudience,
12847
12907
  endpoint: this.cfg.oauth.oauthUrl,
12848
12908
  cached: false,
12849
- durationMs: Date.now() - now2,
12850
- expiresInSec: Math.round((entry.expires_at_epoch_ms - now2) / 1e3),
12909
+ durationMs: liveClock.now() - startedAt,
12910
+ expiresInSec: Math.round((entry.expires_at_epoch_ms - now) / 1e3),
12851
12911
  scopes: entry.scope ? String(entry.scope).split(/\s+/) : void 0,
12852
12912
  correlationId: this.correlationProvider?.()
12853
12913
  };
@@ -12856,26 +12916,26 @@ var OAuthManager = class {
12856
12916
  }
12857
12917
  return entry.access_token;
12858
12918
  } catch (e) {
12859
- clearTimeout(timeout);
12919
+ timeout.dispose();
12860
12920
  lastErr = e;
12861
12921
  attempt++;
12862
12922
  if (attempt >= max) break;
12863
12923
  const delay = base * 2 ** (attempt - 1);
12864
12924
  const jitter = delay * 0.2 * (Math.random() - 0.5);
12865
- const sleep2 = delay + jitter;
12925
+ const sleep = delay + jitter;
12866
12926
  try {
12867
12927
  this.tHooks?.retry?.({
12868
12928
  type: "retry",
12869
12929
  ts: Date.now(),
12870
12930
  attempt,
12871
- nextDelayMs: Math.round(sleep2),
12931
+ nextDelayMs: Math.round(sleep),
12872
12932
  reason: lastErr?.message || "error",
12873
12933
  domain: "auth",
12874
12934
  correlationId: this.correlationProvider?.()
12875
12935
  });
12876
12936
  } catch {
12877
12937
  }
12878
- await new Promise((r) => setTimeout(r, sleep2));
12938
+ await this.clock.sleep(sleep);
12879
12939
  }
12880
12940
  }
12881
12941
  try {
@@ -12884,7 +12944,7 @@ var OAuthManager = class {
12884
12944
  ts: Date.now(),
12885
12945
  audience: this.cfg.tokenAudience,
12886
12946
  endpoint: this.cfg.oauth.oauthUrl,
12887
- durationMs: 0,
12947
+ durationMs: liveClock.now() - startedAt,
12888
12948
  status: lastErr?.message?.match(/HTTP (\d+)/)?.[1] ? parseInt(RegExp.$1, 10) : void 0,
12889
12949
  message: lastErr?.message || String(lastErr),
12890
12950
  correlationId: this.correlationProvider?.()
@@ -12949,7 +13009,13 @@ function createAuthFacade(config, opts) {
12949
13009
  let oauth = null;
12950
13010
  let basic = null;
12951
13011
  if (cfg.auth.strategy === "OAUTH")
12952
- oauth = new OAuthManager(cfg, authLogger.scope("oauth"), tHooks, opts?.correlationProvider);
13012
+ oauth = new OAuthManager(
13013
+ cfg,
13014
+ authLogger.scope("oauth"),
13015
+ tHooks,
13016
+ opts?.correlationProvider,
13017
+ opts?.clock ?? liveClock
13018
+ );
12953
13019
  else if (cfg.auth.strategy === "BASIC") basic = new BasicAuthManager(cfg);
12954
13020
  const fetcher = (input, init) => opts?.fetch ? opts.fetch(input, init) : fetch(input, init);
12955
13021
  let nodeAgent = null;
@@ -13893,11 +13959,9 @@ function toCancelable(factory) {
13893
13959
  };
13894
13960
  return p;
13895
13961
  }
13896
- function now() {
13897
- return Date.now();
13898
- }
13899
13962
  function eventualPoll(operationId, isGet, invoke, options) {
13900
13963
  const { waitUpToMs, predicate, onAttempt, onComplete, abortSignal, trace } = options;
13964
+ const clock = options.clock ?? liveClock;
13901
13965
  const elog = options.logger?.scope("eventual");
13902
13966
  const pollDefaultMs = hydrateConfig().config.eventual?.pollDefaultMs || 500;
13903
13967
  const userInterval = options.pollIntervalMs;
@@ -13915,7 +13979,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
13915
13979
  }
13916
13980
  return toCancelable((outerSignal) => {
13917
13981
  let attempts = 0;
13918
- const started = now();
13982
+ const started = clock.now();
13919
13983
  let cancelled = false;
13920
13984
  const abortImmediateStatuses = /* @__PURE__ */ new Set([400, 401, 403, 409, 422]);
13921
13985
  const externalAbort = () => {
@@ -13965,7 +14029,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
13965
14029
  } catch (e) {
13966
14030
  return settleErr(e);
13967
14031
  }
13968
- const elapsed = now() - started;
14032
+ const elapsed = clock.now() - started;
13969
14033
  const remaining = waitUpToMs - elapsed;
13970
14034
  if (ok) {
13971
14035
  onAttempt?.({
@@ -14007,11 +14071,15 @@ function eventualPoll(operationId, isGet, invoke, options) {
14007
14071
  elog?.debug?.(() => [
14008
14072
  `op=${operationId} attempt=${attempts} status=200 predicate=false nextDelay=${delay}ms remaining=${remaining}`
14009
14073
  ]);
14010
- setTimeout(() => loop(resolve, reject), delay);
14074
+ void clock.sleep(delay, outerSignal).then(
14075
+ () => loop(resolve, reject),
14076
+ () => {
14077
+ }
14078
+ );
14011
14079
  }).catch((err) => {
14012
14080
  if (cancelled || outerSignal.aborted) return settleErr(new Error("Cancelled"));
14013
14081
  const status = err?.status;
14014
- const elapsed = now() - started;
14082
+ const elapsed = clock.now() - started;
14015
14083
  const remaining = waitUpToMs - elapsed;
14016
14084
  if (status === 404 && isGet && remaining > 0) {
14017
14085
  const delay = Math.min(pollInterval, remaining);
@@ -14023,7 +14091,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
14023
14091
  predicateResult: false,
14024
14092
  nextDelayMs: delay
14025
14093
  });
14026
- return setTimeout(() => loop(resolve, reject), delay);
14094
+ void clock.sleep(delay, outerSignal).then(
14095
+ () => loop(resolve, reject),
14096
+ () => {
14097
+ }
14098
+ );
14099
+ return;
14027
14100
  }
14028
14101
  if (status === 429 && remaining > 0) {
14029
14102
  let delay = pollInterval * 2;
@@ -14043,7 +14116,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
14043
14116
  predicateResult: false,
14044
14117
  nextDelayMs: delay
14045
14118
  });
14046
- return setTimeout(() => loop(resolve, reject), delay);
14119
+ void clock.sleep(delay, outerSignal).then(
14120
+ () => loop(resolve, reject),
14121
+ () => {
14122
+ }
14123
+ );
14124
+ return;
14047
14125
  }
14048
14126
  if (status && (abortImmediateStatuses.has(status) || status >= 500))
14049
14127
  return settleErr(err);
@@ -14156,7 +14234,7 @@ function createLogger(opts = {}) {
14156
14234
  }
14157
14235
 
14158
14236
  // src/runtime/version.ts
14159
- var packageVersion = "10.0.0-alpha.39";
14237
+ var packageVersion = "10.0.0-alpha.40";
14160
14238
 
14161
14239
  // src/runtime/supportLogger.ts
14162
14240
  var NoopSupportLogger = class {
@@ -14882,11 +14960,9 @@ var ValidationManager = class {
14882
14960
  };
14883
14961
 
14884
14962
  // src/runtime/retry.ts
14885
- async function sleep(ms) {
14886
- return new Promise((r) => setTimeout(r, ms));
14887
- }
14888
14963
  function createRetryExecutor(opts) {
14889
14964
  const rand = opts.random || Math.random;
14965
+ const clock = opts.clock ?? liveClock;
14890
14966
  return async function execute(op, classify) {
14891
14967
  const { maxAttempts, baseDelayMs, maxDelayMs } = opts.policy;
14892
14968
  let attempt = 0;
@@ -14911,7 +14987,7 @@ function createRetryExecutor(opts) {
14911
14987
  ]);
14912
14988
  } catch {
14913
14989
  }
14914
- await sleep(delay);
14990
+ await clock.sleep(delay);
14915
14991
  }
14916
14992
  }
14917
14993
  throw lastErr;
@@ -14949,8 +15025,8 @@ function defaultHttpClassifier(err) {
14949
15025
  }
14950
15026
  return { retryable: false, reason: "non-retryable" };
14951
15027
  }
14952
- async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt) {
14953
- const exec = createRetryExecutor({ policy, logger, onAttempt });
15028
+ async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt, clock) {
15029
+ const exec = createRetryExecutor({ policy, logger, onAttempt, clock });
14954
15030
  return exec(fn, classify);
14955
15031
  }
14956
15032
 
@@ -15078,8 +15154,8 @@ var BackpressureManager = class {
15078
15154
  }
15079
15155
  recordBackpressure() {
15080
15156
  if (!this.cfg.enabled && !this.observeOnly) return;
15081
- const now2 = this.now();
15082
- this.lastEventAt = now2;
15157
+ const now = this.now();
15158
+ this.lastEventAt = now;
15083
15159
  this.consecutive++;
15084
15160
  this.healthySince = 0;
15085
15161
  if (!this.observeOnly) {
@@ -15115,8 +15191,8 @@ var BackpressureManager = class {
15115
15191
  this.backoffMs = 0;
15116
15192
  this.log("backoff.clear", { reason: "healthy-hint" });
15117
15193
  }
15118
- const now2 = this.now();
15119
- this.maybeRecover(now2);
15194
+ const now = this.now();
15195
+ this.maybeRecover(now);
15120
15196
  }
15121
15197
  scalePermits(factor) {
15122
15198
  if (this.permitsMax === null) return;
@@ -15126,16 +15202,16 @@ var BackpressureManager = class {
15126
15202
  this.log("permits.scale", { max: this.permitsMax });
15127
15203
  }
15128
15204
  }
15129
- maybeRecover(now2 = this.now()) {
15205
+ maybeRecover(now = this.now()) {
15130
15206
  if (this.permitsMax === null || this.observeOnly) return;
15131
- if (now2 - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
15132
- this.lastRecoverCheck = now2;
15133
- if (now2 - this.lastEventAt > this.cfg.decayQuietMs) {
15207
+ if (now - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
15208
+ this.lastRecoverCheck = now;
15209
+ if (now - this.lastEventAt > this.cfg.decayQuietMs) {
15134
15210
  const prev = this.severity;
15135
15211
  if (this.severity === "severe") this.severity = "soft";
15136
15212
  else if (this.severity === "soft") {
15137
15213
  this.severity = "healthy";
15138
- this.healthySince = now2;
15214
+ this.healthySince = now;
15139
15215
  }
15140
15216
  if (this.severity === "healthy") this.consecutive = 0;
15141
15217
  if (prev !== this.severity) {
@@ -15159,7 +15235,7 @@ var BackpressureManager = class {
15159
15235
  this.release();
15160
15236
  }
15161
15237
  } else {
15162
- if (this.healthySince > 0 && now2 - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
15238
+ if (this.healthySince > 0 && now - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
15163
15239
  this.permitsMax = null;
15164
15240
  this.permitsCurrent = 0;
15165
15241
  this.backoffMs = 0;
@@ -15188,66 +15264,6 @@ var BackpressureManager = class {
15188
15264
  }
15189
15265
  };
15190
15266
 
15191
- // src/runtime/clock.ts
15192
- var SLEW_DIVISOR = 16;
15193
- var MAX_TIMER_MS = 2147483647;
15194
- function scheduleLong(ms, onElapsed) {
15195
- let remaining = Math.max(0, ms);
15196
- let timer;
15197
- const step = () => {
15198
- const slice = Math.min(remaining, MAX_TIMER_MS);
15199
- remaining -= slice;
15200
- timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
15201
- };
15202
- step();
15203
- return () => clearTimeout(timer);
15204
- }
15205
- function createLiveClock(source = Date.now) {
15206
- let lastSource = source();
15207
- let offsetMs = 0;
15208
- let slewCreditMs = 0;
15209
- const now2 = () => {
15210
- const observed = source();
15211
- if (observed < lastSource) {
15212
- offsetMs += lastSource - observed;
15213
- } else if (offsetMs > 0) {
15214
- slewCreditMs += observed - lastSource;
15215
- const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
15216
- if (repay > 0) {
15217
- slewCreditMs -= repay * SLEW_DIVISOR;
15218
- offsetMs -= Math.min(offsetMs, repay);
15219
- }
15220
- }
15221
- lastSource = observed;
15222
- return observed + offsetMs;
15223
- };
15224
- const sleep2 = (ms, signal) => new Promise((resolve, reject) => {
15225
- if (signal?.aborted) {
15226
- reject(signal.reason);
15227
- return;
15228
- }
15229
- const cancel = scheduleLong(ms, () => {
15230
- signal?.removeEventListener("abort", onAbort);
15231
- resolve();
15232
- });
15233
- function onAbort() {
15234
- cancel();
15235
- reject(signal?.reason);
15236
- }
15237
- signal?.addEventListener("abort", onAbort, { once: true });
15238
- });
15239
- const deadline = (ms) => {
15240
- const controller = new AbortController();
15241
- const cancel = scheduleLong(
15242
- ms,
15243
- () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
15244
- );
15245
- return { signal: controller.signal, dispose: cancel };
15246
- };
15247
- return { now: now2, sleep: sleep2, deadline };
15248
- }
15249
- var liveClock = createLiveClock();
15250
-
15251
15267
  // src/runtime/typedVariables.ts
15252
15268
  var TypedVariablesError = class extends Error {
15253
15269
  constructor(message, options) {
@@ -15360,8 +15376,8 @@ var VariableCollector = class {
15360
15376
  }
15361
15377
  };
15362
15378
  var realClock = {
15363
- now: () => Date.now(),
15364
- sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
15379
+ now: () => liveClock.now(),
15380
+ sleep: (ms) => liveClock.sleep(ms)
15365
15381
  };
15366
15382
  async function collectAllPages(params) {
15367
15383
  const remaining = new Set(params.names);
@@ -15582,7 +15598,7 @@ var JobWorker = class {
15582
15598
  _name;
15583
15599
  _activeJobs = 0;
15584
15600
  _stopped = false;
15585
- _pollTimer = null;
15601
+ _pollWait = null;
15586
15602
  _inFlightActivation = null;
15587
15603
  // CancelablePromise-like
15588
15604
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
@@ -15656,8 +15672,8 @@ var JobWorker = class {
15656
15672
  }
15657
15673
  stop() {
15658
15674
  this._stopped = true;
15659
- if (this._pollTimer) clearTimeout(this._pollTimer);
15660
- this._pollTimer = null;
15675
+ this._pollWait?.abort();
15676
+ this._pollWait = null;
15661
15677
  if (this._inFlightActivation?.cancel) {
15662
15678
  try {
15663
15679
  this._inFlightActivation.cancel();
@@ -15676,8 +15692,8 @@ var JobWorker = class {
15676
15692
  {
15677
15693
  haltPolling: () => {
15678
15694
  this._stopped = true;
15679
- if (this._pollTimer) clearTimeout(this._pollTimer);
15680
- this._pollTimer = null;
15695
+ this._pollWait?.abort();
15696
+ this._pollWait = null;
15681
15697
  },
15682
15698
  activeJobs: () => this._activeJobs,
15683
15699
  inFlightActivation: () => this._inFlightActivation,
@@ -15688,10 +15704,18 @@ var JobWorker = class {
15688
15704
  }
15689
15705
  _scheduleNext(delayMs) {
15690
15706
  if (this._stopped) return;
15691
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
15707
+ const wait = new AbortController();
15708
+ this._pollWait = wait;
15709
+ void this._client.clock.sleep(delayMs, wait.signal).then(
15710
+ () => {
15711
+ if (this._pollWait === wait) this._pollWait = null;
15712
+ void this._poll();
15713
+ },
15714
+ () => {
15715
+ }
15716
+ );
15692
15717
  }
15693
15718
  async _poll() {
15694
- this._pollTimer = null;
15695
15719
  if (this._stopped) return;
15696
15720
  if (this._activeJobs >= this._maxParallelJobs) {
15697
15721
  this._scheduleNext(this._cfg.pollIntervalMs);
@@ -15884,7 +15908,7 @@ var ThreadedJobWorker = class {
15884
15908
  _name;
15885
15909
  _activeJobs = 0;
15886
15910
  _stopped = false;
15887
- _pollTimer = null;
15911
+ _pollWait = null;
15888
15912
  _inFlightActivation = null;
15889
15913
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
15890
15914
  _consecutiveActivationErrors = 0;
@@ -15966,8 +15990,8 @@ var ThreadedJobWorker = class {
15966
15990
  }
15967
15991
  stop() {
15968
15992
  this._stopped = true;
15969
- if (this._pollTimer) clearTimeout(this._pollTimer);
15970
- this._pollTimer = null;
15993
+ this._pollWait?.abort();
15994
+ this._pollWait = null;
15971
15995
  if (this._inFlightActivation?.cancel) {
15972
15996
  try {
15973
15997
  this._inFlightActivation.cancel();
@@ -15981,8 +16005,8 @@ var ThreadedJobWorker = class {
15981
16005
  {
15982
16006
  haltPolling: () => {
15983
16007
  this._stopped = true;
15984
- if (this._pollTimer) clearTimeout(this._pollTimer);
15985
- this._pollTimer = null;
16008
+ this._pollWait?.abort();
16009
+ this._pollWait = null;
15986
16010
  },
15987
16011
  activeJobs: () => this._activeJobs,
15988
16012
  inFlightActivation: () => this._inFlightActivation,
@@ -16078,10 +16102,18 @@ var ThreadedJobWorker = class {
16078
16102
  // ─── Polling (same pattern as JobWorker) ───
16079
16103
  _scheduleNext(delayMs) {
16080
16104
  if (this._stopped) return;
16081
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
16105
+ const wait = new AbortController();
16106
+ this._pollWait = wait;
16107
+ void this._client.clock.sleep(delayMs, wait.signal).then(
16108
+ () => {
16109
+ if (this._pollWait === wait) this._pollWait = null;
16110
+ void this._poll();
16111
+ },
16112
+ () => {
16113
+ }
16114
+ );
16082
16115
  }
16083
16116
  async _poll() {
16084
- this._pollTimer = null;
16085
16117
  if (this._stopped) return;
16086
16118
  await this._pool.ready;
16087
16119
  if (this._activeJobs >= this._maxParallelJobs) {
@@ -16666,7 +16698,7 @@ var CamundaClientBase = class {
16666
16698
  _validation = new ValidationManager({ req: "none", res: "none" });
16667
16699
  _log = createLogger();
16668
16700
  _bp;
16669
- _clock = liveClock;
16701
+ _clock;
16670
16702
  /** Registered job workers created via createJobWorker (lifecycle managed by user). */
16671
16703
  _workers = [];
16672
16704
  /** Shared thread pool for all threaded job workers (lazy-initialised on first use). */
@@ -16681,7 +16713,7 @@ var CamundaClientBase = class {
16681
16713
  _overrides = {};
16682
16714
  constructor(opts = {}) {
16683
16715
  if (opts.config) this._overrides = { ...opts.config };
16684
- this._clock = opts.clock ?? liveClock;
16716
+ this._clock = opts.clock ?? createLiveClock();
16685
16717
  const { config } = hydrateConfig({ overrides: this._overrides, env: opts.env });
16686
16718
  this._config = deepFreeze2(config);
16687
16719
  this._log = createLogger({
@@ -16740,6 +16772,7 @@ var CamundaClientBase = class {
16740
16772
  this._auth = createAuthFacade(this._config, {
16741
16773
  fetch: this._fetch,
16742
16774
  logger: this._log,
16775
+ clock: this._clock,
16743
16776
  telemetryHooks: opts.telemetry?.hooks,
16744
16777
  correlationProvider: opts.telemetry?.correlation || !opts.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
16745
16778
  });
@@ -16842,6 +16875,7 @@ var CamundaClientBase = class {
16842
16875
  this._auth = createAuthFacade(this._config, {
16843
16876
  fetch: this._fetch,
16844
16877
  logger: this._log,
16878
+ clock: this._clock,
16845
16879
  telemetryHooks: next.telemetry?.hooks,
16846
16880
  correlationProvider: next.telemetry?.correlation || !next.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
16847
16881
  });
@@ -16943,7 +16977,9 @@ var CamundaClientBase = class {
16943
16977
  this._bp.recordBackpressure();
16944
16978
  }
16945
16979
  return decision;
16946
- }
16980
+ },
16981
+ void 0,
16982
+ this._clock
16947
16983
  );
16948
16984
  this._bp.recordHealthyHint();
16949
16985
  return result;
@@ -20875,7 +20911,7 @@ var CamundaClientBase = class {
20875
20911
  }
20876
20912
  };
20877
20913
  const invoke = () => toCancelable2(() => call());
20878
- if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log });
20914
+ if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
20879
20915
  return invoke();
20880
20916
  });
20881
20917
  }
@@ -20933,7 +20969,7 @@ var CamundaClientBase = class {
20933
20969
  }
20934
20970
  };
20935
20971
  const invoke = () => toCancelable2(() => call());
20936
- if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log });
20972
+ if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
20937
20973
  return invoke();
20938
20974
  });
20939
20975
  }
@@ -20991,7 +21027,7 @@ var CamundaClientBase = class {
20991
21027
  }
20992
21028
  };
20993
21029
  const invoke = () => toCancelable2(() => call());
20994
- if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log });
21030
+ if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
20995
21031
  return invoke();
20996
21032
  });
20997
21033
  }
@@ -21092,7 +21128,7 @@ var CamundaClientBase = class {
21092
21128
  }
21093
21129
  };
21094
21130
  const invoke = () => toCancelable2(() => call());
21095
- if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log });
21131
+ if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21096
21132
  return invoke();
21097
21133
  });
21098
21134
  }
@@ -21150,7 +21186,7 @@ var CamundaClientBase = class {
21150
21186
  }
21151
21187
  };
21152
21188
  const invoke = () => toCancelable2(() => call());
21153
- if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log });
21189
+ if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21154
21190
  return invoke();
21155
21191
  });
21156
21192
  }
@@ -21380,7 +21416,7 @@ var CamundaClientBase = class {
21380
21416
  }
21381
21417
  };
21382
21418
  const invoke = () => toCancelable2(() => call());
21383
- if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log });
21419
+ if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21384
21420
  return invoke();
21385
21421
  });
21386
21422
  }
@@ -21438,7 +21474,7 @@ var CamundaClientBase = class {
21438
21474
  }
21439
21475
  };
21440
21476
  const invoke = () => toCancelable2(() => call());
21441
- if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
21477
+ if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21442
21478
  return invoke();
21443
21479
  });
21444
21480
  }
@@ -21496,7 +21532,7 @@ var CamundaClientBase = class {
21496
21532
  }
21497
21533
  };
21498
21534
  const invoke = () => toCancelable2(() => call());
21499
- if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log });
21535
+ if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21500
21536
  return invoke();
21501
21537
  });
21502
21538
  }
@@ -21554,7 +21590,7 @@ var CamundaClientBase = class {
21554
21590
  }
21555
21591
  };
21556
21592
  const invoke = () => toCancelable2(() => call());
21557
- if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log });
21593
+ if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21558
21594
  return invoke();
21559
21595
  });
21560
21596
  }
@@ -21612,7 +21648,7 @@ var CamundaClientBase = class {
21612
21648
  }
21613
21649
  };
21614
21650
  const invoke = () => toCancelable2(() => call());
21615
- if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log });
21651
+ if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21616
21652
  return invoke();
21617
21653
  });
21618
21654
  }
@@ -21730,7 +21766,7 @@ var CamundaClientBase = class {
21730
21766
  }
21731
21767
  };
21732
21768
  const invoke = () => toCancelable2(() => call());
21733
- if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log });
21769
+ if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21734
21770
  return invoke();
21735
21771
  });
21736
21772
  }
@@ -21831,7 +21867,7 @@ var CamundaClientBase = class {
21831
21867
  }
21832
21868
  };
21833
21869
  const invoke = () => toCancelable2(() => call());
21834
- if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log });
21870
+ if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21835
21871
  return invoke();
21836
21872
  });
21837
21873
  }
@@ -21889,7 +21925,7 @@ var CamundaClientBase = class {
21889
21925
  }
21890
21926
  };
21891
21927
  const invoke = () => toCancelable2(() => call());
21892
- if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
21928
+ if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21893
21929
  return invoke();
21894
21930
  });
21895
21931
  }
@@ -21947,7 +21983,7 @@ var CamundaClientBase = class {
21947
21983
  }
21948
21984
  };
21949
21985
  const invoke = () => toCancelable2(() => call());
21950
- if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log });
21986
+ if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
21951
21987
  return invoke();
21952
21988
  });
21953
21989
  }
@@ -22005,7 +22041,7 @@ var CamundaClientBase = class {
22005
22041
  }
22006
22042
  };
22007
22043
  const invoke = () => toCancelable2(() => call());
22008
- if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log });
22044
+ if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22009
22045
  return invoke();
22010
22046
  });
22011
22047
  }
@@ -22063,7 +22099,7 @@ var CamundaClientBase = class {
22063
22099
  }
22064
22100
  };
22065
22101
  const invoke = () => toCancelable2(() => call());
22066
- if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log });
22102
+ if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22067
22103
  return invoke();
22068
22104
  });
22069
22105
  }
@@ -22235,7 +22271,7 @@ var CamundaClientBase = class {
22235
22271
  }
22236
22272
  };
22237
22273
  const invoke = () => toCancelable2(() => call());
22238
- if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log });
22274
+ if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22239
22275
  return invoke();
22240
22276
  });
22241
22277
  }
@@ -22293,7 +22329,7 @@ var CamundaClientBase = class {
22293
22329
  }
22294
22330
  };
22295
22331
  const invoke = () => toCancelable2(() => call());
22296
- if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log });
22332
+ if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22297
22333
  return invoke();
22298
22334
  });
22299
22335
  }
@@ -22351,7 +22387,7 @@ var CamundaClientBase = class {
22351
22387
  }
22352
22388
  };
22353
22389
  const invoke = () => toCancelable2(() => call());
22354
- if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log });
22390
+ if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22355
22391
  return invoke();
22356
22392
  });
22357
22393
  }
@@ -22409,7 +22445,7 @@ var CamundaClientBase = class {
22409
22445
  }
22410
22446
  };
22411
22447
  const invoke = () => toCancelable2(() => call());
22412
- if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log });
22448
+ if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22413
22449
  return invoke();
22414
22450
  });
22415
22451
  }
@@ -22467,7 +22503,7 @@ var CamundaClientBase = class {
22467
22503
  }
22468
22504
  };
22469
22505
  const invoke = () => toCancelable2(() => call());
22470
- if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log });
22506
+ if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22471
22507
  return invoke();
22472
22508
  });
22473
22509
  }
@@ -22568,7 +22604,7 @@ var CamundaClientBase = class {
22568
22604
  }
22569
22605
  };
22570
22606
  const invoke = () => toCancelable2(() => call());
22571
- if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log });
22607
+ if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22572
22608
  return invoke();
22573
22609
  });
22574
22610
  }
@@ -22626,7 +22662,7 @@ var CamundaClientBase = class {
22626
22662
  }
22627
22663
  };
22628
22664
  const invoke = () => toCancelable2(() => call());
22629
- if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log });
22665
+ if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22630
22666
  return invoke();
22631
22667
  });
22632
22668
  }
@@ -22684,7 +22720,7 @@ var CamundaClientBase = class {
22684
22720
  }
22685
22721
  };
22686
22722
  const invoke = () => toCancelable2(() => call());
22687
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log });
22723
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22688
22724
  return invoke();
22689
22725
  });
22690
22726
  }
@@ -22742,7 +22778,7 @@ var CamundaClientBase = class {
22742
22778
  }
22743
22779
  };
22744
22780
  const invoke = () => toCancelable2(() => call());
22745
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22781
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22746
22782
  return invoke();
22747
22783
  });
22748
22784
  }
@@ -22800,7 +22836,7 @@ var CamundaClientBase = class {
22800
22836
  }
22801
22837
  };
22802
22838
  const invoke = () => toCancelable2(() => call());
22803
- if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22839
+ if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22804
22840
  return invoke();
22805
22841
  });
22806
22842
  }
@@ -22864,7 +22900,7 @@ var CamundaClientBase = class {
22864
22900
  }
22865
22901
  };
22866
22902
  const invoke = () => toCancelable2(() => call());
22867
- if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log });
22903
+ if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22868
22904
  return invoke();
22869
22905
  });
22870
22906
  }
@@ -22922,7 +22958,7 @@ var CamundaClientBase = class {
22922
22958
  }
22923
22959
  };
22924
22960
  const invoke = () => toCancelable2(() => call());
22925
- if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
22961
+ if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22926
22962
  return invoke();
22927
22963
  });
22928
22964
  }
@@ -22980,7 +23016,7 @@ var CamundaClientBase = class {
22980
23016
  }
22981
23017
  };
22982
23018
  const invoke = () => toCancelable2(() => call());
22983
- if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log });
23019
+ if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
22984
23020
  return invoke();
22985
23021
  });
22986
23022
  }
@@ -23038,7 +23074,7 @@ var CamundaClientBase = class {
23038
23074
  }
23039
23075
  };
23040
23076
  const invoke = () => toCancelable2(() => call());
23041
- if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log });
23077
+ if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23042
23078
  return invoke();
23043
23079
  });
23044
23080
  }
@@ -23096,7 +23132,7 @@ var CamundaClientBase = class {
23096
23132
  }
23097
23133
  };
23098
23134
  const invoke = () => toCancelable2(() => call());
23099
- if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log });
23135
+ if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23100
23136
  return invoke();
23101
23137
  });
23102
23138
  }
@@ -23154,7 +23190,7 @@ var CamundaClientBase = class {
23154
23190
  }
23155
23191
  };
23156
23192
  const invoke = () => toCancelable2(() => call());
23157
- if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log });
23193
+ if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23158
23194
  return invoke();
23159
23195
  });
23160
23196
  }
@@ -23212,7 +23248,7 @@ var CamundaClientBase = class {
23212
23248
  }
23213
23249
  };
23214
23250
  const invoke = () => toCancelable2(() => call());
23215
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log });
23251
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23216
23252
  return invoke();
23217
23253
  });
23218
23254
  }
@@ -23270,7 +23306,7 @@ var CamundaClientBase = class {
23270
23306
  }
23271
23307
  };
23272
23308
  const invoke = () => toCancelable2(() => call());
23273
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log });
23309
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23274
23310
  return invoke();
23275
23311
  });
23276
23312
  }
@@ -23328,7 +23364,7 @@ var CamundaClientBase = class {
23328
23364
  }
23329
23365
  };
23330
23366
  const invoke = () => toCancelable2(() => call());
23331
- if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log });
23367
+ if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23332
23368
  return invoke();
23333
23369
  });
23334
23370
  }
@@ -23386,7 +23422,7 @@ var CamundaClientBase = class {
23386
23422
  }
23387
23423
  };
23388
23424
  const invoke = () => toCancelable2(() => call());
23389
- if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log });
23425
+ if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23390
23426
  return invoke();
23391
23427
  });
23392
23428
  }
@@ -23444,7 +23480,7 @@ var CamundaClientBase = class {
23444
23480
  }
23445
23481
  };
23446
23482
  const invoke = () => toCancelable2(() => call());
23447
- if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log });
23483
+ if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23448
23484
  return invoke();
23449
23485
  });
23450
23486
  }
@@ -23502,7 +23538,7 @@ var CamundaClientBase = class {
23502
23538
  }
23503
23539
  };
23504
23540
  const invoke = () => toCancelable2(() => call());
23505
- if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log });
23541
+ if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23506
23542
  return invoke();
23507
23543
  });
23508
23544
  }
@@ -23603,7 +23639,7 @@ var CamundaClientBase = class {
23603
23639
  }
23604
23640
  };
23605
23641
  const invoke = () => toCancelable2(() => call());
23606
- if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log });
23642
+ if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23607
23643
  return invoke();
23608
23644
  });
23609
23645
  }
@@ -23872,7 +23908,7 @@ var CamundaClientBase = class {
23872
23908
  }
23873
23909
  };
23874
23910
  const invoke = () => toCancelable2(() => call());
23875
- if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log });
23911
+ if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
23876
23912
  return invoke();
23877
23913
  });
23878
23914
  }
@@ -24016,7 +24052,7 @@ var CamundaClientBase = class {
24016
24052
  }
24017
24053
  };
24018
24054
  const invoke = () => toCancelable2(() => call());
24019
- if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log });
24055
+ if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24020
24056
  return invoke();
24021
24057
  });
24022
24058
  }
@@ -24074,7 +24110,7 @@ var CamundaClientBase = class {
24074
24110
  }
24075
24111
  };
24076
24112
  const invoke = () => toCancelable2(() => call());
24077
- if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
24113
+ if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24078
24114
  return invoke();
24079
24115
  });
24080
24116
  }
@@ -24175,7 +24211,7 @@ var CamundaClientBase = class {
24175
24211
  }
24176
24212
  };
24177
24213
  const invoke = () => toCancelable2(() => call());
24178
- if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log });
24214
+ if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24179
24215
  return invoke();
24180
24216
  });
24181
24217
  }
@@ -24233,7 +24269,7 @@ var CamundaClientBase = class {
24233
24269
  }
24234
24270
  };
24235
24271
  const invoke = () => toCancelable2(() => call());
24236
- if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log });
24272
+ if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24237
24273
  return invoke();
24238
24274
  });
24239
24275
  }
@@ -24291,7 +24327,7 @@ var CamundaClientBase = class {
24291
24327
  }
24292
24328
  };
24293
24329
  const invoke = () => toCancelable2(() => call());
24294
- if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log });
24330
+ if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24295
24331
  return invoke();
24296
24332
  });
24297
24333
  }
@@ -24349,7 +24385,7 @@ var CamundaClientBase = class {
24349
24385
  }
24350
24386
  };
24351
24387
  const invoke = () => toCancelable2(() => call());
24352
- if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log });
24388
+ if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24353
24389
  return invoke();
24354
24390
  });
24355
24391
  }
@@ -24407,7 +24443,7 @@ var CamundaClientBase = class {
24407
24443
  }
24408
24444
  };
24409
24445
  const invoke = () => toCancelable2(() => call());
24410
- if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log });
24446
+ if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
24411
24447
  return invoke();
24412
24448
  });
24413
24449
  }
@@ -25828,7 +25864,7 @@ var CamundaClientBase = class {
25828
25864
  }
25829
25865
  };
25830
25866
  const invoke = () => toCancelable2(() => call());
25831
- if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log });
25867
+ if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
25832
25868
  return invoke();
25833
25869
  });
25834
25870
  }
@@ -25892,7 +25928,7 @@ var CamundaClientBase = class {
25892
25928
  }
25893
25929
  };
25894
25930
  const invoke = () => toCancelable2(() => call());
25895
- if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log });
25931
+ if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
25896
25932
  return invoke();
25897
25933
  });
25898
25934
  }
@@ -25950,7 +25986,7 @@ var CamundaClientBase = class {
25950
25986
  }
25951
25987
  };
25952
25988
  const invoke = () => toCancelable2(() => call());
25953
- if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log });
25989
+ if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
25954
25990
  return invoke();
25955
25991
  });
25956
25992
  }
@@ -26008,7 +26044,7 @@ var CamundaClientBase = class {
26008
26044
  }
26009
26045
  };
26010
26046
  const invoke = () => toCancelable2(() => call());
26011
- if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
26047
+ if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26012
26048
  return invoke();
26013
26049
  });
26014
26050
  }
@@ -26066,7 +26102,7 @@ var CamundaClientBase = class {
26066
26102
  }
26067
26103
  };
26068
26104
  const invoke = () => toCancelable2(() => call());
26069
- if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
26105
+ if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26070
26106
  return invoke();
26071
26107
  });
26072
26108
  }
@@ -26124,7 +26160,7 @@ var CamundaClientBase = class {
26124
26160
  }
26125
26161
  };
26126
26162
  const invoke = () => toCancelable2(() => call());
26127
- if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log });
26163
+ if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26128
26164
  return invoke();
26129
26165
  });
26130
26166
  }
@@ -26182,7 +26218,7 @@ var CamundaClientBase = class {
26182
26218
  }
26183
26219
  };
26184
26220
  const invoke = () => toCancelable2(() => call());
26185
- if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log });
26221
+ if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26186
26222
  return invoke();
26187
26223
  });
26188
26224
  }
@@ -26246,7 +26282,7 @@ var CamundaClientBase = class {
26246
26282
  }
26247
26283
  };
26248
26284
  const invoke = () => toCancelable2(() => call());
26249
- if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log });
26285
+ if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26250
26286
  return invoke();
26251
26287
  });
26252
26288
  }
@@ -26310,7 +26346,7 @@ var CamundaClientBase = class {
26310
26346
  }
26311
26347
  };
26312
26348
  const invoke = () => toCancelable2(() => call());
26313
- if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log });
26349
+ if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26314
26350
  return invoke();
26315
26351
  });
26316
26352
  }
@@ -26374,7 +26410,7 @@ var CamundaClientBase = class {
26374
26410
  }
26375
26411
  };
26376
26412
  const invoke = () => toCancelable2(() => call());
26377
- if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log });
26413
+ if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26378
26414
  return invoke();
26379
26415
  });
26380
26416
  }
@@ -26438,7 +26474,7 @@ var CamundaClientBase = class {
26438
26474
  }
26439
26475
  };
26440
26476
  const invoke = () => toCancelable2(() => call());
26441
- if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log });
26477
+ if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26442
26478
  return invoke();
26443
26479
  });
26444
26480
  }
@@ -26496,7 +26532,7 @@ var CamundaClientBase = class {
26496
26532
  }
26497
26533
  };
26498
26534
  const invoke = () => toCancelable2(() => call());
26499
- if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
26535
+ if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26500
26536
  return invoke();
26501
26537
  });
26502
26538
  }
@@ -26554,7 +26590,7 @@ var CamundaClientBase = class {
26554
26590
  }
26555
26591
  };
26556
26592
  const invoke = () => toCancelable2(() => call());
26557
- if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log });
26593
+ if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26558
26594
  return invoke();
26559
26595
  });
26560
26596
  }
@@ -26612,7 +26648,7 @@ var CamundaClientBase = class {
26612
26648
  }
26613
26649
  };
26614
26650
  const invoke = () => toCancelable2(() => call());
26615
- if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log });
26651
+ if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26616
26652
  return invoke();
26617
26653
  });
26618
26654
  }
@@ -26670,7 +26706,7 @@ var CamundaClientBase = class {
26670
26706
  }
26671
26707
  };
26672
26708
  const invoke = () => toCancelable2(() => call());
26673
- if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log });
26709
+ if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26674
26710
  return invoke();
26675
26711
  });
26676
26712
  }
@@ -26734,7 +26770,7 @@ var CamundaClientBase = class {
26734
26770
  }
26735
26771
  };
26736
26772
  const invoke = () => toCancelable2(() => call());
26737
- if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
26773
+ if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26738
26774
  return invoke();
26739
26775
  });
26740
26776
  }
@@ -26792,7 +26828,7 @@ var CamundaClientBase = class {
26792
26828
  }
26793
26829
  };
26794
26830
  const invoke = () => toCancelable2(() => call());
26795
- if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log });
26831
+ if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26796
26832
  return invoke();
26797
26833
  });
26798
26834
  }
@@ -26850,7 +26886,7 @@ var CamundaClientBase = class {
26850
26886
  }
26851
26887
  };
26852
26888
  const invoke = () => toCancelable2(() => call());
26853
- if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log });
26889
+ if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26854
26890
  return invoke();
26855
26891
  });
26856
26892
  }
@@ -26908,7 +26944,7 @@ var CamundaClientBase = class {
26908
26944
  }
26909
26945
  };
26910
26946
  const invoke = () => toCancelable2(() => call());
26911
- if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log });
26947
+ if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26912
26948
  return invoke();
26913
26949
  });
26914
26950
  }
@@ -26972,7 +27008,7 @@ var CamundaClientBase = class {
26972
27008
  }
26973
27009
  };
26974
27010
  const invoke = () => toCancelable2(() => call());
26975
- if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log });
27011
+ if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
26976
27012
  return invoke();
26977
27013
  });
26978
27014
  }
@@ -27030,7 +27066,7 @@ var CamundaClientBase = class {
27030
27066
  }
27031
27067
  };
27032
27068
  const invoke = () => toCancelable2(() => call());
27033
- if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log });
27069
+ if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27034
27070
  return invoke();
27035
27071
  });
27036
27072
  }
@@ -27094,7 +27130,7 @@ var CamundaClientBase = class {
27094
27130
  }
27095
27131
  };
27096
27132
  const invoke = () => toCancelable2(() => call());
27097
- if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log });
27133
+ if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27098
27134
  return invoke();
27099
27135
  });
27100
27136
  }
@@ -27152,7 +27188,7 @@ var CamundaClientBase = class {
27152
27188
  }
27153
27189
  };
27154
27190
  const invoke = () => toCancelable2(() => call());
27155
- if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log });
27191
+ if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27156
27192
  return invoke();
27157
27193
  });
27158
27194
  }
@@ -27210,7 +27246,7 @@ var CamundaClientBase = class {
27210
27246
  }
27211
27247
  };
27212
27248
  const invoke = () => toCancelable2(() => call());
27213
- if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log });
27249
+ if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27214
27250
  return invoke();
27215
27251
  });
27216
27252
  }
@@ -27268,7 +27304,7 @@ var CamundaClientBase = class {
27268
27304
  }
27269
27305
  };
27270
27306
  const invoke = () => toCancelable2(() => call());
27271
- if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log });
27307
+ if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27272
27308
  return invoke();
27273
27309
  });
27274
27310
  }
@@ -27332,7 +27368,7 @@ var CamundaClientBase = class {
27332
27368
  }
27333
27369
  };
27334
27370
  const invoke = () => toCancelable2(() => call());
27335
- if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log });
27371
+ if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27336
27372
  return invoke();
27337
27373
  });
27338
27374
  }
@@ -27396,7 +27432,7 @@ var CamundaClientBase = class {
27396
27432
  }
27397
27433
  };
27398
27434
  const invoke = () => toCancelable2(() => call());
27399
- if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log });
27435
+ if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27400
27436
  return invoke();
27401
27437
  });
27402
27438
  }
@@ -27460,7 +27496,7 @@ var CamundaClientBase = class {
27460
27496
  }
27461
27497
  };
27462
27498
  const invoke = () => toCancelable2(() => call());
27463
- if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log });
27499
+ if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27464
27500
  return invoke();
27465
27501
  });
27466
27502
  }
@@ -27518,7 +27554,7 @@ var CamundaClientBase = class {
27518
27554
  }
27519
27555
  };
27520
27556
  const invoke = () => toCancelable2(() => call());
27521
- if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
27557
+ if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27522
27558
  return invoke();
27523
27559
  });
27524
27560
  }
@@ -27576,7 +27612,7 @@ var CamundaClientBase = class {
27576
27612
  }
27577
27613
  };
27578
27614
  const invoke = () => toCancelable2(() => call());
27579
- if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
27615
+ if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27580
27616
  return invoke();
27581
27617
  });
27582
27618
  }
@@ -27634,7 +27670,7 @@ var CamundaClientBase = class {
27634
27670
  }
27635
27671
  };
27636
27672
  const invoke = () => toCancelable2(() => call());
27637
- if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log });
27673
+ if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27638
27674
  return invoke();
27639
27675
  });
27640
27676
  }
@@ -27698,7 +27734,7 @@ var CamundaClientBase = class {
27698
27734
  }
27699
27735
  };
27700
27736
  const invoke = () => toCancelable2(() => call());
27701
- if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log });
27737
+ if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27702
27738
  return invoke();
27703
27739
  });
27704
27740
  }
@@ -27762,7 +27798,7 @@ var CamundaClientBase = class {
27762
27798
  }
27763
27799
  };
27764
27800
  const invoke = () => toCancelable2(() => call());
27765
- if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
27801
+ if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27766
27802
  return invoke();
27767
27803
  });
27768
27804
  }
@@ -27820,7 +27856,7 @@ var CamundaClientBase = class {
27820
27856
  }
27821
27857
  };
27822
27858
  const invoke = () => toCancelable2(() => call());
27823
- if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log });
27859
+ if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27824
27860
  return invoke();
27825
27861
  });
27826
27862
  }
@@ -27878,7 +27914,7 @@ var CamundaClientBase = class {
27878
27914
  }
27879
27915
  };
27880
27916
  const invoke = () => toCancelable2(() => call());
27881
- if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log });
27917
+ if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27882
27918
  return invoke();
27883
27919
  });
27884
27920
  }
@@ -27936,7 +27972,7 @@ var CamundaClientBase = class {
27936
27972
  }
27937
27973
  };
27938
27974
  const invoke = () => toCancelable2(() => call());
27939
- if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log });
27975
+ if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
27940
27976
  return invoke();
27941
27977
  });
27942
27978
  }
@@ -28000,7 +28036,7 @@ var CamundaClientBase = class {
28000
28036
  }
28001
28037
  };
28002
28038
  const invoke = () => toCancelable2(() => call());
28003
- if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log });
28039
+ if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28004
28040
  return invoke();
28005
28041
  });
28006
28042
  }
@@ -28064,7 +28100,7 @@ var CamundaClientBase = class {
28064
28100
  }
28065
28101
  };
28066
28102
  const invoke = () => toCancelable2(() => call());
28067
- if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log });
28103
+ if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28068
28104
  return invoke();
28069
28105
  });
28070
28106
  }
@@ -28122,7 +28158,7 @@ var CamundaClientBase = class {
28122
28158
  }
28123
28159
  };
28124
28160
  const invoke = () => toCancelable2(() => call());
28125
- if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log });
28161
+ if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28126
28162
  return invoke();
28127
28163
  });
28128
28164
  }
@@ -28180,7 +28216,7 @@ var CamundaClientBase = class {
28180
28216
  }
28181
28217
  };
28182
28218
  const invoke = () => toCancelable2(() => call());
28183
- if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log });
28219
+ if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28184
28220
  return invoke();
28185
28221
  });
28186
28222
  }
@@ -28244,7 +28280,7 @@ var CamundaClientBase = class {
28244
28280
  }
28245
28281
  };
28246
28282
  const invoke = () => toCancelable2(() => call());
28247
- if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log });
28283
+ if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28248
28284
  return invoke();
28249
28285
  });
28250
28286
  }
@@ -28308,7 +28344,7 @@ var CamundaClientBase = class {
28308
28344
  }
28309
28345
  };
28310
28346
  const invoke = () => toCancelable2(() => call());
28311
- if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log });
28347
+ if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28312
28348
  return invoke();
28313
28349
  });
28314
28350
  }
@@ -28372,7 +28408,7 @@ var CamundaClientBase = class {
28372
28408
  }
28373
28409
  };
28374
28410
  const invoke = () => toCancelable2(() => call());
28375
- if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log });
28411
+ if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28376
28412
  return invoke();
28377
28413
  });
28378
28414
  }
@@ -28436,7 +28472,7 @@ var CamundaClientBase = class {
28436
28472
  }
28437
28473
  };
28438
28474
  const invoke = () => toCancelable2(() => call());
28439
- if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
28475
+ if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28440
28476
  return invoke();
28441
28477
  });
28442
28478
  }
@@ -28506,7 +28542,7 @@ var CamundaClientBase = class {
28506
28542
  }
28507
28543
  };
28508
28544
  const invoke = () => toCancelable2(() => call());
28509
- if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log });
28545
+ if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28510
28546
  return invoke();
28511
28547
  });
28512
28548
  }
@@ -28564,7 +28600,7 @@ var CamundaClientBase = class {
28564
28600
  }
28565
28601
  };
28566
28602
  const invoke = () => toCancelable2(() => call());
28567
- if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log });
28603
+ if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28568
28604
  return invoke();
28569
28605
  });
28570
28606
  }
@@ -28634,7 +28670,7 @@ var CamundaClientBase = class {
28634
28670
  }
28635
28671
  };
28636
28672
  const invoke = () => toCancelable2(() => call());
28637
- if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log });
28673
+ if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28638
28674
  return invoke();
28639
28675
  });
28640
28676
  }
@@ -28698,7 +28734,7 @@ var CamundaClientBase = class {
28698
28734
  }
28699
28735
  };
28700
28736
  const invoke = () => toCancelable2(() => call());
28701
- if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log });
28737
+ if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
28702
28738
  return invoke();
28703
28739
  });
28704
28740
  }