@ethlete/query 6.0.0-next.54 → 6.0.0-next.56
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 +61 -0
- package/fesm2022/ethlete-query-devtools-contract.mjs +6 -0
- package/fesm2022/ethlete-query-devtools-contract.mjs.map +1 -0
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs +2 -2
- package/fesm2022/ethlete-query-ngrx-toolkit.mjs.map +1 -1
- package/fesm2022/ethlete-query-testing.mjs +42 -21
- package/fesm2022/ethlete-query-testing.mjs.map +1 -1
- package/fesm2022/ethlete-query.mjs +2059 -1289
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/generators/generators.json +10 -0
- package/generators/migrate-query-client-features/migration.js +10 -8
- package/generators/migrate-to-query-v3/legacy-query-creator-migration.js +1 -1
- package/generators/migrate-to-query-v3/report.js +1 -1
- package/generators/move-devtools-contract-imports/migration.js +155 -0
- package/generators/move-devtools-contract-imports/moved-names.js +153 -0
- package/generators/move-devtools-contract-imports/schema.json +26 -0
- package/generators/report-legacy-query-apis/migration.js +256 -0
- package/generators/report-legacy-query-apis/schema.json +25 -0
- package/migrations.json +26 -0
- package/package.json +12 -16
- package/types/ethlete-query-devtools-contract.d.ts +1 -0
- package/types/ethlete-query-ngrx-toolkit.d.ts +2 -2
- package/types/ethlete-query-testing.d.ts +42 -82
- package/types/ethlete-query.d.ts +1092 -815
package/types/ethlete-query.d.ts
CHANGED
|
@@ -166,12 +166,13 @@ type DefaultRetryOptions = {
|
|
|
166
166
|
*/
|
|
167
167
|
jitter?: number;
|
|
168
168
|
/**
|
|
169
|
-
* Which response statuses are worth retrying
|
|
170
|
-
*
|
|
169
|
+
* Which response statuses are worth retrying. A list replaces the defaults; a function gets the
|
|
170
|
+
* status and whether the defaults retry it, so `(status, byDefault) => byDefault || status === 500`
|
|
171
|
+
* adds one. A connection failure is status `0`.
|
|
171
172
|
*
|
|
172
173
|
* @default a connection failure (`0`), `408`, `425`, `429`, and every 5xx above `500`
|
|
173
174
|
*/
|
|
174
|
-
retryableStatusCodes?: number[];
|
|
175
|
+
retryableStatusCodes?: number[] | ((status: number, isRetryableByDefault: boolean) => boolean);
|
|
175
176
|
/**
|
|
176
177
|
* Also retries a request that is not idempotent (see {@link ShouldRetryRequestOptions.idempotent}). A
|
|
177
178
|
* `POST` whose response was lost may already have been applied, so retrying it can create a
|
|
@@ -223,6 +224,7 @@ declare const isQueryErrorResponse: (error: unknown) => error is QueryErrorRespo
|
|
|
223
224
|
/**
|
|
224
225
|
* Every message carried by an error, flattened into a plain list - one entry for a single error,
|
|
225
226
|
* one per violation for a list (a form response with several field violations), empty for `null`.
|
|
227
|
+
* Blank messages are dropped; an error left with none yields the raw response's message instead.
|
|
226
228
|
*
|
|
227
229
|
* The single/list split exists because that is how APIs answer; UI almost never wants to branch on
|
|
228
230
|
* it. Reach for this when rendering, and keep {@link QueryErrorResponse} for anything that needs
|
|
@@ -664,6 +666,11 @@ type QueryStateSubtle<TArgs extends QueryArgs> = {
|
|
|
664
666
|
* execution. Set by a feature during creation (`withLongPolling` holds its first round back while disabled).
|
|
665
667
|
*/
|
|
666
668
|
autoExecuteGuard: WritableSignal<(() => boolean) | null>;
|
|
669
|
+
/**
|
|
670
|
+
* Called by every execution before its request is made; a function it returns is called with that request,
|
|
671
|
+
* or with `null` when building the request threw. Set by a feature during creation (`withOptimisticUpdate` writes the cache before the request leaves).
|
|
672
|
+
*/
|
|
673
|
+
beforeExecute: WritableSignal<QueryBeforeExecuteFn<TArgs> | null>;
|
|
667
674
|
/**
|
|
668
675
|
* Installs the reactive source that backs `state.args`. The `withArgs` feature uses this so that
|
|
669
676
|
* `state.args` always reflects the latest args (pulled from the reactive source on read) instead
|
|
@@ -673,11 +680,19 @@ type QueryStateSubtle<TArgs extends QueryArgs> = {
|
|
|
673
680
|
setArgsSource: (source: () => RequestArgs<TArgs> | null) => void;
|
|
674
681
|
/** Whether {@link setArgsSource} installed a source. Without one, an execution's args are written to `state.args`. */
|
|
675
682
|
hasArgsSource: Signal<boolean>;
|
|
683
|
+
/**
|
|
684
|
+
* Writes the args of an `execute({ args })` over the args source. They stay until the source produces new
|
|
685
|
+
* non-null args; a source that turns `null` keeps them.
|
|
686
|
+
*/
|
|
687
|
+
setExplicitArgs: (args: RequestArgs<TArgs>) => void;
|
|
688
|
+
/** Whether `args` are the ones {@link setExplicitArgs} wrote last and the source has not replaced yet. */
|
|
689
|
+
isExplicitArgs: (args: RequestArgs<TArgs> | null) => boolean;
|
|
676
690
|
/** @see SetupQueryStateOptions.devtoolsStats */
|
|
677
691
|
devtoolsStats: QueryDevtoolsStatsRecorder | null;
|
|
678
692
|
/** @see SetupQueryStateOptions.devtoolsFormLinks */
|
|
679
693
|
devtoolsFormLinks: QueryDevtoolsFormLinksRecorder | null;
|
|
680
694
|
};
|
|
695
|
+
type QueryBeforeExecuteFn<TArgs extends QueryArgs> = (args: RequestArgs<TArgs> | null) => ((request: HttpRequest<TArgs> | null) => void) | null;
|
|
681
696
|
type QueryState<TArgs extends QueryArgs> = {
|
|
682
697
|
rawResponse: WritableSignal<RawResponseType<TArgs> | null>;
|
|
683
698
|
response: WritableSignal<ResponseType<TArgs> | null>;
|
|
@@ -758,10 +773,15 @@ type QueryExecuteOptions<TArgs extends QueryArgs> = {
|
|
|
758
773
|
isRefreshable?: boolean;
|
|
759
774
|
};
|
|
760
775
|
declare const queryExecute: <TArgs extends QueryArgs>(options: QueryExecuteOptions<TArgs>) => void;
|
|
776
|
+
/**
|
|
777
|
+
* A query over a `withArgs` source that returns `null` is parked. Running it would send `null` args, so the
|
|
778
|
+
* call is dropped with a dev-mode warning.
|
|
779
|
+
*/
|
|
780
|
+
declare const skipParkedExecution: <TArgs extends QueryArgs>(state: QueryState<TArgs>, args: RequestArgs<TArgs> | null | undefined, route: unknown) => boolean;
|
|
761
781
|
/**
|
|
762
782
|
* Writes the args an execution runs with to `state.args`, so a later bare `execute()` re-sends them.
|
|
763
|
-
* A `
|
|
764
|
-
* args
|
|
783
|
+
* A `withLongPolling` round must not look like a new args value, so it is not written. Over a `withArgs`
|
|
784
|
+
* source only the caller's own non-null args are written, never what a feature re-sends.
|
|
765
785
|
*/
|
|
766
786
|
declare const recordExecutionArgs: <TArgs extends QueryArgs>(state: QueryState<TArgs>, args: RequestArgs<TArgs> | null, options?: RunQueryExecuteOptions) => void;
|
|
767
787
|
/**
|
|
@@ -786,6 +806,8 @@ type QueryRefreshCause = {
|
|
|
786
806
|
type: 'refresh' | 'invalidation' | 'mutation';
|
|
787
807
|
/** The URL the refresh was narrowed to (an invalidation's scope, a mutation's URL), or `null`. */
|
|
788
808
|
url: string | null;
|
|
809
|
+
/** The tag an invalidation was narrowed to, or `null`. */
|
|
810
|
+
tag?: string | null;
|
|
789
811
|
/** Whether another tab asked for it rather than this one. */
|
|
790
812
|
otherTab: boolean;
|
|
791
813
|
};
|
|
@@ -907,6 +929,8 @@ type QueryRepositoryRequestOptions<TArgs extends QueryArgs> = {
|
|
|
907
929
|
* as `idempotent`; unset, that falls back to the method not being `POST` or `PATCH`.
|
|
908
930
|
*/
|
|
909
931
|
isRefreshable?: boolean;
|
|
932
|
+
/** @see BaseQueryCreatorOptions.tags */
|
|
933
|
+
tags?: readonly string[];
|
|
910
934
|
};
|
|
911
935
|
type QueryRepositoryItem<TArgs extends QueryArgs> = {
|
|
912
936
|
/** The key of the request (either a cache key for cacheable requests or a UUID for uncacheable requests) */
|
|
@@ -937,6 +961,10 @@ type QueryRepositoryCacheEntry = {
|
|
|
937
961
|
* consumer that comes back.
|
|
938
962
|
*/
|
|
939
963
|
isUnused: boolean;
|
|
964
|
+
/** @see QueryRepositoryRequestOptions.isRefreshable */
|
|
965
|
+
isRefreshable: boolean;
|
|
966
|
+
/** The tags the entry's consumers declared. */
|
|
967
|
+
tags: readonly string[];
|
|
940
968
|
/** The underlying HTTP request. */
|
|
941
969
|
request: HttpRequest<QueryArgs>;
|
|
942
970
|
};
|
|
@@ -957,10 +985,10 @@ type QueryRepositorySubtle = {
|
|
|
957
985
|
evict: (key: QueryKey) => void;
|
|
958
986
|
};
|
|
959
987
|
/**
|
|
960
|
-
* Narrows which in-use entries a {@link QueryRepository.refreshInUse} call refreshes
|
|
961
|
-
* `false` leaves the entry alone.
|
|
988
|
+
* Narrows which in-use entries a {@link QueryRepository.refreshInUse} call refreshes, given the entry's
|
|
989
|
+
* request and the tags its consumers declared. Returning `false` leaves the entry alone.
|
|
962
990
|
*/
|
|
963
|
-
type QueryRepositoryRefreshFilterFn = (request: HttpRequest<QueryArgs
|
|
991
|
+
type QueryRepositoryRefreshFilterFn = (request: HttpRequest<QueryArgs>, tags?: readonly string[]) => boolean;
|
|
964
992
|
/** @see QueryRepository.applyExternalResponse */
|
|
965
993
|
type ApplyExternalResponseOptions = {
|
|
966
994
|
/** The cache key the response belongs to. */
|
|
@@ -999,15 +1027,19 @@ type QueryRepository = {
|
|
|
999
1027
|
unbindAllSecure: () => void;
|
|
1000
1028
|
/**
|
|
1001
1029
|
* 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
|
|
1003
|
-
* looking at them, and they revalidate on their own when a consumer binds again.
|
|
1030
|
+
* in-flight requests. Entries kept only for their `keepUnusedFor` window are not re-executed - nobody is
|
|
1031
|
+
* looking at them, and they revalidate on their own when a consumer binds again. An `invalidation`
|
|
1032
|
+
* marks them stale, so an `allowCache` execution does not serve them either.
|
|
1004
1033
|
*
|
|
1005
1034
|
* Pass a filter to narrow it down to a subset of those entries, and a cause to describe what asked
|
|
1006
1035
|
* for it - which is what the devtools report as the reason a query refetched.
|
|
1007
1036
|
*
|
|
1037
|
+
* An `invalidation` or `mutation` does not restart a request that one of the same batch already
|
|
1038
|
+
* restarted: `batch` names it, and leaving it out makes the current synchronous turn the batch.
|
|
1039
|
+
*
|
|
1008
1040
|
* @see QueryClient.refreshQueriesInUse
|
|
1009
1041
|
*/
|
|
1010
|
-
refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause) => void;
|
|
1042
|
+
refreshInUse: (filter?: QueryRepositoryRefreshFilterFn, cause?: QueryRefreshCause, batch?: string) => void;
|
|
1011
1043
|
/**
|
|
1012
1044
|
* Writes a response that another tab received onto the matching cache entry, so the same query
|
|
1013
1045
|
* shows the same data everywhere without a second network request.
|
|
@@ -1090,7 +1122,8 @@ type QueryExecuteArgs<TArgs extends QueryArgs> = {
|
|
|
1090
1122
|
options?: RunQueryExecuteOptions;
|
|
1091
1123
|
};
|
|
1092
1124
|
type InternalQueryExecute<TArgs extends QueryArgs> = {
|
|
1093
|
-
|
|
1125
|
+
/** Returns `false` when the call was dropped because the query is parked. */
|
|
1126
|
+
(executeArgs?: QueryExecuteArgs<TArgs>): boolean;
|
|
1094
1127
|
reset: () => void;
|
|
1095
1128
|
abort: () => boolean;
|
|
1096
1129
|
aborted$: Observable<void>;
|
|
@@ -1123,6 +1156,7 @@ declare const QueryFeatureType: {
|
|
|
1123
1156
|
readonly WITH_AUTO_REFRESH: "WITH_AUTO_REFRESH";
|
|
1124
1157
|
readonly WITH_RESPONSE_UPDATE: "WITH_RESPONSE_UPDATE";
|
|
1125
1158
|
readonly WITH_PAGE_RESET_ON_ERROR: "WITH_PAGE_RESET_ON_ERROR";
|
|
1159
|
+
readonly WITH_OPTIMISTIC_UPDATE: "WITH_OPTIMISTIC_UPDATE";
|
|
1126
1160
|
};
|
|
1127
1161
|
type QueryFeatureType = (typeof QueryFeatureType)[keyof typeof QueryFeatureType];
|
|
1128
1162
|
type QueryFeatureContext<TArgs extends QueryArgs> = {
|
|
@@ -1153,7 +1187,8 @@ declare const createQueryFeature: <TArgs extends QueryArgs>(config: {
|
|
|
1153
1187
|
*
|
|
1154
1188
|
* Return `null` to park the query: it is reset (`response()` and `executionState()` become `null`),
|
|
1155
1189
|
* 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.
|
|
1190
|
+
* finishes first and the query parks once it has settled. `execute({ args })` runs and keeps other args
|
|
1191
|
+
* until this function produces new non-null ones.
|
|
1157
1192
|
*
|
|
1158
1193
|
* Changing arguments will automatically trigger a new execution of the query if it is eligible for auto execution (e.g. a GET request).
|
|
1159
1194
|
*/
|
|
@@ -1312,7 +1347,7 @@ type WithResponseUpdateFeatureOptions<TArgs extends QueryArgs> = {
|
|
|
1312
1347
|
/**
|
|
1313
1348
|
* A function that will be called with the latest response
|
|
1314
1349
|
* If the function returns `null`, the response will not be updated.
|
|
1315
|
-
* Otherwise, the response
|
|
1350
|
+
* Otherwise, the returned value becomes `response()` as is: it is not passed through `transformResponse` again.
|
|
1316
1351
|
* The function will be called in a reactive signal context.
|
|
1317
1352
|
* If the query get's executed after the response was updated, the response will be set the the fresh data received from the server.
|
|
1318
1353
|
*
|
|
@@ -1322,17 +1357,16 @@ type WithResponseUpdateFeatureOptions<TArgs extends QueryArgs> = {
|
|
|
1322
1357
|
* const matchEvents = mySocket.joinRoom('match-events');
|
|
1323
1358
|
*
|
|
1324
1359
|
* const myMatchQuery = getMatch(
|
|
1325
|
-
* withArgs(() => ({ matchId: 1 })),
|
|
1326
|
-
* withResponseUpdate(
|
|
1327
|
-
*
|
|
1328
|
-
*
|
|
1329
|
-
* if (!matchEvent) return null;
|
|
1360
|
+
* withArgs(() => ({ pathParams: { matchId: 1 } })),
|
|
1361
|
+
* withResponseUpdate({
|
|
1362
|
+
* updater: ({ currentResponse }) => {
|
|
1363
|
+
* const matchEvent = matchEvents();
|
|
1330
1364
|
*
|
|
1331
|
-
*
|
|
1332
|
-
* // To apply partial updates, you can use the spread operator in combination with the current response.
|
|
1365
|
+
* if (!matchEvent || !currentResponse) return null;
|
|
1333
1366
|
*
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1367
|
+
* return { ...currentResponse, score: matchEvent.score };
|
|
1368
|
+
* },
|
|
1369
|
+
* }),
|
|
1336
1370
|
* )
|
|
1337
1371
|
*/
|
|
1338
1372
|
updater: (data: WithResponseUpdateFeatureFnData<TArgs>) => ResponseType<TArgs> | null;
|
|
@@ -1494,6 +1528,28 @@ type BaseQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = {
|
|
|
1494
1528
|
* @default true for public queries, false for secure ones
|
|
1495
1529
|
*/
|
|
1496
1530
|
persistence?: boolean;
|
|
1531
|
+
/**
|
|
1532
|
+
* Tags of a read, for {@link QueryClient.invalidateQueries} `{ tag }` and the `invalidates` option of a
|
|
1533
|
+
* mutation. Derived from the args, so a read is tagged before its request leaves and an invalidation
|
|
1534
|
+
* restarts it even while it is in flight. Has no effect on mutations.
|
|
1535
|
+
*
|
|
1536
|
+
* @example
|
|
1537
|
+
* createGetQuery(client)<GetOpportunityArgs>((p) => `/opportunities/${p.uuid}`, {
|
|
1538
|
+
* tags: ({ args }) => [`opportunity:${args.pathParams.uuid}`],
|
|
1539
|
+
* });
|
|
1540
|
+
*/
|
|
1541
|
+
tags?: QueryTagsOption<TArgs>;
|
|
1542
|
+
/**
|
|
1543
|
+
* What a successful mutation invalidates: each target runs {@link QueryClient.invalidateQueries} once the
|
|
1544
|
+
* response landed, here and in the user's other tabs. A failed mutation invalidates nothing. Throws on a
|
|
1545
|
+
* read, which would invalidate on every load.
|
|
1546
|
+
*
|
|
1547
|
+
* @example
|
|
1548
|
+
* createPatchQuery(client)<PatchPersonArgs>((p) => `/opportunities/${p.uuid}/people/${p.peopleUuid}`, {
|
|
1549
|
+
* invalidates: ({ args }) => [{ tag: `opportunity:${args.pathParams.uuid}` }, { url: '/people' }],
|
|
1550
|
+
* });
|
|
1551
|
+
*/
|
|
1552
|
+
invalidates?: QueryInvalidatesOption<TArgs>;
|
|
1497
1553
|
/** Advanced query creator features. **WARNING!** Incorrectly using these features will likely **BREAK** your application. You have been warned! */
|
|
1498
1554
|
subtle?: BaseQueryCreatorOptionsSubtle;
|
|
1499
1555
|
};
|
|
@@ -1591,15 +1647,6 @@ type QueryConfig = {
|
|
|
1591
1647
|
* If true, the query will not throw an error because a "withArgs()" feature is missing.
|
|
1592
1648
|
*/
|
|
1593
1649
|
silenceMissingWithArgsFeatureError?: boolean;
|
|
1594
|
-
/**
|
|
1595
|
-
* If true, executing with `allowCache` on a request that cannot be cached is ignored instead of throwing
|
|
1596
|
-
* `ET301`.
|
|
1597
|
-
*
|
|
1598
|
-
* For the legacy interop layer: v2 had a single `skipCache` for every method, so it forwards `allowCache`
|
|
1599
|
-
* without being able to tell a cacheable request from an uncacheable one. Application code should not set
|
|
1600
|
-
* this - on a hand-written `execute()` the error it silences is a real mistake.
|
|
1601
|
-
*/
|
|
1602
|
-
silenceUncacheableAllowCacheError?: boolean;
|
|
1603
1650
|
/**
|
|
1604
1651
|
* Keeps `response()` on the previous args' response while a request for new args loads, reported as
|
|
1605
1652
|
* `executionState().cachedResponse`. Defaults to `true` for queries that execute themselves (GET, HEAD,
|
|
@@ -1629,6 +1676,8 @@ type QueryInvalidationCandidate = {
|
|
|
1629
1676
|
* @see QueryInvalidationOptions.filter
|
|
1630
1677
|
*/
|
|
1631
1678
|
type QueryInvalidationFilterFn = (query: QueryInvalidationCandidate) => boolean;
|
|
1679
|
+
/** A root-relative route (`/players`), resolved against the client's `baseUrl`, or an absolute URL. */
|
|
1680
|
+
type QueryInvalidationUrl = `/${string}` | `${string}://${string}`;
|
|
1632
1681
|
/** @see QueryClient.invalidateQueries */
|
|
1633
1682
|
type QueryInvalidationOptions = {
|
|
1634
1683
|
/**
|
|
@@ -1638,7 +1687,12 @@ type QueryInvalidationOptions = {
|
|
|
1638
1687
|
* Matching is boundary aware rather than a plain prefix test, so `/players` covers `/players`,
|
|
1639
1688
|
* `/players/1` and `/players?page=2` - but not `/players-archive`.
|
|
1640
1689
|
*/
|
|
1641
|
-
url?:
|
|
1690
|
+
url?: QueryInvalidationUrl;
|
|
1691
|
+
/**
|
|
1692
|
+
* Narrows the invalidation to the reads that declared this tag (see {@link BaseQueryCreatorOptions.tags}).
|
|
1693
|
+
* Combined with `url`, a read has to match both.
|
|
1694
|
+
*/
|
|
1695
|
+
tag?: string;
|
|
1642
1696
|
/**
|
|
1643
1697
|
* Narrows the invalidation further, on the built `{ method, url }` of each candidate. Runs after
|
|
1644
1698
|
* `url` when both are given.
|
|
@@ -1675,8 +1729,34 @@ declare const isUnderInvalidatedUrl: (queryUrl: string, invalidatedUrl: string)
|
|
|
1675
1729
|
*/
|
|
1676
1730
|
declare const createQueryInvalidationFilter: (options: {
|
|
1677
1731
|
url: string | null;
|
|
1732
|
+
tag?: string | null;
|
|
1678
1733
|
filter?: QueryInvalidationFilterFn;
|
|
1679
1734
|
}) => QueryRepositoryRefreshFilterFn | undefined;
|
|
1735
|
+
/** One thing a mutation invalidates: everything below a URL, or every read that declared a tag. */
|
|
1736
|
+
type QueryInvalidationTarget = {
|
|
1737
|
+
url: QueryInvalidationUrl;
|
|
1738
|
+
} | {
|
|
1739
|
+
tag: string;
|
|
1740
|
+
};
|
|
1741
|
+
/** What a {@link BaseQueryCreatorOptions.invalidates} function is handed after a successful mutation. */
|
|
1742
|
+
type QueryInvalidatesContext<TArgs extends QueryArgs> = {
|
|
1743
|
+
/** The args the mutation was sent with. */
|
|
1744
|
+
args: RequestArgs<TArgs>;
|
|
1745
|
+
/** The mutation's response, or `null` for an empty one (a `204`). */
|
|
1746
|
+
response: ResponseType<TArgs> | null;
|
|
1747
|
+
};
|
|
1748
|
+
type Bivariant<TContext, TResult> = {
|
|
1749
|
+
fn(context: TContext): TResult;
|
|
1750
|
+
}['fn'];
|
|
1751
|
+
/** @see BaseQueryCreatorOptions.invalidates */
|
|
1752
|
+
type QueryInvalidatesOption<TArgs extends QueryArgs> = readonly QueryInvalidationTarget[] | Bivariant<QueryInvalidatesContext<TArgs>, readonly QueryInvalidationTarget[]>;
|
|
1753
|
+
/** What a {@link BaseQueryCreatorOptions.tags} function is handed when the read executes. */
|
|
1754
|
+
type QueryTagsContext<TArgs extends QueryArgs> = {
|
|
1755
|
+
/** The args the read is sent with. */
|
|
1756
|
+
args: RequestArgs<TArgs>;
|
|
1757
|
+
};
|
|
1758
|
+
/** @see BaseQueryCreatorOptions.tags */
|
|
1759
|
+
type QueryTagsOption<TArgs extends QueryArgs> = readonly string[] | Bivariant<QueryTagsContext<TArgs>, readonly string[]>;
|
|
1680
1760
|
|
|
1681
1761
|
/**
|
|
1682
1762
|
* Schema version of the persisted store, owned by this library. Bumping it makes the storage adapter
|
|
@@ -2078,6 +2158,8 @@ type QuerySyncMutationMessage = {
|
|
|
2078
2158
|
method: QueryMethod;
|
|
2079
2159
|
/** The full URL the mutation was sent to. */
|
|
2080
2160
|
url: string;
|
|
2161
|
+
/** @see QuerySyncInvalidateMessage.batch */
|
|
2162
|
+
batch?: string;
|
|
2081
2163
|
};
|
|
2082
2164
|
/** Another tab was told to invalidate queries, explicitly. */
|
|
2083
2165
|
type QuerySyncInvalidateMessage = {
|
|
@@ -2087,6 +2169,16 @@ type QuerySyncInvalidateMessage = {
|
|
|
2087
2169
|
* resolved by the tab that sent it - the two tabs run the same client, so its `baseUrl` is ours.
|
|
2088
2170
|
*/
|
|
2089
2171
|
url: string | null;
|
|
2172
|
+
/**
|
|
2173
|
+
* The tag the invalidation was narrowed to, or `null`. A tab from an older deploy ignores the field and
|
|
2174
|
+
* invalidates by `url` alone, a superset.
|
|
2175
|
+
*/
|
|
2176
|
+
tag?: string | null;
|
|
2177
|
+
/**
|
|
2178
|
+
* Shared by the messages one tab posted in the same synchronous turn, so the receiver restarts a read
|
|
2179
|
+
* once for all of them. A tab from an older deploy neither sends nor reads it, and restarts once per message.
|
|
2180
|
+
*/
|
|
2181
|
+
batch?: string;
|
|
2090
2182
|
};
|
|
2091
2183
|
type QuerySyncMessage = QuerySyncResponseMessage | QuerySyncMutationMessage | QuerySyncInvalidateMessage;
|
|
2092
2184
|
/** What actually travels over the channel: a message plus the protocol version that produced it. */
|
|
@@ -2138,10 +2230,10 @@ type QuerySyncEngine = {
|
|
|
2138
2230
|
/** Elects the one tab responsible for a cache key. */
|
|
2139
2231
|
lockManager: QueryKeyLockManager;
|
|
2140
2232
|
/**
|
|
2141
|
-
* Tells the other tabs to refresh the queries they have in use below `url`, or all
|
|
2142
|
-
* `null
|
|
2233
|
+
* Tells the other tabs to refresh the queries they have in use below `url` and tagged `tag`, or all
|
|
2234
|
+
* of them for two `null`s. What {@link QueryClient.invalidateQueries} broadcasts.
|
|
2143
2235
|
*/
|
|
2144
|
-
postInvalidation: (url: string | null) => void;
|
|
2236
|
+
postInvalidation: (url: string | null, tag?: string | null) => void;
|
|
2145
2237
|
/** Stops broadcasting and listening, and closes the channel. */
|
|
2146
2238
|
destroy: () => void;
|
|
2147
2239
|
};
|
|
@@ -2385,7 +2477,8 @@ type CreateQueryClientConfigOptions = {
|
|
|
2385
2477
|
* freshness TTL (`cacheAdapter`) this is independent of `cache-control`, so it also applies to
|
|
2386
2478
|
* private/authenticated responses.
|
|
2387
2479
|
*
|
|
2388
|
-
* Set to `0` to destroy entries as soon as their last consumer goes away
|
|
2480
|
+
* Set to `0` to destroy entries as soon as their last consumer goes away, or to `Infinity` to keep
|
|
2481
|
+
* them for the rest of the session. Only entries that
|
|
2389
2482
|
* actually hold a response are retained, and at most 50 unused entries are kept per client
|
|
2390
2483
|
* (least recently orphaned dropped first). Always `0` on the server.
|
|
2391
2484
|
*
|
|
@@ -2465,18 +2558,20 @@ type QueryClient = {
|
|
|
2465
2558
|
* date - after a mutation, or a push message saying something changed server-side - and tells the
|
|
2466
2559
|
* user's other tabs to do the same.
|
|
2467
2560
|
*
|
|
2468
|
-
* Narrow it by `url`,
|
|
2561
|
+
* Narrow it by `url`, `tag`, `filter`, or leave it open to invalidate everything in use. A mutation
|
|
2562
|
+
* creator's `invalidates` option calls this for you after a successful response.
|
|
2469
2563
|
*
|
|
2470
2564
|
* @example
|
|
2471
|
-
* await createPlayer
|
|
2565
|
+
* await executeUntilSettled(createPlayer, { args: { body } });
|
|
2472
2566
|
*
|
|
2473
2567
|
* client.invalidateQueries({ url: '/players' }); // /players, /players/1, /players?page=2
|
|
2568
|
+
* client.invalidateQueries({ tag: 'player:1' }); // every read whose `tags` include it
|
|
2474
2569
|
* client.invalidateQueries(); // everything on screen, here and in the other tabs
|
|
2475
2570
|
*
|
|
2476
2571
|
* Same set as {@link QueryClient.refreshQueriesInUse}: reads with at least one
|
|
2477
2572
|
* consumer, cache bypassed, in-flight requests restarted. Entries sitting out their `keepUnusedFor`
|
|
2478
|
-
* window are
|
|
2479
|
-
*
|
|
2573
|
+
* window are only marked stale - refreshing what nobody is looking at is how an invalidation turns
|
|
2574
|
+
* into a request storm - so the next consumer, or an `allowCache` execution, refetches them.
|
|
2480
2575
|
*
|
|
2481
2576
|
* Reaching the other tabs needs the {@link withMultiTabSync} client feature; without it this is a
|
|
2482
2577
|
* local call, and `otherTabs: false` makes it one deliberately.
|
|
@@ -2691,6 +2786,13 @@ type HttpRequestSubtle<TArgs extends QueryArgs> = {
|
|
|
2691
2786
|
* instead of retrying into an empty room.
|
|
2692
2787
|
*/
|
|
2693
2788
|
abort: () => boolean;
|
|
2789
|
+
/** Ends the freshness window of the response it holds, so the next `allowCache` execution sends the request. */
|
|
2790
|
+
markStale: () => void;
|
|
2791
|
+
/**
|
|
2792
|
+
* Replaces the response every query bound to this request shows, without an event and without touching
|
|
2793
|
+
* its freshness. What `withOptimisticUpdate` writes and rolls back.
|
|
2794
|
+
*/
|
|
2795
|
+
setResponse: (body: ResponseType<TArgs> | null) => void;
|
|
2694
2796
|
};
|
|
2695
2797
|
type HttpRequest<TArgs extends QueryArgs> = {
|
|
2696
2798
|
/** The HTTP method of the request. */
|
|
@@ -2789,7 +2891,7 @@ type QueryArgs = {
|
|
|
2789
2891
|
headers?: QueryHeadersInput;
|
|
2790
2892
|
};
|
|
2791
2893
|
type ResponseType<T extends QueryArgs | null> = T extends QueryArgs ? T['response'] : never;
|
|
2792
|
-
type RawResponseType<T extends QueryArgs | null> = T extends QueryArgs ? T['rawResponse'] extends undefined ? T['response'] : T['rawResponse'] : never;
|
|
2894
|
+
type RawResponseType<T extends QueryArgs | null> = T extends QueryArgs ? 'rawResponse' extends keyof T ? T['rawResponse'] extends undefined ? T['response'] : T['rawResponse'] : T['response'] : never;
|
|
2793
2895
|
type PathParamsType<T extends QueryArgs | null> = T extends QueryArgs ? T['pathParams'] : never;
|
|
2794
2896
|
type QueryParamsType<T extends QueryArgs | null> = T extends QueryArgs ? T['queryParams'] : never;
|
|
2795
2897
|
type BodyType<T extends QueryArgs | null> = T extends QueryArgs ? T['body'] : never;
|
|
@@ -2870,6 +2972,11 @@ type Query<TArgs extends QueryArgs> = QueryBase<TArgs> & {
|
|
|
2870
2972
|
execute: QueryExecute<TArgs>;
|
|
2871
2973
|
/** Creates an immutable snapshot of the current query state */
|
|
2872
2974
|
createSnapshot: () => QuerySnapshot<TArgs>;
|
|
2975
|
+
/**
|
|
2976
|
+
* The full URL (base, path params and query params) of the request the query is bound to. `null`
|
|
2977
|
+
* before the first execution.
|
|
2978
|
+
*/
|
|
2979
|
+
url: ObservableSignal<string | null>;
|
|
2873
2980
|
/** Resets the query state to its initial state */
|
|
2874
2981
|
reset: () => void;
|
|
2875
2982
|
/**
|
|
@@ -3545,6 +3652,11 @@ declare const isSymfonyListError: (error: unknown) => error is FormViolationView
|
|
|
3545
3652
|
declare const QueryRuntimeErrorCode: {
|
|
3546
3653
|
readonly QUERY_FEATURE_USED_MULTIPLE_TIMES: 0;
|
|
3547
3654
|
readonly QUERY_CREATED_IN_REACTIVE_CONTEXT: 1;
|
|
3655
|
+
readonly INVALIDATES_USED_ON_READ: 2;
|
|
3656
|
+
readonly QUERY_CREATED_OUTSIDE_INJECTION_CONTEXT: 3;
|
|
3657
|
+
readonly INVALID_BASE_URL: 10;
|
|
3658
|
+
readonly INVALID_ROUTE: 11;
|
|
3659
|
+
readonly PATH_PARAMS_MISSING_IN_ROUTE_FUNCTION: 12;
|
|
3548
3660
|
readonly WITH_ARGS_QUERY_FEATURE_MISSING_BUT_ROUTE_IS_FUNCTION: 100;
|
|
3549
3661
|
readonly WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD: 101;
|
|
3550
3662
|
readonly WITH_AUTO_REFRESH_USED_ON_UNSUPPORTED_HTTP_METHOD: 102;
|
|
@@ -3552,10 +3664,12 @@ declare const QueryRuntimeErrorCode: {
|
|
|
3552
3664
|
readonly SILENCE_MISSING_WITH_ARGS_FEATURE_ERROR_USED_BUT_WITH_ARGS_PRESENT: 104;
|
|
3553
3665
|
readonly WITH_LONG_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD: 105;
|
|
3554
3666
|
readonly WITH_LONG_POLLING_USED_WITH_POLLING: 106;
|
|
3667
|
+
readonly WITH_OPTIMISTIC_UPDATE_USED_ON_READ: 107;
|
|
3555
3668
|
readonly AUTH_EXTRACT_TOKENS_RESPONSE_NOT_OBJECT: 200;
|
|
3556
3669
|
readonly AUTH_EXTRACT_TOKENS_RESPONSE_MISSING_ACCESS_TOKEN: 201;
|
|
3557
3670
|
readonly AUTH_EXTRACT_TOKENS_RESPONSE_MISSING_REFRESH_TOKEN: 202;
|
|
3558
3671
|
readonly AUTH_PROVIDER_FEATURE_USED_MULTIPLE_TIMES: 203;
|
|
3672
|
+
readonly AUTH_ACCESS_TOKEN_EXPIRY_UNREADABLE: 204;
|
|
3559
3673
|
readonly QUERY_CLIENT_FEATURE_USED_MULTIPLE_TIMES: 250;
|
|
3560
3674
|
readonly UNCACHEABLE_REQUEST_HAS_CACHE_KEY_PARAM: 300;
|
|
3561
3675
|
readonly UNCACHEABLE_REQUEST_HAS_ALLOW_CACHE_PARAM: 301;
|
|
@@ -3581,6 +3695,8 @@ declare const QueryRuntimeErrorCode: {
|
|
|
3581
3695
|
type QueryRuntimeErrorCode = (typeof QueryRuntimeErrorCode)[keyof typeof QueryRuntimeErrorCode];
|
|
3582
3696
|
declare const queryFeatureUsedMultipleTimes: (type: string) => RuntimeError<0>;
|
|
3583
3697
|
declare const queryCreatedInReactiveContext: () => RuntimeError<1>;
|
|
3698
|
+
declare const invalidatesUsedOnRead: (method: string) => RuntimeError<2>;
|
|
3699
|
+
declare const withOptimisticUpdateUsedOnRead: (method: string) => RuntimeError<107>;
|
|
3584
3700
|
declare const withArgsQueryFeatureMissingButRouteIsFunction: () => RuntimeError<100>;
|
|
3585
3701
|
declare const withPollingUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<101>;
|
|
3586
3702
|
declare const withAutoRefreshUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<102>;
|
|
@@ -3592,6 +3708,7 @@ declare const authExtractTokensResponseNotObject: () => RuntimeError<200>;
|
|
|
3592
3708
|
declare const authExtractTokensResponseMissingAccessToken: () => RuntimeError<201>;
|
|
3593
3709
|
declare const authExtractTokensResponseMissingRefreshToken: () => RuntimeError<202>;
|
|
3594
3710
|
declare const authProviderFeatureUsedMultipleTimes: (type: string) => RuntimeError<203>;
|
|
3711
|
+
declare const authAccessTokenExpiryUnreadable: (claim: string) => RuntimeError<204>;
|
|
3595
3712
|
declare const queryClientFeatureUsedMultipleTimes: (type: string) => RuntimeError<250>;
|
|
3596
3713
|
declare const uncacheableRequestHasCacheKeyParam: (key: string) => RuntimeError<300>;
|
|
3597
3714
|
declare const uncacheableRequestHasAllowCacheParam: () => RuntimeError<301>;
|
|
@@ -3606,17 +3723,127 @@ declare const tokensNotAvailableInsideAuthAndExec: () => RuntimeError<700>;
|
|
|
3606
3723
|
declare const invalidStateInsideSecureExecuteFactory: () => RuntimeError<701>;
|
|
3607
3724
|
declare const circularQueryDependency: () => RuntimeError<800>;
|
|
3608
3725
|
declare const queryExecutedAfterDestroyMessage: (route: unknown) => string;
|
|
3726
|
+
declare const queryExecutedWhileParkedMessage: (route: unknown) => string;
|
|
3609
3727
|
declare const legacyPrepareWithoutInjectionContext: (creatorName: string | undefined, method?: "prepare" | "createSubject" | "createSignal") => RuntimeError<950>;
|
|
3610
3728
|
declare const querySequenceAlreadyRunning: () => RuntimeError<900>;
|
|
3611
3729
|
declare const queryBatchAlreadyRunning: () => RuntimeError<910>;
|
|
3612
3730
|
declare const queryBatchWithArgsUsed: () => RuntimeError<911>;
|
|
3613
3731
|
|
|
3732
|
+
/** The fixed members of a query group, keyed by the name the group reports them under. */
|
|
3733
|
+
type QueryGroupMembers = Record<string, AnyNewQuery>;
|
|
3734
|
+
type QueryGroupMemberResponse<TQuery> = TQuery extends Query<infer TArgs> ? ResponseType<TArgs> : never;
|
|
3735
|
+
type QueryGroupKey<TMembers extends QueryGroupMembers> = keyof TMembers & string;
|
|
3736
|
+
/** The member that ran last and its current response, which is `null` until it has one. */
|
|
3737
|
+
type QueryGroupLatest<TMembers extends QueryGroupMembers> = {
|
|
3738
|
+
[TKey in QueryGroupKey<TMembers>]: {
|
|
3739
|
+
key: TKey;
|
|
3740
|
+
response: QueryGroupMemberResponse<TMembers[TKey]> | null;
|
|
3741
|
+
};
|
|
3742
|
+
}[QueryGroupKey<TMembers>];
|
|
3743
|
+
/** A settled, successful execution of one member. */
|
|
3744
|
+
type QueryGroupSuccess<TMembers extends QueryGroupMembers> = {
|
|
3745
|
+
[TKey in QueryGroupKey<TMembers>]: {
|
|
3746
|
+
key: TKey;
|
|
3747
|
+
response: QueryGroupMemberResponse<TMembers[TKey]>;
|
|
3748
|
+
};
|
|
3749
|
+
}[QueryGroupKey<TMembers>];
|
|
3750
|
+
/**
|
|
3751
|
+
* A fixed set of queries of which the one executed last wins - an action set like accept/decline or
|
|
3752
|
+
* create/edit/delete. Built by {@link createQueryGroup}.
|
|
3753
|
+
*/
|
|
3754
|
+
type QueryGroup<TMembers extends QueryGroupMembers> = {
|
|
3755
|
+
/** The members. Executing one through here records it as {@link QueryGroup.latest}; executing the query you passed in does not. */
|
|
3756
|
+
members: TMembers;
|
|
3757
|
+
/** The loading state of a member that is loading, the latest one first. `null` when none is. */
|
|
3758
|
+
loading: Signal<HttpRequestLoadingState | null>;
|
|
3759
|
+
/** The error of the latest member only, so an older member's failure clears once another one runs. */
|
|
3760
|
+
error: Signal<QueryErrorResponse | null>;
|
|
3761
|
+
/** The member executed last, or `null` before the first execution. */
|
|
3762
|
+
latest: Signal<QueryGroupLatest<TMembers> | null>;
|
|
3763
|
+
/** Re-runs the latest member with its last args. Does nothing before the first execution. */
|
|
3764
|
+
execute: (executeArgs?: {
|
|
3765
|
+
options?: RunQueryExecuteOptions;
|
|
3766
|
+
}) => void;
|
|
3767
|
+
/** Emits once for every member execution through the group that succeeds. Completes when the group's injection context is destroyed. */
|
|
3768
|
+
succeeded$: Observable<QueryGroupSuccess<TMembers>>;
|
|
3769
|
+
};
|
|
3770
|
+
type AnyQueryGroup = QueryGroup<QueryGroupMembers>;
|
|
3771
|
+
/**
|
|
3772
|
+
* Groups a fixed set of queries of which the one executed last wins. The group fits `etQueryButton` and
|
|
3773
|
+
* `et-query-error`'s `[query]`, which retries the member that ran last. Call it in an injection context.
|
|
3774
|
+
*
|
|
3775
|
+
* @example
|
|
3776
|
+
* readonly actions = createQueryGroup({
|
|
3777
|
+
* accept: postAcceptInvitation(withArgs(() => ({ pathParams: { id: this.id() } }))),
|
|
3778
|
+
* decline: postDeclineInvitation(withArgs(() => ({ pathParams: { id: this.id() } }))),
|
|
3779
|
+
* });
|
|
3780
|
+
*
|
|
3781
|
+
* accept() {
|
|
3782
|
+
* this.actions.members.accept.execute();
|
|
3783
|
+
* }
|
|
3784
|
+
*/
|
|
3785
|
+
declare const createQueryGroup: <TMembers extends QueryGroupMembers>(members: TMembers) => QueryGroup<TMembers>;
|
|
3786
|
+
|
|
3614
3787
|
/**
|
|
3615
3788
|
* `true` on every request `@ethlete/query` sends through `HttpClient`, so an app interceptor can skip
|
|
3616
3789
|
* query requests: `if (req.context.get(IS_QUERY_REQUEST)) return next(req);`.
|
|
3617
3790
|
*/
|
|
3618
3791
|
declare const IS_QUERY_REQUEST: HttpContextToken<boolean>;
|
|
3619
3792
|
|
|
3793
|
+
/** What {@link WithOptimisticUpdateOptions.update} is handed. */
|
|
3794
|
+
type OptimisticUpdateContext<TArgs extends QueryArgs, TCurrent> = {
|
|
3795
|
+
/** The cached response of the read being updated, as the server sent it (before its `transformResponse`). */
|
|
3796
|
+
current: TCurrent;
|
|
3797
|
+
/** The args the mutation is sent with. */
|
|
3798
|
+
args: RequestArgs<TArgs>;
|
|
3799
|
+
/**
|
|
3800
|
+
* `undefined` before the request. After a successful one, the mutation's response, or `null` for an empty
|
|
3801
|
+
* one (a `204`).
|
|
3802
|
+
*/
|
|
3803
|
+
response?: ResponseType<TArgs> | null;
|
|
3804
|
+
};
|
|
3805
|
+
type OptimisticCurrent<TRead extends QueryArgs> = [TRead] extends [never] ? unknown : RawResponseType<TRead>;
|
|
3806
|
+
/** @see withOptimisticUpdate */
|
|
3807
|
+
type WithOptimisticUpdateOptions<TArgs extends QueryArgs, TRead extends QueryArgs = never> = {
|
|
3808
|
+
/**
|
|
3809
|
+
* The read creator whose entries `target` matches. Only types `current`; the entries are found by `target`
|
|
3810
|
+
* alone, so it must not match entries of another read. Without it, `current` is `unknown`.
|
|
3811
|
+
*/
|
|
3812
|
+
read?: QueryCreator<TRead>;
|
|
3813
|
+
/** The cache entries to update: every read below a URL, or every read that declared a tag. */
|
|
3814
|
+
target: (context: {
|
|
3815
|
+
args: RequestArgs<TArgs>;
|
|
3816
|
+
}) => QueryInvalidationTarget | readonly QueryInvalidationTarget[];
|
|
3817
|
+
/**
|
|
3818
|
+
* Returns the next response of one matched entry, or `null` to leave it alone. Called before the request,
|
|
3819
|
+
* again with `response` after a successful one (`null` there keeps the earlier result), and again whenever
|
|
3820
|
+
* another optimistic update of the same entry rolls back. Must be pure.
|
|
3821
|
+
*/
|
|
3822
|
+
update: (context: OptimisticUpdateContext<TArgs, OptimisticCurrent<TRead>>) => OptimisticCurrent<TRead> | null;
|
|
3823
|
+
};
|
|
3824
|
+
/**
|
|
3825
|
+
* Writes the expected result of a mutation into the cached responses of the reads `target` matches before
|
|
3826
|
+
* the request leaves, and rolls those writes back if it fails or is cancelled. Pair it with the creator's
|
|
3827
|
+
* `invalidates`, whose refetch corrects a wrong guess. The writes stay in this tab; the invalidation reaches
|
|
3828
|
+
* the others.
|
|
3829
|
+
*
|
|
3830
|
+
* A rollback leaves an entry alone that a refetch or another tab wrote in the meantime; other optimistic
|
|
3831
|
+
* updates of the entry still pending are re-applied on top of what it held before.
|
|
3832
|
+
*
|
|
3833
|
+
* @example
|
|
3834
|
+
* patchOpportunityPerson(
|
|
3835
|
+
* withArgs(() => ({ pathParams: { uuid, peopleUuid }, body })),
|
|
3836
|
+
* withOptimisticUpdate({
|
|
3837
|
+
* read: getOpportunity,
|
|
3838
|
+
* target: ({ args }) => ({ tag: `opportunity:${args.pathParams.uuid}` }),
|
|
3839
|
+
* update: ({ current, args }) => ({ ...current, people: toggle(current.people, args.pathParams.peopleUuid) }),
|
|
3840
|
+
* }),
|
|
3841
|
+
* );
|
|
3842
|
+
*
|
|
3843
|
+
* @throws If the query is a read (e.g. a GET request)
|
|
3844
|
+
*/
|
|
3845
|
+
declare const withOptimisticUpdate: <TArgs extends QueryArgs, TRead extends QueryArgs = never>(options: WithOptimisticUpdateOptions<TArgs, TRead>) => QueryFeature<TArgs>;
|
|
3846
|
+
|
|
3620
3847
|
/** The last element of a tuple type - the response of the step a `.then()` callback follows. */
|
|
3621
3848
|
type LastOf<T extends unknown[]> = T extends [...unknown[], infer L] ? L : never;
|
|
3622
3849
|
/** The current lifecycle phase of a query sequence. */
|
|
@@ -3816,7 +4043,7 @@ declare const createQuerySnapshotFn: <TArgs extends QueryArgs>(options: CreateQu
|
|
|
3816
4043
|
*
|
|
3817
4044
|
* Unsubscribing before it settles aborts the execution like `query.abort()`, the way unsubscribing
|
|
3818
4045
|
* from `HttpClient` cancels its request. An execution stopped by `query.abort()` completes the stream
|
|
3819
|
-
* without a value.
|
|
4046
|
+
* without a value, and so does a call a parked query (a `withArgs` source returning `null`) drops.
|
|
3820
4047
|
*
|
|
3821
4048
|
* A cancelled execution settles too - the entry was evicted, unbound by a logout, or the scope that
|
|
3822
4049
|
* owns the query was destroyed. The snapshot then reports the execution as a failure whose error
|
|
@@ -3828,8 +4055,8 @@ declare const executeUntilSettled$: <TArgs extends QueryArgs>(query: Query<TArgs
|
|
|
3828
4055
|
* signal-forms `submit()` action mapping server violations onto the form via
|
|
3829
4056
|
* `mapViolationsToFormErrors`. Executes immediately. Prefer {@link executeUntilSettled$} in RxJS code.
|
|
3830
4057
|
*
|
|
3831
|
-
* An execution stopped by `query.abort()
|
|
3832
|
-
* `null` `executionState()` and `latestHttpEvent()` `{ type: 'cancel' }`.
|
|
4058
|
+
* An execution stopped by `query.abort()`, or dropped by a parked query, resolves with a snapshot that
|
|
4059
|
+
* has no response, no error, a `null` `executionState()` and `latestHttpEvent()` `{ type: 'cancel' }`.
|
|
3833
4060
|
*/
|
|
3834
4061
|
declare const executeUntilSettled: <TArgs extends QueryArgs>(query: Query<TArgs>, executeArgs?: QueryExecuteArgs<TArgs>) => Promise<QuerySnapshot<TArgs>>;
|
|
3835
4062
|
|
|
@@ -4062,6 +4289,7 @@ type SecureExecuteFactoryOptions<TArgs extends QueryArgs> = {
|
|
|
4062
4289
|
authProvider: AnyBearerAuthProvider;
|
|
4063
4290
|
deps: QueryDependencies;
|
|
4064
4291
|
state: QueryState<TArgs>;
|
|
4292
|
+
route?: unknown;
|
|
4065
4293
|
/**
|
|
4066
4294
|
* Whether the query runs itself rather than only on an explicit `execute()` - the same condition
|
|
4067
4295
|
* `maybeExecute` and the `withArgs` feature use. Only those are re-run once a new session starts;
|
|
@@ -4220,6 +4448,9 @@ type TokenRefreshQueryConfig<TArgs extends QueryArgs> = AuthQueryConfig<TArgs> &
|
|
|
4220
4448
|
/**
|
|
4221
4449
|
* HTTP status codes that should trigger a retry.
|
|
4222
4450
|
* Code 0 means network error (no internet).
|
|
4451
|
+
*
|
|
4452
|
+
* Unlike `createDefaultRetryFn`, the default retries a `500`: a refresh that fails for good ends the
|
|
4453
|
+
* session, so waiting out a backend error is cheaper than logging the user out.
|
|
4223
4454
|
* @default [0, 408, 425, 429, 500, 502, 503, 504]
|
|
4224
4455
|
*/
|
|
4225
4456
|
retryableStatusCodes?: number[];
|
|
@@ -4555,7 +4786,9 @@ type TokenExpirationWarningConfig = {
|
|
|
4555
4786
|
};
|
|
4556
4787
|
type TokenExpirationWarningFeature = {
|
|
4557
4788
|
/**
|
|
4558
|
-
*
|
|
4789
|
+
* `true` while the access token is inside `warningThreshold` of its expiry and nothing is going to
|
|
4790
|
+
* renew it: there is no refresh query or refresh token, or the scheduled refresh is overdue by 10 s
|
|
4791
|
+
* (or half the refresh buffer, if that is shorter) - it failed, was throttled, or is still in flight. A routine refresh never turns it on.
|
|
4559
4792
|
*/
|
|
4560
4793
|
isExpiringSoon: Signal<boolean>;
|
|
4561
4794
|
/**
|
|
@@ -4747,7 +4980,8 @@ type BearerAuthExecutionState<TType extends string = string> = BearerAuthExecuti
|
|
|
4747
4980
|
/**
|
|
4748
4981
|
* Whether this tab has a session, and whether it is still finding out.
|
|
4749
4982
|
*
|
|
4750
|
-
* - `unknown` - the provider has not finished its own startup yet.
|
|
4983
|
+
* - `unknown` - the provider has not finished its own startup yet. With multi-tab sync and a cookie to
|
|
4984
|
+
* restore from, a joining tab stays here for up to 250 ms after `inject` returns, while it asks the leader.
|
|
4751
4985
|
* - `restoring` - a session restore is in flight (`withPersistentAuth`'s auto-login).
|
|
4752
4986
|
* - `authenticated` - tokens are applied.
|
|
4753
4987
|
* - `anonymous` - no session, and nothing is trying to get one.
|
|
@@ -4945,7 +5179,9 @@ type CreateBearerAuthProviderConfig<TBuilders extends readonly AnyQueryBuilder[]
|
|
|
4945
5179
|
*/
|
|
4946
5180
|
features?: TFeatures;
|
|
4947
5181
|
/**
|
|
4948
|
-
*
|
|
5182
|
+
* Turns the access token into what `bearerData()` holds. Returning `null` means the token carries no
|
|
5183
|
+
* usable data. The proactive refresh reads the expiry claim off the result, and off the raw JWT
|
|
5184
|
+
* payload when the result has none.
|
|
4949
5185
|
* @default decryptBearer()
|
|
4950
5186
|
*/
|
|
4951
5187
|
bearerDecryptFn?: (token: string) => TBearerData;
|
|
@@ -4985,14 +5221,17 @@ type BearerAuthProvider<TBuilders extends readonly AnyQueryBuilder[], TFeatures
|
|
|
4985
5221
|
*/
|
|
4986
5222
|
isAccessTokenExpired: () => boolean;
|
|
4987
5223
|
/**
|
|
4988
|
-
* The latest
|
|
5224
|
+
* The key and snapshot of the latest auth query run, including the provider's own runs (auto-login,
|
|
5225
|
+
* token refresh). A token revocation does not count. `null` before the first run and after a logout.
|
|
5226
|
+
* To follow one query, prefer `queries.<key>.snapshot()`; for progress, `executionState()`.
|
|
4989
5227
|
*/
|
|
4990
5228
|
latestExecutedQuery: Signal<{
|
|
4991
5229
|
key: ExtractQueryKey<TBuilders[number]>;
|
|
4992
5230
|
snapshot: QuerySnapshot<QueryArgs>;
|
|
4993
5231
|
} | null>;
|
|
4994
5232
|
/**
|
|
4995
|
-
*
|
|
5233
|
+
* Like {@link latestExecutedQuery}, but only for runs the app started: an `execute()` without a
|
|
5234
|
+
* `triggeredBy`. `null` before the first such run and after a logout.
|
|
4996
5235
|
*/
|
|
4997
5236
|
latestNonInternalQuery: Signal<{
|
|
4998
5237
|
key: ExtractQueryKey<TBuilders[number]>;
|
|
@@ -5014,6 +5253,12 @@ type BearerAuthProvider<TBuilders extends readonly AnyQueryBuilder[], TFeatures
|
|
|
5014
5253
|
* Cleared as soon as tokens are applied again.
|
|
5015
5254
|
*/
|
|
5016
5255
|
sessionEndCause: Signal<BearerAuthSessionEndCause | null>;
|
|
5256
|
+
/**
|
|
5257
|
+
* Increments whenever a session starts: tokens arrive while there were none, or a login, seed or
|
|
5258
|
+
* other tab hands over a pair for a different user (another `sub` claim). A token refresh keeps it.
|
|
5259
|
+
* A new user also clears the previous user's secure cache entries.
|
|
5260
|
+
*/
|
|
5261
|
+
sessionId: Signal<number>;
|
|
5017
5262
|
/** {@link sessionStatus}, {@link sessionEndCause} and {@link executionState} as one signal. */
|
|
5018
5263
|
session: Signal<BearerAuthSession<ExtractQueryKey<TBuilders[number]> | 'autoLogin' | 'tokenRefresh' | 'logout' | 'revocation' | 'tokenSeed'>>;
|
|
5019
5264
|
/**
|
|
@@ -5113,6 +5358,8 @@ type BearerAuthProviderQueryContext<TBearerData = unknown, TBuilders extends rea
|
|
|
5113
5358
|
* all, so the provider cannot work it out on its own.
|
|
5114
5359
|
*/
|
|
5115
5360
|
reportAccessTokenExpiry: (isExpired: () => boolean) => void;
|
|
5361
|
+
/** Hands the provider the claim that carries the access token's expiry. `exp` until reported. */
|
|
5362
|
+
reportExpiresInPropertyName: (claim: string) => void;
|
|
5116
5363
|
};
|
|
5117
5364
|
declare const createBearerAuthProvider: <TBuilders extends readonly AnyQueryBuilder[], TFeatures extends readonly ((context: BearerAuthProviderFeatureContext<TBearerData, TBuilders>) => unknown)[], TBearerData = unknown>(config: CreateBearerAuthProviderConfig<TBuilders, TFeatures, TBearerData>) => ProviderDefinition<BearerAuthProvider<TBuilders, TFeatures, TBearerData>>;
|
|
5118
5365
|
type BearerAuthProviderRef<TBuilders extends readonly AnyQueryBuilder[] = readonly AnyQueryBuilder[], TFeatures extends readonly ((context: BearerAuthProviderFeatureContext<TBearerData, TBuilders>) => unknown)[] = readonly ((context: BearerAuthProviderFeatureContext<unknown, readonly AnyQueryBuilder[]>) => unknown)[], TBearerData = unknown> = ProviderDefinition<BearerAuthProvider<TBuilders, TFeatures, TBearerData>>;
|
|
@@ -5547,455 +5794,750 @@ declare const setQueryDevtoolsAuthTabLocal: (options: {
|
|
|
5547
5794
|
}) => void;
|
|
5548
5795
|
|
|
5549
5796
|
/**
|
|
5550
|
-
*
|
|
5551
|
-
*
|
|
5797
|
+
* The kind of object a {@link QueryDevtoolsEntry} describes. Part of the devtools contract consumed
|
|
5798
|
+
* by `<et-query-devtools>` - not a general-purpose query API.
|
|
5552
5799
|
*/
|
|
5553
|
-
type
|
|
5800
|
+
type QueryDevtoolsEntryKind = 'query' | 'query-stack' | 'paged-query-stack' | 'query-sequence' | 'query-batch' | 'auth-provider' | 'ws-client' | 'query-form';
|
|
5554
5801
|
/**
|
|
5555
|
-
*
|
|
5556
|
-
*
|
|
5557
|
-
*
|
|
5802
|
+
* One chunk of a parsed query route: either literal text (`param: null`) or a path param, whose name
|
|
5803
|
+
* is in {@link QueryDevtoolsRoutePart.text}. Lets the devtools tell a route's static parts from its
|
|
5804
|
+
* dynamic ones and fill the latter in with the values a query actually used.
|
|
5558
5805
|
*/
|
|
5559
|
-
type
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5806
|
+
type QueryDevtoolsRoutePart = {
|
|
5807
|
+
text: string;
|
|
5808
|
+
param: string | null;
|
|
5809
|
+
};
|
|
5810
|
+
/**
|
|
5811
|
+
* One of a bearer auth provider's queries, described without instantiating it - which is what lets
|
|
5812
|
+
* tooling build the token-refresh request of a provider whose refresh query has not run yet.
|
|
5813
|
+
*/
|
|
5814
|
+
type QueryDevtoolsAuthQuery = {
|
|
5815
|
+
key: string;
|
|
5816
|
+
/** `token-refresh` for the query registered via `withRefreshQuery`, `auth` for the rest. */
|
|
5817
|
+
kind: 'auth' | 'token-refresh';
|
|
5818
|
+
method: string;
|
|
5819
|
+
/** Stringified route with path params rendered as `:name`. */
|
|
5820
|
+
route: string;
|
|
5821
|
+
/** The args a token refresh sends for a given refresh token. Only set on the refresh query. */
|
|
5822
|
+
buildArgs?: (refreshToken: string) => {
|
|
5823
|
+
body?: unknown;
|
|
5824
|
+
};
|
|
5825
|
+
};
|
|
5826
|
+
/**
|
|
5827
|
+
* Descriptive, mostly-static metadata about a registered devtools entry. The live, reactive state
|
|
5828
|
+
* is read from the entry's {@link QueryDevtoolsEntry.handle} instead.
|
|
5829
|
+
*/
|
|
5830
|
+
type QueryDevtoolsEntryMeta = {
|
|
5831
|
+
/** Display name of the owning query client, where known. */
|
|
5832
|
+
clientName?: string;
|
|
5833
|
+
/** Base URL of the owning query client, where known. */
|
|
5834
|
+
clientBaseUrl?: string;
|
|
5835
|
+
/** Human readable display name (e.g. an auth provider or web socket client name). */
|
|
5836
|
+
name?: string;
|
|
5837
|
+
/** The connection URL, for web socket clients. */
|
|
5838
|
+
url?: string;
|
|
5839
|
+
/** The GraphQL document string, for GraphQL queries. */
|
|
5840
|
+
gqlQuery?: string;
|
|
5841
|
+
/** Stringified route with path params rendered as `:name`, for queries. */
|
|
5842
|
+
route?: string;
|
|
5843
|
+
/** The same route, split into its literal and path-param parts. */
|
|
5844
|
+
routeParts?: QueryDevtoolsRoutePart[];
|
|
5845
|
+
/** Human readable HTTP/GQL method, for queries (e.g. `GET`, `GQL QUERY`). */
|
|
5846
|
+
method?: string;
|
|
5847
|
+
/** The features applied at creation, with the options each was configured with. */
|
|
5848
|
+
features?: QueryDevtoolsFeature[];
|
|
5849
|
+
/** Whether the query authenticates through a bearer auth provider, for queries. */
|
|
5850
|
+
isSecure?: boolean;
|
|
5851
|
+
/** Name of the bearer auth provider a secure query authenticates with. */
|
|
5852
|
+
authProviderName?: string;
|
|
5853
|
+
/** The provider's own queries, for auth providers. */
|
|
5854
|
+
authQueries?: QueryDevtoolsAuthQuery[];
|
|
5564
5855
|
/**
|
|
5565
|
-
*
|
|
5566
|
-
*
|
|
5856
|
+
* The batch that created a query, for the one query `createQueryBatch` runs per item. The panel folds
|
|
5857
|
+
* such queries under their batch's own entry instead of listing a row per item, and the registry caps
|
|
5858
|
+
* their tombstones per batch so a bulk run cannot evict everything else it kept.
|
|
5567
5859
|
*/
|
|
5568
|
-
|
|
5569
|
-
/**
|
|
5570
|
-
|
|
5860
|
+
batch?: QueryBatchDevtoolsHandle;
|
|
5861
|
+
/** Which of the batch's items the query was created for, for a batch's item query. */
|
|
5862
|
+
batchItemIndex?: number;
|
|
5863
|
+
/** How many of a batch's requests may be in flight at once, for batches. */
|
|
5864
|
+
concurrency?: number;
|
|
5865
|
+
/** Whether a batch's first failure stops the rest of the run, for batches. */
|
|
5866
|
+
stopOnError?: boolean;
|
|
5867
|
+
/** The query config passed at creation, for queries. */
|
|
5868
|
+
queryConfig?: QueryConfig;
|
|
5869
|
+
/** The creator options passed at creation, for queries. */
|
|
5870
|
+
creator?: CreateQueryCreatorOptions;
|
|
5871
|
+
/** The owning client's repository, where known (queries and auth providers). */
|
|
5872
|
+
repository?: QueryRepository;
|
|
5571
5873
|
/**
|
|
5572
|
-
*
|
|
5573
|
-
*
|
|
5574
|
-
* someone makes rather than the way the panel ships.
|
|
5874
|
+
* The owning client itself, where known (queries and auth providers). Read for state that hangs off
|
|
5875
|
+
* the client rather than the repository - the multi-tab sync engine, in particular.
|
|
5575
5876
|
*/
|
|
5576
|
-
|
|
5577
|
-
/** The faults armed per client, for the same reason and with the same default. */
|
|
5578
|
-
armedFaults: QueryDevtoolsStorageScope;
|
|
5877
|
+
client?: QueryClient;
|
|
5579
5878
|
/**
|
|
5580
|
-
* The
|
|
5581
|
-
*
|
|
5582
|
-
* `none` for a machine where nothing of the sort may be kept. Outside a development build `local` is
|
|
5583
|
-
* refused and read back as `session`, see {@link queryDevtoolsAllowsLocalAuthSessions}.
|
|
5879
|
+
* The DOM element of the component/directive that created a query, when available. Used by the
|
|
5880
|
+
* devtools "inspect" tool to map a query back to its place in the live UI.
|
|
5584
5881
|
*/
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5882
|
+
element?: HTMLElement | null;
|
|
5883
|
+
};
|
|
5884
|
+
/**
|
|
5885
|
+
* A single entry in the {@link queryDevtoolsEntries} registry. The `handle` is the live object
|
|
5886
|
+
* (query, stack, sequence or auth provider) so its signals stay reactive when read by the UI.
|
|
5887
|
+
*/
|
|
5888
|
+
type QueryDevtoolsEntry = {
|
|
5889
|
+
id: string;
|
|
5890
|
+
kind: QueryDevtoolsEntryKind;
|
|
5891
|
+
meta: QueryDevtoolsEntryMeta;
|
|
5892
|
+
handle: unknown;
|
|
5893
|
+
createdAt: number;
|
|
5590
5894
|
/**
|
|
5591
|
-
*
|
|
5592
|
-
*
|
|
5895
|
+
* When the query behind this entry was destroyed, or `null`/absent while it is still live. A
|
|
5896
|
+
* destroyed entry is kept as a tombstone - a frozen snapshot of what the query last held - so a
|
|
5897
|
+
* request that failed on the way out (a `401` that redirects to login and takes its component with
|
|
5898
|
+
* it) is still readable by the time the panel is opened. Its `handle` answers with constants and
|
|
5899
|
+
* every action on it is inert.
|
|
5593
5900
|
*/
|
|
5594
|
-
|
|
5901
|
+
destroyedAt?: number | null;
|
|
5595
5902
|
/**
|
|
5596
|
-
*
|
|
5597
|
-
*
|
|
5598
|
-
* router, an open form - is still showing the last one until it boots again.
|
|
5903
|
+
* What the entry has done since it was created - executions, requests, payload sizes. Present for
|
|
5904
|
+
* queries; stacks, sequences and auth providers aggregate the stats of the queries they own instead.
|
|
5599
5905
|
*/
|
|
5600
|
-
|
|
5906
|
+
stats?: QueryDevtoolsStatsHandle;
|
|
5907
|
+
/** The query forms this entry's args read, for queries created with a `withArgs` feature. */
|
|
5908
|
+
formLinks?: QueryDevtoolsFormLinksHandle;
|
|
5909
|
+
/**
|
|
5910
|
+
* The response overrides armed on this entry, for queries. Unlike {@link stats}/{@link formLinks} -
|
|
5911
|
+
* whose write side is internal instrumentation the panel only ever reads - the panel itself is what
|
|
5912
|
+
* arms an override, so this exposes the full recorder rather than a read-only handle.
|
|
5913
|
+
*/
|
|
5914
|
+
overrides?: QueryDevtoolsOverridesRecorder;
|
|
5601
5915
|
};
|
|
5602
5916
|
/**
|
|
5603
|
-
*
|
|
5604
|
-
*
|
|
5605
|
-
*
|
|
5606
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5607
|
-
*/
|
|
5608
|
-
declare const queryDevtoolsSettings: Signal<QueryDevtoolsSettings>;
|
|
5609
|
-
/**
|
|
5610
|
-
* The `Storage` a scope names, or `null` for `none` and for a browser that refuses one (private mode,
|
|
5611
|
-
* storage disabled, server-side rendering). Callers treat "no storage" and "not persisted" alike.
|
|
5612
|
-
*
|
|
5613
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5614
|
-
*/
|
|
5615
|
-
declare const queryDevtoolsStorage: (scope: QueryDevtoolsStorageScope) => Storage | null;
|
|
5616
|
-
/**
|
|
5617
|
-
* Reads one JSON-encoded devtools key from the store a scope names, or `null`.
|
|
5618
|
-
*
|
|
5619
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5620
|
-
*/
|
|
5621
|
-
declare const readQueryDevtoolsStore: <T>(scope: QueryDevtoolsStorageScope, key: string) => T | null;
|
|
5622
|
-
/**
|
|
5623
|
-
* Writes one devtools key into the store a scope names. A scope of `none` writes nothing.
|
|
5624
|
-
*
|
|
5625
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5917
|
+
* What an instrumentation site hands to the registry. Raw values (`route`, `clientRef`) are rendered
|
|
5918
|
+
* into {@link QueryDevtoolsEntryMeta} by the registry rather than at the call site, so the code that
|
|
5919
|
+
* renders them is only reachable from {@link provideQueryDevtools}.
|
|
5626
5920
|
*/
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5921
|
+
type QueryDevtoolsRegistration = {
|
|
5922
|
+
id?: string;
|
|
5923
|
+
kind: QueryDevtoolsEntryKind;
|
|
5924
|
+
handle: unknown;
|
|
5925
|
+
meta: QueryDevtoolsEntryMeta;
|
|
5926
|
+
/** The creator's route, stringified by the registry. */
|
|
5927
|
+
route?: unknown;
|
|
5928
|
+
/** The owning client, whose display name is derived by the registry. */
|
|
5929
|
+
clientRef?: AnyCreateQueryClientResult;
|
|
5930
|
+
/**
|
|
5931
|
+
* The bearer auth provider a secure query authenticates with, whose display name is derived by the
|
|
5932
|
+
* registry. Typed structurally so the registry does not have to import the auth layer it registers.
|
|
5933
|
+
*/
|
|
5934
|
+
authProviderRef?: {
|
|
5935
|
+
token?: unknown;
|
|
5936
|
+
};
|
|
5937
|
+
/** The auth provider's queries, whose routes are stringified by the registry. */
|
|
5938
|
+
authQueries?: (Omit<QueryDevtoolsAuthQuery, 'route'> & {
|
|
5939
|
+
route?: unknown;
|
|
5940
|
+
})[];
|
|
5941
|
+
/** @see QueryDevtoolsEntry.stats */
|
|
5942
|
+
stats?: QueryDevtoolsStatsHandle;
|
|
5943
|
+
/** @see QueryDevtoolsEntry.formLinks */
|
|
5944
|
+
formLinks?: QueryDevtoolsFormLinksHandle;
|
|
5945
|
+
/** @see QueryDevtoolsEntry.overrides */
|
|
5946
|
+
overrides?: QueryDevtoolsOverridesRecorder;
|
|
5947
|
+
};
|
|
5948
|
+
/** The registry {@link provideQueryDevtools} installs. */
|
|
5949
|
+
type QueryDevtoolsRegistrar = (entry: QueryDevtoolsRegistration) => () => void;
|
|
5635
5950
|
/**
|
|
5636
|
-
* Whether
|
|
5637
|
-
*
|
|
5638
|
-
*
|
|
5639
|
-
* whoever opened it. Outside a development build a stored or default `local` reads back as `none`, so a
|
|
5640
|
-
* plain login keeps nothing; `session` stays on offer for whoever picks it in Settings.
|
|
5951
|
+
* Whether `provideQueryDevtools()` has been called on this page. When `false` every instrumentation
|
|
5952
|
+
* site is a no-op, which is what a devtools UI gates itself on so a build that omits the provider
|
|
5953
|
+
* renders nothing.
|
|
5641
5954
|
*
|
|
5642
|
-
*
|
|
5955
|
+
* It is answered by the `provideQueryDevtools()` call itself, which runs while the providers array is
|
|
5956
|
+
* built - so it is already settled by the time an application bootstraps and needs no signal.
|
|
5643
5957
|
*/
|
|
5644
|
-
declare const
|
|
5958
|
+
declare const isQueryDevtoolsEnabled: () => boolean;
|
|
5959
|
+
/** The request an upcoming attempt belongs to, for the fault resolver to match against. */
|
|
5960
|
+
type QueryDevtoolsFaultTarget = {
|
|
5961
|
+
/** Display name of the owning query client. Faults are armed per client. */
|
|
5962
|
+
clientName: string;
|
|
5963
|
+
method: string;
|
|
5964
|
+
url: string;
|
|
5965
|
+
};
|
|
5966
|
+
/** What the devtools want done with one upcoming attempt. */
|
|
5967
|
+
type QueryDevtoolsResolvedFault = {
|
|
5968
|
+
/** Extra latency in ms to wait out before the attempt starts. */
|
|
5969
|
+
latencyMs: number;
|
|
5970
|
+
/** The status to fail the attempt with instead of sending it, or `null` to let it through. */
|
|
5971
|
+
status: number | null;
|
|
5972
|
+
};
|
|
5973
|
+
/** What a mock resolver matches against - what a fault resolver sees, plus the client's base URL. */
|
|
5974
|
+
type QueryDevtoolsMockTarget = QueryDevtoolsFaultTarget & {
|
|
5975
|
+
/** Base URL of the owning query client; the pattern is matched against the path after it. */
|
|
5976
|
+
baseUrl: string;
|
|
5977
|
+
};
|
|
5978
|
+
/** The response the devtools want served instead of one upcoming attempt. */
|
|
5979
|
+
type QueryDevtoolsResolvedMock = {
|
|
5980
|
+
/** The status to respond with. `400` and above are delivered as an `HttpErrorResponse`. */
|
|
5981
|
+
status: number;
|
|
5982
|
+
body: unknown;
|
|
5983
|
+
/** How long to wait before the mocked response settles. */
|
|
5984
|
+
latencyMs: number;
|
|
5985
|
+
};
|
|
5645
5986
|
/**
|
|
5646
|
-
*
|
|
5647
|
-
*
|
|
5987
|
+
* What the devtools' session vault needs of a bearer auth provider. Typed structurally, so the auth
|
|
5988
|
+
* layer stays the only thing that knows how a provider is built.
|
|
5989
|
+
*/
|
|
5990
|
+
type QueryDevtoolsAuthProviderHandle = {
|
|
5991
|
+
accessToken: Signal<string | null>;
|
|
5992
|
+
refreshToken: Signal<string | null>;
|
|
5993
|
+
setTokens: (access: string, refresh: string) => void;
|
|
5994
|
+
logout: () => void;
|
|
5995
|
+
/**
|
|
5996
|
+
* Why the live session last ended, as `BearerAuthProvider.sessionEndCause` reports it. Typed as a
|
|
5997
|
+
* string so this contract stays clear of the auth module, which imports this file.
|
|
5998
|
+
*/
|
|
5999
|
+
sessionEndCause: Signal<string | null>;
|
|
6000
|
+
/**
|
|
6001
|
+
* The provider's auth queries, which is how the panel logs in as a declared account.
|
|
6002
|
+
*
|
|
6003
|
+
* Untyped for the reason `AnyBearerAuthProvider.queries` is: with unknown builders the registry
|
|
6004
|
+
* degrades to an index signature, and no structural contract survives it.
|
|
6005
|
+
*/
|
|
6006
|
+
queries: any;
|
|
6007
|
+
};
|
|
6008
|
+
/** One bearer auth provider, as the devtools' session vault takes it. */
|
|
6009
|
+
type QueryDevtoolsAuthProviderRegistration = {
|
|
6010
|
+
/** The provider's own name, which every session is stored under. */
|
|
6011
|
+
name: string;
|
|
6012
|
+
handle: QueryDevtoolsAuthProviderHandle;
|
|
6013
|
+
client: QueryClient;
|
|
6014
|
+
/**
|
|
6015
|
+
* Whether this tab's session is its own rather than the one its siblings share. Written by the
|
|
6016
|
+
* devtools, read by `withBearerAuthMultiTabSync` and `withPersistentAuth`.
|
|
6017
|
+
*/
|
|
6018
|
+
isTabLocalSession: WritableSignal<boolean>;
|
|
6019
|
+
/** The provider's injector, which the vault keeps its token-tracking effect on. */
|
|
6020
|
+
injector: Injector;
|
|
6021
|
+
};
|
|
6022
|
+
/** The tokens one tab was seeded with, which is a session that belongs to this tab alone. */
|
|
6023
|
+
type QueryDevtoolsAuthSeed = {
|
|
6024
|
+
accessToken: string;
|
|
6025
|
+
refreshToken: string;
|
|
6026
|
+
};
|
|
6027
|
+
|
|
6028
|
+
/**
|
|
6029
|
+
* How an application hands its API description to the devtools, so a designed mock can start from the
|
|
6030
|
+
* real shape of a response instead of a guess. TypeScript types are erased at runtime, so a generated
|
|
6031
|
+
* `.d.ts` is not readable from here - the document the types were generated *from* is.
|
|
5648
6032
|
*
|
|
5649
|
-
*
|
|
5650
|
-
* `
|
|
6033
|
+
* OpenAPI 3.x, Swagger 2 and a bare JSON Schema document all work: named schemas are read from
|
|
6034
|
+
* `components.schemas`, `definitions` or `$defs`, and routes from `paths`.
|
|
5651
6035
|
*
|
|
5652
|
-
*
|
|
6036
|
+
* The loader is called at most once, and only when the panel first asks for it - so returning a dynamic
|
|
6037
|
+
* `import()` keeps the document out of the application bundle entirely.
|
|
6038
|
+
*
|
|
6039
|
+
* @example
|
|
6040
|
+
* ```ts
|
|
6041
|
+
* provideQueryDevtools({ schema: () => import('../openapi.json') })
|
|
6042
|
+
* provideQueryDevtools({ schema: () => fetch('/openapi.json').then((res) => res.json()) })
|
|
6043
|
+
* ```
|
|
5653
6044
|
*/
|
|
5654
|
-
|
|
5655
|
-
|
|
6045
|
+
type QueryDevtoolsSchemaLoader = () => Promise<unknown> | unknown;
|
|
5656
6046
|
/**
|
|
5657
|
-
*
|
|
5658
|
-
*
|
|
5659
|
-
*
|
|
6047
|
+
* The description each query client is served by. One loader describes every client - which is what a
|
|
6048
|
+
* single-API application wants - and a record keyed by client name (the `name` a client was created
|
|
6049
|
+
* with) describes them one API at a time, so a mock designed against one client never offers another
|
|
6050
|
+
* one's routes.
|
|
6051
|
+
*
|
|
6052
|
+
* @example
|
|
6053
|
+
* ```ts
|
|
6054
|
+
* provideQueryDevtools({
|
|
6055
|
+
* schema: {
|
|
6056
|
+
* hubApiClient: () => import('../hub-openapi.json'),
|
|
6057
|
+
* votingApiClient: () => fetch('/voting/openapi.json').then((res) => res.json()),
|
|
6058
|
+
* },
|
|
6059
|
+
* })
|
|
6060
|
+
* ```
|
|
5660
6061
|
*/
|
|
5661
|
-
type
|
|
5662
|
-
/** Extra latency in ms added before every attempt starts. `0` disables it. */
|
|
5663
|
-
latencyMs: number;
|
|
5664
|
-
/**
|
|
5665
|
-
* How many upcoming attempts fail before the client is let through again, counted down as they are
|
|
5666
|
-
* consumed. `0` disables it.
|
|
5667
|
-
*/
|
|
5668
|
-
failNext: number;
|
|
5669
|
-
/** The percentage of attempts that fail, rolled per attempt. `0` disables it, `100` fails everything. */
|
|
5670
|
-
failRate: number;
|
|
5671
|
-
/** The status an injected failure responds with. */
|
|
5672
|
-
status: number;
|
|
5673
|
-
};
|
|
5674
|
-
/** The neutral fault: nothing armed. */
|
|
5675
|
-
declare const EMPTY_QUERY_DEVTOOLS_FAULT: QueryDevtoolsFault;
|
|
6062
|
+
type QueryDevtoolsSchemaLoaders = QueryDevtoolsSchemaLoader | Record<string, QueryDevtoolsSchemaLoader>;
|
|
5676
6063
|
/**
|
|
5677
|
-
*
|
|
5678
|
-
*
|
|
5679
|
-
* @see runDefaultQueryRetry
|
|
6064
|
+
* Where the API description stands. `unavailable` means the application never handed one in, which is
|
|
6065
|
+
* what the panel shows the seeding controls on.
|
|
5680
6066
|
*/
|
|
5681
|
-
|
|
5682
|
-
status:
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
}
|
|
6067
|
+
type QueryDevtoolsSchemaState = {
|
|
6068
|
+
status: 'unavailable';
|
|
6069
|
+
} | {
|
|
6070
|
+
status: 'idle';
|
|
6071
|
+
} | {
|
|
6072
|
+
status: 'loading';
|
|
6073
|
+
} | {
|
|
6074
|
+
status: 'ready';
|
|
6075
|
+
} | {
|
|
6076
|
+
status: 'error';
|
|
6077
|
+
message: string;
|
|
6078
|
+
};
|
|
6079
|
+
/** One route the description declares, whether or not the application has ever called it. */
|
|
6080
|
+
type QueryDevtoolsSchemaRoute = {
|
|
6081
|
+
method: string;
|
|
6082
|
+
/** The route with its path params as `:name`, so it reads the way a mock's pattern does. */
|
|
6083
|
+
pattern: string;
|
|
6084
|
+
/** The operation's summary, its `operationId`, or empty - whatever the document offers as a label. */
|
|
6085
|
+
summary: string;
|
|
6086
|
+
};
|
|
5686
6087
|
/**
|
|
5687
|
-
*
|
|
5688
|
-
*
|
|
6088
|
+
* A body generated from the description, plus everything that could not be read off it with certainty.
|
|
6089
|
+
* A seed is a starting point for the designer, never a claim about what the API returns.
|
|
5689
6090
|
*/
|
|
5690
|
-
|
|
6091
|
+
type QueryDevtoolsSchemaSeed = {
|
|
6092
|
+
body: unknown;
|
|
6093
|
+
/** The named schema the body was generated from, when the document named one. */
|
|
6094
|
+
schemaName: string | null;
|
|
6095
|
+
/**
|
|
6096
|
+
* The declared type of each field, keyed by its path with array indices as `*` (`items.*.id`) - so one
|
|
6097
|
+
* entry annotates every element of an array, however many the designer goes on to add.
|
|
6098
|
+
*/
|
|
6099
|
+
types: ReadonlyMap<string, string>;
|
|
6100
|
+
/** What had to be guessed, skipped or cut short, so a seeded body is never mistaken for the contract. */
|
|
6101
|
+
notes: readonly string[];
|
|
6102
|
+
};
|
|
5691
6103
|
/**
|
|
5692
|
-
*
|
|
5693
|
-
*
|
|
5694
|
-
*
|
|
6104
|
+
* How lifelike a seeded body is. `placeholder` names every field after itself, so a seed reads as
|
|
6105
|
+
* obviously unreal; `realistic` fills it with varied sample values, so a list is not three identical
|
|
6106
|
+
* rows; `stress` fills it with what a layout breaks on - long unbreakable words, unicode, huge numbers.
|
|
5695
6107
|
*/
|
|
5696
|
-
|
|
6108
|
+
type QueryDevtoolsSeedStyle = 'placeholder' | 'realistic' | 'stress';
|
|
5697
6109
|
/**
|
|
5698
|
-
* Where the
|
|
5699
|
-
*
|
|
6110
|
+
* Where the description of one query client's API stands, for the panel's seeding controls.
|
|
6111
|
+
*
|
|
6112
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5700
6113
|
*/
|
|
5701
|
-
declare const
|
|
5702
|
-
/** Whether anything at all is armed on a fault. */
|
|
5703
|
-
declare const isQueryDevtoolsFaultArmed: (fault: QueryDevtoolsFault) => boolean;
|
|
6114
|
+
declare const queryDevtoolsSchemaState: (clientName: string) => QueryDevtoolsSchemaState;
|
|
5704
6115
|
/**
|
|
5705
|
-
*
|
|
5706
|
-
*
|
|
6116
|
+
* Loads the API description, once. Calling it while it is loading or after it has loaded does nothing;
|
|
6117
|
+
* calling it after a failure retries.
|
|
5707
6118
|
*
|
|
5708
|
-
* Part of the devtools contract
|
|
5709
|
-
* something an application should arm on itself.
|
|
6119
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5710
6120
|
*/
|
|
5711
|
-
declare const
|
|
5712
|
-
clientName: string;
|
|
5713
|
-
patch: Partial<QueryDevtoolsFault>;
|
|
5714
|
-
}) => void;
|
|
6121
|
+
declare const loadQueryDevtoolsSchema: (clientName: string) => void;
|
|
5715
6122
|
/**
|
|
5716
|
-
*
|
|
6123
|
+
* Every schema one client's description names, sorted - the designer's "seed from a type" list.
|
|
5717
6124
|
*
|
|
5718
|
-
*
|
|
6125
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5719
6126
|
*/
|
|
5720
|
-
declare const
|
|
5721
|
-
|
|
6127
|
+
declare const queryDevtoolsSchemaNames: (clientName: string) => readonly string[];
|
|
5722
6128
|
/**
|
|
5723
|
-
*
|
|
5724
|
-
*
|
|
6129
|
+
* Generates a body from one schema the client's description names (`MatchView`), or `null` when it names
|
|
6130
|
+
* no such thing. The style decides how lifelike its values are; the shape is the same either way.
|
|
6131
|
+
*
|
|
6132
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5725
6133
|
*/
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
isDefault: boolean;
|
|
5737
|
-
/** What the field writes to the URL, or `undefined` when it writes nothing. */
|
|
5738
|
-
queryParam: unknown;
|
|
5739
|
-
/** How long a change waits before it is committed, or `null` when it commits immediately. */
|
|
5740
|
-
debounceMs: number | null;
|
|
5741
|
-
/** The sibling fields whose change resets this one back to its default. */
|
|
5742
|
-
isResetBy: readonly string[];
|
|
5743
|
-
/** Whether the field counts towards {@link QueryDevtoolsFormHandle.activeFilterCount}. */
|
|
5744
|
-
countsAsFilter: boolean;
|
|
6134
|
+
declare const seedQueryDevtoolsSchemaBody: (clientName: string, name: string, style?: QueryDevtoolsSeedStyle) => QueryDevtoolsSchemaSeed | null;
|
|
6135
|
+
/** Everything a set of named schemas needs to resolve on its own, lifted out of the description. */
|
|
6136
|
+
type QueryDevtoolsSchemaComponents = {
|
|
6137
|
+
/**
|
|
6138
|
+
* The named schemas plus everything they transitively `$ref`, keyed as `components.schemas` wants
|
|
6139
|
+
* them. A name the description does not declare is simply absent, which is what a caller checks.
|
|
6140
|
+
*/
|
|
6141
|
+
schemas: Record<string, unknown>;
|
|
6142
|
+
/** Refs that could not be brought along, so an exported document says why it does not resolve. */
|
|
6143
|
+
notes: readonly string[];
|
|
5745
6144
|
};
|
|
5746
6145
|
/**
|
|
5747
|
-
*
|
|
5748
|
-
*
|
|
6146
|
+
* Collects the named schemas a set of routes was designed against, ready to be handed back as the
|
|
6147
|
+
* `components.schemas` of an exported document - so a route seeded from `MatchView` can reference
|
|
6148
|
+
* `MatchView` instead of an anonymous shape inferred from one body.
|
|
6149
|
+
*
|
|
6150
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5749
6151
|
*/
|
|
5750
|
-
|
|
5751
|
-
fields: Signal<QueryDevtoolsFormField[]>;
|
|
5752
|
-
/** The committed value of the whole form. */
|
|
5753
|
-
value: Signal<Record<string, unknown>>;
|
|
5754
|
-
/** The value of every field before the most recent commit, or `null` before the first one. */
|
|
5755
|
-
previousValue: Signal<Record<string, unknown> | null>;
|
|
5756
|
-
defaultValue: Record<string, unknown>;
|
|
5757
|
-
/** @see QueryFormSignals.activeFilterCount */
|
|
5758
|
-
activeFilterCount: Signal<number>;
|
|
5759
|
-
/** Whether every field sits at its default. */
|
|
5760
|
-
isAtDefaults: Signal<boolean>;
|
|
5761
|
-
/** Whether a change is waiting out its debounce, so the committed value is one edit behind. */
|
|
5762
|
-
isCommitPending: Signal<boolean>;
|
|
5763
|
-
/** Whether the form is syncing with the URL, i.e. whether `observe()` has been called. */
|
|
5764
|
-
isObserving: Signal<boolean>;
|
|
5765
|
-
resetField: (key: string) => void;
|
|
5766
|
-
resetAll: () => void;
|
|
5767
|
-
};
|
|
5768
|
-
|
|
6152
|
+
declare const collectQueryDevtoolsSchemaComponents: (clientName: string, names: readonly string[]) => QueryDevtoolsSchemaComponents;
|
|
5769
6153
|
/**
|
|
5770
|
-
*
|
|
5771
|
-
*
|
|
6154
|
+
* Every route one client's description declares, as the designer offers them - including the ones no
|
|
6155
|
+
* query has ever called, which is the case a mock exists for.
|
|
6156
|
+
*
|
|
6157
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5772
6158
|
*/
|
|
5773
|
-
|
|
6159
|
+
declare const queryDevtoolsSchemaRoutes: (clientName: string) => readonly QueryDevtoolsSchemaRoute[];
|
|
5774
6160
|
/**
|
|
5775
|
-
*
|
|
5776
|
-
*
|
|
5777
|
-
*
|
|
6161
|
+
* Generates a body for one route from the description's own success response - the seed that makes a
|
|
6162
|
+
* designed mock a real view model rather than a guess. `null` when the document does not declare the
|
|
6163
|
+
* route, or declares no JSON response for it.
|
|
6164
|
+
*
|
|
6165
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
5778
6166
|
*/
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
6167
|
+
declare const seedQueryDevtoolsSchemaRoute: (target: {
|
|
6168
|
+
clientName: string;
|
|
6169
|
+
method: string;
|
|
6170
|
+
pattern: string;
|
|
6171
|
+
}, style?: QueryDevtoolsSeedStyle) => QueryDevtoolsSchemaSeed | null;
|
|
6172
|
+
|
|
5783
6173
|
/**
|
|
5784
|
-
*
|
|
5785
|
-
* tooling build the token-refresh request of a provider whose refresh query has not run yet.
|
|
6174
|
+
* The reactive list of every registered devtools entry, consumed by the `<et-query-devtools>` UI.
|
|
5786
6175
|
*/
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
kind: 'auth' | 'token-refresh';
|
|
5791
|
-
method: string;
|
|
5792
|
-
/** Stringified route with path params rendered as `:name`. */
|
|
5793
|
-
route: string;
|
|
5794
|
-
/** The args a token refresh sends for a given refresh token. Only set on the refresh query. */
|
|
5795
|
-
buildArgs?: (refreshToken: string) => {
|
|
5796
|
-
body?: unknown;
|
|
5797
|
-
};
|
|
5798
|
-
};
|
|
6176
|
+
declare const queryDevtoolsEntries: Signal<QueryDevtoolsEntry[]>;
|
|
6177
|
+
/** Renders parsed route parts as a template, e.g. `/team/:teamId/players`. */
|
|
6178
|
+
declare const stringifyQueryRouteParts: (parts: QueryDevtoolsRoutePart[]) => string;
|
|
5799
6179
|
/**
|
|
5800
|
-
*
|
|
5801
|
-
*
|
|
6180
|
+
* Forgets destroyed entries the registry is holding - the panel's "clear gone" action. Pass the ids to
|
|
6181
|
+
* drop to forget only those; with no argument every tombstone goes. Live entries are untouched.
|
|
5802
6182
|
*/
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
clientName?: string;
|
|
5806
|
-
/** Base URL of the owning query client, where known. */
|
|
5807
|
-
clientBaseUrl?: string;
|
|
5808
|
-
/** Human readable display name (e.g. an auth provider or web socket client name). */
|
|
5809
|
-
name?: string;
|
|
5810
|
-
/** The connection URL, for web socket clients. */
|
|
5811
|
-
url?: string;
|
|
5812
|
-
/** The GraphQL document string, for GraphQL queries. */
|
|
5813
|
-
gqlQuery?: string;
|
|
5814
|
-
/** Stringified route with path params rendered as `:name`, for queries. */
|
|
5815
|
-
route?: string;
|
|
5816
|
-
/** The same route, split into its literal and path-param parts. */
|
|
5817
|
-
routeParts?: QueryDevtoolsRoutePart[];
|
|
5818
|
-
/** Human readable HTTP/GQL method, for queries (e.g. `GET`, `GQL QUERY`). */
|
|
5819
|
-
method?: string;
|
|
5820
|
-
/** The features applied at creation, with the options each was configured with. */
|
|
5821
|
-
features?: QueryDevtoolsFeature[];
|
|
5822
|
-
/** Whether the query authenticates through a bearer auth provider, for queries. */
|
|
5823
|
-
isSecure?: boolean;
|
|
5824
|
-
/** Name of the bearer auth provider a secure query authenticates with. */
|
|
5825
|
-
authProviderName?: string;
|
|
5826
|
-
/** The provider's own queries, for auth providers. */
|
|
5827
|
-
authQueries?: QueryDevtoolsAuthQuery[];
|
|
5828
|
-
/**
|
|
5829
|
-
* The batch that created a query, for the one query `createQueryBatch` runs per item. The panel folds
|
|
5830
|
-
* such queries under their batch's own entry instead of listing a row per item, and the registry caps
|
|
5831
|
-
* their tombstones per batch so a bulk run cannot evict everything else it kept.
|
|
5832
|
-
*/
|
|
5833
|
-
batch?: QueryBatchDevtoolsHandle;
|
|
5834
|
-
/** Which of the batch's items the query was created for, for a batch's item query. */
|
|
5835
|
-
batchItemIndex?: number;
|
|
5836
|
-
/** How many of a batch's requests may be in flight at once, for batches. */
|
|
5837
|
-
concurrency?: number;
|
|
5838
|
-
/** Whether a batch's first failure stops the rest of the run, for batches. */
|
|
5839
|
-
stopOnError?: boolean;
|
|
5840
|
-
/** The query config passed at creation, for queries. */
|
|
5841
|
-
queryConfig?: QueryConfig;
|
|
5842
|
-
/** The creator options passed at creation, for queries. */
|
|
5843
|
-
creator?: CreateQueryCreatorOptions;
|
|
5844
|
-
/** The owning client's repository, where known (queries and auth providers). */
|
|
5845
|
-
repository?: QueryRepository;
|
|
6183
|
+
declare const clearQueryDevtoolsTombstones: (ids?: Iterable<string>) => void;
|
|
6184
|
+
type QueryDevtoolsOptions = {
|
|
5846
6185
|
/**
|
|
5847
|
-
*
|
|
5848
|
-
*
|
|
6186
|
+
* How many of each query's most recent runs keep their response (or error) body, which is what the
|
|
6187
|
+
* panel's response diff compares. Defaults to `5`. Bodies dominate what the run buffer retains, so
|
|
6188
|
+
* raise this only as far as the reach you actually need - a polling query holds one per run.
|
|
6189
|
+
*
|
|
6190
|
+
* This is the default; the panel's Settings tab can raise it for the rest of a page.
|
|
5849
6191
|
*/
|
|
5850
|
-
|
|
6192
|
+
responseHistory?: number;
|
|
5851
6193
|
/**
|
|
5852
|
-
*
|
|
5853
|
-
*
|
|
6194
|
+
* Build information about the application - version, commit SHA, environment name. Shown on the
|
|
6195
|
+
* panel's About tab, included in the session export and exposed on `window.ethlete`, so a bug report
|
|
6196
|
+
* says which build it came from. Generate it rather than typing it:
|
|
6197
|
+
* `nx g @ethlete/core:devtools-about <app>`.
|
|
5854
6198
|
*/
|
|
5855
|
-
|
|
5856
|
-
};
|
|
5857
|
-
/**
|
|
5858
|
-
* A single entry in the {@link queryDevtoolsEntries} registry. The `handle` is the live object
|
|
5859
|
-
* (query, stack, sequence or auth provider) so its signals stay reactive when read by the UI.
|
|
5860
|
-
*/
|
|
5861
|
-
type QueryDevtoolsEntry = {
|
|
5862
|
-
id: string;
|
|
5863
|
-
kind: QueryDevtoolsEntryKind;
|
|
5864
|
-
meta: QueryDevtoolsEntryMeta;
|
|
5865
|
-
handle: unknown;
|
|
5866
|
-
createdAt: number;
|
|
6199
|
+
about?: QueryDevtoolsAppInfo;
|
|
5867
6200
|
/**
|
|
5868
|
-
*
|
|
5869
|
-
*
|
|
5870
|
-
*
|
|
5871
|
-
*
|
|
5872
|
-
*
|
|
6201
|
+
* The OpenAPI (or JSON Schema) document behind each query client, so the panel's mock designer can
|
|
6202
|
+
* seed a response from the real shape of a route and label each field with the type it is declared as.
|
|
6203
|
+
* One loader describes every client; a record keyed by client name describes an application whose
|
|
6204
|
+
* clients speak to different APIs. Each loader runs at most once, and only when the designer first
|
|
6205
|
+
* asks for it - see {@link QueryDevtoolsSchemaLoaders}.
|
|
5873
6206
|
*/
|
|
5874
|
-
|
|
6207
|
+
schema?: QueryDevtoolsSchemaLoaders;
|
|
5875
6208
|
/**
|
|
5876
|
-
*
|
|
5877
|
-
*
|
|
6209
|
+
* The backends this application can be pointed at, one entry per `localStorage` key it reads at
|
|
6210
|
+
* startup. Declaring them puts a picker next to the floating toggle and on the panel's Settings tab;
|
|
6211
|
+
* picking writes the key and reloads. Nothing else changes - the application still resolves the key
|
|
6212
|
+
* itself, so an env is whatever it already means to it.
|
|
5878
6213
|
*/
|
|
5879
|
-
|
|
5880
|
-
/** The query forms this entry's args read, for queries created with a `withArgs` feature. */
|
|
5881
|
-
formLinks?: QueryDevtoolsFormLinksHandle;
|
|
6214
|
+
apiEnvs?: QueryDevtoolsApiEnvSwitch[];
|
|
5882
6215
|
/**
|
|
5883
|
-
* The
|
|
5884
|
-
*
|
|
5885
|
-
*
|
|
6216
|
+
* The accounts the panel may log in as, so a session can be switched without typing a login form
|
|
6217
|
+
* again. Declare the slot only - the label, the query and the fields it needs. Whoever runs the app
|
|
6218
|
+
* types the credentials into the panel once, and they stay in that browser: **never put a password in
|
|
6219
|
+
* the repository.**
|
|
6220
|
+
*
|
|
6221
|
+
* Scope an account to the backends it exists on with `envs`, for an API whose users are not the next
|
|
6222
|
+
* one's. Accounts are not offered at all while an `apiEnvs` env marked `production` is the pick.
|
|
5886
6223
|
*/
|
|
5887
|
-
|
|
6224
|
+
authAccounts?: QueryDevtoolsAuthAccount[];
|
|
5888
6225
|
};
|
|
5889
6226
|
/**
|
|
5890
|
-
*
|
|
5891
|
-
*
|
|
5892
|
-
* renders them is only reachable from {@link provideQueryDevtools}.
|
|
6227
|
+
* Undoes the latch `provideQueryDevtools()` sets, so a later spec in the same worker sees the devtools
|
|
6228
|
+
* disabled again. For specs only.
|
|
5893
6229
|
*/
|
|
5894
|
-
|
|
5895
|
-
id?: string;
|
|
5896
|
-
kind: QueryDevtoolsEntryKind;
|
|
5897
|
-
handle: unknown;
|
|
5898
|
-
meta: QueryDevtoolsEntryMeta;
|
|
5899
|
-
/** The creator's route, stringified by the registry. */
|
|
5900
|
-
route?: unknown;
|
|
5901
|
-
/** The owning client, whose display name is derived by the registry. */
|
|
5902
|
-
clientRef?: AnyCreateQueryClientResult;
|
|
5903
|
-
/**
|
|
5904
|
-
* The bearer auth provider a secure query authenticates with, whose display name is derived by the
|
|
5905
|
-
* registry. Typed structurally so the registry does not have to import the auth layer it registers.
|
|
5906
|
-
*/
|
|
5907
|
-
authProviderRef?: {
|
|
5908
|
-
token?: unknown;
|
|
5909
|
-
};
|
|
5910
|
-
/** The auth provider's queries, whose routes are stringified by the registry. */
|
|
5911
|
-
authQueries?: (Omit<QueryDevtoolsAuthQuery, 'route'> & {
|
|
5912
|
-
route?: unknown;
|
|
5913
|
-
})[];
|
|
5914
|
-
/** @see QueryDevtoolsEntry.stats */
|
|
5915
|
-
stats?: QueryDevtoolsStatsHandle;
|
|
5916
|
-
/** @see QueryDevtoolsEntry.formLinks */
|
|
5917
|
-
formLinks?: QueryDevtoolsFormLinksHandle;
|
|
5918
|
-
/** @see QueryDevtoolsEntry.overrides */
|
|
5919
|
-
overrides?: QueryDevtoolsOverridesRecorder;
|
|
5920
|
-
};
|
|
5921
|
-
/** The registry {@link provideQueryDevtools} installs. */
|
|
5922
|
-
type QueryDevtoolsRegistrar = (entry: QueryDevtoolsRegistration) => () => void;
|
|
6230
|
+
declare const ɵresetQueryDevtoolsForTesting: () => void;
|
|
5923
6231
|
/**
|
|
5924
|
-
*
|
|
5925
|
-
*
|
|
5926
|
-
*
|
|
6232
|
+
* Enables the `@ethlete/query` devtools. Add this to your application providers (e.g. in
|
|
6233
|
+
* `bootstrapApplication`) to make query clients, queries, stacks, sequences and auth providers
|
|
6234
|
+
* appear in the `<et-query-devtools>` panel.
|
|
5927
6235
|
*
|
|
5928
|
-
*
|
|
5929
|
-
*
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
};
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
/** The status to fail the attempt with instead of sending it, or `null` to let it through. */
|
|
5944
|
-
status: number | null;
|
|
5945
|
-
};
|
|
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
|
-
};
|
|
5951
|
-
/** The response the devtools want served instead of one upcoming attempt. */
|
|
5952
|
-
type QueryDevtoolsResolvedMock = {
|
|
5953
|
-
/** The status to respond with. `400` and above are delivered as an `HttpErrorResponse`. */
|
|
5954
|
-
status: number;
|
|
5955
|
-
body: unknown;
|
|
5956
|
-
/** How long to wait before the mocked response settles. */
|
|
5957
|
-
latencyMs: number;
|
|
5958
|
-
};
|
|
6236
|
+
* When omitted, all devtools instrumentation is a no-op: the registry is never installed, so nothing
|
|
6237
|
+
* is retained at runtime and the registry itself is dropped from the bundle.
|
|
6238
|
+
*
|
|
6239
|
+
* The options are read once, on the first call. A second application on the same page keeps the
|
|
6240
|
+
* options of the first one, and this call warns about the ones it declared itself.
|
|
6241
|
+
*
|
|
6242
|
+
* @example
|
|
6243
|
+
* ```ts
|
|
6244
|
+
* bootstrapApplication(AppComponent, {
|
|
6245
|
+
* providers: [provideQueryDevtools()],
|
|
6246
|
+
* });
|
|
6247
|
+
* ```
|
|
6248
|
+
*/
|
|
6249
|
+
declare const provideQueryDevtools: (options?: QueryDevtoolsOptions) => EnvironmentProviders;
|
|
6250
|
+
|
|
5959
6251
|
/**
|
|
5960
|
-
*
|
|
5961
|
-
*
|
|
6252
|
+
* The longest lifetime an armed override may claim, in seconds (7 days). Anything beyond it is never
|
|
6253
|
+
* refreshed at all, which is what arming nothing already does.
|
|
5962
6254
|
*/
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
6255
|
+
declare const QUERY_DEVTOOLS_TOKEN_TTL_LIMIT = 604800;
|
|
6256
|
+
/**
|
|
6257
|
+
* The access-token lifetime armed per auth provider name, in seconds, consumed by the
|
|
6258
|
+
* `<et-query-devtools>` panel. A provider on its token's real lifetime is absent rather than present
|
|
6259
|
+
* with it.
|
|
6260
|
+
*/
|
|
6261
|
+
declare const queryDevtoolsTokenTtls: Signal<Record<string, number>>;
|
|
6262
|
+
/**
|
|
6263
|
+
* Whether an overridden lifetime can be applied to a decoded access token at all. It needs the claim
|
|
6264
|
+
* carrying the expiry - so a lifetime is never invented for a token that declares none - plus `iat` or
|
|
6265
|
+
* `nbf` to measure the new lifetime from.
|
|
6266
|
+
*/
|
|
6267
|
+
declare const canOverrideQueryDevtoolsTokenTtl: (options: {
|
|
6268
|
+
payload: Record<string, unknown> | null;
|
|
6269
|
+
expiresInPropertyName?: string;
|
|
6270
|
+
}) => boolean;
|
|
6271
|
+
/**
|
|
6272
|
+
* Presents one auth provider's access token as living `seconds` from the moment it was issued, rather
|
|
6273
|
+
* than as long as it says it does. Everything that reads the expiry sees the shortened lifetime - the
|
|
6274
|
+
* proactive refresh schedule, `withBearerAuthTokenExpirationWarning`, and the panel's own countdown -
|
|
6275
|
+
* so arming 60 seconds makes a real refresh happen a minute after each token is issued, and keeps
|
|
6276
|
+
* happening for every token that refresh brings back.
|
|
6277
|
+
*
|
|
6278
|
+
* It is a lifetime, not a remaining time: `0` presents the current token as long expired, which is what
|
|
6279
|
+
* makes a refresh happen at once. Nothing is persisted, so a reload leaves every provider on its real
|
|
6280
|
+
* lifetime.
|
|
6281
|
+
*
|
|
6282
|
+
* Part of the devtools contract consumed by `<et-query-devtools>`; a token's lifetime is not something
|
|
6283
|
+
* an application should override on itself.
|
|
6284
|
+
*/
|
|
6285
|
+
declare const setQueryDevtoolsTokenTtl: (options: {
|
|
6286
|
+
providerName: string;
|
|
6287
|
+
seconds: number;
|
|
6288
|
+
}) => void;
|
|
6289
|
+
/**
|
|
6290
|
+
* Puts one provider back on its token's real lifetime, or every provider when no name is given.
|
|
6291
|
+
*
|
|
6292
|
+
* @see setQueryDevtoolsTokenTtl
|
|
6293
|
+
*/
|
|
6294
|
+
declare const clearQueryDevtoolsTokenTtl: (providerName?: string) => void;
|
|
6295
|
+
/**
|
|
6296
|
+
* The decoded access token as the devtools want it seen: the claim carrying the expiry rewritten to the
|
|
6297
|
+
* armed lifetime, measured from `iat`. Returns `payload` untouched when nothing is armed for the
|
|
6298
|
+
* provider, or when the token cannot carry the override - see {@link canOverrideQueryDevtoolsTokenTtl}.
|
|
6299
|
+
*
|
|
6300
|
+
* Installed as the token payload patcher by `provideQueryDevtools()`, and called directly by the panel
|
|
6301
|
+
* for its own countdown.
|
|
6302
|
+
*/
|
|
6303
|
+
declare const applyQueryDevtoolsTokenTtl: <T>(options: {
|
|
6304
|
+
payload: T;
|
|
6305
|
+
providerName: string;
|
|
6306
|
+
expiresInPropertyName?: string;
|
|
6307
|
+
}) => T;
|
|
6308
|
+
|
|
6309
|
+
/**
|
|
6310
|
+
* Whether a devtools UI is on the page, which is what the floating pills follow. Kept apart from the
|
|
6311
|
+
* pills themselves so `@ethlete/query-devtools/toggle` can declare itself without pulling the pill
|
|
6312
|
+
* renderer into the bundle an application ships.
|
|
6313
|
+
*/
|
|
6314
|
+
/**
|
|
6315
|
+
* Declares a devtools UI on the page, and takes the declaration back when it goes. The floating pills
|
|
6316
|
+
* paint only while one is mounted, so an application that renders no devtools trigger shows no pills
|
|
6317
|
+
* either.
|
|
6318
|
+
*
|
|
6319
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6320
|
+
*/
|
|
6321
|
+
declare const setQueryDevtoolsUiMounted: (isMounted: boolean) => void;
|
|
6322
|
+
|
|
6323
|
+
/**
|
|
6324
|
+
* Where one kind of devtools state is kept between page loads. `none` means it is not kept at all -
|
|
6325
|
+
* what that costs differs per kind, which is why every kind picks its own.
|
|
6326
|
+
*/
|
|
6327
|
+
type QueryDevtoolsStorageScope = 'none' | 'session' | 'local';
|
|
6328
|
+
/**
|
|
6329
|
+
* The devtools' own configuration: where each kind of panel state is kept, and the limits the panel
|
|
6330
|
+
* would otherwise hold as constants. Read it as {@link queryDevtoolsSettings}, change it with
|
|
6331
|
+
* {@link setQueryDevtoolsSettings}.
|
|
6332
|
+
*/
|
|
6333
|
+
type QueryDevtoolsSettings = {
|
|
6334
|
+
/** Panel chrome and view state: dock, sizes, open tab, filters, selections. */
|
|
6335
|
+
viewState: QueryDevtoolsStorageScope;
|
|
6336
|
+
/** The entry ids sorted to the top of the Queries list. */
|
|
6337
|
+
pins: QueryDevtoolsStorageScope;
|
|
5968
6338
|
/**
|
|
5969
|
-
*
|
|
5970
|
-
*
|
|
6339
|
+
* Armed response overrides, replayed as queries register on the next load. `none` by default: an app
|
|
6340
|
+
* that stays tampered with across reloads is hours of debugging the wrong thing.
|
|
5971
6341
|
*/
|
|
5972
|
-
|
|
6342
|
+
overrides: QueryDevtoolsStorageScope;
|
|
6343
|
+
/** The library of designed mocks - the authoring, not whether any of them is armed. */
|
|
6344
|
+
mocks: QueryDevtoolsStorageScope;
|
|
5973
6345
|
/**
|
|
5974
|
-
*
|
|
5975
|
-
*
|
|
5976
|
-
*
|
|
5977
|
-
* degrades to an index signature, and no structural contract survives it.
|
|
6346
|
+
* Which mocks are **armed**, as opposed to the library above. `none` by default: an app that silently
|
|
6347
|
+
* serves designed data tomorrow morning is worse than arming them again, so keeping them is a choice
|
|
6348
|
+
* someone makes rather than the way the panel ships.
|
|
5978
6349
|
*/
|
|
5979
|
-
|
|
6350
|
+
armedMocks: QueryDevtoolsStorageScope;
|
|
6351
|
+
/** The faults armed per client, for the same reason and with the same default. */
|
|
6352
|
+
armedFaults: QueryDevtoolsStorageScope;
|
|
6353
|
+
/**
|
|
6354
|
+
* The session vault: the token pairs the panel switches between, and the credentials it logs in with.
|
|
6355
|
+
* `local` by default, because a vault that forgets the other user on every reload is not one - and
|
|
6356
|
+
* `none` for a machine where nothing of the sort may be kept. Outside a development build `local` is
|
|
6357
|
+
* refused and read back as `none`, see {@link queryDevtoolsAllowsLocalAuthSessions}.
|
|
6358
|
+
*/
|
|
6359
|
+
authSessions: QueryDevtoolsStorageScope;
|
|
6360
|
+
/** How many entries the Events log keeps. */
|
|
6361
|
+
maxEvents: number;
|
|
6362
|
+
/** How many dropped cache entries the Cache tab remembers, per client. */
|
|
6363
|
+
maxDroppedCacheEntries: number;
|
|
6364
|
+
/**
|
|
6365
|
+
* How many bodies each query retains, overriding `provideQueryDevtools({ responseHistory })` for the
|
|
6366
|
+
* rest of this page. `null` leaves the application's value alone.
|
|
6367
|
+
*/
|
|
6368
|
+
responseHistory: number | null;
|
|
6369
|
+
/**
|
|
6370
|
+
* Whether switching to another session reloads the page. On by default: a switch replaces what the
|
|
6371
|
+
* query layer holds, and an application that keeps the user anywhere else - a profile service, the
|
|
6372
|
+
* router, an open form - is still showing the last one until it boots again.
|
|
6373
|
+
*/
|
|
6374
|
+
reloadOnAuthSwitch: boolean;
|
|
5980
6375
|
};
|
|
5981
|
-
/**
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
6376
|
+
/**
|
|
6377
|
+
* How the devtools are configured. Every consumer reads the live value rather than a copy, so a change
|
|
6378
|
+
* in the panel's Settings takes effect without a reload.
|
|
6379
|
+
*
|
|
6380
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6381
|
+
*/
|
|
6382
|
+
declare const queryDevtoolsSettings: Signal<QueryDevtoolsSettings>;
|
|
6383
|
+
/**
|
|
6384
|
+
* The `Storage` a scope names, or `null` for `none` and for a browser that refuses one (private mode,
|
|
6385
|
+
* storage disabled, server-side rendering). Callers treat "no storage" and "not persisted" alike.
|
|
6386
|
+
*
|
|
6387
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6388
|
+
*/
|
|
6389
|
+
declare const queryDevtoolsStorage: (scope: QueryDevtoolsStorageScope) => Storage | null;
|
|
6390
|
+
/**
|
|
6391
|
+
* Reads one JSON-encoded devtools key from the store a scope names, or `null`.
|
|
6392
|
+
*
|
|
6393
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6394
|
+
*/
|
|
6395
|
+
declare const readQueryDevtoolsStore: <T>(scope: QueryDevtoolsStorageScope, key: string) => T | null;
|
|
6396
|
+
/**
|
|
6397
|
+
* Writes one devtools key into the store a scope names. A scope of `none` writes nothing.
|
|
6398
|
+
*
|
|
6399
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6400
|
+
*/
|
|
6401
|
+
declare const writeQueryDevtoolsStore: (scope: QueryDevtoolsStorageScope, key: string, value: unknown) => void;
|
|
6402
|
+
/**
|
|
6403
|
+
* Removes one devtools key from **both** stores, whatever the scope currently is - so a scope that
|
|
6404
|
+
* changed cannot leave a stale copy behind for the next load to read.
|
|
6405
|
+
*
|
|
6406
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6407
|
+
*/
|
|
6408
|
+
declare const clearQueryDevtoolsStore: (key: string) => void;
|
|
6409
|
+
/**
|
|
6410
|
+
* Whether the session vault may be kept in `localStorage`. Only a development build may: the vault
|
|
6411
|
+
* holds live access and refresh tokens plus the credentials somebody typed in, and a deployed
|
|
6412
|
+
* application that mounts the panel for its debugging value must not leave those on the machine of
|
|
6413
|
+
* whoever opened it. Outside a development build a stored or default `local` reads back as `none`, so a
|
|
6414
|
+
* plain login keeps nothing; `session` stays on offer for whoever picks it in Settings.
|
|
6415
|
+
*
|
|
6416
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6417
|
+
*/
|
|
6418
|
+
declare const queryDevtoolsAllowsLocalAuthSessions: () => boolean;
|
|
6419
|
+
/**
|
|
6420
|
+
* Changes part of the devtools configuration and stores it. Values outside the range a field allows are
|
|
6421
|
+
* clamped rather than rejected.
|
|
6422
|
+
*
|
|
6423
|
+
* Overrides are the one field not to set here: their scope moves an existing store, so it goes through
|
|
6424
|
+
* `setQueryDevtoolsOverridesScope()` instead.
|
|
6425
|
+
*
|
|
6426
|
+
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6427
|
+
*/
|
|
6428
|
+
declare const setQueryDevtoolsSettings: (patch: Partial<QueryDevtoolsSettings>) => void;
|
|
6429
|
+
|
|
6430
|
+
/**
|
|
6431
|
+
* A fault armed on one query client from the devtools panel. Unlike the panel's forced states - which
|
|
6432
|
+
* write a query's signals directly - an armed fault is applied inside the request pipeline, so retries,
|
|
6433
|
+
* error handling features and the cache all see it exactly as they would see a real one.
|
|
6434
|
+
*/
|
|
6435
|
+
type QueryDevtoolsFault = {
|
|
6436
|
+
/** Extra latency in ms added before every attempt starts. `0` disables it. */
|
|
6437
|
+
latencyMs: number;
|
|
5987
6438
|
/**
|
|
5988
|
-
*
|
|
5989
|
-
*
|
|
6439
|
+
* How many upcoming attempts fail before the client is let through again, counted down as they are
|
|
6440
|
+
* consumed. `0` disables it.
|
|
5990
6441
|
*/
|
|
5991
|
-
|
|
5992
|
-
/** The
|
|
5993
|
-
|
|
6442
|
+
failNext: number;
|
|
6443
|
+
/** The percentage of attempts that fail, rolled per attempt. `0` disables it, `100` fails everything. */
|
|
6444
|
+
failRate: number;
|
|
6445
|
+
/** The status an injected failure responds with. */
|
|
6446
|
+
status: number;
|
|
6447
|
+
};
|
|
6448
|
+
/** The neutral fault: nothing armed. */
|
|
6449
|
+
declare const EMPTY_QUERY_DEVTOOLS_FAULT: QueryDevtoolsFault;
|
|
6450
|
+
/**
|
|
6451
|
+
* Statuses worth injecting, and whether the SDK's default retry policy retries them. A picker built from
|
|
6452
|
+
* this cannot arm a 500 and then leave you wondering why no retry fired.
|
|
6453
|
+
* @see runDefaultQueryRetry
|
|
6454
|
+
*/
|
|
6455
|
+
declare const QUERY_DEVTOOLS_FAULT_STATUSES: {
|
|
6456
|
+
status: number;
|
|
6457
|
+
label: string;
|
|
6458
|
+
retryable: boolean;
|
|
6459
|
+
}[];
|
|
6460
|
+
/**
|
|
6461
|
+
* The faults armed per client name, consumed by the `<et-query-devtools>` UI. Clients with nothing armed
|
|
6462
|
+
* are absent rather than present with an {@link EMPTY_QUERY_DEVTOOLS_FAULT}.
|
|
6463
|
+
*/
|
|
6464
|
+
declare const queryDevtoolsFaults: Signal<Record<string, QueryDevtoolsFault>>;
|
|
6465
|
+
/**
|
|
6466
|
+
* Whether what is armed right now came back from a previous page load rather than being armed by hand.
|
|
6467
|
+
* The panel's armed bar says so, because injected failures nobody remembers arming look exactly like a
|
|
6468
|
+
* broken API.
|
|
6469
|
+
*/
|
|
6470
|
+
declare const queryDevtoolsFaultsRestored: Signal<boolean>;
|
|
6471
|
+
/**
|
|
6472
|
+
* Where the armed faults are kept. Switching to a scope that keeps them stores whatever is armed right
|
|
6473
|
+
* now; switching to `none` empties the store and leaves this page's faults exactly where they are.
|
|
6474
|
+
*/
|
|
6475
|
+
declare const setQueryDevtoolsFaultsScope: (next: QueryDevtoolsStorageScope) => void;
|
|
6476
|
+
/** Whether anything at all is armed on a fault. */
|
|
6477
|
+
declare const isQueryDevtoolsFaultArmed: (fault: QueryDevtoolsFault) => boolean;
|
|
6478
|
+
/**
|
|
6479
|
+
* Arms (or updates) the fault of one client. Only the given fields change; the rest keep their current
|
|
6480
|
+
* value. A client whose resulting fault has nothing armed is dropped from {@link queryDevtoolsFaults}.
|
|
6481
|
+
*
|
|
6482
|
+
* Part of the devtools contract consumed by `<et-query-devtools>`; a fault is a debugging tool, not
|
|
6483
|
+
* something an application should arm on itself.
|
|
6484
|
+
*/
|
|
6485
|
+
declare const setQueryDevtoolsFault: (options: {
|
|
6486
|
+
clientName: string;
|
|
6487
|
+
patch: Partial<QueryDevtoolsFault>;
|
|
6488
|
+
}) => void;
|
|
6489
|
+
/**
|
|
6490
|
+
* Disarms every fault of one client, or of all clients when no name is given.
|
|
6491
|
+
*
|
|
6492
|
+
* @see setQueryDevtoolsFault
|
|
6493
|
+
*/
|
|
6494
|
+
declare const clearQueryDevtoolsFaults: (clientName?: string) => void;
|
|
6495
|
+
|
|
6496
|
+
/**
|
|
6497
|
+
* One field of a query form, as the devtools panel reads it: what it holds, what it puts in the URL,
|
|
6498
|
+
* and the rules that decide when either changes.
|
|
6499
|
+
*/
|
|
6500
|
+
type QueryDevtoolsFormField = {
|
|
6501
|
+
key: string;
|
|
6502
|
+
/** The query-param key the field serializes to, with the form's prefix applied. */
|
|
6503
|
+
paramKey: string;
|
|
6504
|
+
/** The committed value - what the query args are built from. */
|
|
6505
|
+
value: unknown;
|
|
6506
|
+
/** The live value of the bound control, which differs from {@link value} while a debounce is pending. */
|
|
6507
|
+
liveValue: unknown;
|
|
6508
|
+
defaultValue: unknown;
|
|
6509
|
+
/** Whether the committed value is the default one. */
|
|
6510
|
+
isDefault: boolean;
|
|
6511
|
+
/** What the field writes to the URL, or `undefined` when it writes nothing. */
|
|
6512
|
+
queryParam: unknown;
|
|
6513
|
+
/** How long a change waits before it is committed, or `null` when it commits immediately. */
|
|
6514
|
+
debounceMs: number | null;
|
|
6515
|
+
/** The sibling fields whose change resets this one back to its default. */
|
|
6516
|
+
isResetBy: readonly string[];
|
|
6517
|
+
/** Whether the field counts towards {@link QueryDevtoolsFormHandle.activeFilterCount}. */
|
|
6518
|
+
countsAsFilter: boolean;
|
|
5994
6519
|
};
|
|
5995
|
-
/**
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
6520
|
+
/**
|
|
6521
|
+
* The live state of a query form, as `<et-query-devtools>` renders it. Part of the devtools contract -
|
|
6522
|
+
* not a general-purpose query-form API.
|
|
6523
|
+
*/
|
|
6524
|
+
type QueryDevtoolsFormHandle = {
|
|
6525
|
+
fields: Signal<QueryDevtoolsFormField[]>;
|
|
6526
|
+
/** The committed value of the whole form. */
|
|
6527
|
+
value: Signal<Record<string, unknown>>;
|
|
6528
|
+
/** The value of every field before the most recent commit, or `null` before the first one. */
|
|
6529
|
+
previousValue: Signal<Record<string, unknown> | null>;
|
|
6530
|
+
defaultValue: Record<string, unknown>;
|
|
6531
|
+
/** @see QueryFormSignals.activeFilterCount */
|
|
6532
|
+
activeFilterCount: Signal<number>;
|
|
6533
|
+
/** Whether every field sits at its default. */
|
|
6534
|
+
isAtDefaults: Signal<boolean>;
|
|
6535
|
+
/** Whether a change is waiting out its debounce, so the committed value is one edit behind. */
|
|
6536
|
+
isCommitPending: Signal<boolean>;
|
|
6537
|
+
/** Whether the form is syncing with the URL, i.e. whether `observe()` has been called. */
|
|
6538
|
+
isObserving: Signal<boolean>;
|
|
6539
|
+
resetField: (key: string) => void;
|
|
6540
|
+
resetAll: () => void;
|
|
5999
6541
|
};
|
|
6000
6542
|
|
|
6001
6543
|
/**
|
|
@@ -6088,394 +6630,118 @@ declare const deleteQueryDevtoolsMock: (id: string) => void;
|
|
|
6088
6630
|
declare const armQueryDevtoolsMock: (id: string, isArmed: boolean) => void;
|
|
6089
6631
|
/** Starts serving every mock in the library - the counterpart of {@link clearQueryDevtoolsArmedMocks}. */
|
|
6090
6632
|
declare const armAllQueryDevtoolsMocks: () => void;
|
|
6091
|
-
/** Stops serving every mock, leaving the library alone - the armed bar's one-click way out. */
|
|
6092
|
-
declare const clearQueryDevtoolsArmedMocks: () => void;
|
|
6093
|
-
/**
|
|
6094
|
-
* Where the armed set is kept. Switching to a scope that keeps it stores whatever is armed right now, so
|
|
6095
|
-
* the choice reads as "keep these"; switching to `none` empties the store and leaves this page serving
|
|
6096
|
-
* exactly what it was already serving.
|
|
6097
|
-
*/
|
|
6098
|
-
declare const setQueryDevtoolsArmedMocksScope: (next: QueryDevtoolsStorageScope) => void;
|
|
6099
|
-
/** Empties the designed library and disarms everything - the panel's "Reset devtools". */
|
|
6100
|
-
declare const clearQueryDevtoolsMockStore: () => void;
|
|
6101
|
-
|
|
6102
|
-
/** One entry id the last page load left ops for, as the panel's banner reports it. */
|
|
6103
|
-
type RestoredQueryDevtoolsOverrides = {
|
|
6104
|
-
/** The devtools entry id the ops were stored under. */
|
|
6105
|
-
id: string;
|
|
6106
|
-
/** How many ops were stored for it. */
|
|
6107
|
-
count: number;
|
|
6108
|
-
/**
|
|
6109
|
-
* Whether a query with this id has registered and taken them. `false` means the store outlived the
|
|
6110
|
-
* query it was written for - a route that no longer runs, or a creation order that shifted - so those
|
|
6111
|
-
* ops are sitting on nothing rather than quietly landing somewhere else.
|
|
6112
|
-
*/
|
|
6113
|
-
armed: boolean;
|
|
6114
|
-
};
|
|
6115
|
-
/**
|
|
6116
|
-
* Whether armed response overrides are stored and replayed on the next page load - that is, whether
|
|
6117
|
-
* their scope is anything other than `none`. Off by default.
|
|
6118
|
-
*/
|
|
6119
|
-
declare const queryDevtoolsOverridePersistence: Signal<boolean>;
|
|
6120
|
-
/**
|
|
6121
|
-
* Where armed response overrides are kept. Switching to a scope that keeps them captures whatever is
|
|
6122
|
-
* armed right now, so the choice reads as "keep these" rather than "keep the next ones"; switching
|
|
6123
|
-
* between `session` and `local` moves the store; switching to `none` empties it and leaves every armed
|
|
6124
|
-
* op exactly where it is for the rest of this page.
|
|
6125
|
-
*/
|
|
6126
|
-
declare const setQueryDevtoolsOverridesScope: (next: QueryDevtoolsStorageScope) => void;
|
|
6127
|
-
/**
|
|
6128
|
-
* Turns persistence on or off - the panel's "Keep across reloads" toggle. On restores the last scope
|
|
6129
|
-
* that kept them (`session` unless Settings picked `local`).
|
|
6130
|
-
*/
|
|
6131
|
-
declare const setQueryDevtoolsOverridePersistence: (value: boolean) => void;
|
|
6132
|
-
/**
|
|
6133
|
-
* Empties the override store in both browser stores and disarms everything a reload brought back,
|
|
6134
|
-
* without changing where overrides are kept - the panel's "Reset devtools".
|
|
6135
|
-
*/
|
|
6136
|
-
declare const clearQueryDevtoolsOverrideStore: () => void;
|
|
6137
|
-
/**
|
|
6138
|
-
* The ops this page load inherited from the previous one, and for each id whether a live query has taken
|
|
6139
|
-
* it. Overrides that outlive the page that armed them have to announce themselves, because an app being
|
|
6140
|
-
* lied to looks exactly like an app that is broken.
|
|
6141
|
-
*/
|
|
6142
|
-
declare const restoredQueryDevtoolsOverrides: Signal<readonly RestoredQueryDevtoolsOverrides[]>;
|
|
6143
|
-
/**
|
|
6144
|
-
* The scope those ops came back from, or `null` when this page inherited none. `local` is the one worth
|
|
6145
|
-
* naming in the banner: it means they outlived closing the tab, not just a reload.
|
|
6146
|
-
*/
|
|
6147
|
-
declare const queryDevtoolsRestoredOverridesScope: Signal<QueryDevtoolsStorageScope | null>;
|
|
6148
|
-
/** Disarms every op this page load inherited and empties the store - the banner's one-click way out. */
|
|
6149
|
-
declare const clearRestoredQueryDevtoolsOverrides: () => void;
|
|
6150
|
-
|
|
6151
|
-
declare const TRANSFER_KIND = "ethlete-query-overrides";
|
|
6152
|
-
/**
|
|
6153
|
-
* A whole armed override set, as the devtools panel writes it to the clipboard: pretty-printed JSON so
|
|
6154
|
-
* it can be pasted onto another query, into a ticket, or hand-edited on the way. `source` is only ever
|
|
6155
|
-
* a human's bearing on where it came from - a paste never resolves against it.
|
|
6156
|
-
*/
|
|
6157
|
-
type QueryDevtoolsOverrideTransfer = {
|
|
6158
|
-
kind: typeof TRANSFER_KIND;
|
|
6159
|
-
version: number;
|
|
6160
|
-
source?: {
|
|
6161
|
-
id?: string;
|
|
6162
|
-
url?: string;
|
|
6163
|
-
};
|
|
6164
|
-
ops: OverrideOp[];
|
|
6165
|
-
};
|
|
6166
|
-
/** What {@link parseQueryDevtoolsOverrideTransfer} makes of a piece of clipboard text. */
|
|
6167
|
-
type QueryDevtoolsOverrideTransferParse = {
|
|
6168
|
-
ok: true;
|
|
6169
|
-
ops: OverrideOp[];
|
|
6170
|
-
/** Ops the payload held that this build has no `type` for - a newer panel wrote them. */
|
|
6171
|
-
skipped: number;
|
|
6172
|
-
source?: {
|
|
6173
|
-
id?: string;
|
|
6174
|
-
url?: string;
|
|
6175
|
-
};
|
|
6176
|
-
} | {
|
|
6177
|
-
ok: false;
|
|
6178
|
-
reason: string;
|
|
6179
|
-
};
|
|
6180
|
-
/**
|
|
6181
|
-
* Serializes the ops armed on one query into clipboard text. `reset` never reaches a recorder's list, so
|
|
6182
|
-
* what comes out is exactly what a paste can put back.
|
|
6183
|
-
*/
|
|
6184
|
-
declare const serializeQueryDevtoolsOverrideTransfer: (entries: readonly QueryDevtoolsOverrideEntry[], source?: {
|
|
6185
|
-
id?: string;
|
|
6186
|
-
url?: string;
|
|
6187
|
-
}) => string;
|
|
6188
|
-
/**
|
|
6189
|
-
* Reads clipboard text back into ops. A bare array of ops is accepted alongside the full envelope, so a
|
|
6190
|
-
* set pasted out of a ticket and trimmed by hand still lands; an op whose `type` this build doesn't know
|
|
6191
|
-
* is counted in `skipped` rather than failing the whole paste, so an older panel can take a newer one's
|
|
6192
|
-
* set minus the parts it cannot replay.
|
|
6193
|
-
*/
|
|
6194
|
-
declare const parseQueryDevtoolsOverrideTransfer: (text: string) => QueryDevtoolsOverrideTransferParse;
|
|
6195
|
-
/**
|
|
6196
|
-
* How many of `ops` would not resolve against `raw` - what a paste onto a differently-shaped query
|
|
6197
|
-
* reports, so ops sitting on nothing say so instead of looking armed. Replays them the same way the
|
|
6198
|
-
* pipeline will, since an earlier op can be what makes a later one's path exist.
|
|
6199
|
-
*/
|
|
6200
|
-
declare const countUnresolvedQueryDevtoolsOverrides: (ops: readonly OverrideOp[], raw: unknown) => number;
|
|
6201
|
-
/** Arms every op of a parsed set onto a query, on top of whatever it already has armed. */
|
|
6202
|
-
declare const armQueryDevtoolsOverrideTransfer: (recorder: QueryDevtoolsOverridesRecorder, ops: readonly OverrideOp[]) => void;
|
|
6203
|
-
|
|
6204
|
-
/**
|
|
6205
|
-
* How an application hands its API description to the devtools, so a designed mock can start from the
|
|
6206
|
-
* real shape of a response instead of a guess. TypeScript types are erased at runtime, so a generated
|
|
6207
|
-
* `.d.ts` is not readable from here - the document the types were generated *from* is.
|
|
6208
|
-
*
|
|
6209
|
-
* OpenAPI 3.x, Swagger 2 and a bare JSON Schema document all work: named schemas are read from
|
|
6210
|
-
* `components.schemas`, `definitions` or `$defs`, and routes from `paths`.
|
|
6211
|
-
*
|
|
6212
|
-
* The loader is called at most once, and only when the panel first asks for it - so returning a dynamic
|
|
6213
|
-
* `import()` keeps the document out of the application bundle entirely.
|
|
6214
|
-
*
|
|
6215
|
-
* @example
|
|
6216
|
-
* ```ts
|
|
6217
|
-
* provideQueryDevtools({ schema: () => import('../openapi.json') })
|
|
6218
|
-
* provideQueryDevtools({ schema: () => fetch('/openapi.json').then((res) => res.json()) })
|
|
6219
|
-
* ```
|
|
6220
|
-
*/
|
|
6221
|
-
type QueryDevtoolsSchemaLoader = () => Promise<unknown> | unknown;
|
|
6222
|
-
/**
|
|
6223
|
-
* The description each query client is served by. One loader describes every client - which is what a
|
|
6224
|
-
* single-API application wants - and a record keyed by client name (the `name` a client was created
|
|
6225
|
-
* with) describes them one API at a time, so a mock designed against one client never offers another
|
|
6226
|
-
* one's routes.
|
|
6227
|
-
*
|
|
6228
|
-
* @example
|
|
6229
|
-
* ```ts
|
|
6230
|
-
* provideQueryDevtools({
|
|
6231
|
-
* schema: {
|
|
6232
|
-
* hubApiClient: () => import('../hub-openapi.json'),
|
|
6233
|
-
* votingApiClient: () => fetch('/voting/openapi.json').then((res) => res.json()),
|
|
6234
|
-
* },
|
|
6235
|
-
* })
|
|
6236
|
-
* ```
|
|
6237
|
-
*/
|
|
6238
|
-
type QueryDevtoolsSchemaLoaders = QueryDevtoolsSchemaLoader | Record<string, QueryDevtoolsSchemaLoader>;
|
|
6239
|
-
/**
|
|
6240
|
-
* Where the API description stands. `unavailable` means the application never handed one in, which is
|
|
6241
|
-
* what the panel shows the seeding controls on.
|
|
6242
|
-
*/
|
|
6243
|
-
type QueryDevtoolsSchemaState = {
|
|
6244
|
-
status: 'unavailable';
|
|
6245
|
-
} | {
|
|
6246
|
-
status: 'idle';
|
|
6247
|
-
} | {
|
|
6248
|
-
status: 'loading';
|
|
6249
|
-
} | {
|
|
6250
|
-
status: 'ready';
|
|
6251
|
-
} | {
|
|
6252
|
-
status: 'error';
|
|
6253
|
-
message: string;
|
|
6254
|
-
};
|
|
6255
|
-
/** One route the description declares, whether or not the application has ever called it. */
|
|
6256
|
-
type QueryDevtoolsSchemaRoute = {
|
|
6257
|
-
method: string;
|
|
6258
|
-
/** The route with its path params as `:name`, so it reads the way a mock's pattern does. */
|
|
6259
|
-
pattern: string;
|
|
6260
|
-
/** The operation's summary, its `operationId`, or empty - whatever the document offers as a label. */
|
|
6261
|
-
summary: string;
|
|
6262
|
-
};
|
|
6263
|
-
/**
|
|
6264
|
-
* A body generated from the description, plus everything that could not be read off it with certainty.
|
|
6265
|
-
* A seed is a starting point for the designer, never a claim about what the API returns.
|
|
6266
|
-
*/
|
|
6267
|
-
type QueryDevtoolsSchemaSeed = {
|
|
6268
|
-
body: unknown;
|
|
6269
|
-
/** The named schema the body was generated from, when the document named one. */
|
|
6270
|
-
schemaName: string | null;
|
|
6271
|
-
/**
|
|
6272
|
-
* The declared type of each field, keyed by its path with array indices as `*` (`items.*.id`) - so one
|
|
6273
|
-
* entry annotates every element of an array, however many the designer goes on to add.
|
|
6274
|
-
*/
|
|
6275
|
-
types: ReadonlyMap<string, string>;
|
|
6276
|
-
/** What had to be guessed, skipped or cut short, so a seeded body is never mistaken for the contract. */
|
|
6277
|
-
notes: readonly string[];
|
|
6278
|
-
};
|
|
6279
|
-
/**
|
|
6280
|
-
* How lifelike a seeded body is. `placeholder` names every field after itself, so a seed reads as
|
|
6281
|
-
* obviously unreal; `realistic` fills it with varied sample values, so a list is not three identical
|
|
6282
|
-
* rows; `stress` fills it with what a layout breaks on - long unbreakable words, unicode, huge numbers.
|
|
6283
|
-
*/
|
|
6284
|
-
type QueryDevtoolsSeedStyle = 'placeholder' | 'realistic' | 'stress';
|
|
6285
|
-
/**
|
|
6286
|
-
* Where the description of one query client's API stands, for the panel's seeding controls.
|
|
6287
|
-
*
|
|
6288
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6289
|
-
*/
|
|
6290
|
-
declare const queryDevtoolsSchemaState: (clientName: string) => QueryDevtoolsSchemaState;
|
|
6291
|
-
/**
|
|
6292
|
-
* Loads the API description, once. Calling it while it is loading or after it has loaded does nothing;
|
|
6293
|
-
* calling it after a failure retries.
|
|
6294
|
-
*
|
|
6295
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6296
|
-
*/
|
|
6297
|
-
declare const loadQueryDevtoolsSchema: (clientName: string) => void;
|
|
6298
|
-
/**
|
|
6299
|
-
* Every schema one client's description names, sorted - the designer's "seed from a type" list.
|
|
6300
|
-
*
|
|
6301
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6302
|
-
*/
|
|
6303
|
-
declare const queryDevtoolsSchemaNames: (clientName: string) => readonly string[];
|
|
6633
|
+
/** Stops serving every mock, leaving the library alone - the armed bar's one-click way out. */
|
|
6634
|
+
declare const clearQueryDevtoolsArmedMocks: () => void;
|
|
6304
6635
|
/**
|
|
6305
|
-
*
|
|
6306
|
-
*
|
|
6307
|
-
*
|
|
6308
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6636
|
+
* Where the armed set is kept. Switching to a scope that keeps it stores whatever is armed right now, so
|
|
6637
|
+
* the choice reads as "keep these"; switching to `none` empties the store and leaves this page serving
|
|
6638
|
+
* exactly what it was already serving.
|
|
6309
6639
|
*/
|
|
6310
|
-
declare const
|
|
6311
|
-
/**
|
|
6312
|
-
|
|
6640
|
+
declare const setQueryDevtoolsArmedMocksScope: (next: QueryDevtoolsStorageScope) => void;
|
|
6641
|
+
/** Empties the designed library and disarms everything - the panel's "Reset devtools". */
|
|
6642
|
+
declare const clearQueryDevtoolsMockStore: () => void;
|
|
6643
|
+
|
|
6644
|
+
/** One entry id the last page load left ops for, as the panel's banner reports it. */
|
|
6645
|
+
type RestoredQueryDevtoolsOverrides = {
|
|
6646
|
+
/** The devtools entry id the ops were stored under. */
|
|
6647
|
+
id: string;
|
|
6648
|
+
/** How many ops were stored for it. */
|
|
6649
|
+
count: number;
|
|
6313
6650
|
/**
|
|
6314
|
-
*
|
|
6315
|
-
*
|
|
6651
|
+
* Whether a query with this id has registered and taken them. `false` means the store outlived the
|
|
6652
|
+
* query it was written for - a route that no longer runs, or a creation order that shifted - so those
|
|
6653
|
+
* ops are sitting on nothing rather than quietly landing somewhere else.
|
|
6316
6654
|
*/
|
|
6317
|
-
|
|
6318
|
-
/** Refs that could not be brought along, so an exported document says why it does not resolve. */
|
|
6319
|
-
notes: readonly string[];
|
|
6655
|
+
armed: boolean;
|
|
6320
6656
|
};
|
|
6321
6657
|
/**
|
|
6322
|
-
*
|
|
6323
|
-
*
|
|
6324
|
-
* `MatchView` instead of an anonymous shape inferred from one body.
|
|
6325
|
-
*
|
|
6326
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6658
|
+
* Whether armed response overrides are stored and replayed on the next page load - that is, whether
|
|
6659
|
+
* their scope is anything other than `none`. Off by default.
|
|
6327
6660
|
*/
|
|
6328
|
-
declare const
|
|
6661
|
+
declare const queryDevtoolsOverridePersistence: Signal<boolean>;
|
|
6329
6662
|
/**
|
|
6330
|
-
*
|
|
6331
|
-
*
|
|
6332
|
-
*
|
|
6333
|
-
*
|
|
6663
|
+
* Where armed response overrides are kept. Switching to a scope that keeps them captures whatever is
|
|
6664
|
+
* armed right now, so the choice reads as "keep these" rather than "keep the next ones"; switching
|
|
6665
|
+
* between `session` and `local` moves the store; switching to `none` empties it and leaves every armed
|
|
6666
|
+
* op exactly where it is for the rest of this page.
|
|
6334
6667
|
*/
|
|
6335
|
-
declare const
|
|
6668
|
+
declare const setQueryDevtoolsOverridesScope: (next: QueryDevtoolsStorageScope) => void;
|
|
6336
6669
|
/**
|
|
6337
|
-
*
|
|
6338
|
-
*
|
|
6339
|
-
* route, or declares no JSON response for it.
|
|
6340
|
-
*
|
|
6341
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6670
|
+
* Turns persistence on or off - the panel's "Keep across reloads" toggle. On restores the last scope
|
|
6671
|
+
* that kept them (`session` unless Settings picked `local`).
|
|
6342
6672
|
*/
|
|
6343
|
-
declare const
|
|
6344
|
-
clientName: string;
|
|
6345
|
-
method: string;
|
|
6346
|
-
pattern: string;
|
|
6347
|
-
}, style?: QueryDevtoolsSeedStyle) => QueryDevtoolsSchemaSeed | null;
|
|
6348
|
-
|
|
6673
|
+
declare const setQueryDevtoolsOverridePersistence: (value: boolean) => void;
|
|
6349
6674
|
/**
|
|
6350
|
-
*
|
|
6675
|
+
* Empties the override store in both browser stores and disarms everything a reload brought back,
|
|
6676
|
+
* without changing where overrides are kept - the panel's "Reset devtools".
|
|
6351
6677
|
*/
|
|
6352
|
-
declare const
|
|
6353
|
-
/** Renders parsed route parts as a template, e.g. `/team/:teamId/players`. */
|
|
6354
|
-
declare const stringifyQueryRouteParts: (parts: QueryDevtoolsRoutePart[]) => string;
|
|
6678
|
+
declare const clearQueryDevtoolsOverrideStore: () => void;
|
|
6355
6679
|
/**
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6680
|
+
* The ops this page load inherited from the previous one, and for each id whether a live query has taken
|
|
6681
|
+
* it. Overrides that outlive the page that armed them have to announce themselves, because an app being
|
|
6682
|
+
* lied to looks exactly like an app that is broken.
|
|
6358
6683
|
*/
|
|
6359
|
-
declare const
|
|
6360
|
-
type QueryDevtoolsOptions = {
|
|
6361
|
-
/**
|
|
6362
|
-
* How many of each query's most recent runs keep their response (or error) body, which is what the
|
|
6363
|
-
* panel's response diff compares. Defaults to `5`. Bodies dominate what the run buffer retains, so
|
|
6364
|
-
* raise this only as far as the reach you actually need - a polling query holds one per run.
|
|
6365
|
-
*
|
|
6366
|
-
* This is the default; the panel's Settings tab can raise it for the rest of a page.
|
|
6367
|
-
*/
|
|
6368
|
-
responseHistory?: number;
|
|
6369
|
-
/**
|
|
6370
|
-
* Build information about the application - version, commit SHA, environment name. Shown on the
|
|
6371
|
-
* panel's About tab, included in the session export and exposed on `window.ethlete`, so a bug report
|
|
6372
|
-
* says which build it came from. Generate it rather than typing it:
|
|
6373
|
-
* `nx g @ethlete/core:devtools-about <app>`.
|
|
6374
|
-
*/
|
|
6375
|
-
about?: QueryDevtoolsAppInfo;
|
|
6376
|
-
/**
|
|
6377
|
-
* The OpenAPI (or JSON Schema) document behind each query client, so the panel's mock designer can
|
|
6378
|
-
* seed a response from the real shape of a route and label each field with the type it is declared as.
|
|
6379
|
-
* One loader describes every client; a record keyed by client name describes an application whose
|
|
6380
|
-
* clients speak to different APIs. Each loader runs at most once, and only when the designer first
|
|
6381
|
-
* asks for it - see {@link QueryDevtoolsSchemaLoaders}.
|
|
6382
|
-
*/
|
|
6383
|
-
schema?: QueryDevtoolsSchemaLoaders;
|
|
6384
|
-
/**
|
|
6385
|
-
* The backends this application can be pointed at, one entry per `localStorage` key it reads at
|
|
6386
|
-
* startup. Declaring them puts a picker next to the floating toggle and on the panel's Settings tab;
|
|
6387
|
-
* picking writes the key and reloads. Nothing else changes - the application still resolves the key
|
|
6388
|
-
* itself, so an env is whatever it already means to it.
|
|
6389
|
-
*/
|
|
6390
|
-
apiEnvs?: QueryDevtoolsApiEnvSwitch[];
|
|
6391
|
-
/**
|
|
6392
|
-
* The accounts the panel may log in as, so a session can be switched without typing a login form
|
|
6393
|
-
* again. Declare the slot only - the label, the query and the fields it needs. Whoever runs the app
|
|
6394
|
-
* types the credentials into the panel once, and they stay in that browser: **never put a password in
|
|
6395
|
-
* the repository.**
|
|
6396
|
-
*
|
|
6397
|
-
* Scope an account to the backends it exists on with `envs`, for an API whose users are not the next
|
|
6398
|
-
* one's. Accounts are not offered at all while an `apiEnvs` env marked `production` is the pick.
|
|
6399
|
-
*/
|
|
6400
|
-
authAccounts?: QueryDevtoolsAuthAccount[];
|
|
6401
|
-
};
|
|
6684
|
+
declare const restoredQueryDevtoolsOverrides: Signal<readonly RestoredQueryDevtoolsOverrides[]>;
|
|
6402
6685
|
/**
|
|
6403
|
-
*
|
|
6404
|
-
*
|
|
6405
|
-
* appear in the `<et-query-devtools>` panel.
|
|
6406
|
-
*
|
|
6407
|
-
* When omitted, all devtools instrumentation is a no-op: the registry is never installed, so nothing
|
|
6408
|
-
* is retained at runtime and the registry itself is dropped from the bundle.
|
|
6409
|
-
*
|
|
6410
|
-
* The options are read once, on the first call. A second application on the same page keeps the
|
|
6411
|
-
* options of the first one, and this call warns about the ones it declared itself.
|
|
6412
|
-
*
|
|
6413
|
-
* @example
|
|
6414
|
-
* ```ts
|
|
6415
|
-
* bootstrapApplication(AppComponent, {
|
|
6416
|
-
* providers: [provideQueryDevtools()],
|
|
6417
|
-
* });
|
|
6418
|
-
* ```
|
|
6686
|
+
* The scope those ops came back from, or `null` when this page inherited none. `local` is the one worth
|
|
6687
|
+
* naming in the banner: it means they outlived closing the tab, not just a reload.
|
|
6419
6688
|
*/
|
|
6420
|
-
declare const
|
|
6689
|
+
declare const queryDevtoolsRestoredOverridesScope: Signal<QueryDevtoolsStorageScope | null>;
|
|
6690
|
+
/** Disarms every op this page load inherited and empties the store - the banner's one-click way out. */
|
|
6691
|
+
declare const clearRestoredQueryDevtoolsOverrides: () => void;
|
|
6421
6692
|
|
|
6693
|
+
declare const TRANSFER_KIND = "ethlete-query-overrides";
|
|
6422
6694
|
/**
|
|
6423
|
-
*
|
|
6424
|
-
*
|
|
6425
|
-
|
|
6426
|
-
declare const QUERY_DEVTOOLS_TOKEN_TTL_LIMIT = 604800;
|
|
6427
|
-
/**
|
|
6428
|
-
* The access-token lifetime armed per auth provider name, in seconds, consumed by the
|
|
6429
|
-
* `<et-query-devtools>` panel. A provider on its token's real lifetime is absent rather than present
|
|
6430
|
-
* with it.
|
|
6431
|
-
*/
|
|
6432
|
-
declare const queryDevtoolsTokenTtls: Signal<Record<string, number>>;
|
|
6433
|
-
/**
|
|
6434
|
-
* Whether an overridden lifetime can be applied to a decoded access token at all. It needs the claim
|
|
6435
|
-
* carrying the expiry - so a lifetime is never invented for a token that declares none - plus `iat` or
|
|
6436
|
-
* `nbf` to measure the new lifetime from.
|
|
6695
|
+
* A whole armed override set, as the devtools panel writes it to the clipboard: pretty-printed JSON so
|
|
6696
|
+
* it can be pasted onto another query, into a ticket, or hand-edited on the way. `source` is only ever
|
|
6697
|
+
* a human's bearing on where it came from - a paste never resolves against it.
|
|
6437
6698
|
*/
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6699
|
+
type QueryDevtoolsOverrideTransfer = {
|
|
6700
|
+
kind: typeof TRANSFER_KIND;
|
|
6701
|
+
version: number;
|
|
6702
|
+
source?: {
|
|
6703
|
+
id?: string;
|
|
6704
|
+
url?: string;
|
|
6705
|
+
};
|
|
6706
|
+
ops: OverrideOp[];
|
|
6707
|
+
};
|
|
6708
|
+
/** What {@link parseQueryDevtoolsOverrideTransfer} makes of a piece of clipboard text. */
|
|
6709
|
+
type QueryDevtoolsOverrideTransferParse = {
|
|
6710
|
+
ok: true;
|
|
6711
|
+
ops: OverrideOp[];
|
|
6712
|
+
/** Ops the payload held that this build cannot replay: a `type` a newer panel wrote, or a field missing. */
|
|
6713
|
+
skipped: number;
|
|
6714
|
+
source?: {
|
|
6715
|
+
id?: string;
|
|
6716
|
+
url?: string;
|
|
6717
|
+
};
|
|
6718
|
+
} | {
|
|
6719
|
+
ok: false;
|
|
6720
|
+
reason: string;
|
|
6721
|
+
};
|
|
6442
6722
|
/**
|
|
6443
|
-
*
|
|
6444
|
-
*
|
|
6445
|
-
* proactive refresh schedule, `withBearerAuthTokenExpirationWarning`, and the panel's own countdown -
|
|
6446
|
-
* so arming 60 seconds makes a real refresh happen a minute after each token is issued, and keeps
|
|
6447
|
-
* happening for every token that refresh brings back.
|
|
6448
|
-
*
|
|
6449
|
-
* It is a lifetime, not a remaining time: `0` presents the current token as long expired, which is what
|
|
6450
|
-
* makes a refresh happen at once. Nothing is persisted, so a reload leaves every provider on its real
|
|
6451
|
-
* lifetime.
|
|
6452
|
-
*
|
|
6453
|
-
* Part of the devtools contract consumed by `<et-query-devtools>`; a token's lifetime is not something
|
|
6454
|
-
* an application should override on itself.
|
|
6723
|
+
* Serializes the ops armed on one query into clipboard text. `reset` never reaches a recorder's list, so
|
|
6724
|
+
* what comes out is exactly what a paste can put back.
|
|
6455
6725
|
*/
|
|
6456
|
-
declare const
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
}) =>
|
|
6726
|
+
declare const serializeQueryDevtoolsOverrideTransfer: (entries: readonly QueryDevtoolsOverrideEntry[], source?: {
|
|
6727
|
+
id?: string;
|
|
6728
|
+
url?: string;
|
|
6729
|
+
}) => string;
|
|
6460
6730
|
/**
|
|
6461
|
-
*
|
|
6462
|
-
*
|
|
6463
|
-
*
|
|
6731
|
+
* Reads clipboard text back into ops. A bare array of ops is accepted alongside the full envelope, so a
|
|
6732
|
+
* set pasted out of a ticket and trimmed by hand still lands; an op whose `type` this build doesn't know
|
|
6733
|
+
* is counted in `skipped` rather than failing the whole paste, so an older panel can take a newer one's
|
|
6734
|
+
* set minus the parts it cannot replay.
|
|
6464
6735
|
*/
|
|
6465
|
-
declare const
|
|
6736
|
+
declare const parseQueryDevtoolsOverrideTransfer: (text: string) => QueryDevtoolsOverrideTransferParse;
|
|
6466
6737
|
/**
|
|
6467
|
-
*
|
|
6468
|
-
*
|
|
6469
|
-
*
|
|
6470
|
-
*
|
|
6471
|
-
* Installed as the token payload patcher by `provideQueryDevtools()`, and called directly by the panel
|
|
6472
|
-
* for its own countdown.
|
|
6738
|
+
* How many of `ops` would not resolve against `raw` - what a paste onto a differently-shaped query
|
|
6739
|
+
* reports, so ops sitting on nothing say so instead of looking armed. Replays them the same way the
|
|
6740
|
+
* pipeline will, since an earlier op can be what makes a later one's path exist.
|
|
6473
6741
|
*/
|
|
6474
|
-
declare const
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
expiresInPropertyName?: string;
|
|
6478
|
-
}) => T;
|
|
6742
|
+
declare const countUnresolvedQueryDevtoolsOverrides: (ops: readonly OverrideOp[], raw: unknown) => number;
|
|
6743
|
+
/** Arms every op of a parsed set onto a query, on top of whatever it already has armed. */
|
|
6744
|
+
declare const armQueryDevtoolsOverrideTransfer: (recorder: QueryDevtoolsOverridesRecorder, ops: readonly OverrideOp[]) => void;
|
|
6479
6745
|
|
|
6480
6746
|
/**
|
|
6481
6747
|
* How many destroyed queries the registry keeps. A tombstone holds the last response body it captured,
|
|
@@ -6516,20 +6782,6 @@ declare const snapshotQueryDevtoolsHandle: (handle: unknown) => unknown;
|
|
|
6516
6782
|
*/
|
|
6517
6783
|
declare const tombstoneOf: (entry: QueryDevtoolsEntry, destroyedAt: number) => QueryDevtoolsEntry;
|
|
6518
6784
|
|
|
6519
|
-
/**
|
|
6520
|
-
* Whether a devtools UI is on the page, which is what the floating pills follow. Kept apart from the
|
|
6521
|
-
* pills themselves so `@ethlete/query-devtools/toggle` can declare itself without pulling the pill
|
|
6522
|
-
* renderer into the bundle an application ships.
|
|
6523
|
-
*/
|
|
6524
|
-
/**
|
|
6525
|
-
* Declares a devtools UI on the page, and takes the declaration back when it goes. The floating pills
|
|
6526
|
-
* paint only while one is mounted, so an application that renders no devtools trigger shows no pills
|
|
6527
|
-
* either.
|
|
6528
|
-
*
|
|
6529
|
-
* Part of the devtools contract. **Not part of the general public contract.**
|
|
6530
|
-
*/
|
|
6531
|
-
declare const setQueryDevtoolsUiMounted: (isMounted: boolean) => void;
|
|
6532
|
-
|
|
6533
6785
|
type TransformedGqlQuery = {
|
|
6534
6786
|
query: string;
|
|
6535
6787
|
variables?: string | Record<string, unknown>;
|
|
@@ -7285,6 +7537,8 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
|
|
|
7285
7537
|
* @internal
|
|
7286
7538
|
*/
|
|
7287
7539
|
_canBeCached?: boolean);
|
|
7540
|
+
/** The full URL of the request the underlying query is bound to, `null` before the first execution. */
|
|
7541
|
+
get url(): string | null;
|
|
7288
7542
|
get rawState(): V2QueryState<ResponseType<QueryArgsOf<TNewQuery>>>;
|
|
7289
7543
|
/**
|
|
7290
7544
|
* `abort()` resets the underlying query, so it holds no execution state - the shape of a query that has
|
|
@@ -8801,7 +9055,7 @@ declare class QueryDevtoolsComponent {
|
|
|
8801
9055
|
secure: boolean | undefined;
|
|
8802
9056
|
route: any;
|
|
8803
9057
|
reportProgress: boolean | undefined;
|
|
8804
|
-
responseType: "
|
|
9058
|
+
responseType: "json" | "text" | "blob" | "arraybuffer" | undefined;
|
|
8805
9059
|
withCredentials: boolean | undefined;
|
|
8806
9060
|
autoRefreshOn: _ethlete_query.QueryAutoRefreshConfig | undefined;
|
|
8807
9061
|
enableSmartPolling: boolean | undefined;
|
|
@@ -8811,7 +9065,7 @@ declare class QueryDevtoolsComponent {
|
|
|
8811
9065
|
secure: boolean | undefined;
|
|
8812
9066
|
route: any;
|
|
8813
9067
|
reportProgress: boolean | undefined;
|
|
8814
|
-
responseType: "
|
|
9068
|
+
responseType: "json" | "text" | "blob" | "arraybuffer" | undefined;
|
|
8815
9069
|
withCredentials: boolean | undefined;
|
|
8816
9070
|
autoRefreshOn: _ethlete_query.QueryAutoRefreshConfig | undefined;
|
|
8817
9071
|
enableSmartPolling: boolean | undefined;
|
|
@@ -9232,15 +9486,15 @@ declare class QueryDirective<Q extends QueryDirectiveType | null> {
|
|
|
9232
9486
|
/**
|
|
9233
9487
|
* @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.
|
|
9234
9488
|
*/
|
|
9235
|
-
declare const invalidBaseRouteError: (
|
|
9489
|
+
declare const invalidBaseRouteError: (base: unknown) => RuntimeError<10>;
|
|
9236
9490
|
/**
|
|
9237
9491
|
* @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.
|
|
9238
9492
|
*/
|
|
9239
|
-
declare const invalidRouteError: (
|
|
9493
|
+
declare const invalidRouteError: (route: unknown) => RuntimeError<11>;
|
|
9240
9494
|
/**
|
|
9241
9495
|
* @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.
|
|
9242
9496
|
*/
|
|
9243
|
-
declare const pathParamsMissingInRouteFunctionError: (
|
|
9497
|
+
declare const pathParamsMissingInRouteFunctionError: (route: unknown) => RuntimeError<12>;
|
|
9244
9498
|
/**
|
|
9245
9499
|
* @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.
|
|
9246
9500
|
*/
|
|
@@ -9444,7 +9698,7 @@ type QueryFormChange<TFields extends QueryFormFields> = {
|
|
|
9444
9698
|
* Options passed to `observe()`. Named distinctly from the legacy
|
|
9445
9699
|
* `QueryFormObserveOptions` to keep both APIs' barrel exports intact.
|
|
9446
9700
|
*/
|
|
9447
|
-
type QueryFormSignalsObserveOptions = {
|
|
9701
|
+
type QueryFormSignalsObserveOptions<TKey extends string = string> = {
|
|
9448
9702
|
/**
|
|
9449
9703
|
* Sync the committed value to the URL query params.
|
|
9450
9704
|
* @default true
|
|
@@ -9464,7 +9718,7 @@ type QueryFormSignalsObserveOptions = {
|
|
|
9464
9718
|
* Keep the committed value in a storage and restore it when the URL carries none of the persisted fields.
|
|
9465
9719
|
* Off unless set.
|
|
9466
9720
|
*/
|
|
9467
|
-
readonly persistence?: QueryFormPersistence
|
|
9721
|
+
readonly persistence?: QueryFormPersistence<TKey>;
|
|
9468
9722
|
};
|
|
9469
9723
|
/**
|
|
9470
9724
|
* The storage a query form persists into. `sessionStorage` and `localStorage` satisfy it. Both methods are
|
|
@@ -9475,7 +9729,7 @@ type QueryFormStorage = {
|
|
|
9475
9729
|
setItem(key: string, value: string): void;
|
|
9476
9730
|
};
|
|
9477
9731
|
/** Where and what a query form persists - the `persistence` option of `observe()`. */
|
|
9478
|
-
type QueryFormPersistence = {
|
|
9732
|
+
type QueryFormPersistence<TKey extends string = string> = {
|
|
9479
9733
|
/** The storage key. Scope it per list, e.g. `'players-list'`. */
|
|
9480
9734
|
readonly key: string;
|
|
9481
9735
|
/**
|
|
@@ -9484,7 +9738,7 @@ type QueryFormPersistence = {
|
|
|
9484
9738
|
*/
|
|
9485
9739
|
readonly storage: 'session' | 'local' | QueryFormStorage;
|
|
9486
9740
|
/** The fields to persist and to check the URL for. Defaults to every field. */
|
|
9487
|
-
readonly fields?: readonly
|
|
9741
|
+
readonly fields?: readonly TKey[];
|
|
9488
9742
|
};
|
|
9489
9743
|
/**
|
|
9490
9744
|
* Options for a single programmatic write (`setValue`/`patchValue`/reset).
|
|
@@ -9577,7 +9831,7 @@ type QueryFormSignals<TFields extends QueryFormFields> = {
|
|
|
9577
9831
|
/** The default value of the whole form. */
|
|
9578
9832
|
readonly defaultValue: QueryFormModel<TFields>;
|
|
9579
9833
|
/** Start syncing with the URL. Returns the form, so it can be chained onto the definition. */
|
|
9580
|
-
observe(options?: QueryFormSignalsObserveOptions): QueryFormSignals<TFields>;
|
|
9834
|
+
observe(options?: QueryFormSignalsObserveOptions<keyof TFields & string>): QueryFormSignals<TFields>;
|
|
9581
9835
|
/**
|
|
9582
9836
|
* Stop syncing and strip the form's params from the URL. A pending debounced edit is committed to `value`
|
|
9583
9837
|
* but not written to the URL. Only an explicit call strips the params - the
|
|
@@ -9668,7 +9922,8 @@ type DateStringQueryFieldConfig = QueryFieldConfig<string | null> & {
|
|
|
9668
9922
|
readonly as: 'string';
|
|
9669
9923
|
};
|
|
9670
9924
|
/**
|
|
9671
|
-
* A single date field. By default it holds a `Date
|
|
9925
|
+
* A single date field. By default it holds a `Date`, written to the URL as an ISO string and read back from
|
|
9926
|
+
* any `Date`-parseable one.
|
|
9672
9927
|
* `as: 'string'` types it `string | null` like the `@ethlete/components` date and time controls, so
|
|
9673
9928
|
* `[formField]` binds it to them; the URL then carries the control's `valueFormat` string verbatim.
|
|
9674
9929
|
*
|
|
@@ -9735,6 +9990,8 @@ type WebSocketClientSocket = {
|
|
|
9735
9990
|
readonly recovered: boolean;
|
|
9736
9991
|
/** `false` once socket.io gave up reconnecting on its own - after a rejected handshake, for example. */
|
|
9737
9992
|
readonly active?: boolean;
|
|
9993
|
+
/** The emits socket.io holds while disconnected and flushes on the next connect. */
|
|
9994
|
+
readonly sendBuffer?: unknown[];
|
|
9738
9995
|
};
|
|
9739
9996
|
/**
|
|
9740
9997
|
* The `io` factory of `socket.io-client`, declared structurally.
|
|
@@ -9769,14 +10026,31 @@ type CreateWebSocketClientConfigOptions = {
|
|
|
9769
10026
|
withCredentials?: boolean;
|
|
9770
10027
|
/**
|
|
9771
10028
|
* The handshake payload, sent on every connect and reconnect. Pass a function to read a fresh value
|
|
9772
|
-
*
|
|
10029
|
+
* each time; it runs outside an injection context, so it cannot call `injectAuthProvider()`. For a
|
|
10030
|
+
* bearer auth provider use {@link authProvider} instead. Setting both is a dev-mode error and
|
|
10031
|
+
* `authProvider` wins.
|
|
9773
10032
|
*
|
|
9774
10033
|
* @example
|
|
9775
10034
|
* ```ts
|
|
9776
|
-
* createWebSocketClient({ name: 'match', url, io, auth: () => ({ token:
|
|
10035
|
+
* createWebSocketClient({ name: 'match', url, io, auth: () => ({ token: readCookieToken() }) });
|
|
9777
10036
|
* ```
|
|
9778
10037
|
*/
|
|
9779
10038
|
auth?: WebSocketClientAuth | (() => WebSocketClientAuth);
|
|
10039
|
+
/**
|
|
10040
|
+
* A bearer auth provider whose session the socket follows. The handshake carries
|
|
10041
|
+
* `{ token: accessToken() }`. The socket does not connect while the session is `'unknown'` or
|
|
10042
|
+
* `'restoring'` and reconnects when a session starts (a login, a seed, or a different user). On logout
|
|
10043
|
+
* it completes its rooms, sets every `joinRoom()` signal to `null` until the next session re-joins it,
|
|
10044
|
+
* and reconnects as anonymous. Emits still buffered from the ended session are dropped. A token
|
|
10045
|
+
* rotation within a session does not reconnect; the next reconnect reads the fresh token. A client
|
|
10046
|
+
* without `authProvider` ignores the auth session entirely.
|
|
10047
|
+
*
|
|
10048
|
+
* @example
|
|
10049
|
+
* ```ts
|
|
10050
|
+
* createWebSocketClient({ name: 'match', url, io, authProvider: myAuthProviderRef });
|
|
10051
|
+
* ```
|
|
10052
|
+
*/
|
|
10053
|
+
authProvider?: AnyCreateBearerAuthProviderResult;
|
|
9780
10054
|
};
|
|
9781
10055
|
/** A default socket io message view */
|
|
9782
10056
|
type SocketMessageView<TMessageData = unknown> = {
|
|
@@ -9802,7 +10076,10 @@ type WebSocketClient<TMessageData extends SocketMessageView> = {
|
|
|
9802
10076
|
joinRoom: (room: string | (() => string | null)) => Signal<WebSocketRoom<TMessageData> | null>;
|
|
9803
10077
|
/** Whether the client is connected to the server */
|
|
9804
10078
|
isConnected: Signal<boolean>;
|
|
9805
|
-
/**
|
|
10079
|
+
/**
|
|
10080
|
+
* Sends a message to the server. socket.io buffers it while the connection is down; with an
|
|
10081
|
+
* `authProvider`, a buffered message is dropped when the session ends.
|
|
10082
|
+
*/
|
|
9806
10083
|
send: (message: {
|
|
9807
10084
|
event: string;
|
|
9808
10085
|
data: unknown;
|
|
@@ -9831,7 +10108,7 @@ type AnyWebSocketClient<TMessageData extends SocketMessageView = SocketMessageVi
|
|
|
9831
10108
|
declare const createWebSocketClient: <TMessageData extends SocketMessageView = SocketMessageView>(options: CreateWebSocketClientConfigOptions) => WebSocketClientResult<TMessageData>;
|
|
9832
10109
|
|
|
9833
10110
|
/** The version of `@ethlete/query` this build was cut from. */
|
|
9834
|
-
declare const QUERY_VERSION = "6.0.0-next.
|
|
10111
|
+
declare const QUERY_VERSION = "6.0.0-next.56";
|
|
9835
10112
|
|
|
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 };
|
|
10113
|
+
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, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, IS_QUERY_REQUEST, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, 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, applyQueryFeatures, authAccessTokenExpiryUnreadable, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, clearQueryDevtoolsTokenTtl, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, contentfulGqlLikePaginationAdapter, 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, createQueryErrorResponse, createQueryFeature, createQueryGroup, 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, detectContentTypeHeader, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, executeUntilSettled$, extractExpiresInSeconds, extractFormViolations, extractHtmlErrorMessage, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, getDefaultHeaders, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, gqlErrorsInResponse, hasHeader, htmlErrorPayload, htmlQueryErrorParser, ignoreAutoRefresh, injectInfinityQueryResponseDelay, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, invalidatesUsedOnRead, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isEmptyString, isGqlQueryConfig, isHtmlErrorPayload, isIdempotentQueryMethod, isLegacyQuery, isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, isUnderInvalidatedUrl, legacyPrepareWithoutInjectionContext, mapToPaginated, mapViolationsToFormErrors, maybeExecute, mergeHeaders, nestedEffect, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideLegacyPrepareFallback, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryBatchAlreadyRunning, queryBatchWithArgsUsed, queryClientFeatureUsedMultipleTimes, queryComputed, queryComputedTillTruthy, queryCreatedInReactiveContext, queryErrorMessage, queryErrorMessages, queryExecute, queryExecutedAfterDestroyMessage, queryExecutedWhileParkedMessage, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, recordExecutionArgs, registerQueryErrorParser, removeFrom, request, resetExecuteState, resetPageOnError, resolveInvalidationUrl, resolveQueryHeaders, searchQueryField, serializeBody, setQueryDevtoolsTokenTtl, setQueryDevtoolsUiMounted, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, skipParkedExecution, sortQueryField, splitQueryConfig, stringArrayQueryField, switchQueryCollectionState, switchQueryState, symfonyQueryErrorParser, tableSortQueryField, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, 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, withOptimisticUpdate, withOptimisticUpdateUsedOnRead, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withQueryPersistence, withRefreshQuery, withResponseUpdate, withSuccessHandling, withSymfonyErrors, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal, wrapQuerySyncMessage, EMPTY_QUERY_DEVTOOLS_FAULT as ɵEMPTY_QUERY_DEVTOOLS_FAULT, MAX_QUERY_BATCH_TOMBSTONES as ɵMAX_QUERY_BATCH_TOMBSTONES, MAX_QUERY_BATCH_TOMBSTONE_BUCKETS as ɵMAX_QUERY_BATCH_TOMBSTONE_BUCKETS, MAX_QUERY_DEVTOOLS_TOMBSTONES as ɵMAX_QUERY_DEVTOOLS_TOMBSTONES, QUERY_DEVTOOLS_FAULT_STATUSES as ɵQUERY_DEVTOOLS_FAULT_STATUSES, QUERY_DEVTOOLS_TOKEN_TTL_LIMIT as ɵQUERY_DEVTOOLS_TOKEN_TTL_LIMIT, addQueryDevtoolsAuthAccount as ɵaddQueryDevtoolsAuthAccount, applyQueryDevtoolsOverrides as ɵapplyQueryDevtoolsOverrides, applyQueryDevtoolsTokenTtl as ɵapplyQueryDevtoolsTokenTtl, armAllQueryDevtoolsMocks as ɵarmAllQueryDevtoolsMocks, armQueryDevtoolsMock as ɵarmQueryDevtoolsMock, armQueryDevtoolsOverrideTransfer as ɵarmQueryDevtoolsOverrideTransfer, canOverrideQueryDevtoolsTokenTtl as ɵcanOverrideQueryDevtoolsTokenTtl, clearQueryDevtoolsArmedMocks as ɵclearQueryDevtoolsArmedMocks, clearQueryDevtoolsAuthCredentials as ɵclearQueryDevtoolsAuthCredentials, clearQueryDevtoolsAuthSessions as ɵclearQueryDevtoolsAuthSessions, clearQueryDevtoolsFaults as ɵclearQueryDevtoolsFaults, clearQueryDevtoolsMockStore as ɵclearQueryDevtoolsMockStore, clearQueryDevtoolsOverrideStore as ɵclearQueryDevtoolsOverrideStore, clearQueryDevtoolsStore as ɵclearQueryDevtoolsStore, clearQueryDevtoolsTombstones as ɵclearQueryDevtoolsTombstones, clearRestoredQueryDevtoolsOverrides as ɵclearRestoredQueryDevtoolsOverrides, collectLeafPaths as ɵcollectLeafPaths, collectQueryDevtoolsSchemaComponents as ɵcollectQueryDevtoolsSchemaComponents, countUnresolvedQueryDevtoolsOverrides as ɵcountUnresolvedQueryDevtoolsOverrides, createQueryDevtoolsOverrides as ɵcreateQueryDevtoolsOverrides, deleteQueryDevtoolsMock as ɵdeleteQueryDevtoolsMock, detectPaginationShape as ɵdetectPaginationShape, forgetQueryDevtoolsAuthSession as ɵforgetQueryDevtoolsAuthSession, forgetQueryDevtoolsAuthSessionsFor as ɵforgetQueryDevtoolsAuthSessionsFor, generateQueryDevtoolsNumberPreset as ɵgenerateQueryDevtoolsNumberPreset, generateQueryDevtoolsSampleNumber as ɵgenerateQueryDevtoolsSampleNumber, generateQueryDevtoolsStringPreset as ɵgenerateQueryDevtoolsStringPreset, hasQueryDevtoolsOverridesAtPath as ɵhasQueryDevtoolsOverridesAtPath, isDateShapedLeaf as ɵisDateShapedLeaf, isQueryDevtoolsEnabled as ɵisQueryDevtoolsEnabled, isQueryDevtoolsFaultArmed as ɵisQueryDevtoolsFaultArmed, isQueryDevtoolsRepositoryLive as ɵisQueryDevtoolsRepositoryLive, loadQueryDevtoolsSchema as ɵloadQueryDevtoolsSchema, loginQueryDevtoolsAuthAccount as ɵloginQueryDevtoolsAuthAccount, logoutQueryDevtoolsAuthSession as ɵlogoutQueryDevtoolsAuthSession, matchesQueryDevtoolsMockPattern as ɵmatchesQueryDevtoolsMockPattern, matchesQueryDevtoolsMockQuery as ɵmatchesQueryDevtoolsMockQuery, measureQueryDevtoolsPayload as ɵmeasureQueryDevtoolsPayload, parseQueryDevtoolsOverrideTransfer as ɵparseQueryDevtoolsOverrideTransfer, queryDevtoolsAbout as ɵqueryDevtoolsAbout, queryDevtoolsAllowsLocalAuthSessions as ɵqueryDevtoolsAllowsLocalAuthSessions, queryDevtoolsApiEnvIds as ɵqueryDevtoolsApiEnvIds, queryDevtoolsApiEnvIsProduction as ɵqueryDevtoolsApiEnvIsProduction, queryDevtoolsApiEnvScope as ɵqueryDevtoolsApiEnvScope, queryDevtoolsApiEnvValues as ɵqueryDevtoolsApiEnvValues, queryDevtoolsApiEnvs as ɵqueryDevtoolsApiEnvs, queryDevtoolsArmedMocks as ɵqueryDevtoolsArmedMocks, queryDevtoolsArmedMocksRestored as ɵqueryDevtoolsArmedMocksRestored, queryDevtoolsAuthAccountsFor as ɵqueryDevtoolsAuthAccountsFor, queryDevtoolsAuthActive as ɵqueryDevtoolsAuthActive, queryDevtoolsAuthFieldsFor as ɵqueryDevtoolsAuthFieldsFor, queryDevtoolsAuthOtherScopeCount as ɵqueryDevtoolsAuthOtherScopeCount, queryDevtoolsAuthSessions as ɵqueryDevtoolsAuthSessions, queryDevtoolsAuthSessionsFor as ɵqueryDevtoolsAuthSessionsFor, queryDevtoolsAuthTabLocal as ɵqueryDevtoolsAuthTabLocal, queryDevtoolsEntries as ɵqueryDevtoolsEntries, queryDevtoolsFaults as ɵqueryDevtoolsFaults, queryDevtoolsFaultsRestored as ɵqueryDevtoolsFaultsRestored, queryDevtoolsMockId as ɵqueryDevtoolsMockId, queryDevtoolsMocks as ɵqueryDevtoolsMocks, queryDevtoolsOverridePersistence as ɵqueryDevtoolsOverridePersistence, queryDevtoolsRequestPath as ɵqueryDevtoolsRequestPath, queryDevtoolsResponseHistory as ɵqueryDevtoolsResponseHistory, queryDevtoolsRestoredOverridesScope as ɵqueryDevtoolsRestoredOverridesScope, queryDevtoolsSchemaNames as ɵqueryDevtoolsSchemaNames, queryDevtoolsSchemaRoutes as ɵqueryDevtoolsSchemaRoutes, queryDevtoolsSchemaState as ɵqueryDevtoolsSchemaState, queryDevtoolsSettings as ɵqueryDevtoolsSettings, queryDevtoolsStorage as ɵqueryDevtoolsStorage, queryDevtoolsTokenTtls as ɵqueryDevtoolsTokenTtls, readQueryDevtoolsStore as ɵreadQueryDevtoolsStore, registerEthleteVersion as ɵregisterEthleteVersion, removeQueryDevtoolsAuthAccount as ɵremoveQueryDevtoolsAuthAccount, renameQueryDevtoolsAuthSession as ɵrenameQueryDevtoolsAuthSession, ɵresetQueryDevtoolsForTesting, restoredQueryDevtoolsOverrides as ɵrestoredQueryDevtoolsOverrides, saveQueryDevtoolsMock as ɵsaveQueryDevtoolsMock, seedQueryDevtoolsSchemaBody as ɵseedQueryDevtoolsSchemaBody, seedQueryDevtoolsSchemaRoute as ɵseedQueryDevtoolsSchemaRoute, serializeQueryDevtoolsOverrideTransfer as ɵserializeQueryDevtoolsOverrideTransfer, setQueryDevtoolsApiEnv as ɵsetQueryDevtoolsApiEnv, setQueryDevtoolsAppInfo as ɵsetQueryDevtoolsAppInfo, setQueryDevtoolsArmedMocksScope as ɵsetQueryDevtoolsArmedMocksScope, setQueryDevtoolsAuthCredentials as ɵsetQueryDevtoolsAuthCredentials, setQueryDevtoolsAuthTabLocal as ɵsetQueryDevtoolsAuthTabLocal, setQueryDevtoolsFault as ɵsetQueryDevtoolsFault, setQueryDevtoolsFaultsScope as ɵsetQueryDevtoolsFaultsScope, setQueryDevtoolsOverridePersistence as ɵsetQueryDevtoolsOverridePersistence, setQueryDevtoolsOverridesScope as ɵsetQueryDevtoolsOverridesScope, setQueryDevtoolsSettings as ɵsetQueryDevtoolsSettings, smartDuplicateArrayItem as ɵsmartDuplicateArrayItem, snapshotQueryDevtoolsHandle as ɵsnapshotQueryDevtoolsHandle, stringifyQueryRouteParts as ɵstringifyQueryRouteParts, sumQueryDevtoolsStats as ɵsumQueryDevtoolsStats, switchQueryDevtoolsAuthSession as ɵswitchQueryDevtoolsAuthSession, tombstoneOf as ɵtombstoneOf, writeQueryDevtoolsStore as ɵwriteQueryDevtoolsStore };
|
|
10114
|
+
export type { AnyBearerAuthProvider, AnyCreateBearerAuthProviderResult, AnyCreateGqlQueryCreatorOptions, AnyCreateQueryClientResult, AnyGqlQueryConfig, AnyInfinityQuery, AnyInfinityQueryConfig, AnyLegacyQuery, AnyLegacyQueryCreator, AnyNewQuery, AnyPagedQueryStack, AnyQueryBatch, AnyQueryBatchItemResult, AnyQueryBuilder, AnyQueryClient, AnyQueryCollection, AnyQueryCollectionData, AnyQueryCollectionResponse, AnyQueryCreator, AnyQueryCreatorCollection, AnyQueryForm, AnyQueryGroup, 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, 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, LeaderInstanceCountChangeEventData, LeaderStatusChangeEventData, LegacyArgumentsOfQueryArgs, LegacyQueryPrepareFn, Loading, LogoutEventData, MapViolationsToFormErrorsOptions, Method, ObservableSignal, OptimisticUpdateContext, OptionalQueryFieldOptions, 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, QueryBeforeExecuteFn, QueryClient, QueryClientDevtoolsOptions, QueryClientErrorPipelineFeature, QueryClientFeature, QueryClientFeatureContext, QueryClientFeatureFn, QueryClientMultiTabSyncFeature, QueryClientPersistenceFeature, QueryClientRef, QueryClientSubtle, QueryCollectionKeysOf, QueryCollectionOf, QueryCollectionWithNullableQuery, QueryConfig, QueryConfigBase, QueryConfigWithoutMethod, QueryContainerConfig, QueryCreator, QueryCreatorInput, QueryDataOf, QueryDependencies, QueryDevtoolsApiEnv, QueryDevtoolsApiEnvSwitch, QueryDevtoolsAppInfo, QueryDevtoolsAuthAccount, QueryDevtoolsAuthField, QueryDevtoolsFeatureDescriber, QueryDevtoolsFeatureDetail, QueryDevtoolsOptions, QueryDevtoolsSchemaLoader, QueryDevtoolsSchemaLoaders, 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, QueryGroup, QueryGroupLatest, QueryGroupMembers, QueryGroupSuccess, QueryHeaders, QueryHeadersInput, QueryInvalidatesContext, QueryInvalidatesOption, QueryInvalidationCandidate, QueryInvalidationFilterFn, QueryInvalidationOptions, QueryInvalidationTarget, QueryInvalidationUrl, 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, QueryTagsContext, QueryTagsOption, QueryTrigger, RawResponseType, ReadonlyQuery, RefreshFailure, RemoveFromConfig, RequestArgs, RequestConfig, RequestError, RequestEvent, RequestHeaders, RequestHeadersMethodMap, RequestHttpEvent, RequestProgress, RequestRetryFn, RequestRetryFnConfig, RequestRetryFnResult, RequiresTransform, ResetExecuteStateOptions, ResetPageOnErrorOperatorConfig, ResponseType, RestQueryConfig, 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, WithOptimisticUpdateOptions, WithPageResetOnErrorFeatureOptions, WithPathParams, WithPollingFeatureOptions, WithQueryParams, WithResponseUpdateFeatureFnData, WithResponseUpdateFeatureOptions, WithSuccessHandlingFeatureOptions, WithVariables, DescribableFeature as ɵDescribableFeature, JsonPath as ɵJsonPath, OverrideOp as ɵOverrideOp, QueryDevtoolsAbout as ɵQueryDevtoolsAbout, QueryDevtoolsAuthAccountView as ɵQueryDevtoolsAuthAccountView, QueryDevtoolsAuthLocalAccount as ɵQueryDevtoolsAuthLocalAccount, QueryDevtoolsAuthProviderHandle as ɵQueryDevtoolsAuthProviderHandle, QueryDevtoolsAuthProviderRegistration as ɵQueryDevtoolsAuthProviderRegistration, QueryDevtoolsAuthQuery as ɵQueryDevtoolsAuthQuery, QueryDevtoolsAuthSeed as ɵQueryDevtoolsAuthSeed, QueryDevtoolsAuthSession as ɵQueryDevtoolsAuthSession, QueryDevtoolsEntry as ɵQueryDevtoolsEntry, QueryDevtoolsEntryKind as ɵQueryDevtoolsEntryKind, QueryDevtoolsEntryMeta as ɵQueryDevtoolsEntryMeta, QueryDevtoolsFault as ɵQueryDevtoolsFault, QueryDevtoolsFaultTarget as ɵQueryDevtoolsFaultTarget, QueryDevtoolsFeature as ɵQueryDevtoolsFeature, QueryDevtoolsFormField as ɵQueryDevtoolsFormField, QueryDevtoolsFormHandle as ɵQueryDevtoolsFormHandle, QueryDevtoolsFormLinksHandle as ɵQueryDevtoolsFormLinksHandle, QueryDevtoolsFormLinksRecorder as ɵQueryDevtoolsFormLinksRecorder, QueryDevtoolsMock as ɵQueryDevtoolsMock, QueryDevtoolsMockTarget as ɵQueryDevtoolsMockTarget, QueryDevtoolsOverrideEntry as ɵQueryDevtoolsOverrideEntry, QueryDevtoolsOverrideTransfer as ɵQueryDevtoolsOverrideTransfer, QueryDevtoolsOverrideTransferParse as ɵQueryDevtoolsOverrideTransferParse, QueryDevtoolsOverridesHandle as ɵQueryDevtoolsOverridesHandle, QueryDevtoolsOverridesRecorder as ɵQueryDevtoolsOverridesRecorder, QueryDevtoolsPayload as ɵQueryDevtoolsPayload, QueryDevtoolsRegistrar as ɵQueryDevtoolsRegistrar, QueryDevtoolsRegistration as ɵQueryDevtoolsRegistration, QueryDevtoolsResolvedFault as ɵQueryDevtoolsResolvedFault, QueryDevtoolsResolvedMock as ɵQueryDevtoolsResolvedMock, QueryDevtoolsRoutePart as ɵQueryDevtoolsRoutePart, QueryDevtoolsRun as ɵQueryDevtoolsRun, QueryDevtoolsRunError as ɵQueryDevtoolsRunError, QueryDevtoolsRunStatus as ɵQueryDevtoolsRunStatus, QueryDevtoolsSchemaComponents as ɵQueryDevtoolsSchemaComponents, QueryDevtoolsSchemaRoute as ɵQueryDevtoolsSchemaRoute, QueryDevtoolsSchemaSeed as ɵQueryDevtoolsSchemaSeed, QueryDevtoolsSchemaState as ɵQueryDevtoolsSchemaState, QueryDevtoolsSeedStyle as ɵQueryDevtoolsSeedStyle, QueryDevtoolsSettings as ɵQueryDevtoolsSettings, QueryDevtoolsStats as ɵQueryDevtoolsStats, QueryDevtoolsStatsHandle as ɵQueryDevtoolsStatsHandle, QueryDevtoolsStatsRecorder as ɵQueryDevtoolsStatsRecorder, QueryDevtoolsStorageScope as ɵQueryDevtoolsStorageScope, RestoredQueryDevtoolsOverrides as ɵRestoredQueryDevtoolsOverrides };
|