@ethlete/query 6.0.0-next.19 → 6.0.0-next.20
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 +56 -0
- package/fesm2022/ethlete-query.mjs +815 -78
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/generators/migrate-to-query-v3/auth-provider-scaffold.js +131 -0
- package/generators/migrate-to-query-v3/cleanup-migration.js +128 -77
- package/generators/migrate-to-query-v3/http-client-check.js +93 -0
- package/generators/migrate-to-query-v3/legacy-prepare-migration.js +8 -9
- package/generators/migrate-to-query-v3/legacy-query-creator-migration.js +155 -137
- package/generators/migrate-to-query-v3/migration-scope.js +41 -0
- package/generators/migrate-to-query-v3/migration.js +17 -9
- package/generators/migrate-to-query-v3/module-graph.js +153 -0
- package/generators/migrate-to-query-v3/query-client-migration.js +53 -5
- package/generators/migrate-to-query-v3/rename-symbols.js +193 -0
- package/generators/migrate-to-query-v3/schema.json +12 -0
- package/package.json +1 -1
- package/types/ethlete-query.d.ts +540 -17
package/types/ethlete-query.d.ts
CHANGED
|
@@ -545,6 +545,7 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
|
|
|
545
545
|
newQuery: TNewQuery;
|
|
546
546
|
_arguments: RequestArgs<QueryArgsOf<TNewQuery>>;
|
|
547
547
|
entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined;
|
|
548
|
+
private _isDestroyed;
|
|
548
549
|
state$: Observable<V2QueryState<Data>>;
|
|
549
550
|
get rawState(): V2QueryState<any>;
|
|
550
551
|
get isExpired(): boolean | undefined;
|
|
@@ -554,7 +555,15 @@ declare class LegacyQuery<Response, Arguments extends BaseArguments | undefined,
|
|
|
554
555
|
get store(): null;
|
|
555
556
|
get canBeCached(): boolean;
|
|
556
557
|
get _isInMockMode(): boolean;
|
|
557
|
-
constructor(newQuery: TNewQuery, _arguments: RequestArgs<QueryArgsOf<TNewQuery>>, entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined
|
|
558
|
+
constructor(newQuery: TNewQuery, _arguments: RequestArgs<QueryArgsOf<TNewQuery>>, entity?: QueryEntityConfig<Store, Data, Response, Arguments, Id> | undefined,
|
|
559
|
+
/**
|
|
560
|
+
* Wraps an inert query — see `createInertQuery`. Skips everything that needs a live injector,
|
|
561
|
+
* so the wrapper is safe to build during teardown.
|
|
562
|
+
*
|
|
563
|
+
* @internal
|
|
564
|
+
*/
|
|
565
|
+
_isInert?: boolean);
|
|
566
|
+
private _teardown;
|
|
558
567
|
destroy(): void;
|
|
559
568
|
execute(options?: ExecuteQueryOptions): this;
|
|
560
569
|
abort(): this;
|
|
@@ -646,6 +655,12 @@ type CreateLegacyQueryCreatorOptions<TArgs extends QueryArgs, Response, Store ex
|
|
|
646
655
|
* Object containing the query's entity store information.
|
|
647
656
|
*/
|
|
648
657
|
entity?: QueryEntityConfig<Store, Data, Response, LegacyArgumentsOfQueryArgs<TArgs>, Id>;
|
|
658
|
+
/**
|
|
659
|
+
* The name this creator is exported under, used to name it in error messages. Emitted by the
|
|
660
|
+
* `migrate-to-query-v3` generator; worth passing by hand too, since without it a `prepare()`
|
|
661
|
+
* called outside an injection context can only be located by bisection.
|
|
662
|
+
*/
|
|
663
|
+
name?: string;
|
|
649
664
|
};
|
|
650
665
|
type WithLegacyConfig = {
|
|
651
666
|
/**
|
|
@@ -1047,7 +1062,10 @@ type QueryCollectionOf<T extends {
|
|
|
1047
1062
|
query: ConstructQuery<T[K]>;
|
|
1048
1063
|
};
|
|
1049
1064
|
}[keyof T];
|
|
1050
|
-
type AnyQueryCollection =
|
|
1065
|
+
type AnyQueryCollection = {
|
|
1066
|
+
type: string;
|
|
1067
|
+
query: AnyV2Query | AnyLegacyQuery;
|
|
1068
|
+
};
|
|
1051
1069
|
type QueryOf<T extends AnyQueryCollection | AnyLegacyQuery | AnyV2Query | null> = T extends AnyV2Query ? T : T extends AnyLegacyQuery ? T : T extends AnyQueryCollection ? T['query'] : never;
|
|
1052
1070
|
type AnyQueryCollectionResponse<T extends AnyQueryCollection> = QueryResponseOf<T['query']>;
|
|
1053
1071
|
type AnyQueryCollectionData<T extends AnyQueryCollection> = QueryDataOf<T['query']>;
|
|
@@ -1149,7 +1167,7 @@ declare const isQueryCollection: <T extends AnyQueryCollection>(query: unknown)
|
|
|
1149
1167
|
declare const createQueryCollection: <T extends AnyQueryCreatorCollection, R extends QueryCollectionOf<T>>(queryMap: T) => BehaviorSubject<R | null>;
|
|
1150
1168
|
declare const createQueryCollectionSubject: <T extends AnyQueryCreatorCollection, R extends QueryCollectionOf<T>>(queryMap: T, config?: QueryContainerConfig) => BehaviorSubject<R | null>;
|
|
1151
1169
|
declare const createQueryCollectionSignal: <T extends AnyQueryCreatorCollection, R extends QueryCollectionOf<T>>(queryMap: T, config?: QueryContainerConfig) => _angular_core.WritableSignal<R | null>;
|
|
1152
|
-
declare const extractQuery: <T extends AnyV2Query | AnyLegacyQuery | AnyQueryCollection | null>(v: T) =>
|
|
1170
|
+
declare const extractQuery: <T extends AnyV2Query | AnyLegacyQuery | AnyQueryCollection | null>(v: T) => AnyV2Query | AnyLegacyQuery | null;
|
|
1153
1171
|
declare const getDefaultHeaders: (headers: RequestHeaders | RequestHeadersMethodMap | null | undefined, method: Method) => RequestHeaders;
|
|
1154
1172
|
declare const castQueryCreatorTypes: <QC extends AnyV2QueryCreator, Arguments extends V2QueryArgsOf<QC>, Response extends QueryResponseOf<QC>, Store extends QueryStoreOf<QC>, Data extends QueryDataOf<QC>, Route extends V2RouteType<Arguments>, Id extends QueryStoreIdOf<QC>, OverrideArguments extends BaseArguments | undefined, OverrideResponse extends Response | undefined>(config: {
|
|
1155
1173
|
creator: QC;
|
|
@@ -2079,6 +2097,27 @@ type QueryErrorResponseItem = {
|
|
|
2079
2097
|
message: string;
|
|
2080
2098
|
};
|
|
2081
2099
|
declare const isQueryErrorResponse: (error: unknown) => error is QueryErrorResponse;
|
|
2100
|
+
/**
|
|
2101
|
+
* Every message carried by an error, flattened into a plain list — one entry for a single error,
|
|
2102
|
+
* one per violation for a list (a form response with several field violations), empty for `null`.
|
|
2103
|
+
*
|
|
2104
|
+
* The single/list split exists because that is how APIs answer; UI almost never wants to branch on
|
|
2105
|
+
* it. Reach for this when rendering, and keep {@link QueryErrorResponse} for anything that needs
|
|
2106
|
+
* the status code or the raw response.
|
|
2107
|
+
*
|
|
2108
|
+
* @example
|
|
2109
|
+
* ```html
|
|
2110
|
+
* @for (message of queryErrorMessages(myQuery.error()); track message) {
|
|
2111
|
+
* <p class="error">{{ message }}</p>
|
|
2112
|
+
* }
|
|
2113
|
+
* ```
|
|
2114
|
+
*/
|
|
2115
|
+
declare const queryErrorMessages: (error: QueryErrorResponse | null | undefined) => string[];
|
|
2116
|
+
/**
|
|
2117
|
+
* The first message of an error, or `null` when there is none — the single-line counterpart to
|
|
2118
|
+
* {@link queryErrorMessages}, for a toast or a form-field hint.
|
|
2119
|
+
*/
|
|
2120
|
+
declare const queryErrorMessage: (error: QueryErrorResponse | null | undefined) => string | null;
|
|
2082
2121
|
declare const createQueryErrorResponse: (error: unknown) => QueryErrorResponse;
|
|
2083
2122
|
|
|
2084
2123
|
type ResetExecuteStateOptions<TArgs extends QueryArgs> = {
|
|
@@ -2212,6 +2251,7 @@ declare const QueryFeatureType: {
|
|
|
2212
2251
|
readonly WITH_POLLING: "WITH_POLLING";
|
|
2213
2252
|
readonly WITH_AUTO_REFRESH: "WITH_AUTO_REFRESH";
|
|
2214
2253
|
readonly WITH_RESPONSE_UPDATE: "WITH_RESPONSE_UPDATE";
|
|
2254
|
+
readonly WITH_PAGE_RESET_ON_ERROR: "WITH_PAGE_RESET_ON_ERROR";
|
|
2215
2255
|
};
|
|
2216
2256
|
type QueryFeatureType = (typeof QueryFeatureType)[keyof typeof QueryFeatureType];
|
|
2217
2257
|
type QueryFeatureContext<TArgs extends QueryArgs> = {
|
|
@@ -2321,6 +2361,60 @@ type WithResponseUpdateFeatureOptions<TArgs extends QueryArgs> = {
|
|
|
2321
2361
|
updater: (data: WithResponseUpdateFeatureFnData<TArgs>) => ResponseType<TArgs> | null;
|
|
2322
2362
|
};
|
|
2323
2363
|
declare const withResponseUpdate: <TArgs extends QueryArgs>(options: WithResponseUpdateFeatureOptions<TArgs>) => QueryFeature<TArgs>;
|
|
2364
|
+
/**
|
|
2365
|
+
* Whether an error means the requested page is out of range: HTTP `416`, or a
|
|
2366
|
+
* `500` carrying a Symfony/Pagerfanta out-of-range detail (the dev-mode shape).
|
|
2367
|
+
* Exported so it can also be used as the predicate of a `withErrorHandling` handler.
|
|
2368
|
+
*/
|
|
2369
|
+
declare const isPageOutOfRangeError: (error: QueryErrorResponse) => boolean;
|
|
2370
|
+
type WithPageResetOnErrorFeatureOptions = {
|
|
2371
|
+
/**
|
|
2372
|
+
* Which errors trigger the reset.
|
|
2373
|
+
* @default isPageOutOfRangeError (HTTP 416, or a dev-mode 500 Pagerfanta out-of-range error)
|
|
2374
|
+
*/
|
|
2375
|
+
when?: (error: QueryErrorResponse) => boolean;
|
|
2376
|
+
} & ({
|
|
2377
|
+
/** The writable page signal to reset. */
|
|
2378
|
+
page: WritableSignal<number>;
|
|
2379
|
+
/**
|
|
2380
|
+
* The value to reset the page to.
|
|
2381
|
+
* @default 1
|
|
2382
|
+
*/
|
|
2383
|
+
resetTo?: number;
|
|
2384
|
+
reset?: never;
|
|
2385
|
+
} | {
|
|
2386
|
+
/**
|
|
2387
|
+
* Called when a matching error occurs. Reset whatever drives the page here —
|
|
2388
|
+
* a signal (`() => page.set(1)`) or a query form (`() => qf.resetFieldToDefault('page')`).
|
|
2389
|
+
*/
|
|
2390
|
+
reset: () => void;
|
|
2391
|
+
page?: never;
|
|
2392
|
+
resetTo?: never;
|
|
2393
|
+
});
|
|
2394
|
+
/**
|
|
2395
|
+
* A query feature that resets the page when the current page becomes out of range
|
|
2396
|
+
* — e.g. after a filter shrinks the result set below the current page. It reacts
|
|
2397
|
+
* to the query's error events and resets the page source; the normal reactive
|
|
2398
|
+
* re-execution then runs with the corrected page.
|
|
2399
|
+
*
|
|
2400
|
+
* Because query args are reactively sourced, this fixes the *source* (a signal or
|
|
2401
|
+
* query form field) rather than patching args directly — so the change sticks.
|
|
2402
|
+
*
|
|
2403
|
+
* @example
|
|
2404
|
+
* // signal-driven page
|
|
2405
|
+
* const users = getUsers(
|
|
2406
|
+
* withArgs(() => ({ queryParams: { page: page() } })),
|
|
2407
|
+
* withPageResetOnError({ page }),
|
|
2408
|
+
* );
|
|
2409
|
+
*
|
|
2410
|
+
* @example
|
|
2411
|
+
* // query-form-driven page
|
|
2412
|
+
* const users = getUsers(
|
|
2413
|
+
* withArgs(() => ({ queryParams: qf.value() })),
|
|
2414
|
+
* withPageResetOnError({ reset: () => qf.resetFieldToDefault('page') }),
|
|
2415
|
+
* );
|
|
2416
|
+
*/
|
|
2417
|
+
declare const withPageResetOnError: <TArgs extends QueryArgs>(options: WithPageResetOnErrorFeatureOptions) => QueryFeature<TArgs>;
|
|
2324
2418
|
|
|
2325
2419
|
type RouteType<TArgs extends QueryArgs> = PathParamsType<TArgs> extends {
|
|
2326
2420
|
[key: string]: unknown;
|
|
@@ -2376,6 +2470,14 @@ type BaseQueryCreatorOptions<TArgs extends QueryArgs = QueryArgs> = {
|
|
|
2376
2470
|
* @default Client's retryFn or shouldRetryRequest()
|
|
2377
2471
|
*/
|
|
2378
2472
|
retryFn?: ShouldRetryRequestFn;
|
|
2473
|
+
/**
|
|
2474
|
+
* How long (in ms) this query's cache entry is kept after its last consumer was destroyed.
|
|
2475
|
+
* Overrides the client level `keepUnusedFor`. Use `0` for responses that should never outlive their
|
|
2476
|
+
* consumer (very large payloads, or data that must not be shown stale).
|
|
2477
|
+
*
|
|
2478
|
+
* @default Client's keepUnusedFor (5 minutes)
|
|
2479
|
+
*/
|
|
2480
|
+
keepUnusedFor?: number;
|
|
2379
2481
|
/** Advanced query creator features. **WARNING!** Incorrectly using these features will likely **BREAK** your application. You have been warned! */
|
|
2380
2482
|
subtle?: BaseQueryCreatorOptionsSubtle;
|
|
2381
2483
|
};
|
|
@@ -2471,6 +2573,13 @@ type QueryRepositoryEvent = {
|
|
|
2471
2573
|
key: QueryKey;
|
|
2472
2574
|
isSecure: boolean;
|
|
2473
2575
|
request: HttpRequest<QueryArgs>;
|
|
2576
|
+
} | {
|
|
2577
|
+
/**
|
|
2578
|
+
* Every secure entry was torn down at once — a logout. Emitted after the cache is cleared so
|
|
2579
|
+
* secure queries can drop the state they hold themselves; the repository only owns the
|
|
2580
|
+
* requests, not the `response` signal of the query objects bound to them.
|
|
2581
|
+
*/
|
|
2582
|
+
type: 'unbind-all-secure';
|
|
2474
2583
|
};
|
|
2475
2584
|
type QueryRepositoryRequestOptions<TArgs extends QueryArgs> = {
|
|
2476
2585
|
/**
|
|
@@ -2515,6 +2624,12 @@ type QueryRepositoryCacheEntry = {
|
|
|
2515
2624
|
isSecure: boolean;
|
|
2516
2625
|
/** How many consumers currently hold a binding to the entry. */
|
|
2517
2626
|
consumerCount: number;
|
|
2627
|
+
/**
|
|
2628
|
+
* Whether the entry has no consumers left and is only being kept around for its
|
|
2629
|
+
* `keepUnusedFor` window. Such an entry is not a leak — it is waiting to be reused by a
|
|
2630
|
+
* consumer that comes back.
|
|
2631
|
+
*/
|
|
2632
|
+
isUnused: boolean;
|
|
2518
2633
|
/** The underlying HTTP request. */
|
|
2519
2634
|
request: HttpRequest<QueryArgs>;
|
|
2520
2635
|
};
|
|
@@ -2546,6 +2661,14 @@ type QueryRepository = {
|
|
|
2546
2661
|
unbind: (key: QueryKey | null, consumerDestroyRef: DestroyRef) => boolean;
|
|
2547
2662
|
/** Removes all secure requests and their consumers */
|
|
2548
2663
|
unbindAllSecure: () => void;
|
|
2664
|
+
/**
|
|
2665
|
+
* Re-executes every cacheable entry that still has consumers, bypassing the cache and restarting
|
|
2666
|
+
* in-flight requests. Entries kept only for their `keepUnusedFor` window are skipped — nobody is
|
|
2667
|
+
* looking at them, and they revalidate on their own when a consumer binds again.
|
|
2668
|
+
*
|
|
2669
|
+
* @see QueryClient.refreshQueriesInUse
|
|
2670
|
+
*/
|
|
2671
|
+
refreshInUse: () => void;
|
|
2549
2672
|
/** Observable stream of repository events (errors, successes, etc.) */
|
|
2550
2673
|
events$: Observable<QueryRepositoryEvent>;
|
|
2551
2674
|
/** Advanced repository internals used by the query devtools. */
|
|
@@ -2566,7 +2689,22 @@ type QueryRepositoryDependencies = {
|
|
|
2566
2689
|
type CreateQueryRepositoryConfig = CreateQueryClientConfigOptions & {
|
|
2567
2690
|
/** The dependencies of the query repository */
|
|
2568
2691
|
dependencies: QueryRepositoryDependencies;
|
|
2692
|
+
/**
|
|
2693
|
+
* Whether unused entries may be retained at all. `false` forces `keepUnusedFor` to `0` everywhere,
|
|
2694
|
+
* regardless of client or creator configuration — used to disable retention on the server, where a
|
|
2695
|
+
* per-request injector must not hold response bodies (and a pending timer) for minutes.
|
|
2696
|
+
* @default true
|
|
2697
|
+
*/
|
|
2698
|
+
retentionEnabled?: boolean;
|
|
2569
2699
|
};
|
|
2700
|
+
/** @see CreateQueryClientConfigOptions.keepUnusedFor */
|
|
2701
|
+
declare const DEFAULT_KEEP_UNUSED_FOR = 300000;
|
|
2702
|
+
/**
|
|
2703
|
+
* Hard cap on entries kept without consumers, per client. Retention is opportunistic, so a runaway
|
|
2704
|
+
* count (a search-as-you-type query produces a new cache key per keystroke, and each one goes through
|
|
2705
|
+
* `unbind`) must never grow unbounded — the least recently orphaned entries are dropped first.
|
|
2706
|
+
*/
|
|
2707
|
+
declare const MAX_UNUSED_ENTRIES = 50;
|
|
2570
2708
|
declare const createQueryRepository: (config: CreateQueryRepositoryConfig) => QueryRepository;
|
|
2571
2709
|
|
|
2572
2710
|
type CacheAdapterFn = (headers: HttpHeaders) => number | null;
|
|
@@ -2578,6 +2716,32 @@ type CreateQueryClientConfigOptions = {
|
|
|
2578
2716
|
baseUrl: string;
|
|
2579
2717
|
/** Configuration for building query strings */
|
|
2580
2718
|
queryString?: BuildQueryStringConfig;
|
|
2719
|
+
/**
|
|
2720
|
+
* Headers sent with every request of this client — an API token, a tenant id, a preview
|
|
2721
|
+
* credential. Per-query `args.headers` are merged on top and win per header name.
|
|
2722
|
+
*
|
|
2723
|
+
* Pass a function to make them dynamic: it is called on every execution, so reading a signal
|
|
2724
|
+
* inside means later requests pick the new value up on their own.
|
|
2725
|
+
*
|
|
2726
|
+
* Client headers are deliberately **not** part of the cache key: they are the same for every
|
|
2727
|
+
* query of the client, so including them would only ever churn the whole cache at once. That
|
|
2728
|
+
* means already-resolved queries keep their response when the headers change — call
|
|
2729
|
+
* {@link QueryClient.refreshQueriesInUse} to re-run them (the v3 equivalent of v2's
|
|
2730
|
+
* `setDefaultHeaders({ refreshQueriesInUse: true })`).
|
|
2731
|
+
*
|
|
2732
|
+
* @example
|
|
2733
|
+
* const previewToken = signal<string | null>(null);
|
|
2734
|
+
*
|
|
2735
|
+
* export const [provideMyClient, injectMyClient] = createQueryClient({
|
|
2736
|
+
* name: 'my-api',
|
|
2737
|
+
* baseUrl: 'https://api.example.com',
|
|
2738
|
+
* headers: () => {
|
|
2739
|
+
* const token = previewToken();
|
|
2740
|
+
* return token ? new HttpHeaders({ 'X-Preview-Token': token }) : new HttpHeaders();
|
|
2741
|
+
* },
|
|
2742
|
+
* });
|
|
2743
|
+
*/
|
|
2744
|
+
headers?: HttpHeaders | (() => HttpHeaders);
|
|
2581
2745
|
/** The name of the client */
|
|
2582
2746
|
name: string;
|
|
2583
2747
|
/**
|
|
@@ -2594,11 +2758,42 @@ type CreateQueryClientConfigOptions = {
|
|
|
2594
2758
|
* @default shouldRetryRequest()
|
|
2595
2759
|
*/
|
|
2596
2760
|
retryFn?: ShouldRetryRequestFn;
|
|
2761
|
+
/**
|
|
2762
|
+
* How long (in ms) a cache entry is kept after its last consumer was destroyed.
|
|
2763
|
+
*
|
|
2764
|
+
* Within that window a query that mounts again — a list page reached via browser back navigation,
|
|
2765
|
+
* for instance — binds to the existing entry and renders its previous response immediately while it
|
|
2766
|
+
* revalidates in the background, instead of starting from a loading state. Unlike the header derived
|
|
2767
|
+
* freshness TTL (`cacheAdapter`) this is independent of `cache-control`, so it also applies to
|
|
2768
|
+
* private/authenticated responses.
|
|
2769
|
+
*
|
|
2770
|
+
* Set to `0` to destroy entries as soon as their last consumer goes away. Only entries that
|
|
2771
|
+
* actually hold a response are retained, and at most 50 unused entries are kept per client
|
|
2772
|
+
* (least recently orphaned dropped first). Always `0` on the server.
|
|
2773
|
+
*
|
|
2774
|
+
* Can be overridden per query creator.
|
|
2775
|
+
*
|
|
2776
|
+
* @default 300000 (5 minutes)
|
|
2777
|
+
*/
|
|
2778
|
+
keepUnusedFor?: number;
|
|
2597
2779
|
};
|
|
2598
2780
|
type QueryClient = {
|
|
2599
2781
|
repository: QueryRepository;
|
|
2600
2782
|
/** The base URL the client was configured with. */
|
|
2601
2783
|
baseUrl: string;
|
|
2784
|
+
/**
|
|
2785
|
+
* Re-executes every cacheable request this client currently has consumers for, bypassing the
|
|
2786
|
+
* cache and restarting the ones still in flight.
|
|
2787
|
+
*
|
|
2788
|
+
* The case this exists for is a change to something every request carries but nothing tracks —
|
|
2789
|
+
* typically a client-level header (see {@link CreateQueryClientConfigOptions.headers}). Setting
|
|
2790
|
+
* the new value only affects *subsequent* requests, so anything already resolved keeps data
|
|
2791
|
+
* fetched under the old one until this is called.
|
|
2792
|
+
*
|
|
2793
|
+
* Only GET / HEAD / OPTIONS requests are refreshed: re-firing a mutation nobody asked for would
|
|
2794
|
+
* be a far worse surprise than a stale read.
|
|
2795
|
+
*/
|
|
2796
|
+
refreshQueriesInUse: () => void;
|
|
2602
2797
|
};
|
|
2603
2798
|
type QueryClientRef = ProviderResult<QueryClient>;
|
|
2604
2799
|
type AnyCreateQueryClientResult = QueryClientRef;
|
|
@@ -2630,6 +2825,13 @@ type CreateHttpRequestOptions<TArgs extends QueryArgs> = {
|
|
|
2630
2825
|
dependencies: QueryRepositoryDependencies;
|
|
2631
2826
|
/** The client options of the request */
|
|
2632
2827
|
clientOptions?: CreateQueryCreatorOptions;
|
|
2828
|
+
/**
|
|
2829
|
+
* Headers configured on the query client, applied to every request it makes. Per-request
|
|
2830
|
+
* `args.headers` are merged on top and win per header name.
|
|
2831
|
+
*
|
|
2832
|
+
* @see CreateQueryClientConfigOptions.headers
|
|
2833
|
+
*/
|
|
2834
|
+
clientHeaders?: HttpHeaders | (() => HttpHeaders);
|
|
2633
2835
|
/**
|
|
2634
2836
|
* The cache adapter function to use for the request
|
|
2635
2837
|
* @default extractExpiresInSeconds()
|
|
@@ -2664,9 +2866,16 @@ type HttpRequest<TArgs extends QueryArgs> = {
|
|
|
2664
2866
|
method: QueryMethod;
|
|
2665
2867
|
/** The full URL of the request (base + path + query params). */
|
|
2666
2868
|
url: string;
|
|
2667
|
-
/**
|
|
2869
|
+
/**
|
|
2870
|
+
* Executes the request.
|
|
2871
|
+
*
|
|
2872
|
+
* `force` runs it even when one is already in flight (the in-flight one is cancelled) or the
|
|
2873
|
+
* cached response is still fresh — used by `refreshQueriesInUse` after something outside the
|
|
2874
|
+
* request changed, such as a client-level header.
|
|
2875
|
+
*/
|
|
2668
2876
|
execute: (options?: {
|
|
2669
2877
|
allowCache?: boolean;
|
|
2878
|
+
force?: boolean;
|
|
2670
2879
|
}) => boolean;
|
|
2671
2880
|
/** Destroys the request (cancels it if in progress) */
|
|
2672
2881
|
destroy: () => boolean;
|
|
@@ -2734,6 +2943,19 @@ type PathParamsType<T extends QueryArgs | null> = T extends QueryArgs ? T['pathP
|
|
|
2734
2943
|
type QueryParamsType<T extends QueryArgs | null> = T extends QueryArgs ? T['queryParams'] : never;
|
|
2735
2944
|
type BodyType<T extends QueryArgs | null> = T extends QueryArgs ? T['body'] : never;
|
|
2736
2945
|
type RequestArgs<T extends QueryArgs | null> = T extends QueryArgs ? Omit<T, 'response'> : never;
|
|
2946
|
+
/**
|
|
2947
|
+
* The empty request-args object, typed to satisfy `RequestArgs<TArgs>` for a query that takes no
|
|
2948
|
+
* arguments — its `QueryArgs` is just `{ response: T }`, so `RequestArgs` resolves to `{}`.
|
|
2949
|
+
*
|
|
2950
|
+
* Only needed in generic code, where `TArgs` is still a type parameter and TS therefore cannot see
|
|
2951
|
+
* that `{}` is the whole of it. Against a concrete query, omit the argument instead: both
|
|
2952
|
+
* `query.execute()` and the auth registry's `execute()` already take none.
|
|
2953
|
+
*
|
|
2954
|
+
* @example
|
|
2955
|
+
* const runAnything = <TArgs extends QueryArgs>(query: Query<TArgs>) =>
|
|
2956
|
+
* query.execute({ args: emptyQueryArgs<TArgs>() });
|
|
2957
|
+
*/
|
|
2958
|
+
declare const emptyQueryArgs: <TArgs extends QueryArgs>() => RequestArgs<TArgs>;
|
|
2737
2959
|
type CreateQueryOptions<TArgs extends QueryArgs> = {
|
|
2738
2960
|
creator?: CreateQueryCreatorOptions;
|
|
2739
2961
|
creatorInternals: InternalCreateQueryCreatorOptions<TArgs>;
|
|
@@ -3142,6 +3364,7 @@ declare const QueryRuntimeErrorCode: {
|
|
|
3142
3364
|
readonly INVALID_STATE_INSIDE_SECURE_EXECUTE_FACTORY: 701;
|
|
3143
3365
|
readonly CIRCULAR_QUERY_DEPENDENCY: 800;
|
|
3144
3366
|
readonly QUERY_SEQUENCE_ALREADY_RUNNING: 900;
|
|
3367
|
+
readonly LEGACY_PREPARE_WITHOUT_INJECTION_CONTEXT: 950;
|
|
3145
3368
|
};
|
|
3146
3369
|
type QueryRuntimeErrorCode = (typeof QueryRuntimeErrorCode)[keyof typeof QueryRuntimeErrorCode];
|
|
3147
3370
|
declare const queryFeatureUsedMultipleTimes: (type: QueryFeatureType) => RuntimeError<0>;
|
|
@@ -3166,6 +3389,7 @@ declare const gqlDataPropertyMissingInResponse: () => RuntimeError<600>;
|
|
|
3166
3389
|
declare const tokensNotAvailableInsideAuthAndExec: () => RuntimeError<700>;
|
|
3167
3390
|
declare const invalidStateInsideSecureExecuteFactory: () => RuntimeError<701>;
|
|
3168
3391
|
declare const circularQueryDependency: () => RuntimeError<800>;
|
|
3392
|
+
declare const legacyPrepareWithoutInjectionContext: (creatorName: string | undefined) => RuntimeError<950>;
|
|
3169
3393
|
declare const querySequenceAlreadyRunning: () => RuntimeError<900>;
|
|
3170
3394
|
|
|
3171
3395
|
/** The last element of a tuple type — the response of the step a `.then()` callback follows. */
|
|
@@ -3974,17 +4198,18 @@ type BearerAuthFeature<TBuilders extends readonly AnyQueryBuilder[], TBearerData
|
|
|
3974
4198
|
};
|
|
3975
4199
|
type ExtractQueryKey<T> = T extends AuthQueryBuilder<infer K, any> ? K : T extends TokenRefreshQueryBuilder<infer K, any> ? K : never;
|
|
3976
4200
|
type ExtractQueryArgs<T> = T extends AuthQueryBuilder<string, infer TArgs> ? TArgs : T extends TokenRefreshQueryBuilder<string, infer TArgs> ? TArgs : never;
|
|
4201
|
+
type QueryRegistryEntry<TArgs extends QueryArgs> = {
|
|
4202
|
+
/**
|
|
4203
|
+
* Executes the auth query. `args` may be omitted for a query that takes none — its
|
|
4204
|
+
* `RequestArgs` is `{}`, which generic helper code cannot produce without a cast.
|
|
4205
|
+
*/
|
|
4206
|
+
execute: (args?: RequestArgs<TArgs>, options?: RunQueryExecuteOptions) => QuerySnapshot<TArgs>;
|
|
4207
|
+
snapshot: Signal<QuerySnapshot<TArgs> | null>;
|
|
4208
|
+
};
|
|
3977
4209
|
type QueryRegistry<TBuilders extends readonly AnyQueryBuilder[]> = {
|
|
3978
|
-
[K in ExtractQueryKey<TBuilders[number]>]: {
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
}>>>, options?: RunQueryExecuteOptions) => QuerySnapshot<ExtractQueryArgs<Extract<TBuilders[number], {
|
|
3982
|
-
key: K;
|
|
3983
|
-
}>>>;
|
|
3984
|
-
snapshot: Signal<QuerySnapshot<ExtractQueryArgs<Extract<TBuilders[number], {
|
|
3985
|
-
key: K;
|
|
3986
|
-
}>>> | null>;
|
|
3987
|
-
};
|
|
4210
|
+
[K in ExtractQueryKey<TBuilders[number]>]: QueryRegistryEntry<ExtractQueryArgs<Extract<TBuilders[number], {
|
|
4211
|
+
key: K;
|
|
4212
|
+
}>>>;
|
|
3988
4213
|
};
|
|
3989
4214
|
type HasFeatureType<TFeatures extends readonly unknown[], TType extends BearerAuthFeatureType> = TFeatures extends readonly ((context: any) => any)[] ? Extract<ReturnType<TFeatures[number]>, {
|
|
3990
4215
|
type: TType;
|
|
@@ -4107,6 +4332,19 @@ type BearerAuthProvider<TBuilders extends readonly AnyQueryBuilder[], TFeatures
|
|
|
4107
4332
|
* Tracks the latest auth operation (login, autoLogin, tokenRefresh, logout, revocation) with its state and payload.
|
|
4108
4333
|
*/
|
|
4109
4334
|
executionState: Signal<BearerAuthExecutionState<ExtractQueryKey<TBuilders[number]> | 'autoLogin' | 'tokenRefresh' | 'logout' | 'revocation'> | null>;
|
|
4335
|
+
/**
|
|
4336
|
+
* Seeds the provider with tokens that were issued outside of it — an SSO/OIDC callback that
|
|
4337
|
+
* arrives with both tokens in the URL, a token handed over by a native shell, a test harness.
|
|
4338
|
+
*
|
|
4339
|
+
* Behaves exactly like a successful auth query: the tokens are applied, `bearerData` /
|
|
4340
|
+
* `isAuthenticated` update, `afterTokenRefresh$` emits so waiting secure queries run, and (unless
|
|
4341
|
+
* disabled) other tabs are synced. Without it the only way in is to execute the refresh query with
|
|
4342
|
+
* the refresh token and throw the access token away.
|
|
4343
|
+
*
|
|
4344
|
+
* Does **not** persist anything by itself — `withPersistentAuth` picks the tokens up through the
|
|
4345
|
+
* same signals it watches for query-issued ones.
|
|
4346
|
+
*/
|
|
4347
|
+
setTokens: (accessToken: string, refreshToken: string) => void;
|
|
4110
4348
|
/**
|
|
4111
4349
|
* Logout the user (clears all tokens and unbinds secure queries)
|
|
4112
4350
|
*/
|
|
@@ -4147,7 +4385,32 @@ type BearerAuthProviderQueryContext<TBearerData = unknown, TBuilders extends rea
|
|
|
4147
4385
|
declare const createBearerAuthProvider: <TBuilders extends readonly AnyQueryBuilder[], TFeatures extends readonly ((context: BearerAuthProviderFeatureContext<TBearerData, TBuilders>) => unknown)[], TBearerData = unknown>(config: CreateBearerAuthProviderConfig<TBuilders, TFeatures, TBearerData>) => ProviderResult<BearerAuthProvider<TBuilders, TFeatures, TBearerData>>;
|
|
4148
4386
|
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> = ProviderResult<BearerAuthProvider<TBuilders, TFeatures, TBearerData>>;
|
|
4149
4387
|
type AnyCreateBearerAuthProviderResult = BearerAuthProviderRef<any, any, any>;
|
|
4150
|
-
|
|
4388
|
+
/**
|
|
4389
|
+
* The exact provider type behind a `createBearerAuthProvider` result — query keys, feature registry
|
|
4390
|
+
* and bearer data all preserved.
|
|
4391
|
+
*
|
|
4392
|
+
* Prefer this over {@link AnyBearerAuthProvider} whenever the provider is reachable as a value, e.g.
|
|
4393
|
+
* when passing one into a helper:
|
|
4394
|
+
*
|
|
4395
|
+
* ```ts
|
|
4396
|
+
* export const myApiAuthProviderRef = createBearerAuthProvider({ ... });
|
|
4397
|
+
* export type MyApiAuthProvider = BearerAuthProviderOf<typeof myApiAuthProviderRef>;
|
|
4398
|
+
*
|
|
4399
|
+
* const doLogin = (provider: MyApiAuthProvider) => provider.queries.login({ body: { ... } });
|
|
4400
|
+
* ```
|
|
4401
|
+
*/
|
|
4402
|
+
type BearerAuthProviderOf<TRef extends AnyCreateBearerAuthProviderResult> = NonNullable<ReturnType<TRef[1]>>;
|
|
4403
|
+
type AnyBearerAuthProvider = Omit<NonNullable<ReturnType<AnyCreateBearerAuthProviderResult[1]>>, 'queries'> & {
|
|
4404
|
+
/**
|
|
4405
|
+
* Registry of all configured auth queries.
|
|
4406
|
+
*
|
|
4407
|
+
* Deliberately untyped here: with unknown builders the mapped type degrades to an index
|
|
4408
|
+
* signature, and `noPropertyAccessFromIndexSignature` then rejects `provider.queries.login`
|
|
4409
|
+
* (TS4111) — forcing every call site into bracket access or a hand-written structural contract.
|
|
4410
|
+
* Use {@link BearerAuthProviderOf} where the concrete provider is reachable and the keys survive.
|
|
4411
|
+
*/
|
|
4412
|
+
queries: any;
|
|
4413
|
+
};
|
|
4151
4414
|
|
|
4152
4415
|
/**
|
|
4153
4416
|
* The kind of object a {@link QueryDevtoolsEntry} describes. Part of the devtools contract consumed
|
|
@@ -4308,6 +4571,266 @@ declare class ParseHttpErrorCodeToMessageEnPipe implements PipeTransform {
|
|
|
4308
4571
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<ParseHttpErrorCodeToMessageEnPipe, "parseHttpErrorCodeToMessageEn", true>;
|
|
4309
4572
|
}
|
|
4310
4573
|
|
|
4574
|
+
/**
|
|
4575
|
+
* The internal, fully-resolved definition of a single query-form field.
|
|
4576
|
+
*
|
|
4577
|
+
* Produced by the field creators (`queryField()`, `searchQueryField()`, …) and
|
|
4578
|
+
* consumed by `createQueryForm()`. `T` is the field's value type and always
|
|
4579
|
+
* includes `null` (a field can be cleared).
|
|
4580
|
+
*/
|
|
4581
|
+
type QueryFieldDef<T> = {
|
|
4582
|
+
/**
|
|
4583
|
+
* The default value. When the field equals this value it is elided from the
|
|
4584
|
+
* URL (unless `appendDefaultValueToUrl` is set) and ignored by the filter
|
|
4585
|
+
* count. A function is evaluated lazily every time the default is needed.
|
|
4586
|
+
*/
|
|
4587
|
+
readonly defaultValue: T | (() => T);
|
|
4588
|
+
/** Debounce in milliseconds before a change is committed (emitted + written to the URL). */
|
|
4589
|
+
readonly debounce?: number;
|
|
4590
|
+
/**
|
|
4591
|
+
* Skip the debounce when the new value is falsy. Useful for search fields so
|
|
4592
|
+
* that clearing the input applies immediately while typing stays debounced.
|
|
4593
|
+
*
|
|
4594
|
+
* @default false
|
|
4595
|
+
*/
|
|
4596
|
+
readonly disableDebounceIfFalsy?: boolean;
|
|
4597
|
+
/**
|
|
4598
|
+
* Write the field's value to the URL. A field is never written while it holds
|
|
4599
|
+
* its default value unless `appendDefaultValueToUrl` is set.
|
|
4600
|
+
*
|
|
4601
|
+
* @default true
|
|
4602
|
+
*/
|
|
4603
|
+
readonly appendToUrl?: boolean;
|
|
4604
|
+
/**
|
|
4605
|
+
* Write the field to the URL even when it holds its default value. Ignored
|
|
4606
|
+
* when `appendToUrl` is `false`.
|
|
4607
|
+
*
|
|
4608
|
+
* @default false
|
|
4609
|
+
*/
|
|
4610
|
+
readonly appendDefaultValueToUrl?: boolean;
|
|
4611
|
+
/**
|
|
4612
|
+
* Reset this field to its default whenever one of the listed sibling fields
|
|
4613
|
+
* changes — e.g. a `page` field is reset by `['search', 'limit']`.
|
|
4614
|
+
*/
|
|
4615
|
+
readonly isResetBy?: readonly string[];
|
|
4616
|
+
/**
|
|
4617
|
+
* Exclude this field from `activeFilterCount`. The common pagination/sort/search
|
|
4618
|
+
* keys are excluded automatically (see `IGNORED_FILTER_COUNT_FIELDS`).
|
|
4619
|
+
*
|
|
4620
|
+
* @default false
|
|
4621
|
+
*/
|
|
4622
|
+
readonly skipInFilterCount?: boolean;
|
|
4623
|
+
/**
|
|
4624
|
+
* Skip the best-effort auto-coercion (numeric strings → number, `'true'`/`'false'`
|
|
4625
|
+
* → boolean, the null sentinel → `null`) when reading the value back from the URL.
|
|
4626
|
+
*
|
|
4627
|
+
* @default false
|
|
4628
|
+
*/
|
|
4629
|
+
readonly skipAutoTransform?: boolean;
|
|
4630
|
+
/** Transform a raw URL query-param value into the field's value type. */
|
|
4631
|
+
readonly queryParamToValue?: (raw: unknown) => T;
|
|
4632
|
+
/** Transform the field's value into a raw URL query-param value. */
|
|
4633
|
+
readonly valueToQueryParam?: (value: T) => unknown;
|
|
4634
|
+
};
|
|
4635
|
+
/**
|
|
4636
|
+
* Options accepted by a field creator. Everything is optional; `isResetBy`
|
|
4637
|
+
* accepts a single key or a list for convenience.
|
|
4638
|
+
*/
|
|
4639
|
+
type QueryFieldConfig<T> = Partial<Omit<QueryFieldDef<T>, 'isResetBy'>> & {
|
|
4640
|
+
readonly isResetBy?: string | readonly string[];
|
|
4641
|
+
};
|
|
4642
|
+
/** Extracts a field definition's value type. */
|
|
4643
|
+
type QueryFieldValue<F> = F extends QueryFieldDef<infer T> ? T : never;
|
|
4644
|
+
/** A map of field name → field definition, as passed to `createQueryForm({ fields })`. */
|
|
4645
|
+
type QueryFormFields = Record<string, QueryFieldDef<unknown>>;
|
|
4646
|
+
/** The value shape of a query form — one entry per field. */
|
|
4647
|
+
type QueryFormModel<TFields extends QueryFormFields> = {
|
|
4648
|
+
[K in keyof TFields]: QueryFieldValue<TFields[K]>;
|
|
4649
|
+
};
|
|
4650
|
+
/** A committed change: the value before and after a commit. */
|
|
4651
|
+
type QueryFormChange<TFields extends QueryFormFields> = {
|
|
4652
|
+
readonly previousValue: QueryFormModel<TFields> | null;
|
|
4653
|
+
readonly currentValue: QueryFormModel<TFields>;
|
|
4654
|
+
};
|
|
4655
|
+
/**
|
|
4656
|
+
* Options passed to `observe()`. Named distinctly from the legacy
|
|
4657
|
+
* `QueryFormObserveOptions` to keep both APIs' barrel exports intact.
|
|
4658
|
+
*/
|
|
4659
|
+
type QueryFormSignalsObserveOptions = {
|
|
4660
|
+
/**
|
|
4661
|
+
* Sync the committed value to the URL query params.
|
|
4662
|
+
* @default true
|
|
4663
|
+
*/
|
|
4664
|
+
readonly writeToQueryParams?: boolean;
|
|
4665
|
+
/**
|
|
4666
|
+
* Apply URL → form changes on navigation (back/forward, external links).
|
|
4667
|
+
* @default true
|
|
4668
|
+
*/
|
|
4669
|
+
readonly syncOnNavigation?: boolean;
|
|
4670
|
+
/**
|
|
4671
|
+
* Replace the current history entry instead of pushing a new one.
|
|
4672
|
+
* @default false
|
|
4673
|
+
*/
|
|
4674
|
+
readonly replaceUrl?: boolean;
|
|
4675
|
+
};
|
|
4676
|
+
/**
|
|
4677
|
+
* Options for a single programmatic write (`setValue`/`patchValue`/reset).
|
|
4678
|
+
*
|
|
4679
|
+
* Named distinctly from the legacy reactive-forms `QueryFormWriteOptions` (which
|
|
4680
|
+
* also carried the RxJS-only `onlySelf`/`emitEvent`) — the signals variant only
|
|
4681
|
+
* needs `skipResets`.
|
|
4682
|
+
*/
|
|
4683
|
+
type QueryFormSignalsWriteOptions = {
|
|
4684
|
+
/**
|
|
4685
|
+
* Skip the `isResetBy` graph for this write, so dependent fields keep their
|
|
4686
|
+
* current value instead of resetting to default.
|
|
4687
|
+
* @default false
|
|
4688
|
+
*/
|
|
4689
|
+
readonly skipResets?: boolean;
|
|
4690
|
+
};
|
|
4691
|
+
|
|
4692
|
+
/**
|
|
4693
|
+
* Fields excluded from `activeFilterCount` by default — pagination, sorting and
|
|
4694
|
+
* search are navigation state, not filters.
|
|
4695
|
+
*/
|
|
4696
|
+
declare const IGNORED_FILTER_COUNT_FIELDS: readonly string[];
|
|
4697
|
+
/**
|
|
4698
|
+
* A detached editor over the same fields — its own signal-forms form and value,
|
|
4699
|
+
* with no URL sync and no reset graph. Written back to the source form via
|
|
4700
|
+
* `source.setValue(branch.value())`. Powers the filter-overlay "edit then apply"
|
|
4701
|
+
* pattern (see `10-filter.md`).
|
|
4702
|
+
*/
|
|
4703
|
+
type QueryFormBranch<TFields extends QueryFormFields> = {
|
|
4704
|
+
/** The bindable signal-forms field tree (`branch.fields.search`). */
|
|
4705
|
+
readonly fields: FieldTree<QueryFormModel<TFields>>;
|
|
4706
|
+
/** The live (undebounced) value of the branch. */
|
|
4707
|
+
readonly value: Signal<QueryFormModel<TFields>>;
|
|
4708
|
+
/** The number of active (non-default) filters in the branch. */
|
|
4709
|
+
readonly activeFilterCount: Signal<number>;
|
|
4710
|
+
setValue(value: QueryFormModel<TFields>): void;
|
|
4711
|
+
patchValue(value: Partial<QueryFormModel<TFields>>): void;
|
|
4712
|
+
resetFieldToDefault(key: keyof QueryFormModel<TFields>): void;
|
|
4713
|
+
resetAllFieldsToDefault(): void;
|
|
4714
|
+
};
|
|
4715
|
+
type CreateQueryFormConfig<TFields extends QueryFormFields> = {
|
|
4716
|
+
readonly fields: TFields;
|
|
4717
|
+
/**
|
|
4718
|
+
* A prefix for every query-param key, so multiple query forms can coexist on
|
|
4719
|
+
* one route (e.g. prefix `'users'` maps the `page` field to `users-page`).
|
|
4720
|
+
* A function is evaluated every time a key is built.
|
|
4721
|
+
*/
|
|
4722
|
+
readonly queryParamPrefix?: string | (() => string);
|
|
4723
|
+
};
|
|
4724
|
+
/**
|
|
4725
|
+
* A signals-first query form: binds on-screen controls to typed fields, keeps a
|
|
4726
|
+
* debounced committed value, syncs to the URL query params, and resets dependent
|
|
4727
|
+
* fields via the `isResetBy` graph — all as signals.
|
|
4728
|
+
*
|
|
4729
|
+
* @example
|
|
4730
|
+
* const qf = createQueryForm({
|
|
4731
|
+
* fields: {
|
|
4732
|
+
* search: searchQueryField(),
|
|
4733
|
+
* sort: sortQueryField(),
|
|
4734
|
+
* page: queryField<number>({ defaultValue: 1, isResetBy: ['search', 'sort'] }),
|
|
4735
|
+
* },
|
|
4736
|
+
* }).observe();
|
|
4737
|
+
* // template: <input etInput [formField]="qf.fields.search" />
|
|
4738
|
+
*/
|
|
4739
|
+
declare class QueryFormSignals<TFields extends QueryFormFields> {
|
|
4740
|
+
private readonly _router;
|
|
4741
|
+
private readonly _route;
|
|
4742
|
+
private readonly _injector;
|
|
4743
|
+
private readonly _fields;
|
|
4744
|
+
private readonly _prefix;
|
|
4745
|
+
private readonly _defaults;
|
|
4746
|
+
/** Live field values (updated immediately by bound controls). */
|
|
4747
|
+
private readonly _model;
|
|
4748
|
+
/** The committed (debounced) value that drives `value`, the URL and the filter count. */
|
|
4749
|
+
private readonly _committed;
|
|
4750
|
+
private readonly _previous;
|
|
4751
|
+
private readonly _observing;
|
|
4752
|
+
private readonly _queryParamChanges;
|
|
4753
|
+
private _observeOptions;
|
|
4754
|
+
private _pendingTimer;
|
|
4755
|
+
private _skipNextResets;
|
|
4756
|
+
/**
|
|
4757
|
+
* The bindable signal-forms field tree — bind a field with `[formField]`, e.g.
|
|
4758
|
+
* `<input etInput [formField]="qf.fields.search" />`.
|
|
4759
|
+
*/
|
|
4760
|
+
readonly fields: FieldTree<QueryFormModel<TFields>>;
|
|
4761
|
+
/** The committed value of the form. */
|
|
4762
|
+
readonly value: Signal<QueryFormModel<TFields>>;
|
|
4763
|
+
/** The committed value before the most recent change. */
|
|
4764
|
+
readonly previousValue: Signal<QueryFormModel<TFields> | null>;
|
|
4765
|
+
/** The previous/current value pair of the most recent committed change. */
|
|
4766
|
+
readonly changes: Signal<QueryFormChange<TFields>>;
|
|
4767
|
+
/**
|
|
4768
|
+
* The number of active filters. Excludes the pagination/sort/search keys and
|
|
4769
|
+
* any field created with `skipInFilterCount`.
|
|
4770
|
+
*/
|
|
4771
|
+
readonly activeFilterCount: Signal<number>;
|
|
4772
|
+
/** The default value of the whole form. */
|
|
4773
|
+
readonly defaultValue: QueryFormModel<TFields>;
|
|
4774
|
+
constructor(config: CreateQueryFormConfig<TFields>);
|
|
4775
|
+
observe(options?: QueryFormSignalsObserveOptions): this;
|
|
4776
|
+
unobserve(): void;
|
|
4777
|
+
setValue(value: QueryFormModel<TFields>, options?: QueryFormSignalsWriteOptions): void;
|
|
4778
|
+
patchValue(value: Partial<QueryFormModel<TFields>>, options?: QueryFormSignalsWriteOptions): void;
|
|
4779
|
+
resetFieldToDefault(key: keyof QueryFormModel<TFields>, options?: QueryFormSignalsWriteOptions): void;
|
|
4780
|
+
resetFieldsToDefault(keys: (keyof QueryFormModel<TFields>)[], options?: QueryFormSignalsWriteOptions): void;
|
|
4781
|
+
resetAllFieldsToDefault(options?: QueryFormSignalsWriteOptions & {
|
|
4782
|
+
skipFields?: (keyof QueryFormModel<TFields>)[];
|
|
4783
|
+
}): void;
|
|
4784
|
+
/** Create a detached editor over the same fields, seeded from the current committed value. */
|
|
4785
|
+
branch(): QueryFormBranch<TFields>;
|
|
4786
|
+
private _onLiveChange;
|
|
4787
|
+
/** Shortest-debounce-wins; `null` means commit immediately. */
|
|
4788
|
+
private _resolveDebounce;
|
|
4789
|
+
private _flush;
|
|
4790
|
+
private _applyResets;
|
|
4791
|
+
private _applyFromUrl;
|
|
4792
|
+
private _commitFromUrl;
|
|
4793
|
+
private _deserialize;
|
|
4794
|
+
private _writeToUrl;
|
|
4795
|
+
private _paramKey;
|
|
4796
|
+
private _clearTimer;
|
|
4797
|
+
private _cleanup;
|
|
4798
|
+
}
|
|
4799
|
+
/**
|
|
4800
|
+
* Create a {@link QueryFormSignals}. Call `.observe()` to start syncing with the
|
|
4801
|
+
* URL. Must be called in an injection context.
|
|
4802
|
+
*/
|
|
4803
|
+
declare const createQueryForm: <TFields extends QueryFormFields>(config: CreateQueryFormConfig<TFields>) => QueryFormSignals<TFields>;
|
|
4804
|
+
|
|
4805
|
+
/**
|
|
4806
|
+
* A generic query-form field. Defaults to `null` and, unless a transform is
|
|
4807
|
+
* given, relies on the auto-coercion when reading back from the URL.
|
|
4808
|
+
*
|
|
4809
|
+
* @example
|
|
4810
|
+
* queryField<number>({ defaultValue: 1, isResetBy: ['search'] })
|
|
4811
|
+
*/
|
|
4812
|
+
declare const queryField: <T = string>(config?: QueryFieldConfig<T | null>) => QueryFieldDef<T | null>;
|
|
4813
|
+
/**
|
|
4814
|
+
* A debounced free-text search field. Debounces typing by 300ms but applies
|
|
4815
|
+
* clearing immediately (`disableDebounceIfFalsy`).
|
|
4816
|
+
*/
|
|
4817
|
+
declare const searchQueryField: (config?: QueryFieldConfig<string | null>) => QueryFieldDef<string | null>;
|
|
4818
|
+
/**
|
|
4819
|
+
* A sort field serialized as `"active:direction"` (e.g. `"name:asc"`). Matches
|
|
4820
|
+
* the wire format the table system's URL adapter uses, so the two interoperate.
|
|
4821
|
+
*/
|
|
4822
|
+
declare const sortQueryField: (config?: QueryFieldConfig<Sort | null>) => QueryFieldDef<Sort | null>;
|
|
4823
|
+
/** A field holding a list of strings. */
|
|
4824
|
+
declare const stringArrayQueryField: (config?: QueryFieldConfig<string[] | null>) => QueryFieldDef<string[] | null>;
|
|
4825
|
+
/** A field holding a list of numbers. */
|
|
4826
|
+
declare const numberArrayQueryField: (config?: QueryFieldConfig<number[] | null>) => QueryFieldDef<number[] | null>;
|
|
4827
|
+
/** A field holding a list of booleans. */
|
|
4828
|
+
declare const booleanArrayQueryField: (config?: QueryFieldConfig<boolean[] | null>) => QueryFieldDef<boolean[] | null>;
|
|
4829
|
+
/** A single date field (expects an ISO/`Date`-parseable string in the URL). */
|
|
4830
|
+
declare const dateQueryField: (config?: QueryFieldConfig<Date | null>) => QueryFieldDef<Date | null>;
|
|
4831
|
+
/** A field holding a list of dates. */
|
|
4832
|
+
declare const dateArrayQueryField: (config?: QueryFieldConfig<Date[] | null>) => QueryFieldDef<Date[] | null>;
|
|
4833
|
+
|
|
4311
4834
|
/** A single message captured for the devtools web socket inspector. */
|
|
4312
4835
|
type WebSocketDevtoolsMessage = {
|
|
4313
4836
|
id: number;
|
|
@@ -4368,5 +4891,5 @@ type WebSocketClientResult<TMessageData extends SocketMessageView = SocketMessag
|
|
|
4368
4891
|
type AnyWebSocketClient<TMessageData extends SocketMessageView = SocketMessageView> = WebSocketClientResult<TMessageData>;
|
|
4369
4892
|
declare const createWebSocketClient: <TMessageData extends SocketMessageView = SocketMessageView>(options: CreateWebSocketClientConfigOptions) => WebSocketClientResult<TMessageData>;
|
|
4370
4893
|
|
|
4371
|
-
export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, CustomHeaderAuthProvider, DateArrayQueryField, DateQueryField, EntityStore, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QueryDevtoolsComponent, QueryDirective, QueryError, 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, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, buildErrorMessage, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, contentfulGqlLikePaginationAdapter, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHttpRequest, createInfinityQueryConfig, createLegacyQueryCreator, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryErrorResponse, createQueryFeature, createQueryObject, createQueryRepository, createQuerySnapshotFn, createQueryStack, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, decryptBearer, deepFreeze, def, detectContentTypeHeader, dynLikePaginationAdapter, effectComputed, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, getDefaultHeaders, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, hasHeader, ignoreAutoRefresh, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isEmptyString, isGqlQueryConfig, isLegacyQuery, isNaN, isQuery, isQueryCollection, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, mapToPaginated, mapViolationsToFormErrors, maybeExecute, mergeHeaders, nestedEffect, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryComputed, queryComputedTillTruthy, queryDevtoolsEntries, queryExecute, queryFeatureUsedMultipleTimes, querySequence, querySequenceAlreadyRunning, queryStackTotalQueriesAndExpectedQueriesMismatch, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, removeFrom, request, resetExecuteState, resetPageOnError, serializeBody, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, splitQueryConfig, switchQueryCollectionState, switchQueryState, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withErrorHandling, withInactivityLogout, withLogging, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withRefreshQuery, withResponseUpdate, withSuccessHandling, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal };
|
|
4372
|
-
export type { AnyBearerAuthProvider, AnyCreateBearerAuthProviderResult, AnyCreateGqlQueryCreatorOptions, AnyCreateQueryClientResult, AnyGqlQueryConfig, AnyInfinityQuery, AnyInfinityQueryConfig, AnyLegacyQuery, AnyLegacyQueryCreator, AnyNewQuery, AnyPagedQueryStack, AnyQueryBuilder, AnyQueryClient, AnyQueryCollection, AnyQueryCollectionData, AnyQueryCollectionResponse, AnyQueryCreator, AnyQueryCreatorCollection, AnyQueryForm, AnyQuerySnapshot, AnyQueryStack, AnyRestQueryConfig, AnyRoute, AnyV2Query, AnyV2QueryCreator, AnyWebSocketClient, AppendItemsLocation, AuthProvider, AuthProviderBasicConfig, AuthProviderBearerConfig, AuthProviderCustomHeaderConfig, AuthQueryBuilder, AuthQueryConfig, BaseArguments, BaseQueryCreatorFactoryOptions, BaseQueryCreatorOptions, BaseQueryCreatorOptionsSubtle, BearerAuthExecutionState, BearerAuthExecutionStateError, BearerAuthExecutionStateLoading, BearerAuthExecutionStateLogout, BearerAuthExecutionStateSuccess, BearerAuthFeature, BearerAuthProvider, BearerAuthProviderFeatureContext, BearerAuthProviderQueryContext, BearerAuthProviderRef, BearerAuthProviderTokens, BearerRefreshConfig, BodyType, BuildQueryStringConfig, CacheAdapterFn, Cancelled, ClassValidatorError, ClearQueryArgs, ConstructQuery, CreateBaseQueryOptions, CreateBearerAuthProviderConfig, CreateGqlQueryCreatorOptions, CreateGqlQueryExecuteOptions, CreateGqlQueryOptions, CreateHttpRequestDependencies, CreateHttpRequestOptions, CreateLegacyQueryCreatorOptions, CreateLegacyQueryOptions, CreatePagedQueryStackOptions, CreateQueryClientConfigOptions, CreateQueryCreatorOptions, CreateQueryExecuteOptions, CreateQueryObjectOptions, CreateQueryOptions, CreateQueryRepositoryConfig, CreateQuerySnapshotOptions, CreateQueryStackOptions, CreateSecureGqlQueryExecuteOptions, CreateSecureGqlQueryOptions, CreateSecureQueryExecuteOptions, CreateSecureQueryOptions, CreateWebSocketClientConfigOptions, CreateWebSocketClientTransport, DestroyCleanupCallback, EmptyObject, EntityGetParams, EntityIdParams, EntityKey, EntitySetParams, EntityStoreConfig, ExecuteFactory, ExecuteQueryOptions, ExtractQueryArgs, ExtractQueryKey, Failure, FeatureRegistry, GQL, GqlQueryArgs, GqlQueryConfig, GqlQueryConfigWithoutMethod, GqlQueryMethod, GqlQueryTransport, GqlTransferOption, GqlTransformer, GqlVariablesType, HttpErrorEvent, HttpRequest, HttpRequestLoadingProgressState, HttpRequestLoadingState, HttpRequestResponseType, HttpRequestTransferCacheConfig, InactivityLogoutConfig, InactivityLogoutFeature, InfinityQueryConfig, InfinityQueryConfigType, InfinityQueryOf, InfinityQueryParamLocation, InsertFromConfig, InternalCreateGqlQueryCreatorOptions, InternalCreateQueryCreatorOptions, InternalQueryExecute, InternalSecureCreateGqlQueryCreatorOptions, InternalSecureCreateQueryCreatorOptions, InternalWebSocketRoom, LeaderInstanceCountChangeEventData, LeaderStatusChangeEventData, LegacyArgumentsOfQueryArgs, LegacyQueryPrepareFn, Loading, MapViolationsToFormErrorsOptions, Method, ObservableSignal, OptionalQueryFieldOptions, PageParamCalculatorOptions, PagedQueryStack, PagedQueryStackDirection, PagedQueryStackExecuteOptions, PagedQueryStackResetOptions, PartialXhrState, PathParams, PathParamsType, PersistentAuthConfig, PersistentAuthFeature, PollConfig, Prepared, Query, QueryArgs, QueryArgsOf, QueryArgsOfLegacyArguments, QueryAutoRefreshConfig, QueryBase, QueryClient, QueryClientDevtoolsOptions, QueryClientRef, QueryCollectionKeysOf, QueryCollectionOf, QueryCollectionWithNullableQuery, QueryConfig, QueryConfigBase, QueryConfigWithoutMethod, QueryContainerConfig, QueryContext, QueryCreator, QueryDataOf, QueryDependencies, QueryDevtoolsEntry, QueryDevtoolsEntryKind, QueryDevtoolsEntryMeta, QueryDirectiveContext, QueryDirectiveType, QueryEntityConfig, QueryErrorResponse, QueryErrorResponseItem, QueryErrorResponseList, QueryErrorResponseSingle, QueryExecute, QueryExecuteArgs, QueryExecuteEventData, QueryExecuteOptions, QueryExecuteState, QueryExecutionState, QueryExecutionStateFailure, QueryExecutionStateLoading, QueryExecutionStateLoadingWithCachedResponse, QueryExecutionStateLoadingWithNoResponse, QueryExecutionStateSuccess, QueryFailureEventData, QueryFeature, QueryFeatureContext, QueryFeatureFlags, QueryFeatureFn, QueryFieldOptions, QueryFilterConfig, QueryFormGroup, QueryFormGroupControls, QueryFormObserveOptions, QueryFormOf, QueryFormOptions, QueryFormValue, QueryFormValueEvent, QueryFormWriteOptions, QueryKey, QueryMethod, QueryMockConfig, QueryOf, QueryParams, QueryParamsType, QueryPrepareFn, QueryRegistry, QueryRepository, QueryRepositoryCacheEntry, QueryRepositoryDependencies, QueryRepositoryEvent, QueryRepositoryItem, QueryRepositoryRequestOptions, QueryRepositorySubtle, QueryResponseOf, QueryRouteOf, QuerySequence, QuerySequenceResult, QuerySequenceStatus, QuerySequenceStepArgs, QuerySnapshot, QueryStack, QueryStackSubtle, QueryState, QueryStateMeta, QueryStateResponseOf, QueryStateSignal, QueryStateSubtle, QueryStateSuccessMeta, QueryStoreIdOf, QueryStoreOf, QuerySubtle, QuerySuccessEventData, QueryTrigger, RawResponseType, ReadonlyQuery, 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, 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, WebSocketClientResult, WebSocketClientSubtle, WebSocketDevtoolsHandle, WebSocketDevtoolsMessage, WebSocketRoom, WithAutoRefreshFeatureOptions, WithBody, WithConfig, WithErrorHandlingFeatureOptions, WithHeaders, WithInjector, WithLegacyConfig, WithLoggingFeatureOptions, WithMock, WithPathParams, WithPollingFeatureOptions, WithQueryParams, WithResponseUpdateFeatureFnData, WithResponseUpdateFeatureOptions, WithSuccessHandlingFeatureOptions, WithVariables };
|
|
4894
|
+
export { AuthBearerRefreshStrategy, BasicAuthProvider, BearerAuthFeatureType, BooleanArrayQueryField, CLEAR_QUERY_ARGS, CustomHeaderAuthProvider, DEFAULT_KEEP_UNUSED_FOR, DateArrayQueryField, DateQueryField, EntityStore, IGNORED_FILTER_COUNT_FIELDS, INFINITY_QUERY_TOKEN, InfinityQuery, InfinityQueryDirective, InfinityQueryTriggerDirective, LegacyQuery, LegacyQueryCreator, MAX_UNUSED_ENTRIES, NumberArrayQueryField, ParseHttpErrorCodeToMessageDePipe, ParseHttpErrorCodeToMessageEnPipe, ParseHttpErrorCodeToTitleDePipe, ParseHttpErrorCodeToTitleEnPipe, QUERY_CLIENT_DEVTOOLS_TOKEN, QueryDevtoolsComponent, QueryDirective, QueryError, QueryFeatureType, QueryField, QueryForm, QueryFormSignals, 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, authExtractTokensResponseMissingAccessToken, authExtractTokensResponseMissingRefreshToken, authExtractTokensResponseNotObject, authProviderFeatureUsedMultipleTimes, booleanArrayQueryField, buildErrorMessage, buildQueryCacheKey, buildQueryString, buildRoute, buildTimestampFromSeconds, castQueryCreatorTypes, circularQueryDependency, circularQueryDependencyChecker, computeQueryAuthHeader, computeQueryBody, computeQueryHeaders, computeQueryMethod, computeQueryQueryParams, contentfulGqlLikePaginationAdapter, createBaseQuery, createBaseQueryCreator, createBearerAuthProvider, createDeleteQuery, createExecuteFn, createGetQuery, createGqlExecuteFn, createGqlMutationViaGet, createGqlMutationViaPost, createGqlQuery, createGqlQueryCreator, createGqlQueryViaGet, createGqlQueryViaPost, createHttpRequest, createInfinityQueryConfig, createLegacyQueryCreator, createPagedQueryStack, createPatchQuery, createPersistentAuthFeature, createPostQuery, createPutQuery, createQuery, createQueryClient, createQueryCollection, createQueryCollectionSignal, createQueryCollectionSubject, createQueryContext, createQueryCreator, createQueryErrorResponse, createQueryFeature, createQueryForm, createQueryObject, createQueryRepository, createQuerySnapshotFn, createQueryStack, createSecureDeleteQuery, createSecureExecuteFactory, createSecureExecuteFn, createSecureGetQuery, createSecureGqlExecuteFn, createSecureGqlMutationViaGet, createSecureGqlMutationViaPost, createSecureGqlQuery, createSecureGqlQueryCreator, createSecureGqlQueryViaGet, createSecureGqlQueryViaPost, createSecurePatchQuery, createSecurePostQuery, createSecurePutQuery, createSecureQuery, createSecureQueryCreator, createTrackingFeature, createWebSocketClient, dateArrayQueryField, dateQueryField, decryptBearer, deepFreeze, def, detectContentTypeHeader, dynLikePaginationAdapter, effectComputed, emptyQueryArgs, ethletePaginationAdapter, executeUntilSettled, extractExpiresInSeconds, extractFormViolations, extractQuery, fakePaginationAdapter, filterFailure, filterNull, filterQueryStates, filterSuccess, forEachHeader, getDefaultHeaders, getQueryFeatureUsage, getResponseUrl, ggLikePaginationAdapter, gql, gqlDataPropertyMissingInResponse, hasHeader, ignoreAutoRefresh, injectInfinityQueryResponseDelay, injectQueryContext, insertFrom, invalidBaseRouteError, invalidBodyError, invalidRouteError, invalidStateInsideSecureExecuteFactory, isAutoRefresh, isBasicAuthProvider, isBearerAuthProvider, isClassValidatorError, isCreateGqlQueryOptions, isCustomHeaderAuthProvider, isEmptyString, isGqlQueryConfig, isLegacyQuery, isNaN, isPageOutOfRangeError, isQuery, isQueryCollection, isQueryErrorResponse, isQueryStateCancelled, isQueryStateFailure, isQueryStateLoading, isQueryStatePrepared, isQueryStateSuccess, isRequestError, isSymfonyError, isSymfonyFormViolationListError, isSymfonyListError, isSymfonyPagerfantaOutOfRangeError, legacyPrepareWithoutInjectionContext, mapToPaginated, mapViolationsToFormErrors, maybeExecute, mergeHeaders, nestedEffect, numberArrayQueryField, pagedQueryStackNextPageCalledWithoutPreviousPage, pagedQueryStackPageBiggerThanTotalPages, pagedQueryStackPreviousPageCalledButAlreadyAtFirstPage, paginatedEntityValueUpdater, parseAllXhrResponseHeaders, parseHttpErrorCodeToMessageDe, parseHttpErrorCodeToMessageEn, parseHttpErrorCodeToTitleDe, parseHttpErrorCodeToTitleEn, pathParamsMissingInRouteFunctionError, provideInfinityQueryResponseDelay, provideQueryClientForDevtools, provideQueryDevtools, queryArrayComputed, queryComputed, queryComputedTillTruthy, queryDevtoolsEntries, queryErrorMessage, queryErrorMessages, queryExecute, queryFeatureUsedMultipleTimes, queryField, querySequence, querySequenceAlreadyRunning, queryStackTotalQueriesAndExpectedQueriesMismatch, queryStackWithArgsUsed, queryStackWithResponseUpdateUsed, queryStateAlreadyHasKeyError, queryStateCannotTransformError, queryStateDoesNotContainKeyError, queryStateErrorSignal, queryStateLoadingSignal, queryStateResponseSignal, queryStateSignal, removeFrom, request, resetExecuteState, resetPageOnError, searchQueryField, serializeBody, setupQueryDependencies, setupQueryExecuteState, setupQueryState, shouldAutoExecuteGqlQuery, shouldAutoExecuteQuery, shouldCacheQuery, shouldRetryRequest, silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent, skipPaginationPageParamCalculator, sortQueryField, splitQueryConfig, stringArrayQueryField, switchQueryCollectionState, switchQueryState, takeUntilResponse, toQuerySignal, toQuerySubject, tokensNotAvailableInsideAuthAndExec, transformArrayResponse, transformExecStateToQueryState, transformGql, transformMethod, transformPaginatedResponse, transformToBoolean, transformToBooleanArray, transformToDate, transformToDateArray, transformToNumber, transformToNumberArray, transformToSort, transformToSortQueryParam, transformToString, transformToStringArray, uncacheableRequestHasAllowCacheParam, uncacheableRequestHasCacheKeyParam, v2BuildQueryCacheKey, v2ExtractExpiresInSeconds, v2ShouldCacheQuery, v2ShouldRetryRequest, validateWithQuery, validateWithV2Query, withArgs, withArgsQueryFeatureMissingButRouteIsFunction, withAuthenticationQuery, withAutoRefresh, withAutoRefreshUsedInManualQuery, withAutoRefreshUsedOnUnsupportedHttpMethod, withErrorHandling, withInactivityLogout, withLogging, withPageResetOnError, withPersistentAuth, withPolling, withPollingUsedOnUnsupportedHttpMethod, withRefreshQuery, withResponseUpdate, withSuccessHandling, withTokenExpirationWarning, withTokenRevocation, withTracking, wrapAsObservableSignal };
|
|
4895
|
+
export type { AnyBearerAuthProvider, AnyCreateBearerAuthProviderResult, AnyCreateGqlQueryCreatorOptions, AnyCreateQueryClientResult, AnyGqlQueryConfig, AnyInfinityQuery, AnyInfinityQueryConfig, AnyLegacyQuery, AnyLegacyQueryCreator, AnyNewQuery, AnyPagedQueryStack, AnyQueryBuilder, AnyQueryClient, AnyQueryCollection, AnyQueryCollectionData, AnyQueryCollectionResponse, AnyQueryCreator, AnyQueryCreatorCollection, AnyQueryForm, AnyQuerySnapshot, AnyQueryStack, AnyRestQueryConfig, AnyRoute, AnyV2Query, AnyV2QueryCreator, AnyWebSocketClient, AppendItemsLocation, AuthProvider, AuthProviderBasicConfig, AuthProviderBearerConfig, AuthProviderCustomHeaderConfig, AuthQueryBuilder, AuthQueryConfig, BaseArguments, BaseQueryCreatorFactoryOptions, BaseQueryCreatorOptions, BaseQueryCreatorOptionsSubtle, BearerAuthExecutionState, BearerAuthExecutionStateError, BearerAuthExecutionStateLoading, BearerAuthExecutionStateLogout, BearerAuthExecutionStateSuccess, BearerAuthFeature, BearerAuthProvider, BearerAuthProviderFeatureContext, BearerAuthProviderOf, BearerAuthProviderQueryContext, BearerAuthProviderRef, BearerAuthProviderTokens, BearerRefreshConfig, BodyType, BuildQueryStringConfig, CacheAdapterFn, Cancelled, ClassValidatorError, ClearQueryArgs, ConstructQuery, CreateBaseQueryOptions, CreateBearerAuthProviderConfig, CreateGqlQueryCreatorOptions, CreateGqlQueryExecuteOptions, CreateGqlQueryOptions, CreateHttpRequestDependencies, CreateHttpRequestOptions, CreateLegacyQueryCreatorOptions, CreateLegacyQueryOptions, CreatePagedQueryStackOptions, CreateQueryClientConfigOptions, CreateQueryCreatorOptions, CreateQueryExecuteOptions, CreateQueryFormConfig, CreateQueryObjectOptions, CreateQueryOptions, CreateQueryRepositoryConfig, CreateQuerySnapshotOptions, CreateQueryStackOptions, CreateSecureGqlQueryExecuteOptions, CreateSecureGqlQueryOptions, CreateSecureQueryExecuteOptions, CreateSecureQueryOptions, CreateWebSocketClientConfigOptions, CreateWebSocketClientTransport, DestroyCleanupCallback, EmptyObject, EntityGetParams, EntityIdParams, EntityKey, EntitySetParams, EntityStoreConfig, ExecuteFactory, ExecuteQueryOptions, ExtractQueryArgs, ExtractQueryKey, Failure, FeatureRegistry, GQL, GqlQueryArgs, GqlQueryConfig, GqlQueryConfigWithoutMethod, GqlQueryMethod, GqlQueryTransport, GqlTransferOption, GqlTransformer, GqlVariablesType, HttpErrorEvent, HttpRequest, HttpRequestLoadingProgressState, HttpRequestLoadingState, HttpRequestResponseType, HttpRequestTransferCacheConfig, InactivityLogoutConfig, InactivityLogoutFeature, InfinityQueryConfig, InfinityQueryConfigType, InfinityQueryOf, InfinityQueryParamLocation, InsertFromConfig, InternalCreateGqlQueryCreatorOptions, InternalCreateQueryCreatorOptions, InternalQueryExecute, InternalSecureCreateGqlQueryCreatorOptions, InternalSecureCreateQueryCreatorOptions, InternalWebSocketRoom, LeaderInstanceCountChangeEventData, LeaderStatusChangeEventData, LegacyArgumentsOfQueryArgs, LegacyQueryPrepareFn, Loading, MapViolationsToFormErrorsOptions, Method, ObservableSignal, OptionalQueryFieldOptions, PageParamCalculatorOptions, PagedQueryStack, PagedQueryStackDirection, PagedQueryStackExecuteOptions, PagedQueryStackResetOptions, PartialXhrState, PathParams, PathParamsType, PersistentAuthConfig, PersistentAuthFeature, PollConfig, Prepared, Query, QueryArgs, QueryArgsOf, QueryArgsOfLegacyArguments, QueryAutoRefreshConfig, QueryBase, QueryClient, QueryClientDevtoolsOptions, QueryClientRef, QueryCollectionKeysOf, QueryCollectionOf, QueryCollectionWithNullableQuery, QueryConfig, QueryConfigBase, QueryConfigWithoutMethod, QueryContainerConfig, QueryContext, QueryCreator, QueryDataOf, QueryDependencies, QueryDevtoolsEntry, QueryDevtoolsEntryKind, QueryDevtoolsEntryMeta, QueryDirectiveContext, QueryDirectiveType, QueryEntityConfig, QueryErrorResponse, QueryErrorResponseItem, QueryErrorResponseList, QueryErrorResponseSingle, QueryExecute, QueryExecuteArgs, QueryExecuteEventData, QueryExecuteOptions, QueryExecuteState, QueryExecutionState, QueryExecutionStateFailure, QueryExecutionStateLoading, QueryExecutionStateLoadingWithCachedResponse, QueryExecutionStateLoadingWithNoResponse, QueryExecutionStateSuccess, QueryFailureEventData, QueryFeature, QueryFeatureContext, QueryFeatureFlags, QueryFeatureFn, QueryFieldConfig, QueryFieldDef, QueryFieldOptions, QueryFieldValue, QueryFilterConfig, QueryFormBranch, QueryFormChange, QueryFormFields, QueryFormGroup, QueryFormGroupControls, QueryFormModel, QueryFormObserveOptions, QueryFormOf, QueryFormOptions, QueryFormSignalsObserveOptions, QueryFormSignalsWriteOptions, QueryFormValue, QueryFormValueEvent, QueryFormWriteOptions, QueryKey, QueryMethod, QueryMockConfig, QueryOf, QueryParams, QueryParamsType, QueryPrepareFn, QueryRegistry, QueryRegistryEntry, QueryRepository, QueryRepositoryCacheEntry, QueryRepositoryDependencies, QueryRepositoryEvent, QueryRepositoryItem, QueryRepositoryRequestOptions, QueryRepositorySubtle, QueryResponseOf, QueryRouteOf, QuerySequence, QuerySequenceResult, QuerySequenceStatus, QuerySequenceStepArgs, QuerySnapshot, QueryStack, QueryStackSubtle, QueryState, QueryStateMeta, QueryStateResponseOf, QueryStateSignal, QueryStateSubtle, QueryStateSuccessMeta, QueryStoreIdOf, QueryStoreOf, QuerySubtle, QuerySuccessEventData, QueryTrigger, RawResponseType, ReadonlyQuery, 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, 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, WebSocketClientResult, WebSocketClientSubtle, WebSocketDevtoolsHandle, WebSocketDevtoolsMessage, WebSocketRoom, WithAutoRefreshFeatureOptions, WithBody, WithConfig, WithErrorHandlingFeatureOptions, WithHeaders, WithInjector, WithLegacyConfig, WithLoggingFeatureOptions, WithMock, WithPageResetOnErrorFeatureOptions, WithPathParams, WithPollingFeatureOptions, WithQueryParams, WithResponseUpdateFeatureFnData, WithResponseUpdateFeatureOptions, WithSuccessHandlingFeatureOptions, WithVariables };
|