@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.
@@ -5,6 +5,66 @@ import {
5
5
  __require
6
6
  } from "./chunk-DGUM43GV.js";
7
7
 
8
+ // src/runtime/clock.ts
9
+ var SLEW_DIVISOR = 16;
10
+ var MAX_TIMER_MS = 2147483647;
11
+ function scheduleLong(ms, onElapsed) {
12
+ let remaining = Math.max(0, ms);
13
+ let timer;
14
+ const step = () => {
15
+ const slice = Math.min(remaining, MAX_TIMER_MS);
16
+ remaining -= slice;
17
+ timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
18
+ };
19
+ step();
20
+ return () => clearTimeout(timer);
21
+ }
22
+ function createLiveClock(source = () => Date.now()) {
23
+ let lastSource = source();
24
+ let offsetMs = 0;
25
+ let slewCreditMs = 0;
26
+ const now = () => {
27
+ const observed = source();
28
+ if (observed < lastSource) {
29
+ offsetMs += lastSource - observed;
30
+ } else if (offsetMs > 0) {
31
+ slewCreditMs += observed - lastSource;
32
+ const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
33
+ if (repay > 0) {
34
+ slewCreditMs -= repay * SLEW_DIVISOR;
35
+ offsetMs -= Math.min(offsetMs, repay);
36
+ }
37
+ }
38
+ lastSource = observed;
39
+ return observed + offsetMs;
40
+ };
41
+ const sleep = (ms, signal) => new Promise((resolve, reject) => {
42
+ if (signal?.aborted) {
43
+ reject(signal.reason);
44
+ return;
45
+ }
46
+ const cancel = scheduleLong(ms, () => {
47
+ signal?.removeEventListener("abort", onAbort);
48
+ resolve();
49
+ });
50
+ function onAbort() {
51
+ cancel();
52
+ reject(signal?.reason);
53
+ }
54
+ signal?.addEventListener("abort", onAbort, { once: true });
55
+ });
56
+ const deadline = (ms) => {
57
+ const controller = new AbortController();
58
+ const cancel = scheduleLong(
59
+ ms,
60
+ () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
61
+ );
62
+ return { signal: controller.signal, dispose: cancel };
63
+ };
64
+ return { now, sleep, deadline };
65
+ }
66
+ var liveClock = createLiveClock();
67
+
8
68
  // src/runtime/errors.ts
9
69
  function isSdkError(e) {
10
70
  return !!e && typeof e === "object" && "name" in e && [
@@ -111,66 +171,6 @@ var EventualConsistencyTimeoutError = class extends Error {
111
171
  }
112
172
  };
113
173
 
114
- // src/runtime/clock.ts
115
- var SLEW_DIVISOR = 16;
116
- var MAX_TIMER_MS = 2147483647;
117
- function scheduleLong(ms, onElapsed) {
118
- let remaining = Math.max(0, ms);
119
- let timer;
120
- const step = () => {
121
- const slice = Math.min(remaining, MAX_TIMER_MS);
122
- remaining -= slice;
123
- timer = setTimeout(remaining > 0 ? step : onElapsed, slice);
124
- };
125
- step();
126
- return () => clearTimeout(timer);
127
- }
128
- function createLiveClock(source = Date.now) {
129
- let lastSource = source();
130
- let offsetMs = 0;
131
- let slewCreditMs = 0;
132
- const now2 = () => {
133
- const observed = source();
134
- if (observed < lastSource) {
135
- offsetMs += lastSource - observed;
136
- } else if (offsetMs > 0) {
137
- slewCreditMs += observed - lastSource;
138
- const repay = Math.floor(slewCreditMs / SLEW_DIVISOR);
139
- if (repay > 0) {
140
- slewCreditMs -= repay * SLEW_DIVISOR;
141
- offsetMs -= Math.min(offsetMs, repay);
142
- }
143
- }
144
- lastSource = observed;
145
- return observed + offsetMs;
146
- };
147
- const sleep2 = (ms, signal) => new Promise((resolve, reject) => {
148
- if (signal?.aborted) {
149
- reject(signal.reason);
150
- return;
151
- }
152
- const cancel = scheduleLong(ms, () => {
153
- signal?.removeEventListener("abort", onAbort);
154
- resolve();
155
- });
156
- function onAbort() {
157
- cancel();
158
- reject(signal?.reason);
159
- }
160
- signal?.addEventListener("abort", onAbort, { once: true });
161
- });
162
- const deadline = (ms) => {
163
- const controller = new AbortController();
164
- const cancel = scheduleLong(
165
- ms,
166
- () => controller.abort(new DOMException(`Timed out after ${ms}ms`, "TimeoutError"))
167
- );
168
- return { signal: controller.signal, dispose: cancel };
169
- };
170
- return { now: now2, sleep: sleep2, deadline };
171
- }
172
- var liveClock = createLiveClock();
173
-
174
174
  // src/runtime/typedVariables.ts
175
175
  var TypedVariablesError = class extends Error {
176
176
  constructor(message, options) {
@@ -283,8 +283,8 @@ var VariableCollector = class {
283
283
  }
284
284
  };
285
285
  var realClock = {
286
- now: () => Date.now(),
287
- sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms))
286
+ now: () => liveClock.now(),
287
+ sleep: (ms) => liveClock.sleep(ms)
288
288
  };
289
289
  async function collectAllPages(params) {
290
290
  const remaining = new Set(params.names);
@@ -505,7 +505,7 @@ var JobWorker = class {
505
505
  _name;
506
506
  _activeJobs = 0;
507
507
  _stopped = false;
508
- _pollTimer = null;
508
+ _pollWait = null;
509
509
  _inFlightActivation = null;
510
510
  // CancelablePromise-like
511
511
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
@@ -579,8 +579,8 @@ var JobWorker = class {
579
579
  }
580
580
  stop() {
581
581
  this._stopped = true;
582
- if (this._pollTimer) clearTimeout(this._pollTimer);
583
- this._pollTimer = null;
582
+ this._pollWait?.abort();
583
+ this._pollWait = null;
584
584
  if (this._inFlightActivation?.cancel) {
585
585
  try {
586
586
  this._inFlightActivation.cancel();
@@ -599,8 +599,8 @@ var JobWorker = class {
599
599
  {
600
600
  haltPolling: () => {
601
601
  this._stopped = true;
602
- if (this._pollTimer) clearTimeout(this._pollTimer);
603
- this._pollTimer = null;
602
+ this._pollWait?.abort();
603
+ this._pollWait = null;
604
604
  },
605
605
  activeJobs: () => this._activeJobs,
606
606
  inFlightActivation: () => this._inFlightActivation,
@@ -611,10 +611,18 @@ var JobWorker = class {
611
611
  }
612
612
  _scheduleNext(delayMs) {
613
613
  if (this._stopped) return;
614
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
614
+ const wait = new AbortController();
615
+ this._pollWait = wait;
616
+ void this._client.clock.sleep(delayMs, wait.signal).then(
617
+ () => {
618
+ if (this._pollWait === wait) this._pollWait = null;
619
+ void this._poll();
620
+ },
621
+ () => {
622
+ }
623
+ );
615
624
  }
616
625
  async _poll() {
617
- this._pollTimer = null;
618
626
  if (this._stopped) return;
619
627
  if (this._activeJobs >= this._maxParallelJobs) {
620
628
  this._scheduleNext(this._cfg.pollIntervalMs);
@@ -858,7 +866,7 @@ function createSseClient({
858
866
  ...options
859
867
  }) {
860
868
  let lastEventId;
861
- const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
869
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
862
870
  const createStream = async function* () {
863
871
  let retryDelay = sseDefaultRetryDelay ?? 3e3;
864
872
  let attempt = 0;
@@ -962,7 +970,7 @@ function createSseClient({
962
970
  break;
963
971
  }
964
972
  const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
965
- await sleep2(backoff);
973
+ await sleep(backoff);
966
974
  }
967
975
  }
968
976
  };
@@ -3917,11 +3925,12 @@ var CamundaAuthError = class extends Error {
3917
3925
  cause;
3918
3926
  };
3919
3927
  var OAuthManager = class {
3920
- constructor(cfg, logger, tHooks, correlationProvider) {
3928
+ constructor(cfg, logger, tHooks, correlationProvider, clock = liveClock) {
3921
3929
  this.cfg = cfg;
3922
3930
  this.logger = logger;
3923
3931
  this.tHooks = tHooks;
3924
3932
  this.correlationProvider = correlationProvider;
3933
+ this.clock = clock;
3925
3934
  const hashBase = `${cfg.oauth.oauthUrl}|${cfg.oauth.clientId || ""}|${cfg.tokenAudience}|${cfg.oauth.scope || ""}`;
3926
3935
  this.storageKey = `camunda_oauth_token_cache_${this.simpleHash(hashBase)}`;
3927
3936
  this.session = this.isBrowser && typeof window.sessionStorage !== "undefined" ? window.sessionStorage : null;
@@ -3931,6 +3940,7 @@ var OAuthManager = class {
3931
3940
  logger;
3932
3941
  tHooks;
3933
3942
  correlationProvider;
3943
+ clock;
3934
3944
  refreshing = null;
3935
3945
  token = null;
3936
3946
  storageKey;
@@ -3947,7 +3957,7 @@ var OAuthManager = class {
3947
3957
  this.logger.debug(...args);
3948
3958
  }
3949
3959
  now() {
3950
- return Date.now();
3960
+ return this.clock.now();
3951
3961
  }
3952
3962
  loadPersisted() {
3953
3963
  if (this.session) {
@@ -4001,13 +4011,13 @@ var OAuthManager = class {
4001
4011
  return t.expires_at_epoch_ms;
4002
4012
  }
4003
4013
  shouldRefresh(t) {
4004
- const now2 = this.now();
4005
- if (now2 < t.obtained_at_epoch_ms - 3e4) {
4014
+ const now = this.now();
4015
+ if (now < t.obtained_at_epoch_ms - 3e4) {
4006
4016
  this.log("Clock skew backwards detected; invalidating token");
4007
4017
  return true;
4008
4018
  }
4009
4019
  const refreshLead = 5e3;
4010
- return now2 >= this.effectiveExpiry(t) - refreshLead;
4020
+ return now >= this.effectiveExpiry(t) - refreshLead;
4011
4021
  }
4012
4022
  async getToken(fetcher) {
4013
4023
  if (this.token && !this.shouldRefresh(this.token)) return this.token.access_token;
@@ -4062,9 +4072,11 @@ var OAuthManager = class {
4062
4072
  const base = this.cfg.oauth.retry.baseDelayMs || 1e3;
4063
4073
  let attempt = 0;
4064
4074
  let lastErr;
4075
+ const startedAt = liveClock.now();
4065
4076
  while (attempt < max) {
4066
4077
  const controller = new AbortController();
4067
- const timeout = setTimeout(() => controller.abort(), this.cfg.oauth.timeoutMs);
4078
+ const timeout = liveClock.deadline(this.cfg.oauth.timeoutMs);
4079
+ timeout.signal.addEventListener("abort", () => controller.abort(), { once: true });
4068
4080
  try {
4069
4081
  if (attempt === 0) {
4070
4082
  const evt = {
@@ -4087,7 +4099,7 @@ var OAuthManager = class {
4087
4099
  body: body.toString(),
4088
4100
  signal: controller.signal
4089
4101
  });
4090
- clearTimeout(timeout);
4102
+ timeout.dispose();
4091
4103
  if (!res.ok) {
4092
4104
  lastErr = new Error(`HTTP ${res.status}`);
4093
4105
  throw lastErr;
@@ -4098,15 +4110,15 @@ var OAuthManager = class {
4098
4110
  "TOKEN_PARSE_FAILED" /* TOKEN_PARSE_FAILED */,
4099
4111
  "Missing access_token or expires_in in response"
4100
4112
  );
4101
- const now2 = this.now();
4113
+ const now = this.now();
4102
4114
  const lifetimeMs = json.expires_in * 1e3;
4103
4115
  const skewBuffer = Math.max(3e4, Math.floor(lifetimeMs * 0.05));
4104
4116
  const entry = {
4105
4117
  access_token: json.access_token,
4106
4118
  token_type: json.token_type,
4107
4119
  scope: json.scope,
4108
- obtained_at_epoch_ms: now2,
4109
- expires_at_epoch_ms: now2 + lifetimeMs - skewBuffer,
4120
+ obtained_at_epoch_ms: now,
4121
+ expires_at_epoch_ms: now + lifetimeMs - skewBuffer,
4110
4122
  oauth_url: this.cfg.oauth.oauthUrl,
4111
4123
  client_id: this.cfg.oauth.clientId,
4112
4124
  audience: this.cfg.tokenAudience
@@ -4115,7 +4127,7 @@ var OAuthManager = class {
4115
4127
  this.persist();
4116
4128
  this.logger.info(
4117
4129
  "Token fetched; effective expiry (s)=",
4118
- Math.round((entry.expires_at_epoch_ms - now2) / 1e3)
4130
+ Math.round((entry.expires_at_epoch_ms - now) / 1e3)
4119
4131
  );
4120
4132
  try {
4121
4133
  const evt = {
@@ -4124,8 +4136,8 @@ var OAuthManager = class {
4124
4136
  audience: this.cfg.tokenAudience,
4125
4137
  endpoint: this.cfg.oauth.oauthUrl,
4126
4138
  cached: false,
4127
- durationMs: Date.now() - now2,
4128
- expiresInSec: Math.round((entry.expires_at_epoch_ms - now2) / 1e3),
4139
+ durationMs: liveClock.now() - startedAt,
4140
+ expiresInSec: Math.round((entry.expires_at_epoch_ms - now) / 1e3),
4129
4141
  scopes: entry.scope ? String(entry.scope).split(/\s+/) : void 0,
4130
4142
  correlationId: this.correlationProvider?.()
4131
4143
  };
@@ -4134,26 +4146,26 @@ var OAuthManager = class {
4134
4146
  }
4135
4147
  return entry.access_token;
4136
4148
  } catch (e) {
4137
- clearTimeout(timeout);
4149
+ timeout.dispose();
4138
4150
  lastErr = e;
4139
4151
  attempt++;
4140
4152
  if (attempt >= max) break;
4141
4153
  const delay = base * 2 ** (attempt - 1);
4142
4154
  const jitter = delay * 0.2 * (Math.random() - 0.5);
4143
- const sleep2 = delay + jitter;
4155
+ const sleep = delay + jitter;
4144
4156
  try {
4145
4157
  this.tHooks?.retry?.({
4146
4158
  type: "retry",
4147
4159
  ts: Date.now(),
4148
4160
  attempt,
4149
- nextDelayMs: Math.round(sleep2),
4161
+ nextDelayMs: Math.round(sleep),
4150
4162
  reason: lastErr?.message || "error",
4151
4163
  domain: "auth",
4152
4164
  correlationId: this.correlationProvider?.()
4153
4165
  });
4154
4166
  } catch {
4155
4167
  }
4156
- await new Promise((r) => setTimeout(r, sleep2));
4168
+ await this.clock.sleep(sleep);
4157
4169
  }
4158
4170
  }
4159
4171
  try {
@@ -4162,7 +4174,7 @@ var OAuthManager = class {
4162
4174
  ts: Date.now(),
4163
4175
  audience: this.cfg.tokenAudience,
4164
4176
  endpoint: this.cfg.oauth.oauthUrl,
4165
- durationMs: 0,
4177
+ durationMs: liveClock.now() - startedAt,
4166
4178
  status: lastErr?.message?.match(/HTTP (\d+)/)?.[1] ? parseInt(RegExp.$1, 10) : void 0,
4167
4179
  message: lastErr?.message || String(lastErr),
4168
4180
  correlationId: this.correlationProvider?.()
@@ -4227,7 +4239,13 @@ function createAuthFacade(config, opts) {
4227
4239
  let oauth = null;
4228
4240
  let basic = null;
4229
4241
  if (cfg.auth.strategy === "OAUTH")
4230
- oauth = new OAuthManager(cfg, authLogger.scope("oauth"), tHooks, opts?.correlationProvider);
4242
+ oauth = new OAuthManager(
4243
+ cfg,
4244
+ authLogger.scope("oauth"),
4245
+ tHooks,
4246
+ opts?.correlationProvider,
4247
+ opts?.clock ?? liveClock
4248
+ );
4231
4249
  else if (cfg.auth.strategy === "BASIC") basic = new BasicAuthManager(cfg);
4232
4250
  const fetcher = (input, init) => opts?.fetch ? opts.fetch(input, init) : fetch(input, init);
4233
4251
  let nodeAgent = null;
@@ -5065,11 +5083,9 @@ function toCancelable(factory) {
5065
5083
  };
5066
5084
  return p;
5067
5085
  }
5068
- function now() {
5069
- return Date.now();
5070
- }
5071
5086
  function eventualPoll(operationId, isGet, invoke, options) {
5072
5087
  const { waitUpToMs, predicate, onAttempt, onComplete, abortSignal, trace } = options;
5088
+ const clock = options.clock ?? liveClock;
5073
5089
  const elog = options.logger?.scope("eventual");
5074
5090
  const pollDefaultMs = hydrateConfig().config.eventual?.pollDefaultMs || 500;
5075
5091
  const userInterval = options.pollIntervalMs;
@@ -5087,7 +5103,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
5087
5103
  }
5088
5104
  return toCancelable((outerSignal) => {
5089
5105
  let attempts = 0;
5090
- const started = now();
5106
+ const started = clock.now();
5091
5107
  let cancelled = false;
5092
5108
  const abortImmediateStatuses = /* @__PURE__ */ new Set([400, 401, 403, 409, 422]);
5093
5109
  const externalAbort = () => {
@@ -5137,7 +5153,7 @@ function eventualPoll(operationId, isGet, invoke, options) {
5137
5153
  } catch (e) {
5138
5154
  return settleErr(e);
5139
5155
  }
5140
- const elapsed = now() - started;
5156
+ const elapsed = clock.now() - started;
5141
5157
  const remaining = waitUpToMs - elapsed;
5142
5158
  if (ok) {
5143
5159
  onAttempt?.({
@@ -5179,11 +5195,15 @@ function eventualPoll(operationId, isGet, invoke, options) {
5179
5195
  elog?.debug?.(() => [
5180
5196
  `op=${operationId} attempt=${attempts} status=200 predicate=false nextDelay=${delay}ms remaining=${remaining}`
5181
5197
  ]);
5182
- setTimeout(() => loop(resolve, reject), delay);
5198
+ void clock.sleep(delay, outerSignal).then(
5199
+ () => loop(resolve, reject),
5200
+ () => {
5201
+ }
5202
+ );
5183
5203
  }).catch((err) => {
5184
5204
  if (cancelled || outerSignal.aborted) return settleErr(new Error("Cancelled"));
5185
5205
  const status = err?.status;
5186
- const elapsed = now() - started;
5206
+ const elapsed = clock.now() - started;
5187
5207
  const remaining = waitUpToMs - elapsed;
5188
5208
  if (status === 404 && isGet && remaining > 0) {
5189
5209
  const delay = Math.min(pollInterval, remaining);
@@ -5195,7 +5215,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
5195
5215
  predicateResult: false,
5196
5216
  nextDelayMs: delay
5197
5217
  });
5198
- return setTimeout(() => loop(resolve, reject), delay);
5218
+ void clock.sleep(delay, outerSignal).then(
5219
+ () => loop(resolve, reject),
5220
+ () => {
5221
+ }
5222
+ );
5223
+ return;
5199
5224
  }
5200
5225
  if (status === 429 && remaining > 0) {
5201
5226
  let delay = pollInterval * 2;
@@ -5215,7 +5240,12 @@ function eventualPoll(operationId, isGet, invoke, options) {
5215
5240
  predicateResult: false,
5216
5241
  nextDelayMs: delay
5217
5242
  });
5218
- return setTimeout(() => loop(resolve, reject), delay);
5243
+ void clock.sleep(delay, outerSignal).then(
5244
+ () => loop(resolve, reject),
5245
+ () => {
5246
+ }
5247
+ );
5248
+ return;
5219
5249
  }
5220
5250
  if (status && (abortImmediateStatuses.has(status) || status >= 500))
5221
5251
  return settleErr(err);
@@ -5255,7 +5285,7 @@ function installAuthInterceptor(client2, getStrategy, getAuthHeaders) {
5255
5285
  }
5256
5286
 
5257
5287
  // src/runtime/version.ts
5258
- var packageVersion = "10.0.0-alpha.39";
5288
+ var packageVersion = "10.0.0-alpha.40";
5259
5289
 
5260
5290
  // src/runtime/supportLogger.ts
5261
5291
  var NoopSupportLogger = class {
@@ -5983,11 +6013,9 @@ var ValidationManager = class {
5983
6013
  };
5984
6014
 
5985
6015
  // src/runtime/retry.ts
5986
- async function sleep(ms) {
5987
- return new Promise((r) => setTimeout(r, ms));
5988
- }
5989
6016
  function createRetryExecutor(opts) {
5990
6017
  const rand = opts.random || Math.random;
6018
+ const clock = opts.clock ?? liveClock;
5991
6019
  return async function execute(op, classify) {
5992
6020
  const { maxAttempts, baseDelayMs, maxDelayMs } = opts.policy;
5993
6021
  let attempt = 0;
@@ -6012,7 +6040,7 @@ function createRetryExecutor(opts) {
6012
6040
  ]);
6013
6041
  } catch {
6014
6042
  }
6015
- await sleep(delay);
6043
+ await clock.sleep(delay);
6016
6044
  }
6017
6045
  }
6018
6046
  throw lastErr;
@@ -6050,8 +6078,8 @@ function defaultHttpClassifier(err) {
6050
6078
  }
6051
6079
  return { retryable: false, reason: "non-retryable" };
6052
6080
  }
6053
- async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt) {
6054
- const exec = createRetryExecutor({ policy, logger, onAttempt });
6081
+ async function executeWithHttpRetry(fn, policy, logger, classify = defaultHttpClassifier, onAttempt, clock) {
6082
+ const exec = createRetryExecutor({ policy, logger, onAttempt, clock });
6055
6083
  return exec(fn, classify);
6056
6084
  }
6057
6085
 
@@ -6179,8 +6207,8 @@ var BackpressureManager = class {
6179
6207
  }
6180
6208
  recordBackpressure() {
6181
6209
  if (!this.cfg.enabled && !this.observeOnly) return;
6182
- const now2 = this.now();
6183
- this.lastEventAt = now2;
6210
+ const now = this.now();
6211
+ this.lastEventAt = now;
6184
6212
  this.consecutive++;
6185
6213
  this.healthySince = 0;
6186
6214
  if (!this.observeOnly) {
@@ -6216,8 +6244,8 @@ var BackpressureManager = class {
6216
6244
  this.backoffMs = 0;
6217
6245
  this.log("backoff.clear", { reason: "healthy-hint" });
6218
6246
  }
6219
- const now2 = this.now();
6220
- this.maybeRecover(now2);
6247
+ const now = this.now();
6248
+ this.maybeRecover(now);
6221
6249
  }
6222
6250
  scalePermits(factor) {
6223
6251
  if (this.permitsMax === null) return;
@@ -6227,16 +6255,16 @@ var BackpressureManager = class {
6227
6255
  this.log("permits.scale", { max: this.permitsMax });
6228
6256
  }
6229
6257
  }
6230
- maybeRecover(now2 = this.now()) {
6258
+ maybeRecover(now = this.now()) {
6231
6259
  if (this.permitsMax === null || this.observeOnly) return;
6232
- if (now2 - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
6233
- this.lastRecoverCheck = now2;
6234
- if (now2 - this.lastEventAt > this.cfg.decayQuietMs) {
6260
+ if (now - this.lastRecoverCheck < this.cfg.recoveryIntervalMs) return;
6261
+ this.lastRecoverCheck = now;
6262
+ if (now - this.lastEventAt > this.cfg.decayQuietMs) {
6235
6263
  const prev = this.severity;
6236
6264
  if (this.severity === "severe") this.severity = "soft";
6237
6265
  else if (this.severity === "soft") {
6238
6266
  this.severity = "healthy";
6239
- this.healthySince = now2;
6267
+ this.healthySince = now;
6240
6268
  }
6241
6269
  if (this.severity === "healthy") this.consecutive = 0;
6242
6270
  if (prev !== this.severity) {
@@ -6260,7 +6288,7 @@ var BackpressureManager = class {
6260
6288
  this.release();
6261
6289
  }
6262
6290
  } else {
6263
- if (this.healthySince > 0 && now2 - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
6291
+ if (this.healthySince > 0 && now - this.healthySince >= this.cfg.unlimitedAfterHealthyMs) {
6264
6292
  this.permitsMax = null;
6265
6293
  this.permitsCurrent = 0;
6266
6294
  this.backoffMs = 0;
@@ -6358,7 +6386,7 @@ var ThreadedJobWorker = class {
6358
6386
  _name;
6359
6387
  _activeJobs = 0;
6360
6388
  _stopped = false;
6361
- _pollTimer = null;
6389
+ _pollWait = null;
6362
6390
  _inFlightActivation = null;
6363
6391
  /** Consecutive failed activation requests; drives the retry backoff, reset on success. */
6364
6392
  _consecutiveActivationErrors = 0;
@@ -6440,8 +6468,8 @@ var ThreadedJobWorker = class {
6440
6468
  }
6441
6469
  stop() {
6442
6470
  this._stopped = true;
6443
- if (this._pollTimer) clearTimeout(this._pollTimer);
6444
- this._pollTimer = null;
6471
+ this._pollWait?.abort();
6472
+ this._pollWait = null;
6445
6473
  if (this._inFlightActivation?.cancel) {
6446
6474
  try {
6447
6475
  this._inFlightActivation.cancel();
@@ -6455,8 +6483,8 @@ var ThreadedJobWorker = class {
6455
6483
  {
6456
6484
  haltPolling: () => {
6457
6485
  this._stopped = true;
6458
- if (this._pollTimer) clearTimeout(this._pollTimer);
6459
- this._pollTimer = null;
6486
+ this._pollWait?.abort();
6487
+ this._pollWait = null;
6460
6488
  },
6461
6489
  activeJobs: () => this._activeJobs,
6462
6490
  inFlightActivation: () => this._inFlightActivation,
@@ -6552,10 +6580,18 @@ var ThreadedJobWorker = class {
6552
6580
  // ─── Polling (same pattern as JobWorker) ───
6553
6581
  _scheduleNext(delayMs) {
6554
6582
  if (this._stopped) return;
6555
- this._pollTimer = setTimeout(() => this._poll(), delayMs);
6583
+ const wait = new AbortController();
6584
+ this._pollWait = wait;
6585
+ void this._client.clock.sleep(delayMs, wait.signal).then(
6586
+ () => {
6587
+ if (this._pollWait === wait) this._pollWait = null;
6588
+ void this._poll();
6589
+ },
6590
+ () => {
6591
+ }
6592
+ );
6556
6593
  }
6557
6594
  async _poll() {
6558
- this._pollTimer = null;
6559
6595
  if (this._stopped) return;
6560
6596
  await this._pool.ready;
6561
6597
  if (this._activeJobs >= this._maxParallelJobs) {
@@ -7066,7 +7102,7 @@ var CamundaClientBase = class {
7066
7102
  _validation = new ValidationManager({ req: "none", res: "none" });
7067
7103
  _log = createLogger();
7068
7104
  _bp;
7069
- _clock = liveClock;
7105
+ _clock;
7070
7106
  /** Registered job workers created via createJobWorker (lifecycle managed by user). */
7071
7107
  _workers = [];
7072
7108
  /** Shared thread pool for all threaded job workers (lazy-initialised on first use). */
@@ -7081,7 +7117,7 @@ var CamundaClientBase = class {
7081
7117
  _overrides = {};
7082
7118
  constructor(opts = {}) {
7083
7119
  if (opts.config) this._overrides = { ...opts.config };
7084
- this._clock = opts.clock ?? liveClock;
7120
+ this._clock = opts.clock ?? createLiveClock();
7085
7121
  const { config } = hydrateConfig({ overrides: this._overrides, env: opts.env });
7086
7122
  this._config = deepFreeze2(config);
7087
7123
  this._log = createLogger({
@@ -7140,6 +7176,7 @@ var CamundaClientBase = class {
7140
7176
  this._auth = createAuthFacade(this._config, {
7141
7177
  fetch: this._fetch,
7142
7178
  logger: this._log,
7179
+ clock: this._clock,
7143
7180
  telemetryHooks: opts.telemetry?.hooks,
7144
7181
  correlationProvider: opts.telemetry?.correlation || !opts.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
7145
7182
  });
@@ -7242,6 +7279,7 @@ var CamundaClientBase = class {
7242
7279
  this._auth = createAuthFacade(this._config, {
7243
7280
  fetch: this._fetch,
7244
7281
  logger: this._log,
7282
+ clock: this._clock,
7245
7283
  telemetryHooks: next.telemetry?.hooks,
7246
7284
  correlationProvider: next.telemetry?.correlation || !next.telemetry && this._config.telemetry?.correlation ? () => getCorrelation() : void 0
7247
7285
  });
@@ -7320,7 +7358,7 @@ var CamundaClientBase = class {
7320
7358
  _schemasPromise = null;
7321
7359
  _loadSchemas() {
7322
7360
  if (!this._schemasPromise) {
7323
- this._schemasPromise = import("./zod.gen-FH5QFVZD.js");
7361
+ this._schemasPromise = import("./zod.gen-2PU225MP.js");
7324
7362
  }
7325
7363
  return this._schemasPromise;
7326
7364
  }
@@ -7343,7 +7381,9 @@ var CamundaClientBase = class {
7343
7381
  this._bp.recordBackpressure();
7344
7382
  }
7345
7383
  return decision;
7346
- }
7384
+ },
7385
+ void 0,
7386
+ this._clock
7347
7387
  );
7348
7388
  this._bp.recordHealthyHint();
7349
7389
  return result;
@@ -11275,7 +11315,7 @@ var CamundaClientBase = class {
11275
11315
  }
11276
11316
  };
11277
11317
  const invoke = () => toCancelable2(() => call());
11278
- if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log });
11318
+ if (useConsistency) return eventualPoll("getAgentDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11279
11319
  return invoke();
11280
11320
  });
11281
11321
  }
@@ -11333,7 +11373,7 @@ var CamundaClientBase = class {
11333
11373
  }
11334
11374
  };
11335
11375
  const invoke = () => toCancelable2(() => call());
11336
- if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log });
11376
+ if (useConsistency) return eventualPoll("getAgentInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11337
11377
  return invoke();
11338
11378
  });
11339
11379
  }
@@ -11391,7 +11431,7 @@ var CamundaClientBase = class {
11391
11431
  }
11392
11432
  };
11393
11433
  const invoke = () => toCancelable2(() => call());
11394
- if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log });
11434
+ if (useConsistency) return eventualPoll("getAuditLog", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11395
11435
  return invoke();
11396
11436
  });
11397
11437
  }
@@ -11492,7 +11532,7 @@ var CamundaClientBase = class {
11492
11532
  }
11493
11533
  };
11494
11534
  const invoke = () => toCancelable2(() => call());
11495
- if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log });
11535
+ if (useConsistency) return eventualPoll("getAuthorization", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11496
11536
  return invoke();
11497
11537
  });
11498
11538
  }
@@ -11550,7 +11590,7 @@ var CamundaClientBase = class {
11550
11590
  }
11551
11591
  };
11552
11592
  const invoke = () => toCancelable2(() => call());
11553
- if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log });
11593
+ if (useConsistency) return eventualPoll("getBatchOperation", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11554
11594
  return invoke();
11555
11595
  });
11556
11596
  }
@@ -11780,7 +11820,7 @@ var CamundaClientBase = class {
11780
11820
  }
11781
11821
  };
11782
11822
  const invoke = () => toCancelable2(() => call());
11783
- if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log });
11823
+ if (useConsistency) return eventualPoll("getDecisionDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11784
11824
  return invoke();
11785
11825
  });
11786
11826
  }
@@ -11838,7 +11878,7 @@ var CamundaClientBase = class {
11838
11878
  }
11839
11879
  };
11840
11880
  const invoke = () => toCancelable2(() => call());
11841
- if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
11881
+ if (useConsistency) return eventualPoll("getDecisionDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11842
11882
  return invoke();
11843
11883
  });
11844
11884
  }
@@ -11896,7 +11936,7 @@ var CamundaClientBase = class {
11896
11936
  }
11897
11937
  };
11898
11938
  const invoke = () => toCancelable2(() => call());
11899
- if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log });
11939
+ if (useConsistency) return eventualPoll("getDecisionInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11900
11940
  return invoke();
11901
11941
  });
11902
11942
  }
@@ -11954,7 +11994,7 @@ var CamundaClientBase = class {
11954
11994
  }
11955
11995
  };
11956
11996
  const invoke = () => toCancelable2(() => call());
11957
- if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log });
11997
+ if (useConsistency) return eventualPoll("getDecisionRequirements", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
11958
11998
  return invoke();
11959
11999
  });
11960
12000
  }
@@ -12012,7 +12052,7 @@ var CamundaClientBase = class {
12012
12052
  }
12013
12053
  };
12014
12054
  const invoke = () => toCancelable2(() => call());
12015
- if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log });
12055
+ if (useConsistency) return eventualPoll("getDecisionRequirementsXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12016
12056
  return invoke();
12017
12057
  });
12018
12058
  }
@@ -12130,7 +12170,7 @@ var CamundaClientBase = class {
12130
12170
  }
12131
12171
  };
12132
12172
  const invoke = () => toCancelable2(() => call());
12133
- if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log });
12173
+ if (useConsistency) return eventualPoll("getElementInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12134
12174
  return invoke();
12135
12175
  });
12136
12176
  }
@@ -12231,7 +12271,7 @@ var CamundaClientBase = class {
12231
12271
  }
12232
12272
  };
12233
12273
  const invoke = () => toCancelable2(() => call());
12234
- if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log });
12274
+ if (useConsistency) return eventualPoll("getFormByKey", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12235
12275
  return invoke();
12236
12276
  });
12237
12277
  }
@@ -12289,7 +12329,7 @@ var CamundaClientBase = class {
12289
12329
  }
12290
12330
  };
12291
12331
  const invoke = () => toCancelable2(() => call());
12292
- if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
12332
+ if (useConsistency) return eventualPoll("getGlobalClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12293
12333
  return invoke();
12294
12334
  });
12295
12335
  }
@@ -12347,7 +12387,7 @@ var CamundaClientBase = class {
12347
12387
  }
12348
12388
  };
12349
12389
  const invoke = () => toCancelable2(() => call());
12350
- if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log });
12390
+ if (useConsistency) return eventualPoll("getGlobalJobStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12351
12391
  return invoke();
12352
12392
  });
12353
12393
  }
@@ -12405,7 +12445,7 @@ var CamundaClientBase = class {
12405
12445
  }
12406
12446
  };
12407
12447
  const invoke = () => toCancelable2(() => call());
12408
- if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log });
12448
+ if (useConsistency) return eventualPoll("getGlobalTaskListener", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12409
12449
  return invoke();
12410
12450
  });
12411
12451
  }
@@ -12463,7 +12503,7 @@ var CamundaClientBase = class {
12463
12503
  }
12464
12504
  };
12465
12505
  const invoke = () => toCancelable2(() => call());
12466
- if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log });
12506
+ if (useConsistency) return eventualPoll("getGroup", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12467
12507
  return invoke();
12468
12508
  });
12469
12509
  }
@@ -12635,7 +12675,7 @@ var CamundaClientBase = class {
12635
12675
  }
12636
12676
  };
12637
12677
  const invoke = () => toCancelable2(() => call());
12638
- if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log });
12678
+ if (useConsistency) return eventualPoll("getIncident", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12639
12679
  return invoke();
12640
12680
  });
12641
12681
  }
@@ -12693,7 +12733,7 @@ var CamundaClientBase = class {
12693
12733
  }
12694
12734
  };
12695
12735
  const invoke = () => toCancelable2(() => call());
12696
- if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log });
12736
+ if (useConsistency) return eventualPoll("getJobErrorStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12697
12737
  return invoke();
12698
12738
  });
12699
12739
  }
@@ -12751,7 +12791,7 @@ var CamundaClientBase = class {
12751
12791
  }
12752
12792
  };
12753
12793
  const invoke = () => toCancelable2(() => call());
12754
- if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log });
12794
+ if (useConsistency) return eventualPoll("getJobTimeSeriesStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12755
12795
  return invoke();
12756
12796
  });
12757
12797
  }
@@ -12809,7 +12849,7 @@ var CamundaClientBase = class {
12809
12849
  }
12810
12850
  };
12811
12851
  const invoke = () => toCancelable2(() => call());
12812
- if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log });
12852
+ if (useConsistency) return eventualPoll("getJobTypeStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12813
12853
  return invoke();
12814
12854
  });
12815
12855
  }
@@ -12867,7 +12907,7 @@ var CamundaClientBase = class {
12867
12907
  }
12868
12908
  };
12869
12909
  const invoke = () => toCancelable2(() => call());
12870
- if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log });
12910
+ if (useConsistency) return eventualPoll("getJobWorkerStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12871
12911
  return invoke();
12872
12912
  });
12873
12913
  }
@@ -12968,7 +13008,7 @@ var CamundaClientBase = class {
12968
13008
  }
12969
13009
  };
12970
13010
  const invoke = () => toCancelable2(() => call());
12971
- if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log });
13011
+ if (useConsistency) return eventualPoll("getMappingRule", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
12972
13012
  return invoke();
12973
13013
  });
12974
13014
  }
@@ -13026,7 +13066,7 @@ var CamundaClientBase = class {
13026
13066
  }
13027
13067
  };
13028
13068
  const invoke = () => toCancelable2(() => call());
13029
- if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log });
13069
+ if (useConsistency) return eventualPoll("getProcessDefinition", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13030
13070
  return invoke();
13031
13071
  });
13032
13072
  }
@@ -13084,7 +13124,7 @@ var CamundaClientBase = class {
13084
13124
  }
13085
13125
  };
13086
13126
  const invoke = () => toCancelable2(() => call());
13087
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log });
13127
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13088
13128
  return invoke();
13089
13129
  });
13090
13130
  }
@@ -13142,7 +13182,7 @@ var CamundaClientBase = class {
13142
13182
  }
13143
13183
  };
13144
13184
  const invoke = () => toCancelable2(() => call());
13145
- if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log });
13185
+ if (useConsistency) return eventualPoll("getProcessDefinitionInstanceVersionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13146
13186
  return invoke();
13147
13187
  });
13148
13188
  }
@@ -13200,7 +13240,7 @@ var CamundaClientBase = class {
13200
13240
  }
13201
13241
  };
13202
13242
  const invoke = () => toCancelable2(() => call());
13203
- if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log });
13243
+ if (useConsistency) return eventualPoll("getProcessDefinitionMessageSubscriptionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13204
13244
  return invoke();
13205
13245
  });
13206
13246
  }
@@ -13264,7 +13304,7 @@ var CamundaClientBase = class {
13264
13304
  }
13265
13305
  };
13266
13306
  const invoke = () => toCancelable2(() => call());
13267
- if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log });
13307
+ if (useConsistency) return eventualPoll("getProcessDefinitionStatistics", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13268
13308
  return invoke();
13269
13309
  });
13270
13310
  }
@@ -13322,7 +13362,7 @@ var CamundaClientBase = class {
13322
13362
  }
13323
13363
  };
13324
13364
  const invoke = () => toCancelable2(() => call());
13325
- if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log });
13365
+ if (useConsistency) return eventualPoll("getProcessDefinitionXML", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13326
13366
  return invoke();
13327
13367
  });
13328
13368
  }
@@ -13380,7 +13420,7 @@ var CamundaClientBase = class {
13380
13420
  }
13381
13421
  };
13382
13422
  const invoke = () => toCancelable2(() => call());
13383
- if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log });
13423
+ if (useConsistency) return eventualPoll("getProcessInstance", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13384
13424
  return invoke();
13385
13425
  });
13386
13426
  }
@@ -13438,7 +13478,7 @@ var CamundaClientBase = class {
13438
13478
  }
13439
13479
  };
13440
13480
  const invoke = () => toCancelable2(() => call());
13441
- if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log });
13481
+ if (useConsistency) return eventualPoll("getProcessInstanceCallHierarchy", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13442
13482
  return invoke();
13443
13483
  });
13444
13484
  }
@@ -13496,7 +13536,7 @@ var CamundaClientBase = class {
13496
13536
  }
13497
13537
  };
13498
13538
  const invoke = () => toCancelable2(() => call());
13499
- if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log });
13539
+ if (useConsistency) return eventualPoll("getProcessInstanceSequenceFlows", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13500
13540
  return invoke();
13501
13541
  });
13502
13542
  }
@@ -13554,7 +13594,7 @@ var CamundaClientBase = class {
13554
13594
  }
13555
13595
  };
13556
13596
  const invoke = () => toCancelable2(() => call());
13557
- if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log });
13597
+ if (useConsistency) return eventualPoll("getProcessInstanceStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13558
13598
  return invoke();
13559
13599
  });
13560
13600
  }
@@ -13612,7 +13652,7 @@ var CamundaClientBase = class {
13612
13652
  }
13613
13653
  };
13614
13654
  const invoke = () => toCancelable2(() => call());
13615
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log });
13655
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByDefinition", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13616
13656
  return invoke();
13617
13657
  });
13618
13658
  }
@@ -13670,7 +13710,7 @@ var CamundaClientBase = class {
13670
13710
  }
13671
13711
  };
13672
13712
  const invoke = () => toCancelable2(() => call());
13673
- if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log });
13713
+ if (useConsistency) return eventualPoll("getProcessInstanceStatisticsByError", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13674
13714
  return invoke();
13675
13715
  });
13676
13716
  }
@@ -13728,7 +13768,7 @@ var CamundaClientBase = class {
13728
13768
  }
13729
13769
  };
13730
13770
  const invoke = () => toCancelable2(() => call());
13731
- if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log });
13771
+ if (useConsistency) return eventualPoll("getProcessInstanceWaitStateStatistics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13732
13772
  return invoke();
13733
13773
  });
13734
13774
  }
@@ -13786,7 +13826,7 @@ var CamundaClientBase = class {
13786
13826
  }
13787
13827
  };
13788
13828
  const invoke = () => toCancelable2(() => call());
13789
- if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log });
13829
+ if (useConsistency) return eventualPoll("getResource", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13790
13830
  return invoke();
13791
13831
  });
13792
13832
  }
@@ -13844,7 +13884,7 @@ var CamundaClientBase = class {
13844
13884
  }
13845
13885
  };
13846
13886
  const invoke = () => toCancelable2(() => call());
13847
- if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log });
13887
+ if (useConsistency) return eventualPoll("getResourceContent", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13848
13888
  return invoke();
13849
13889
  });
13850
13890
  }
@@ -13902,7 +13942,7 @@ var CamundaClientBase = class {
13902
13942
  }
13903
13943
  };
13904
13944
  const invoke = () => toCancelable2(() => call());
13905
- if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log });
13945
+ if (useConsistency) return eventualPoll("getResourceContentBinary", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
13906
13946
  return invoke();
13907
13947
  });
13908
13948
  }
@@ -14003,7 +14043,7 @@ var CamundaClientBase = class {
14003
14043
  }
14004
14044
  };
14005
14045
  const invoke = () => toCancelable2(() => call());
14006
- if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log });
14046
+ if (useConsistency) return eventualPoll("getRole", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14007
14047
  return invoke();
14008
14048
  });
14009
14049
  }
@@ -14272,7 +14312,7 @@ var CamundaClientBase = class {
14272
14312
  }
14273
14313
  };
14274
14314
  const invoke = () => toCancelable2(() => call());
14275
- if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log });
14315
+ if (useConsistency) return eventualPoll("getStartProcessForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14276
14316
  return invoke();
14277
14317
  });
14278
14318
  }
@@ -14416,7 +14456,7 @@ var CamundaClientBase = class {
14416
14456
  }
14417
14457
  };
14418
14458
  const invoke = () => toCancelable2(() => call());
14419
- if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log });
14459
+ if (useConsistency) return eventualPoll("getTenant", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14420
14460
  return invoke();
14421
14461
  });
14422
14462
  }
@@ -14474,7 +14514,7 @@ var CamundaClientBase = class {
14474
14514
  }
14475
14515
  };
14476
14516
  const invoke = () => toCancelable2(() => call());
14477
- if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log });
14517
+ if (useConsistency) return eventualPoll("getTenantClusterVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14478
14518
  return invoke();
14479
14519
  });
14480
14520
  }
@@ -14575,7 +14615,7 @@ var CamundaClientBase = class {
14575
14615
  }
14576
14616
  };
14577
14617
  const invoke = () => toCancelable2(() => call());
14578
- if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log });
14618
+ if (useConsistency) return eventualPoll("getUsageMetrics", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14579
14619
  return invoke();
14580
14620
  });
14581
14621
  }
@@ -14633,7 +14673,7 @@ var CamundaClientBase = class {
14633
14673
  }
14634
14674
  };
14635
14675
  const invoke = () => toCancelable2(() => call());
14636
- if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log });
14676
+ if (useConsistency) return eventualPoll("getUser", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14637
14677
  return invoke();
14638
14678
  });
14639
14679
  }
@@ -14691,7 +14731,7 @@ var CamundaClientBase = class {
14691
14731
  }
14692
14732
  };
14693
14733
  const invoke = () => toCancelable2(() => call());
14694
- if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log });
14734
+ if (useConsistency) return eventualPoll("getUserTask", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14695
14735
  return invoke();
14696
14736
  });
14697
14737
  }
@@ -14749,7 +14789,7 @@ var CamundaClientBase = class {
14749
14789
  }
14750
14790
  };
14751
14791
  const invoke = () => toCancelable2(() => call());
14752
- if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log });
14792
+ if (useConsistency) return eventualPoll("getUserTaskForm", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14753
14793
  return invoke();
14754
14794
  });
14755
14795
  }
@@ -14807,7 +14847,7 @@ var CamundaClientBase = class {
14807
14847
  }
14808
14848
  };
14809
14849
  const invoke = () => toCancelable2(() => call());
14810
- if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log });
14850
+ if (useConsistency) return eventualPoll("getVariable", true, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
14811
14851
  return invoke();
14812
14852
  });
14813
14853
  }
@@ -16228,7 +16268,7 @@ var CamundaClientBase = class {
16228
16268
  }
16229
16269
  };
16230
16270
  const invoke = () => toCancelable2(() => call());
16231
- if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log });
16271
+ if (useConsistency) return eventualPoll("searchAgentDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16232
16272
  return invoke();
16233
16273
  });
16234
16274
  }
@@ -16292,7 +16332,7 @@ var CamundaClientBase = class {
16292
16332
  }
16293
16333
  };
16294
16334
  const invoke = () => toCancelable2(() => call());
16295
- if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log });
16335
+ if (useConsistency) return eventualPoll("searchAgentInstanceHistory", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16296
16336
  return invoke();
16297
16337
  });
16298
16338
  }
@@ -16350,7 +16390,7 @@ var CamundaClientBase = class {
16350
16390
  }
16351
16391
  };
16352
16392
  const invoke = () => toCancelable2(() => call());
16353
- if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log });
16393
+ if (useConsistency) return eventualPoll("searchAgentInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16354
16394
  return invoke();
16355
16395
  });
16356
16396
  }
@@ -16408,7 +16448,7 @@ var CamundaClientBase = class {
16408
16448
  }
16409
16449
  };
16410
16450
  const invoke = () => toCancelable2(() => call());
16411
- if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
16451
+ if (useConsistency) return eventualPoll("searchAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16412
16452
  return invoke();
16413
16453
  });
16414
16454
  }
@@ -16466,7 +16506,7 @@ var CamundaClientBase = class {
16466
16506
  }
16467
16507
  };
16468
16508
  const invoke = () => toCancelable2(() => call());
16469
- if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
16509
+ if (useConsistency) return eventualPoll("searchAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16470
16510
  return invoke();
16471
16511
  });
16472
16512
  }
@@ -16524,7 +16564,7 @@ var CamundaClientBase = class {
16524
16564
  }
16525
16565
  };
16526
16566
  const invoke = () => toCancelable2(() => call());
16527
- if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log });
16567
+ if (useConsistency) return eventualPoll("searchBatchOperationItems", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16528
16568
  return invoke();
16529
16569
  });
16530
16570
  }
@@ -16582,7 +16622,7 @@ var CamundaClientBase = class {
16582
16622
  }
16583
16623
  };
16584
16624
  const invoke = () => toCancelable2(() => call());
16585
- if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log });
16625
+ if (useConsistency) return eventualPoll("searchBatchOperations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16586
16626
  return invoke();
16587
16627
  });
16588
16628
  }
@@ -16646,7 +16686,7 @@ var CamundaClientBase = class {
16646
16686
  }
16647
16687
  };
16648
16688
  const invoke = () => toCancelable2(() => call());
16649
- if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log });
16689
+ if (useConsistency) return eventualPoll("searchClientsForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16650
16690
  return invoke();
16651
16691
  });
16652
16692
  }
@@ -16710,7 +16750,7 @@ var CamundaClientBase = class {
16710
16750
  }
16711
16751
  };
16712
16752
  const invoke = () => toCancelable2(() => call());
16713
- if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log });
16753
+ if (useConsistency) return eventualPoll("searchClientsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16714
16754
  return invoke();
16715
16755
  });
16716
16756
  }
@@ -16774,7 +16814,7 @@ var CamundaClientBase = class {
16774
16814
  }
16775
16815
  };
16776
16816
  const invoke = () => toCancelable2(() => call());
16777
- if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log });
16817
+ if (useConsistency) return eventualPoll("searchClientsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16778
16818
  return invoke();
16779
16819
  });
16780
16820
  }
@@ -16838,7 +16878,7 @@ var CamundaClientBase = class {
16838
16878
  }
16839
16879
  };
16840
16880
  const invoke = () => toCancelable2(() => call());
16841
- if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log });
16881
+ if (useConsistency) return eventualPoll("searchClusterVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16842
16882
  return invoke();
16843
16883
  });
16844
16884
  }
@@ -16896,7 +16936,7 @@ var CamundaClientBase = class {
16896
16936
  }
16897
16937
  };
16898
16938
  const invoke = () => toCancelable2(() => call());
16899
- if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
16939
+ if (useConsistency) return eventualPoll("searchCorrelatedMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16900
16940
  return invoke();
16901
16941
  });
16902
16942
  }
@@ -16954,7 +16994,7 @@ var CamundaClientBase = class {
16954
16994
  }
16955
16995
  };
16956
16996
  const invoke = () => toCancelable2(() => call());
16957
- if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log });
16997
+ if (useConsistency) return eventualPoll("searchDecisionDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
16958
16998
  return invoke();
16959
16999
  });
16960
17000
  }
@@ -17012,7 +17052,7 @@ var CamundaClientBase = class {
17012
17052
  }
17013
17053
  };
17014
17054
  const invoke = () => toCancelable2(() => call());
17015
- if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log });
17055
+ if (useConsistency) return eventualPoll("searchDecisionInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17016
17056
  return invoke();
17017
17057
  });
17018
17058
  }
@@ -17070,7 +17110,7 @@ var CamundaClientBase = class {
17070
17110
  }
17071
17111
  };
17072
17112
  const invoke = () => toCancelable2(() => call());
17073
- if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log });
17113
+ if (useConsistency) return eventualPoll("searchDecisionRequirements", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17074
17114
  return invoke();
17075
17115
  });
17076
17116
  }
@@ -17134,7 +17174,7 @@ var CamundaClientBase = class {
17134
17174
  }
17135
17175
  };
17136
17176
  const invoke = () => toCancelable2(() => call());
17137
- if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
17177
+ if (useConsistency) return eventualPoll("searchElementInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17138
17178
  return invoke();
17139
17179
  });
17140
17180
  }
@@ -17192,7 +17232,7 @@ var CamundaClientBase = class {
17192
17232
  }
17193
17233
  };
17194
17234
  const invoke = () => toCancelable2(() => call());
17195
- if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log });
17235
+ if (useConsistency) return eventualPoll("searchElementInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17196
17236
  return invoke();
17197
17237
  });
17198
17238
  }
@@ -17250,7 +17290,7 @@ var CamundaClientBase = class {
17250
17290
  }
17251
17291
  };
17252
17292
  const invoke = () => toCancelable2(() => call());
17253
- if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log });
17293
+ if (useConsistency) return eventualPoll("searchElementInstanceWaitStates", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17254
17294
  return invoke();
17255
17295
  });
17256
17296
  }
@@ -17308,7 +17348,7 @@ var CamundaClientBase = class {
17308
17348
  }
17309
17349
  };
17310
17350
  const invoke = () => toCancelable2(() => call());
17311
- if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log });
17351
+ if (useConsistency) return eventualPoll("searchGlobalTaskListeners", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17312
17352
  return invoke();
17313
17353
  });
17314
17354
  }
@@ -17372,7 +17412,7 @@ var CamundaClientBase = class {
17372
17412
  }
17373
17413
  };
17374
17414
  const invoke = () => toCancelable2(() => call());
17375
- if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log });
17415
+ if (useConsistency) return eventualPoll("searchGroupIdsForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17376
17416
  return invoke();
17377
17417
  });
17378
17418
  }
@@ -17430,7 +17470,7 @@ var CamundaClientBase = class {
17430
17470
  }
17431
17471
  };
17432
17472
  const invoke = () => toCancelable2(() => call());
17433
- if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log });
17473
+ if (useConsistency) return eventualPoll("searchGroups", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17434
17474
  return invoke();
17435
17475
  });
17436
17476
  }
@@ -17494,7 +17534,7 @@ var CamundaClientBase = class {
17494
17534
  }
17495
17535
  };
17496
17536
  const invoke = () => toCancelable2(() => call());
17497
- if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log });
17537
+ if (useConsistency) return eventualPoll("searchGroupsForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17498
17538
  return invoke();
17499
17539
  });
17500
17540
  }
@@ -17552,7 +17592,7 @@ var CamundaClientBase = class {
17552
17592
  }
17553
17593
  };
17554
17594
  const invoke = () => toCancelable2(() => call());
17555
- if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log });
17595
+ if (useConsistency) return eventualPoll("searchIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17556
17596
  return invoke();
17557
17597
  });
17558
17598
  }
@@ -17610,7 +17650,7 @@ var CamundaClientBase = class {
17610
17650
  }
17611
17651
  };
17612
17652
  const invoke = () => toCancelable2(() => call());
17613
- if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log });
17653
+ if (useConsistency) return eventualPoll("searchJobs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17614
17654
  return invoke();
17615
17655
  });
17616
17656
  }
@@ -17668,7 +17708,7 @@ var CamundaClientBase = class {
17668
17708
  }
17669
17709
  };
17670
17710
  const invoke = () => toCancelable2(() => call());
17671
- if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log });
17711
+ if (useConsistency) return eventualPoll("searchMappingRule", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17672
17712
  return invoke();
17673
17713
  });
17674
17714
  }
@@ -17732,7 +17772,7 @@ var CamundaClientBase = class {
17732
17772
  }
17733
17773
  };
17734
17774
  const invoke = () => toCancelable2(() => call());
17735
- if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log });
17775
+ if (useConsistency) return eventualPoll("searchMappingRulesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17736
17776
  return invoke();
17737
17777
  });
17738
17778
  }
@@ -17796,7 +17836,7 @@ var CamundaClientBase = class {
17796
17836
  }
17797
17837
  };
17798
17838
  const invoke = () => toCancelable2(() => call());
17799
- if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log });
17839
+ if (useConsistency) return eventualPoll("searchMappingRulesForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17800
17840
  return invoke();
17801
17841
  });
17802
17842
  }
@@ -17860,7 +17900,7 @@ var CamundaClientBase = class {
17860
17900
  }
17861
17901
  };
17862
17902
  const invoke = () => toCancelable2(() => call());
17863
- if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log });
17903
+ if (useConsistency) return eventualPoll("searchMappingRulesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17864
17904
  return invoke();
17865
17905
  });
17866
17906
  }
@@ -17918,7 +17958,7 @@ var CamundaClientBase = class {
17918
17958
  }
17919
17959
  };
17920
17960
  const invoke = () => toCancelable2(() => call());
17921
- if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log });
17961
+ if (useConsistency) return eventualPoll("searchMessageSubscriptions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17922
17962
  return invoke();
17923
17963
  });
17924
17964
  }
@@ -17976,7 +18016,7 @@ var CamundaClientBase = class {
17976
18016
  }
17977
18017
  };
17978
18018
  const invoke = () => toCancelable2(() => call());
17979
- if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log });
18019
+ if (useConsistency) return eventualPoll("searchOwnAuthorizations", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
17980
18020
  return invoke();
17981
18021
  });
17982
18022
  }
@@ -18034,7 +18074,7 @@ var CamundaClientBase = class {
18034
18074
  }
18035
18075
  };
18036
18076
  const invoke = () => toCancelable2(() => call());
18037
- if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log });
18077
+ if (useConsistency) return eventualPoll("searchProcessDefinitions", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18038
18078
  return invoke();
18039
18079
  });
18040
18080
  }
@@ -18098,7 +18138,7 @@ var CamundaClientBase = class {
18098
18138
  }
18099
18139
  };
18100
18140
  const invoke = () => toCancelable2(() => call());
18101
- if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log });
18141
+ if (useConsistency) return eventualPoll("searchProcessDefinitionVariableNames", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18102
18142
  return invoke();
18103
18143
  });
18104
18144
  }
@@ -18162,7 +18202,7 @@ var CamundaClientBase = class {
18162
18202
  }
18163
18203
  };
18164
18204
  const invoke = () => toCancelable2(() => call());
18165
- if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log });
18205
+ if (useConsistency) return eventualPoll("searchProcessInstanceIncidents", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18166
18206
  return invoke();
18167
18207
  });
18168
18208
  }
@@ -18220,7 +18260,7 @@ var CamundaClientBase = class {
18220
18260
  }
18221
18261
  };
18222
18262
  const invoke = () => toCancelable2(() => call());
18223
- if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log });
18263
+ if (useConsistency) return eventualPoll("searchProcessInstances", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18224
18264
  return invoke();
18225
18265
  });
18226
18266
  }
@@ -18278,7 +18318,7 @@ var CamundaClientBase = class {
18278
18318
  }
18279
18319
  };
18280
18320
  const invoke = () => toCancelable2(() => call());
18281
- if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log });
18321
+ if (useConsistency) return eventualPoll("searchResources", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18282
18322
  return invoke();
18283
18323
  });
18284
18324
  }
@@ -18336,7 +18376,7 @@ var CamundaClientBase = class {
18336
18376
  }
18337
18377
  };
18338
18378
  const invoke = () => toCancelable2(() => call());
18339
- if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log });
18379
+ if (useConsistency) return eventualPoll("searchRoles", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18340
18380
  return invoke();
18341
18381
  });
18342
18382
  }
@@ -18400,7 +18440,7 @@ var CamundaClientBase = class {
18400
18440
  }
18401
18441
  };
18402
18442
  const invoke = () => toCancelable2(() => call());
18403
- if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log });
18443
+ if (useConsistency) return eventualPoll("searchRolesForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18404
18444
  return invoke();
18405
18445
  });
18406
18446
  }
@@ -18464,7 +18504,7 @@ var CamundaClientBase = class {
18464
18504
  }
18465
18505
  };
18466
18506
  const invoke = () => toCancelable2(() => call());
18467
- if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log });
18507
+ if (useConsistency) return eventualPoll("searchRolesForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18468
18508
  return invoke();
18469
18509
  });
18470
18510
  }
@@ -18522,7 +18562,7 @@ var CamundaClientBase = class {
18522
18562
  }
18523
18563
  };
18524
18564
  const invoke = () => toCancelable2(() => call());
18525
- if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log });
18565
+ if (useConsistency) return eventualPoll("searchTenants", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18526
18566
  return invoke();
18527
18567
  });
18528
18568
  }
@@ -18580,7 +18620,7 @@ var CamundaClientBase = class {
18580
18620
  }
18581
18621
  };
18582
18622
  const invoke = () => toCancelable2(() => call());
18583
- if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log });
18623
+ if (useConsistency) return eventualPoll("searchUsers", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18584
18624
  return invoke();
18585
18625
  });
18586
18626
  }
@@ -18644,7 +18684,7 @@ var CamundaClientBase = class {
18644
18684
  }
18645
18685
  };
18646
18686
  const invoke = () => toCancelable2(() => call());
18647
- if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log });
18687
+ if (useConsistency) return eventualPoll("searchUsersForGroup", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18648
18688
  return invoke();
18649
18689
  });
18650
18690
  }
@@ -18708,7 +18748,7 @@ var CamundaClientBase = class {
18708
18748
  }
18709
18749
  };
18710
18750
  const invoke = () => toCancelable2(() => call());
18711
- if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log });
18751
+ if (useConsistency) return eventualPoll("searchUsersForRole", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18712
18752
  return invoke();
18713
18753
  });
18714
18754
  }
@@ -18772,7 +18812,7 @@ var CamundaClientBase = class {
18772
18812
  }
18773
18813
  };
18774
18814
  const invoke = () => toCancelable2(() => call());
18775
- if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log });
18815
+ if (useConsistency) return eventualPoll("searchUsersForTenant", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18776
18816
  return invoke();
18777
18817
  });
18778
18818
  }
@@ -18836,7 +18876,7 @@ var CamundaClientBase = class {
18836
18876
  }
18837
18877
  };
18838
18878
  const invoke = () => toCancelable2(() => call());
18839
- if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log });
18879
+ if (useConsistency) return eventualPoll("searchUserTaskAuditLogs", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18840
18880
  return invoke();
18841
18881
  });
18842
18882
  }
@@ -18906,7 +18946,7 @@ var CamundaClientBase = class {
18906
18946
  }
18907
18947
  };
18908
18948
  const invoke = () => toCancelable2(() => call());
18909
- if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log });
18949
+ if (useConsistency) return eventualPoll("searchUserTaskEffectiveVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18910
18950
  return invoke();
18911
18951
  });
18912
18952
  }
@@ -18964,7 +19004,7 @@ var CamundaClientBase = class {
18964
19004
  }
18965
19005
  };
18966
19006
  const invoke = () => toCancelable2(() => call());
18967
- if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log });
19007
+ if (useConsistency) return eventualPoll("searchUserTasks", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
18968
19008
  return invoke();
18969
19009
  });
18970
19010
  }
@@ -19034,7 +19074,7 @@ var CamundaClientBase = class {
19034
19074
  }
19035
19075
  };
19036
19076
  const invoke = () => toCancelable2(() => call());
19037
- if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log });
19077
+ if (useConsistency) return eventualPoll("searchUserTaskVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
19038
19078
  return invoke();
19039
19079
  });
19040
19080
  }
@@ -19098,7 +19138,7 @@ var CamundaClientBase = class {
19098
19138
  }
19099
19139
  };
19100
19140
  const invoke = () => toCancelable2(() => call());
19101
- if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log });
19141
+ if (useConsistency) return eventualPoll("searchVariables", false, invoke, { ...useConsistency, logger: this._log, clock: this._clock });
19102
19142
  return invoke();
19103
19143
  });
19104
19144
  }
@@ -21425,11 +21465,11 @@ var CamundaClientBase = class {
21425
21465
  var CamundaClient = CamundaClientBase;
21426
21466
 
21427
21467
  export {
21468
+ createLiveClock,
21469
+ liveClock,
21428
21470
  isSdkError,
21429
21471
  CamundaValidationError,
21430
21472
  EventualConsistencyTimeoutError,
21431
- createLiveClock,
21432
- liveClock,
21433
21473
  TypedVariablesError,
21434
21474
  VariableScopeCollisionError,
21435
21475
  VariableDeserializationError,
@@ -21444,4 +21484,4 @@ export {
21444
21484
  createCamundaClient,
21445
21485
  CamundaClient
21446
21486
  };
21447
- //# sourceMappingURL=chunk-LNMC2FKC.js.map
21487
+ //# sourceMappingURL=chunk-3HNGJ4FZ.js.map