@ethlete/query 6.0.0-next.52 → 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.
@@ -2,7 +2,7 @@ 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';
@@ -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
  /**
@@ -822,248 +484,599 @@ type QueryDevtoolsStats = {
822
484
  /** The sum of every response's duration, which together with {@link responses} gives the average. */
823
485
  totalDurationMs: number;
824
486
  /**
825
- * Whether the query's last completed run ended in a devtools fault rather than a real server
826
- * response or failure - the fact the panel's tamper indicator badges on. Cleared by the next real
827
- * response; a run that exhausts its retries on a real error also clears it, since nothing about that
828
- * outcome was altered by the devtools.
487
+ * Whether the query's last completed run ended in a devtools fault rather than a real server
488
+ * response or failure - the fact the panel's tamper indicator badges on. Cleared by the next real
489
+ * response; a run that exhausts its retries on a real error also clears it, since nothing about that
490
+ * outcome was altered by the devtools.
491
+ */
492
+ lastResponseWasFaulted: boolean;
493
+ };
494
+ /** A payload whose transferred size is to be measured, plus the headers it came with (if any). */
495
+ type QueryDevtoolsPayload = {
496
+ headers?: HttpHeaders | null;
497
+ body: unknown;
498
+ };
499
+ /**
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.
829
748
  */
830
- lastResponseWasFaulted: boolean;
749
+ keepUnusedFor?: number;
831
750
  };
832
- /** A payload whose transferred size is to be measured, plus the headers it came with (if any). */
833
- type QueryDevtoolsPayload = {
834
- headers?: HttpHeaders | null;
835
- body: unknown;
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;
836
759
  };
760
+ declare const queryExecute: <TArgs extends QueryArgs>(options: QueryExecuteOptions<TArgs>) => void;
837
761
  /**
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.
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;
904
- };
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;
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';
913
875
  };
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;
876
+ type QueryRepositoryRequestOptions<TArgs extends QueryArgs> = {
931
877
  /**
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}.
878
+ * The route of the request.
879
+ * @example '/users'
880
+ * @example (args) => `/users/${args.userId}`
934
881
  */
935
- recordRetry: (options: {
936
- attempt: number;
937
- }) => void;
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;
938
910
  };
939
- /**
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.**
945
- */
946
- declare const queryDevtoolsResponseHistory: () => number;
947
- /**
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.**
953
- */
954
- declare const measureQueryDevtoolsPayload: (payload: QueryDevtoolsPayload) => {
955
- bytes: number;
956
- isExact: boolean;
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>;
916
+ /**
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.
920
+ */
921
+ executed: boolean;
957
922
  };
958
923
  /**
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.
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.
961
926
  */
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
- keepPreviousResponse?: boolean;
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;
968
934
  /**
969
- * The devtools stats recorder to feed from this state's executions, or nothing when the devtools are
970
- * not installed.
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.
971
938
  */
972
- devtoolsStats?: QueryDevtoolsStatsRecorder | null;
939
+ isUnused: boolean;
940
+ /** The underlying HTTP request. */
941
+ request: HttpRequest<QueryArgs>;
942
+ };
943
+ /**
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.
946
+ */
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>;
973
952
  /**
974
- * The recorder that notes which query forms the args source reads, or nothing when the devtools are
975
- * not installed.
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.
976
956
  */
977
- devtoolsFormLinks?: QueryDevtoolsFormLinksRecorder | null;
957
+ evict: (key: QueryKey) => void;
958
+ };
959
+ /**
960
+ * Narrows which in-use entries a {@link QueryRepository.refreshInUse} call refreshes. Returning
961
+ * `false` leaves the entry alone.
962
+ */
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;
978
979
  /**
979
- * The recorder of response overrides armed on this query, or nothing when the devtools are not
980
- * 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.
981
982
  */
982
- devtoolsOverrides?: QueryDevtoolsOverridesRecorder | null;
983
+ expiresAt: number | null;
983
984
  };
984
- type QueryStateSubtle<TArgs extends QueryArgs> = {
985
- request: WritableSignal<HttpRequest<TArgs> | null>;
986
- 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>;
987
993
  /**
988
- * Forwards the given request's discrete event stream onto the query-level `events$`.
989
- * 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.
990
996
  */
991
- bindRequestEvents: (request: HttpRequest<TArgs>) => void;
992
- /** Stops forwarding the current request's events; `reset()` detaches the query from its request with it. */
993
- unbindRequestEvents: () => void;
997
+ unbind: (key: QueryKey | null, consumerDestroyRef: DestroyRef) => boolean;
998
+ /** Removes all secure requests and their consumers */
999
+ unbindAllSecure: () => void;
994
1000
  /**
995
- * Run options every execution of this query starts from; the options passed to one `execute()` win
996
- * per field. Set by a feature during creation so it also covers executions the feature does not
997
- * 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
998
1009
  */
999
- defaultRunOptions: WritableSignal<RunQueryExecuteOptions | null>;
1010
+ refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause) => void;
1000
1011
  /**
1001
- * Consulted before `withArgs` or creation auto-executes the query; returning `false` skips that
1002
- * execution. Set by a feature during creation (`withLongPolling` holds its first round back while disabled).
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.
1003
1023
  */
1004
- autoExecuteGuard: WritableSignal<(() => boolean) | null>;
1024
+ applyExternalResponse: (options: ApplyExternalResponseOptions) => boolean;
1005
1025
  /**
1006
- * Installs the reactive source that backs `state.args`. The `withArgs` feature uses this so that
1007
- * `state.args` always reflects the latest args (pulled from the reactive source on read) instead
1008
- * of being push-updated by an effect that may not have run yet. Without a `withArgs` feature the
1009
- * default source returns `null`.
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.
1010
1039
  */
1011
- setArgsSource: (source: () => RequestArgs<TArgs> | null) => void;
1012
- /** @see SetupQueryStateOptions.devtoolsStats */
1013
- devtoolsStats: QueryDevtoolsStatsRecorder | null;
1014
- /** @see SetupQueryStateOptions.devtoolsFormLinks */
1015
- devtoolsFormLinks: QueryDevtoolsFormLinksRecorder | null;
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;
1016
1045
  };
1017
- type QueryState<TArgs extends QueryArgs> = {
1018
- rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
1019
- response: Signal<ResponseType<TArgs> | null>;
1020
- args: WritableSignal<RequestArgs<TArgs> | null>;
1021
- latestHttpEvent: WritableSignal<RequestHttpEvent<TArgs> | null>;
1022
- loading: WritableSignal<HttpRequestLoadingState | null>;
1023
- error: WritableSignal<QueryErrorResponse | null>;
1024
- lastTimeExecutedAt: WritableSignal<number | null>;
1025
- lastTriggeredBy: WritableSignal<string | null>;
1026
- executionState: Signal<QueryExecutionState<TArgs> | null>;
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;
1057
+ };
1058
+ type CreateQueryRepositoryConfig = CreateQueryClientConfigOptions & {
1059
+ /** The dependencies of the query repository */
1060
+ dependencies: QueryRepositoryDependencies;
1027
1061
  /**
1028
- * A discrete, query-level stream of every request event, fed synchronously from the current
1029
- * request's `events$` at the moment each event occurs. Side-effect features
1030
- * (success/error/logging) subscribe to this instead of edge-detecting on the shared, resettable
1031
- * `response`/`error`/`latestHttpEvent` signals - so they cannot miss a transition when the next
1032
- * execution swaps the underlying request.
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
1033
1066
  */
1034
- events$: Observable<RequestHttpEvent<TArgs>>;
1035
- subtle: QueryStateSubtle<TArgs>;
1036
- };
1037
- type QueryExecutionStateSuccess<TArgs extends QueryArgs> = {
1038
- type: 'success';
1039
- response: ResponseType<TArgs>;
1040
- };
1041
- type QueryExecutionStateFailureWithNoResponse = {
1042
- type: 'failure';
1043
- error: QueryErrorResponse;
1044
- hasCachedResponse?: false;
1045
- };
1046
- type QueryExecutionStateFailureWithCachedResponse<TArgs extends QueryArgs> = {
1047
- type: 'failure';
1048
- error: QueryErrorResponse;
1049
- hasCachedResponse: true;
1050
- cachedResponse: ResponseType<TArgs>;
1051
- };
1052
- type QueryExecutionStateFailure<TArgs extends QueryArgs> = QueryExecutionStateFailureWithNoResponse | QueryExecutionStateFailureWithCachedResponse<TArgs>;
1053
- type QueryExecutionStateLoadingWithNoResponse = {
1054
- type: 'loading';
1055
- hasCachedResponse: false;
1056
- loading: HttpRequestLoadingState;
1057
- };
1058
- type QueryExecutionStateLoadingWithCachedResponse<TArgs extends QueryArgs> = {
1059
- type: 'loading';
1060
- hasCachedResponse: true;
1061
- loading: HttpRequestLoadingState;
1062
- cachedResponse: ResponseType<TArgs>;
1067
+ retentionEnabled?: boolean;
1068
+ /** Whether the client itself carries a retry policy, via its own `retryFn` or a feature. */
1069
+ hasRetryPolicy?: () => boolean;
1063
1070
  };
1064
- type QueryExecutionStateLoading<TArgs extends QueryArgs> = QueryExecutionStateLoadingWithNoResponse | QueryExecutionStateLoadingWithCachedResponse<TArgs>;
1065
- type QueryExecutionState<TArgs extends QueryArgs> = QueryExecutionStateSuccess<TArgs> | QueryExecutionStateFailure<TArgs> | QueryExecutionStateLoading<TArgs>;
1066
- 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;
1067
1080
 
1068
1081
  type CreateQueryExecuteOptions<TArgs extends QueryArgs> = {
1069
1082
  deps: QueryDependencies;
@@ -1126,6 +1139,9 @@ type QueryFeature<TArgs extends QueryArgs> = {
1126
1139
  /** How the feature was configured, for the devtools. Only called while devtools are enabled. */
1127
1140
  devtools?: QueryDevtoolsFeatureDescriber;
1128
1141
  };
1142
+ type WithArgsQueryFeature<TArgs extends QueryArgs> = QueryFeature<TArgs> & {
1143
+ type: typeof QueryFeatureType.WITH_ARGS;
1144
+ };
1129
1145
  declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
1130
1146
  type: QueryFeatureType | (string & {});
1131
1147
  fn: QueryFeatureFn<TArgs>;
@@ -1140,7 +1156,7 @@ declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
1140
1156
  *
1141
1157
  * Changing arguments will automatically trigger a new execution of the query if it is eligible for auto execution (e.g. a GET request).
1142
1158
  */
1143
- 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>;
1144
1160
  type WithPollingFeatureOptions = {
1145
1161
  /**
1146
1162
  * The interval in milliseconds at which the query should be executed. A function is read
@@ -1433,6 +1449,13 @@ type BaseQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = {
1433
1449
  * @default the client's `retryFn`, else the `withDefaultRetry()` policy, else no retry
1434
1450
  */
1435
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;
1436
1459
  /**
1437
1460
  * How long (in ms) this query's cache entry is kept after its last consumer was destroyed.
1438
1461
  * Overrides the client level `keepUnusedFor`. Use `0` for responses that should never outlive their
@@ -1502,9 +1525,22 @@ type CreateQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = BaseQueryC
1502
1525
  */
1503
1526
  transformResponse?: (rawResponse: RawResponseType<TArgs>) => ResponseType<TArgs>;
1504
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;
1505
1542
  type QueryCreator<TArgs extends QueryArgs> = {
1506
- (...features: QueryFeature<TArgs>[]): Query<TArgs>;
1507
- (queryConfig: QueryConfig, ...features: QueryFeature<TArgs>[]): Query<TArgs>;
1543
+ <const TInput extends QueryCreatorInput<TArgs>>(this: WithArgsCheck<TArgs, TInput>, ...args: TInput | QueryCreatorInput<TArgs>): Query<TArgs>;
1508
1544
  /**
1509
1545
  * Creates a new query creator with merged options.
1510
1546
  * The new creator inherits all options from the original and overrides them with the provided options.
@@ -2246,8 +2282,7 @@ declare const withSymfonyErrors: () => QueryClientFeatureFn;
2246
2282
  * a `PATCH` and a GraphQL mutation are never retried unless the options set `retryNonIdempotent`.
2247
2283
  *
2248
2284
  * The policy belongs to the client the feature is on, so another client of the same app is not
2249
- * affected. Without it nothing is retried automatically and `error.retryState` always reads
2250
- * `{ 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.
2251
2286
  *
2252
2287
  * @example
2253
2288
  * const MY_CLIENT = createQueryClient({
@@ -2502,6 +2537,8 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
2502
2537
  clientOptions?: CreateQueryCreatorOptions;
2503
2538
  /** Display name of the owning query client. Scopes devtools fault injection, which is armed per client. */
2504
2539
  clientName?: string;
2540
+ /** Base URL of the owning query client, so a devtools mock pattern is matched against the route. */
2541
+ clientBaseUrl?: string;
2505
2542
  /**
2506
2543
  * Headers configured on the query client, applied to every request it makes. Per-request
2507
2544
  * `args.headers` are merged on top and win per header name.
@@ -2519,6 +2556,12 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
2519
2556
  * @default the `withDefaultRetry()` policy, or no retry at all without that client feature
2520
2557
  */
2521
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;
2522
2565
  /**
2523
2566
  * Whether sending the request again is safe, handed to `retryFn` as `idempotent`.
2524
2567
  * @default `false` for a `POST` or `PATCH`, `true` for every other method
@@ -2618,7 +2661,7 @@ type HttpRequestSubtle<TArgs extends QueryArgs> = {
2618
2661
  */
2619
2662
  resolveHeaders: () => HttpHeaders | undefined;
2620
2663
  /**
2621
- * 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
2622
2665
  * does not re-resolve the header providers, so after a token refresh it still reports the token
2623
2666
  * the request was sent with. `undefined` until the first execution.
2624
2667
  */
@@ -2655,8 +2698,7 @@ type HttpRequest<TArgs extends QueryArgs> = {
2655
2698
  url: string;
2656
2699
  /**
2657
2700
  * The args this request was built from - the resolved path params, query params, body and headers
2658
- * behind {@link HttpRequest.url}. Read by the query devtools to show what a query actually sent,
2659
- * 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.
2660
2702
  */
2661
2703
  args: RequestArgs<TArgs> | null;
2662
2704
  /**
@@ -2803,7 +2845,7 @@ type AnyNewQuery = Query<any>;
2803
2845
  type QuerySubtle<TArgs extends QueryArgs> = {
2804
2846
  /** Destroys the query and cleans up all resources. The query should not be used after this method is called. */
2805
2847
  destroy: () => void;
2806
- /** 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. */
2807
2849
  setResponse: (response: ResponseType<TArgs>) => void;
2808
2850
  /**
2809
2851
  * Manually forces the loading state of the query. Overridden on the next execution. Intended for
@@ -3255,8 +3297,9 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
3255
3297
  run: (items: readonly TItem[]) => Observable<QueryBatchResult<TItem, TArgs>>;
3256
3298
  /**
3257
3299
  * Re-runs only the items that did not succeed - the failed ones plus anything left unattempted by
3258
- * a `cancel()` or `stopOnError`. Successful items are never sent twice, which is what makes this
3259
- * 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}.
3260
3303
  */
3261
3304
  retryFailed: () => Observable<QueryBatchResult<TItem, TArgs>>;
3262
3305
  /**
@@ -3265,7 +3308,7 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
3265
3308
  * normal and the run emits once they do.
3266
3309
  *
3267
3310
  * Unsubscribing from the run does abort everything in flight, which for a mutation is rarely what
3268
- * you want. Prefer this.
3311
+ * you want: those items stay `cancelled` and `retryFailed()` does not resend them. Prefer this.
3269
3312
  */
3270
3313
  cancel: () => void;
3271
3314
  /** Clears the results and returns to `idle`. Ignored while a run is in flight. */
@@ -3585,9 +3628,9 @@ type QuerySequenceStepArgs<TArgs extends QueryArgs> = {
3585
3628
  * The outcome of a settled {@link QuerySequence.run}.
3586
3629
  *
3587
3630
  * A discriminated union: on success `responses` is the fully-typed tuple of every step's response;
3588
- * on failure `failedAt` is the zero-based index of the step that errored and `error` is its
3589
- * normalized {@link QueryErrorResponse}. `snapshots` always holds the settled snapshots of every
3590
- * 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.
3591
3634
  */
3592
3635
  type QuerySequenceResult<TResponses extends unknown[]> = {
3593
3636
  ok: true;
@@ -3596,7 +3639,7 @@ type QuerySequenceResult<TResponses extends unknown[]> = {
3596
3639
  } | {
3597
3640
  ok: false;
3598
3641
  failedAt: number;
3599
- error: QueryErrorResponse;
3642
+ error: QueryErrorResponse | null;
3600
3643
  snapshots: AnyQuerySnapshot[];
3601
3644
  };
3602
3645
  /**
@@ -3633,7 +3676,7 @@ type QuerySequence<TResponses extends unknown[]> = {
3633
3676
  total: number;
3634
3677
  /** The query objects backing each step, in order. Useful for devtools / advanced introspection. */
3635
3678
  queries: AnyNewQuery[];
3636
- /** 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. */
3637
3680
  error: Signal<QueryErrorResponse | null>;
3638
3681
  /** The zero-based index of the step that failed, or `null` while running / on success. */
3639
3682
  failedAt: Signal<number | null>;
@@ -3656,7 +3699,8 @@ type QuerySequence<TResponses extends unknown[]> = {
3656
3699
  *
3657
3700
  * Cancellation (inherited from `executeUntilSettled`): a step whose request is cancelled - a
3658
3701
  * destroyed host scope, an evicted cache entry - stops the waterfall like any other failure, with
3659
- * 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`.
3660
3704
  */
3661
3705
  run: () => Promise<QuerySequenceResult<TResponses>>;
3662
3706
  };
@@ -3946,7 +3990,7 @@ type CreateQuerySubmissionConfig<TCreator extends AnyQueryCreator, TModel> = {
3946
3990
  args?: (value: TModel, field: FieldTree<TModel>) => RequestArgs<QueryArgsOf<TCreator>> | null;
3947
3991
  /**
3948
3992
  * Runs after the request succeeded, before the action resolves and the form leaves its submitting
3949
- * state - notify, close the overlay, navigate.
3993
+ * state - notify, close the overlay, navigate. An aborted submission does not call it.
3950
3994
  */
3951
3995
  onSuccess?: (response: ResponseType<QueryArgsOf<TCreator>>, field: FieldTree<TModel>) => void;
3952
3996
  /**
@@ -4098,6 +4142,11 @@ type AuthQueryConfig<TArgs extends QueryArgs> = {
4098
4142
  * @default (response) => response (assumes response has accessToken and refreshToken properties)
4099
4143
  */
4100
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;
4101
4150
  };
4102
4151
  type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> & {
4103
4152
  /**
@@ -4122,7 +4171,7 @@ type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> &
4122
4171
  * Strategy for determining when to refresh the token.
4123
4172
  * Can be either:
4124
4173
  * - A percentage (0-1) of the token's lifetime (e.g., 0.75 = refresh at 75% of lifetime)
4125
- * - A fixed time in milliseconds before expiration
4174
+ * - A fixed time in milliseconds before expiration (above 1; a negative number counts as 0)
4126
4175
  * - An object with both percentage and min/max constraints
4127
4176
  * @default { percentage: 0.75, minBufferMs: 60000, maxBufferMs: 600000 }
4128
4177
  */
@@ -4400,7 +4449,8 @@ type PersistentAuthConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ext
4400
4449
  name?: string;
4401
4450
  /**
4402
4451
  * The domain of the cookie. If not set, the cookie is host-only: it belongs to the exact host that
4403
- * 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.
4404
4454
  */
4405
4455
  domain?: string;
4406
4456
  /**
@@ -4479,6 +4529,10 @@ declare const withPersistentAuth: <TBuilders extends readonly AnyQueryBuilder[],
4479
4529
  value: string;
4480
4530
  }[];
4481
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
+ */
4482
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;
4483
4537
 
4484
4538
  type TokenExpirationWarningConfig = {
@@ -4541,7 +4595,9 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
4541
4595
  */
4542
4596
  revokeOnLogout?: boolean;
4543
4597
  /**
4544
- * 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`.
4545
4601
  * @example revokeOn: ['user'] // for an API whose revocation ends the sessions on all devices
4546
4602
  */
4547
4603
  revokeOn?: readonly BearerAuthSessionEndCause[];
@@ -4554,8 +4610,8 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
4554
4610
  type TokenRevocationFeature<TQuerySnapshot extends AnyQuerySnapshot> = {
4555
4611
  /**
4556
4612
  * Manually revoke the current tokens.
4557
- * Returns `null` if there are no tokens to revoke
4558
- * 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.
4559
4615
  */
4560
4616
  revoke: () => TQuerySnapshot | null;
4561
4617
  /**
@@ -4647,6 +4703,10 @@ declare const withTracking: <TBuilders extends readonly AnyQueryBuilder[]>(confi
4647
4703
  value: string;
4648
4704
  }[];
4649
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
+ */
4650
4710
  declare const createTrackingFeature: <TBuilders extends readonly AnyQueryBuilder[]>(context: BearerAuthProviderFeatureContext<unknown, TBuilders>, config?: TrackingConfig<TBuilders>) => TrackingFeature<TBuilders>;
4651
4711
 
4652
4712
  /**
@@ -4757,8 +4817,13 @@ type BearerAuthProviderEarlySetupContext = {
4757
4817
  * one is a rotation, and reporting those would stomp whatever the tab is doing.
4758
4818
  */
4759
4819
  setTokens: (access: string, refresh: string) => void;
4760
- /** Ends the session, exactly as the provider's own `logout()` does. */
4761
- 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;
4762
4827
  /** Why the last session ended, as {@link BearerAuthProvider.sessionEndCause} reports it. */
4763
4828
  sessionEndCause: Signal<BearerAuthSessionEndCause | null>;
4764
4829
  /**
@@ -5877,8 +5942,11 @@ type QueryDevtoolsResolvedFault = {
5877
5942
  /** The status to fail the attempt with instead of sending it, or `null` to let it through. */
5878
5943
  status: number | null;
5879
5944
  };
5880
- /** What a mock resolver matches against - the same three things a fault resolver sees. */
5881
- 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
+ };
5882
5950
  /** The response the devtools want served instead of one upcoming attempt. */
5883
5951
  type QueryDevtoolsResolvedMock = {
5884
5952
  /** The status to respond with. `400` and above are delivered as an `HttpErrorResponse`. */
@@ -5991,8 +6059,12 @@ declare const queryDevtoolsArmedMocksRestored: Signal<boolean>;
5991
6059
  declare const queryDevtoolsMockId: (parts: Pick<QueryDevtoolsMock, "clientName" | "method" | "pattern"> & {
5992
6060
  query?: string;
5993
6061
  }) => string;
5994
- /** The path of a request URL, without its origin or query string - what a pattern is matched against. */
5995
- 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;
5996
6068
  /**
5997
6069
  * Whether a request carries every query parameter a mock declares. Extra parameters are ignored - a mock
5998
6070
  * says what the request must ask for, not everything it may.
@@ -6415,6 +6487,12 @@ declare const MAX_QUERY_DEVTOOLS_TOMBSTONES = 50;
6415
6487
  * for - and low, because the batch's own entry already holds every item's args, response and error.
6416
6488
  */
6417
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;
6418
6496
  /**
6419
6497
  * A destroyed query's last state, shaped like the query itself: every signal the panel reads is
6420
6498
  * replaced by a function returning the value it held when the query went away, and every action is a
@@ -6959,6 +7037,18 @@ type Sort = {
6959
7037
  };
6960
7038
  declare const transformToSort: (value: unknown) => Sort | null;
6961
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;
6962
7052
 
6963
7053
  /** @deprecated Use `queryField` with `defineQueryForm`. */
6964
7054
  declare class QueryField<T> {
@@ -7174,6 +7264,9 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
7174
7264
  private _triggeredVia;
7175
7265
  private _lastExecuteCalledAt;
7176
7266
  private _ownLoadExecuteTime;
7267
+ private _responseAtExecute;
7268
+ private _errorAtExecute;
7269
+ private _ownLoadSettled;
7177
7270
  private _wasAborted;
7178
7271
  state$: Observable<V2QueryState<Data>>;
7179
7272
  constructor(newQuery: TNewQuery, _arguments: RequestArgs<QueryArgsOf<TNewQuery>>, entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined,
@@ -7199,9 +7292,11 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
7199
7292
  private toQueryState;
7200
7293
  /**
7201
7294
  * A load this wrapper did not start - a `refreshQueriesInUse()`, an invalidation - reports as `auto`, the way
7202
- * v2 reported its background refreshes.
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.
7203
7297
  */
7204
7298
  private triggerOf;
7299
+ private hasOwnLoadSettled;
7205
7300
  get isExpired(): boolean | undefined;
7206
7301
  get isInUse(): boolean;
7207
7302
  get isPolling(): boolean;
@@ -8332,7 +8427,7 @@ declare const v2ShouldCacheQuery: (method: Method) => method is "GET" | "OPTIONS
8332
8427
  *
8333
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.
8334
8429
  */
8335
- declare const v2BuildQueryCacheKey: (route: string, args: BaseArguments | undefined, method?: Method) => string;
8430
+ declare const v2BuildQueryCacheKey: (route: string, args: (BaseArguments & WithHeaders) | undefined, method?: Method) => string;
8336
8431
 
8337
8432
  /**
8338
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.
@@ -9548,6 +9643,15 @@ declare const searchQueryField: (config?: QueryFieldConfig<string>) => QueryFiel
9548
9643
  * whatever its key.
9549
9644
  */
9550
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[]>;
9551
9655
  /** A field holding a list of strings. */
9552
9656
  declare const stringArrayQueryField: (config?: QueryFieldConfig<string[] | null>) => QueryFieldDef<string[] | null>;
9553
9657
  /** A field holding a list of numbers. */
@@ -9620,10 +9724,16 @@ type WebSocketClientSocket = {
9620
9724
  connect: () => void;
9621
9725
  disconnect: () => void;
9622
9726
  emit: (event: string, data: unknown) => void;
9623
- 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
+ };
9624
9732
  onAny: (listener: (eventName: string, ...args: unknown[]) => void) => void;
9625
9733
  onAnyOutgoing: (listener: (eventName: string, ...args: unknown[]) => void) => void;
9626
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;
9627
9737
  };
9628
9738
  /**
9629
9739
  * The `io` factory of `socket.io-client`, declared structurally.
@@ -9720,7 +9830,7 @@ type AnyWebSocketClient<TMessageData extends SocketMessageView = SocketMessageVi
9720
9830
  declare const createWebSocketClient: <TMessageData extends SocketMessageView = SocketMessageView>(options: CreateWebSocketClientConfigOptions) => WebSocketClientResult<TMessageData>;
9721
9831
 
9722
9832
  /** The version of `@ethlete/query` this build was cut from. */
9723
- declare const QUERY_VERSION = "6.0.0-next.52";
9833
+ declare const QUERY_VERSION = "6.0.0-next.53";
9724
9834
 
9725
- 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_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, 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 };
9726
- 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, 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 };