@emeryld/rrroutes-client 2.3.11 → 2.3.12
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/README.md +1 -2
- package/dist/index.cjs +23 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +23 -8
- package/dist/index.mjs.map +1 -1
- package/dist/routesV3.client.types.d.ts +16 -6
- package/package.json +2 -2
|
@@ -91,10 +91,6 @@ export type RouteClientOptions<Names extends string = string> = {
|
|
|
91
91
|
fetcher?: Fetcher;
|
|
92
92
|
/** Shared React Query client used for caching/invalidation. */
|
|
93
93
|
queryClient: QueryClient;
|
|
94
|
-
/** Query string key used for pagination cursors (default: "cursor"). */
|
|
95
|
-
cursorParam?: string;
|
|
96
|
-
/** Function that extracts the next cursor from an infinite query page. */
|
|
97
|
-
getNextCursor?: (page: unknown) => Cursor;
|
|
98
94
|
/** Optional debug logger for verbose insights (supports minimal/complete modes). */
|
|
99
95
|
debug?: RouteClientDebugOptions<Names>;
|
|
100
96
|
/**
|
|
@@ -112,7 +108,7 @@ type UseEndpointResult<L extends AnyLeafLowProfile, Result> = Result & {
|
|
|
112
108
|
/** Variadic args consumed by the direct fetch helper: optional args + body. */
|
|
113
109
|
export type MutationFetchArgs<L extends AnyLeafLowProfile> = Prettify<[
|
|
114
110
|
...ArgsTuple<L>,
|
|
115
|
-
InferBody<L>
|
|
111
|
+
InferBody<L, undefined>
|
|
116
112
|
]>;
|
|
117
113
|
/** Signature for the fetch helper returned by mutation builds. */
|
|
118
114
|
export type MutationFetcher<L extends AnyLeafLowProfile> = (...args: MutationFetchArgs<L>) => Promise<InferOutput<L>>;
|
|
@@ -162,7 +158,21 @@ export type QueryBuildOptionsFor<L extends AnyLeafLowProfile> = Omit<UseQueryOpt
|
|
|
162
158
|
onReceive?: OnReceive<L>;
|
|
163
159
|
};
|
|
164
160
|
/** Build options for feed-style GET leaves (`cfg.feed === true`). */
|
|
165
|
-
export type InfiniteBuildOptionsFor<L extends AnyLeafLowProfile> = Omit<UseInfiniteQueryOptions<InferOutput<L>, unknown, InfiniteData<InferOutput<L>>, QueryKey, Cursor>, 'queryKey' | 'queryFn' | '
|
|
161
|
+
export type InfiniteBuildOptionsFor<L extends AnyLeafLowProfile> = Omit<UseInfiniteQueryOptions<InferOutput<L>, unknown, InfiniteData<InferOutput<L>>, QueryKey, Cursor>, 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'> & {
|
|
162
|
+
/**
|
|
163
|
+
* Query string parameter that carries pagination cursors. Defaults to "pagination_cursor".
|
|
164
|
+
*/
|
|
165
|
+
cursorParam?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Override the initial cursor passed to React Query's `useInfiniteQuery`.
|
|
168
|
+
* Defaults to `undefined`.
|
|
169
|
+
*/
|
|
170
|
+
initialPageParam?: Cursor;
|
|
171
|
+
/**
|
|
172
|
+
* Override how the next cursor is derived from the last page.
|
|
173
|
+
* Defaults to a helper that looks for `page.nextCursor` or `page.meta.nextCursor`.
|
|
174
|
+
*/
|
|
175
|
+
getNextPageParam?: (lastPage: InferOutput<L>) => Cursor;
|
|
166
176
|
/** Hook invoked after a successful fetch + validation. */
|
|
167
177
|
onReceive?: OnReceive<L>;
|
|
168
178
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emeryld/rrroutes-client",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@emeryld/rrroutes-contract": "^2.4.
|
|
22
|
+
"@emeryld/rrroutes-contract": "^2.4.18",
|
|
23
23
|
"zod": "^4.1.13"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|