@ethlete/query 6.0.0-next.25 → 6.0.0-next.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ethlete/query
2
2
 
3
+ ## 6.0.0-next.26
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3045](https://github.com/ethlete-io/ethdk/pull/3045) [`b2ac74b`](https://github.com/ethlete-io/ethdk/commit/b2ac74b0fad22ba656d7b2028d19dd25f06e57d8) Thanks [@github-actions](https://github.com/apps/github-actions)! - Query devtools: add a persistent, path-addressed response-override registry that replays edits (value presets, array/pagination duplication, resets) against a query's response on every fetch.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#3045](https://github.com/ethlete-io/ethdk/pull/3045) [`5c676cf`](https://github.com/ethlete-io/ethdk/commit/5c676cf29dbe18d5ca81e8a5c45144a4ec93d712) Thanks [@github-actions](https://github.com/apps/github-actions)! - `BearerAuthProvider.setTokens()` now sets `executionState` to `{ type: 'tokenSeed', state: 'success' }`, so SSO/OIDC callback and native-shell logins work with the same `executionState`-driven redirect logic as a query-driven login.
12
+
13
+ - [#3045](https://github.com/ethlete-io/ethdk/pull/3045) [`321da6a`](https://github.com/ethlete-io/ethdk/commit/321da6a9d1b97dc34204011d1372fe1c7bfadb3d) Thanks [@github-actions](https://github.com/apps/github-actions)! - Internal: route-building and legacy query-state errors now throw `RuntimeError` (from `@ethlete/core`) instead of the ad hoc `QueryError` class, which is removed.
14
+
3
15
  ## 6.0.0-next.25
4
16
 
5
17
  ### Major Changes
@@ -103,6 +103,20 @@ const setQueryDevtoolsFormLinksFactory = (fn) => {
103
103
  * @internal
104
104
  */
105
105
  const createQueryDevtoolsFormLinksRecorder = () => formLinksFactory?.() ?? null;
106
+ let overridesFactory = null;
107
+ /**
108
+ * Installs the overrides recorder factory. Called by `provideQueryDevtools()`; nothing else may call it.
109
+ * @internal
110
+ */
111
+ const setQueryDevtoolsOverridesFactory = (fn) => {
112
+ overridesFactory = fn;
113
+ };
114
+ /**
115
+ * An overrides recorder for one query, or `null` unless {@link provideQueryDevtools} has been called.
116
+ * Reached only from the provider for the same reason {@link createQueryDevtoolsStatsRecorder} is.
117
+ * @internal
118
+ */
119
+ const createQueryDevtoolsOverridesRecorder = () => overridesFactory?.() ?? null;
106
120
  /** The ids of the query forms read by the args build currently running, or `null` outside of one. */
107
121
  let formLinkSink = null;
108
122
  /**
@@ -276,6 +290,10 @@ const QueryRuntimeErrorCode = {
276
290
  QUERY_SEQUENCE_ALREADY_RUNNING: 900,
277
291
  // Legacy interop
278
292
  LEGACY_PREPARE_WITHOUT_INJECTION_CONTEXT: 950,
293
+ LEGACY_QUERY_STATE_ALREADY_HAS_KEY: 951,
294
+ LEGACY_QUERY_STATE_DOES_NOT_CONTAIN_KEY: 952,
295
+ LEGACY_QUERY_STATE_CANNOT_TRANSFORM: 953,
296
+ LEGACY_INVALID_BODY: 954,
279
297
  };
280
298
  const queryFeatureUsedMultipleTimes = (type) => {
281
299
  return new RuntimeError(QueryRuntimeErrorCode.QUERY_FEATURE_USED_MULTIPLE_TIMES, `The query feature "${type}()" was used multiple times.`);
@@ -707,7 +725,10 @@ const withPageResetOnError = (options) => {
707
725
  const setupQueryState = (options) => {
708
726
  const request = signal(null, /* @ts-ignore */
709
727
  ...(ngDevMode ? [{ debugName: "request" }] : /* istanbul ignore next */ []));
710
- const rawResponse = linkedSignal(() => request()?.response() ?? null, /* @ts-ignore */
728
+ const rawResponse = linkedSignal(() => {
729
+ const raw = request()?.response() ?? null;
730
+ return options.devtoolsOverrides ? options.devtoolsOverrides.apply(raw) : raw;
731
+ }, /* @ts-ignore */
711
732
  ...(ngDevMode ? [{ debugName: "rawResponse" }] : /* istanbul ignore next */ []));
712
733
  const response = computed(() => {
713
734
  const raw = rawResponse();
@@ -973,10 +994,12 @@ const createBaseQuery = (options) => {
973
994
  return runInInjectionContext(deps.injector, () => {
974
995
  const devtoolsStats = createQueryDevtoolsStatsRecorder();
975
996
  const devtoolsFormLinks = createQueryDevtoolsFormLinksRecorder();
997
+ const devtoolsOverrides = createQueryDevtoolsOverridesRecorder();
976
998
  const state = setupQueryState({
977
999
  transformResponse: options.creator?.transformResponse,
978
1000
  devtoolsStats,
979
1001
  devtoolsFormLinks,
1002
+ devtoolsOverrides,
980
1003
  });
981
1004
  const flags = getQueryFeatureUsage(options);
982
1005
  const execute = options.executeFactory({
@@ -1000,7 +1023,7 @@ const createBaseQuery = (options) => {
1000
1023
  if (devtoolsStats) {
1001
1024
  const statsSubscription = state.events$.subscribe((event) => {
1002
1025
  if (event.type === 'error') {
1003
- devtoolsStats.recordError();
1026
+ devtoolsStats.recordError({ faulted: event.faulted });
1004
1027
  }
1005
1028
  else if (event.type === HttpEventType.Response) {
1006
1029
  devtoolsStats.recordResponse({ headers: event.headers, body: event.body });
@@ -1021,6 +1044,7 @@ const createBaseQuery = (options) => {
1021
1044
  clientRef: client,
1022
1045
  stats: devtoolsStats,
1023
1046
  formLinks: devtoolsFormLinks ?? undefined,
1047
+ overrides: devtoolsOverrides ?? undefined,
1024
1048
  route: options.creatorInternals.route ??
1025
1049
  options.creator?.route ??
1026
1050
  null,
@@ -1194,17 +1218,15 @@ const createBaseQueryCreator = (config) => {
1194
1218
  * Route building, query-string serialization and the token clock - shared by the current generation and
1195
1219
  * the legacy V2 client, which re-exports them under their original names.
1196
1220
  */
1197
- const buildErrorMessage = (code, message) => `[@ethlete\\query:${code}] ${message}`;
1198
- class QueryError extends Error {
1199
- constructor(code, message, data) {
1200
- super(buildErrorMessage(code, message));
1201
- this.name = 'QueryError';
1202
- this.data = data;
1203
- }
1204
- }
1205
- const invalidBaseRouteError = (data) => new QueryError('001', 'The baseRoute must not end with a slash', data);
1206
- const invalidRouteError = (data) => new QueryError('002', 'The route must start with a slash', data);
1207
- const pathParamsMissingInRouteFunctionError = (data) => new QueryError('003', 'The route is a function but pathParams are missing', data);
1221
+ // codes 1-99 of the shared 0-999 `@ethlete/query` range - see `query-errors.ts` for the rest
1222
+ const RouteRuntimeErrorCode = {
1223
+ INVALID_BASE_ROUTE: 1,
1224
+ INVALID_ROUTE: 2,
1225
+ PATH_PARAMS_MISSING_IN_ROUTE_FUNCTION: 3,
1226
+ };
1227
+ const invalidBaseRouteError = (data) => new RuntimeError(RouteRuntimeErrorCode.INVALID_BASE_ROUTE, 'The baseRoute must not end with a slash', data);
1228
+ const invalidRouteError = (data) => new RuntimeError(RouteRuntimeErrorCode.INVALID_ROUTE, 'The route must start with a slash', data);
1229
+ const pathParamsMissingInRouteFunctionError = (data) => new RuntimeError(RouteRuntimeErrorCode.PATH_PARAMS_MISSING_IN_ROUTE_FUNCTION, 'The route is a function but pathParams are missing', data);
1208
1230
  const isNaN$1 = (value) => typeof value === 'number' && Number.isNaN(value);
1209
1231
  const isEmptyString = (value) => typeof value === 'string' && value.trim() === '';
1210
1232
  const buildQueryString = (params, config) => {
@@ -1525,6 +1547,9 @@ const createHttpRequest = (options) => {
1525
1547
  ...(ngDevMode ? [{ debugName: "retryState" }] : /* istanbul ignore next */ []));
1526
1548
  const lastDurationMs = signal(null, /* @ts-ignore */
1527
1549
  ...(ngDevMode ? [{ debugName: "lastDurationMs" }] : /* istanbul ignore next */ []));
1550
+ // Set at the top of every `sendWithFaults` attempt (including unfaulted ones), so it always reflects
1551
+ // whichever attempt most recently settled - not just the first one, or a stale earlier attempt's fault.
1552
+ let lastAttemptFaulted = false;
1528
1553
  // NOTE: This must be a plain function, not a `computed`. The freshness check compares against
1529
1554
  // `Date.now()`, which is not reactive, so a memoized computed would only ever recompute when
1530
1555
  // `expiresIn` changes - once it evaluated to `false` (fresh) it would stay `false` forever, even
@@ -1573,6 +1598,7 @@ const createHttpRequest = (options) => {
1573
1598
  method: options.method,
1574
1599
  url: options.fullPath,
1575
1600
  });
1601
+ lastAttemptFaulted = !!fault && fault.status !== null;
1576
1602
  if (!fault)
1577
1603
  return send(headers);
1578
1604
  const { status } = fault;
@@ -1685,7 +1711,7 @@ const createHttpRequest = (options) => {
1685
1711
  error.set(errorRes);
1686
1712
  loading.set(null);
1687
1713
  lastDurationMs.set(Date.now() - lastExecuteTime());
1688
- const errorEvent = { type: 'error', error: errorRes };
1714
+ const errorEvent = { type: 'error', error: errorRes, faulted: lastAttemptFaulted };
1689
1715
  currentEvent.set(errorEvent);
1690
1716
  event$.next(errorEvent);
1691
1717
  options.dependencies.ngErrorHandler.handleError(errorRes.raw);
@@ -4230,7 +4256,7 @@ const deriveExecutionStateType = (builder, triggeredBy) => {
4230
4256
  return 'revocation';
4231
4257
  return builder.key;
4232
4258
  };
4233
- const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, latestNonInternalQuery, setTokens, executionState) => {
4259
+ const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, latestNonInternalQuery, applyTokens, executionState) => {
4234
4260
  const queries = {};
4235
4261
  const querySnapshots = new Map();
4236
4262
  for (const builder of builders) {
@@ -4248,7 +4274,7 @@ const setupBearerQueryRegistry = (builders, injector, latestExecutedQuery, lates
4248
4274
  if (response && !loading && !error) {
4249
4275
  try {
4250
4276
  const tokens = extractTokens(response);
4251
- setTokens(tokens.accessToken, tokens.refreshToken);
4277
+ applyTokens(tokens.accessToken, tokens.refreshToken);
4252
4278
  }
4253
4279
  catch (extractError) {
4254
4280
  if (isDevMode()) {
@@ -4381,12 +4407,19 @@ const createBearerAuthProviderImpl = (config) => {
4381
4407
  ...(ngDevMode ? [{ debugName: "latestNonInternalQuery" }] : /* istanbul ignore next */ []));
4382
4408
  const executionState = signal(null, /* @ts-ignore */
4383
4409
  ...(ngDevMode ? [{ debugName: "executionState" }] : /* istanbul ignore next */ []));
4384
- const setTokens = (access, refresh) => {
4410
+ const applyTokens = (access, refresh) => {
4385
4411
  accessToken.set(access);
4386
4412
  refreshToken.set(refresh);
4387
4413
  afterTokenRefresh$.next();
4388
4414
  };
4389
- const { queries } = setupBearerQueryRegistry(config.queries, injector, latestExecutedQuery, latestNonInternalQuery, setTokens, executionState);
4415
+ // Public entry point only - a query-driven login already reports its own, more specific
4416
+ // executionState (e.g. `{ type: 'login', state: 'success' }`) via setupBearerQueryRegistry's
4417
+ // execute(), so that internal path calls applyTokens directly to avoid stomping it with this.
4418
+ const setTokens = (access, refresh) => {
4419
+ applyTokens(access, refresh);
4420
+ executionState.set({ type: 'tokenSeed', state: 'success' });
4421
+ };
4422
+ const { queries } = setupBearerQueryRegistry(config.queries, injector, latestExecutedQuery, latestNonInternalQuery, applyTokens, executionState);
4390
4423
  const logout = () => {
4391
4424
  accessToken.set(null);
4392
4425
  refreshToken.set(null);
@@ -5415,6 +5448,325 @@ const createQueryDevtoolsFormLinks = () => {
5415
5448
  };
5416
5449
  };
5417
5450
 
5451
+ const pathsEqual = (a, b) => a.length === b.length && a.every((step, index) => step === b[index]);
5452
+ /**
5453
+ * Walks `path` into `root`, stopping as soon as a step's container doesn't exist. An empty path
5454
+ * resolves to `root` itself, which is how an op targets the response's top-level value.
5455
+ */
5456
+ const resolvePath = (root, path) => {
5457
+ if (path.length === 0)
5458
+ return { ok: true, exists: true, value: root };
5459
+ let current = root;
5460
+ for (let index = 0; index < path.length - 1; index++) {
5461
+ if (current === null || typeof current !== 'object')
5462
+ return { ok: false };
5463
+ const step = path[index];
5464
+ const container = current;
5465
+ if (!(step in container))
5466
+ return { ok: false };
5467
+ current = container[step];
5468
+ }
5469
+ if (current === null || typeof current !== 'object')
5470
+ return { ok: false };
5471
+ const key = path[path.length - 1];
5472
+ const container = current;
5473
+ const exists = key in container;
5474
+ return { ok: true, exists, value: exists ? container[key] : undefined };
5475
+ };
5476
+ /**
5477
+ * Returns a copy of `root` with `value` written at `path`, cloning only the containers along the way -
5478
+ * every sibling branch keeps its original reference. The final path segment does not need to already
5479
+ * exist (a `set` can add a new key); every segment before it does.
5480
+ */
5481
+ const withValueAtPath = (root, path, value) => {
5482
+ if (path.length === 0)
5483
+ return value;
5484
+ const [head, ...rest] = path;
5485
+ if (Array.isArray(root)) {
5486
+ const next = [...root];
5487
+ next[head] = withValueAtPath(root[head], rest, value);
5488
+ return next;
5489
+ }
5490
+ const container = root && typeof root === 'object' ? root : {};
5491
+ return { ...container, [head]: withValueAtPath(container[head], rest, value) };
5492
+ };
5493
+ const IDENTITY_KEY_PATTERNS = [/^id$/i, /(^|[a-z])Id$/, /^uuid$/i, /^key$/i];
5494
+ const isIdentityKey = (key) => IDENTITY_KEY_PATTERNS.some((pattern) => pattern.test(key));
5495
+ /** Whether every sibling in `array` that has `key` holds a distinct string/number value for it. */
5496
+ const isSiblingUniqueKey = (array, key) => {
5497
+ const seen = new Set();
5498
+ for (const item of array) {
5499
+ const value = item?.[key];
5500
+ if (value === undefined)
5501
+ continue;
5502
+ if (typeof value !== 'string' && typeof value !== 'number')
5503
+ return false;
5504
+ if (seen.has(value))
5505
+ return false;
5506
+ seen.add(value);
5507
+ }
5508
+ return seen.size > 0;
5509
+ };
5510
+ const nextNumericId = (array, key) => {
5511
+ let max = -Infinity;
5512
+ for (const item of array) {
5513
+ const value = item?.[key];
5514
+ if (typeof value === 'number' && value > max)
5515
+ max = value;
5516
+ }
5517
+ return Number.isFinite(max) ? max + 1 : 1;
5518
+ };
5519
+ const nextStringId = (array, key, base) => {
5520
+ const existing = new Set(array.map((item) => item?.[key]));
5521
+ let suffix = 1;
5522
+ while (existing.has(`${base}-copy-${suffix}`))
5523
+ suffix++;
5524
+ return `${base}-copy-${suffix}`;
5525
+ };
5526
+ /**
5527
+ * Clones `item` (a plain object array element) with every identity-shaped field replaced by a fresh
5528
+ * value, so a duplicated row never collides with the one it was copied from. A field counts as identity
5529
+ * when its key looks like one (`id`, `fooId`, `uuid`, `key`) or every sibling in `siblings` holds a
5530
+ * distinct value for it - without this, `track` bindings and detail-by-id lookups can't tell the copy
5531
+ * from the original.
5532
+ */
5533
+ const smartDuplicateArrayItem = (item, siblings) => {
5534
+ if (!item || typeof item !== 'object' || Array.isArray(item))
5535
+ return item;
5536
+ const source = item;
5537
+ const result = { ...source };
5538
+ for (const key of Object.keys(source)) {
5539
+ const value = source[key];
5540
+ if (!isIdentityKey(key) && !isSiblingUniqueKey(siblings, key))
5541
+ continue;
5542
+ if (typeof value === 'number')
5543
+ result[key] = nextNumericId(siblings, key);
5544
+ else if (typeof value === 'string')
5545
+ result[key] = nextStringId(siblings, key, value);
5546
+ }
5547
+ return result;
5548
+ };
5549
+ const duplicateOneArrayItem = (array, index) => {
5550
+ const copy = smartDuplicateArrayItem(array[index], array);
5551
+ const next = [...array];
5552
+ next.splice(index + 1, 0, copy);
5553
+ return next;
5554
+ };
5555
+ const duplicateWholeArray = (array) => {
5556
+ let result = [...array];
5557
+ for (const item of array)
5558
+ result = [...result, smartDuplicateArrayItem(item, result)];
5559
+ return result;
5560
+ };
5561
+ /**
5562
+ * Whether `value` structurally matches one of the pagination shapes shrink/extend know how to resize -
5563
+ * an `items` array plus a recognized combination of total/page/limit counters. Exported so the panel's
5564
+ * menu can offer shrink/extend only where it would actually apply.
5565
+ */
5566
+ const detectPaginationShape = (value) => {
5567
+ if (!value || typeof value !== 'object' || Array.isArray(value))
5568
+ return null;
5569
+ const obj = value;
5570
+ if (!Array.isArray(obj['items']))
5571
+ return null;
5572
+ const hasNumbers = (...keys) => keys.every((key) => typeof obj[key] === 'number');
5573
+ if (hasNumbers('totalHits', 'currentPage', 'totalPageCount', 'itemsPerPage'))
5574
+ return 'gg-like';
5575
+ if (hasNumbers('totalHits', 'currentPage', 'totalPages', 'limit'))
5576
+ return 'dyn-like';
5577
+ if (hasNumbers('totalPages', 'totalHits', 'currentPage', 'itemsPerPage'))
5578
+ return 'normalized';
5579
+ if (hasNumbers('limit', 'skip', 'total'))
5580
+ return 'contentful-gql-like';
5581
+ return null;
5582
+ };
5583
+ const DATE_KEY_PATTERN = /date|At$|Timestamp/i;
5584
+ const ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}([T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?(Z|[+-]\d{2}:?\d{2})?)?$/;
5585
+ /**
5586
+ * Whether a leaf is offered date presets instead of string presets: its key looks date-shaped
5587
+ * (`date`, `fooAt`, `fooTimestamp`) and its value round-trips through `Date.parse`, or the value
5588
+ * itself matches an ISO-8601 date/datetime pattern regardless of what its key is called. Exported so
5589
+ * the panel's menu can decide which preset list to show without duplicating the check.
5590
+ */
5591
+ const isDateShapedLeaf = (key, value) => {
5592
+ if (typeof value !== 'string')
5593
+ return false;
5594
+ if (typeof key === 'string' && DATE_KEY_PATTERN.test(key) && !Number.isNaN(Date.parse(value)))
5595
+ return true;
5596
+ return ISO_DATE_PATTERN.test(value);
5597
+ };
5598
+ /**
5599
+ * Every path under `value` (relative to it, not absolute) whose leaf is of `kind` - the paths a "fill
5600
+ * recursively" menu action turns into one `set`-family op each. Exported so the panel's menu builds the
5601
+ * op list with the exact same walk the docs describe, rather than a second, possibly-drifted one.
5602
+ */
5603
+ const collectLeafPaths = (value, kind) => {
5604
+ const paths = [];
5605
+ const walk = (node, path) => {
5606
+ if (Array.isArray(node)) {
5607
+ node.forEach((item, index) => walk(item, [...path, index]));
5608
+ return;
5609
+ }
5610
+ if (node && typeof node === 'object') {
5611
+ for (const [key, child] of Object.entries(node))
5612
+ walk(child, [...path, key]);
5613
+ return;
5614
+ }
5615
+ if (typeof node === kind)
5616
+ paths.push(path);
5617
+ };
5618
+ walk(value, []);
5619
+ return paths;
5620
+ };
5621
+ const resizePagination = (value, shape, mode, amount) => {
5622
+ const items = value['items'];
5623
+ let nextItems;
5624
+ if (mode === 'shrink') {
5625
+ nextItems = items.slice(0, Math.max(0, items.length - amount));
5626
+ }
5627
+ else if (items.length === 0) {
5628
+ // Nothing to clone a new item from - degrade to a no-op rather than inventing data out of thin air.
5629
+ nextItems = items;
5630
+ }
5631
+ else {
5632
+ nextItems = items;
5633
+ for (let i = 0; i < amount; i++) {
5634
+ nextItems = [...nextItems, smartDuplicateArrayItem(items[i % items.length], nextItems)];
5635
+ }
5636
+ }
5637
+ const delta = nextItems.length - items.length;
5638
+ const result = { ...value, items: nextItems };
5639
+ if (shape === 'gg-like') {
5640
+ result['totalHits'] = value['totalHits'] + delta;
5641
+ result['totalPageCount'] = Math.max(1, Math.ceil(result['totalHits'] / (value['itemsPerPage'] || 1)));
5642
+ }
5643
+ else if (shape === 'dyn-like') {
5644
+ result['totalHits'] = value['totalHits'] + delta;
5645
+ result['totalPages'] = Math.max(1, Math.ceil(result['totalHits'] / (value['limit'] || 1)));
5646
+ }
5647
+ else if (shape === 'normalized') {
5648
+ result['totalHits'] = value['totalHits'] + delta;
5649
+ result['totalPages'] = Math.max(1, Math.ceil(result['totalHits'] / (value['itemsPerPage'] || 1)));
5650
+ }
5651
+ else {
5652
+ result['total'] = value['total'] + delta;
5653
+ }
5654
+ return result;
5655
+ };
5656
+ const STRING_PRESETS = {
5657
+ short: 'Ab',
5658
+ long: /* @__PURE__ */ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt. '.repeat(4),
5659
+ unicode: 'مرحبا بالعالم 👋 日本語テスト 🎉 Ñoño',
5660
+ };
5661
+ const stringPresetValue = (preset, custom) => preset === 'custom' ? (custom ?? '') : STRING_PRESETS[preset];
5662
+ const NUMBER_PRESETS = {
5663
+ zero: 0,
5664
+ negative: -1,
5665
+ huge: Number.MAX_SAFE_INTEGER,
5666
+ };
5667
+ const numberPresetValue = (preset, custom) => preset === 'custom' ? (custom ?? 0) : NUMBER_PRESETS[preset];
5668
+ const DAY_MS = 24 * 60 * 60 * 1000;
5669
+ /** `invalid` is deliberately unparseable - "the API sent a date my code can't parse" is a real bug class. */
5670
+ const datePresetValue = (preset) => {
5671
+ switch (preset) {
5672
+ case 'now':
5673
+ return new Date().toISOString();
5674
+ case 'plusDay':
5675
+ return new Date(Date.now() + DAY_MS).toISOString();
5676
+ case 'minusDay':
5677
+ return new Date(Date.now() - DAY_MS).toISOString();
5678
+ case 'farFuture':
5679
+ return new Date('2099-01-01T00:00:00.000Z').toISOString();
5680
+ case 'farPast':
5681
+ return new Date(0).toISOString();
5682
+ case 'invalid':
5683
+ return 'not-a-date';
5684
+ }
5685
+ };
5686
+ const applyOp = (root, op) => {
5687
+ if (op.type === 'reset')
5688
+ return { root, ok: true };
5689
+ const resolution = resolvePath(root, op.path);
5690
+ if (!resolution.ok)
5691
+ return { root, ok: false };
5692
+ switch (op.type) {
5693
+ case 'set':
5694
+ return { root: withValueAtPath(root, op.path, op.value), ok: true };
5695
+ case 'booleanFlip':
5696
+ if (!resolution.exists || typeof resolution.value !== 'boolean')
5697
+ return { root, ok: false };
5698
+ return { root: withValueAtPath(root, op.path, !resolution.value), ok: true };
5699
+ case 'stringPreset':
5700
+ if (!resolution.exists)
5701
+ return { root, ok: false };
5702
+ return { root: withValueAtPath(root, op.path, stringPresetValue(op.preset, op.custom)), ok: true };
5703
+ case 'numberPreset':
5704
+ if (!resolution.exists)
5705
+ return { root, ok: false };
5706
+ return { root: withValueAtPath(root, op.path, numberPresetValue(op.preset, op.custom)), ok: true };
5707
+ case 'datePreset':
5708
+ if (!resolution.exists)
5709
+ return { root, ok: false };
5710
+ return { root: withValueAtPath(root, op.path, datePresetValue(op.preset)), ok: true };
5711
+ case 'duplicateArrayItem':
5712
+ if (!Array.isArray(resolution.value) || op.index < 0 || op.index >= resolution.value.length) {
5713
+ return { root, ok: false };
5714
+ }
5715
+ return { root: withValueAtPath(root, op.path, duplicateOneArrayItem(resolution.value, op.index)), ok: true };
5716
+ case 'duplicateArray':
5717
+ if (!Array.isArray(resolution.value))
5718
+ return { root, ok: false };
5719
+ return { root: withValueAtPath(root, op.path, duplicateWholeArray(resolution.value)), ok: true };
5720
+ case 'paginationResize': {
5721
+ const shape = detectPaginationShape(resolution.value);
5722
+ if (!shape)
5723
+ return { root, ok: false };
5724
+ return {
5725
+ root: withValueAtPath(root, op.path, resizePagination(resolution.value, shape, op.mode, op.amount)),
5726
+ ok: true,
5727
+ };
5728
+ }
5729
+ }
5730
+ };
5731
+ /**
5732
+ * Replays `entries` against `raw`, in order, and reports which ones no longer resolve. Shared by the
5733
+ * pipeline (which only needs {@link value}) and the panel's menu (which previews a value and marks stale
5734
+ * ops before arming a new one) - one implementation, so the two cannot drift.
5735
+ */
5736
+ const applyQueryDevtoolsOverrides = (entries, raw) => {
5737
+ let root = raw;
5738
+ const staleIds = [];
5739
+ for (const entry of entries) {
5740
+ const applied = applyOp(root, entry.op);
5741
+ root = applied.root;
5742
+ if (!applied.ok)
5743
+ staleIds.push(entry.id);
5744
+ }
5745
+ return { value: root, staleIds };
5746
+ };
5747
+ /**
5748
+ * Accumulates the response overrides armed on one query, for the devtools panel. Only ever created
5749
+ * while {@link provideQueryDevtools} is installed - like {@link createQueryDevtoolsStats}, an app
5750
+ * without devtools pays nothing for it.
5751
+ * @internal
5752
+ */
5753
+ const createQueryDevtoolsOverrides = () => {
5754
+ const list = signal([], /* @ts-ignore */
5755
+ ...(ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []));
5756
+ let counter = 0;
5757
+ const arm = (op) => {
5758
+ if (op.type === 'reset') {
5759
+ list.update((current) => current.filter((entry) => !pathsEqual(entry.op.path, op.path)));
5760
+ return;
5761
+ }
5762
+ list.update((current) => [...current, { id: `override-${++counter}`, op }]);
5763
+ };
5764
+ const clear = (id) => list.update((current) => current.filter((entry) => entry.id !== id));
5765
+ const clearAll = () => list.set([]);
5766
+ const apply = (raw) => applyQueryDevtoolsOverrides(list(), raw).value;
5767
+ return { list: list.asReadonly(), arm, clear, clearAll, apply };
5768
+ };
5769
+
5418
5770
  const EMPTY_STATS = {
5419
5771
  executions: 0,
5420
5772
  requests: 0,
@@ -5428,6 +5780,7 @@ const EMPTY_STATS = {
5428
5780
  lastResponseAt: null,
5429
5781
  lastDurationMs: null,
5430
5782
  totalDurationMs: 0,
5783
+ lastResponseWasFaulted: false,
5431
5784
  };
5432
5785
  const textEncoder = typeof TextEncoder === 'function' ? /* @__PURE__ */ new TextEncoder() : null;
5433
5786
  const byteLengthOf = (text) => textEncoder?.encode(text).length ?? text.length;
@@ -5572,6 +5925,7 @@ const createQueryDevtoolsStats = () => {
5572
5925
  lastResponseAt: now,
5573
5926
  lastDurationMs: duration,
5574
5927
  totalDurationMs: current.totalDurationMs + (duration ?? 0),
5928
+ lastResponseWasFaulted: false,
5575
5929
  }));
5576
5930
  endRun({
5577
5931
  endedAt: now,
@@ -5581,8 +5935,12 @@ const createQueryDevtoolsStats = () => {
5581
5935
  hasResponse: true,
5582
5936
  });
5583
5937
  };
5584
- const recordError = () => {
5585
- stats.update((current) => ({ ...current, errors: current.errors + 1 }));
5938
+ const recordError = (options) => {
5939
+ stats.update((current) => ({
5940
+ ...current,
5941
+ errors: current.errors + 1,
5942
+ lastResponseWasFaulted: options?.faulted ?? false,
5943
+ }));
5586
5944
  endRun({ endedAt: Date.now(), status: 'error', receivedBytes: 0, response: null, hasResponse: false });
5587
5945
  };
5588
5946
  const recordRetry = ({ attempt }) => {
@@ -5762,6 +6120,7 @@ const registerEntry = (registration) => {
5762
6120
  createdAt: Date.now(),
5763
6121
  stats: registration.stats,
5764
6122
  formLinks: registration.formLinks,
6123
+ overrides: registration.overrides,
5765
6124
  };
5766
6125
  entries.update((list) => [...list, fullEntry]);
5767
6126
  return () => entries.update((list) => list.filter((e) => e.id !== fullEntry.id));
@@ -5785,6 +6144,7 @@ const provideQueryDevtools = () => {
5785
6144
  setQueryDevtoolsRegistrar(registerEntry);
5786
6145
  setQueryDevtoolsStatsFactory(createQueryDevtoolsStats);
5787
6146
  setQueryDevtoolsFormLinksFactory(createQueryDevtoolsFormLinks);
6147
+ setQueryDevtoolsOverridesFactory(createQueryDevtoolsOverrides);
5788
6148
  setQueryDevtoolsFaultResolver(resolveQueryDevtoolsFaultForAttempt);
5789
6149
  if (!isDevMode()) {
5790
6150
  console.warn('You are using the Query Devtools in production mode. This increases the size of your bundle and should only be used for development purposes.');
@@ -9536,19 +9896,19 @@ const removeFrom = (store, { where, id }) => {
9536
9896
  /**
9537
9897
  * @deprecated Part of the legacy (v2) query system. Migrate to the current query API - see https://ethlete-sdk-docs.web.app/query/migrating-from-v2, and run `nx g @ethlete/query:migrate-to-query-v3` to rewrite the mechanical parts. Intent to remove in v7.
9538
9898
  */
9539
- const queryStateAlreadyHasKeyError = (data) => new QueryError('004', 'The query state already contains the provided key', data);
9899
+ const queryStateAlreadyHasKeyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_ALREADY_HAS_KEY, 'The query state already contains the provided key', data);
9540
9900
  /**
9541
9901
  * @deprecated Part of the legacy (v2) query system. Migrate to the current query API - see https://ethlete-sdk-docs.web.app/query/migrating-from-v2, and run `nx g @ethlete/query:migrate-to-query-v3` to rewrite the mechanical parts. Intent to remove in v7.
9542
9902
  */
9543
- const queryStateDoesNotContainKeyError = (data) => new QueryError('005', 'The query state does not contain the provided key', data);
9903
+ const queryStateDoesNotContainKeyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_DOES_NOT_CONTAIN_KEY, 'The query state does not contain the provided key', data);
9544
9904
  /**
9545
9905
  * @deprecated Part of the legacy (v2) query system. Migrate to the current query API - see https://ethlete-sdk-docs.web.app/query/migrating-from-v2, and run `nx g @ethlete/query:migrate-to-query-v3` to rewrite the mechanical parts. Intent to remove in v7.
9546
9906
  */
9547
- const queryStateCannotTransformError = (data) => new QueryError('006', 'The query state cannot be transformed because it is not loading', data);
9907
+ const queryStateCannotTransformError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_QUERY_STATE_CANNOT_TRANSFORM, 'The query state cannot be transformed because it is not loading', data);
9548
9908
  /**
9549
9909
  * @deprecated Part of the legacy (v2) query system. Migrate to the current query API - see https://ethlete-sdk-docs.web.app/query/migrating-from-v2, and run `nx g @ethlete/query:migrate-to-query-v3` to rewrite the mechanical parts. Intent to remove in v7.
9550
9910
  */
9551
- const invalidBodyError = (data) => new QueryError('007', 'The body is not valid or upsupported', data);
9911
+ const invalidBodyError = (data) => new RuntimeError(QueryRuntimeErrorCode.LEGACY_INVALID_BODY, 'The body is not valid or upsupported', data);
9552
9912
 
9553
9913
  /**
9554
9914
  * Binds a query-backed async validator to a signal-forms field, adapting a **legacy v2**
@@ -11307,5 +11667,5 @@ const createWebSocketClient = (options) => {
11307
11667
  * Generated bundle index. Do not edit.
11308
11668
  */
11309
11669
 
11310
- export { BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, CustomHeaderAuthProvider, DEFAULT_KEEP_UNUSED_FOR, DEFAULT_QUERY_PERSISTENCE_MAX_AGE, DEFAULT_QUERY_PERSISTENCE_MAX_ENTRIES, DEFAULT_QUERY_PERSISTENCE_VERSION, DEFAULT_QUERY_PERSISTENCE_WRITE_DELAY, DateArrayQueryField, DateQueryField, EMPTY_QUERY_DEVTOOLS_FAULT, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryError, QueryFeatureType, QueryField, QueryForm, QueryFormSignals, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, applyQueryFeatures, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildErrorMessage, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsFaults, collectQueryFormLinks, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, consumeSuppressQueryStackDevtools, contentfulGqlLikePaginationAdapter, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryDevtoolsFormLinks, createQueryDevtoolsFormLinksRecorder, createQueryDevtoolsStats, createQueryDevtoolsStatsRecorder, createQueryErrorResponse, createQueryFeature, createQueryForm, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySyncEngine, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, describeQueryDevtoolsFeatures, detectContentTypeHeader, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, formatQueryDevtoolsDuration, getBearerAuthProviderName, getDefaultHeaders, getQueryClientName, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, hasHeader, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isLegacyQuery, isNaN$1 as isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsFaultInjectionEnabled, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareFallbackInjector, legacyPrepareWithoutInjectionContext, mapToPaginated, mapViolationsToFormErrors, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, noteQueryFormRead, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryRoute, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFnDetail, queryErrorMessage, queryErrorMessages, queryExecute, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackTotalQueriesAndExpectedQueriesMismatch, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, registerQueryDevtoolsEntry, registerQueryErrorParser, removeFrom, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryDevtoolsFault, resolveQueryDevtoolsFaultForAttempt, runDefaultQueryRetry, runQueryErrorParsers, searchQueryField, serializeBody, setDefaultQueryRetryFn, setQueryDevtoolsFault, setQueryDevtoolsFaultResolver, setQueryDevtoolsFormLinksFactory, setQueryDevtoolsRegistrar, setQueryDevtoolsStatsFactory, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, suppressNextQueryStackDevtools, switchQueryCollectionState, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage };
11670
+ export { BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, CustomHeaderAuthProvider, DEFAULT_KEEP_UNUSED_FOR, DEFAULT_QUERY_PERSISTENCE_MAX_AGE, DEFAULT_QUERY_PERSISTENCE_MAX_ENTRIES, DEFAULT_QUERY_PERSISTENCE_VERSION, DEFAULT_QUERY_PERSISTENCE_WRITE_DELAY, DateArrayQueryField, DateQueryField, EMPTY_QUERY_DEVTOOLS_FAULT, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryFormSignals, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, applyQueryDevtoolsOverrides, applyQueryFeatures, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsFaults, collectLeafPaths, collectQueryFormLinks, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, consumeSuppressQueryStackDevtools, contentfulGqlLikePaginationAdapter, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryDevtoolsFormLinks, createQueryDevtoolsFormLinksRecorder, createQueryDevtoolsOverrides, createQueryDevtoolsOverridesRecorder, createQueryDevtoolsStats, createQueryDevtoolsStatsRecorder, createQueryErrorResponse, createQueryFeature, createQueryForm, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySyncEngine, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, describeQueryDevtoolsFeatures, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, formatQueryDevtoolsDuration, getBearerAuthProviderName, getDefaultHeaders, getQueryClientName, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, hasHeader, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isLegacyQuery, isNaN$1 as isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsFaultInjectionEnabled, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareFallbackInjector, legacyPrepareWithoutInjectionContext, mapToPaginated, mapViolationsToFormErrors, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, noteQueryFormRead, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryRoute, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFnDetail, queryErrorMessage, queryErrorMessages, queryExecute, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackTotalQueriesAndExpectedQueriesMismatch, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, registerQueryDevtoolsEntry, registerQueryErrorParser, removeFrom, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryDevtoolsFault, resolveQueryDevtoolsFaultForAttempt, runDefaultQueryRetry, runQueryErrorParsers, searchQueryField, serializeBody, setDefaultQueryRetryFn, setQueryDevtoolsFault, setQueryDevtoolsFaultResolver, setQueryDevtoolsFormLinksFactory, setQueryDevtoolsOverridesFactory, setQueryDevtoolsRegistrar, setQueryDevtoolsStatsFactory, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, suppressNextQueryStackDevtools, switchQueryCollectionState, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage };
11311
11671
  //# sourceMappingURL=ethlete-query.mjs.map