@simpleapps-com/augur-hooks 0.1.8 → 0.2.0
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/chunk-4CNSPZ7Q.cjs +575 -0
- package/dist/chunk-4CNSPZ7Q.cjs.map +1 -0
- package/dist/chunk-D3APHDL4.js +575 -0
- package/dist/chunk-D3APHDL4.js.map +1 -0
- package/dist/index.cjs +152 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -5
- package/dist/index.d.ts +97 -5
- package/dist/index.js +152 -29
- package/dist/index.js.map +1 -1
- package/dist/{item-search-infinite-CF43MUMf.d.ts → joomla-content-list-CDF5-OJ3.d.cts} +108 -80
- package/dist/{item-search-infinite-CF43MUMf.d.cts → joomla-content-list-CDF5-OJ3.d.ts} +108 -80
- package/dist/server.cjs +2 -4
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +9 -11
- package/package.json +2 -2
- package/dist/chunk-IGWLRQ6Y.js +0 -329
- package/dist/chunk-IGWLRQ6Y.js.map +0 -1
- package/dist/chunk-XTEAAXJ4.cjs +0 -329
- package/dist/chunk-XTEAAXJ4.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _simpleapps_com_augur_utils from '@simpleapps-com/augur-utils';
|
|
2
|
-
import { TPriceData, TItemDetails, TInvMastDoc, TCategory, TAttribute, TItemsFilters, TProductItem, TProductCategory } from '@simpleapps-com/augur-utils';
|
|
2
|
+
import { TPriceData, TItemDetails, TInvMastDoc, TCategory, TAttribute, TItemsFilters, TProductItem, TJoomlaContent, TJoomlaContentFilters, TProductCategory } from '@simpleapps-com/augur-utils';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
@@ -44,6 +44,32 @@ type SearchSuggestionsResponse = {
|
|
|
44
44
|
total: number;
|
|
45
45
|
totalResults: number;
|
|
46
46
|
};
|
|
47
|
+
/** Cache provider for Redis-compatible storage. */
|
|
48
|
+
interface CacheProvider {
|
|
49
|
+
prefix: string;
|
|
50
|
+
get: (key: string) => Promise<string | null>;
|
|
51
|
+
set: (key: string, value: string, ttlSeconds: number) => Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
/** Cache settings for a single tier. */
|
|
54
|
+
interface CacheTierConfig {
|
|
55
|
+
/** CDN edge cache. Passed directly to SDK as edgeCache. Valid values: 1–8 (hours) or '30s', '1m', '5m'. */
|
|
56
|
+
edgeCache?: number | string;
|
|
57
|
+
/** Redis cache TTL in seconds. Requires provider. */
|
|
58
|
+
redis?: number;
|
|
59
|
+
/** React Query staleTime in ms. Overrides the built-in default. */
|
|
60
|
+
staleTime?: number;
|
|
61
|
+
/** React Query gcTime (garbage collection) in ms. Overrides the built-in default. */
|
|
62
|
+
gcTime?: number;
|
|
63
|
+
}
|
|
64
|
+
/** Cache configuration. All fields optional, all off by default. */
|
|
65
|
+
interface CacheConfig {
|
|
66
|
+
/** Redis-compatible cache. Required for redis caching. */
|
|
67
|
+
provider?: CacheProvider;
|
|
68
|
+
/** TTLs for long-lived data (categories, item details, docs). */
|
|
69
|
+
static?: CacheTierConfig;
|
|
70
|
+
/** TTLs for frequently-changing data (prices, stock, search). */
|
|
71
|
+
semiStatic?: CacheTierConfig;
|
|
72
|
+
}
|
|
47
73
|
/** API options for item category queries. */
|
|
48
74
|
interface GetItemCategoryApiOptions {
|
|
49
75
|
childrenFilter?: string;
|
|
@@ -160,6 +186,10 @@ interface AugurCallbacks {
|
|
|
160
186
|
itemCategoryUid?: number | string;
|
|
161
187
|
pageParam: number;
|
|
162
188
|
}) => Promise<InfiniteScrollPage>;
|
|
189
|
+
/** Override Joomla content fetching. */
|
|
190
|
+
getJoomlaContent?: (articleId: number | string) => Promise<TJoomlaContent>;
|
|
191
|
+
/** Override Joomla content list fetching. */
|
|
192
|
+
getJoomlaContentList?: (categoryId: number | string, filters?: Partial<TJoomlaContentFilters>) => Promise<TJoomlaContent[]>;
|
|
163
193
|
}
|
|
164
194
|
|
|
165
195
|
/**
|
|
@@ -174,6 +204,8 @@ interface AugurHooksProviderProps {
|
|
|
174
204
|
callbacks?: AugurCallbacks;
|
|
175
205
|
/** Optional auth context — hooks fall back to these values when not passed directly. */
|
|
176
206
|
auth?: AugurAuthContext;
|
|
207
|
+
/** Optional cache configuration — controls edge and Redis caching per tier. */
|
|
208
|
+
cache?: CacheConfig;
|
|
177
209
|
children: ReactNode;
|
|
178
210
|
}
|
|
179
211
|
/**
|
|
@@ -199,7 +231,7 @@ interface AugurHooksProviderProps {
|
|
|
199
231
|
* </AugurHooksProvider>
|
|
200
232
|
* ```
|
|
201
233
|
*/
|
|
202
|
-
declare function AugurHooksProvider({ api, callbacks, auth, children, }: AugurHooksProviderProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
declare function AugurHooksProvider({ api, callbacks, auth, cache, children, }: AugurHooksProviderProps): react_jsx_runtime.JSX.Element;
|
|
203
235
|
/**
|
|
204
236
|
* Returns the augur-api SDK instance from context.
|
|
205
237
|
* Throws if called outside of `<AugurHooksProvider>`.
|
|
@@ -211,16 +243,12 @@ declare function useAugurApi(): AugurApiClient;
|
|
|
211
243
|
* auth fields are not passed directly as hook parameters.
|
|
212
244
|
*/
|
|
213
245
|
declare function useAugurAuth(): AugurAuthContext | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* Returns the provider-level cache configuration, if any.
|
|
248
|
+
* Used internally by hooks to enable edge/Redis caching.
|
|
249
|
+
*/
|
|
250
|
+
declare function useAugurCache(): CacheConfig | undefined;
|
|
214
251
|
|
|
215
|
-
declare const PRICE_CACHE_OPTIONS: {
|
|
216
|
-
readonly refetchOnReconnect: true;
|
|
217
|
-
readonly refetchOnWindowFocus: false;
|
|
218
|
-
readonly meta: {
|
|
219
|
-
readonly persist: true;
|
|
220
|
-
};
|
|
221
|
-
readonly staleTime: number;
|
|
222
|
-
readonly gcTime: number;
|
|
223
|
-
};
|
|
224
252
|
/**
|
|
225
253
|
* Generates a consistent query key for item price queries.
|
|
226
254
|
* Usable in both client hooks and server-side prefetch.
|
|
@@ -230,22 +258,18 @@ declare const getItemPriceKey: (itemId: string | undefined, customerId: string |
|
|
|
230
258
|
* Query options for item price. Accepts the SDK instance so it works
|
|
231
259
|
* in both client (via provider) and server (via direct construction).
|
|
232
260
|
*/
|
|
233
|
-
declare const getItemPriceOptions: (api: AugurApiClient, itemId: string | undefined, customerId: string | number | undefined, quantity?: number) => {
|
|
234
|
-
refetchOnReconnect: true;
|
|
235
|
-
refetchOnWindowFocus: false;
|
|
236
|
-
meta: {
|
|
237
|
-
readonly persist: true;
|
|
238
|
-
};
|
|
239
|
-
staleTime: number;
|
|
240
|
-
gcTime: number;
|
|
261
|
+
declare const getItemPriceOptions: (api: AugurApiClient, itemId: string | undefined, customerId: string | number | undefined, quantity?: number, cache?: CacheConfig) => {
|
|
241
262
|
queryKey: readonly ["price", string, string | number | undefined, number];
|
|
242
263
|
queryFn: () => Promise<TPriceData>;
|
|
264
|
+
staleTime: number | undefined;
|
|
265
|
+
gcTime: number | undefined;
|
|
266
|
+
refetchOnReconnect: boolean;
|
|
267
|
+
refetchOnWindowFocus: boolean;
|
|
268
|
+
meta: {
|
|
269
|
+
persist: boolean;
|
|
270
|
+
};
|
|
243
271
|
};
|
|
244
272
|
|
|
245
|
-
declare const INV_MAST_DOC_CACHE_OPTIONS: {
|
|
246
|
-
readonly staleTime: number;
|
|
247
|
-
readonly gcTime: number;
|
|
248
|
-
};
|
|
249
273
|
/**
|
|
250
274
|
* Generates a consistent query key for inv mast doc queries.
|
|
251
275
|
* Usable in both client hooks and server-side prefetch.
|
|
@@ -255,17 +279,13 @@ declare const getInvMastDocKey: (invMastUid: number, itemId: string, includePric
|
|
|
255
279
|
* Query options for inv mast doc. Accepts the SDK instance so it works
|
|
256
280
|
* in both client (via provider) and server (via direct construction).
|
|
257
281
|
*/
|
|
258
|
-
declare const getInvMastDocOptions: (api: AugurApiClient, invMastUid: number, itemId: string, includePricing: "Y" | "N") => {
|
|
259
|
-
staleTime: number;
|
|
260
|
-
gcTime: number;
|
|
282
|
+
declare const getInvMastDocOptions: (api: AugurApiClient, invMastUid: number, itemId: string, includePricing: "Y" | "N", cache?: CacheConfig) => {
|
|
261
283
|
queryKey: readonly ["invMastDoc", number, string, "Y" | "N"];
|
|
262
284
|
queryFn: () => Promise<TInvMastDoc>;
|
|
285
|
+
staleTime: number | undefined;
|
|
286
|
+
gcTime: number | undefined;
|
|
263
287
|
};
|
|
264
288
|
|
|
265
|
-
declare const CATEGORY_CACHE_OPTIONS: {
|
|
266
|
-
readonly staleTime: number;
|
|
267
|
-
readonly gcTime: number;
|
|
268
|
-
};
|
|
269
289
|
type ItemCategoryQueryKey = readonly [
|
|
270
290
|
"itemCategory",
|
|
271
291
|
number,
|
|
@@ -280,31 +300,27 @@ declare const getItemCategoryKey: (itemCategoryUid: number, apiOptions?: GetItem
|
|
|
280
300
|
* Query options for item category. Accepts the SDK instance so it works
|
|
281
301
|
* in both client (via provider) and server (via direct construction).
|
|
282
302
|
*/
|
|
283
|
-
declare const getItemCategoryOptions: (api: AugurApiClient, itemCategoryUid: number, apiOptions?: GetItemCategoryApiOptions) => {
|
|
284
|
-
staleTime: number;
|
|
285
|
-
gcTime: number;
|
|
303
|
+
declare const getItemCategoryOptions: (api: AugurApiClient, itemCategoryUid: number, apiOptions?: GetItemCategoryApiOptions, cache?: CacheConfig) => {
|
|
286
304
|
queryKey: ItemCategoryQueryKey;
|
|
287
305
|
queryFn: () => Promise<TCategory>;
|
|
306
|
+
staleTime: number | undefined;
|
|
307
|
+
gcTime: number | undefined;
|
|
288
308
|
};
|
|
289
309
|
|
|
290
|
-
declare const INV_MAST_CACHE_OPTIONS: {
|
|
291
|
-
readonly staleTime: number;
|
|
292
|
-
readonly gcTime: number;
|
|
293
|
-
};
|
|
294
310
|
declare const getInvMastKey: (invMastUid: number, itemId: string) => readonly ["invMast", number, string];
|
|
295
|
-
declare const getInvMastOptions: (api: AugurApiClient, invMastUid: number, itemId: string) => {
|
|
296
|
-
staleTime: number;
|
|
297
|
-
gcTime: number;
|
|
311
|
+
declare const getInvMastOptions: (api: AugurApiClient, invMastUid: number, itemId: string, cache?: CacheConfig) => {
|
|
298
312
|
queryKey: readonly ["invMast", number, string];
|
|
299
313
|
queryFn: () => Promise<TItemDetails>;
|
|
314
|
+
staleTime: number | undefined;
|
|
315
|
+
gcTime: number | undefined;
|
|
300
316
|
};
|
|
301
317
|
|
|
302
318
|
declare const getInvMastStockKey: (invMastUid: number | string) => readonly ["invMastStock", string | number];
|
|
303
|
-
declare const getInvMastStockOptions: (api: AugurApiClient, invMastUid: number | string) => {
|
|
304
|
-
staleTime: number;
|
|
305
|
-
gcTime: number;
|
|
319
|
+
declare const getInvMastStockOptions: (api: AugurApiClient, invMastUid: number | string, cache?: CacheConfig) => {
|
|
306
320
|
queryKey: readonly ["invMastStock", string | number];
|
|
307
321
|
queryFn: () => Promise<number>;
|
|
322
|
+
staleTime: number | undefined;
|
|
323
|
+
gcTime: number | undefined;
|
|
308
324
|
};
|
|
309
325
|
|
|
310
326
|
type ProductCategoryResponse = {
|
|
@@ -314,27 +330,27 @@ type ProductCategoryResponse = {
|
|
|
314
330
|
categoryImage: string | null;
|
|
315
331
|
};
|
|
316
332
|
declare const getProductCategoryKey: (itemCategoryUid: number | string | null) => readonly ["productCategory", string | number | null];
|
|
317
|
-
declare const getProductCategoryOptions: (api: AugurApiClient, itemCategoryUid: number | string) => {
|
|
318
|
-
staleTime: number;
|
|
319
|
-
gcTime: number;
|
|
333
|
+
declare const getProductCategoryOptions: (api: AugurApiClient, itemCategoryUid: number | string, cache?: CacheConfig) => {
|
|
320
334
|
queryKey: readonly ["productCategory", string | number | null];
|
|
321
335
|
queryFn: () => Promise<ProductCategoryResponse>;
|
|
336
|
+
staleTime: number | undefined;
|
|
337
|
+
gcTime: number | undefined;
|
|
322
338
|
};
|
|
323
339
|
|
|
324
340
|
declare const getItemDetailsKey: (itemId: number | string) => readonly ["itemDetails", string | number];
|
|
325
|
-
declare const getItemDetailsOptions: (api: AugurApiClient, itemId: number | string) => {
|
|
326
|
-
staleTime: number;
|
|
327
|
-
gcTime: number;
|
|
341
|
+
declare const getItemDetailsOptions: (api: AugurApiClient, itemId: number | string, cache?: CacheConfig) => {
|
|
328
342
|
queryKey: readonly ["itemDetails", string | number];
|
|
329
343
|
queryFn: () => Promise<TItemDetails>;
|
|
344
|
+
staleTime: number | undefined;
|
|
345
|
+
gcTime: number | undefined;
|
|
330
346
|
};
|
|
331
347
|
|
|
332
348
|
declare const getItemAttributesKey: (itemCategoryUid: number | string | null) => readonly ["itemAttributes", string | number | null];
|
|
333
|
-
declare const getItemAttributesOptions: (api: AugurApiClient, itemCategoryUid: number | string) => {
|
|
334
|
-
staleTime: number;
|
|
335
|
-
gcTime: number;
|
|
349
|
+
declare const getItemAttributesOptions: (api: AugurApiClient, itemCategoryUid: number | string, cache?: CacheConfig) => {
|
|
336
350
|
queryKey: readonly ["itemAttributes", string | number | null];
|
|
337
351
|
queryFn: () => Promise<any>;
|
|
352
|
+
staleTime: number | undefined;
|
|
353
|
+
gcTime: number | undefined;
|
|
338
354
|
};
|
|
339
355
|
|
|
340
356
|
type ProductSearchResponse = {
|
|
@@ -349,17 +365,13 @@ declare const getProductSearchKey: (pageData: PageData) => readonly ["productSea
|
|
|
349
365
|
* Query options for product search. Accepts the SDK instance so it works
|
|
350
366
|
* in both client (via provider) and server (via direct construction).
|
|
351
367
|
*/
|
|
352
|
-
declare const getProductSearchOptions: (api: AugurApiClient, pageData: PageData) => {
|
|
353
|
-
staleTime: number;
|
|
354
|
-
gcTime: number;
|
|
368
|
+
declare const getProductSearchOptions: (api: AugurApiClient, pageData: PageData, cache?: CacheConfig) => {
|
|
355
369
|
queryKey: readonly ["productSearch", string, number, number, string, number | undefined];
|
|
356
370
|
queryFn: () => Promise<ProductSearchResponse>;
|
|
371
|
+
staleTime: number | undefined;
|
|
372
|
+
gcTime: number | undefined;
|
|
357
373
|
};
|
|
358
374
|
|
|
359
|
-
declare const SEARCH_SUGGESTIONS_CACHE_OPTIONS: {
|
|
360
|
-
readonly staleTime: number;
|
|
361
|
-
readonly gcTime: number;
|
|
362
|
-
};
|
|
363
375
|
/**
|
|
364
376
|
* Generates a consistent query key for search suggestion queries.
|
|
365
377
|
*/
|
|
@@ -368,11 +380,11 @@ declare const getSearchSuggestionsKey: (query: string, limit: number, offset: nu
|
|
|
368
380
|
* Query options for search suggestions. Accepts the SDK instance so it works
|
|
369
381
|
* in both client (via provider) and server (via direct construction).
|
|
370
382
|
*/
|
|
371
|
-
declare const getSearchSuggestionsOptions: (api: AugurApiClient, query: string, limit?: number, offset?: number) => {
|
|
372
|
-
staleTime: number;
|
|
373
|
-
gcTime: number;
|
|
383
|
+
declare const getSearchSuggestionsOptions: (api: AugurApiClient, query: string, limit?: number, offset?: number, cache?: CacheConfig) => {
|
|
374
384
|
queryKey: readonly ["searchSuggestions", string, number, number];
|
|
375
385
|
queryFn: () => Promise<SearchSuggestionsResponse>;
|
|
386
|
+
staleTime: number | undefined;
|
|
387
|
+
gcTime: number | undefined;
|
|
376
388
|
};
|
|
377
389
|
|
|
378
390
|
/**
|
|
@@ -381,17 +393,17 @@ declare const getSearchSuggestionsOptions: (api: AugurApiClient, query: string,
|
|
|
381
393
|
declare function getCartPricingQueryOptions(api: AugurApiClient, cartLines: Array<{
|
|
382
394
|
itemId: string;
|
|
383
395
|
quantity: number;
|
|
384
|
-
}>, customerId: string | number | undefined): {
|
|
396
|
+
}>, customerId: string | number | undefined, cache?: CacheConfig): {
|
|
385
397
|
enabled: boolean;
|
|
386
|
-
refetchOnReconnect: true;
|
|
387
|
-
refetchOnWindowFocus: false;
|
|
388
|
-
meta: {
|
|
389
|
-
readonly persist: true;
|
|
390
|
-
};
|
|
391
|
-
staleTime: number;
|
|
392
|
-
gcTime: number;
|
|
393
398
|
queryKey: readonly ["price", string, string | number | undefined, number];
|
|
394
399
|
queryFn: () => Promise<_simpleapps_com_augur_utils.TPriceData>;
|
|
400
|
+
staleTime: number | undefined;
|
|
401
|
+
gcTime: number | undefined;
|
|
402
|
+
refetchOnReconnect: boolean;
|
|
403
|
+
refetchOnWindowFocus: boolean;
|
|
404
|
+
meta: {
|
|
405
|
+
persist: boolean;
|
|
406
|
+
};
|
|
395
407
|
}[];
|
|
396
408
|
|
|
397
409
|
declare const getCategoryItemsInfiniteKey: (itemCategoryUid: number, itemsFilters: TItemsFilters) => readonly ["categoryItemsInfinite", number, string];
|
|
@@ -399,15 +411,15 @@ declare const getCategoryItemsInfiniteKey: (itemCategoryUid: number, itemsFilter
|
|
|
399
411
|
* Full infinite query options for category items.
|
|
400
412
|
* Usable for server-side prefetch with `queryClient.prefetchInfiniteQuery()`.
|
|
401
413
|
*/
|
|
402
|
-
declare const getCategoryItemsInfiniteOptions: (api: AugurApiClient, itemCategoryUid: number, itemsFilters: TItemsFilters) => {
|
|
403
|
-
staleTime: number;
|
|
404
|
-
gcTime: number;
|
|
414
|
+
declare const getCategoryItemsInfiniteOptions: (api: AugurApiClient, itemCategoryUid: number, itemsFilters: TItemsFilters, cache?: CacheConfig) => {
|
|
405
415
|
queryKey: readonly ["categoryItemsInfinite", number, string];
|
|
406
416
|
queryFn: ({ pageParam, }: {
|
|
407
417
|
pageParam?: unknown;
|
|
408
418
|
}) => Promise<InfiniteScrollPage>;
|
|
409
419
|
initialPageParam: number;
|
|
410
420
|
getNextPageParam: (lastPage: InfiniteScrollPage) => number | undefined;
|
|
421
|
+
staleTime: number | undefined;
|
|
422
|
+
gcTime: number | undefined;
|
|
411
423
|
};
|
|
412
424
|
|
|
413
425
|
declare const getItemSearchInfiniteKey: (itemsFilters: TItemsFilters, itemCategoryUid?: number | string) => readonly ["itemSearchInfinite", string, string | number | undefined];
|
|
@@ -415,18 +427,34 @@ declare const getItemSearchInfiniteKey: (itemsFilters: TItemsFilters, itemCatego
|
|
|
415
427
|
* Full infinite query options for item search.
|
|
416
428
|
* Usable for server-side prefetch with `queryClient.prefetchInfiniteQuery()`.
|
|
417
429
|
*/
|
|
418
|
-
declare const getItemSearchInfiniteOptions: (api: AugurApiClient, itemsFilters: TItemsFilters, itemCategoryUid?: number | string) => {
|
|
419
|
-
meta: {
|
|
420
|
-
persist: boolean;
|
|
421
|
-
};
|
|
422
|
-
staleTime: number;
|
|
423
|
-
gcTime: number;
|
|
430
|
+
declare const getItemSearchInfiniteOptions: (api: AugurApiClient, itemsFilters: TItemsFilters, itemCategoryUid?: number | string, cache?: CacheConfig) => {
|
|
424
431
|
queryKey: readonly ["itemSearchInfinite", string, string | number | undefined];
|
|
425
432
|
queryFn: ({ pageParam, }: {
|
|
426
433
|
pageParam?: unknown;
|
|
427
434
|
}) => Promise<InfiniteScrollPage>;
|
|
428
435
|
initialPageParam: number;
|
|
429
436
|
getNextPageParam: (lastPage: InfiniteScrollPage) => number | undefined;
|
|
437
|
+
staleTime: number | undefined;
|
|
438
|
+
gcTime: number | undefined;
|
|
439
|
+
meta: {
|
|
440
|
+
persist: boolean;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
declare const getJoomlaContentKey: (articleId: number | string) => readonly ["joomlaContent", string | number];
|
|
445
|
+
declare const getJoomlaContentOptions: (api: AugurApiClient, articleId: number | string, cache?: CacheConfig) => {
|
|
446
|
+
queryKey: readonly ["joomlaContent", string | number];
|
|
447
|
+
queryFn: () => Promise<TJoomlaContent>;
|
|
448
|
+
staleTime: number | undefined;
|
|
449
|
+
gcTime: number | undefined;
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
declare const getJoomlaContentListKey: (categoryId: number | string, filters?: Partial<TJoomlaContentFilters>) => readonly ["joomlaContentList", string | number, Partial<TJoomlaContentFilters> | undefined];
|
|
453
|
+
declare const getJoomlaContentListOptions: (api: AugurApiClient, categoryId: number | string, filters?: Partial<TJoomlaContentFilters>, cache?: CacheConfig) => {
|
|
454
|
+
queryKey: readonly ["joomlaContentList", string | number, Partial<TJoomlaContentFilters> | undefined];
|
|
455
|
+
queryFn: () => Promise<TJoomlaContent[]>;
|
|
456
|
+
staleTime: number | undefined;
|
|
457
|
+
gcTime: number | undefined;
|
|
430
458
|
};
|
|
431
459
|
|
|
432
|
-
export { type
|
|
460
|
+
export { type AugurCallbacks as A, getJoomlaContentListKey as B, type CacheConfig as C, getJoomlaContentListOptions as D, getJoomlaContentOptions as E, getProductCategoryKey as F, type GetItemCategoryApiOptions as G, getProductCategoryOptions as H, type InfiniteScrollPage as I, getProductSearchKey as J, getProductSearchOptions as K, getSearchSuggestionsKey as L, getSearchSuggestionsOptions as M, useAugurApi as N, useAugurAuth as O, type PageData as P, useAugurCache as Q, type SearchSuggestionsResponse as S, type SearchSuggestion as a, type AugurApiClient as b, type AugurAuthContext as c, AugurHooksProvider as d, type CacheProvider as e, type CacheTierConfig as f, getCartPricingQueryOptions as g, getCategoryItemsInfiniteKey as h, getCategoryItemsInfiniteOptions as i, getInvMastDocKey as j, getInvMastDocOptions as k, getInvMastKey as l, getInvMastOptions as m, getInvMastStockKey as n, getInvMastStockOptions as o, getItemAttributesKey as p, getItemAttributesOptions as q, getItemCategoryKey as r, getItemCategoryOptions as s, getItemDetailsKey as t, getItemDetailsOptions as u, getItemPriceKey as v, getItemPriceOptions as w, getItemSearchInfiniteKey as x, getItemSearchInfiniteOptions as y, getJoomlaContentKey as z };
|
package/dist/server.cjs
CHANGED
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
var _chunk4CNSPZ7Qcjs = require('./chunk-4CNSPZ7Q.cjs');
|
|
32
33
|
|
|
33
|
-
var _chunkXTEAAXJ4cjs = require('./chunk-XTEAAXJ4.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -61,7 +61,5 @@ var _chunkXTEAAXJ4cjs = require('./chunk-XTEAAXJ4.cjs');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
exports.CATEGORY_CACHE_OPTIONS = _chunkXTEAAXJ4cjs.CATEGORY_CACHE_OPTIONS; exports.INV_MAST_CACHE_OPTIONS = _chunkXTEAAXJ4cjs.INV_MAST_CACHE_OPTIONS; exports.INV_MAST_DOC_CACHE_OPTIONS = _chunkXTEAAXJ4cjs.INV_MAST_DOC_CACHE_OPTIONS; exports.PRICE_CACHE_OPTIONS = _chunkXTEAAXJ4cjs.PRICE_CACHE_OPTIONS; exports.SEARCH_SUGGESTIONS_CACHE_OPTIONS = _chunkXTEAAXJ4cjs.SEARCH_SUGGESTIONS_CACHE_OPTIONS; exports.getCartPricingQueryOptions = _chunkXTEAAXJ4cjs.getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = _chunkXTEAAXJ4cjs.getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = _chunkXTEAAXJ4cjs.getCategoryItemsInfiniteOptions; exports.getInvMastDocKey = _chunkXTEAAXJ4cjs.getInvMastDocKey; exports.getInvMastDocOptions = _chunkXTEAAXJ4cjs.getInvMastDocOptions; exports.getInvMastKey = _chunkXTEAAXJ4cjs.getInvMastKey; exports.getInvMastOptions = _chunkXTEAAXJ4cjs.getInvMastOptions; exports.getInvMastStockKey = _chunkXTEAAXJ4cjs.getInvMastStockKey; exports.getInvMastStockOptions = _chunkXTEAAXJ4cjs.getInvMastStockOptions; exports.getItemAttributesKey = _chunkXTEAAXJ4cjs.getItemAttributesKey; exports.getItemAttributesOptions = _chunkXTEAAXJ4cjs.getItemAttributesOptions; exports.getItemCategoryKey = _chunkXTEAAXJ4cjs.getItemCategoryKey; exports.getItemCategoryOptions = _chunkXTEAAXJ4cjs.getItemCategoryOptions; exports.getItemDetailsKey = _chunkXTEAAXJ4cjs.getItemDetailsKey; exports.getItemDetailsOptions = _chunkXTEAAXJ4cjs.getItemDetailsOptions; exports.getItemPriceKey = _chunkXTEAAXJ4cjs.getItemPriceKey; exports.getItemPriceOptions = _chunkXTEAAXJ4cjs.getItemPriceOptions; exports.getItemSearchInfiniteKey = _chunkXTEAAXJ4cjs.getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = _chunkXTEAAXJ4cjs.getItemSearchInfiniteOptions; exports.getProductCategoryKey = _chunkXTEAAXJ4cjs.getProductCategoryKey; exports.getProductCategoryOptions = _chunkXTEAAXJ4cjs.getProductCategoryOptions; exports.getProductSearchKey = _chunkXTEAAXJ4cjs.getProductSearchKey; exports.getProductSearchOptions = _chunkXTEAAXJ4cjs.getProductSearchOptions; exports.getSearchSuggestionsKey = _chunkXTEAAXJ4cjs.getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = _chunkXTEAAXJ4cjs.getSearchSuggestionsOptions; exports.stableStringify = _chunkXTEAAXJ4cjs.stableStringify;
|
|
64
|
+
exports.getCartPricingQueryOptions = _chunk4CNSPZ7Qcjs.getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = _chunk4CNSPZ7Qcjs.getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = _chunk4CNSPZ7Qcjs.getCategoryItemsInfiniteOptions; exports.getInvMastDocKey = _chunk4CNSPZ7Qcjs.getInvMastDocKey; exports.getInvMastDocOptions = _chunk4CNSPZ7Qcjs.getInvMastDocOptions; exports.getInvMastKey = _chunk4CNSPZ7Qcjs.getInvMastKey; exports.getInvMastOptions = _chunk4CNSPZ7Qcjs.getInvMastOptions; exports.getInvMastStockKey = _chunk4CNSPZ7Qcjs.getInvMastStockKey; exports.getInvMastStockOptions = _chunk4CNSPZ7Qcjs.getInvMastStockOptions; exports.getItemAttributesKey = _chunk4CNSPZ7Qcjs.getItemAttributesKey; exports.getItemAttributesOptions = _chunk4CNSPZ7Qcjs.getItemAttributesOptions; exports.getItemCategoryKey = _chunk4CNSPZ7Qcjs.getItemCategoryKey; exports.getItemCategoryOptions = _chunk4CNSPZ7Qcjs.getItemCategoryOptions; exports.getItemDetailsKey = _chunk4CNSPZ7Qcjs.getItemDetailsKey; exports.getItemDetailsOptions = _chunk4CNSPZ7Qcjs.getItemDetailsOptions; exports.getItemPriceKey = _chunk4CNSPZ7Qcjs.getItemPriceKey; exports.getItemPriceOptions = _chunk4CNSPZ7Qcjs.getItemPriceOptions; exports.getItemSearchInfiniteKey = _chunk4CNSPZ7Qcjs.getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = _chunk4CNSPZ7Qcjs.getItemSearchInfiniteOptions; exports.getJoomlaContentKey = _chunk4CNSPZ7Qcjs.getJoomlaContentKey; exports.getJoomlaContentListKey = _chunk4CNSPZ7Qcjs.getJoomlaContentListKey; exports.getJoomlaContentListOptions = _chunk4CNSPZ7Qcjs.getJoomlaContentListOptions; exports.getJoomlaContentOptions = _chunk4CNSPZ7Qcjs.getJoomlaContentOptions; exports.getProductCategoryKey = _chunk4CNSPZ7Qcjs.getProductCategoryKey; exports.getProductCategoryOptions = _chunk4CNSPZ7Qcjs.getProductCategoryOptions; exports.getProductSearchKey = _chunk4CNSPZ7Qcjs.getProductSearchKey; exports.getProductSearchOptions = _chunk4CNSPZ7Qcjs.getProductSearchOptions; exports.getSearchSuggestionsKey = _chunk4CNSPZ7Qcjs.getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = _chunk4CNSPZ7Qcjs.getSearchSuggestionsOptions; exports.stableStringify = _chunk4CNSPZ7Qcjs.stableStringify;
|
|
67
65
|
//# sourceMappingURL=server.cjs.map
|
package/dist/server.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-hooks/dist/server.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-hooks/dist/server.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uqEAAC","file":"/home/runner/work/augur-packages/augur-packages/packages/augur-hooks/dist/server.cjs"}
|
package/dist/server.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b as AugurApiClient, c as AugurAuthContext, A as AugurCallbacks, I as InfiniteScrollPage, P as PageData, g as getCartPricingQueryOptions, h as getCategoryItemsInfiniteKey, i as getCategoryItemsInfiniteOptions, j as getInvMastDocKey, k as getInvMastDocOptions, l as getInvMastKey, m as getInvMastOptions, n as getInvMastStockKey, o as getInvMastStockOptions, p as getItemAttributesKey, q as getItemAttributesOptions, r as getItemCategoryKey, s as getItemCategoryOptions, t as getItemDetailsKey, u as getItemDetailsOptions, v as getItemPriceKey, w as getItemPriceOptions, x as getItemSearchInfiniteKey, y as getItemSearchInfiniteOptions, z as getJoomlaContentKey, B as getJoomlaContentListKey, D as getJoomlaContentListOptions, E as getJoomlaContentOptions, F as getProductCategoryKey, H as getProductCategoryOptions, J as getProductSearchKey, K as getProductSearchOptions, L as getSearchSuggestionsKey, M as getSearchSuggestionsOptions } from './joomla-content-list-CDF5-OJ3.cjs';
|
|
2
2
|
import '@simpleapps-com/augur-utils';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { b as AugurApiClient, c as AugurAuthContext, A as AugurCallbacks, I as InfiniteScrollPage, P as PageData, g as getCartPricingQueryOptions, h as getCategoryItemsInfiniteKey, i as getCategoryItemsInfiniteOptions, j as getInvMastDocKey, k as getInvMastDocOptions, l as getInvMastKey, m as getInvMastOptions, n as getInvMastStockKey, o as getInvMastStockOptions, p as getItemAttributesKey, q as getItemAttributesOptions, r as getItemCategoryKey, s as getItemCategoryOptions, t as getItemDetailsKey, u as getItemDetailsOptions, v as getItemPriceKey, w as getItemPriceOptions, x as getItemSearchInfiniteKey, y as getItemSearchInfiniteOptions, z as getJoomlaContentKey, B as getJoomlaContentListKey, D as getJoomlaContentListOptions, E as getJoomlaContentOptions, F as getProductCategoryKey, H as getProductCategoryOptions, J as getProductSearchKey, K as getProductSearchOptions, L as getSearchSuggestionsKey, M as getSearchSuggestionsOptions } from './joomla-content-list-CDF5-OJ3.js';
|
|
2
2
|
import '@simpleapps-com/augur-utils';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
package/dist/server.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
CATEGORY_CACHE_OPTIONS,
|
|
3
|
-
INV_MAST_CACHE_OPTIONS,
|
|
4
|
-
INV_MAST_DOC_CACHE_OPTIONS,
|
|
5
|
-
PRICE_CACHE_OPTIONS,
|
|
6
|
-
SEARCH_SUGGESTIONS_CACHE_OPTIONS,
|
|
7
2
|
getCartPricingQueryOptions,
|
|
8
3
|
getCategoryItemsInfiniteKey,
|
|
9
4
|
getCategoryItemsInfiniteOptions,
|
|
@@ -23,6 +18,10 @@ import {
|
|
|
23
18
|
getItemPriceOptions,
|
|
24
19
|
getItemSearchInfiniteKey,
|
|
25
20
|
getItemSearchInfiniteOptions,
|
|
21
|
+
getJoomlaContentKey,
|
|
22
|
+
getJoomlaContentListKey,
|
|
23
|
+
getJoomlaContentListOptions,
|
|
24
|
+
getJoomlaContentOptions,
|
|
26
25
|
getProductCategoryKey,
|
|
27
26
|
getProductCategoryOptions,
|
|
28
27
|
getProductSearchKey,
|
|
@@ -30,13 +29,8 @@ import {
|
|
|
30
29
|
getSearchSuggestionsKey,
|
|
31
30
|
getSearchSuggestionsOptions,
|
|
32
31
|
stableStringify
|
|
33
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-D3APHDL4.js";
|
|
34
33
|
export {
|
|
35
|
-
CATEGORY_CACHE_OPTIONS,
|
|
36
|
-
INV_MAST_CACHE_OPTIONS,
|
|
37
|
-
INV_MAST_DOC_CACHE_OPTIONS,
|
|
38
|
-
PRICE_CACHE_OPTIONS,
|
|
39
|
-
SEARCH_SUGGESTIONS_CACHE_OPTIONS,
|
|
40
34
|
getCartPricingQueryOptions,
|
|
41
35
|
getCategoryItemsInfiniteKey,
|
|
42
36
|
getCategoryItemsInfiniteOptions,
|
|
@@ -56,6 +50,10 @@ export {
|
|
|
56
50
|
getItemPriceOptions,
|
|
57
51
|
getItemSearchInfiniteKey,
|
|
58
52
|
getItemSearchInfiniteOptions,
|
|
53
|
+
getJoomlaContentKey,
|
|
54
|
+
getJoomlaContentListKey,
|
|
55
|
+
getJoomlaContentListOptions,
|
|
56
|
+
getJoomlaContentOptions,
|
|
59
57
|
getProductCategoryKey,
|
|
60
58
|
getProductCategoryOptions,
|
|
61
59
|
getProductSearchKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleapps-com/augur-hooks",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Cross-platform React Query hooks and Zustand stores for Augur ecommerce sites",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@simpleapps-com/augur-utils": "0.
|
|
34
|
+
"@simpleapps-com/augur-utils": "0.2.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@simpleapps-com/augur-api": "^0.9.6",
|