@ethlete/query 6.0.0-next.51 → 6.0.0-next.53

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/fesm2022/ethlete-query-ngrx-toolkit.mjs +393 -0
  3. package/fesm2022/ethlete-query-ngrx-toolkit.mjs.map +1 -0
  4. package/fesm2022/ethlete-query-testing.mjs +67 -25
  5. package/fesm2022/ethlete-query-testing.mjs.map +1 -1
  6. package/fesm2022/ethlete-query.mjs +7895 -7226
  7. package/fesm2022/ethlete-query.mjs.map +1 -1
  8. package/generators/generators.json +5 -0
  9. package/generators/migrate-from-ngrx-toolkit/args-assignability.js +140 -0
  10. package/generators/migrate-from-ngrx-toolkit/consumers.js +521 -0
  11. package/generators/migrate-from-ngrx-toolkit/creators.js +301 -0
  12. package/generators/migrate-from-ngrx-toolkit/facade.js +295 -0
  13. package/generators/migrate-from-ngrx-toolkit/feature.js +513 -0
  14. package/generators/migrate-from-ngrx-toolkit/migration.js +140 -0
  15. package/generators/migrate-from-ngrx-toolkit/report.js +154 -0
  16. package/generators/migrate-from-ngrx-toolkit/schema.json +42 -0
  17. package/generators/migrate-from-ngrx-toolkit/store-removal.js +633 -0
  18. package/generators/migrate-from-ngrx-toolkit/ts-edits.js +128 -0
  19. package/generators/migrate-query-opt-in-features/migration.js +10 -9
  20. package/generators/migrate-to-query-v3/auth-provider-scaffold.js +29 -2
  21. package/generators/migrate-to-query-v3/cleanup-migration.js +163 -53
  22. package/generators/migrate-to-query-v3/legacy-query-creator-migration.js +39 -2
  23. package/generators/migrate-to-query-v3/migration-scope.js +2 -0
  24. package/generators/migrate-to-query-v3/migration.js +5 -4
  25. package/generators/migrate-to-query-v3/module-graph.js +41 -29
  26. package/generators/migrate-to-query-v3/query-client-migration.js +209 -126
  27. package/generators/migrate-to-query-v3/rename-symbols.js +38 -11
  28. package/generators/migrate-to-query-v3/report.js +40 -7
  29. package/generators/migrate-to-query-v3/shared.js +46 -1
  30. package/generators/prep-for-query-v3/migration.js +400 -57
  31. package/migrations/query-field-default-types.md +43 -0
  32. package/migrations/search-query-field-string.md +43 -0
  33. package/migrations.json +16 -0
  34. package/package.json +5 -1
  35. package/types/ethlete-query-ngrx-toolkit.d.ts +143 -0
  36. package/types/ethlete-query-testing.d.ts +28 -11
  37. package/types/ethlete-query.d.ts +789 -584
@@ -2,11 +2,11 @@ import { CanMatchFn, CanActivateFn, UrlTree, Router, NavigationBehaviorOptions }
2
2
  import * as rxjs from 'rxjs';
3
3
  import { Observable, Subscribable, BehaviorSubject, Subject } from 'rxjs';
4
4
  import * as _angular_core from '@angular/core';
5
- import { DestroyRef, EnvironmentInjector, ErrorHandler, WritableSignal, Signal, Injector, CreateEffectOptions, EnvironmentProviders, CreateComputedOptions, InjectionToken, TrackByFunction, PipeTransform, OnInit, OnDestroy } from '@angular/core';
5
+ import { DestroyRef, EnvironmentInjector, ErrorHandler, Signal, WritableSignal, Injector, CreateEffectOptions, EnvironmentProviders, CreateComputedOptions, InjectionToken, TrackByFunction, PipeTransform, OnInit, OnDestroy } from '@angular/core';
6
6
  import * as _ethlete_core from '@ethlete/core';
7
7
  import { ProviderDefinition, RuntimeError } from '@ethlete/core';
8
8
  import * as _angular_common_http from '@angular/common/http';
9
- import { HttpClient, HttpErrorResponse, HttpHeaders, HttpEvent, HttpStatusCode } from '@angular/common/http';
9
+ import { HttpClient, HttpErrorResponse, HttpHeaders, HttpEvent, HttpContextToken, HttpStatusCode } from '@angular/common/http';
10
10
  import * as _ethlete_query from '@ethlete/query';
11
11
  import { NormalizedPagination, ContentfulGqlLikePaginated, DynLikePaginated, Paginated, GgLikePaginated, FormViolationListView, FormViolationView } from '@ethlete/types';
12
12
  import { FieldTree, ValidationError, TreeValidationResult, PathKind, FieldContext, SchemaPath, SchemaPathRules } from '@angular/forms/signals';
@@ -248,344 +248,6 @@ declare const createQueryErrorResponse: (error: unknown, retry?: {
248
248
  idempotent?: boolean;
249
249
  }) => QueryErrorResponse;
250
250
 
251
- type ResetExecuteStateOptions<TArgs extends QueryArgs> = {
252
- executeOptions: Pick<CreateQueryExecuteOptions<TArgs>, 'state' | 'deps'>;
253
- executeState: QueryExecuteState;
254
- };
255
- declare const resetExecuteState: <TArgs extends QueryArgs>(options: ResetExecuteStateOptions<TArgs>) => void;
256
- type QueryExecuteState = {
257
- previousKey: WritableSignal<string | null>;
258
- };
259
- declare const setupQueryExecuteState: () => QueryExecuteState;
260
- type RunQueryExecuteOptions = {
261
- allowCache?: boolean;
262
- triggeredBy?: string;
263
- /**
264
- * Overrides the creator's (and the client's) `keepUnusedFor` for this execution. A cache entry shared
265
- * by several queries keeps the shortest retention of the queries currently bound to it, so a query
266
- * that asks for a shorter one only shortens the entry until it releases the entry again.
267
- */
268
- keepUnusedFor?: number;
269
- };
270
- type QueryExecuteOptions<TArgs extends QueryArgs> = {
271
- executeOptions: CreateQueryExecuteOptions<TArgs>;
272
- executeState: QueryExecuteState;
273
- args: RequestArgs<TArgs> | null;
274
- options?: RunQueryExecuteOptions;
275
- isSecure?: boolean;
276
- /** @see QueryRepositoryRequestOptions.isRefreshable */
277
- isRefreshable?: boolean;
278
- };
279
- declare const queryExecute: <TArgs extends QueryArgs>(options: QueryExecuteOptions<TArgs>) => void;
280
- /**
281
- * Throws `ET800` once the same query runs with identical args more than five times in a row, each run
282
- * less than 100 ms after the previous one. Executions with different args (a search term typed fast,
283
- * a slider bound to `withArgs`) never count against each other.
284
- */
285
- declare const circularQueryDependencyChecker: () => {
286
- check: (args: RequestArgs<QueryArgs> | null | undefined) => void;
287
- };
288
-
289
- /**
290
- * Why a batch of in-use entries was refreshed. The answer to "why did this refetch?", which the query
291
- * devtools spell out per query - the entries themselves only ever see a forced execution.
292
- */
293
- type QueryRefreshCause = {
294
- /**
295
- * - `refresh` - {@link QueryClient.refreshQueriesInUse}, which narrows nothing.
296
- * - `invalidation` - {@link QueryClient.invalidateQueries}.
297
- * - `mutation` - the multi-tab sync engine reacting to a mutation another tab made.
298
- */
299
- type: 'refresh' | 'invalidation' | 'mutation';
300
- /** The URL the refresh was narrowed to (an invalidation's scope, a mutation's URL), or `null`. */
301
- url: string | null;
302
- /** Whether another tab asked for it rather than this one. */
303
- otherTab: boolean;
304
- };
305
- /**
306
- * What tore a cache entry down: the last consumer went away (`unbind`), its `keepUnusedFor` window ran
307
- * out (`expired`), it was the least recently orphaned entry over the cap (`unused-cap`), a logout
308
- * dropped every secure entry (`logout`), or something evicted it by hand (`manual`).
309
- */
310
- type QueryRepositoryEntryDestroyedCause = 'unbind' | 'expired' | 'unused-cap' | 'logout' | 'manual';
311
- type QueryRepositoryEvent = {
312
- type: 'request-error';
313
- error: HttpErrorResponse;
314
- key: QueryKey;
315
- isSecure: boolean;
316
- request: HttpRequest<QueryArgs>;
317
- } | {
318
- type: 'request-success';
319
- key: QueryKey;
320
- isSecure: boolean;
321
- request: HttpRequest<QueryArgs>;
322
- /**
323
- * Whether the request is held in the cache under a key every tab derives identically (a hash of
324
- * route + args) rather than a per-request UUID. `false` for mutations and anything else
325
- * uncacheable - which is exactly what tells the multi-tab sync engine whether a settled request
326
- * is a shareable read or a mutation other tabs should react to.
327
- */
328
- isCached: boolean;
329
- /** @see BaseQueryCreatorOptions.multiTabSync */
330
- isMultiTabSyncEnabled: boolean;
331
- /** @see QueryRepositoryRequestOptions.isRefreshable */
332
- isRefreshable: boolean;
333
- /**
334
- * Whether this response may be written to the client's persisted store. Already accounts for
335
- * secure requests needing an explicit opt-in.
336
- *
337
- * @see BaseQueryCreatorOptions.persistence
338
- */
339
- isPersistEnabled: boolean;
340
- } | {
341
- /**
342
- * A cache entry was created - the query behind it had nothing to bind to, so this is the moment a
343
- * response from a previous session can still be of use. The persistence engine answers it by
344
- * reading the key back from disk.
345
- *
346
- * Only ever emitted for entries that did not exist before; a consumer binding to an entry that is
347
- * already there is not one of these.
348
- */
349
- type: 'entry-created';
350
- key: QueryKey;
351
- /** @see QueryRepositoryEvent.isCached */
352
- isCached: boolean;
353
- /** @see QueryRepositoryEvent.isPersistEnabled */
354
- isPersistEnabled: boolean;
355
- } | {
356
- /**
357
- * A batch of in-use entries was re-executed at once. Emitted for every
358
- * {@link QueryRepository.refreshInUse} call, including one that matched nothing - "the
359
- * invalidation ran and hit no query" is an answer too.
360
- */
361
- type: 'queries-refreshed';
362
- cause: QueryRefreshCause;
363
- /** The requests that were re-executed, in cache order. */
364
- requests: HttpRequest<QueryArgs>[];
365
- } | {
366
- /**
367
- * A cache entry was torn down: its request is destroyed and the key is gone from the cache.
368
- * Emitted after the deletion, and for every teardown path there is - which is what makes "why
369
- * did this entry disappear" answerable at all. {@link unbindAllSecure} emits one of these per
370
- * entry as well as its own `unbind-all-secure`.
371
- *
372
- * The repository keeps no record of its own; a consumer that wants a history of destroyed
373
- * entries (the devtools panel) is the one that keeps it.
374
- */
375
- type: 'entry-destroyed';
376
- key: QueryKey;
377
- isSecure: boolean;
378
- method: QueryMethod;
379
- url: string;
380
- cause: QueryRepositoryEntryDestroyedCause;
381
- } | {
382
- /**
383
- * Every secure entry was torn down at once - a logout. Emitted after the cache is cleared so
384
- * secure queries can drop the state they hold themselves; the repository only owns the
385
- * requests, not the `response` signal of the query objects bound to them.
386
- */
387
- type: 'unbind-all-secure';
388
- };
389
- type QueryRepositoryRequestOptions<TArgs extends QueryArgs> = {
390
- /**
391
- * The route of the request.
392
- * @example '/users'
393
- * @example (args) => `/users/${args.userId}`
394
- */
395
- route: RouteType<TArgs>;
396
- /** The HTTP method of the request */
397
- method: QueryMethod;
398
- /** If the request is secure (needs authentication) */
399
- isSecure?: boolean;
400
- /** The data of the request */
401
- args?: RequestArgs<TArgs> | null;
402
- /** The query creator options of the request */
403
- creatorOptions?: CreateQueryCreatorOptions;
404
- /** Custom retry function for this specific request */
405
- retryFn?: ShouldRetryRequestFn;
406
- /** If set, this request's cache key will be prefixed with this key */
407
- key?: string;
408
- /** The previous tracking key of the request */
409
- previousKey?: QueryKey | null;
410
- /** The destroy ref to bind the request to. If the destroy ref is destroyed, the request will be destroyed as well. */
411
- consumerDestroyRef: DestroyRef;
412
- /** Configuration on how to run the query */
413
- runQueryOptions?: RunQueryExecuteOptions;
414
- /** @see QueryConfig.silenceUncacheableAllowCacheError */
415
- silenceUncacheableAllowCacheError?: boolean;
416
- /**
417
- * Whether re-running the request on its own is safe, i.e. whether {@link QueryRepository.refreshInUse}
418
- * may fire it again. Defaults to the method being a read (`GET`/`HEAD`/`OPTIONS`); the GraphQL
419
- * execute path passes `true` for a query transported via `POST`. Also what the retry policy receives
420
- * as `idempotent`; unset, that falls back to the method not being `POST` or `PATCH`.
421
- */
422
- isRefreshable?: boolean;
423
- };
424
- type QueryRepositoryItem<TArgs extends QueryArgs> = {
425
- /** The key of the request (either a cache key for cacheable requests or a UUID for uncacheable requests) */
426
- key: QueryKey;
427
- /** The request object */
428
- request: HttpRequest<TArgs>;
429
- /**
430
- * Whether this call started a network request. `false` when a fresh cache entry answered it, or when
431
- * an identical request was already in flight - the consumer is bound to that request either way and
432
- * still gets its response.
433
- */
434
- executed: boolean;
435
- };
436
- /**
437
- * A read-only snapshot of a single cache entry, exposed via {@link QueryRepositorySubtle.cacheEntries}
438
- * for devtools inspection. The raw cache `Map` is never exposed.
439
- */
440
- type QueryRepositoryCacheEntry = {
441
- /** The cache key of the entry. */
442
- key: QueryKey;
443
- /** Whether the entry belongs to a secure (authenticated) request. */
444
- isSecure: boolean;
445
- /** How many consumers currently hold a binding to the entry. */
446
- consumerCount: number;
447
- /**
448
- * Whether the entry has no consumers left and is only being kept around for its
449
- * `keepUnusedFor` window. Such an entry is not a leak - it is waiting to be reused by a
450
- * consumer that comes back.
451
- */
452
- isUnused: boolean;
453
- /** The underlying HTTP request. */
454
- request: HttpRequest<QueryArgs>;
455
- };
456
- /**
457
- * Advanced repository internals used by the query devtools. **Not part of the general public
458
- * contract** - do not build application logic on top of these.
459
- */
460
- type QueryRepositorySubtle = {
461
- /** Returns a read-only snapshot of every entry currently held in the cache. */
462
- cacheEntries: () => QueryRepositoryCacheEntry[];
463
- /** A version counter bumped whenever the cache changes (bind / unbind / unbindAllSecure). */
464
- cacheVersion: Signal<number>;
465
- /**
466
- * Destroys and removes a single cache entry by key, regardless of its consumers. Intended for
467
- * devtools cache management - consumers still holding the query will get a fresh request on their
468
- * next execution.
469
- */
470
- evict: (key: QueryKey) => void;
471
- };
472
- /**
473
- * Narrows which in-use entries a {@link QueryRepository.refreshInUse} call refreshes. Returning
474
- * `false` leaves the entry alone.
475
- */
476
- type QueryRepositoryRefreshFilterFn = (request: HttpRequest<QueryArgs>) => boolean;
477
- /** @see QueryRepository.applyExternalResponse */
478
- type ApplyExternalResponseOptions = {
479
- /** The cache key the response belongs to. */
480
- key: QueryKey;
481
- /** The response body, as received from the other tab. */
482
- body: unknown;
483
- /** Timestamp (ms) at which the response goes stale, or `null` when it has no freshness window. */
484
- expiresAt: number | null;
485
- };
486
- /** @see QueryRepository.applyPersistedResponse */
487
- type ApplyPersistedResponseOptions = {
488
- /** The cache key the response belongs to. */
489
- key: QueryKey;
490
- /** The response body, as it was read back from the store. */
491
- body: unknown;
492
- /**
493
- * Timestamp (ms) at which the response goes stale, as it was when the response was persisted - so
494
- * usually in the past, which is exactly right: the entry revalidates and the data is shown meanwhile.
495
- */
496
- expiresAt: number | null;
497
- };
498
- /**
499
- * The query repository is responsible for managing all requests and their consumers.
500
- * It will cache requests if they can be cached and reuse them if they are already cached.
501
- * It will also destroy requests if there are no more consumers left.
502
- */
503
- type QueryRepository = {
504
- /** Creates a new request. If the request is already cached, it will be reused. */
505
- request: <TArgs extends QueryArgs>(options: QueryRepositoryRequestOptions<TArgs>) => QueryRepositoryItem<TArgs>;
506
- /** Removes a consumer from a request by its key. Destroys the request if there are no more consumers left. */
507
- unbind: (key: QueryKey | null, consumerDestroyRef: DestroyRef) => boolean;
508
- /** Removes all secure requests and their consumers */
509
- unbindAllSecure: () => void;
510
- /**
511
- * Re-executes every cacheable entry that still has consumers, bypassing the cache and restarting
512
- * in-flight requests. Entries kept only for their `keepUnusedFor` window are skipped - nobody is
513
- * looking at them, and they revalidate on their own when a consumer binds again.
514
- *
515
- * Pass a filter to narrow it down to a subset of those entries, and a cause to describe what asked
516
- * for it - which is what the devtools report as the reason a query refetched.
517
- *
518
- * @see QueryClient.refreshQueriesInUse
519
- */
520
- refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause) => void;
521
- /**
522
- * Writes a response that another tab received onto the matching cache entry, so the same query
523
- * shows the same data everywhere without a second network request.
524
- *
525
- * Returns whether it was applied. It is skipped when
526
- * - no entry exists for the key: cold entries are never seeded on speculation, that would be
527
- * unbounded memory for data nobody in this tab is looking at,
528
- * - the entry's creator opted out of {@link BaseQueryCreatorOptions.multiTabSync},
529
- * - or the entry has a request in flight, which is at least as fresh and overwrites this anyway.
530
- *
531
- * Entries sitting out their `keepUnusedFor` window without consumers *are* updated - it costs
532
- * nothing and means a returning consumer renders data that is current rather than merely recent.
533
- */
534
- applyExternalResponse: (options: ApplyExternalResponseOptions) => boolean;
535
- /**
536
- * Writes a response from a previous session - read back from the client's persisted store - onto a
537
- * cache entry that has nothing of its own yet.
538
- *
539
- * Returns whether it was applied. It is skipped when
540
- * - no entry exists for the key: the entry was destroyed again while the store was being read,
541
- * - the entry's creator opted out of {@link BaseQueryCreatorOptions.persistence},
542
- * - or the entry already holds a response - from its own request, or from another tab. Persisted data
543
- * only ever fills a gap; it never replaces something newer.
544
- *
545
- * Note that the entry's request is *not* stopped: hydration happens while it is already in flight, so
546
- * persisted data is always shown alongside a revalidation rather than instead of one. An entry whose
547
- * request already failed keeps its error, which is what makes the offline case honest - the data is
548
- * from disk, and the attempt to refresh it did fail.
549
- */
550
- applyPersistedResponse: (options: ApplyPersistedResponseOptions) => boolean;
551
- /** Observable stream of repository events (errors, successes, etc.) */
552
- events$: Observable<QueryRepositoryEvent>;
553
- /** Advanced repository internals used by the query devtools. */
554
- subtle: QueryRepositorySubtle;
555
- };
556
- /** The key of a query (either a cache key for cacheable requests or a UUID for uncacheable requests) */
557
- type QueryKey = string;
558
- /** Runs .unbind() if the DestroyRef.onDestroy() gets called */
559
- type DestroyCleanupCallback = () => void;
560
- type QueryRepositoryDependencies = {
561
- /** The HTTP client to use for the requests */
562
- httpClient: HttpClient;
563
- /** The error handler to use for the requests */
564
- ngErrorHandler: ErrorHandler;
565
- /** The injector to use for reactive operations like signal->observable conversions */
566
- injector: Injector;
567
- };
568
- type CreateQueryRepositoryConfig = CreateQueryClientConfigOptions & {
569
- /** The dependencies of the query repository */
570
- dependencies: QueryRepositoryDependencies;
571
- /**
572
- * Whether unused entries may be retained at all. `false` forces `keepUnusedFor` to `0` everywhere,
573
- * regardless of client or creator configuration - used to disable retention on the server, where a
574
- * per-request injector must not hold response bodies (and a pending timer) for minutes.
575
- * @default true
576
- */
577
- retentionEnabled?: boolean;
578
- };
579
- /** @see CreateQueryClientConfigOptions.keepUnusedFor */
580
- declare const DEFAULT_KEEP_UNUSED_FOR = 300000;
581
- /**
582
- * Hard cap on entries kept without consumers, per client. Retention is opportunistic, so a runaway
583
- * count (a search-as-you-type query produces a new cache key per keystroke, and each one goes through
584
- * `unbind`) must never grow unbounded - the least recently orphaned entries are dropped first.
585
- */
586
- declare const MAX_UNUSED_ENTRIES = 50;
587
- declare const createQueryRepository: (config: CreateQueryRepositoryConfig) => QueryRepository;
588
-
589
251
  /** Which query forms a query reads while it builds its args. */
590
252
  type QueryDevtoolsFormLinksHandle = {
591
253
  /**
@@ -835,229 +497,586 @@ type QueryDevtoolsPayload = {
835
497
  body: unknown;
836
498
  };
837
499
  /**
838
- * How one run of a query ended. `aborted` is a run whose query started another request before the
839
- * response arrived - the previous request's events are unbound at that point, so the response it was
840
- * waiting for can no longer reach it.
500
+ * How one run of a query ended. `aborted` is a run whose query started another request before the
501
+ * response arrived - the previous request's events are unbound at that point, so the response it was
502
+ * waiting for can no longer reach it.
503
+ */
504
+ type QueryDevtoolsRunStatus = 'pending' | 'success' | 'error' | 'aborted';
505
+ /**
506
+ * How a run failed, kept on the run itself. The query's own `error` signal is the live one, but it is
507
+ * blanked whenever the query resets - a logout resets every secure query - so it cannot be read back
508
+ * after the fact. This is the copy that survives.
509
+ */
510
+ type QueryDevtoolsRunError = {
511
+ /** The HTTP status code, or 0 for a failure that never reached a response. */
512
+ code: number;
513
+ /** Every message the error carried, flattened. @see queryErrorMessages */
514
+ messages: string[];
515
+ /**
516
+ * The error response body. Only the newest few runs keep theirs, under the same budget as
517
+ * {@link QueryDevtoolsRun.response}.
518
+ */
519
+ body: unknown;
520
+ /** Whether {@link body} still holds this run's error body. */
521
+ hasBody: boolean;
522
+ };
523
+ /**
524
+ * A single run of a query, kept alongside the running totals so overlapping runs stay tellable apart -
525
+ * which is what turns "ran 40 times" into "ran 40 times in two seconds".
526
+ */
527
+ type QueryDevtoolsRun = {
528
+ /**
529
+ * Position in the query's lifetime, 1-based. Keeps climbing past the runs the buffer has dropped, so
530
+ * it is a stable identity as well as a run number.
531
+ */
532
+ index: number;
533
+ startedAt: number;
534
+ /** When the run ended, or `null` while it is still in flight. */
535
+ endedAt: number | null;
536
+ status: QueryDevtoolsRunStatus;
537
+ /**
538
+ * Whether this run is a request of the query's own. A response that arrives without one was produced
539
+ * by something else - a poll, another consumer of the same cache entry, another tab - and is recorded
540
+ * as an instant, since only its arrival time is knowable.
541
+ */
542
+ didRequest: boolean;
543
+ /**
544
+ * The URL this run went to. Kept per run rather than read off the query: a query whose args changed
545
+ * between runs would otherwise label every older run with the URL it happens to hold now.
546
+ */
547
+ url: string | null;
548
+ /**
549
+ * How many HTTP attempts this run took - 1 unless the retry policy fired, and 0 for a run that made no
550
+ * request of its own. Which is what tells a slow response apart from one that was retried into place.
551
+ */
552
+ attempts: number;
553
+ /** The size of the request body this run sent. */
554
+ sentBytes: number;
555
+ /** The size of the response body it received, or 0 until one has. */
556
+ receivedBytes: number;
557
+ /**
558
+ * The response body, so one run can be diffed against another. Only the newest few runs keep theirs -
559
+ * a polling query would otherwise retain every response it ever received.
560
+ */
561
+ response: unknown;
562
+ /** Whether {@link response} still holds this run's body; a dropped and an empty body both read `null`. */
563
+ hasResponse: boolean;
564
+ /** How the run failed, or `null` for one that did not. */
565
+ error: QueryDevtoolsRunError | null;
566
+ };
567
+ /** The read side of a stats recorder, as a {@link QueryDevtoolsEntry} exposes it to the panel. */
568
+ type QueryDevtoolsStatsHandle = {
569
+ /** The live stats. */
570
+ current: Signal<QueryDevtoolsStats>;
571
+ /** The query's most recent runs, oldest first. Bounded - older runs are dropped as new ones arrive. */
572
+ runs: Signal<readonly QueryDevtoolsRun[]>;
573
+ /** Clears every counter, so a measurement can be scoped to a single interaction. */
574
+ reset: () => void;
575
+ };
576
+ /** The write side, used by the instrumentation inside the query itself. */
577
+ type QueryDevtoolsStatsRecorder = QueryDevtoolsStatsHandle & {
578
+ recordExecution: (options: {
579
+ /** Whether the execution started a request, as reported by the repository. */
580
+ didRequest: boolean;
581
+ /** The request body it sent, for the outgoing byte count. */
582
+ body?: unknown;
583
+ /** The URL it went to. @see QueryDevtoolsRun.url */
584
+ url?: string;
585
+ }) => void;
586
+ recordResponse: (payload: QueryDevtoolsPayload) => void;
587
+ recordError: (options?: {
588
+ /** Whether the error is a devtools fault rather than a real failure. */
589
+ faulted?: boolean;
590
+ /** The failure itself, for {@link QueryDevtoolsRun.error}. */
591
+ error?: QueryErrorResponse;
592
+ }) => void;
593
+ /**
594
+ * Raises the attempt count of the run in flight. Idempotent per attempt, so a caller driven off a
595
+ * signal may report the same attempt more than once without inflating {@link QueryDevtoolsStats.retries}.
596
+ */
597
+ recordRetry: (options: {
598
+ attempt: number;
599
+ }) => void;
600
+ };
601
+ /**
602
+ * How many bodies each query retains: what the panel's Settings tab asks for, or
603
+ * {@link QueryDevtoolsOptions.responseHistory}, or `5`. Only a run that still holds one can be an end of
604
+ * a response diff, so the panel reads this to say why an older run can no longer be picked.
605
+ *
606
+ * Part of the devtools contract. **Not part of the general public contract.**
607
+ */
608
+ declare const queryDevtoolsResponseHistory: () => number;
609
+ /**
610
+ * The size of a payload in bytes, and whether that size is the one that went over the wire. Only a
611
+ * `content-length` header is exact; everything else is measured by serializing the body.
612
+ *
613
+ * Part of the devtools contract - the panel measures the cache and the event log with it. **Not part of
614
+ * the general public contract.**
615
+ */
616
+ declare const measureQueryDevtoolsPayload: (payload: QueryDevtoolsPayload) => {
617
+ bytes: number;
618
+ isExact: boolean;
619
+ };
620
+ /**
621
+ * Adds up the stats of several entries, for a stack's or a client's total. `lastDurationMs` is taken from
622
+ * whichever entry responded most recently rather than summed.
623
+ */
624
+ declare const sumQueryDevtoolsStats: (handles: readonly (QueryDevtoolsStatsHandle | undefined)[]) => QueryDevtoolsStats;
625
+
626
+ type SetupQueryStateOptions<TArgs extends QueryArgs> = {
627
+ transformResponse?: (rawResponse: RawResponseType<TArgs>) => ResponseType<TArgs>;
628
+ destroyRef?: DestroyRef;
629
+ keepPreviousResponse?: boolean;
630
+ /**
631
+ * The devtools stats recorder to feed from this state's executions, or nothing when the devtools are
632
+ * not installed.
633
+ */
634
+ devtoolsStats?: QueryDevtoolsStatsRecorder | null;
635
+ /**
636
+ * The recorder that notes which query forms the args source reads, or nothing when the devtools are
637
+ * not installed.
638
+ */
639
+ devtoolsFormLinks?: QueryDevtoolsFormLinksRecorder | null;
640
+ /**
641
+ * The recorder of response overrides armed on this query, or nothing when the devtools are not
642
+ * installed. Replayed against every response that settles into {@link QueryState.rawResponse}.
643
+ */
644
+ devtoolsOverrides?: QueryDevtoolsOverridesRecorder | null;
645
+ };
646
+ type QueryStateSubtle<TArgs extends QueryArgs> = {
647
+ request: WritableSignal<HttpRequest<TArgs> | null>;
648
+ rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
649
+ /**
650
+ * Forwards the given request's discrete event stream onto the query-level `events$`.
651
+ * Called by `queryExecute` whenever a request is (re-)executed.
652
+ */
653
+ bindRequestEvents: (request: HttpRequest<TArgs>) => void;
654
+ /** Stops forwarding the current request's events; `reset()` detaches the query from its request with it. */
655
+ unbindRequestEvents: () => void;
656
+ /**
657
+ * Run options every execution of this query starts from; the options passed to one `execute()` win
658
+ * per field. Set by a feature during creation so it also covers executions the feature does not
659
+ * trigger itself (`withLongPolling` turns retention off for the `withArgs` round too).
660
+ */
661
+ defaultRunOptions: WritableSignal<RunQueryExecuteOptions | null>;
662
+ /**
663
+ * Consulted before `withArgs` or creation auto-executes the query; returning `false` skips that
664
+ * execution. Set by a feature during creation (`withLongPolling` holds its first round back while disabled).
665
+ */
666
+ autoExecuteGuard: WritableSignal<(() => boolean) | null>;
667
+ /**
668
+ * Installs the reactive source that backs `state.args`. The `withArgs` feature uses this so that
669
+ * `state.args` always reflects the latest args (pulled from the reactive source on read) instead
670
+ * of being push-updated by an effect that may not have run yet. Without a `withArgs` feature the
671
+ * default source returns `null`.
672
+ */
673
+ setArgsSource: (source: () => RequestArgs<TArgs> | null) => void;
674
+ /** Whether {@link setArgsSource} installed a source. Without one, an execution's args are written to `state.args`. */
675
+ hasArgsSource: Signal<boolean>;
676
+ /** @see SetupQueryStateOptions.devtoolsStats */
677
+ devtoolsStats: QueryDevtoolsStatsRecorder | null;
678
+ /** @see SetupQueryStateOptions.devtoolsFormLinks */
679
+ devtoolsFormLinks: QueryDevtoolsFormLinksRecorder | null;
680
+ };
681
+ type QueryState<TArgs extends QueryArgs> = {
682
+ rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
683
+ response: WritableSignal<ResponseType<TArgs> | null>;
684
+ args: WritableSignal<RequestArgs<TArgs> | null>;
685
+ latestHttpEvent: WritableSignal<RequestHttpEvent<TArgs> | null>;
686
+ loading: WritableSignal<HttpRequestLoadingState | null>;
687
+ error: WritableSignal<QueryErrorResponse | null>;
688
+ lastTimeExecutedAt: WritableSignal<number | null>;
689
+ lastTriggeredBy: WritableSignal<string | null>;
690
+ executionState: Signal<QueryExecutionState<TArgs> | null>;
691
+ /**
692
+ * A discrete, query-level stream of every request event, fed synchronously from the current
693
+ * request's `events$` at the moment each event occurs. Side-effect features
694
+ * (success/error/logging) subscribe to this instead of edge-detecting on the shared, resettable
695
+ * `response`/`error`/`latestHttpEvent` signals - so they cannot miss a transition when the next
696
+ * execution swaps the underlying request.
697
+ */
698
+ events$: Observable<RequestHttpEvent<TArgs>>;
699
+ subtle: QueryStateSubtle<TArgs>;
700
+ };
701
+ type QueryExecutionStateSuccess<TArgs extends QueryArgs> = {
702
+ type: 'success';
703
+ response: ResponseType<TArgs>;
704
+ };
705
+ type QueryExecutionStateFailureWithNoResponse = {
706
+ type: 'failure';
707
+ error: QueryErrorResponse;
708
+ hasCachedResponse?: false;
709
+ };
710
+ type QueryExecutionStateFailureWithCachedResponse<TArgs extends QueryArgs> = {
711
+ type: 'failure';
712
+ error: QueryErrorResponse;
713
+ hasCachedResponse: true;
714
+ cachedResponse: ResponseType<TArgs>;
715
+ };
716
+ type QueryExecutionStateFailure<TArgs extends QueryArgs> = QueryExecutionStateFailureWithNoResponse | QueryExecutionStateFailureWithCachedResponse<TArgs>;
717
+ type QueryExecutionStateLoadingWithNoResponse = {
718
+ type: 'loading';
719
+ hasCachedResponse: false;
720
+ loading: HttpRequestLoadingState;
721
+ };
722
+ type QueryExecutionStateLoadingWithCachedResponse<TArgs extends QueryArgs> = {
723
+ type: 'loading';
724
+ hasCachedResponse: true;
725
+ loading: HttpRequestLoadingState;
726
+ cachedResponse: ResponseType<TArgs>;
727
+ };
728
+ type QueryExecutionStateLoading<TArgs extends QueryArgs> = QueryExecutionStateLoadingWithNoResponse | QueryExecutionStateLoadingWithCachedResponse<TArgs>;
729
+ type QueryExecutionState<TArgs extends QueryArgs> = QueryExecutionStateSuccess<TArgs> | QueryExecutionStateFailure<TArgs> | QueryExecutionStateLoading<TArgs>;
730
+ declare const setupQueryState: <TArgs extends QueryArgs>(options: SetupQueryStateOptions<TArgs>) => QueryState<TArgs>;
731
+
732
+ type ResetExecuteStateOptions<TArgs extends QueryArgs> = {
733
+ executeOptions: Pick<CreateQueryExecuteOptions<TArgs>, 'state' | 'deps'>;
734
+ executeState: QueryExecuteState;
735
+ };
736
+ declare const resetExecuteState: <TArgs extends QueryArgs>(options: ResetExecuteStateOptions<TArgs>) => void;
737
+ type QueryExecuteState = {
738
+ previousKey: WritableSignal<string | null>;
739
+ };
740
+ declare const setupQueryExecuteState: () => QueryExecuteState;
741
+ type RunQueryExecuteOptions = {
742
+ allowCache?: boolean;
743
+ triggeredBy?: string;
744
+ /**
745
+ * Overrides the creator's (and the client's) `keepUnusedFor` for this execution. A cache entry shared
746
+ * by several queries keeps the shortest retention of the queries currently bound to it, so a query
747
+ * that asks for a shorter one only shortens the entry until it releases the entry again.
748
+ */
749
+ keepUnusedFor?: number;
750
+ };
751
+ type QueryExecuteOptions<TArgs extends QueryArgs> = {
752
+ executeOptions: CreateQueryExecuteOptions<TArgs>;
753
+ executeState: QueryExecuteState;
754
+ args: RequestArgs<TArgs> | null;
755
+ options?: RunQueryExecuteOptions;
756
+ isSecure?: boolean;
757
+ /** @see QueryRepositoryRequestOptions.isRefreshable */
758
+ isRefreshable?: boolean;
759
+ };
760
+ declare const queryExecute: <TArgs extends QueryArgs>(options: QueryExecuteOptions<TArgs>) => void;
761
+ /**
762
+ * Writes the args an execution runs with to `state.args`, so a later bare `execute()` re-sends them.
763
+ * A `withArgs` source owns `state.args`, and a `withLongPolling` round must not look like a new
764
+ * args value, so neither is written.
841
765
  */
842
- type QueryDevtoolsRunStatus = 'pending' | 'success' | 'error' | 'aborted';
766
+ declare const recordExecutionArgs: <TArgs extends QueryArgs>(state: QueryState<TArgs>, args: RequestArgs<TArgs> | null, options?: RunQueryExecuteOptions) => void;
843
767
  /**
844
- * How a run failed, kept on the run itself. The query's own `error` signal is the live one, but it is
845
- * blanked whenever the query resets - a logout resets every secure query - so it cannot be read back
846
- * after the fact. This is the copy that survives.
768
+ * Throws `ET800` once the same query runs with identical args more than five times in a row, each run
769
+ * less than 100 ms after the previous one. Executions with different args (a search term typed fast,
770
+ * a slider bound to `withArgs`) never count against each other.
847
771
  */
848
- type QueryDevtoolsRunError = {
849
- /** The HTTP status code, or 0 for a failure that never reached a response. */
850
- code: number;
851
- /** Every message the error carried, flattened. @see queryErrorMessages */
852
- messages: string[];
772
+ declare const circularQueryDependencyChecker: () => {
773
+ check: (args: RequestArgs<QueryArgs> | null | undefined) => void;
774
+ };
775
+
776
+ /**
777
+ * Why a batch of in-use entries was refreshed. The answer to "why did this refetch?", which the query
778
+ * devtools spell out per query - the entries themselves only ever see a forced execution.
779
+ */
780
+ type QueryRefreshCause = {
853
781
  /**
854
- * The error response body. Only the newest few runs keep theirs, under the same budget as
855
- * {@link QueryDevtoolsRun.response}.
782
+ * - `refresh` - {@link QueryClient.refreshQueriesInUse}, which narrows nothing.
783
+ * - `invalidation` - {@link QueryClient.invalidateQueries}.
784
+ * - `mutation` - the multi-tab sync engine reacting to a mutation another tab made.
856
785
  */
857
- body: unknown;
858
- /** Whether {@link body} still holds this run's error body. */
859
- hasBody: boolean;
786
+ type: 'refresh' | 'invalidation' | 'mutation';
787
+ /** The URL the refresh was narrowed to (an invalidation's scope, a mutation's URL), or `null`. */
788
+ url: string | null;
789
+ /** Whether another tab asked for it rather than this one. */
790
+ otherTab: boolean;
860
791
  };
861
792
  /**
862
- * A single run of a query, kept alongside the running totals so overlapping runs stay tellable apart -
863
- * which is what turns "ran 40 times" into "ran 40 times in two seconds".
793
+ * What tore a cache entry down: the last consumer went away (`unbind`), its `keepUnusedFor` window ran
794
+ * out (`expired`), it was the least recently orphaned entry over the cap (`unused-cap`), a logout
795
+ * dropped every secure entry (`logout`), or something evicted it by hand (`manual`).
864
796
  */
865
- type QueryDevtoolsRun = {
797
+ type QueryRepositoryEntryDestroyedCause = 'unbind' | 'expired' | 'unused-cap' | 'logout' | 'manual';
798
+ type QueryRepositoryEvent = {
799
+ type: 'request-error';
800
+ error: HttpErrorResponse;
801
+ key: QueryKey;
802
+ isSecure: boolean;
803
+ request: HttpRequest<QueryArgs>;
804
+ } | {
805
+ type: 'request-success';
806
+ key: QueryKey;
807
+ isSecure: boolean;
808
+ request: HttpRequest<QueryArgs>;
866
809
  /**
867
- * Position in the query's lifetime, 1-based. Keeps climbing past the runs the buffer has dropped, so
868
- * it is a stable identity as well as a run number.
810
+ * Whether the request is held in the cache under a key every tab derives identically (a hash of
811
+ * route + args) rather than a per-request UUID. `false` for mutations and anything else
812
+ * uncacheable - which is exactly what tells the multi-tab sync engine whether a settled request
813
+ * is a shareable read or a mutation other tabs should react to.
869
814
  */
870
- index: number;
871
- startedAt: number;
872
- /** When the run ended, or `null` while it is still in flight. */
873
- endedAt: number | null;
874
- status: QueryDevtoolsRunStatus;
815
+ isCached: boolean;
816
+ /** @see BaseQueryCreatorOptions.multiTabSync */
817
+ isMultiTabSyncEnabled: boolean;
818
+ /** @see QueryRepositoryRequestOptions.isRefreshable */
819
+ isRefreshable: boolean;
875
820
  /**
876
- * Whether this run is a request of the query's own. A response that arrives without one was produced
877
- * by something else - a poll, another consumer of the same cache entry, another tab - and is recorded
878
- * as an instant, since only its arrival time is knowable.
821
+ * Whether this response may be written to the client's persisted store. Already accounts for
822
+ * secure requests needing an explicit opt-in.
823
+ *
824
+ * @see BaseQueryCreatorOptions.persistence
879
825
  */
880
- didRequest: boolean;
826
+ isPersistEnabled: boolean;
827
+ } | {
881
828
  /**
882
- * The URL this run went to. Kept per run rather than read off the query: a query whose args changed
883
- * between runs would otherwise label every older run with the URL it happens to hold now.
829
+ * A cache entry was created - the query behind it had nothing to bind to, so this is the moment a
830
+ * response from a previous session can still be of use. The persistence engine answers it by
831
+ * reading the key back from disk.
832
+ *
833
+ * Only ever emitted for entries that did not exist before; a consumer binding to an entry that is
834
+ * already there is not one of these.
884
835
  */
885
- url: string | null;
836
+ type: 'entry-created';
837
+ key: QueryKey;
838
+ /** @see QueryRepositoryEvent.isCached */
839
+ isCached: boolean;
840
+ /** @see QueryRepositoryEvent.isPersistEnabled */
841
+ isPersistEnabled: boolean;
842
+ } | {
886
843
  /**
887
- * How many HTTP attempts this run took - 1 unless the retry policy fired, and 0 for a run that made no
888
- * request of its own. Which is what tells a slow response apart from one that was retried into place.
844
+ * A batch of in-use entries was re-executed at once. Emitted for every
845
+ * {@link QueryRepository.refreshInUse} call, including one that matched nothing - "the
846
+ * invalidation ran and hit no query" is an answer too.
889
847
  */
890
- attempts: number;
891
- /** The size of the request body this run sent. */
892
- sentBytes: number;
893
- /** The size of the response body it received, or 0 until one has. */
894
- receivedBytes: number;
848
+ type: 'queries-refreshed';
849
+ cause: QueryRefreshCause;
850
+ /** The requests that were re-executed, in cache order. */
851
+ requests: HttpRequest<QueryArgs>[];
852
+ } | {
895
853
  /**
896
- * The response body, so one run can be diffed against another. Only the newest few runs keep theirs -
897
- * a polling query would otherwise retain every response it ever received.
854
+ * A cache entry was torn down: its request is destroyed and the key is gone from the cache.
855
+ * Emitted after the deletion, and for every teardown path there is - which is what makes "why
856
+ * did this entry disappear" answerable at all. {@link unbindAllSecure} emits one of these per
857
+ * entry as well as its own `unbind-all-secure`.
858
+ *
859
+ * The repository keeps no record of its own; a consumer that wants a history of destroyed
860
+ * entries (the devtools panel) is the one that keeps it.
898
861
  */
899
- response: unknown;
900
- /** Whether {@link response} still holds this run's body; a dropped and an empty body both read `null`. */
901
- hasResponse: boolean;
902
- /** How the run failed, or `null` for one that did not. */
903
- error: QueryDevtoolsRunError | null;
862
+ type: 'entry-destroyed';
863
+ key: QueryKey;
864
+ isSecure: boolean;
865
+ method: QueryMethod;
866
+ url: string;
867
+ cause: QueryRepositoryEntryDestroyedCause;
868
+ } | {
869
+ /**
870
+ * Every secure entry was torn down at once - a logout. Emitted after the cache is cleared so
871
+ * secure queries can drop the state they hold themselves; the repository only owns the
872
+ * requests, not the `response` signal of the query objects bound to them.
873
+ */
874
+ type: 'unbind-all-secure';
904
875
  };
905
- /** The read side of a stats recorder, as a {@link QueryDevtoolsEntry} exposes it to the panel. */
906
- type QueryDevtoolsStatsHandle = {
907
- /** The live stats. */
908
- current: Signal<QueryDevtoolsStats>;
909
- /** The query's most recent runs, oldest first. Bounded - older runs are dropped as new ones arrive. */
910
- runs: Signal<readonly QueryDevtoolsRun[]>;
911
- /** Clears every counter, so a measurement can be scoped to a single interaction. */
912
- reset: () => void;
876
+ type QueryRepositoryRequestOptions<TArgs extends QueryArgs> = {
877
+ /**
878
+ * The route of the request.
879
+ * @example '/users'
880
+ * @example (args) => `/users/${args.userId}`
881
+ */
882
+ route: RouteType<TArgs>;
883
+ /** The HTTP method of the request */
884
+ method: QueryMethod;
885
+ /** If the request is secure (needs authentication) */
886
+ isSecure?: boolean;
887
+ /** The data of the request */
888
+ args?: RequestArgs<TArgs> | null;
889
+ /** The query creator options of the request */
890
+ creatorOptions?: CreateQueryCreatorOptions;
891
+ /** Custom retry function for this specific request */
892
+ retryFn?: ShouldRetryRequestFn;
893
+ /** If set, this request's cache key will be prefixed with this key */
894
+ key?: string;
895
+ /** The previous tracking key of the request */
896
+ previousKey?: QueryKey | null;
897
+ /** The destroy ref to bind the request to. If the destroy ref is destroyed, the request will be destroyed as well. */
898
+ consumerDestroyRef: DestroyRef;
899
+ /** Configuration on how to run the query */
900
+ runQueryOptions?: RunQueryExecuteOptions;
901
+ /** @see QueryConfig.silenceUncacheableAllowCacheError */
902
+ silenceUncacheableAllowCacheError?: boolean;
903
+ /**
904
+ * Whether re-running the request on its own is safe, i.e. whether {@link QueryRepository.refreshInUse}
905
+ * may fire it again. Defaults to the method being a read (`GET`/`HEAD`/`OPTIONS`); the GraphQL
906
+ * execute path passes `true` for a query transported via `POST`. Also what the retry policy receives
907
+ * as `idempotent`; unset, that falls back to the method not being `POST` or `PATCH`.
908
+ */
909
+ isRefreshable?: boolean;
913
910
  };
914
- /** The write side, used by the instrumentation inside the query itself. */
915
- type QueryDevtoolsStatsRecorder = QueryDevtoolsStatsHandle & {
916
- recordExecution: (options: {
917
- /** Whether the execution started a request, as reported by the repository. */
918
- didRequest: boolean;
919
- /** The request body it sent, for the outgoing byte count. */
920
- body?: unknown;
921
- /** The URL it went to. @see QueryDevtoolsRun.url */
922
- url?: string;
923
- }) => void;
924
- recordResponse: (payload: QueryDevtoolsPayload) => void;
925
- recordError: (options?: {
926
- /** Whether the error is a devtools fault rather than a real failure. */
927
- faulted?: boolean;
928
- /** The failure itself, for {@link QueryDevtoolsRun.error}. */
929
- error?: QueryErrorResponse;
930
- }) => void;
911
+ type QueryRepositoryItem<TArgs extends QueryArgs> = {
912
+ /** The key of the request (either a cache key for cacheable requests or a UUID for uncacheable requests) */
913
+ key: QueryKey;
914
+ /** The request object */
915
+ request: HttpRequest<TArgs>;
931
916
  /**
932
- * Raises the attempt count of the run in flight. Idempotent per attempt, so a caller driven off a
933
- * signal may report the same attempt more than once without inflating {@link QueryDevtoolsStats.retries}.
917
+ * Whether this call started a network request. `false` when a fresh cache entry answered it, or when
918
+ * an identical request was already in flight - the consumer is bound to that request either way and
919
+ * still gets its response.
934
920
  */
935
- recordRetry: (options: {
936
- attempt: number;
937
- }) => void;
921
+ executed: boolean;
938
922
  };
939
923
  /**
940
- * How many bodies each query retains: what the panel's Settings tab asks for, or
941
- * {@link QueryDevtoolsOptions.responseHistory}, or `5`. Only a run that still holds one can be an end of
942
- * a response diff, so the panel reads this to say why an older run can no longer be picked.
943
- *
944
- * Part of the devtools contract. **Not part of the general public contract.**
924
+ * A read-only snapshot of a single cache entry, exposed via {@link QueryRepositorySubtle.cacheEntries}
925
+ * for devtools inspection. The raw cache `Map` is never exposed.
945
926
  */
946
- declare const queryDevtoolsResponseHistory: () => number;
927
+ type QueryRepositoryCacheEntry = {
928
+ /** The cache key of the entry. */
929
+ key: QueryKey;
930
+ /** Whether the entry belongs to a secure (authenticated) request. */
931
+ isSecure: boolean;
932
+ /** How many consumers currently hold a binding to the entry. */
933
+ consumerCount: number;
934
+ /**
935
+ * Whether the entry has no consumers left and is only being kept around for its
936
+ * `keepUnusedFor` window. Such an entry is not a leak - it is waiting to be reused by a
937
+ * consumer that comes back.
938
+ */
939
+ isUnused: boolean;
940
+ /** The underlying HTTP request. */
941
+ request: HttpRequest<QueryArgs>;
942
+ };
947
943
  /**
948
- * The size of a payload in bytes, and whether that size is the one that went over the wire. Only a
949
- * `content-length` header is exact; everything else is measured by serializing the body.
950
- *
951
- * Part of the devtools contract - the panel measures the cache and the event log with it. **Not part of
952
- * the general public contract.**
944
+ * Advanced repository internals used by the query devtools. **Not part of the general public
945
+ * contract** - do not build application logic on top of these.
953
946
  */
954
- declare const measureQueryDevtoolsPayload: (payload: QueryDevtoolsPayload) => {
955
- bytes: number;
956
- isExact: boolean;
947
+ type QueryRepositorySubtle = {
948
+ /** Returns a read-only snapshot of every entry currently held in the cache. */
949
+ cacheEntries: () => QueryRepositoryCacheEntry[];
950
+ /** A version counter bumped whenever the cache changes (bind / unbind / unbindAllSecure). */
951
+ cacheVersion: Signal<number>;
952
+ /**
953
+ * Destroys and removes a single cache entry by key, regardless of its consumers. Intended for
954
+ * devtools cache management - consumers still holding the query will get a fresh request on their
955
+ * next execution.
956
+ */
957
+ evict: (key: QueryKey) => void;
957
958
  };
958
959
  /**
959
- * Adds up the stats of several entries, for a stack's or a client's total. `lastDurationMs` is taken from
960
- * whichever entry responded most recently rather than summed.
960
+ * Narrows which in-use entries a {@link QueryRepository.refreshInUse} call refreshes. Returning
961
+ * `false` leaves the entry alone.
961
962
  */
962
- declare const sumQueryDevtoolsStats: (handles: readonly (QueryDevtoolsStatsHandle | undefined)[]) => QueryDevtoolsStats;
963
-
964
- type SetupQueryStateOptions<TArgs extends QueryArgs> = {
965
- transformResponse?: (rawResponse: RawResponseType<TArgs>) => ResponseType<TArgs>;
966
- destroyRef?: DestroyRef;
967
- /**
968
- * The devtools stats recorder to feed from this state's executions, or nothing when the devtools are
969
- * not installed.
970
- */
971
- devtoolsStats?: QueryDevtoolsStatsRecorder | null;
972
- /**
973
- * The recorder that notes which query forms the args source reads, or nothing when the devtools are
974
- * not installed.
975
- */
976
- devtoolsFormLinks?: QueryDevtoolsFormLinksRecorder | null;
963
+ type QueryRepositoryRefreshFilterFn = (request: HttpRequest<QueryArgs>) => boolean;
964
+ /** @see QueryRepository.applyExternalResponse */
965
+ type ApplyExternalResponseOptions = {
966
+ /** The cache key the response belongs to. */
967
+ key: QueryKey;
968
+ /** The response body, as received from the other tab. */
969
+ body: unknown;
970
+ /** Timestamp (ms) at which the response goes stale, or `null` when it has no freshness window. */
971
+ expiresAt: number | null;
972
+ };
973
+ /** @see QueryRepository.applyPersistedResponse */
974
+ type ApplyPersistedResponseOptions = {
975
+ /** The cache key the response belongs to. */
976
+ key: QueryKey;
977
+ /** The response body, as it was read back from the store. */
978
+ body: unknown;
977
979
  /**
978
- * The recorder of response overrides armed on this query, or nothing when the devtools are not
979
- * installed. Replayed against every response that settles into {@link QueryState.rawResponse}.
980
+ * Timestamp (ms) at which the response goes stale, as it was when the response was persisted - so
981
+ * usually in the past, which is exactly right: the entry revalidates and the data is shown meanwhile.
980
982
  */
981
- devtoolsOverrides?: QueryDevtoolsOverridesRecorder | null;
983
+ expiresAt: number | null;
982
984
  };
983
- type QueryStateSubtle<TArgs extends QueryArgs> = {
984
- request: WritableSignal<HttpRequest<TArgs> | null>;
985
- rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
985
+ /**
986
+ * The query repository is responsible for managing all requests and their consumers.
987
+ * It will cache requests if they can be cached and reuse them if they are already cached.
988
+ * It will also destroy requests once no consumers are left, unless `keepUnusedFor` retains their response.
989
+ */
990
+ type QueryRepository = {
991
+ /** Creates a new request. If the request is already cached, it will be reused. */
992
+ request: <TArgs extends QueryArgs>(options: QueryRepositoryRequestOptions<TArgs>) => QueryRepositoryItem<TArgs>;
986
993
  /**
987
- * Forwards the given request's discrete event stream onto the query-level `events$`.
988
- * Called by `queryExecute` whenever a request is (re-)executed.
994
+ * Removes a consumer from a request by its key. With no consumers left, the request is destroyed, or
995
+ * kept for `keepUnusedFor` if that is above 0 and it has a response.
989
996
  */
990
- bindRequestEvents: (request: HttpRequest<TArgs>) => void;
991
- /** Stops forwarding the current request's events; `reset()` detaches the query from its request with it. */
992
- unbindRequestEvents: () => void;
997
+ unbind: (key: QueryKey | null, consumerDestroyRef: DestroyRef) => boolean;
998
+ /** Removes all secure requests and their consumers */
999
+ unbindAllSecure: () => void;
993
1000
  /**
994
- * Run options every execution of this query starts from; the options passed to one `execute()` win
995
- * per field. Set by a feature during creation so it also covers executions the feature does not
996
- * trigger itself (`withLongPolling` turns retention off for the `withArgs` round too).
1001
+ * Re-executes every cacheable entry that still has consumers, bypassing the cache and restarting
1002
+ * in-flight requests. Entries kept only for their `keepUnusedFor` window are skipped - nobody is
1003
+ * looking at them, and they revalidate on their own when a consumer binds again.
1004
+ *
1005
+ * Pass a filter to narrow it down to a subset of those entries, and a cause to describe what asked
1006
+ * for it - which is what the devtools report as the reason a query refetched.
1007
+ *
1008
+ * @see QueryClient.refreshQueriesInUse
997
1009
  */
998
- defaultRunOptions: WritableSignal<RunQueryExecuteOptions | null>;
1010
+ refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause) => void;
999
1011
  /**
1000
- * Installs the reactive source that backs `state.args`. The `withArgs` feature uses this so that
1001
- * `state.args` always reflects the latest args (pulled from the reactive source on read) instead
1002
- * of being push-updated by an effect that may not have run yet. Without a `withArgs` feature the
1003
- * default source returns `null`.
1012
+ * Writes a response that another tab received onto the matching cache entry, so the same query
1013
+ * shows the same data everywhere without a second network request.
1014
+ *
1015
+ * Returns whether it was applied. It is skipped when
1016
+ * - no entry exists for the key: cold entries are never seeded on speculation, that would be
1017
+ * unbounded memory for data nobody in this tab is looking at,
1018
+ * - the entry's creator opted out of {@link BaseQueryCreatorOptions.multiTabSync},
1019
+ * - or the entry has a request in flight, which is at least as fresh and overwrites this anyway.
1020
+ *
1021
+ * Entries sitting out their `keepUnusedFor` window without consumers *are* updated - it costs
1022
+ * nothing and means a returning consumer renders data that is current rather than merely recent.
1004
1023
  */
1005
- setArgsSource: (source: () => RequestArgs<TArgs> | null) => void;
1006
- /** @see SetupQueryStateOptions.devtoolsStats */
1007
- devtoolsStats: QueryDevtoolsStatsRecorder | null;
1008
- /** @see SetupQueryStateOptions.devtoolsFormLinks */
1009
- devtoolsFormLinks: QueryDevtoolsFormLinksRecorder | null;
1010
- };
1011
- type QueryState<TArgs extends QueryArgs> = {
1012
- rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
1013
- response: Signal<ResponseType<TArgs> | null>;
1014
- args: WritableSignal<RequestArgs<TArgs> | null>;
1015
- latestHttpEvent: WritableSignal<RequestHttpEvent<TArgs> | null>;
1016
- loading: WritableSignal<HttpRequestLoadingState | null>;
1017
- error: WritableSignal<QueryErrorResponse | null>;
1018
- lastTimeExecutedAt: WritableSignal<number | null>;
1019
- lastTriggeredBy: WritableSignal<string | null>;
1020
- executionState: Signal<QueryExecutionState<TArgs> | null>;
1024
+ applyExternalResponse: (options: ApplyExternalResponseOptions) => boolean;
1021
1025
  /**
1022
- * A discrete, query-level stream of every request event, fed synchronously from the current
1023
- * request's `events$` at the moment each event occurs. Side-effect features
1024
- * (success/error/logging) subscribe to this instead of edge-detecting on the shared, resettable
1025
- * `response`/`error`/`latestHttpEvent` signals - so they cannot miss a transition when the next
1026
- * execution swaps the underlying request.
1026
+ * Writes a response from a previous session - read back from the client's persisted store - onto a
1027
+ * cache entry that has nothing of its own yet.
1028
+ *
1029
+ * Returns whether it was applied. It is skipped when
1030
+ * - no entry exists for the key: the entry was destroyed again while the store was being read,
1031
+ * - the entry's creator opted out of {@link BaseQueryCreatorOptions.persistence},
1032
+ * - or the entry already holds a response - from its own request, or from another tab. Persisted data
1033
+ * only ever fills a gap; it never replaces something newer.
1034
+ *
1035
+ * Note that the entry's request is *not* stopped: hydration happens while it is already in flight, so
1036
+ * persisted data is always shown alongside a revalidation rather than instead of one. An entry whose
1037
+ * request already failed keeps its error, which is what makes the offline case honest - the data is
1038
+ * from disk, and the attempt to refresh it did fail.
1027
1039
  */
1028
- events$: Observable<RequestHttpEvent<TArgs>>;
1029
- subtle: QueryStateSubtle<TArgs>;
1030
- };
1031
- type QueryExecutionStateSuccess<TArgs extends QueryArgs> = {
1032
- type: 'success';
1033
- response: ResponseType<TArgs>;
1034
- };
1035
- type QueryExecutionStateFailureWithNoResponse = {
1036
- type: 'failure';
1037
- error: QueryErrorResponse;
1038
- hasCachedResponse?: false;
1039
- };
1040
- type QueryExecutionStateFailureWithCachedResponse<TArgs extends QueryArgs> = {
1041
- type: 'failure';
1042
- error: QueryErrorResponse;
1043
- hasCachedResponse: true;
1044
- cachedResponse: ResponseType<TArgs>;
1040
+ applyPersistedResponse: (options: ApplyPersistedResponseOptions) => boolean;
1041
+ /** Observable stream of repository events (errors, successes, etc.) */
1042
+ events$: Observable<QueryRepositoryEvent>;
1043
+ /** Advanced repository internals used by the query devtools. */
1044
+ subtle: QueryRepositorySubtle;
1045
1045
  };
1046
- type QueryExecutionStateFailure<TArgs extends QueryArgs> = QueryExecutionStateFailureWithNoResponse | QueryExecutionStateFailureWithCachedResponse<TArgs>;
1047
- type QueryExecutionStateLoadingWithNoResponse = {
1048
- type: 'loading';
1049
- hasCachedResponse: false;
1050
- loading: HttpRequestLoadingState;
1046
+ /** The key of a query (either a cache key for cacheable requests or a UUID for uncacheable requests) */
1047
+ type QueryKey = string;
1048
+ /** Runs .unbind() if the DestroyRef.onDestroy() gets called */
1049
+ type DestroyCleanupCallback = () => void;
1050
+ type QueryRepositoryDependencies = {
1051
+ /** The HTTP client to use for the requests */
1052
+ httpClient: HttpClient;
1053
+ /** The error handler to use for the requests */
1054
+ ngErrorHandler: ErrorHandler;
1055
+ /** The injector to use for reactive operations like signal->observable conversions */
1056
+ injector: Injector;
1051
1057
  };
1052
- type QueryExecutionStateLoadingWithCachedResponse<TArgs extends QueryArgs> = {
1053
- type: 'loading';
1054
- hasCachedResponse: true;
1055
- loading: HttpRequestLoadingState;
1056
- cachedResponse: ResponseType<TArgs>;
1058
+ type CreateQueryRepositoryConfig = CreateQueryClientConfigOptions & {
1059
+ /** The dependencies of the query repository */
1060
+ dependencies: QueryRepositoryDependencies;
1061
+ /**
1062
+ * Whether unused entries may be retained at all. `false` forces `keepUnusedFor` to `0` everywhere,
1063
+ * regardless of client or creator configuration - used to disable retention on the server, where a
1064
+ * per-request injector must not hold response bodies (and a pending timer) for minutes.
1065
+ * @default true
1066
+ */
1067
+ retentionEnabled?: boolean;
1068
+ /** Whether the client itself carries a retry policy, via its own `retryFn` or a feature. */
1069
+ hasRetryPolicy?: () => boolean;
1057
1070
  };
1058
- type QueryExecutionStateLoading<TArgs extends QueryArgs> = QueryExecutionStateLoadingWithNoResponse | QueryExecutionStateLoadingWithCachedResponse<TArgs>;
1059
- type QueryExecutionState<TArgs extends QueryArgs> = QueryExecutionStateSuccess<TArgs> | QueryExecutionStateFailure<TArgs> | QueryExecutionStateLoading<TArgs>;
1060
- declare const setupQueryState: <TArgs extends QueryArgs>(options: SetupQueryStateOptions<TArgs>) => QueryState<TArgs>;
1071
+ /** @see CreateQueryClientConfigOptions.keepUnusedFor */
1072
+ declare const DEFAULT_KEEP_UNUSED_FOR = 300000;
1073
+ /**
1074
+ * Hard cap on entries kept without consumers, per client. Retention is opportunistic, so a runaway
1075
+ * count (a search-as-you-type query produces a new cache key per keystroke, and each one goes through
1076
+ * `unbind`) must never grow unbounded - the least recently orphaned entries are dropped first.
1077
+ */
1078
+ declare const MAX_UNUSED_ENTRIES = 50;
1079
+ declare const createQueryRepository: (config: CreateQueryRepositoryConfig) => QueryRepository;
1061
1080
 
1062
1081
  type CreateQueryExecuteOptions<TArgs extends QueryArgs> = {
1063
1082
  deps: QueryDependencies;
@@ -1073,6 +1092,8 @@ type QueryExecuteArgs<TArgs extends QueryArgs> = {
1073
1092
  type InternalQueryExecute<TArgs extends QueryArgs> = {
1074
1093
  (executeArgs?: QueryExecuteArgs<TArgs>): void;
1075
1094
  reset: () => void;
1095
+ abort: () => boolean;
1096
+ aborted$: Observable<void>;
1076
1097
  currentRepositoryKey: Signal<QueryKey | null>;
1077
1098
  };
1078
1099
  type QueryExecute<TArgs extends QueryArgs> = (executeArgs?: QueryExecuteArgs<TArgs>) => void;
@@ -1118,6 +1139,9 @@ type QueryFeature<TArgs extends QueryArgs> = {
1118
1139
  /** How the feature was configured, for the devtools. Only called while devtools are enabled. */
1119
1140
  devtools?: QueryDevtoolsFeatureDescriber;
1120
1141
  };
1142
+ type WithArgsQueryFeature<TArgs extends QueryArgs> = QueryFeature<TArgs> & {
1143
+ type: typeof QueryFeatureType.WITH_ARGS;
1144
+ };
1121
1145
  declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
1122
1146
  type: QueryFeatureType | (string & {});
1123
1147
  fn: QueryFeatureFn<TArgs>;
@@ -1127,12 +1151,12 @@ declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
1127
1151
  * A query feature that allows you to set the arguments of the query.
1128
1152
  * The arguments are read within a computed function, so you can use reactive values.
1129
1153
  *
1130
- * Return `null` to park the query: its args are reset to `null`, and polling and auto refresh
1131
- * pause until args are set again.
1154
+ * Return `null` to park the query: it is reset (`response()` and `executionState()` become `null`),
1155
+ * and polling and auto refresh pause until args are set again.
1132
1156
  *
1133
1157
  * Changing arguments will automatically trigger a new execution of the query if it is eligible for auto execution (e.g. a GET request).
1134
1158
  */
1135
- declare const withArgs: <TArgs extends QueryArgs>(args: () => NoInfer<RequestArgs<TArgs>> | null) => QueryFeature<TArgs>;
1159
+ declare const withArgs: <TArgs extends QueryArgs>(args: () => NoInfer<RequestArgs<TArgs>> | null) => WithArgsQueryFeature<TArgs>;
1136
1160
  type WithPollingFeatureOptions = {
1137
1161
  /**
1138
1162
  * The interval in milliseconds at which the query should be executed. A function is read
@@ -1151,6 +1175,13 @@ type WithPollingFeatureOptions = {
1151
1175
  * @default false
1152
1176
  */
1153
1177
  pauseWhileHidden?: boolean;
1178
+ /**
1179
+ * Poll only while this returns `true`. Read reactively (pass a signal or a `computed`). While it is
1180
+ * `false` no tick runs; when it turns `true`, a tick that fell due in between runs at once,
1181
+ * otherwise polling resumes on its cadence.
1182
+ * @default () => true
1183
+ */
1184
+ enabled?: () => boolean;
1154
1185
  /**
1155
1186
  * Execute the query when the window regains focus, and restart the interval from there.
1156
1187
  * @default false
@@ -1205,6 +1236,12 @@ type WithLongPollingFeatureOptions<TArgs extends QueryArgs> = {
1205
1236
  * @default 10
1206
1237
  */
1207
1238
  stopAfterErrors?: number;
1239
+ /**
1240
+ * Run the chain only while this returns `true`. Read reactively (pass a signal or a `computed`). Turning
1241
+ * `false` aborts the round in flight and cancels a pending one; turning `true` runs that round again at once.
1242
+ * @default () => true
1243
+ */
1244
+ enabled?: () => boolean;
1208
1245
  };
1209
1246
  /**
1210
1247
  * A query feature for long polling: a chain of requests where each round starts once the previous one
@@ -1253,6 +1290,12 @@ type WithAutoRefreshFeatureOptions = {
1253
1290
  onSignalChanges: Signal<unknown>[];
1254
1291
  /** Whether to ignore the `onlyManualExecution` query config flag */
1255
1292
  ignoreOnlyManualExecution?: boolean;
1293
+ /**
1294
+ * Refresh only while this returns `true`. Read reactively (pass a signal or a `computed`). A signal change
1295
+ * while it is `false` is dropped - turning `true` does not execute by itself.
1296
+ * @default () => true
1297
+ */
1298
+ enabled?: () => boolean;
1256
1299
  };
1257
1300
  /**
1258
1301
  * A query feature that will automatically execute the query when any of the provided signals change
@@ -1406,6 +1449,13 @@ type BaseQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = {
1406
1449
  * @default the client's `retryFn`, else the `withDefaultRetry()` policy, else no retry
1407
1450
  */
1408
1451
  retryFn?: ShouldRetryRequestFn;
1452
+ /**
1453
+ * Whether a failed request is passed to Angular's `ErrorHandler`. Set to `false` when the UI already
1454
+ * shows the error itself; `error()` and `executionState()` report the failure either way.
1455
+ *
1456
+ * @default true
1457
+ */
1458
+ reportErrors?: boolean;
1409
1459
  /**
1410
1460
  * How long (in ms) this query's cache entry is kept after its last consumer was destroyed.
1411
1461
  * Overrides the client level `keepUnusedFor`. Use `0` for responses that should never outlive their
@@ -1475,9 +1525,22 @@ type CreateQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = BaseQueryC
1475
1525
  */
1476
1526
  transformResponse?: (rawResponse: RawResponseType<TArgs>) => ResponseType<TArgs>;
1477
1527
  });
1528
+ type QueryCreatorInput<TArgs extends QueryArgs> = readonly [QueryConfig, ...QueryFeature<TArgs>[]] | readonly QueryFeature<TArgs>[];
1529
+ type IsAny<T> = 0 extends 1 & T ? true : false;
1530
+ type RequiresWithArgs<TArgs extends QueryArgs> = IsAny<TArgs> extends true ? false : PathParamsType<TArgs> extends {
1531
+ [key: string]: unknown;
1532
+ } ? true : false;
1533
+ type HasWithArgsFeature<TInput extends readonly unknown[]> = number extends TInput['length'] ? true : TInput extends readonly [infer THead, ...infer TRest] ? THead extends {
1534
+ type: typeof QueryFeatureType.WITH_ARGS;
1535
+ } ? true : HasWithArgsFeature<TRest> : false;
1536
+ type IsWithArgsErrorSilenced<TInput extends readonly unknown[]> = TInput extends readonly [infer THead, ...unknown[]] ? THead extends {
1537
+ silenceMissingWithArgsFeatureError: true;
1538
+ } ? true : false : false;
1539
+ type MissingWithArgsError = "withArgs() is required: this query's route uses pathParams. Pass withArgs(() => ({ pathParams: … })), or set silenceMissingWithArgsFeatureError as an escape hatch.";
1540
+ type SilencedWithArgsError = 'silenceMissingWithArgsFeatureError: true is set, but withArgs() is passed. Remove one of them.';
1541
+ type WithArgsCheck<TArgs extends QueryArgs, TInput extends readonly unknown[]> = IsWithArgsErrorSilenced<TInput> extends true ? HasWithArgsFeature<TInput> extends true ? number extends TInput['length'] ? unknown : SilencedWithArgsError : unknown : RequiresWithArgs<TArgs> extends true ? HasWithArgsFeature<TInput> extends true ? unknown : MissingWithArgsError : unknown;
1478
1542
  type QueryCreator<TArgs extends QueryArgs> = {
1479
- (...features: QueryFeature<TArgs>[]): Query<TArgs>;
1480
- (queryConfig: QueryConfig, ...features: QueryFeature<TArgs>[]): Query<TArgs>;
1543
+ <const TInput extends QueryCreatorInput<TArgs>>(this: WithArgsCheck<TArgs, TInput>, ...args: TInput | QueryCreatorInput<TArgs>): Query<TArgs>;
1481
1544
  /**
1482
1545
  * Creates a new query creator with merged options.
1483
1546
  * The new creator inherits all options from the original and overrides them with the provided options.
@@ -1536,6 +1599,12 @@ type QueryConfig = {
1536
1599
  * this - on a hand-written `execute()` the error it silences is a real mistake.
1537
1600
  */
1538
1601
  silenceUncacheableAllowCacheError?: boolean;
1602
+ /**
1603
+ * Keeps `response()` on the previous args' response while a request for new args loads, reported as
1604
+ * `executionState().cachedResponse`. Defaults to `true` for queries that execute themselves (GET, HEAD,
1605
+ * OPTIONS, GraphQL queries) and to `false` for mutations.
1606
+ */
1607
+ keepPreviousResponse?: boolean;
1539
1608
  /**
1540
1609
  * A custom injector to use for this query.
1541
1610
  */
@@ -2213,8 +2282,7 @@ declare const withSymfonyErrors: () => QueryClientFeatureFn;
2213
2282
  * a `PATCH` and a GraphQL mutation are never retried unless the options set `retryNonIdempotent`.
2214
2283
  *
2215
2284
  * The policy belongs to the client the feature is on, so another client of the same app is not
2216
- * affected. Without it nothing is retried automatically and `error.retryState` always reads
2217
- * `{ retry: false }`. A per-client or per-creator `retryFn` wins over it.
2285
+ * affected. Without it nothing is retried automatically. A per-client or per-creator `retryFn` wins over it.
2218
2286
  *
2219
2287
  * @example
2220
2288
  * const MY_CLIENT = createQueryClient({
@@ -2469,6 +2537,8 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
2469
2537
  clientOptions?: CreateQueryCreatorOptions;
2470
2538
  /** Display name of the owning query client. Scopes devtools fault injection, which is armed per client. */
2471
2539
  clientName?: string;
2540
+ /** Base URL of the owning query client, so a devtools mock pattern is matched against the route. */
2541
+ clientBaseUrl?: string;
2472
2542
  /**
2473
2543
  * Headers configured on the query client, applied to every request it makes. Per-request
2474
2544
  * `args.headers` are merged on top and win per header name.
@@ -2486,6 +2556,12 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
2486
2556
  * @default the `withDefaultRetry()` policy, or no retry at all without that client feature
2487
2557
  */
2488
2558
  retryFn?: ShouldRetryRequestFn;
2559
+ /**
2560
+ * Whether `retryFn` is a policy somebody configured. Without one, `error.retryState` falls back to the
2561
+ * built-in classification of transient failures.
2562
+ * @default `true` when `retryFn` is set
2563
+ */
2564
+ hasRetryPolicy?: boolean;
2489
2565
  /**
2490
2566
  * Whether sending the request again is safe, handed to `retryFn` as `idempotent`.
2491
2567
  * @default `false` for a `POST` or `PATCH`, `true` for every other method
@@ -2585,7 +2661,7 @@ type HttpRequestSubtle<TArgs extends QueryArgs> = {
2585
2661
  */
2586
2662
  resolveHeaders: () => HttpHeaders | undefined;
2587
2663
  /**
2588
- * The headers the most recent execution actually went out with. Unlike {@link resolveHeaders} it
2664
+ * The headers the most recent attempt actually went out with. Unlike {@link resolveHeaders} it
2589
2665
  * does not re-resolve the header providers, so after a token refresh it still reports the token
2590
2666
  * the request was sent with. `undefined` until the first execution.
2591
2667
  */
@@ -2622,8 +2698,7 @@ type HttpRequest<TArgs extends QueryArgs> = {
2622
2698
  url: string;
2623
2699
  /**
2624
2700
  * The args this request was built from - the resolved path params, query params, body and headers
2625
- * behind {@link HttpRequest.url}. Read by the query devtools to show what a query actually sent,
2626
- * which a query executed imperatively (`execute({ args })`) does not keep on its own `args` signal.
2701
+ * behind {@link HttpRequest.url}. Read by the query devtools to show what a query actually sent.
2627
2702
  */
2628
2703
  args: RequestArgs<TArgs> | null;
2629
2704
  /**
@@ -2770,7 +2845,7 @@ type AnyNewQuery = Query<any>;
2770
2845
  type QuerySubtle<TArgs extends QueryArgs> = {
2771
2846
  /** Destroys the query and cleans up all resources. The query should not be used after this method is called. */
2772
2847
  destroy: () => void;
2773
- /** Manually sets the response of the query. This will not trigger a new execution of the query. */
2848
+ /** Sets the response the query shows, as the consumer reads it: `transformResponse` does not run on it. Does not execute the query. */
2774
2849
  setResponse: (response: ResponseType<TArgs>) => void;
2775
2850
  /**
2776
2851
  * Manually forces the loading state of the query. Overridden on the next execution. Intended for
@@ -2796,12 +2871,20 @@ type Query<TArgs extends QueryArgs> = QueryBase<TArgs> & {
2796
2871
  createSnapshot: () => QuerySnapshot<TArgs>;
2797
2872
  /** Resets the query state to its initial state */
2798
2873
  reset: () => void;
2874
+ /**
2875
+ * Stops the execution in flight, including a retry it is waiting out, and returns whether one was.
2876
+ * The aborted execution sets no response and no error: `response()`, `error()` and `executionState()`
2877
+ * go back to what they were before it started (`executionState()` is `null` if the query never
2878
+ * settled). `args()` and `lastTimeExecutedAt()` keep describing the aborted execution. The request is
2879
+ * shared by every query bound to the same cache key, so those stop loading too.
2880
+ */
2881
+ abort: () => boolean;
2799
2882
  /** Returns a readonly version of the query */
2800
2883
  asReadonly: () => ReadonlyQuery<TArgs>;
2801
2884
  /** Advanced query features. **WARNING!** Incorrectly using these features will likely **BREAK** your application. You have been warned! */
2802
2885
  subtle: QuerySubtle<TArgs>;
2803
2886
  };
2804
- type ReadonlyQuery<TArgs extends QueryArgs> = Omit<Query<TArgs>, 'execute' | 'subtle' | 'reset' | 'asReadonly'>;
2887
+ type ReadonlyQuery<TArgs extends QueryArgs> = Omit<Query<TArgs>, 'execute' | 'subtle' | 'reset' | 'abort' | 'asReadonly'>;
2805
2888
  declare const createQuery: <TArgs extends QueryArgs>(options: CreateQueryOptions<TArgs>) => Query<TArgs>;
2806
2889
 
2807
2890
  type BaseQueryCreatorFactoryOptions<TArgs extends QueryArgs, TOptions, TInternals> = {
@@ -2900,9 +2983,10 @@ declare const shouldAutoExecuteQuery: (method: QueryMethod) => method is "GET" |
2900
2983
  declare const shouldAutoExecuteGqlQuery: (method: GqlQueryMethod) => method is "QUERY";
2901
2984
  declare const getQueryFeatureUsage: <TArgs extends QueryArgs>(options: CreateQueryOptions<TArgs> | CreateGqlQueryOptions<any>) => QueryFeatureFlags;
2902
2985
  declare const applyQueryFeatures: <TArgs extends QueryArgs>(features: QueryFeature<TArgs>[], context: QueryFeatureContext<TArgs>) => void;
2903
- declare const maybeExecute: (options: {
2986
+ declare const maybeExecute: <TArgs extends QueryArgs>(options: {
2904
2987
  flags: QueryFeatureFlags;
2905
- execute: InternalQueryExecute<any>;
2988
+ execute: InternalQueryExecute<TArgs>;
2989
+ state: QueryState<TArgs>;
2906
2990
  }) => void;
2907
2991
  type CreateQueryObjectOptions<TArgs extends QueryArgs> = {
2908
2992
  state: QueryState<TArgs>;
@@ -3213,8 +3297,9 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
3213
3297
  run: (items: readonly TItem[]) => Observable<QueryBatchResult<TItem, TArgs>>;
3214
3298
  /**
3215
3299
  * Re-runs only the items that did not succeed - the failed ones plus anything left unattempted by
3216
- * a `cancel()` or `stopOnError`. Successful items are never sent twice, which is what makes this
3217
- * safe to put behind a retry button in a bulk edit. Cold, like {@link QueryBatch.run}.
3300
+ * a `cancel()`, `stopOnError` or an unsubscribe. Successful items, and items an unsubscribe aborted
3301
+ * in flight, are never sent twice, which is what makes this safe to put behind a retry button in a
3302
+ * bulk edit. Cold, like {@link QueryBatch.run}.
3218
3303
  */
3219
3304
  retryFailed: () => Observable<QueryBatchResult<TItem, TArgs>>;
3220
3305
  /**
@@ -3223,7 +3308,7 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
3223
3308
  * normal and the run emits once they do.
3224
3309
  *
3225
3310
  * Unsubscribing from the run does abort everything in flight, which for a mutation is rarely what
3226
- * you want. Prefer this.
3311
+ * you want: those items stay `cancelled` and `retryFailed()` does not resend them. Prefer this.
3227
3312
  */
3228
3313
  cancel: () => void;
3229
3314
  /** Clears the results and returns to `idle`. Ignored while a run is in flight. */
@@ -3458,6 +3543,7 @@ declare const isSymfonyListError: (error: unknown) => error is FormViolationView
3458
3543
 
3459
3544
  declare const QueryRuntimeErrorCode: {
3460
3545
  readonly QUERY_FEATURE_USED_MULTIPLE_TIMES: 0;
3546
+ readonly QUERY_CREATED_IN_REACTIVE_CONTEXT: 1;
3461
3547
  readonly WITH_ARGS_QUERY_FEATURE_MISSING_BUT_ROUTE_IS_FUNCTION: 100;
3462
3548
  readonly WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD: 101;
3463
3549
  readonly WITH_AUTO_REFRESH_USED_ON_UNSUPPORTED_HTTP_METHOD: 102;
@@ -3493,6 +3579,7 @@ declare const QueryRuntimeErrorCode: {
3493
3579
  };
3494
3580
  type QueryRuntimeErrorCode = (typeof QueryRuntimeErrorCode)[keyof typeof QueryRuntimeErrorCode];
3495
3581
  declare const queryFeatureUsedMultipleTimes: (type: string) => RuntimeError<0>;
3582
+ declare const queryCreatedInReactiveContext: () => RuntimeError<1>;
3496
3583
  declare const withArgsQueryFeatureMissingButRouteIsFunction: () => RuntimeError<100>;
3497
3584
  declare const withPollingUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<101>;
3498
3585
  declare const withAutoRefreshUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<102>;
@@ -3523,6 +3610,12 @@ declare const querySequenceAlreadyRunning: () => RuntimeError<900>;
3523
3610
  declare const queryBatchAlreadyRunning: () => RuntimeError<910>;
3524
3611
  declare const queryBatchWithArgsUsed: () => RuntimeError<911>;
3525
3612
 
3613
+ /**
3614
+ * `true` on every request `@ethlete/query` sends through `HttpClient`, so an app interceptor can skip
3615
+ * query requests: `if (req.context.get(IS_QUERY_REQUEST)) return next(req);`.
3616
+ */
3617
+ declare const IS_QUERY_REQUEST: HttpContextToken<boolean>;
3618
+
3526
3619
  /** The last element of a tuple type - the response of the step a `.then()` callback follows. */
3527
3620
  type LastOf<T extends unknown[]> = T extends [...unknown[], infer L] ? L : never;
3528
3621
  /** The current lifecycle phase of a query sequence. */
@@ -3535,9 +3628,9 @@ type QuerySequenceStepArgs<TArgs extends QueryArgs> = {
3535
3628
  * The outcome of a settled {@link QuerySequence.run}.
3536
3629
  *
3537
3630
  * A discriminated union: on success `responses` is the fully-typed tuple of every step's response;
3538
- * on failure `failedAt` is the zero-based index of the step that errored and `error` is its
3539
- * normalized {@link QueryErrorResponse}. `snapshots` always holds the settled snapshots of every
3540
- * step that ran - up to and including the failing one.
3631
+ * on failure `failedAt` is the zero-based index of the step that errored or was aborted, and `error`
3632
+ * is its normalized {@link QueryErrorResponse} - `null` for an aborted step. `snapshots` always holds
3633
+ * the settled snapshots of every step that ran - up to and including the failing one.
3541
3634
  */
3542
3635
  type QuerySequenceResult<TResponses extends unknown[]> = {
3543
3636
  ok: true;
@@ -3546,7 +3639,7 @@ type QuerySequenceResult<TResponses extends unknown[]> = {
3546
3639
  } | {
3547
3640
  ok: false;
3548
3641
  failedAt: number;
3549
- error: QueryErrorResponse;
3642
+ error: QueryErrorResponse | null;
3550
3643
  snapshots: AnyQuerySnapshot[];
3551
3644
  };
3552
3645
  /**
@@ -3583,7 +3676,7 @@ type QuerySequence<TResponses extends unknown[]> = {
3583
3676
  total: number;
3584
3677
  /** The query objects backing each step, in order. Useful for devtools / advanced introspection. */
3585
3678
  queries: AnyNewQuery[];
3586
- /** The error of the step that failed, or `null` while running / on success. */
3679
+ /** The error of the step that failed, or `null` while running, on success, or when a step was aborted. */
3587
3680
  error: Signal<QueryErrorResponse | null>;
3588
3681
  /** The zero-based index of the step that failed, or `null` while running / on success. */
3589
3682
  failedAt: Signal<number | null>;
@@ -3606,7 +3699,8 @@ type QuerySequence<TResponses extends unknown[]> = {
3606
3699
  *
3607
3700
  * Cancellation (inherited from `executeUntilSettled`): a step whose request is cancelled - a
3608
3701
  * destroyed host scope, an evicted cache entry - stops the waterfall like any other failure, with
3609
- * an error that says the request was cancelled.
3702
+ * an error that says the request was cancelled. A step stopped by `query.abort()` stops it too: the
3703
+ * status is `error`, `failedAt` points at that step and `error` is `null`.
3610
3704
  */
3611
3705
  run: () => Promise<QuerySequenceResult<TResponses>>;
3612
3706
  };
@@ -3715,17 +3809,27 @@ type CreateQuerySnapshotOptions<TArgs extends QueryArgs> = {
3715
3809
  declare const createQuerySnapshotFn: <TArgs extends QueryArgs>(options: CreateQuerySnapshotOptions<TArgs>) => () => QuerySnapshot<TArgs>;
3716
3810
 
3717
3811
  /**
3718
- * Executes the query and resolves once that execution has settled (response or error received).
3719
- * The returned snapshot is frozen to the awaited execution, so a later execution can't swap the
3720
- * `response()` / `error()` you read from it.
3812
+ * Executes the query on subscribe and emits once that execution has settled (response or error
3813
+ * received), then completes. Cold: nothing is sent until it is subscribed to. The emitted snapshot is
3814
+ * frozen to that execution, so a later execution can't swap the `response()` / `error()` you read.
3721
3815
  *
3722
- * Designed for imperative flows that need a mutation's outcome in place - e.g. a signal-forms
3723
- * `submit()` action mapping server violations onto the form via `mapViolationsToFormErrors`.
3816
+ * Unsubscribing before it settles aborts the execution like `query.abort()`, the way unsubscribing
3817
+ * from `HttpClient` cancels its request. An execution stopped by `query.abort()` completes the stream
3818
+ * without a value.
3724
3819
  *
3725
3820
  * A cancelled execution settles too - the entry was evicted, unbound by a logout, or the scope that
3726
3821
  * owns the query was destroyed. The snapshot then reports the execution as a failure whose error
3727
3822
  * says the request was cancelled, and its `latestHttpEvent()` is `{ type: 'cancel' }`.
3728
3823
  */
3824
+ declare const executeUntilSettled$: <TArgs extends QueryArgs>(query: Query<TArgs>, executeArgs?: QueryExecuteArgs<TArgs>) => Observable<QuerySnapshot<TArgs>>;
3825
+ /**
3826
+ * The Promise form of {@link executeUntilSettled$}, for APIs that require an `async` function - e.g. a
3827
+ * signal-forms `submit()` action mapping server violations onto the form via
3828
+ * `mapViolationsToFormErrors`. Executes immediately. Prefer {@link executeUntilSettled$} in RxJS code.
3829
+ *
3830
+ * An execution stopped by `query.abort()` resolves with a snapshot that has no response, no error, a
3831
+ * `null` `executionState()` and `latestHttpEvent()` `{ type: 'cancel' }`.
3832
+ */
3729
3833
  declare const executeUntilSettled: <TArgs extends QueryArgs>(query: Query<TArgs>, executeArgs?: QueryExecuteArgs<TArgs>) => Promise<QuerySnapshot<TArgs>>;
3730
3834
 
3731
3835
  type QueryStackSubtle<TCreator extends AnyQueryCreator, TQuery extends AnyNewQuery> = {
@@ -3886,7 +3990,7 @@ type CreateQuerySubmissionConfig<TCreator extends AnyQueryCreator, TModel> = {
3886
3990
  args?: (value: TModel, field: FieldTree<TModel>) => RequestArgs<QueryArgsOf<TCreator>> | null;
3887
3991
  /**
3888
3992
  * Runs after the request succeeded, before the action resolves and the form leaves its submitting
3889
- * state - notify, close the overlay, navigate.
3993
+ * state - notify, close the overlay, navigate. An aborted submission does not call it.
3890
3994
  */
3891
3995
  onSuccess?: (response: ResponseType<QueryArgsOf<TCreator>>, field: FieldTree<TModel>) => void;
3892
3996
  /**
@@ -4038,6 +4142,11 @@ type AuthQueryConfig<TArgs extends QueryArgs> = {
4038
4142
  * @default (response) => response (assumes response has accessToken and refreshToken properties)
4039
4143
  */
4040
4144
  extractTokens?: (response: ResponseType<TArgs>) => BearerAuthProviderTokens;
4145
+ /**
4146
+ * Decides whether a failed request of this query is retried, replacing the query creator's policy.
4147
+ * @default the query creator's `retryFn` for an authentication query, a built-in backoff for a refresh query
4148
+ */
4149
+ retryFn?: ShouldRetryRequestFn;
4041
4150
  };
4042
4151
  type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> & {
4043
4152
  /**
@@ -4062,7 +4171,7 @@ type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> &
4062
4171
  * Strategy for determining when to refresh the token.
4063
4172
  * Can be either:
4064
4173
  * - A percentage (0-1) of the token's lifetime (e.g., 0.75 = refresh at 75% of lifetime)
4065
- * - A fixed time in milliseconds before expiration
4174
+ * - A fixed time in milliseconds before expiration (above 1; a negative number counts as 0)
4066
4175
  * - An object with both percentage and min/max constraints
4067
4176
  * @default { percentage: 0.75, minBufferMs: 60000, maxBufferMs: 600000 }
4068
4177
  */
@@ -4340,7 +4449,8 @@ type PersistentAuthConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ext
4340
4449
  name?: string;
4341
4450
  /**
4342
4451
  * The domain of the cookie. If not set, the cookie is host-only: it belongs to the exact host that
4343
- * wrote it and no subdomain of it. Set this only when sibling subdomains must share the session.
4452
+ * wrote it and no subdomain of it. A sibling subdomain cannot read a cookie another origin wrote, so
4453
+ * setting this does not share a session between them.
4344
4454
  */
4345
4455
  domain?: string;
4346
4456
  /**
@@ -4419,6 +4529,10 @@ declare const withPersistentAuth: <TBuilders extends readonly AnyQueryBuilder[],
4419
4529
  value: string;
4420
4530
  }[];
4421
4531
  };
4532
+ /**
4533
+ * Builds the `withPersistentAuth` feature against a provider's feature context. It runs in
4534
+ * `context.injector`, so it can be called outside an injection context.
4535
+ */
4422
4536
  declare const createPersistentAuthFeature: <TBuilders extends readonly AnyQueryBuilder[], TKey extends ExtractQueryKey<TBuilders[number]> = ExtractQueryKey<TBuilders[number]>>(config: PersistentAuthConfig<TBuilders, TKey>, context: BearerAuthProviderFeatureContext<unknown, TBuilders>) => PersistentAuthFeature;
4423
4537
 
4424
4538
  type TokenExpirationWarningConfig = {
@@ -4481,7 +4595,9 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
4481
4595
  */
4482
4596
  revokeOnLogout?: boolean;
4483
4597
  /**
4484
- * The session end causes that revoke automatically. Leave it out to revoke on every cause.
4598
+ * The session end causes that revoke automatically. Leave it out to revoke on every cause but
4599
+ * `otherTab`. A tab that multi-tab sync logged out reads as `otherTab` here whatever the cause was, so
4600
+ * only the tab the logout started in revokes unless this names `otherTab`.
4485
4601
  * @example revokeOn: ['user'] // for an API whose revocation ends the sessions on all devices
4486
4602
  */
4487
4603
  revokeOn?: readonly BearerAuthSessionEndCause[];
@@ -4494,8 +4610,8 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
4494
4610
  type TokenRevocationFeature<TQuerySnapshot extends AnyQuerySnapshot> = {
4495
4611
  /**
4496
4612
  * Manually revoke the current tokens.
4497
- * Returns `null` if there are no tokens to revoke
4498
- * Returns the revocation query snapshot if revocation was attempted
4613
+ * Returns `null` if there are no tokens to revoke, else the snapshot of the revocation that sends them -
4614
+ * one queued behind a revocation in flight stays `isAlive()` until its own request settles.
4499
4615
  */
4500
4616
  revoke: () => TQuerySnapshot | null;
4501
4617
  /**
@@ -4587,6 +4703,10 @@ declare const withTracking: <TBuilders extends readonly AnyQueryBuilder[]>(confi
4587
4703
  value: string;
4588
4704
  }[];
4589
4705
  };
4706
+ /**
4707
+ * Builds the `withTracking` feature against a provider's feature context. It runs in
4708
+ * `context.injector`, so it can be called outside an injection context.
4709
+ */
4590
4710
  declare const createTrackingFeature: <TBuilders extends readonly AnyQueryBuilder[]>(context: BearerAuthProviderFeatureContext<unknown, TBuilders>, config?: TrackingConfig<TBuilders>) => TrackingFeature<TBuilders>;
4591
4711
 
4592
4712
  /**
@@ -4697,8 +4817,13 @@ type BearerAuthProviderEarlySetupContext = {
4697
4817
  * one is a rotation, and reporting those would stomp whatever the tab is doing.
4698
4818
  */
4699
4819
  setTokens: (access: string, refresh: string) => void;
4700
- /** Ends the session, exactly as the provider's own `logout()` does. */
4701
- logout: (cause?: BearerAuthSessionEndCause) => void;
4820
+ /**
4821
+ * Ends the session, exactly as the provider's own `logout()` does. Pass `fromOtherTab` for a logout
4822
+ * another tab started, so this tab does not revoke the tokens a second time.
4823
+ */
4824
+ logout: (cause?: BearerAuthSessionEndCause, options?: {
4825
+ fromOtherTab?: boolean;
4826
+ }) => void;
4702
4827
  /** Why the last session ended, as {@link BearerAuthProvider.sessionEndCause} reports it. */
4703
4828
  sessionEndCause: Signal<BearerAuthSessionEndCause | null>;
4704
4829
  /**
@@ -5817,8 +5942,11 @@ type QueryDevtoolsResolvedFault = {
5817
5942
  /** The status to fail the attempt with instead of sending it, or `null` to let it through. */
5818
5943
  status: number | null;
5819
5944
  };
5820
- /** What a mock resolver matches against - the same three things a fault resolver sees. */
5821
- type QueryDevtoolsMockTarget = QueryDevtoolsFaultTarget;
5945
+ /** What a mock resolver matches against - what a fault resolver sees, plus the client's base URL. */
5946
+ type QueryDevtoolsMockTarget = QueryDevtoolsFaultTarget & {
5947
+ /** Base URL of the owning query client; the pattern is matched against the path after it. */
5948
+ baseUrl: string;
5949
+ };
5822
5950
  /** The response the devtools want served instead of one upcoming attempt. */
5823
5951
  type QueryDevtoolsResolvedMock = {
5824
5952
  /** The status to respond with. `400` and above are delivered as an `HttpErrorResponse`. */
@@ -5931,8 +6059,12 @@ declare const queryDevtoolsArmedMocksRestored: Signal<boolean>;
5931
6059
  declare const queryDevtoolsMockId: (parts: Pick<QueryDevtoolsMock, "clientName" | "method" | "pattern"> & {
5932
6060
  query?: string;
5933
6061
  }) => string;
5934
- /** The path of a request URL, without its origin or query string - what a pattern is matched against. */
5935
- declare const queryDevtoolsRequestPath: (url: string) => string;
6062
+ /**
6063
+ * The path of a request URL relative to the client's `baseUrl` (base path included), without its query
6064
+ * string - what a pattern is matched against. A URL outside `baseUrl`, or no `baseUrl` at all, falls
6065
+ * back to the path without its origin.
6066
+ */
6067
+ declare const queryDevtoolsRequestPath: (url: string, baseUrl?: string) => string;
5936
6068
  /**
5937
6069
  * Whether a request carries every query parameter a mock declares. Extra parameters are ignored - a mock
5938
6070
  * says what the request must ask for, not everything it may.
@@ -6355,6 +6487,12 @@ declare const MAX_QUERY_DEVTOOLS_TOMBSTONES = 50;
6355
6487
  * for - and low, because the batch's own entry already holds every item's args, response and error.
6356
6488
  */
6357
6489
  declare const MAX_QUERY_BATCH_TOMBSTONES = 20;
6490
+ /**
6491
+ * How many batches keep their item tombstones at all - the ones whose items settled most recently, live
6492
+ * or destroyed. An older batch loses its whole tail, so the total stays at this times
6493
+ * {@link MAX_QUERY_BATCH_TOMBSTONES} however many batches a page creates.
6494
+ */
6495
+ declare const MAX_QUERY_BATCH_TOMBSTONE_BUCKETS = 5;
6358
6496
  /**
6359
6497
  * A destroyed query's last state, shaped like the query itself: every signal the panel reads is
6360
6498
  * replaced by a function returning the value it held when the query went away, and every action is a
@@ -6899,6 +7037,18 @@ type Sort = {
6899
7037
  };
6900
7038
  declare const transformToSort: (value: unknown) => Sort | null;
6901
7039
  declare const transformToSortQueryParam: (value: unknown) => string | null;
7040
+ /** One sorted column, by `key`; the same shape as the `@ethlete/components` table's `TableSort`. */
7041
+ type TableSortEntry = {
7042
+ key: string;
7043
+ direction: 'asc' | 'desc';
7044
+ };
7045
+ /**
7046
+ * Reads `key:direction` entries (`name:asc`) into a table sort, dropping an entry with an empty key or an
7047
+ * unknown direction and every repeat of a key after its first. `null` when nothing is readable.
7048
+ */
7049
+ declare const transformToTableSort: (value: unknown) => TableSortEntry[] | null;
7050
+ /** Writes a table sort as one `key:direction` entry per sorted column. */
7051
+ declare const transformToTableSortQueryParam: (value: unknown) => string[] | null;
6902
7052
 
6903
7053
  /** @deprecated Use `queryField` with `defineQueryForm`. */
6904
7054
  declare class QueryField<T> {
@@ -7112,6 +7262,11 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
7112
7262
  entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined;
7113
7263
  private isDestroyed;
7114
7264
  private _triggeredVia;
7265
+ private _lastExecuteCalledAt;
7266
+ private _ownLoadExecuteTime;
7267
+ private _responseAtExecute;
7268
+ private _errorAtExecute;
7269
+ private _ownLoadSettled;
7115
7270
  private _wasAborted;
7116
7271
  state$: Observable<V2QueryState<Data>>;
7117
7272
  constructor(newQuery: TNewQuery, _arguments: RequestArgs<QueryArgsOf<TNewQuery>>, entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined,
@@ -7135,6 +7290,13 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
7135
7290
  * never run. The abort flag is the only thing that tells the two apart.
7136
7291
  */
7137
7292
  private toQueryState;
7293
+ /**
7294
+ * A load this wrapper did not start - a `refreshQueriesInUse()`, an invalidation - reports as `auto`, the way
7295
+ * v2 reported its background refreshes. A secure query that waits for a token reports a synthetic loading
7296
+ * state first and the request's own later, so a new load that starts before this one settled is still its own.
7297
+ */
7298
+ private triggerOf;
7299
+ private hasOwnLoadSettled;
7138
7300
  get isExpired(): boolean | undefined;
7139
7301
  get isInUse(): boolean;
7140
7302
  get isPolling(): boolean;
@@ -8265,7 +8427,7 @@ declare const v2ShouldCacheQuery: (method: Method) => method is "GET" | "OPTIONS
8265
8427
  *
8266
8428
  * @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.
8267
8429
  */
8268
- declare const v2BuildQueryCacheKey: (route: string, args: BaseArguments | undefined, method?: Method) => string;
8430
+ declare const v2BuildQueryCacheKey: (route: string, args: (BaseArguments & WithHeaders) | undefined, method?: Method) => string;
8269
8431
 
8270
8432
  /**
8271
8433
  * @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.
@@ -8753,7 +8915,7 @@ declare class QueryShortNamePipe implements PipeTransform {
8753
8915
  /**
8754
8916
  * @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.
8755
8917
  */
8756
- declare const provideInfinityQueryResponseDelay: () => _angular_core.Provider[];
8918
+ declare const provideInfinityQueryResponseDelay: () => _angular_core.StaticProvider[];
8757
8919
  /**
8758
8920
  * @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.
8759
8921
  */
@@ -8970,7 +9132,6 @@ declare class InfinityQueryDirective<Q extends InfinityQueryConfig<DirectiveQuer
8970
9132
  private cdr;
8971
9133
  private viewContainerRef;
8972
9134
  private mainTemplateRef;
8973
- private errorHandler;
8974
9135
  private injector;
8975
9136
  private infinityQueryResponseDelay;
8976
9137
  private readonly _data$;
@@ -9056,7 +9217,6 @@ type QueryDirectiveType = AnyV2Query | AnyLegacyQuery | AnyQueryCollection;
9056
9217
  * @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.
9057
9218
  */
9058
9219
  declare class QueryDirective<Q extends QueryDirectiveType | null> {
9059
- private errorHandler;
9060
9220
  private cdr;
9061
9221
  private readonly viewContext;
9062
9222
  query: _angular_core.InputSignal<Q>;
@@ -9194,8 +9354,7 @@ declare class ParseHttpErrorCodeToMessageEnPipe implements PipeTransform {
9194
9354
  * The internal, fully-resolved definition of a single query-form field.
9195
9355
  *
9196
9356
  * Produced by the field creators (`queryField()`, `searchQueryField()`, …) and
9197
- * consumed by `defineQueryForm()`. `T` is the field's value type and always
9198
- * includes `null` (a field can be cleared).
9357
+ * consumed by `defineQueryForm()`. `T` is the field's value type.
9199
9358
  */
9200
9359
  type QueryFieldDef<T> = {
9201
9360
  /**
@@ -9236,18 +9395,18 @@ type QueryFieldDef<T> = {
9236
9395
  * Exclude this field from `activeFilterCount`. The common pagination/sort/search
9237
9396
  * keys are excluded automatically (see `IGNORED_FILTER_COUNT_FIELDS`).
9238
9397
  *
9239
- * @default false
9398
+ * @default false (`true` for `searchQueryField` and `sortQueryField`)
9240
9399
  */
9241
9400
  readonly skipInFilterCount?: boolean;
9242
9401
  /**
9243
- * Skip the best-effort auto-coercion (numeric strings → number, `'true'`/`'false'`
9244
- * → boolean, the null and empty-list sentinels → `null` and `[]`) when reading the value back from the URL.
9402
+ * Skip the auto-coercion (a URL string read into the type of a number or boolean default, the null and
9403
+ * empty-list sentinels → `null` and `[]`) when reading the value back from the URL.
9245
9404
  *
9246
9405
  * @default false
9247
9406
  */
9248
9407
  readonly skipAutoTransform?: boolean;
9249
- /** Transform a raw URL query-param value into the field's value type. */
9250
- readonly queryParamToValue?: (raw: unknown) => T;
9408
+ /** Transform a raw URL query-param value into the field's value type. `null` falls back to the default. */
9409
+ readonly queryParamToValue?: (raw: unknown) => T | null;
9251
9410
  /**
9252
9411
  * Transform the field's value into a raw URL query-param value.
9253
9412
  *
@@ -9451,32 +9610,72 @@ type QueryFormSignals<TFields extends QueryFormFields> = {
9451
9610
  */
9452
9611
  declare const defineQueryForm: <TFields extends QueryFormFields>(config: DefineQueryFormConfig<TFields>) => QueryFormSignals<TFields>;
9453
9612
 
9613
+ /** The value types the URL is read back into without a `queryParamToValue`, given a default of that type. */
9614
+ type AutoParsedValue = string | number | boolean | readonly string[];
9615
+ type ParserUnless<T, TAutoParsed> = [NonNullable<T>] extends [TAutoParsed] ? unknown : {
9616
+ readonly queryParamToValue: (raw: unknown) => T | null;
9617
+ };
9454
9618
  /**
9455
- * A generic query-form field. Defaults to `null` and, unless a transform is
9456
- * given, relies on the auto-coercion when reading back from the URL.
9619
+ * A generic query-form field. With a non-null `defaultValue` it is typed `T` and reads the URL back into the
9620
+ * default's type (a number default parses numbers, a boolean default `'true'`/`'false'`); a value the type
9621
+ * cannot hold falls back to the default. Declare `T | null` to allow an explicit `null`.
9622
+ *
9623
+ * Without a default it starts at `null` and reads the URL back as a string, so any other `T` needs a
9624
+ * `queryParamToValue` - e.g. `transformToNumber`.
9457
9625
  *
9458
9626
  * @example
9459
9627
  * queryField<number>({ defaultValue: 1, isResetBy: ['search'] })
9628
+ * queryField<string>()
9629
+ * queryField<number>({ queryParamToValue: transformToNumber })
9460
9630
  */
9461
- declare const queryField: <T = string>(config?: QueryFieldConfig<T | null>) => QueryFieldDef<T | null>;
9631
+ declare function queryField<T>(config: QueryFieldConfig<T> & {
9632
+ readonly defaultValue: NonNullable<T> | (() => NonNullable<T>);
9633
+ } & ParserUnless<T, AutoParsedValue>): QueryFieldDef<T>;
9634
+ declare function queryField<T = string>(...config: [NonNullable<T>] extends [string] ? [config?: QueryFieldConfig<T | null>] : [config: QueryFieldConfig<T | null> & ParserUnless<T | null, string>]): QueryFieldDef<T | null>;
9462
9635
  /**
9463
- * A debounced free-text search field. Debounces typing by 300ms but applies
9464
- * clearing immediately (`disableDebounceIfFalsy`). Reads the URL value back as the raw string.
9636
+ * A debounced free-text search field, typed `string` like every text control; `''` is empty and writes no
9637
+ * URL param. Debounces typing by 300ms but applies clearing immediately (`disableDebounceIfFalsy`). Not counted
9638
+ * by `activeFilterCount`, whatever its key.
9465
9639
  */
9466
- declare const searchQueryField: (config?: QueryFieldConfig<string | null>) => QueryFieldDef<string | null>;
9640
+ declare const searchQueryField: (config?: QueryFieldConfig<string>) => QueryFieldDef<string>;
9467
9641
  /**
9468
- * A sort field serialized as `"active:direction"` (e.g. `"name:asc"`). Matches
9469
- * the wire format the table system's URL adapter uses, so the two interoperate.
9642
+ * A sort field serialized as `"active:direction"` (e.g. `"name:asc"`). Not counted by `activeFilterCount`,
9643
+ * whatever its key.
9470
9644
  */
9471
9645
  declare const sortQueryField: (config?: QueryFieldConfig<Sort | null>) => QueryFieldDef<Sort | null>;
9646
+ /**
9647
+ * A multi-column sort typed like the `@ethlete/components` table's `sort`, so `[(sort)]` binds it with no
9648
+ * mapping. Written as one `key:direction` param per column (`?sort=name:asc&sort=date:desc`); an unreadable
9649
+ * entry is dropped. Starts at `[]`. Not counted by `activeFilterCount`, whatever its key.
9650
+ *
9651
+ * @example
9652
+ * tableSortQueryField() // <et-table [(sort)]="qf.fields.sort().value" sortMode="server" />
9653
+ */
9654
+ declare const tableSortQueryField: (config?: QueryFieldConfig<TableSortEntry[]>) => QueryFieldDef<TableSortEntry[]>;
9472
9655
  /** A field holding a list of strings. */
9473
9656
  declare const stringArrayQueryField: (config?: QueryFieldConfig<string[] | null>) => QueryFieldDef<string[] | null>;
9474
9657
  /** A field holding a list of numbers. */
9475
9658
  declare const numberArrayQueryField: (config?: QueryFieldConfig<number[] | null>) => QueryFieldDef<number[] | null>;
9476
9659
  /** A field holding a list of booleans. */
9477
9660
  declare const booleanArrayQueryField: (config?: QueryFieldConfig<boolean[] | null>) => QueryFieldDef<boolean[] | null>;
9478
- /** A single date field (expects an ISO/`Date`-parseable string in the URL). */
9479
- declare const dateQueryField: (config?: QueryFieldConfig<Date | null>) => QueryFieldDef<Date | null>;
9661
+ /** Options of {@link dateQueryField}; `as: 'string'` keeps the control's wire string instead of a `Date`. */
9662
+ type DateQueryFieldConfig = QueryFieldConfig<Date | null> & {
9663
+ readonly as?: 'date';
9664
+ };
9665
+ /** Options of {@link dateQueryField} with `as: 'string'`. */
9666
+ type DateStringQueryFieldConfig = QueryFieldConfig<string | null> & {
9667
+ readonly as: 'string';
9668
+ };
9669
+ /**
9670
+ * A single date field. By default it holds a `Date` read from an ISO/`Date`-parseable string in the URL.
9671
+ * `as: 'string'` types it `string | null` like the `@ethlete/components` date and time controls, so
9672
+ * `[formField]` binds it to them; the URL then carries the control's `valueFormat` string verbatim.
9673
+ *
9674
+ * @example
9675
+ * dateQueryField({ as: 'string' }) // <et-date-input [formField]="qf.fields.from" valueFormat="yyyy-MM-dd" />
9676
+ */
9677
+ declare function dateQueryField(config: DateStringQueryFieldConfig): QueryFieldDef<string | null>;
9678
+ declare function dateQueryField(config?: DateQueryFieldConfig): QueryFieldDef<Date | null>;
9480
9679
  /** A field holding a list of dates. */
9481
9680
  declare const dateArrayQueryField: (config?: QueryFieldConfig<Date[] | null>) => QueryFieldDef<Date[] | null>;
9482
9681
 
@@ -9525,10 +9724,16 @@ type WebSocketClientSocket = {
9525
9724
  connect: () => void;
9526
9725
  disconnect: () => void;
9527
9726
  emit: (event: string, data: unknown) => void;
9528
- on: (event: 'connect' | 'disconnect', listener: () => void) => void;
9727
+ on: {
9728
+ (event: 'connect', listener: () => void): void;
9729
+ (event: 'disconnect', listener: (reason: string) => void): void;
9730
+ (event: 'connect_error', listener: (error: Error) => void): void;
9731
+ };
9529
9732
  onAny: (listener: (eventName: string, ...args: unknown[]) => void) => void;
9530
9733
  onAnyOutgoing: (listener: (eventName: string, ...args: unknown[]) => void) => void;
9531
9734
  readonly recovered: boolean;
9735
+ /** `false` once socket.io gave up reconnecting on its own - after a rejected handshake, for example. */
9736
+ readonly active?: boolean;
9532
9737
  };
9533
9738
  /**
9534
9739
  * The `io` factory of `socket.io-client`, declared structurally.
@@ -9625,7 +9830,7 @@ type AnyWebSocketClient<TMessageData extends SocketMessageView = SocketMessageVi
9625
9830
  declare const createWebSocketClient: <TMessageData extends SocketMessageView = SocketMessageView>(options: CreateWebSocketClientConfigOptions) => WebSocketClientResult<TMessageData>;
9626
9831
 
9627
9832
  /** The version of `@ethlete/query` this build was cut from. */
9628
- declare const QUERY_VERSION = "6.0.0-next.51";
9833
+ declare const QUERY_VERSION = "6.0.0-next.53";
9629
9834
 
9630
- export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, 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_QUERY_BATCH_TOMBSTONES, MAX_QUERY_DEVTOOLS_TOMBSTONES, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_DEVTOOLS_TOKEN_TTL_LIMIT, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QUERY_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStateType, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, addQueryDevtoolsAuthAccount, applyQueryDevtoolsOverrides, applyQueryDevtoolsTokenTtl, applyQueryFeatures, armAllQueryDevtoolsMocks, armQueryDevtoolsMock, armQueryDevtoolsOverrideTransfer, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, canOverrideQueryDevtoolsTokenTtl, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsArmedMocks, clearQueryDevtoolsAuthCredentials, clearQueryDevtoolsAuthSessions, clearQueryDevtoolsFaults, clearQueryDevtoolsMockStore, clearQueryDevtoolsOverrideStore, clearQueryDevtoolsStore, clearQueryDevtoolsTokenTtl, clearQueryDevtoolsTombstones, clearRestoredQueryDevtoolsOverrides, collectLeafPaths, collectQueryDevtoolsSchemaComponents, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, contentfulGqlLikePaginationAdapter, countUnresolvedQueryDevtoolsOverrides, createAuthGuard, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDefaultRetryFn, createDeleteQuery, createExecuteFn, createGetQuery, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHeadQuery, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createOptionsQuery, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryBatch, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryCreator, createQueryDevtoolsOverrides, createQueryErrorResponse, createQueryFeature, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySubmission, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecureHeadQuery, createSecureOptionsQuery, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, defineQueryForm, deleteQueryDevtoolsMock, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, forgetQueryDevtoolsAuthSession, forgetQueryDevtoolsAuthSessionsFor, generateQueryDevtoolsNumberPreset, generateQueryDevtoolsSampleNumber, generateQueryDevtoolsStringPreset, getDefaultHeaders, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, gqlErrorsInResponse, hasHeader, hasQueryDevtoolsOverridesAtPath, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isIdempotentQueryMethod, isLegacyQuery, isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsRepositoryLive, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareWithoutInjectionContext, loadQueryDevtoolsSchema, loginQueryDevtoolsAuthAccount, logoutQueryDevtoolsAuthSession, mapToPaginated, mapViolationsToFormErrors, matchesQueryDevtoolsMockPattern, matchesQueryDevtoolsMockQuery, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryDevtoolsOverrideTransfer, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryBatchAlreadyRunning, queryBatchWithArgsUsed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryDevtoolsAbout, queryDevtoolsAllowsLocalAuthSessions, queryDevtoolsApiEnvIds, queryDevtoolsApiEnvIsProduction, queryDevtoolsApiEnvScope, queryDevtoolsApiEnvValues, queryDevtoolsApiEnvs, queryDevtoolsArmedMocks, queryDevtoolsArmedMocksRestored, queryDevtoolsAuthAccountsFor, queryDevtoolsAuthActive, queryDevtoolsAuthFieldsFor, queryDevtoolsAuthOtherScopeCount, queryDevtoolsAuthSessions, queryDevtoolsAuthSessionsFor, queryDevtoolsAuthTabLocal, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFaultsRestored, queryDevtoolsMockId, queryDevtoolsMocks, queryDevtoolsOverridePersistence, queryDevtoolsRequestPath, queryDevtoolsResponseHistory, queryDevtoolsRestoredOverridesScope, queryDevtoolsSchemaNames, queryDevtoolsSchemaRoutes, queryDevtoolsSchemaState, queryDevtoolsSettings, queryDevtoolsStorage, queryDevtoolsTokenTtls, queryErrorMessage, queryErrorMessages, queryExecute, queryExecutedAfterDestroyMessage, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, readQueryDevtoolsStore, registerEthleteVersion, registerQueryErrorParser, removeFrom, removeQueryDevtoolsAuthAccount, renameQueryDevtoolsAuthSession, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryHeaders, restoredQueryDevtoolsOverrides, saveQueryDevtoolsMock, searchQueryField, seedQueryDevtoolsSchemaBody, seedQueryDevtoolsSchemaRoute, serializeBody, serializeQueryDevtoolsOverrideTransfer, setQueryDevtoolsApiEnv, setQueryDevtoolsAppInfo, setQueryDevtoolsArmedMocksScope, setQueryDevtoolsAuthCredentials, setQueryDevtoolsAuthTabLocal, setQueryDevtoolsFault, setQueryDevtoolsFaultsScope, setQueryDevtoolsOverridePersistence, setQueryDevtoolsOverridesScope, setQueryDevtoolsSettings, setQueryDevtoolsTokenTtl, setQueryDevtoolsUiMounted, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, snapshotQueryDevtoolsHandle, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, switchQueryCollectionState, switchQueryDevtoolsAuthSession, switchQueryState, symfonyQueryErrorParser, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, tombstoneOf, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapGqlResponseWithErrors, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withLongPolling, withLongPollingUsedOnUnsupportedHttpMethod, withLongPollingUsedWithPolling, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage, writeQueryDevtoolsStore };
9631
- export type { AnyBearerAuthProvider, AnyCreateBearerAuthProviderResult, AnyCreateGqlQueryCreatorOptions, AnyCreateQueryClientResult, AnyGqlQueryConfig, AnyInfinityQuery, AnyInfinityQueryConfig, AnyLegacyQuery, AnyLegacyQueryCreator, AnyNewQuery, AnyPagedQueryStack, AnyQueryBatch, AnyQueryBatchItemResult, AnyQueryBuilder, AnyQueryClient, AnyQueryCollection, AnyQueryCollectionData, AnyQueryCollectionResponse, AnyQueryCreator, AnyQueryCreatorCollection, AnyQueryForm, AnyQuerySnapshot, AnyQueryStack, AnyRestQueryConfig, AnyRoute, AnyV2Query, AnyV2QueryCreator, AnyWebSocketClient, AppendItemsLocation, ApplyExternalResponseOptions, ApplyPersistedResponseOptions, AuthGuard, AuthGuardConfig, AuthGuardPermission, AuthGuardPermissionOptions, AuthGuardTarget, AuthProvider, AuthProviderBasicConfig, AuthProviderBearerConfig, AuthProviderCustomHeaderConfig, AuthQueryBuilder, AuthQueryConfig, BaseArguments, BaseQueryCreatorFactoryOptions, BaseQueryCreatorOptions, BaseQueryCreatorOptionsSubtle, BearerAuthActivityCoordination, BearerAuthExecutionState, BearerAuthExecutionStateError, BearerAuthExecutionStateLoading, BearerAuthExecutionStateLogout, BearerAuthExecutionStateSuccess, BearerAuthExecutionStateTokenSeed, BearerAuthFeature, BearerAuthMultiTabSyncConfig, BearerAuthMultiTabSyncFeature, BearerAuthProvider, BearerAuthProviderEarlySetup, BearerAuthProviderEarlySetupContext, BearerAuthProviderEarlySetupResult, BearerAuthProviderFeatureContext, BearerAuthProviderOf, BearerAuthProviderQueryContext, BearerAuthProviderRef, BearerAuthProviderTokens, BearerAuthRefreshCoordination, BearerAuthSession, BearerAuthSessionAdoption, BearerAuthSessionEndCause, BearerAuthSessionStatus, BearerRefreshConfig, BodyType, BuildQueryStringConfig, CacheAdapterFn, Cancelled, ClassValidatorError, ConstructQuery, CreateBaseQueryOptions, CreateBearerAuthProviderConfig, CreateGqlQueryCreatorOptions, CreateGqlQueryExecuteOptions, CreateGqlQueryOptions, CreateHttpRequestDependencies, CreateHttpRequestOptions, CreateIndexedDbQueryPersistenceAdapterOptions, CreateLegacyQueryCreatorOptions, CreateLegacyQueryOptions, CreatePagedQueryStackOptions, CreateQueryBatchOptions, CreateQueryClientConfigOptions, CreateQueryCreatorOptions, CreateQueryExecuteOptions, CreateQueryObjectOptions, CreateQueryOptions, CreateQueryPersistenceEngineOptions, CreateQueryRepositoryConfig, CreateQuerySnapshotOptions, CreateQueryStackOptions, CreateQuerySubmissionConfig, CreateQuerySyncEngineOptions, CreateSecureGqlQueryExecuteOptions, CreateSecureGqlQueryOptions, CreateSecureQueryExecuteOptions, CreateSecureQueryOptions, CreateWebSocketClientConfigOptions, CreateWebSocketClientTransport, DefaultRetryOptions, DefineQueryFormConfig, DescribableFeature, DestroyCleanupCallback, EmptyObject, EntityGetParams, EntityIdParams, EntityKey, EntitySetParams, EntityStoreConfig, ExecuteFactory, ExecuteQueryOptions, ExtractQueryArgs, ExtractQueryKey, Failure, FeatureRegistry, GQL, GqlDataWithErrors, GqlEnvelope, GqlError, GqlQueryArgs, GqlQueryConfig, GqlQueryConfigWithoutMethod, GqlQueryMethod, GqlQueryTransport, GqlRawResponseType, GqlTransferOption, GqlTransformer, GqlVariablesType, HttpCancelEvent, HttpErrorEvent, HttpRequest, HttpRequestLoadingProgressState, HttpRequestLoadingState, HttpRequestResponseType, HttpRequestRetryState, HttpRequestSubtle, HttpRequestTransferCacheConfig, InactivityLogoutConfig, InactivityLogoutFeature, InfinityQueryConfig, InfinityQueryConfigType, InfinityQueryOf, InfinityQueryParamLocation, InsertFromConfig, InternalCreateGqlQueryCreatorOptions, InternalCreateQueryCreatorOptions, InternalQueryExecute, InternalSecureCreateGqlQueryCreatorOptions, InternalSecureCreateQueryCreatorOptions, InternalWebSocketRoom, JsonPath, LeaderInstanceCountChangeEventData, LeaderStatusChangeEventData, LegacyArgumentsOfQueryArgs, LegacyQueryPrepareFn, Loading, LogoutEventData, MapViolationsToFormErrorsOptions, Method, ObservableSignal, OptionalQueryFieldOptions, OverrideOp, PageParamCalculatorOptions, PagedQueryStack, PagedQueryStackDirection, PagedQueryStackExecuteOptions, PagedQueryStackResetOptions, PartialXhrState, PathParams, PathParamsType, PersistedQueryBody, PersistedQueryEntry, PersistedQueryEntryMeta, PersistentAuthConfig, PersistentAuthFeature, PollConfig, Prepared, Query, QueryArgs, QueryArgsOf, QueryArgsOfLegacyArguments, QueryAutoRefreshConfig, QueryBase, QueryBatch, QueryBatchDevtoolsHandle, QueryBatchItemCancelled, QueryBatchItemError, QueryBatchItemResult, QueryBatchItemSkipped, QueryBatchItemSuccess, QueryBatchResult, QueryBatchStatus, QueryClient, QueryClientDevtoolsOptions, QueryClientErrorPipelineFeature, QueryClientFeature, QueryClientFeatureContext, QueryClientFeatureFn, QueryClientMultiTabSyncFeature, QueryClientPersistenceFeature, QueryClientRef, QueryClientSubtle, QueryCollectionKeysOf, QueryCollectionOf, QueryCollectionWithNullableQuery, QueryConfig, QueryConfigBase, QueryConfigWithoutMethod, QueryContainerConfig, QueryCreator, QueryDataOf, QueryDependencies, QueryDevtoolsAbout, QueryDevtoolsApiEnv, QueryDevtoolsApiEnvSwitch, QueryDevtoolsAppInfo, QueryDevtoolsAuthAccount, QueryDevtoolsAuthAccountView, QueryDevtoolsAuthField, QueryDevtoolsAuthLocalAccount, QueryDevtoolsAuthProviderHandle, QueryDevtoolsAuthProviderRegistration, QueryDevtoolsAuthQuery, QueryDevtoolsAuthSeed, QueryDevtoolsAuthSession, QueryDevtoolsEntry, QueryDevtoolsEntryKind, QueryDevtoolsEntryMeta, QueryDevtoolsFault, QueryDevtoolsFaultTarget, QueryDevtoolsFeature, QueryDevtoolsFeatureDescriber, QueryDevtoolsFeatureDetail, QueryDevtoolsFormField, QueryDevtoolsFormHandle, QueryDevtoolsFormLinksHandle, QueryDevtoolsFormLinksRecorder, QueryDevtoolsMock, QueryDevtoolsMockTarget, QueryDevtoolsOptions, QueryDevtoolsOverrideEntry, QueryDevtoolsOverrideTransfer, QueryDevtoolsOverrideTransferParse, QueryDevtoolsOverridesHandle, QueryDevtoolsOverridesRecorder, QueryDevtoolsPayload, QueryDevtoolsRegistrar, QueryDevtoolsRegistration, QueryDevtoolsResolvedFault, QueryDevtoolsResolvedMock, QueryDevtoolsRoutePart, QueryDevtoolsRun, QueryDevtoolsRunError, QueryDevtoolsRunStatus, QueryDevtoolsSchemaComponents, QueryDevtoolsSchemaLoader, QueryDevtoolsSchemaLoaders, QueryDevtoolsSchemaRoute, QueryDevtoolsSchemaSeed, QueryDevtoolsSchemaState, QueryDevtoolsSeedStyle, QueryDevtoolsSettings, QueryDevtoolsStats, QueryDevtoolsStatsHandle, QueryDevtoolsStatsRecorder, QueryDevtoolsStorageScope, QueryDirectiveContext, QueryDirectiveType, QueryEntityConfig, QueryErrorParser, QueryErrorResponse, QueryErrorResponseItem, QueryErrorResponseList, QueryErrorResponseSingle, QueryExecute, QueryExecuteArgs, QueryExecuteEventData, QueryExecuteOptions, QueryExecuteState, QueryExecutionState, QueryExecutionStateFailure, QueryExecutionStateFailureWithCachedResponse, QueryExecutionStateFailureWithNoResponse, QueryExecutionStateLoading, QueryExecutionStateLoadingWithCachedResponse, QueryExecutionStateLoadingWithNoResponse, QueryExecutionStateSuccess, QueryFailureEventData, QueryFeature, QueryFeatureContext, QueryFeatureFlags, QueryFeatureFn, QueryFieldConfig, QueryFieldDef, QueryFieldOptions, QueryFieldValue, QueryFilterConfig, QueryFormBranch, QueryFormBranchWriteOptions, QueryFormChange, QueryFormFields, QueryFormGroup, QueryFormGroupControls, QueryFormModel, QueryFormObserveOptions, QueryFormOf, QueryFormOptions, QueryFormPersistence, QueryFormSignals, QueryFormSignalsObserveOptions, QueryFormSignalsWriteOptions, QueryFormStorage, QueryFormValue, QueryFormValueEvent, QueryFormWriteOptions, QueryHeaders, QueryHeadersInput, QueryInvalidationCandidate, QueryInvalidationFilterFn, QueryInvalidationOptions, QueryKey, QueryKeyLockHold, QueryKeyLockHoldOptions, QueryKeyLockManager, QueryKeyLockState, QueryMethod, QueryMockConfig, QueryMultiTabSyncConfig, QueryOf, QueryParams, QueryParamsType, QueryPersistenceAdapter, QueryPersistenceCandidate, QueryPersistenceConfig, QueryPersistenceEngine, QueryPrepareFn, QueryRefreshCause, QueryRegistry, QueryRegistryEntry, QueryRepository, QueryRepositoryCacheEntry, QueryRepositoryDependencies, QueryRepositoryEntryDestroyedCause, QueryRepositoryEvent, QueryRepositoryItem, QueryRepositoryRefreshFilterFn, QueryRepositoryRequestOptions, QueryRepositorySubtle, QueryResponseOf, QueryRouteOf, QuerySequence, QuerySequenceResult, QuerySequenceStatus, QuerySequenceStepArgs, QuerySnapshot, QueryStack, QueryStackSubtle, QueryState, QueryStateMeta, QueryStateResponseOf, QueryStateSignal, QueryStateSubtle, QueryStateSuccessMeta, QueryStoreIdOf, QueryStoreOf, QuerySubmissionRef, QuerySubtle, QuerySuccessEventData, QuerySyncEngine, QuerySyncEnvelope, QuerySyncInvalidateMessage, QuerySyncMessage, QuerySyncMessageListener, QuerySyncMutation, QuerySyncMutationFilterFn, QuerySyncMutationMessage, QuerySyncRefreshCandidate, QuerySyncRefreshOnMutationConfig, QuerySyncResponseMessage, QuerySyncTransport, QueryTrigger, RawResponseType, ReadonlyQuery, RefreshFailure, RemoveFromConfig, RequestArgs, RequestConfig, RequestError, RequestEvent, RequestHeaders, RequestHeadersMethodMap, RequestHttpEvent, RequestProgress, RequestRetryFn, RequestRetryFnConfig, RequestRetryFnResult, RequiresTransform, ResetExecuteStateOptions, ResetPageOnErrorOperatorConfig, ResponseType, RestQueryConfig, RestoredQueryDevtoolsOverrides, RouteString, RouteType, RunQueryCreator, RunQueryExecuteOptions, SecureExecuteFactoryOptions, ServerValidationError, ServerViolationValidationError, SetupQueryDependenciesOptions, SetupQueryStateOptions, ShouldRetryRequestFn, ShouldRetryRequestOptions, ShouldRetryRequestResult, SocketMessageView, Sort, SortDirection, Success, SymfonyError, SymfonyErrorTrace, TokenExpirationWarningConfig, TokenExpirationWarningFeature, TokenRefreshEventData, TokenRefreshQueryBuilder, TokenRefreshQueryConfig, TokenResponse, TokenRevocationConfig, TokenRevocationFeature, TotalPagesExtractorOptions, TrackingConfig, TrackingEventDataMap, TrackingEventHandler, TrackingEventName, TrackingFeature, TransformedGqlQuery, V2CacheAdapterFn, V2PrepareArgsOf, V2QueryArgsOf, V2QueryClientConfig, V2QueryConfig, V2QueryState, V2RouteString, V2RouteType, ValidateWithQueryConfig, ValidateWithV2QueryConfig, WebSocketClient, WebSocketClientAuth, WebSocketClientIo, WebSocketClientIoOptions, WebSocketClientResult, WebSocketClientSocket, WebSocketClientSubtle, WebSocketDevtoolsHandle, WebSocketDevtoolsMessage, WebSocketRoom, WithAutoRefreshFeatureOptions, WithBody, WithConfig, WithErrorHandlingFeatureOptions, WithHeaders, WithInjector, WithLegacyConfig, WithLoggingFeatureOptions, WithLongPollingFeatureOptions, WithMock, WithPageResetOnErrorFeatureOptions, WithPathParams, WithPollingFeatureOptions, WithQueryParams, WithResponseUpdateFeatureFnData, WithResponseUpdateFeatureOptions, WithSuccessHandlingFeatureOptions, WithVariables };
9835
+ export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, 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, IS_QUERY_REQUEST, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_QUERY_BATCH_TOMBSTONES, MAX_QUERY_BATCH_TOMBSTONE_BUCKETS, MAX_QUERY_DEVTOOLS_TOMBSTONES, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QUERY_DEVTOOLS_FAULT_STATUSES, QUERY_DEVTOOLS_TOKEN_TTL_LIMIT, QUERY_PERSISTENCE_STORE_VERSION, QUERY_SYNC_PROTOCOL_VERSION, QUERY_VERSION, QueryClientFeatureType, QueryDevtoolsComponent, QueryDirective, QueryFeatureType, QueryField, QueryForm, QueryRuntimeErrorCode, QueryShortNamePipe, QueryStateType, QueryStore, SERVER_ERROR_KIND, SERVER_VIOLATION_ERROR_KIND, SPEED_BUFFER_TIME_IN_MS, SearchQueryField, SortQueryField, StringArrayQueryField, V2BearerAuthProvider, V2Query, V2QueryClient, V2QueryCreator, addQueryContainerHandling, addQueryDevtoolsAuthAccount, applyQueryDevtoolsOverrides, applyQueryDevtoolsTokenTtl, applyQueryFeatures, armAllQueryDevtoolsMocks, armQueryDevtoolsMock, armQueryDevtoolsOverrideTransfer, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, canOverrideQueryDevtoolsTokenTtl, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsArmedMocks, clearQueryDevtoolsAuthCredentials, clearQueryDevtoolsAuthSessions, clearQueryDevtoolsFaults, clearQueryDevtoolsMockStore, clearQueryDevtoolsOverrideStore, clearQueryDevtoolsStore, clearQueryDevtoolsTokenTtl, clearQueryDevtoolsTombstones, clearRestoredQueryDevtoolsOverrides, collectLeafPaths, collectQueryDevtoolsSchemaComponents, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, contentfulGqlLikePaginationAdapter, countUnresolvedQueryDevtoolsOverrides, createAuthGuard, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDefaultRetryFn, createDeleteQuery, createExecuteFn, createGetQuery, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHeadQuery, createHttpRequest, createIndexedDbQueryPersistenceAdapter, createInfinityQueryConfig, createLegacyQueryCreator, createNoopQueryPersistenceAdapter, createOptionsQuery, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryBatch, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryCreator, createQueryDevtoolsOverrides, createQueryErrorResponse, createQueryFeature, createQueryInvalidationFilter, createQueryKeyLockManager, createQueryObject, createQueryPersistenceEngine, createQueryRepository, createQuerySnapshotFn, createQueryStack, createQuerySubmission, createQuerySyncTransport, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecureHeadQuery, createSecureOptionsQuery, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, defineQueryForm, deleteQueryDevtoolsMock, detectContentTypeHeader, detectPaginationShape, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, executeUntilSettled$, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, forgetQueryDevtoolsAuthSession, forgetQueryDevtoolsAuthSessionsFor, generateQueryDevtoolsNumberPreset, generateQueryDevtoolsSampleNumber, generateQueryDevtoolsStringPreset, getDefaultHeaders, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, gqlErrorsInResponse, hasHeader, hasQueryDevtoolsOverridesAtPath, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isDateShapedLeaf, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isIdempotentQueryMethod, isLegacyQuery, isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed, isQueryDevtoolsRepositoryLive, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareWithoutInjectionContext, loadQueryDevtoolsSchema, loginQueryDevtoolsAuthAccount, logoutQueryDevtoolsAuthSession, mapToPaginated, mapViolationsToFormErrors, matchesQueryDevtoolsMockPattern, matchesQueryDevtoolsMockQuery, maybeExecute, measureQueryDevtoolsPayload, mergeHeaders, nestedEffect, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, parseQueryDevtoolsOverrideTransfer, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryBatchAlreadyRunning, queryBatchWithArgsUsed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryCreatedInReactiveContext, queryDevtoolsAbout, queryDevtoolsAllowsLocalAuthSessions, queryDevtoolsApiEnvIds, queryDevtoolsApiEnvIsProduction, queryDevtoolsApiEnvScope, queryDevtoolsApiEnvValues, queryDevtoolsApiEnvs, queryDevtoolsArmedMocks, queryDevtoolsArmedMocksRestored, queryDevtoolsAuthAccountsFor, queryDevtoolsAuthActive, queryDevtoolsAuthFieldsFor, queryDevtoolsAuthOtherScopeCount, queryDevtoolsAuthSessions, queryDevtoolsAuthSessionsFor, queryDevtoolsAuthTabLocal, queryDevtoolsEntries, queryDevtoolsFaults, queryDevtoolsFaultsRestored, queryDevtoolsMockId, queryDevtoolsMocks, queryDevtoolsOverridePersistence, queryDevtoolsRequestPath, queryDevtoolsResponseHistory, queryDevtoolsRestoredOverridesScope, queryDevtoolsSchemaNames, queryDevtoolsSchemaRoutes, queryDevtoolsSchemaState, queryDevtoolsSettings, queryDevtoolsStorage, queryDevtoolsTokenTtls, queryErrorMessage, queryErrorMessages, queryExecute, queryExecutedAfterDestroyMessage, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, readQueryDevtoolsStore, recordExecutionArgs, registerEthleteVersion, registerQueryErrorParser, removeFrom, removeQueryDevtoolsAuthAccount, renameQueryDevtoolsAuthSession, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryHeaders, restoredQueryDevtoolsOverrides, saveQueryDevtoolsMock, searchQueryField, seedQueryDevtoolsSchemaBody, seedQueryDevtoolsSchemaRoute, serializeBody, serializeQueryDevtoolsOverrideTransfer, setQueryDevtoolsApiEnv, setQueryDevtoolsAppInfo, setQueryDevtoolsArmedMocksScope, setQueryDevtoolsAuthCredentials, setQueryDevtoolsAuthTabLocal, setQueryDevtoolsFault, setQueryDevtoolsFaultsScope, setQueryDevtoolsOverridePersistence, setQueryDevtoolsOverridesScope, setQueryDevtoolsSettings, setQueryDevtoolsTokenTtl, setQueryDevtoolsUiMounted, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, smartDuplicateArrayItem, snapshotQueryDevtoolsHandle, sortQueryField, splitQueryConfig, stringArrayQueryField, stringifyQueryRouteParts, sumQueryDevtoolsStats, switchQueryCollectionState, switchQueryDevtoolsAuthSession, switchQueryState, symfonyQueryErrorParser, tableSortQueryField, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, tombstoneOf, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, transformToTableSort, transformToTableSortQueryParam, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, unwrapGqlResponseWithErrors, unwrapQuerySyncMessage, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withBearerAuthMultiTabSync, withDefaultRetry, withErrorHandling, withEthleteApiErrors, withHtmlErrorParsing, withInactivityLogout, withLogging, withLongPolling, withLongPollingUsedOnUnsupportedHttpMethod, withLongPollingUsedWithPolling, withMultiTabSync, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage, writeQueryDevtoolsStore };
9836
+ export type { AnyBearerAuthProvider, AnyCreateBearerAuthProviderResult, AnyCreateGqlQueryCreatorOptions, AnyCreateQueryClientResult, AnyGqlQueryConfig, AnyInfinityQuery, AnyInfinityQueryConfig, AnyLegacyQuery, AnyLegacyQueryCreator, AnyNewQuery, AnyPagedQueryStack, AnyQueryBatch, AnyQueryBatchItemResult, AnyQueryBuilder, AnyQueryClient, AnyQueryCollection, AnyQueryCollectionData, AnyQueryCollectionResponse, AnyQueryCreator, AnyQueryCreatorCollection, AnyQueryForm, AnyQuerySnapshot, AnyQueryStack, AnyRestQueryConfig, AnyRoute, AnyV2Query, AnyV2QueryCreator, AnyWebSocketClient, AppendItemsLocation, ApplyExternalResponseOptions, ApplyPersistedResponseOptions, AuthGuard, AuthGuardConfig, AuthGuardPermission, AuthGuardPermissionOptions, AuthGuardTarget, AuthProvider, AuthProviderBasicConfig, AuthProviderBearerConfig, AuthProviderCustomHeaderConfig, AuthQueryBuilder, AuthQueryConfig, BaseArguments, BaseQueryCreatorFactoryOptions, BaseQueryCreatorOptions, BaseQueryCreatorOptionsSubtle, BearerAuthActivityCoordination, BearerAuthExecutionState, BearerAuthExecutionStateError, BearerAuthExecutionStateLoading, BearerAuthExecutionStateLogout, BearerAuthExecutionStateSuccess, BearerAuthExecutionStateTokenSeed, BearerAuthFeature, BearerAuthMultiTabSyncConfig, BearerAuthMultiTabSyncFeature, BearerAuthProvider, BearerAuthProviderEarlySetup, BearerAuthProviderEarlySetupContext, BearerAuthProviderEarlySetupResult, BearerAuthProviderFeatureContext, BearerAuthProviderOf, BearerAuthProviderQueryContext, BearerAuthProviderRef, BearerAuthProviderTokens, BearerAuthRefreshCoordination, BearerAuthSession, BearerAuthSessionAdoption, BearerAuthSessionEndCause, BearerAuthSessionStatus, BearerRefreshConfig, BodyType, BuildQueryStringConfig, CacheAdapterFn, Cancelled, ClassValidatorError, ConstructQuery, CreateBaseQueryOptions, CreateBearerAuthProviderConfig, CreateGqlQueryCreatorOptions, CreateGqlQueryExecuteOptions, CreateGqlQueryOptions, CreateHttpRequestDependencies, CreateHttpRequestOptions, CreateIndexedDbQueryPersistenceAdapterOptions, CreateLegacyQueryCreatorOptions, CreateLegacyQueryOptions, CreatePagedQueryStackOptions, CreateQueryBatchOptions, CreateQueryClientConfigOptions, CreateQueryCreatorOptions, CreateQueryExecuteOptions, CreateQueryObjectOptions, CreateQueryOptions, CreateQueryPersistenceEngineOptions, CreateQueryRepositoryConfig, CreateQuerySnapshotOptions, CreateQueryStackOptions, CreateQuerySubmissionConfig, CreateQuerySyncEngineOptions, CreateSecureGqlQueryExecuteOptions, CreateSecureGqlQueryOptions, CreateSecureQueryExecuteOptions, CreateSecureQueryOptions, CreateWebSocketClientConfigOptions, CreateWebSocketClientTransport, DateQueryFieldConfig, DateStringQueryFieldConfig, DefaultRetryOptions, DefineQueryFormConfig, DescribableFeature, DestroyCleanupCallback, EmptyObject, EntityGetParams, EntityIdParams, EntityKey, EntitySetParams, EntityStoreConfig, ExecuteFactory, ExecuteQueryOptions, ExtractQueryArgs, ExtractQueryKey, Failure, FeatureRegistry, GQL, GqlDataWithErrors, GqlEnvelope, GqlError, GqlQueryArgs, GqlQueryConfig, GqlQueryConfigWithoutMethod, GqlQueryMethod, GqlQueryTransport, GqlRawResponseType, GqlTransferOption, GqlTransformer, GqlVariablesType, HttpCancelEvent, HttpErrorEvent, HttpRequest, HttpRequestLoadingProgressState, HttpRequestLoadingState, HttpRequestResponseType, HttpRequestRetryState, HttpRequestSubtle, HttpRequestTransferCacheConfig, InactivityLogoutConfig, InactivityLogoutFeature, InfinityQueryConfig, InfinityQueryConfigType, InfinityQueryOf, InfinityQueryParamLocation, InsertFromConfig, InternalCreateGqlQueryCreatorOptions, InternalCreateQueryCreatorOptions, InternalQueryExecute, InternalSecureCreateGqlQueryCreatorOptions, InternalSecureCreateQueryCreatorOptions, InternalWebSocketRoom, JsonPath, LeaderInstanceCountChangeEventData, LeaderStatusChangeEventData, LegacyArgumentsOfQueryArgs, LegacyQueryPrepareFn, Loading, LogoutEventData, MapViolationsToFormErrorsOptions, Method, ObservableSignal, OptionalQueryFieldOptions, OverrideOp, PageParamCalculatorOptions, PagedQueryStack, PagedQueryStackDirection, PagedQueryStackExecuteOptions, PagedQueryStackResetOptions, PartialXhrState, PathParams, PathParamsType, PersistedQueryBody, PersistedQueryEntry, PersistedQueryEntryMeta, PersistentAuthConfig, PersistentAuthFeature, PollConfig, Prepared, Query, QueryArgs, QueryArgsOf, QueryArgsOfLegacyArguments, QueryAutoRefreshConfig, QueryBase, QueryBatch, QueryBatchDevtoolsHandle, QueryBatchItemCancelled, QueryBatchItemError, QueryBatchItemResult, QueryBatchItemSkipped, QueryBatchItemSuccess, QueryBatchResult, QueryBatchStatus, QueryClient, QueryClientDevtoolsOptions, QueryClientErrorPipelineFeature, QueryClientFeature, QueryClientFeatureContext, QueryClientFeatureFn, QueryClientMultiTabSyncFeature, QueryClientPersistenceFeature, QueryClientRef, QueryClientSubtle, QueryCollectionKeysOf, QueryCollectionOf, QueryCollectionWithNullableQuery, QueryConfig, QueryConfigBase, QueryConfigWithoutMethod, QueryContainerConfig, QueryCreator, QueryCreatorInput, QueryDataOf, QueryDependencies, QueryDevtoolsAbout, QueryDevtoolsApiEnv, QueryDevtoolsApiEnvSwitch, QueryDevtoolsAppInfo, QueryDevtoolsAuthAccount, QueryDevtoolsAuthAccountView, QueryDevtoolsAuthField, QueryDevtoolsAuthLocalAccount, QueryDevtoolsAuthProviderHandle, QueryDevtoolsAuthProviderRegistration, QueryDevtoolsAuthQuery, QueryDevtoolsAuthSeed, QueryDevtoolsAuthSession, QueryDevtoolsEntry, QueryDevtoolsEntryKind, QueryDevtoolsEntryMeta, QueryDevtoolsFault, QueryDevtoolsFaultTarget, QueryDevtoolsFeature, QueryDevtoolsFeatureDescriber, QueryDevtoolsFeatureDetail, QueryDevtoolsFormField, QueryDevtoolsFormHandle, QueryDevtoolsFormLinksHandle, QueryDevtoolsFormLinksRecorder, QueryDevtoolsMock, QueryDevtoolsMockTarget, QueryDevtoolsOptions, QueryDevtoolsOverrideEntry, QueryDevtoolsOverrideTransfer, QueryDevtoolsOverrideTransferParse, QueryDevtoolsOverridesHandle, QueryDevtoolsOverridesRecorder, QueryDevtoolsPayload, QueryDevtoolsRegistrar, QueryDevtoolsRegistration, QueryDevtoolsResolvedFault, QueryDevtoolsResolvedMock, QueryDevtoolsRoutePart, QueryDevtoolsRun, QueryDevtoolsRunError, QueryDevtoolsRunStatus, QueryDevtoolsSchemaComponents, QueryDevtoolsSchemaLoader, QueryDevtoolsSchemaLoaders, QueryDevtoolsSchemaRoute, QueryDevtoolsSchemaSeed, QueryDevtoolsSchemaState, QueryDevtoolsSeedStyle, QueryDevtoolsSettings, QueryDevtoolsStats, QueryDevtoolsStatsHandle, QueryDevtoolsStatsRecorder, QueryDevtoolsStorageScope, QueryDirectiveContext, QueryDirectiveType, QueryEntityConfig, QueryErrorParser, QueryErrorResponse, QueryErrorResponseItem, QueryErrorResponseList, QueryErrorResponseSingle, QueryExecute, QueryExecuteArgs, QueryExecuteEventData, QueryExecuteOptions, QueryExecuteState, QueryExecutionState, QueryExecutionStateFailure, QueryExecutionStateFailureWithCachedResponse, QueryExecutionStateFailureWithNoResponse, QueryExecutionStateLoading, QueryExecutionStateLoadingWithCachedResponse, QueryExecutionStateLoadingWithNoResponse, QueryExecutionStateSuccess, QueryFailureEventData, QueryFeature, QueryFeatureContext, QueryFeatureFlags, QueryFeatureFn, QueryFieldConfig, QueryFieldDef, QueryFieldOptions, QueryFieldValue, QueryFilterConfig, QueryFormBranch, QueryFormBranchWriteOptions, QueryFormChange, QueryFormFields, QueryFormGroup, QueryFormGroupControls, QueryFormModel, QueryFormObserveOptions, QueryFormOf, QueryFormOptions, QueryFormPersistence, QueryFormSignals, QueryFormSignalsObserveOptions, QueryFormSignalsWriteOptions, QueryFormStorage, QueryFormValue, QueryFormValueEvent, QueryFormWriteOptions, QueryHeaders, QueryHeadersInput, QueryInvalidationCandidate, QueryInvalidationFilterFn, QueryInvalidationOptions, QueryKey, QueryKeyLockHold, QueryKeyLockHoldOptions, QueryKeyLockManager, QueryKeyLockState, QueryMethod, QueryMockConfig, QueryMultiTabSyncConfig, QueryOf, QueryParams, QueryParamsType, QueryPersistenceAdapter, QueryPersistenceCandidate, QueryPersistenceConfig, QueryPersistenceEngine, QueryPrepareFn, QueryRefreshCause, QueryRegistry, QueryRegistryEntry, QueryRepository, QueryRepositoryCacheEntry, QueryRepositoryDependencies, QueryRepositoryEntryDestroyedCause, QueryRepositoryEvent, QueryRepositoryItem, QueryRepositoryRefreshFilterFn, QueryRepositoryRequestOptions, QueryRepositorySubtle, QueryResponseOf, QueryRouteOf, QuerySequence, QuerySequenceResult, QuerySequenceStatus, QuerySequenceStepArgs, QuerySnapshot, QueryStack, QueryStackSubtle, QueryState, QueryStateMeta, QueryStateResponseOf, QueryStateSignal, QueryStateSubtle, QueryStateSuccessMeta, QueryStoreIdOf, QueryStoreOf, QuerySubmissionRef, QuerySubtle, QuerySuccessEventData, QuerySyncEngine, QuerySyncEnvelope, QuerySyncInvalidateMessage, QuerySyncMessage, QuerySyncMessageListener, QuerySyncMutation, QuerySyncMutationFilterFn, QuerySyncMutationMessage, QuerySyncRefreshCandidate, QuerySyncRefreshOnMutationConfig, QuerySyncResponseMessage, QuerySyncTransport, QueryTrigger, RawResponseType, ReadonlyQuery, RefreshFailure, RemoveFromConfig, RequestArgs, RequestConfig, RequestError, RequestEvent, RequestHeaders, RequestHeadersMethodMap, RequestHttpEvent, RequestProgress, RequestRetryFn, RequestRetryFnConfig, RequestRetryFnResult, RequiresTransform, ResetExecuteStateOptions, ResetPageOnErrorOperatorConfig, ResponseType, RestQueryConfig, RestoredQueryDevtoolsOverrides, RouteString, RouteType, RunQueryCreator, RunQueryExecuteOptions, SecureExecuteFactoryOptions, ServerValidationError, ServerViolationValidationError, SetupQueryDependenciesOptions, SetupQueryStateOptions, ShouldRetryRequestFn, ShouldRetryRequestOptions, ShouldRetryRequestResult, SocketMessageView, Sort, SortDirection, Success, SymfonyError, SymfonyErrorTrace, TableSortEntry, TokenExpirationWarningConfig, TokenExpirationWarningFeature, TokenRefreshEventData, TokenRefreshQueryBuilder, TokenRefreshQueryConfig, TokenResponse, TokenRevocationConfig, TokenRevocationFeature, TotalPagesExtractorOptions, TrackingConfig, TrackingEventDataMap, TrackingEventHandler, TrackingEventName, TrackingFeature, TransformedGqlQuery, V2CacheAdapterFn, V2PrepareArgsOf, V2QueryArgsOf, V2QueryClientConfig, V2QueryConfig, V2QueryState, V2RouteString, V2RouteType, ValidateWithQueryConfig, ValidateWithV2QueryConfig, WebSocketClient, WebSocketClientAuth, WebSocketClientIo, WebSocketClientIoOptions, WebSocketClientResult, WebSocketClientSocket, WebSocketClientSubtle, WebSocketDevtoolsHandle, WebSocketDevtoolsMessage, WebSocketRoom, WithArgsCheck, WithArgsQueryFeature, WithAutoRefreshFeatureOptions, WithBody, WithConfig, WithErrorHandlingFeatureOptions, WithHeaders, WithInjector, WithLegacyConfig, WithLoggingFeatureOptions, WithLongPollingFeatureOptions, WithMock, WithPageResetOnErrorFeatureOptions, WithPathParams, WithPollingFeatureOptions, WithQueryParams, WithResponseUpdateFeatureFnData, WithResponseUpdateFeatureOptions, WithSuccessHandlingFeatureOptions, WithVariables };