@simpleapps-com/augur-hooks 2.0.3 → 2.0.6
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-CQ3BRHK2.cjs → chunk-H7OXSAHP.cjs} +31 -41
- package/dist/chunk-H7OXSAHP.cjs.map +1 -0
- package/dist/{chunk-4RSFZ6WY.js → chunk-QFZHOGID.js} +31 -41
- package/dist/chunk-QFZHOGID.js.map +1 -0
- package/dist/{customer-quotes-DIpZNjT1.d.ts → customer-quotes-BQYqzomR.d.cts} +15 -48
- package/dist/{customer-quotes-DIpZNjT1.d.cts → customer-quotes-BQYqzomR.d.ts} +15 -48
- package/dist/index.cjs +180 -155
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -28
- package/dist/index.d.ts +49 -28
- package/dist/index.js +99 -74
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +2 -2
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/dist/web.cjs +1 -12
- package/dist/web.cjs.map +1 -1
- package/dist/web.js +2 -13
- package/dist/web.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-4RSFZ6WY.js.map +0 -1
- package/dist/chunk-CQ3BRHK2.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData,
|
|
2
|
-
export {
|
|
3
|
-
import { InfiniteScrollPage, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
1
|
+
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, A as AugurCallbacks, a as AugurApiClient, b as PersistenceConfig } from './customer-quotes-BQYqzomR.cjs';
|
|
2
|
+
export { c as AugurHooksProvider, d as BatchQueryConfig, e as executeBatchQuery, g as getBatchInvMastDocKey, f as getBatchInvMastDocOptions, 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, C as getItemDetailsKey, D as getItemDetailsOptions, E as getItemPriceKey, F as getItemPriceOptions, H as getItemSearchInfiniteKey, I as getItemSearchInfiniteOptions, J as getJoomlaContentKey, K as getJoomlaContentListKey, L as getJoomlaContentListOptions, M as getJoomlaContentOptions, N as getJoomlaMenuDocKey, O as getJoomlaMenuDocOptions, Q as getJoomlaMenuKey, R as getJoomlaMenuOptions, S as getProductCategoryKey, T as getProductCategoryOptions, U as getProductSearchKey, V as getProductSearchOptions, W as getSearchSuggestionsKey, X as getSearchSuggestionsOptions, Y as getStockKey, Z as getStockOptions, _ as useAugurApi, $ as useAugurApiOptional, a0 as useAugurAuth, a1 as useAugurCache, a2 as useAugurOptions, a3 as useAugurSite } from './customer-quotes-BQYqzomR.cjs';
|
|
3
|
+
import { InfiniteScrollPage, ListResult, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
4
4
|
export { AugurAuthContext, AugurSiteConfig, AugurSiteDefaults, AugurSiteFormatting, CacheConfig, CacheProvider, CacheTierConfig, DeepQueryOptions, EdgeCacheValue, InfiniteScrollPage, ProxyMutationOptions, ProxyQueryOptions } from '@simpleapps-com/augur-core';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
import * as _simpleapps_com_augur_utils from '@simpleapps-com/augur-utils';
|
|
7
|
-
import { TCartLine, TItemsFilters, TPriceData, TInvMastDoc, TCategory, TItemDetails, TStock, TAttribute, TJoomlaContent, TJoomlaContentFilters, MenuItem, TMenuFilters, ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
|
|
8
|
-
export { DerivePriceInput, DerivedPrice, ResolveStockInput, ResolvedStock } from '@simpleapps-com/augur-utils';
|
|
7
|
+
import { TCartLine, TItemsFilters, TPriceData, TInvMastDoc, TCategory, TItemDetails, TStock, TAttribute, TSearchSuggestionsResponse, TJoomlaContent, TJoomlaContentFilters, MenuItem, TMenuFilters, ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
|
|
8
|
+
export { DerivePriceInput, DerivedPrice, ResolveStockInput, ResolvedStock, TSearchSuggestion as SearchSuggestion, TSearchSuggestionsResponse as SearchSuggestionsResponse } from '@simpleapps-com/augur-utils';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
10
10
|
import { QueryKey } from '@tanstack/react-query';
|
|
11
11
|
import { ReactNode, createElement } from 'react';
|
|
@@ -484,6 +484,7 @@ interface UseProductSearchOptions {
|
|
|
484
484
|
declare function useProductSearch(pageData: PageData, options?: UseProductSearchOptions): {
|
|
485
485
|
productItems: unknown[] | null;
|
|
486
486
|
total: number;
|
|
487
|
+
result: ProductSearchResponse | undefined;
|
|
487
488
|
loading: boolean;
|
|
488
489
|
error: Error | null;
|
|
489
490
|
};
|
|
@@ -493,7 +494,7 @@ interface UseSearchSuggestionsOptions {
|
|
|
493
494
|
limit?: number;
|
|
494
495
|
offset?: number;
|
|
495
496
|
/** Override the default queryFn (e.g. with a cached server action). */
|
|
496
|
-
queryFn?: () => Promise<
|
|
497
|
+
queryFn?: () => Promise<TSearchSuggestionsResponse>;
|
|
497
498
|
}
|
|
498
499
|
/**
|
|
499
500
|
* @deprecated Use `useQuery(q.opensearch.suggestions.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
@@ -502,8 +503,13 @@ interface UseSearchSuggestionsOptions {
|
|
|
502
503
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
503
504
|
*/
|
|
504
505
|
declare function useSearchSuggestions(query: string, options?: UseSearchSuggestionsOptions): {
|
|
505
|
-
suggestions:
|
|
506
|
+
suggestions: _simpleapps_com_augur_utils.TSearchSuggestion[];
|
|
506
507
|
total: number;
|
|
508
|
+
count: number | undefined;
|
|
509
|
+
totalResults: number | undefined;
|
|
510
|
+
message: string | undefined;
|
|
511
|
+
status: number | undefined;
|
|
512
|
+
result: TSearchSuggestionsResponse | undefined;
|
|
507
513
|
isLoading: boolean;
|
|
508
514
|
error: Error | null;
|
|
509
515
|
};
|
|
@@ -735,25 +741,37 @@ declare function useJoomlaContent(articleId: number | string | undefined, option
|
|
|
735
741
|
|
|
736
742
|
interface UseJoomlaContentListOptions {
|
|
737
743
|
enabled?: boolean;
|
|
738
|
-
queryFn?: () => Promise<TJoomlaContent
|
|
744
|
+
queryFn?: () => Promise<ListResult<TJoomlaContent>>;
|
|
739
745
|
filters?: Partial<TJoomlaContentFilters>;
|
|
740
746
|
}
|
|
741
747
|
/** @deprecated Use `useQuery(q.joomla.content.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
742
748
|
declare function useJoomlaContentList(categoryId: number | string | undefined, options?: UseJoomlaContentListOptions): {
|
|
743
749
|
articles: TJoomlaContent[];
|
|
744
|
-
|
|
750
|
+
total: number;
|
|
751
|
+
count: number | undefined;
|
|
752
|
+
totalResults: number | undefined;
|
|
753
|
+
message: string | undefined;
|
|
754
|
+
status: number | undefined;
|
|
755
|
+
result: ListResult<TJoomlaContent>;
|
|
756
|
+
isLoading: false;
|
|
745
757
|
error: Error | null;
|
|
746
758
|
};
|
|
747
759
|
|
|
748
760
|
interface UseJoomlaMenuOptions {
|
|
749
761
|
enabled?: boolean;
|
|
750
|
-
queryFn?: () => Promise<MenuItem
|
|
762
|
+
queryFn?: () => Promise<ListResult<MenuItem>>;
|
|
751
763
|
filters?: Partial<TMenuFilters>;
|
|
752
764
|
}
|
|
753
765
|
/** @deprecated Use `useQuery(q.joomla.menu.list(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
754
766
|
declare function useJoomlaMenu(options?: UseJoomlaMenuOptions): {
|
|
755
767
|
menuItems: MenuItem[];
|
|
756
|
-
|
|
768
|
+
total: number;
|
|
769
|
+
count: number | undefined;
|
|
770
|
+
totalResults: number | undefined;
|
|
771
|
+
message: string | undefined;
|
|
772
|
+
status: number | undefined;
|
|
773
|
+
result: ListResult<MenuItem>;
|
|
774
|
+
isLoading: false;
|
|
757
775
|
error: Error | null;
|
|
758
776
|
};
|
|
759
777
|
|
|
@@ -768,18 +786,19 @@ declare function useJoomlaMenuDoc(menuId: number | string | undefined, options?:
|
|
|
768
786
|
error: Error | null;
|
|
769
787
|
};
|
|
770
788
|
|
|
771
|
-
interface CustomerListResult$2 {
|
|
772
|
-
data: unknown[];
|
|
773
|
-
total: number;
|
|
774
|
-
}
|
|
775
789
|
interface UseCustomerOrdersOptions {
|
|
776
790
|
enabled?: boolean;
|
|
777
|
-
queryFn?: () => Promise<
|
|
791
|
+
queryFn?: () => Promise<ListResult>;
|
|
778
792
|
}
|
|
779
793
|
/** @deprecated Use `useQuery(q.customers.customer.orders.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
780
794
|
declare function useCustomerOrders(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerOrdersOptions): {
|
|
781
795
|
orders: unknown[];
|
|
782
796
|
total: number;
|
|
797
|
+
count: number | undefined;
|
|
798
|
+
totalResults: number | undefined;
|
|
799
|
+
message: string | undefined;
|
|
800
|
+
status: number | undefined;
|
|
801
|
+
result: ListResult;
|
|
783
802
|
isLoading: boolean;
|
|
784
803
|
error: Error | null;
|
|
785
804
|
};
|
|
@@ -794,18 +813,19 @@ declare function useOrderDetail(customerId?: number | string, orderId?: number |
|
|
|
794
813
|
error: Error | null;
|
|
795
814
|
};
|
|
796
815
|
|
|
797
|
-
interface CustomerListResult$1 {
|
|
798
|
-
data: unknown[];
|
|
799
|
-
total: number;
|
|
800
|
-
}
|
|
801
816
|
interface UseCustomerInvoicesOptions {
|
|
802
817
|
enabled?: boolean;
|
|
803
|
-
queryFn?: () => Promise<
|
|
818
|
+
queryFn?: () => Promise<ListResult>;
|
|
804
819
|
}
|
|
805
820
|
/** @deprecated Use `useQuery(q.customers.customer.invoices.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
806
821
|
declare function useCustomerInvoices(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerInvoicesOptions): {
|
|
807
822
|
invoices: unknown[];
|
|
808
823
|
total: number;
|
|
824
|
+
count: number | undefined;
|
|
825
|
+
totalResults: number | undefined;
|
|
826
|
+
message: string | undefined;
|
|
827
|
+
status: number | undefined;
|
|
828
|
+
result: ListResult;
|
|
809
829
|
isLoading: boolean;
|
|
810
830
|
error: Error | null;
|
|
811
831
|
};
|
|
@@ -820,18 +840,19 @@ declare function useInvoiceDetail(customerId?: number | string, invoiceNo?: numb
|
|
|
820
840
|
error: Error | null;
|
|
821
841
|
};
|
|
822
842
|
|
|
823
|
-
interface CustomerListResult {
|
|
824
|
-
data: unknown[];
|
|
825
|
-
total: number;
|
|
826
|
-
}
|
|
827
843
|
interface UseCustomerQuotesOptions {
|
|
828
844
|
enabled?: boolean;
|
|
829
|
-
queryFn?: () => Promise<
|
|
845
|
+
queryFn?: () => Promise<ListResult>;
|
|
830
846
|
}
|
|
831
847
|
/** @deprecated Use `useQuery(q.customers.customer.quotes.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
832
848
|
declare function useCustomerQuotes(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerQuotesOptions): {
|
|
833
849
|
quotes: unknown[];
|
|
834
850
|
total: number;
|
|
851
|
+
count: number | undefined;
|
|
852
|
+
totalResults: number | undefined;
|
|
853
|
+
message: string | undefined;
|
|
854
|
+
status: number | undefined;
|
|
855
|
+
result: ListResult;
|
|
835
856
|
isLoading: boolean;
|
|
836
857
|
error: Error | null;
|
|
837
858
|
};
|
|
@@ -858,7 +879,7 @@ declare function useQuoteDetail(customerId?: number | string, quoteNo?: number |
|
|
|
858
879
|
*
|
|
859
880
|
* export const augur = createSiteHooks({
|
|
860
881
|
* callbacks: { getItemPrice, getItemCategory },
|
|
861
|
-
* defaultCustomerId
|
|
882
|
+
* // defaultCustomerId falls back to DEFAULT_CUSTOMER_ID env var automatically
|
|
862
883
|
* });
|
|
863
884
|
*
|
|
864
885
|
* // app/layout.tsx
|
|
@@ -982,4 +1003,4 @@ declare function useAugurPersistence(config: PersistenceConfig): {
|
|
|
982
1003
|
};
|
|
983
1004
|
};
|
|
984
1005
|
|
|
985
|
-
export { AugurApiClient, AugurCallbacks, BatchInvMastDocParam, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, type FormatPriceCallOptions, GetItemCategoryApiOptions, PageData, PersistenceConfig,
|
|
1006
|
+
export { AugurApiClient, AugurCallbacks, BatchInvMastDocParam, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, type FormatPriceCallOptions, GetItemCategoryApiOptions, PageData, PersistenceConfig, type UseFormatPriceOptions, type UseStockOptions, 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, useStock };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData,
|
|
2
|
-
export {
|
|
3
|
-
import { InfiniteScrollPage, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
1
|
+
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, A as AugurCallbacks, a as AugurApiClient, b as PersistenceConfig } from './customer-quotes-BQYqzomR.js';
|
|
2
|
+
export { c as AugurHooksProvider, d as BatchQueryConfig, e as executeBatchQuery, g as getBatchInvMastDocKey, f as getBatchInvMastDocOptions, 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, C as getItemDetailsKey, D as getItemDetailsOptions, E as getItemPriceKey, F as getItemPriceOptions, H as getItemSearchInfiniteKey, I as getItemSearchInfiniteOptions, J as getJoomlaContentKey, K as getJoomlaContentListKey, L as getJoomlaContentListOptions, M as getJoomlaContentOptions, N as getJoomlaMenuDocKey, O as getJoomlaMenuDocOptions, Q as getJoomlaMenuKey, R as getJoomlaMenuOptions, S as getProductCategoryKey, T as getProductCategoryOptions, U as getProductSearchKey, V as getProductSearchOptions, W as getSearchSuggestionsKey, X as getSearchSuggestionsOptions, Y as getStockKey, Z as getStockOptions, _ as useAugurApi, $ as useAugurApiOptional, a0 as useAugurAuth, a1 as useAugurCache, a2 as useAugurOptions, a3 as useAugurSite } from './customer-quotes-BQYqzomR.js';
|
|
3
|
+
import { InfiniteScrollPage, ListResult, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
4
4
|
export { AugurAuthContext, AugurSiteConfig, AugurSiteDefaults, AugurSiteFormatting, CacheConfig, CacheProvider, CacheTierConfig, DeepQueryOptions, EdgeCacheValue, InfiniteScrollPage, ProxyMutationOptions, ProxyQueryOptions } from '@simpleapps-com/augur-core';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
6
6
|
import * as _simpleapps_com_augur_utils from '@simpleapps-com/augur-utils';
|
|
7
|
-
import { TCartLine, TItemsFilters, TPriceData, TInvMastDoc, TCategory, TItemDetails, TStock, TAttribute, TJoomlaContent, TJoomlaContentFilters, MenuItem, TMenuFilters, ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
|
|
8
|
-
export { DerivePriceInput, DerivedPrice, ResolveStockInput, ResolvedStock } from '@simpleapps-com/augur-utils';
|
|
7
|
+
import { TCartLine, TItemsFilters, TPriceData, TInvMastDoc, TCategory, TItemDetails, TStock, TAttribute, TSearchSuggestionsResponse, TJoomlaContent, TJoomlaContentFilters, MenuItem, TMenuFilters, ImageConfig, ImageUrlOptions } from '@simpleapps-com/augur-utils';
|
|
8
|
+
export { DerivePriceInput, DerivedPrice, ResolveStockInput, ResolvedStock, TSearchSuggestion as SearchSuggestion, TSearchSuggestionsResponse as SearchSuggestionsResponse } from '@simpleapps-com/augur-utils';
|
|
9
9
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
10
10
|
import { QueryKey } from '@tanstack/react-query';
|
|
11
11
|
import { ReactNode, createElement } from 'react';
|
|
@@ -484,6 +484,7 @@ interface UseProductSearchOptions {
|
|
|
484
484
|
declare function useProductSearch(pageData: PageData, options?: UseProductSearchOptions): {
|
|
485
485
|
productItems: unknown[] | null;
|
|
486
486
|
total: number;
|
|
487
|
+
result: ProductSearchResponse | undefined;
|
|
487
488
|
loading: boolean;
|
|
488
489
|
error: Error | null;
|
|
489
490
|
};
|
|
@@ -493,7 +494,7 @@ interface UseSearchSuggestionsOptions {
|
|
|
493
494
|
limit?: number;
|
|
494
495
|
offset?: number;
|
|
495
496
|
/** Override the default queryFn (e.g. with a cached server action). */
|
|
496
|
-
queryFn?: () => Promise<
|
|
497
|
+
queryFn?: () => Promise<TSearchSuggestionsResponse>;
|
|
497
498
|
}
|
|
498
499
|
/**
|
|
499
500
|
* @deprecated Use `useQuery(q.opensearch.suggestions.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
@@ -502,8 +503,13 @@ interface UseSearchSuggestionsOptions {
|
|
|
502
503
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
503
504
|
*/
|
|
504
505
|
declare function useSearchSuggestions(query: string, options?: UseSearchSuggestionsOptions): {
|
|
505
|
-
suggestions:
|
|
506
|
+
suggestions: _simpleapps_com_augur_utils.TSearchSuggestion[];
|
|
506
507
|
total: number;
|
|
508
|
+
count: number | undefined;
|
|
509
|
+
totalResults: number | undefined;
|
|
510
|
+
message: string | undefined;
|
|
511
|
+
status: number | undefined;
|
|
512
|
+
result: TSearchSuggestionsResponse | undefined;
|
|
507
513
|
isLoading: boolean;
|
|
508
514
|
error: Error | null;
|
|
509
515
|
};
|
|
@@ -735,25 +741,37 @@ declare function useJoomlaContent(articleId: number | string | undefined, option
|
|
|
735
741
|
|
|
736
742
|
interface UseJoomlaContentListOptions {
|
|
737
743
|
enabled?: boolean;
|
|
738
|
-
queryFn?: () => Promise<TJoomlaContent
|
|
744
|
+
queryFn?: () => Promise<ListResult<TJoomlaContent>>;
|
|
739
745
|
filters?: Partial<TJoomlaContentFilters>;
|
|
740
746
|
}
|
|
741
747
|
/** @deprecated Use `useQuery(q.joomla.content.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
742
748
|
declare function useJoomlaContentList(categoryId: number | string | undefined, options?: UseJoomlaContentListOptions): {
|
|
743
749
|
articles: TJoomlaContent[];
|
|
744
|
-
|
|
750
|
+
total: number;
|
|
751
|
+
count: number | undefined;
|
|
752
|
+
totalResults: number | undefined;
|
|
753
|
+
message: string | undefined;
|
|
754
|
+
status: number | undefined;
|
|
755
|
+
result: ListResult<TJoomlaContent>;
|
|
756
|
+
isLoading: false;
|
|
745
757
|
error: Error | null;
|
|
746
758
|
};
|
|
747
759
|
|
|
748
760
|
interface UseJoomlaMenuOptions {
|
|
749
761
|
enabled?: boolean;
|
|
750
|
-
queryFn?: () => Promise<MenuItem
|
|
762
|
+
queryFn?: () => Promise<ListResult<MenuItem>>;
|
|
751
763
|
filters?: Partial<TMenuFilters>;
|
|
752
764
|
}
|
|
753
765
|
/** @deprecated Use `useQuery(q.joomla.menu.list(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
754
766
|
declare function useJoomlaMenu(options?: UseJoomlaMenuOptions): {
|
|
755
767
|
menuItems: MenuItem[];
|
|
756
|
-
|
|
768
|
+
total: number;
|
|
769
|
+
count: number | undefined;
|
|
770
|
+
totalResults: number | undefined;
|
|
771
|
+
message: string | undefined;
|
|
772
|
+
status: number | undefined;
|
|
773
|
+
result: ListResult<MenuItem>;
|
|
774
|
+
isLoading: false;
|
|
757
775
|
error: Error | null;
|
|
758
776
|
};
|
|
759
777
|
|
|
@@ -768,18 +786,19 @@ declare function useJoomlaMenuDoc(menuId: number | string | undefined, options?:
|
|
|
768
786
|
error: Error | null;
|
|
769
787
|
};
|
|
770
788
|
|
|
771
|
-
interface CustomerListResult$2 {
|
|
772
|
-
data: unknown[];
|
|
773
|
-
total: number;
|
|
774
|
-
}
|
|
775
789
|
interface UseCustomerOrdersOptions {
|
|
776
790
|
enabled?: boolean;
|
|
777
|
-
queryFn?: () => Promise<
|
|
791
|
+
queryFn?: () => Promise<ListResult>;
|
|
778
792
|
}
|
|
779
793
|
/** @deprecated Use `useQuery(q.customers.customer.orders.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
780
794
|
declare function useCustomerOrders(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerOrdersOptions): {
|
|
781
795
|
orders: unknown[];
|
|
782
796
|
total: number;
|
|
797
|
+
count: number | undefined;
|
|
798
|
+
totalResults: number | undefined;
|
|
799
|
+
message: string | undefined;
|
|
800
|
+
status: number | undefined;
|
|
801
|
+
result: ListResult;
|
|
783
802
|
isLoading: boolean;
|
|
784
803
|
error: Error | null;
|
|
785
804
|
};
|
|
@@ -794,18 +813,19 @@ declare function useOrderDetail(customerId?: number | string, orderId?: number |
|
|
|
794
813
|
error: Error | null;
|
|
795
814
|
};
|
|
796
815
|
|
|
797
|
-
interface CustomerListResult$1 {
|
|
798
|
-
data: unknown[];
|
|
799
|
-
total: number;
|
|
800
|
-
}
|
|
801
816
|
interface UseCustomerInvoicesOptions {
|
|
802
817
|
enabled?: boolean;
|
|
803
|
-
queryFn?: () => Promise<
|
|
818
|
+
queryFn?: () => Promise<ListResult>;
|
|
804
819
|
}
|
|
805
820
|
/** @deprecated Use `useQuery(q.customers.customer.invoices.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
806
821
|
declare function useCustomerInvoices(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerInvoicesOptions): {
|
|
807
822
|
invoices: unknown[];
|
|
808
823
|
total: number;
|
|
824
|
+
count: number | undefined;
|
|
825
|
+
totalResults: number | undefined;
|
|
826
|
+
message: string | undefined;
|
|
827
|
+
status: number | undefined;
|
|
828
|
+
result: ListResult;
|
|
809
829
|
isLoading: boolean;
|
|
810
830
|
error: Error | null;
|
|
811
831
|
};
|
|
@@ -820,18 +840,19 @@ declare function useInvoiceDetail(customerId?: number | string, invoiceNo?: numb
|
|
|
820
840
|
error: Error | null;
|
|
821
841
|
};
|
|
822
842
|
|
|
823
|
-
interface CustomerListResult {
|
|
824
|
-
data: unknown[];
|
|
825
|
-
total: number;
|
|
826
|
-
}
|
|
827
843
|
interface UseCustomerQuotesOptions {
|
|
828
844
|
enabled?: boolean;
|
|
829
|
-
queryFn?: () => Promise<
|
|
845
|
+
queryFn?: () => Promise<ListResult>;
|
|
830
846
|
}
|
|
831
847
|
/** @deprecated Use `useQuery(q.customers.customer.quotes.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
832
848
|
declare function useCustomerQuotes(customerId?: number | string, params?: Record<string, unknown>, options?: UseCustomerQuotesOptions): {
|
|
833
849
|
quotes: unknown[];
|
|
834
850
|
total: number;
|
|
851
|
+
count: number | undefined;
|
|
852
|
+
totalResults: number | undefined;
|
|
853
|
+
message: string | undefined;
|
|
854
|
+
status: number | undefined;
|
|
855
|
+
result: ListResult;
|
|
835
856
|
isLoading: boolean;
|
|
836
857
|
error: Error | null;
|
|
837
858
|
};
|
|
@@ -858,7 +879,7 @@ declare function useQuoteDetail(customerId?: number | string, quoteNo?: number |
|
|
|
858
879
|
*
|
|
859
880
|
* export const augur = createSiteHooks({
|
|
860
881
|
* callbacks: { getItemPrice, getItemCategory },
|
|
861
|
-
* defaultCustomerId
|
|
882
|
+
* // defaultCustomerId falls back to DEFAULT_CUSTOMER_ID env var automatically
|
|
862
883
|
* });
|
|
863
884
|
*
|
|
864
885
|
* // app/layout.tsx
|
|
@@ -982,4 +1003,4 @@ declare function useAugurPersistence(config: PersistenceConfig): {
|
|
|
982
1003
|
};
|
|
983
1004
|
};
|
|
984
1005
|
|
|
985
|
-
export { AugurApiClient, AugurCallbacks, BatchInvMastDocParam, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, type FormatPriceCallOptions, GetItemCategoryApiOptions, PageData, PersistenceConfig,
|
|
1006
|
+
export { AugurApiClient, AugurCallbacks, BatchInvMastDocParam, type CartActionCallbacks, type CartInitCallbacks, type CartPriceData, type CartPricingResult, type CartSessionInfo, type CreateSiteHooksConfig, type FormatPriceCallOptions, GetItemCategoryApiOptions, PageData, PersistenceConfig, type UseFormatPriceOptions, type UseStockOptions, 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, useStock };
|