@simpleapps-com/augur-hooks 0.4.2 → 0.4.4

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { G as GetItemCategoryApiOptions, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, I as InfiniteScrollPage, A as AugurCallbacks, C as CacheConfig, b as AugurApiClient, c as AugurAuthContext, d as PersistenceConfig } from './customer-quotes-SdLKX_-8.js';
2
- export { e as AugurHooksProvider, f as CacheProvider, g as CacheTierConfig, h as getCartPricingQueryOptions, i as getCategoryItemsInfiniteKey, j as getCategoryItemsInfiniteOptions, k as getCustomerInvoiceDetailKey, l as getCustomerInvoicesKey, m as getCustomerOrderDetailKey, n as getCustomerOrdersKey, o as getCustomerQuoteDetailKey, p as getCustomerQuotesKey, q as getInvMastDocKey, r as getInvMastDocOptions, s as getInvMastKey, t as getInvMastOptions, u as getInvMastStockKey, v as getInvMastStockOptions, w as getItemAttributesKey, x as getItemAttributesOptions, y as getItemCategoryKey, z as getItemCategoryOptions, B as getItemDetailsKey, D as getItemDetailsOptions, E as getItemPriceKey, F as getItemPriceOptions, H as getItemSearchInfiniteKey, J as getItemSearchInfiniteOptions, K as getJoomlaContentKey, L as getJoomlaContentListKey, M as getJoomlaContentListOptions, N as getJoomlaContentOptions, O as getJoomlaMenuDocKey, Q as getJoomlaMenuDocOptions, R as getJoomlaMenuKey, T as getJoomlaMenuOptions, U as getProductCategoryKey, V as getProductCategoryOptions, W as getProductSearchKey, X as getProductSearchOptions, Y as getSearchSuggestionsKey, Z as getSearchSuggestionsOptions, _ as useAugurApi, $ as useAugurApiOptional, a0 as useAugurAuth, a1 as useAugurCache } from './customer-quotes-SdLKX_-8.js';
1
+ import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, I as InfiniteScrollPage, A as AugurCallbacks, C as CacheConfig, b as AugurApiClient, c as AugurAuthContext, d as PersistenceConfig } from './customer-quotes-DjCgi3z3.js';
2
+ export { e as AugurHooksProvider, f as BatchQueryConfig, g as CacheProvider, h as CacheTierConfig, i as executeBatchQuery, j as getBatchInvMastDocKey, k as getBatchInvMastDocOptions, l as getCartPricingQueryOptions, m as getCategoryItemsInfiniteKey, n as getCategoryItemsInfiniteOptions, o as getCustomerInvoiceDetailKey, p as getCustomerInvoicesKey, q as getCustomerOrderDetailKey, r as getCustomerOrdersKey, s as getCustomerQuoteDetailKey, t as getCustomerQuotesKey, u as getInvMastDocKey, v as getInvMastDocOptions, w as getInvMastKey, x as getInvMastOptions, y as getInvMastStockKey, z as getInvMastStockOptions, D as getItemAttributesKey, E as getItemAttributesOptions, F as getItemCategoryKey, H as getItemCategoryOptions, J as getItemDetailsKey, K as getItemDetailsOptions, L as getItemPriceKey, M as getItemPriceOptions, N as getItemSearchInfiniteKey, O as getItemSearchInfiniteOptions, Q as getJoomlaContentKey, R as getJoomlaContentListKey, T as getJoomlaContentListOptions, U as getJoomlaContentOptions, V as getJoomlaMenuDocKey, W as getJoomlaMenuDocOptions, X as getJoomlaMenuKey, Y as getJoomlaMenuOptions, Z as getProductCategoryKey, _ as getProductCategoryOptions, $ as getProductSearchKey, a0 as getProductSearchOptions, a1 as getSearchSuggestionsKey, a2 as getSearchSuggestionsOptions, a3 as useAugurApi, a4 as useAugurApiOptional, a5 as useAugurAuth, a6 as useAugurCache } from './customer-quotes-DjCgi3z3.js';
3
3
  import * as zustand from 'zustand';
4
4
  import { TCartLine, TItemsFilters, TPriceData, TInvMastDoc, TCategory, TItemDetails, TAttribute, TJoomlaContent, TJoomlaContentFilters, MenuItem, TMenuFilters, ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
@@ -149,6 +149,26 @@ declare function useInvMastStock(invMastUid: number | string, options?: UseInvMa
149
149
  error: Error | null;
150
150
  };
151
151
 
152
+ interface UseBatchInvMastDocOptions {
153
+ enabled?: boolean;
154
+ includePricing?: "Y" | "N";
155
+ /** Override the default queryFn (e.g. with a cached server action). */
156
+ queryFn?: (params: BatchInvMastDocParam[], includePricing: "Y" | "N") => Promise<Record<string, TInvMastDoc>>;
157
+ }
158
+ /**
159
+ * Fetches and caches multiple inventory master documents in a single batch.
160
+ *
161
+ * Checks the queryClient cache for each param before fetching.
162
+ * Only uncached items are sent to the batch call.
163
+ * Individual `["invMastDoc", ...]` cache entries are seeded from the response
164
+ * so subsequent `useInvMastDoc` calls find data pre-cached.
165
+ */
166
+ declare function useBatchInvMastDoc(params: BatchInvMastDocParam[], options?: UseBatchInvMastDocOptions): {
167
+ items: Record<string, TInvMastDoc>;
168
+ isLoading: boolean;
169
+ error: Error | null;
170
+ };
171
+
152
172
  type ProductCategoryResponse = {
153
173
  itemCategoryDesc: string;
154
174
  childrenTotal: number;
@@ -600,6 +620,7 @@ interface SiteHooks {
600
620
  useCartPricing: typeof useCartPricing;
601
621
  useInvMast: typeof useInvMast;
602
622
  useInvMastDoc: typeof useInvMastDoc;
623
+ useBatchInvMastDoc: typeof useBatchInvMastDoc;
603
624
  useInvMastStock: typeof useInvMastStock;
604
625
  useItemCategory: typeof useItemCategory;
605
626
  useProductCategory: typeof useProductCategory;
@@ -685,4 +706,4 @@ declare function useAugurPersistence(config: PersistenceConfig): {
685
706
  };
686
707
  };
687
708
 
688
- export { AugurApiClient, AugurAuthContext, AugurCallbacks, CacheConfig, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, GetItemCategoryApiOptions, InfiniteScrollPage, PageData, PersistenceConfig, SearchSuggestion, SearchSuggestionsResponse, createSiteHooks, useAugurPersistence, useCartActions, useCartHdrUid, useCartInitialization, useCartLineCount, useCartLines, useCartPricing, useCartQuantityTotal, useCartStore, useCategoryItemsInfinite, useClearCart, useCustomerInvoices, useCustomerOrders, useCustomerQuotes, useDebounce, useFormatPrice, useInvMast, useInvMastDoc, useInvMastStock, useInvoiceDetail, useItemAttributes, useItemCategory, useItemDetails, useItemFiltersStore, useItemPrice, useItemSearchInfinite, useJoomlaContent, useJoomlaContentList, useJoomlaMenu, useJoomlaMenuDoc, useOrderDetail, usePaginationPrefetch, useProductCategory, useProductSearch, useQuoteDetail, useSearchSuggestions, useSetCartHdrUid, useSetCartLines };
709
+ export { AugurApiClient, AugurAuthContext, AugurCallbacks, BatchInvMastDocParam, CacheConfig, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, GetItemCategoryApiOptions, InfiniteScrollPage, PageData, PersistenceConfig, SearchSuggestion, SearchSuggestionsResponse, createSiteHooks, useAugurPersistence, useBatchInvMastDoc, useCartActions, useCartHdrUid, useCartInitialization, useCartLineCount, useCartLines, useCartPricing, useCartQuantityTotal, useCartStore, useCategoryItemsInfinite, useClearCart, useCustomerInvoices, useCustomerOrders, useCustomerQuotes, useDebounce, useFormatPrice, useInvMast, useInvMastDoc, useInvMastStock, useInvoiceDetail, useItemAttributes, useItemCategory, useItemDetails, useItemFiltersStore, useItemPrice, useItemSearchInfinite, useJoomlaContent, useJoomlaContentList, useJoomlaMenu, useJoomlaMenuDoc, useOrderDetail, usePaginationPrefetch, useProductCategory, useProductSearch, useQuoteDetail, useSearchSuggestions, useSetCartHdrUid, useSetCartLines };
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  import {
2
+ executeBatchQuery,
3
+ getBatchInvMastDocKey,
4
+ getBatchInvMastDocOptions,
2
5
  getCartPricingQueryOptions,
3
6
  getCategoryItemsInfiniteKey,
4
7
  getCategoryItemsInfiniteOptions,
@@ -38,7 +41,7 @@ import {
38
41
  getProductSearchOptions,
39
42
  getSearchSuggestionsKey,
40
43
  getSearchSuggestionsOptions
41
- } from "./chunk-CL3XM5B5.js";
44
+ } from "./chunk-PZK7QARW.js";
42
45
  import {
43
46
  useImageWithFallback
44
47
  } from "./chunk-LTBEP4MC.js";
@@ -276,8 +279,44 @@ function useInvMastStock(invMastUid, options = {}) {
276
279
  };
277
280
  }
278
281
 
282
+ // src/hooks/use-batch-inv-mast-doc.ts
283
+ import { useQuery as useQuery6, useQueryClient } from "@tanstack/react-query";
284
+ function useBatchInvMastDoc(params, options = {}) {
285
+ const api = useAugurApiOptional();
286
+ const callbacks = useAugurCallbacks();
287
+ const cache = useAugurCache();
288
+ const queryClient = useQueryClient();
289
+ const includePricing = options.includePricing ?? "N";
290
+ const batchOpts = getBatchInvMastDocOptions(api, params, includePricing, cache);
291
+ const resolveFetchItems = (uncached) => {
292
+ if (options.queryFn) {
293
+ return options.queryFn(uncached, includePricing);
294
+ }
295
+ if (callbacks?.batchGetInvMastDocs) {
296
+ return callbacks.batchGetInvMastDocs(uncached, includePricing);
297
+ }
298
+ const fallbackOpts = getBatchInvMastDocOptions(api, uncached, includePricing, cache);
299
+ return fallbackOpts.queryFn();
300
+ };
301
+ const { data, isLoading, error } = useQuery6({
302
+ queryKey: batchOpts.queryKey,
303
+ queryFn: () => executeBatchQuery({
304
+ params,
305
+ queryClient,
306
+ getItemKey: (p) => getInvMastDocKey(p.invMastUid, p.itemId, includePricing),
307
+ getResultKey: (p) => p.itemId.toUpperCase(),
308
+ fetchItems: resolveFetchItems,
309
+ getSeedKey: (_key, doc) => getInvMastDocKey(doc.invMastUid, doc.itemId, includePricing)
310
+ }),
311
+ staleTime: batchOpts.staleTime,
312
+ gcTime: batchOpts.gcTime,
313
+ enabled: params.length > 0 && (options.enabled ?? true)
314
+ });
315
+ return { items: data ?? {}, isLoading, error: error ?? null };
316
+ }
317
+
279
318
  // src/hooks/use-product-category.ts
280
- import { useQuery as useQuery6 } from "@tanstack/react-query";
319
+ import { useQuery as useQuery7 } from "@tanstack/react-query";
281
320
  function resolveData(data) {
282
321
  return {
283
322
  childrenTotal: data?.childrenTotal ?? 0,
@@ -296,7 +335,7 @@ function useProductCategory(itemCategoryUid, options = {}) {
296
335
  queryFn: () => Promise.reject()
297
336
  };
298
337
  const resolvedQueryFn = options.queryFn ?? (callbacks?.getProductCategory ? () => callbacks.getProductCategory(itemCategoryUid) : void 0);
299
- const { data, isLoading, error } = useQuery6({
338
+ const { data, isLoading, error } = useQuery7({
300
339
  ...baseOptions,
301
340
  ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
302
341
  enabled: (options.enabled ?? true) && !!itemCategoryUid,
@@ -313,12 +352,12 @@ function useProductCategory(itemCategoryUid, options = {}) {
313
352
  }
314
353
 
315
354
  // src/hooks/use-item-details.ts
316
- import { useQuery as useQuery7 } from "@tanstack/react-query";
355
+ import { useQuery as useQuery8 } from "@tanstack/react-query";
317
356
  function useItemDetails(itemId, options = {}) {
318
357
  const api = useAugurApiOptional();
319
358
  const callbacks = useAugurCallbacks();
320
359
  const cache = useAugurCache();
321
- const { data, isLoading, error } = useQuery7({
360
+ const { data, isLoading, error } = useQuery8({
322
361
  ...itemId ? getItemDetailsOptions(api, itemId, cache) : {
323
362
  queryKey: getItemDetailsKey(""),
324
363
  /* v8 ignore next */
@@ -341,12 +380,12 @@ function useItemDetails(itemId, options = {}) {
341
380
  }
342
381
 
343
382
  // src/hooks/use-item-attributes.ts
344
- import { useQuery as useQuery8 } from "@tanstack/react-query";
383
+ import { useQuery as useQuery9 } from "@tanstack/react-query";
345
384
  function useItemAttributes(itemCategoryUid, options = {}) {
346
385
  const api = useAugurApiOptional();
347
386
  const callbacks = useAugurCallbacks();
348
387
  const cache = useAugurCache();
349
- const { data, isLoading, error } = useQuery8({
388
+ const { data, isLoading, error } = useQuery9({
350
389
  ...itemCategoryUid ? getItemAttributesOptions(api, itemCategoryUid, cache) : {
351
390
  queryKey: getItemAttributesKey(null),
352
391
  /* v8 ignore next */
@@ -367,13 +406,13 @@ function useItemAttributes(itemCategoryUid, options = {}) {
367
406
  }
368
407
 
369
408
  // src/hooks/use-product-search.ts
370
- import { useQuery as useQuery9 } from "@tanstack/react-query";
409
+ import { useQuery as useQuery10 } from "@tanstack/react-query";
371
410
  function useProductSearch(pageData, options = {}) {
372
411
  const api = useAugurApiOptional();
373
412
  const callbacks = useAugurCallbacks();
374
413
  const cache = useAugurCache();
375
414
  const defaultOptions = getProductSearchOptions(api, pageData, cache);
376
- const { data, isLoading, error } = useQuery9({
415
+ const { data, isLoading, error } = useQuery10({
377
416
  ...defaultOptions,
378
417
  ...options.queryFn ?? callbacks?.getProductSearch ? { queryFn: options.queryFn ?? (() => callbacks.getProductSearch(pageData)) } : {},
379
418
  retry: 3,
@@ -390,7 +429,7 @@ function useProductSearch(pageData, options = {}) {
390
429
  }
391
430
 
392
431
  // src/hooks/use-search-suggestions.ts
393
- import { useQuery as useQuery10 } from "@tanstack/react-query";
432
+ import { useQuery as useQuery11 } from "@tanstack/react-query";
394
433
  function useSearchSuggestions(query, options = {}) {
395
434
  const api = useAugurApiOptional();
396
435
  const callbacks = useAugurCallbacks();
@@ -399,7 +438,7 @@ function useSearchSuggestions(query, options = {}) {
399
438
  const offset = options.offset ?? 0;
400
439
  const enabled = (options.enabled ?? true) && query.trim().length > 0;
401
440
  const defaultOptions = getSearchSuggestionsOptions(api, query, limit, offset, cache);
402
- const { data, isLoading, error } = useQuery10({
441
+ const { data, isLoading, error } = useQuery11({
403
442
  ...defaultOptions,
404
443
  ...options.queryFn ?? callbacks?.getSearchSuggestions ? { queryFn: options.queryFn ?? (() => callbacks.getSearchSuggestions(query, limit, offset)) } : {},
405
444
  enabled
@@ -414,7 +453,7 @@ function useSearchSuggestions(query, options = {}) {
414
453
 
415
454
  // src/hooks/use-cart-actions.ts
416
455
  import { useCallback } from "react";
417
- import { useQueryClient } from "@tanstack/react-query";
456
+ import { useQueryClient as useQueryClient2 } from "@tanstack/react-query";
418
457
  function requireCartUid(cartHdrUid) {
419
458
  const num = typeof cartHdrUid === "string" ? Number(cartHdrUid) : cartHdrUid;
420
459
  if (!num) throw new Error("Cart UID is not set");
@@ -445,7 +484,7 @@ function buildOptimisticAdd(cartLines, item, cartHdrUid, itemId) {
445
484
  ];
446
485
  }
447
486
  function useCartActions(callbacks) {
448
- const queryClient = useQueryClient();
487
+ const queryClient = useQueryClient2();
449
488
  const cartHdrUid = useCartHdrUid();
450
489
  const cartLines = useCartLines();
451
490
  const setCartLines = useSetCartLines();
@@ -597,7 +636,7 @@ function useCartActions(callbacks) {
597
636
 
598
637
  // src/hooks/use-cart-initialization.ts
599
638
  import { useEffect as useEffect2, useMemo, useRef } from "react";
600
- import { useQuery as useQuery11, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
639
+ import { useQuery as useQuery12, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
601
640
  var MAX_RETRY_ATTEMPTS = 7;
602
641
  var RETRY_DELAY_MS = 1e3;
603
642
  function useCartInitialization(session, callbacks) {
@@ -606,7 +645,7 @@ function useCartInitialization(session, callbacks) {
606
645
  const setCartHdrUid = useSetCartHdrUid();
607
646
  const setCartLines = useSetCartLines();
608
647
  const clearCart = useClearCart();
609
- const queryClient = useQueryClient2();
648
+ const queryClient = useQueryClient3();
610
649
  const effectiveStatus = session.status;
611
650
  const effectiveUserId = session.userId ?? auth?.userId;
612
651
  const effectiveCartHdrUid = session.cartHdrUid ?? auth?.cartHdrUid;
@@ -678,7 +717,7 @@ function useCartInitialization(session, callbacks) {
678
717
  initializeGuestCart();
679
718
  }
680
719
  }, [effectiveSession, cartHdrUid, setCartHdrUid, callbacks]);
681
- const { data: cartLinesData } = useQuery11({
720
+ const { data: cartLinesData } = useQuery12({
682
721
  queryKey: ["cartLines", cartHdrUid],
683
722
  queryFn: async () => await callbacks.getCartLines(Number(cartHdrUid)) ?? [],
684
723
  enabled: !!cartHdrUid
@@ -765,7 +804,7 @@ function useCartPricing(options = {}) {
765
804
  }
766
805
 
767
806
  // src/hooks/use-pagination-prefetch.ts
768
- import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
807
+ import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
769
808
  import { useCallback as useCallback2 } from "react";
770
809
  var usePaginationPrefetch = ({
771
810
  queryKey,
@@ -776,7 +815,7 @@ var usePaginationPrefetch = ({
776
815
  gcTime = 30 * 60 * 1e3,
777
816
  enabled = true
778
817
  }) => {
779
- const queryClient = useQueryClient3();
818
+ const queryClient = useQueryClient4();
780
819
  const prefetchPage = useCallback2(
781
820
  async (page) => {
782
821
  if (!enabled) return;
@@ -862,12 +901,12 @@ function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
862
901
  }
863
902
 
864
903
  // src/hooks/use-joomla-content.ts
865
- import { useQuery as useQuery12 } from "@tanstack/react-query";
904
+ import { useQuery as useQuery13 } from "@tanstack/react-query";
866
905
  function useJoomlaContent(articleId, options = {}) {
867
906
  const api = useAugurApiOptional();
868
907
  const callbacks = useAugurCallbacks();
869
908
  const cache = useAugurCache();
870
- const { data, isLoading, error } = useQuery12({
909
+ const { data, isLoading, error } = useQuery13({
871
910
  ...articleId ? getJoomlaContentOptions(api, articleId, cache) : {
872
911
  queryKey: getJoomlaContentKey(""),
873
912
  /* v8 ignore next */
@@ -884,12 +923,12 @@ function useJoomlaContent(articleId, options = {}) {
884
923
  }
885
924
 
886
925
  // src/hooks/use-joomla-content-list.ts
887
- import { useQuery as useQuery13 } from "@tanstack/react-query";
926
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
888
927
  function useJoomlaContentList(categoryId, options = {}) {
889
928
  const api = useAugurApiOptional();
890
929
  const callbacks = useAugurCallbacks();
891
930
  const cache = useAugurCache();
892
- const { data, isLoading, error } = useQuery13({
931
+ const { data, isLoading, error } = useQuery14({
893
932
  ...categoryId ? getJoomlaContentListOptions(api, categoryId, options.filters, cache) : {
894
933
  queryKey: getJoomlaContentListKey(""),
895
934
  /* v8 ignore next */
@@ -908,12 +947,12 @@ function useJoomlaContentList(categoryId, options = {}) {
908
947
  }
909
948
 
910
949
  // src/hooks/use-joomla-menu.ts
911
- import { useQuery as useQuery14 } from "@tanstack/react-query";
950
+ import { useQuery as useQuery15 } from "@tanstack/react-query";
912
951
  function useJoomlaMenu(options = {}) {
913
952
  const api = useAugurApiOptional();
914
953
  const callbacks = useAugurCallbacks();
915
954
  const cache = useAugurCache();
916
- const { data, isLoading, error } = useQuery14({
955
+ const { data, isLoading, error } = useQuery15({
917
956
  ...getJoomlaMenuOptions(api, options.filters, cache),
918
957
  ...options.queryFn ?? callbacks?.getJoomlaMenu ? {
919
958
  queryFn: options.queryFn ?? (() => callbacks.getJoomlaMenu(options.filters))
@@ -928,12 +967,12 @@ function useJoomlaMenu(options = {}) {
928
967
  }
929
968
 
930
969
  // src/hooks/use-joomla-menu-doc.ts
931
- import { useQuery as useQuery15 } from "@tanstack/react-query";
970
+ import { useQuery as useQuery16 } from "@tanstack/react-query";
932
971
  function useJoomlaMenuDoc(menuId, options = {}) {
933
972
  const api = useAugurApiOptional();
934
973
  const callbacks = useAugurCallbacks();
935
974
  const cache = useAugurCache();
936
- const { data, isLoading, error } = useQuery15({
975
+ const { data, isLoading, error } = useQuery16({
937
976
  ...menuId ? getJoomlaMenuDocOptions(api, menuId, cache) : {
938
977
  queryKey: getJoomlaMenuDocKey(""),
939
978
  /* v8 ignore next */
@@ -950,12 +989,12 @@ function useJoomlaMenuDoc(menuId, options = {}) {
950
989
  }
951
990
 
952
991
  // src/hooks/use-customer-orders.ts
953
- import { useQuery as useQuery16 } from "@tanstack/react-query";
992
+ import { useQuery as useQuery17 } from "@tanstack/react-query";
954
993
  function useCustomerOrders(customerId, params, options = {}) {
955
994
  const callbacks = useAugurCallbacks();
956
995
  const auth = useAugurAuth();
957
996
  const effectiveCustomerId = customerId ?? auth?.customerId;
958
- const { data, isLoading, error } = useQuery16({
997
+ const { data, isLoading, error } = useQuery17({
959
998
  queryKey: getCustomerOrdersKey(effectiveCustomerId, params),
960
999
  queryFn: options.queryFn ?? (() => callbacks.getCustomerOrders(effectiveCustomerId, params)),
961
1000
  enabled: (options.enabled ?? true) && !!effectiveCustomerId && !!(options.queryFn ?? callbacks?.getCustomerOrders)
@@ -971,7 +1010,7 @@ function useOrderDetail(customerId, orderId, options = {}) {
971
1010
  const callbacks = useAugurCallbacks();
972
1011
  const auth = useAugurAuth();
973
1012
  const effectiveCustomerId = customerId ?? auth?.customerId;
974
- const { data, isLoading, error } = useQuery16({
1013
+ const { data, isLoading, error } = useQuery17({
975
1014
  queryKey: getCustomerOrderDetailKey(effectiveCustomerId, orderId),
976
1015
  queryFn: options.queryFn ?? (() => callbacks.getCustomerOrderDetail(effectiveCustomerId, orderId)),
977
1016
  enabled: (options.enabled ?? true) && !!effectiveCustomerId && !!orderId && !!(options.queryFn ?? callbacks?.getCustomerOrderDetail)
@@ -984,12 +1023,12 @@ function useOrderDetail(customerId, orderId, options = {}) {
984
1023
  }
985
1024
 
986
1025
  // src/hooks/use-customer-invoices.ts
987
- import { useQuery as useQuery17 } from "@tanstack/react-query";
1026
+ import { useQuery as useQuery18 } from "@tanstack/react-query";
988
1027
  function useCustomerInvoices(customerId, params, options = {}) {
989
1028
  const callbacks = useAugurCallbacks();
990
1029
  const auth = useAugurAuth();
991
1030
  const effectiveCustomerId = customerId ?? auth?.customerId;
992
- const { data, isLoading, error } = useQuery17({
1031
+ const { data, isLoading, error } = useQuery18({
993
1032
  queryKey: getCustomerInvoicesKey(effectiveCustomerId, params),
994
1033
  queryFn: options.queryFn ?? (() => callbacks.getCustomerInvoices(effectiveCustomerId, params)),
995
1034
  enabled: (options.enabled ?? true) && !!effectiveCustomerId && !!(options.queryFn ?? callbacks?.getCustomerInvoices)
@@ -1005,7 +1044,7 @@ function useInvoiceDetail(customerId, invoiceNo, options = {}) {
1005
1044
  const callbacks = useAugurCallbacks();
1006
1045
  const auth = useAugurAuth();
1007
1046
  const effectiveCustomerId = customerId ?? auth?.customerId;
1008
- const { data, isLoading, error } = useQuery17({
1047
+ const { data, isLoading, error } = useQuery18({
1009
1048
  queryKey: getCustomerInvoiceDetailKey(effectiveCustomerId, invoiceNo),
1010
1049
  queryFn: options.queryFn ?? (() => callbacks.getCustomerInvoiceDetail(
1011
1050
  effectiveCustomerId,
@@ -1021,12 +1060,12 @@ function useInvoiceDetail(customerId, invoiceNo, options = {}) {
1021
1060
  }
1022
1061
 
1023
1062
  // src/hooks/use-customer-quotes.ts
1024
- import { useQuery as useQuery18 } from "@tanstack/react-query";
1063
+ import { useQuery as useQuery19 } from "@tanstack/react-query";
1025
1064
  function useCustomerQuotes(customerId, params, options = {}) {
1026
1065
  const callbacks = useAugurCallbacks();
1027
1066
  const auth = useAugurAuth();
1028
1067
  const effectiveCustomerId = customerId ?? auth?.customerId;
1029
- const { data, isLoading, error } = useQuery18({
1068
+ const { data, isLoading, error } = useQuery19({
1030
1069
  queryKey: getCustomerQuotesKey(effectiveCustomerId, params),
1031
1070
  queryFn: options.queryFn ?? (() => callbacks.getCustomerQuotes(effectiveCustomerId, params)),
1032
1071
  enabled: (options.enabled ?? true) && !!effectiveCustomerId && !!(options.queryFn ?? callbacks?.getCustomerQuotes)
@@ -1042,7 +1081,7 @@ function useQuoteDetail(customerId, quoteNo, options = {}) {
1042
1081
  const callbacks = useAugurCallbacks();
1043
1082
  const auth = useAugurAuth();
1044
1083
  const effectiveCustomerId = customerId ?? auth?.customerId;
1045
- const { data, isLoading, error } = useQuery18({
1084
+ const { data, isLoading, error } = useQuery19({
1046
1085
  queryKey: getCustomerQuoteDetailKey(effectiveCustomerId, quoteNo),
1047
1086
  queryFn: options.queryFn ?? (() => callbacks.getCustomerQuoteDetail(effectiveCustomerId, quoteNo)),
1048
1087
  enabled: (options.enabled ?? true) && !!effectiveCustomerId && !!quoteNo && !!(options.queryFn ?? callbacks?.getCustomerQuoteDetail)
@@ -1082,6 +1121,7 @@ function createSiteHooks(config = {}) {
1082
1121
  // Hooks -- inventory
1083
1122
  useInvMast,
1084
1123
  useInvMastDoc,
1124
+ useBatchInvMastDoc,
1085
1125
  useInvMastStock,
1086
1126
  // Hooks -- items & categories
1087
1127
  useItemCategory,
@@ -1289,6 +1329,9 @@ function useAugurPersistence(config) {
1289
1329
  export {
1290
1330
  AugurHooksProvider,
1291
1331
  createSiteHooks,
1332
+ executeBatchQuery,
1333
+ getBatchInvMastDocKey,
1334
+ getBatchInvMastDocOptions,
1292
1335
  getCartPricingQueryOptions,
1293
1336
  getCategoryItemsInfiniteKey,
1294
1337
  getCategoryItemsInfiniteOptions,
@@ -1333,6 +1376,7 @@ export {
1333
1376
  useAugurAuth,
1334
1377
  useAugurCache,
1335
1378
  useAugurPersistence,
1379
+ useBatchInvMastDoc,
1336
1380
  useCartActions,
1337
1381
  useCartHdrUid,
1338
1382
  useCartInitialization,