@ethlete/query 6.0.0-next.52 → 6.0.0-next.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs +96 -24
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs.map +1 -1
- package/fesm2022/ethlete-query-testing.mjs +67 -25
- package/fesm2022/ethlete-query-testing.mjs.map +1 -1
- package/fesm2022/ethlete-query.mjs +7872 -7354
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/generators/migrate-from-ngrx-toolkit/consumers.js +70 -2
- package/generators/migrate-from-ngrx-toolkit/migration.js +2 -1
- package/generators/migrate-to-query-v3/cleanup-migration.js +142 -53
- package/generators/migrate-to-query-v3/migration-scope.js +2 -0
- package/generators/migrate-to-query-v3/migration.js +3 -3
- package/generators/migrate-to-query-v3/module-graph.js +39 -29
- package/generators/migrate-to-query-v3/query-client-migration.js +138 -124
- package/generators/migrate-to-query-v3/rename-symbols.js +38 -11
- package/generators/migrate-to-query-v3/report.js +40 -7
- package/generators/migrate-to-query-v3/shared.js +19 -1
- package/generators/prep-for-query-v3/migration.js +317 -56
- package/package.json +1 -1
- package/types/ethlete-query-testing.d.ts +28 -11
- package/types/ethlete-query.d.ts +681 -570
package/types/ethlete-query.d.ts
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
749
|
+
keepUnusedFor?: number;
|
|
831
750
|
};
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
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
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
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
|
-
|
|
766
|
+
declare const recordExecutionArgs: <TArgs extends QueryArgs>(state: QueryState<TArgs>, args: RequestArgs<TArgs> | null, options?: RunQueryExecuteOptions) => void;
|
|
843
767
|
/**
|
|
844
|
-
*
|
|
845
|
-
*
|
|
846
|
-
*
|
|
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
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
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
|
-
*
|
|
855
|
-
* {@link
|
|
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
|
-
|
|
858
|
-
/**
|
|
859
|
-
|
|
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
|
-
*
|
|
863
|
-
*
|
|
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
|
|
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
|
-
*
|
|
868
|
-
*
|
|
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
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
815
|
+
isCached: boolean;
|
|
816
|
+
/** @see BaseQueryCreatorOptions.multiTabSync */
|
|
817
|
+
isMultiTabSyncEnabled: boolean;
|
|
818
|
+
/** @see QueryRepositoryRequestOptions.isRefreshable */
|
|
819
|
+
isRefreshable: boolean;
|
|
875
820
|
/**
|
|
876
|
-
* Whether this
|
|
877
|
-
*
|
|
878
|
-
*
|
|
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
|
-
|
|
826
|
+
isPersistEnabled: boolean;
|
|
827
|
+
} | {
|
|
881
828
|
/**
|
|
882
|
-
*
|
|
883
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
888
|
-
*
|
|
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
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
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
|
-
*
|
|
897
|
-
*
|
|
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
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
933
|
-
*
|
|
878
|
+
* The route of the request.
|
|
879
|
+
* @example '/users'
|
|
880
|
+
* @example (args) => `/users/${args.userId}`
|
|
934
881
|
*/
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
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
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
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
|
-
*
|
|
960
|
-
*
|
|
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
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
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
|
-
*
|
|
970
|
-
* not
|
|
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
|
-
|
|
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
|
-
*
|
|
975
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
980
|
-
*
|
|
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
|
-
|
|
983
|
+
expiresAt: number | null;
|
|
983
984
|
};
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
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
|
-
*
|
|
989
|
-
*
|
|
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
|
-
|
|
992
|
-
/**
|
|
993
|
-
|
|
997
|
+
unbind: (key: QueryKey | null, consumerDestroyRef: DestroyRef) => boolean;
|
|
998
|
+
/** Removes all secure requests and their consumers */
|
|
999
|
+
unbindAllSecure: () => void;
|
|
994
1000
|
/**
|
|
995
|
-
*
|
|
996
|
-
*
|
|
997
|
-
*
|
|
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
|
-
|
|
1010
|
+
refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause) => void;
|
|
1000
1011
|
/**
|
|
1001
|
-
*
|
|
1002
|
-
*
|
|
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
|
-
|
|
1024
|
+
applyExternalResponse: (options: ApplyExternalResponseOptions) => boolean;
|
|
1005
1025
|
/**
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
*
|
|
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
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
|
|
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
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
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
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
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
|
-
|
|
1035
|
-
|
|
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
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
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>;
|
|
@@ -1136,11 +1152,12 @@ declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
|
|
|
1136
1152
|
* The arguments are read within a computed function, so you can use reactive values.
|
|
1137
1153
|
*
|
|
1138
1154
|
* Return `null` to park the query: it is reset (`response()` and `executionState()` become `null`),
|
|
1139
|
-
* and polling and auto refresh pause until args are set again.
|
|
1155
|
+
* and polling and auto refresh pause until args are set again. A mutation that is still in flight
|
|
1156
|
+
* finishes first and the query parks once it has settled.
|
|
1140
1157
|
*
|
|
1141
1158
|
* Changing arguments will automatically trigger a new execution of the query if it is eligible for auto execution (e.g. a GET request).
|
|
1142
1159
|
*/
|
|
1143
|
-
declare const withArgs: <TArgs extends QueryArgs>(args: () => NoInfer<RequestArgs<TArgs>> | null) =>
|
|
1160
|
+
declare const withArgs: <TArgs extends QueryArgs>(args: () => NoInfer<RequestArgs<TArgs>> | null) => WithArgsQueryFeature<TArgs>;
|
|
1144
1161
|
type WithPollingFeatureOptions = {
|
|
1145
1162
|
/**
|
|
1146
1163
|
* The interval in milliseconds at which the query should be executed. A function is read
|
|
@@ -1433,6 +1450,13 @@ type BaseQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = {
|
|
|
1433
1450
|
* @default the client's `retryFn`, else the `withDefaultRetry()` policy, else no retry
|
|
1434
1451
|
*/
|
|
1435
1452
|
retryFn?: ShouldRetryRequestFn;
|
|
1453
|
+
/**
|
|
1454
|
+
* Whether a failed request is passed to Angular's `ErrorHandler`. Set to `false` when the UI already
|
|
1455
|
+
* shows the error itself; `error()` and `executionState()` report the failure either way.
|
|
1456
|
+
*
|
|
1457
|
+
* @default true
|
|
1458
|
+
*/
|
|
1459
|
+
reportErrors?: boolean;
|
|
1436
1460
|
/**
|
|
1437
1461
|
* How long (in ms) this query's cache entry is kept after its last consumer was destroyed.
|
|
1438
1462
|
* Overrides the client level `keepUnusedFor`. Use `0` for responses that should never outlive their
|
|
@@ -1502,9 +1526,22 @@ type CreateQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = BaseQueryC
|
|
|
1502
1526
|
*/
|
|
1503
1527
|
transformResponse?: (rawResponse: RawResponseType<TArgs>) => ResponseType<TArgs>;
|
|
1504
1528
|
});
|
|
1529
|
+
type QueryCreatorInput<TArgs extends QueryArgs> = readonly [QueryConfig, ...QueryFeature<TArgs>[]] | readonly QueryFeature<TArgs>[];
|
|
1530
|
+
type IsAny<T> = 0 extends 1 & T ? true : false;
|
|
1531
|
+
type RequiresWithArgs<TArgs extends QueryArgs> = IsAny<TArgs> extends true ? false : PathParamsType<TArgs> extends {
|
|
1532
|
+
[key: string]: unknown;
|
|
1533
|
+
} ? true : false;
|
|
1534
|
+
type HasWithArgsFeature<TInput extends readonly unknown[]> = number extends TInput['length'] ? true : TInput extends readonly [infer THead, ...infer TRest] ? THead extends {
|
|
1535
|
+
type: typeof QueryFeatureType.WITH_ARGS;
|
|
1536
|
+
} ? true : HasWithArgsFeature<TRest> : false;
|
|
1537
|
+
type IsWithArgsErrorSilenced<TInput extends readonly unknown[]> = TInput extends readonly [infer THead, ...unknown[]] ? THead extends {
|
|
1538
|
+
silenceMissingWithArgsFeatureError: true;
|
|
1539
|
+
} ? true : false : false;
|
|
1540
|
+
type MissingWithArgsError = "withArgs() is required: this query's route uses pathParams. Pass withArgs(() => ({ pathParams: … })), or set silenceMissingWithArgsFeatureError as an escape hatch.";
|
|
1541
|
+
type SilencedWithArgsError = 'silenceMissingWithArgsFeatureError: true is set, but withArgs() is passed. Remove one of them.';
|
|
1542
|
+
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
1543
|
type QueryCreator<TArgs extends QueryArgs> = {
|
|
1506
|
-
(...
|
|
1507
|
-
(queryConfig: QueryConfig, ...features: QueryFeature<TArgs>[]): Query<TArgs>;
|
|
1544
|
+
<const TInput extends QueryCreatorInput<TArgs>>(this: WithArgsCheck<TArgs, TInput>, ...args: TInput | QueryCreatorInput<TArgs>): Query<TArgs>;
|
|
1508
1545
|
/**
|
|
1509
1546
|
* Creates a new query creator with merged options.
|
|
1510
1547
|
* The new creator inherits all options from the original and overrides them with the provided options.
|
|
@@ -2246,8 +2283,7 @@ declare const withSymfonyErrors: () => QueryClientFeatureFn;
|
|
|
2246
2283
|
* a `PATCH` and a GraphQL mutation are never retried unless the options set `retryNonIdempotent`.
|
|
2247
2284
|
*
|
|
2248
2285
|
* 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
|
|
2250
|
-
* `{ retry: false }`. A per-client or per-creator `retryFn` wins over it.
|
|
2286
|
+
* affected. Without it nothing is retried automatically. A per-client or per-creator `retryFn` wins over it.
|
|
2251
2287
|
*
|
|
2252
2288
|
* @example
|
|
2253
2289
|
* const MY_CLIENT = createQueryClient({
|
|
@@ -2502,6 +2538,8 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
|
|
|
2502
2538
|
clientOptions?: CreateQueryCreatorOptions;
|
|
2503
2539
|
/** Display name of the owning query client. Scopes devtools fault injection, which is armed per client. */
|
|
2504
2540
|
clientName?: string;
|
|
2541
|
+
/** Base URL of the owning query client, so a devtools mock pattern is matched against the route. */
|
|
2542
|
+
clientBaseUrl?: string;
|
|
2505
2543
|
/**
|
|
2506
2544
|
* Headers configured on the query client, applied to every request it makes. Per-request
|
|
2507
2545
|
* `args.headers` are merged on top and win per header name.
|
|
@@ -2519,6 +2557,12 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
|
|
|
2519
2557
|
* @default the `withDefaultRetry()` policy, or no retry at all without that client feature
|
|
2520
2558
|
*/
|
|
2521
2559
|
retryFn?: ShouldRetryRequestFn;
|
|
2560
|
+
/**
|
|
2561
|
+
* Whether `retryFn` is a policy somebody configured. Without one, `error.retryState` falls back to the
|
|
2562
|
+
* built-in classification of transient failures.
|
|
2563
|
+
* @default `true` when `retryFn` is set
|
|
2564
|
+
*/
|
|
2565
|
+
hasRetryPolicy?: boolean;
|
|
2522
2566
|
/**
|
|
2523
2567
|
* Whether sending the request again is safe, handed to `retryFn` as `idempotent`.
|
|
2524
2568
|
* @default `false` for a `POST` or `PATCH`, `true` for every other method
|
|
@@ -2618,7 +2662,7 @@ type HttpRequestSubtle<TArgs extends QueryArgs> = {
|
|
|
2618
2662
|
*/
|
|
2619
2663
|
resolveHeaders: () => HttpHeaders | undefined;
|
|
2620
2664
|
/**
|
|
2621
|
-
* The headers the most recent
|
|
2665
|
+
* The headers the most recent attempt actually went out with. Unlike {@link resolveHeaders} it
|
|
2622
2666
|
* does not re-resolve the header providers, so after a token refresh it still reports the token
|
|
2623
2667
|
* the request was sent with. `undefined` until the first execution.
|
|
2624
2668
|
*/
|
|
@@ -2655,8 +2699,7 @@ type HttpRequest<TArgs extends QueryArgs> = {
|
|
|
2655
2699
|
url: string;
|
|
2656
2700
|
/**
|
|
2657
2701
|
* 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.
|
|
2702
|
+
* behind {@link HttpRequest.url}. Read by the query devtools to show what a query actually sent.
|
|
2660
2703
|
*/
|
|
2661
2704
|
args: RequestArgs<TArgs> | null;
|
|
2662
2705
|
/**
|
|
@@ -2803,7 +2846,7 @@ type AnyNewQuery = Query<any>;
|
|
|
2803
2846
|
type QuerySubtle<TArgs extends QueryArgs> = {
|
|
2804
2847
|
/** Destroys the query and cleans up all resources. The query should not be used after this method is called. */
|
|
2805
2848
|
destroy: () => void;
|
|
2806
|
-
/**
|
|
2849
|
+
/** Sets the response the query shows, as the consumer reads it: `transformResponse` does not run on it. Does not execute the query. */
|
|
2807
2850
|
setResponse: (response: ResponseType<TArgs>) => void;
|
|
2808
2851
|
/**
|
|
2809
2852
|
* Manually forces the loading state of the query. Overridden on the next execution. Intended for
|
|
@@ -3255,8 +3298,9 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
|
|
|
3255
3298
|
run: (items: readonly TItem[]) => Observable<QueryBatchResult<TItem, TArgs>>;
|
|
3256
3299
|
/**
|
|
3257
3300
|
* Re-runs only the items that did not succeed - the failed ones plus anything left unattempted by
|
|
3258
|
-
* a `cancel()` or
|
|
3259
|
-
* safe to put behind a retry button in a
|
|
3301
|
+
* a `cancel()`, `stopOnError` or an unsubscribe. Successful items, and items an unsubscribe aborted
|
|
3302
|
+
* in flight, are never sent twice, which is what makes this safe to put behind a retry button in a
|
|
3303
|
+
* bulk edit. Cold, like {@link QueryBatch.run}.
|
|
3260
3304
|
*/
|
|
3261
3305
|
retryFailed: () => Observable<QueryBatchResult<TItem, TArgs>>;
|
|
3262
3306
|
/**
|
|
@@ -3265,7 +3309,7 @@ type QueryBatch<TItem, TArgs extends QueryArgs> = {
|
|
|
3265
3309
|
* normal and the run emits once they do.
|
|
3266
3310
|
*
|
|
3267
3311
|
* Unsubscribing from the run does abort everything in flight, which for a mutation is rarely what
|
|
3268
|
-
* you want. Prefer this.
|
|
3312
|
+
* you want: those items stay `cancelled` and `retryFailed()` does not resend them. Prefer this.
|
|
3269
3313
|
*/
|
|
3270
3314
|
cancel: () => void;
|
|
3271
3315
|
/** Clears the results and returns to `idle`. Ignored while a run is in flight. */
|
|
@@ -3585,9 +3629,9 @@ type QuerySequenceStepArgs<TArgs extends QueryArgs> = {
|
|
|
3585
3629
|
* The outcome of a settled {@link QuerySequence.run}.
|
|
3586
3630
|
*
|
|
3587
3631
|
* 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`
|
|
3589
|
-
* normalized {@link QueryErrorResponse}
|
|
3590
|
-
* step that ran - up to and including the failing one.
|
|
3632
|
+
* on failure `failedAt` is the zero-based index of the step that errored or was aborted, and `error`
|
|
3633
|
+
* is its normalized {@link QueryErrorResponse} - `null` for an aborted step. `snapshots` always holds
|
|
3634
|
+
* the settled snapshots of every step that ran - up to and including the failing one.
|
|
3591
3635
|
*/
|
|
3592
3636
|
type QuerySequenceResult<TResponses extends unknown[]> = {
|
|
3593
3637
|
ok: true;
|
|
@@ -3596,7 +3640,7 @@ type QuerySequenceResult<TResponses extends unknown[]> = {
|
|
|
3596
3640
|
} | {
|
|
3597
3641
|
ok: false;
|
|
3598
3642
|
failedAt: number;
|
|
3599
|
-
error: QueryErrorResponse;
|
|
3643
|
+
error: QueryErrorResponse | null;
|
|
3600
3644
|
snapshots: AnyQuerySnapshot[];
|
|
3601
3645
|
};
|
|
3602
3646
|
/**
|
|
@@ -3633,7 +3677,7 @@ type QuerySequence<TResponses extends unknown[]> = {
|
|
|
3633
3677
|
total: number;
|
|
3634
3678
|
/** The query objects backing each step, in order. Useful for devtools / advanced introspection. */
|
|
3635
3679
|
queries: AnyNewQuery[];
|
|
3636
|
-
/** The error of the step that failed, or `null` while running
|
|
3680
|
+
/** The error of the step that failed, or `null` while running, on success, or when a step was aborted. */
|
|
3637
3681
|
error: Signal<QueryErrorResponse | null>;
|
|
3638
3682
|
/** The zero-based index of the step that failed, or `null` while running / on success. */
|
|
3639
3683
|
failedAt: Signal<number | null>;
|
|
@@ -3656,7 +3700,8 @@ type QuerySequence<TResponses extends unknown[]> = {
|
|
|
3656
3700
|
*
|
|
3657
3701
|
* Cancellation (inherited from `executeUntilSettled`): a step whose request is cancelled - a
|
|
3658
3702
|
* destroyed host scope, an evicted cache entry - stops the waterfall like any other failure, with
|
|
3659
|
-
* an error that says the request was cancelled.
|
|
3703
|
+
* an error that says the request was cancelled. A step stopped by `query.abort()` stops it too: the
|
|
3704
|
+
* status is `error`, `failedAt` points at that step and `error` is `null`.
|
|
3660
3705
|
*/
|
|
3661
3706
|
run: () => Promise<QuerySequenceResult<TResponses>>;
|
|
3662
3707
|
};
|
|
@@ -3946,7 +3991,7 @@ type CreateQuerySubmissionConfig<TCreator extends AnyQueryCreator, TModel> = {
|
|
|
3946
3991
|
args?: (value: TModel, field: FieldTree<TModel>) => RequestArgs<QueryArgsOf<TCreator>> | null;
|
|
3947
3992
|
/**
|
|
3948
3993
|
* Runs after the request succeeded, before the action resolves and the form leaves its submitting
|
|
3949
|
-
* state - notify, close the overlay, navigate.
|
|
3994
|
+
* state - notify, close the overlay, navigate. An aborted submission does not call it.
|
|
3950
3995
|
*/
|
|
3951
3996
|
onSuccess?: (response: ResponseType<QueryArgsOf<TCreator>>, field: FieldTree<TModel>) => void;
|
|
3952
3997
|
/**
|
|
@@ -4098,6 +4143,11 @@ type AuthQueryConfig<TArgs extends QueryArgs> = {
|
|
|
4098
4143
|
* @default (response) => response (assumes response has accessToken and refreshToken properties)
|
|
4099
4144
|
*/
|
|
4100
4145
|
extractTokens?: (response: ResponseType<TArgs>) => BearerAuthProviderTokens;
|
|
4146
|
+
/**
|
|
4147
|
+
* Decides whether a failed request of this query is retried, replacing the query creator's policy.
|
|
4148
|
+
* @default the query creator's `retryFn` for an authentication query, a built-in backoff for a refresh query
|
|
4149
|
+
*/
|
|
4150
|
+
retryFn?: ShouldRetryRequestFn;
|
|
4101
4151
|
};
|
|
4102
4152
|
type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> & {
|
|
4103
4153
|
/**
|
|
@@ -4122,7 +4172,7 @@ type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> &
|
|
|
4122
4172
|
* Strategy for determining when to refresh the token.
|
|
4123
4173
|
* Can be either:
|
|
4124
4174
|
* - 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
|
|
4175
|
+
* - A fixed time in milliseconds before expiration (above 1; a negative number counts as 0)
|
|
4126
4176
|
* - An object with both percentage and min/max constraints
|
|
4127
4177
|
* @default { percentage: 0.75, minBufferMs: 60000, maxBufferMs: 600000 }
|
|
4128
4178
|
*/
|
|
@@ -4400,7 +4450,8 @@ type PersistentAuthConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ext
|
|
|
4400
4450
|
name?: string;
|
|
4401
4451
|
/**
|
|
4402
4452
|
* 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.
|
|
4453
|
+
* wrote it and no subdomain of it. A sibling subdomain cannot read a cookie another origin wrote, so
|
|
4454
|
+
* setting this does not share a session between them.
|
|
4404
4455
|
*/
|
|
4405
4456
|
domain?: string;
|
|
4406
4457
|
/**
|
|
@@ -4479,6 +4530,10 @@ declare const withPersistentAuth: <TBuilders extends readonly AnyQueryBuilder[],
|
|
|
4479
4530
|
value: string;
|
|
4480
4531
|
}[];
|
|
4481
4532
|
};
|
|
4533
|
+
/**
|
|
4534
|
+
* Builds the `withPersistentAuth` feature against a provider's feature context. It runs in
|
|
4535
|
+
* `context.injector`, so it can be called outside an injection context.
|
|
4536
|
+
*/
|
|
4482
4537
|
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
4538
|
|
|
4484
4539
|
type TokenExpirationWarningConfig = {
|
|
@@ -4541,7 +4596,9 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
|
|
|
4541
4596
|
*/
|
|
4542
4597
|
revokeOnLogout?: boolean;
|
|
4543
4598
|
/**
|
|
4544
|
-
* The session end causes that revoke automatically. Leave it out to revoke on every cause
|
|
4599
|
+
* The session end causes that revoke automatically. Leave it out to revoke on every cause but
|
|
4600
|
+
* `otherTab`. A tab that multi-tab sync logged out reads as `otherTab` here whatever the cause was, so
|
|
4601
|
+
* only the tab the logout started in revokes unless this names `otherTab`.
|
|
4545
4602
|
* @example revokeOn: ['user'] // for an API whose revocation ends the sessions on all devices
|
|
4546
4603
|
*/
|
|
4547
4604
|
revokeOn?: readonly BearerAuthSessionEndCause[];
|
|
@@ -4554,8 +4611,8 @@ type TokenRevocationConfig<TBuilders extends readonly AnyQueryBuilder[], TKey ex
|
|
|
4554
4611
|
type TokenRevocationFeature<TQuerySnapshot extends AnyQuerySnapshot> = {
|
|
4555
4612
|
/**
|
|
4556
4613
|
* Manually revoke the current tokens.
|
|
4557
|
-
* Returns `null` if there are no tokens to revoke
|
|
4558
|
-
*
|
|
4614
|
+
* Returns `null` if there are no tokens to revoke, else the snapshot of the revocation that sends them -
|
|
4615
|
+
* one queued behind a revocation in flight stays `isAlive()` until its own request settles.
|
|
4559
4616
|
*/
|
|
4560
4617
|
revoke: () => TQuerySnapshot | null;
|
|
4561
4618
|
/**
|
|
@@ -4647,6 +4704,10 @@ declare const withTracking: <TBuilders extends readonly AnyQueryBuilder[]>(confi
|
|
|
4647
4704
|
value: string;
|
|
4648
4705
|
}[];
|
|
4649
4706
|
};
|
|
4707
|
+
/**
|
|
4708
|
+
* Builds the `withTracking` feature against a provider's feature context. It runs in
|
|
4709
|
+
* `context.injector`, so it can be called outside an injection context.
|
|
4710
|
+
*/
|
|
4650
4711
|
declare const createTrackingFeature: <TBuilders extends readonly AnyQueryBuilder[]>(context: BearerAuthProviderFeatureContext<unknown, TBuilders>, config?: TrackingConfig<TBuilders>) => TrackingFeature<TBuilders>;
|
|
4651
4712
|
|
|
4652
4713
|
/**
|
|
@@ -4757,8 +4818,13 @@ type BearerAuthProviderEarlySetupContext = {
|
|
|
4757
4818
|
* one is a rotation, and reporting those would stomp whatever the tab is doing.
|
|
4758
4819
|
*/
|
|
4759
4820
|
setTokens: (access: string, refresh: string) => void;
|
|
4760
|
-
/**
|
|
4761
|
-
|
|
4821
|
+
/**
|
|
4822
|
+
* Ends the session, exactly as the provider's own `logout()` does. Pass `fromOtherTab` for a logout
|
|
4823
|
+
* another tab started, so this tab does not revoke the tokens a second time.
|
|
4824
|
+
*/
|
|
4825
|
+
logout: (cause?: BearerAuthSessionEndCause, options?: {
|
|
4826
|
+
fromOtherTab?: boolean;
|
|
4827
|
+
}) => void;
|
|
4762
4828
|
/** Why the last session ended, as {@link BearerAuthProvider.sessionEndCause} reports it. */
|
|
4763
4829
|
sessionEndCause: Signal<BearerAuthSessionEndCause | null>;
|
|
4764
4830
|
/**
|
|
@@ -5877,8 +5943,11 @@ type QueryDevtoolsResolvedFault = {
|
|
|
5877
5943
|
/** The status to fail the attempt with instead of sending it, or `null` to let it through. */
|
|
5878
5944
|
status: number | null;
|
|
5879
5945
|
};
|
|
5880
|
-
/** What a mock resolver matches against -
|
|
5881
|
-
type QueryDevtoolsMockTarget = QueryDevtoolsFaultTarget
|
|
5946
|
+
/** What a mock resolver matches against - what a fault resolver sees, plus the client's base URL. */
|
|
5947
|
+
type QueryDevtoolsMockTarget = QueryDevtoolsFaultTarget & {
|
|
5948
|
+
/** Base URL of the owning query client; the pattern is matched against the path after it. */
|
|
5949
|
+
baseUrl: string;
|
|
5950
|
+
};
|
|
5882
5951
|
/** The response the devtools want served instead of one upcoming attempt. */
|
|
5883
5952
|
type QueryDevtoolsResolvedMock = {
|
|
5884
5953
|
/** The status to respond with. `400` and above are delivered as an `HttpErrorResponse`. */
|
|
@@ -5991,8 +6060,12 @@ declare const queryDevtoolsArmedMocksRestored: Signal<boolean>;
|
|
|
5991
6060
|
declare const queryDevtoolsMockId: (parts: Pick<QueryDevtoolsMock, "clientName" | "method" | "pattern"> & {
|
|
5992
6061
|
query?: string;
|
|
5993
6062
|
}) => string;
|
|
5994
|
-
/**
|
|
5995
|
-
|
|
6063
|
+
/**
|
|
6064
|
+
* The path of a request URL relative to the client's `baseUrl` (base path included), without its query
|
|
6065
|
+
* string - what a pattern is matched against. A URL outside `baseUrl`, or no `baseUrl` at all, falls
|
|
6066
|
+
* back to the path without its origin.
|
|
6067
|
+
*/
|
|
6068
|
+
declare const queryDevtoolsRequestPath: (url: string, baseUrl?: string) => string;
|
|
5996
6069
|
/**
|
|
5997
6070
|
* Whether a request carries every query parameter a mock declares. Extra parameters are ignored - a mock
|
|
5998
6071
|
* says what the request must ask for, not everything it may.
|
|
@@ -6415,6 +6488,12 @@ declare const MAX_QUERY_DEVTOOLS_TOMBSTONES = 50;
|
|
|
6415
6488
|
* for - and low, because the batch's own entry already holds every item's args, response and error.
|
|
6416
6489
|
*/
|
|
6417
6490
|
declare const MAX_QUERY_BATCH_TOMBSTONES = 20;
|
|
6491
|
+
/**
|
|
6492
|
+
* How many batches keep their item tombstones at all - the ones whose items settled most recently, live
|
|
6493
|
+
* or destroyed. An older batch loses its whole tail, so the total stays at this times
|
|
6494
|
+
* {@link MAX_QUERY_BATCH_TOMBSTONES} however many batches a page creates.
|
|
6495
|
+
*/
|
|
6496
|
+
declare const MAX_QUERY_BATCH_TOMBSTONE_BUCKETS = 5;
|
|
6418
6497
|
/**
|
|
6419
6498
|
* A destroyed query's last state, shaped like the query itself: every signal the panel reads is
|
|
6420
6499
|
* replaced by a function returning the value it held when the query went away, and every action is a
|
|
@@ -6959,6 +7038,18 @@ type Sort = {
|
|
|
6959
7038
|
};
|
|
6960
7039
|
declare const transformToSort: (value: unknown) => Sort | null;
|
|
6961
7040
|
declare const transformToSortQueryParam: (value: unknown) => string | null;
|
|
7041
|
+
/** One sorted column, by `key`; the same shape as the `@ethlete/components` table's `TableSort`. */
|
|
7042
|
+
type TableSortEntry = {
|
|
7043
|
+
key: string;
|
|
7044
|
+
direction: 'asc' | 'desc';
|
|
7045
|
+
};
|
|
7046
|
+
/**
|
|
7047
|
+
* Reads `key:direction` entries (`name:asc`) into a table sort, dropping an entry with an empty key or an
|
|
7048
|
+
* unknown direction and every repeat of a key after its first. `null` when nothing is readable.
|
|
7049
|
+
*/
|
|
7050
|
+
declare const transformToTableSort: (value: unknown) => TableSortEntry[] | null;
|
|
7051
|
+
/** Writes a table sort as one `key:direction` entry per sorted column. */
|
|
7052
|
+
declare const transformToTableSortQueryParam: (value: unknown) => string[] | null;
|
|
6962
7053
|
|
|
6963
7054
|
/** @deprecated Use `queryField` with `defineQueryForm`. */
|
|
6964
7055
|
declare class QueryField<T> {
|
|
@@ -7174,6 +7265,9 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
|
|
|
7174
7265
|
private _triggeredVia;
|
|
7175
7266
|
private _lastExecuteCalledAt;
|
|
7176
7267
|
private _ownLoadExecuteTime;
|
|
7268
|
+
private _responseAtExecute;
|
|
7269
|
+
private _errorAtExecute;
|
|
7270
|
+
private _ownLoadSettled;
|
|
7177
7271
|
private _wasAborted;
|
|
7178
7272
|
state$: Observable<V2QueryState<Data>>;
|
|
7179
7273
|
constructor(newQuery: TNewQuery, _arguments: RequestArgs<QueryArgsOf<TNewQuery>>, entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined,
|
|
@@ -7199,9 +7293,11 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
|
|
|
7199
7293
|
private toQueryState;
|
|
7200
7294
|
/**
|
|
7201
7295
|
* A load this wrapper did not start - a `refreshQueriesInUse()`, an invalidation - reports as `auto`, the way
|
|
7202
|
-
* v2 reported its background refreshes.
|
|
7296
|
+
* v2 reported its background refreshes. A secure query that waits for a token reports a synthetic loading
|
|
7297
|
+
* state first and the request's own later, so a new load that starts before this one settled is still its own.
|
|
7203
7298
|
*/
|
|
7204
7299
|
private triggerOf;
|
|
7300
|
+
private hasOwnLoadSettled;
|
|
7205
7301
|
get isExpired(): boolean | undefined;
|
|
7206
7302
|
get isInUse(): boolean;
|
|
7207
7303
|
get isPolling(): boolean;
|
|
@@ -8332,7 +8428,7 @@ declare const v2ShouldCacheQuery: (method: Method) => method is "GET" | "OPTIONS
|
|
|
8332
8428
|
*
|
|
8333
8429
|
* @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
8430
|
*/
|
|
8335
|
-
declare const v2BuildQueryCacheKey: (route: string, args: BaseArguments | undefined, method?: Method) => string;
|
|
8431
|
+
declare const v2BuildQueryCacheKey: (route: string, args: (BaseArguments & WithHeaders) | undefined, method?: Method) => string;
|
|
8336
8432
|
|
|
8337
8433
|
/**
|
|
8338
8434
|
* @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 +9644,15 @@ declare const searchQueryField: (config?: QueryFieldConfig<string>) => QueryFiel
|
|
|
9548
9644
|
* whatever its key.
|
|
9549
9645
|
*/
|
|
9550
9646
|
declare const sortQueryField: (config?: QueryFieldConfig<Sort | null>) => QueryFieldDef<Sort | null>;
|
|
9647
|
+
/**
|
|
9648
|
+
* A multi-column sort typed like the `@ethlete/components` table's `sort`, so `[(sort)]` binds it with no
|
|
9649
|
+
* mapping. Written as one `key:direction` param per column (`?sort=name:asc&sort=date:desc`); an unreadable
|
|
9650
|
+
* entry is dropped. Starts at `[]`. Not counted by `activeFilterCount`, whatever its key.
|
|
9651
|
+
*
|
|
9652
|
+
* @example
|
|
9653
|
+
* tableSortQueryField() // <et-table [(sort)]="qf.fields.sort().value" sortMode="server" />
|
|
9654
|
+
*/
|
|
9655
|
+
declare const tableSortQueryField: (config?: QueryFieldConfig<TableSortEntry[]>) => QueryFieldDef<TableSortEntry[]>;
|
|
9551
9656
|
/** A field holding a list of strings. */
|
|
9552
9657
|
declare const stringArrayQueryField: (config?: QueryFieldConfig<string[] | null>) => QueryFieldDef<string[] | null>;
|
|
9553
9658
|
/** A field holding a list of numbers. */
|
|
@@ -9620,10 +9725,16 @@ type WebSocketClientSocket = {
|
|
|
9620
9725
|
connect: () => void;
|
|
9621
9726
|
disconnect: () => void;
|
|
9622
9727
|
emit: (event: string, data: unknown) => void;
|
|
9623
|
-
on:
|
|
9728
|
+
on: {
|
|
9729
|
+
(event: 'connect', listener: () => void): void;
|
|
9730
|
+
(event: 'disconnect', listener: (reason: string) => void): void;
|
|
9731
|
+
(event: 'connect_error', listener: (error: Error) => void): void;
|
|
9732
|
+
};
|
|
9624
9733
|
onAny: (listener: (eventName: string, ...args: unknown[]) => void) => void;
|
|
9625
9734
|
onAnyOutgoing: (listener: (eventName: string, ...args: unknown[]) => void) => void;
|
|
9626
9735
|
readonly recovered: boolean;
|
|
9736
|
+
/** `false` once socket.io gave up reconnecting on its own - after a rejected handshake, for example. */
|
|
9737
|
+
readonly active?: boolean;
|
|
9627
9738
|
};
|
|
9628
9739
|
/**
|
|
9629
9740
|
* The `io` factory of `socket.io-client`, declared structurally.
|
|
@@ -9720,7 +9831,7 @@ type AnyWebSocketClient<TMessageData extends SocketMessageView = SocketMessageVi
|
|
|
9720
9831
|
declare const createWebSocketClient: <TMessageData extends SocketMessageView = SocketMessageView>(options: CreateWebSocketClientConfigOptions) => WebSocketClientResult<TMessageData>;
|
|
9721
9832
|
|
|
9722
9833
|
/** The version of `@ethlete/query` this build was cut from. */
|
|
9723
|
-
declare const QUERY_VERSION = "6.0.0-next.
|
|
9834
|
+
declare const QUERY_VERSION = "6.0.0-next.54";
|
|
9724
9835
|
|
|
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 };
|
|
9836
|
+
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 };
|
|
9837
|
+
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 };
|