@codeleap/query 7.0.2 → 7.1.2
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/dist/factors/createQueryManager.d.ts +17 -14
- package/dist/factors/createQueryManager.d.ts.map +1 -1
- package/dist/factors/createQueryManager.js +18 -19
- package/dist/factors/createQueryManager.js.map +1 -1
- package/dist/factors/createQueryOperations.js +3 -6
- package/dist/factors/createQueryOperations.js.map +1 -1
- package/dist/factors/index.js +2 -18
- package/dist/factors/index.js.map +1 -1
- package/dist/index.js +3 -19
- package/dist/index.js.map +1 -1
- package/dist/lib/Mutations.js +39 -50
- package/dist/lib/Mutations.js.map +1 -1
- package/dist/lib/QueryClientEnhanced/index.js +45 -51
- package/dist/lib/QueryClientEnhanced/index.js.map +1 -1
- package/dist/lib/QueryClientEnhanced/types.js +1 -2
- package/dist/lib/QueryKeys.js +80 -91
- package/dist/lib/QueryKeys.js.map +1 -1
- package/dist/lib/QueryManager.d.ts +26 -10
- package/dist/lib/QueryManager.d.ts.map +1 -1
- package/dist/lib/QueryManager.js +173 -121
- package/dist/lib/QueryManager.js.map +1 -1
- package/dist/lib/QueryOperations/index.d.ts +2 -2
- package/dist/lib/QueryOperations/index.d.ts.map +1 -1
- package/dist/lib/QueryOperations/index.js +33 -33
- package/dist/lib/QueryOperations/index.js.map +1 -1
- package/dist/lib/QueryOperations/types.js +1 -2
- package/dist/lib/index.js +5 -21
- package/dist/lib/index.js.map +1 -1
- package/dist/types/core.d.ts +17 -3
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/core.js +1 -2
- package/dist/types/create.js +1 -2
- package/dist/types/delete.js +1 -2
- package/dist/types/index.js +7 -23
- package/dist/types/index.js.map +1 -1
- package/dist/types/list.d.ts +6 -4
- package/dist/types/list.d.ts.map +1 -1
- package/dist/types/list.js +1 -2
- package/dist/types/retrieve.js +1 -2
- package/dist/types/update.js +1 -2
- package/dist/types/utility.js +1 -2
- package/dist/utils/index.js +1 -17
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/misc.js +3 -7
- package/dist/utils/misc.js.map +1 -1
- package/package.json +6 -5
- package/src/factors/createQueryManager.ts +19 -16
- package/src/lib/QueryManager.ts +55 -15
- package/src/types/core.ts +22 -3
- package/src/types/list.ts +7 -5
package/dist/lib/QueryKeys.js
CHANGED
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.createQueryKeys = exports.QueryKeys = void 0;
|
|
16
|
-
const react_1 = require("react");
|
|
17
|
-
const types_1 = require("@codeleap/types");
|
|
18
|
-
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { TypeGuards } from '@codeleap/types';
|
|
3
|
+
import deepEqual from 'fast-deep-equal';
|
|
19
4
|
/**
|
|
20
5
|
* Class for managing React Query keys and operations for a specific query type
|
|
21
6
|
* @template T - The query item type that extends QueryItem
|
|
22
7
|
* @template F - The filter type used for list queries
|
|
23
8
|
*/
|
|
24
|
-
class QueryKeys {
|
|
9
|
+
export class QueryKeys {
|
|
10
|
+
queryName;
|
|
11
|
+
queryClient;
|
|
25
12
|
/**
|
|
26
13
|
* Creates a new QueryKeys instance
|
|
27
14
|
* @param queryName - The name of the query used as base for all keys
|
|
@@ -52,9 +39,9 @@ class QueryKeys {
|
|
|
52
39
|
* @returns Query key array with or without filters
|
|
53
40
|
*/
|
|
54
41
|
listKeyWithFilters(filters) {
|
|
55
|
-
const hasValidFilters = !
|
|
42
|
+
const hasValidFilters = !TypeGuards.isNil(filters) && (typeof filters !== 'object'
|
|
56
43
|
? Boolean(filters)
|
|
57
|
-
: Object.values(filters
|
|
44
|
+
: Object.values(filters ?? {}).some(value => value != null && (typeof value !== 'string' || value.trim() !== '')));
|
|
58
45
|
return hasValidFilters ? [...this.keys.list, filters] : this.keys.list;
|
|
59
46
|
}
|
|
60
47
|
/**
|
|
@@ -63,7 +50,7 @@ class QueryKeys {
|
|
|
63
50
|
* @returns Memoized query key array
|
|
64
51
|
*/
|
|
65
52
|
useListKeyWithFilters(filters) {
|
|
66
|
-
return
|
|
53
|
+
return useMemo(() => {
|
|
67
54
|
return this.listKeyWithFilters(filters);
|
|
68
55
|
}, [filters]);
|
|
69
56
|
}
|
|
@@ -73,7 +60,7 @@ class QueryKeys {
|
|
|
73
60
|
* @returns Memoized query key array for retrieve operation
|
|
74
61
|
*/
|
|
75
62
|
useRetrieveKey(id) {
|
|
76
|
-
return
|
|
63
|
+
return useMemo(() => {
|
|
77
64
|
return this.keys.retrieve(id);
|
|
78
65
|
}, [id]);
|
|
79
66
|
}
|
|
@@ -85,9 +72,8 @@ class QueryKeys {
|
|
|
85
72
|
* @returns True if the query matches the query name
|
|
86
73
|
*/
|
|
87
74
|
predicateQueryKeyAll(queryName, query) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return queryKey === null || queryKey === void 0 ? void 0 : queryKey.includes(queryName);
|
|
75
|
+
const queryKey = query?.queryKey?.join('/');
|
|
76
|
+
return queryKey?.includes(queryName);
|
|
91
77
|
}
|
|
92
78
|
/**
|
|
93
79
|
* Predicate function to check if a query is a list query for this query name
|
|
@@ -98,15 +84,14 @@ class QueryKeys {
|
|
|
98
84
|
* @returns True if the query is a list query and not in the ignore list
|
|
99
85
|
*/
|
|
100
86
|
predicateQueryKeyList(queryName, query, toIgnoreQueryKeys) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (ignoreQueryKeys.some(key => (0, fast_deep_equal_1.default)(query === null || query === void 0 ? void 0 : query.queryKey, key))) {
|
|
87
|
+
const queryKey = query?.queryKey?.join('/');
|
|
88
|
+
if (!TypeGuards.isNil(toIgnoreQueryKeys)) {
|
|
89
|
+
const ignoreQueryKeys = Array.isArray(toIgnoreQueryKeys?.[0]) ? toIgnoreQueryKeys : [toIgnoreQueryKeys];
|
|
90
|
+
if (ignoreQueryKeys.some(key => deepEqual(query?.queryKey, key))) {
|
|
106
91
|
return false;
|
|
107
92
|
}
|
|
108
93
|
}
|
|
109
|
-
const isListQueryKey =
|
|
94
|
+
const isListQueryKey = queryKey?.includes(queryName) && queryKey?.includes('list');
|
|
110
95
|
return isListQueryKey;
|
|
111
96
|
}
|
|
112
97
|
/**
|
|
@@ -115,10 +100,11 @@ class QueryKeys {
|
|
|
115
100
|
* @param options - Optional invalidation options
|
|
116
101
|
* @returns Promise that resolves when invalidation is complete
|
|
117
102
|
*/
|
|
118
|
-
invalidateAll(filters, options) {
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
103
|
+
async invalidateAll(filters, options) {
|
|
104
|
+
return this.queryClient.invalidateQueries({
|
|
105
|
+
...filters,
|
|
106
|
+
predicate: (query) => this.predicateQueryKeyAll(this.queryName, query),
|
|
107
|
+
}, options);
|
|
122
108
|
}
|
|
123
109
|
/**
|
|
124
110
|
* Invalidates list queries, optionally with specific filters
|
|
@@ -128,14 +114,15 @@ class QueryKeys {
|
|
|
128
114
|
* @param options - Optional invalidation options
|
|
129
115
|
* @returns Promise that resolves when invalidation is complete
|
|
130
116
|
*/
|
|
131
|
-
invalidateList(listFilters, ignoreQueryKeys, filters, options) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
117
|
+
async invalidateList(listFilters, ignoreQueryKeys, filters, options) {
|
|
118
|
+
if (!!listFilters) {
|
|
119
|
+
const queryKey = this.listKeyWithFilters(listFilters);
|
|
120
|
+
return this.queryClient.invalidateQueries({ ...filters, queryKey }, options);
|
|
121
|
+
}
|
|
122
|
+
return this.queryClient.invalidateQueries({
|
|
123
|
+
...filters,
|
|
124
|
+
predicate: (query) => this.predicateQueryKeyList(this.queryName, query, ignoreQueryKeys),
|
|
125
|
+
}, options);
|
|
139
126
|
}
|
|
140
127
|
/**
|
|
141
128
|
* Invalidates a specific retrieve query by ID
|
|
@@ -144,11 +131,12 @@ class QueryKeys {
|
|
|
144
131
|
* @param options - Optional invalidation options
|
|
145
132
|
* @returns Promise that resolves when invalidation is complete
|
|
146
133
|
*/
|
|
147
|
-
invalidateRetrieve(id, filters, options) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
134
|
+
async invalidateRetrieve(id, filters, options) {
|
|
135
|
+
const queryKey = this.keys.retrieve(id);
|
|
136
|
+
return this.queryClient.invalidateQueries({
|
|
137
|
+
...filters,
|
|
138
|
+
queryKey,
|
|
139
|
+
}, options);
|
|
152
140
|
}
|
|
153
141
|
/**
|
|
154
142
|
* Refetches all queries for this query name
|
|
@@ -156,10 +144,11 @@ class QueryKeys {
|
|
|
156
144
|
* @param options - Optional refetch options
|
|
157
145
|
* @returns Promise that resolves when refetch is complete
|
|
158
146
|
*/
|
|
159
|
-
refetchAll(filters, options) {
|
|
160
|
-
return
|
|
161
|
-
|
|
162
|
-
|
|
147
|
+
async refetchAll(filters, options) {
|
|
148
|
+
return this.queryClient.refetchQueries({
|
|
149
|
+
...filters,
|
|
150
|
+
predicate: (query) => this.predicateQueryKeyAll(this.queryName, query),
|
|
151
|
+
}, options);
|
|
163
152
|
}
|
|
164
153
|
/**
|
|
165
154
|
* Refetches list queries, optionally with specific filters
|
|
@@ -169,14 +158,15 @@ class QueryKeys {
|
|
|
169
158
|
* @param options - Optional refetch options
|
|
170
159
|
* @returns Promise that resolves when refetch is complete
|
|
171
160
|
*/
|
|
172
|
-
refetchList(listFilters, ignoreQueryKeys, filters, options) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
161
|
+
async refetchList(listFilters, ignoreQueryKeys, filters, options) {
|
|
162
|
+
if (!!listFilters) {
|
|
163
|
+
const queryKey = this.listKeyWithFilters(listFilters);
|
|
164
|
+
return this.queryClient.refetchQueries({ ...filters, queryKey }, options);
|
|
165
|
+
}
|
|
166
|
+
return this.queryClient.refetchQueries({
|
|
167
|
+
...filters,
|
|
168
|
+
predicate: (query) => this.predicateQueryKeyList(this.queryName, query, ignoreQueryKeys),
|
|
169
|
+
}, options);
|
|
180
170
|
}
|
|
181
171
|
/**
|
|
182
172
|
* Refetches a specific retrieve query by ID
|
|
@@ -185,11 +175,12 @@ class QueryKeys {
|
|
|
185
175
|
* @param options - Optional refetch options
|
|
186
176
|
* @returns Promise that resolves when refetch is complete
|
|
187
177
|
*/
|
|
188
|
-
refetchRetrieve(id, filters, options) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
178
|
+
async refetchRetrieve(id, filters, options) {
|
|
179
|
+
const queryKey = this.keys.retrieve(id);
|
|
180
|
+
return this.queryClient.refetchQueries({
|
|
181
|
+
...filters,
|
|
182
|
+
queryKey,
|
|
183
|
+
}, options);
|
|
193
184
|
}
|
|
194
185
|
/**
|
|
195
186
|
* Removes a specific retrieve query data from the cache
|
|
@@ -197,10 +188,11 @@ class QueryKeys {
|
|
|
197
188
|
* @param filters - Optional filters to apply to the removal
|
|
198
189
|
* @returns Promise that resolves when removal is complete
|
|
199
190
|
*/
|
|
200
|
-
removeRetrieveQueryData(id, filters) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
191
|
+
async removeRetrieveQueryData(id, filters) {
|
|
192
|
+
const queryKey = this.keys.retrieve(id);
|
|
193
|
+
return this.queryClient.removeQueries({
|
|
194
|
+
...filters,
|
|
195
|
+
queryKey,
|
|
204
196
|
});
|
|
205
197
|
}
|
|
206
198
|
/**
|
|
@@ -211,14 +203,15 @@ class QueryKeys {
|
|
|
211
203
|
* @param options - Optional cancellation options
|
|
212
204
|
* @returns Promise that resolves when cancellation is complete
|
|
213
205
|
*/
|
|
214
|
-
cancelListQueries(listFilters, ignoreQueryKeys, filters, options) {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
206
|
+
async cancelListQueries(listFilters, ignoreQueryKeys, filters, options) {
|
|
207
|
+
if (!!listFilters) {
|
|
208
|
+
const queryKey = this.listKeyWithFilters(listFilters);
|
|
209
|
+
return this.queryClient.cancelQueries({ ...filters, queryKey }, options);
|
|
210
|
+
}
|
|
211
|
+
return this.queryClient.cancelQueries({
|
|
212
|
+
...filters,
|
|
213
|
+
predicate: (query) => this.predicateQueryKeyList(this.queryName, query, ignoreQueryKeys),
|
|
214
|
+
}, options);
|
|
222
215
|
}
|
|
223
216
|
/**
|
|
224
217
|
* Gets list data from the cache, including both items array and item map
|
|
@@ -226,12 +219,11 @@ class QueryKeys {
|
|
|
226
219
|
* @returns Object containing items array and itemMap (keyed by ID)
|
|
227
220
|
*/
|
|
228
221
|
getListData(filters) {
|
|
229
|
-
var _a;
|
|
230
222
|
const queryKey = this.listKeyWithFilters(filters);
|
|
231
223
|
const data = this.queryClient.getQueryData(queryKey);
|
|
232
|
-
const items = (
|
|
224
|
+
const items = (data?.pages ?? []).flat();
|
|
233
225
|
const itemMap = items.reduce((acc, item) => {
|
|
234
|
-
acc[item
|
|
226
|
+
acc[item?.id] = item;
|
|
235
227
|
return acc;
|
|
236
228
|
}, {});
|
|
237
229
|
return {
|
|
@@ -255,29 +247,28 @@ class QueryKeys {
|
|
|
255
247
|
* @returns Item | undefined
|
|
256
248
|
*/
|
|
257
249
|
getRetrieveData(id, options = {}) {
|
|
258
|
-
var _a;
|
|
259
250
|
const { onlyQueryData = false, deepSearch = false, } = options;
|
|
260
|
-
if (
|
|
251
|
+
if (TypeGuards.isNil(id))
|
|
261
252
|
return undefined;
|
|
262
253
|
const queryKey = this.keys.retrieve(id);
|
|
263
254
|
const queryData = this.queryClient.getQueryData(queryKey);
|
|
264
|
-
if (queryData
|
|
255
|
+
if (queryData?.id)
|
|
265
256
|
return queryData;
|
|
266
257
|
if (onlyQueryData)
|
|
267
258
|
return undefined;
|
|
268
259
|
if (!deepSearch) {
|
|
269
260
|
const { itemMap } = this.getListData();
|
|
270
|
-
return itemMap
|
|
261
|
+
return itemMap?.[id];
|
|
271
262
|
}
|
|
272
263
|
const queries = this.getAllListQueries();
|
|
273
264
|
for (const query of queries) {
|
|
274
|
-
const pages =
|
|
275
|
-
if (!
|
|
265
|
+
const pages = query.state.data?.pages;
|
|
266
|
+
if (!pages?.length)
|
|
276
267
|
continue;
|
|
277
268
|
const item = pages
|
|
278
269
|
.filter(Boolean)
|
|
279
270
|
.flatMap(page => Array.isArray(page) ? page : [])
|
|
280
|
-
.find(item =>
|
|
271
|
+
.find(item => item?.id === id);
|
|
281
272
|
if (item)
|
|
282
273
|
return item;
|
|
283
274
|
}
|
|
@@ -305,7 +296,6 @@ class QueryKeys {
|
|
|
305
296
|
return query;
|
|
306
297
|
}
|
|
307
298
|
}
|
|
308
|
-
exports.QueryKeys = QueryKeys;
|
|
309
299
|
/**
|
|
310
300
|
* Factory function to create a new QueryKeys instance
|
|
311
301
|
* @template T - The query item type that extends QueryItem
|
|
@@ -314,8 +304,7 @@ exports.QueryKeys = QueryKeys;
|
|
|
314
304
|
* @param queryClient - The React Query client instance
|
|
315
305
|
* @returns New QueryKeys instance
|
|
316
306
|
*/
|
|
317
|
-
const createQueryKeys = (name, queryClient) => {
|
|
307
|
+
export const createQueryKeys = (name, queryClient) => {
|
|
318
308
|
return new QueryKeys(name, queryClient);
|
|
319
309
|
};
|
|
320
|
-
exports.createQueryKeys = createQueryKeys;
|
|
321
310
|
//# sourceMappingURL=QueryKeys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryKeys.js","sourceRoot":"","sources":["../../src/lib/QueryKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"QueryKeys.js","sourceRoot":"","sources":["../../src/lib/QueryKeys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,OAAO,SAAS,MAAM,iBAAiB,CAAA;AAEvC;;;;GAIG;AACH,MAAM,OAAO,SAAS;IAOV;IACA;IAPV;;;;OAIG;IACH,YACU,SAAiB,EACjB,WAAwB;QADxB,cAAS,GAAT,SAAS,CAAQ;QACjB,gBAAW,GAAX,WAAW,CAAa;IAC9B,CAAC;IAEL;;;OAGG;IACH,IAAI,IAAI;QACN,OAAO;YACL,UAAU;YACV,IAAI,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAa;YAC1C,QAAQ,EAAE,CAAC,EAAmB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAa;YAE/E,YAAY;YACZ,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAa;YAC9C,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAa;YAC9C,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAa;SAC/C,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,kBAAkB,CAAC,OAAW;QAC5B,MAAM,eAAe,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CACpD,OAAO,OAAO,KAAK,QAAQ;YACzB,CAAC,CAAC,OAAO,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|
import { Mutations } from './Mutations';
|
|
4
|
-
import { CreateMutationCtx, CreateMutationOptions, ListPaginationResponse, ListQueryOptions, QueryItem, QueryManagerOptions, RetrieveQueryOptions, UpdateMutationCtx, UpdateMutationOptions, DeleteMutationCtx, DeleteMutationOptions } from '../types';
|
|
4
|
+
import { CreateMutationCtx, CreateMutationOptions, ListPaginationResponse, ListQueryOptions, ListResponseMeta, QueryItem, QueryManagerOptions, RetrieveQueryOptions, UpdateMutationCtx, UpdateMutationOptions, DeleteMutationCtx, DeleteMutationOptions } from '../types';
|
|
5
5
|
/**
|
|
6
6
|
* Comprehensive query manager class that provides hooks and utilities for managing CRUD operations with React Query
|
|
7
7
|
* @template T - The query item type that extends QueryItem
|
|
8
8
|
* @template F - The filter type used for list queries
|
|
9
|
+
* @template M - Optional metadata shape returned alongside list items (e.g. `{ count: number }`). Defaults to `Record<string, unknown>`.
|
|
9
10
|
*
|
|
10
11
|
* @description
|
|
11
12
|
* QueryManager provides a complete solution for managing list and individual item queries with:
|
|
12
13
|
* - Infinite scroll pagination for lists
|
|
14
|
+
* - Support for list response metadata (e.g. total count) via envelope responses
|
|
13
15
|
* - Optimistic updates for create, update, and delete operations
|
|
14
16
|
* - Automatic cache synchronization between list and individual queries
|
|
15
17
|
* - Built-in error handling and rollback mechanisms
|
|
16
18
|
*/
|
|
17
|
-
export declare class QueryManager<T extends QueryItem, F> {
|
|
19
|
+
export declare class QueryManager<T extends QueryItem, F, M extends ListResponseMeta = ListResponseMeta> {
|
|
18
20
|
private options;
|
|
19
21
|
queryClient: QueryClient;
|
|
20
22
|
/**
|
|
21
23
|
* Creates a new QueryManager instance
|
|
22
24
|
* @param options - Configuration options for the query manager
|
|
23
25
|
*/
|
|
24
|
-
constructor(options: QueryManagerOptions<T, F>);
|
|
26
|
+
constructor(options: QueryManagerOptions<T, F, M>);
|
|
25
27
|
/**
|
|
26
28
|
* Gets the name of this query manager
|
|
27
29
|
* @returns The query name used for identification
|
|
@@ -32,7 +34,7 @@ export declare class QueryManager<T extends QueryItem, F> {
|
|
|
32
34
|
* @returns Object containing all configured function handlers
|
|
33
35
|
*/
|
|
34
36
|
get functions(): {
|
|
35
|
-
list: ((limit: number, offset: number, filters: F) => Promise<
|
|
37
|
+
list: ((limit: number, offset: number, filters: F) => Promise<import("..").ListFnResponse<T, M>>) | undefined;
|
|
36
38
|
retrieve: ((id: T["id"]) => Promise<T>) | undefined;
|
|
37
39
|
create: ((data: Partial<T>) => Promise<T>) | undefined;
|
|
38
40
|
update: ((data: Partial<T>) => Promise<T>) | undefined;
|
|
@@ -45,20 +47,33 @@ export declare class QueryManager<T extends QueryItem, F> {
|
|
|
45
47
|
/**
|
|
46
48
|
* React hook for infinite scroll list queries with pagination
|
|
47
49
|
* @param options - Configuration options for the list query
|
|
48
|
-
* @returns Object containing items array, query key, and query object
|
|
50
|
+
* @returns Object containing items array, response metadata, query key, and query object
|
|
51
|
+
*
|
|
52
|
+
* @description
|
|
53
|
+
* When `listFn` returns a `ListPaginationEnvelope` (an object with `listItems` and extra fields),
|
|
54
|
+
* the extra fields are exposed as typed `meta` in the return value. When `listFn` returns a plain
|
|
55
|
+
* array, `meta` is `null`. Meta is stored in the query cache under a companion key, so it
|
|
56
|
+
* survives component remounts and is available even when React Query serves from cache.
|
|
49
57
|
*
|
|
50
58
|
* @example
|
|
51
59
|
* ```typescript
|
|
60
|
+
* // Plain array response (backward compatible)
|
|
52
61
|
* const { items, query } = queryManager.useList({
|
|
53
62
|
* filters: { status: 'active' },
|
|
54
63
|
* limit: 20
|
|
55
64
|
* })
|
|
65
|
+
*
|
|
66
|
+
* // Envelope response with metadata
|
|
67
|
+
* const { items, meta } = queryManager.useList({ filters })
|
|
68
|
+
* console.log(meta?.count) // total item count from the API
|
|
56
69
|
* ```
|
|
57
70
|
*/
|
|
58
|
-
useList(options?: ListQueryOptions<T, F>): {
|
|
71
|
+
useList(options?: ListQueryOptions<T, F, M>): {
|
|
59
72
|
items: T[];
|
|
73
|
+
meta: M | null;
|
|
60
74
|
queryKey: readonly unknown[];
|
|
61
|
-
query: import("@tanstack/react-query").UseInfiniteQueryResult<import("
|
|
75
|
+
query: import("@tanstack/react-query").UseInfiniteQueryResult<import("..").ListSelector<T, M>, Error>;
|
|
76
|
+
listLimit: number;
|
|
62
77
|
};
|
|
63
78
|
/**
|
|
64
79
|
* React hook for retrieving a single item by ID
|
|
@@ -80,9 +95,9 @@ export declare class QueryManager<T extends QueryItem, F> {
|
|
|
80
95
|
* ```
|
|
81
96
|
*/
|
|
82
97
|
useRetrieve(id: T['id'], options?: RetrieveQueryOptions<T>): {
|
|
83
|
-
item: import("@tanstack/
|
|
98
|
+
item: import("@tanstack/query-core").NoInfer<T> | undefined;
|
|
84
99
|
queryKey: readonly unknown[];
|
|
85
|
-
query: import("@tanstack/react-query").UseQueryResult<import("@tanstack/
|
|
100
|
+
query: import("@tanstack/react-query").UseQueryResult<import("@tanstack/query-core").NoInfer<T>, Error>;
|
|
86
101
|
};
|
|
87
102
|
/**
|
|
88
103
|
* React hook for creating new items with optimistic updates
|
|
@@ -183,6 +198,8 @@ export declare class QueryManager<T extends QueryItem, F> {
|
|
|
183
198
|
*
|
|
184
199
|
* @description
|
|
185
200
|
* Use this method to preload paginated list data that users are likely to need soon.
|
|
201
|
+
* Handles both plain array and envelope responses from `listFn`, but only caches the
|
|
202
|
+
* items — metadata is discarded during prefetch and populated on the first client-side fetch.
|
|
186
203
|
*
|
|
187
204
|
* @example
|
|
188
205
|
* ```typescript
|
|
@@ -192,7 +209,6 @@ export declare class QueryManager<T extends QueryItem, F> {
|
|
|
192
209
|
* { staleTime: 5 * 60 * 1000 }
|
|
193
210
|
* )
|
|
194
211
|
* }
|
|
195
|
-
*
|
|
196
212
|
* ```
|
|
197
213
|
*/
|
|
198
214
|
prefetchList(filters?: F, options?: Omit<FetchInfiniteQueryOptions<ListPaginationResponse<T>, Error, ListPaginationResponse<T>, QueryKey, number>, 'queryKey' | 'queryFn' | 'initialPageParam'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryManager.d.ts","sourceRoot":"","sources":["../../src/lib/QueryManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAyC,WAAW,EAAE,QAAQ,EAA2C,MAAM,uBAAuB,CAAA;AAE3L,OAAO,EAAmB,SAAS,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAmB,SAAS,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,gBAAgB,EAAa,SAAS,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryManager.d.ts","sourceRoot":"","sources":["../../src/lib/QueryManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAyC,WAAW,EAAE,QAAQ,EAA2C,MAAM,uBAAuB,CAAA;AAE3L,OAAO,EAAmB,SAAS,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAmB,SAAS,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,gBAAgB,EAAa,SAAS,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAKpR;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAY,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,EAAE,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IAMjF,OAAO,CAAC,OAAO;IAL3B,WAAW,EAAE,WAAW,CAAA;IACxB;;;OAGG;gBACiB,OAAO,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,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