@simpleapps-com/augur-hooks 1.0.0 → 1.0.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/{chunk-6MD7RJZ2.cjs → chunk-C7JC34SM.cjs} +1 -1
- package/dist/chunk-C7JC34SM.cjs.map +1 -0
- package/dist/{chunk-6DSOHS3R.js → chunk-CPPFLOLS.js} +1 -1
- package/dist/chunk-CPPFLOLS.js.map +1 -0
- package/dist/{customer-quotes-ji9iHUmo.d.cts → customer-quotes-G2WMZu_X.d.cts} +41 -0
- package/dist/{customer-quotes-ji9iHUmo.d.ts → customer-quotes-G2WMZu_X.d.ts} +41 -0
- package/dist/index.cjs +37 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +1 -1
- 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/package.json +3 -3
- package/dist/chunk-6DSOHS3R.js.map +0 -1
- package/dist/chunk-6MD7RJZ2.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, A as AugurCallbacks, b as AugurApiClient, c as PersistenceConfig } from './customer-quotes-
|
|
2
|
-
export { d as AugurHooksProvider, e as BatchQueryConfig, f as executeBatchQuery, g as getBatchInvMastDocKey, h as getBatchInvMastDocOptions, i as getCartPricingQueryOptions, j as getCategoryItemsInfiniteKey, k as getCategoryItemsInfiniteOptions, l as getCustomerInvoiceDetailKey, m as getCustomerInvoicesKey, n as getCustomerOrderDetailKey, o as getCustomerOrdersKey, p as getCustomerQuoteDetailKey, q as getCustomerQuotesKey, r as getInvMastDocKey, s as getInvMastDocOptions, t as getInvMastKey, u as getInvMastOptions, v as getInvMastStockKey, w as getInvMastStockOptions, x as getItemAttributesKey, y as getItemAttributesOptions, z as getItemCategoryKey, C as getItemCategoryOptions, D as getItemDetailsKey, E as getItemDetailsOptions, F as getItemPriceKey, H as getItemPriceOptions, I 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, a2 as useAugurOptions } from './customer-quotes-
|
|
1
|
+
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, A as AugurCallbacks, b as AugurApiClient, c as PersistenceConfig } from './customer-quotes-G2WMZu_X.cjs';
|
|
2
|
+
export { d as AugurHooksProvider, e as BatchQueryConfig, f as executeBatchQuery, g as getBatchInvMastDocKey, h as getBatchInvMastDocOptions, i as getCartPricingQueryOptions, j as getCategoryItemsInfiniteKey, k as getCategoryItemsInfiniteOptions, l as getCustomerInvoiceDetailKey, m as getCustomerInvoicesKey, n as getCustomerOrderDetailKey, o as getCustomerOrdersKey, p as getCustomerQuoteDetailKey, q as getCustomerQuotesKey, r as getInvMastDocKey, s as getInvMastDocOptions, t as getInvMastKey, u as getInvMastOptions, v as getInvMastStockKey, w as getInvMastStockOptions, x as getItemAttributesKey, y as getItemAttributesOptions, z as getItemCategoryKey, C as getItemCategoryOptions, D as getItemDetailsKey, E as getItemDetailsOptions, F as getItemPriceKey, H as getItemPriceOptions, I 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, a2 as useAugurOptions } from './customer-quotes-G2WMZu_X.cjs';
|
|
3
3
|
import { InfiniteScrollPage, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
4
4
|
export { AugurAuthContext, CacheConfig, CacheProvider, CacheTierConfig, DeepQueryOptions, EdgeCacheValue, InfiniteScrollPage, ProxyMutationOptions, ProxyQueryOptions } from '@simpleapps-com/augur-core';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
@@ -88,6 +88,8 @@ interface UseItemPriceOptions {
|
|
|
88
88
|
queryFn?: () => Promise<TPriceData>;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
+
* @deprecated Use `useQuery(q.pricing.priceEngine.get(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
92
|
+
*
|
|
91
93
|
* Fetches and caches item pricing via the augur-api SDK.
|
|
92
94
|
*
|
|
93
95
|
* Pass `options.queryFn` to override with a cached server action:
|
|
@@ -108,6 +110,8 @@ interface UseInvMastDocOptions {
|
|
|
108
110
|
queryFn?: () => Promise<TInvMastDoc>;
|
|
109
111
|
}
|
|
110
112
|
/**
|
|
113
|
+
* @deprecated Use `useQuery(q.items.invMast.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
114
|
+
*
|
|
111
115
|
* Fetches and caches an inventory master document via the augur-api SDK.
|
|
112
116
|
*/
|
|
113
117
|
declare function useInvMastDoc(invMastUid: number, itemId: string, options?: UseInvMastDocOptions): {
|
|
@@ -123,6 +127,8 @@ interface UseItemCategoryOptions {
|
|
|
123
127
|
queryFn?: () => Promise<TCategory>;
|
|
124
128
|
}
|
|
125
129
|
/**
|
|
130
|
+
* @deprecated Use `useQuery(q.items.categories.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
131
|
+
*
|
|
126
132
|
* Fetches and caches item category data via the augur-api SDK.
|
|
127
133
|
*/
|
|
128
134
|
declare function useItemCategory(itemCategoryUid: number, options?: UseItemCategoryOptions): {
|
|
@@ -135,6 +141,7 @@ interface UseInvMastOptions {
|
|
|
135
141
|
enabled?: boolean;
|
|
136
142
|
queryFn?: () => Promise<TItemDetails>;
|
|
137
143
|
}
|
|
144
|
+
/** @deprecated Use `useQuery(q.items.invMast.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
138
145
|
declare function useInvMast(invMastUid: number, itemId: string, options?: UseInvMastOptions): {
|
|
139
146
|
item: TItemDetails | undefined;
|
|
140
147
|
isLoading: boolean;
|
|
@@ -145,6 +152,7 @@ interface UseInvMastStockOptions {
|
|
|
145
152
|
enabled?: boolean;
|
|
146
153
|
queryFn?: () => Promise<number>;
|
|
147
154
|
}
|
|
155
|
+
/** @deprecated Use `useQuery(q.items.invMast.stock.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
148
156
|
declare function useInvMastStock(invMastUid: number | string, options?: UseInvMastStockOptions): {
|
|
149
157
|
qtyOnHand: number | null;
|
|
150
158
|
loading: boolean;
|
|
@@ -158,6 +166,8 @@ interface UseBatchInvMastDocOptions {
|
|
|
158
166
|
queryFn?: (params: BatchInvMastDocParam[], includePricing: "Y" | "N") => Promise<Record<string, TInvMastDoc>>;
|
|
159
167
|
}
|
|
160
168
|
/**
|
|
169
|
+
* @deprecated Use `useQueries` with `q.items.invMast.doc.get(id)` and `useAugurOptions()` instead. Will be removed in the next major version.
|
|
170
|
+
*
|
|
161
171
|
* Fetches and caches multiple inventory master documents in a single batch.
|
|
162
172
|
*
|
|
163
173
|
* Checks the queryClient cache for each param before fetching.
|
|
@@ -181,6 +191,7 @@ interface UseProductCategoryOptions {
|
|
|
181
191
|
enabled?: boolean;
|
|
182
192
|
queryFn?: () => Promise<ProductCategoryResponse>;
|
|
183
193
|
}
|
|
194
|
+
/** @deprecated Use `useQuery(q.items.itemCategory.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
184
195
|
declare function useProductCategory(itemCategoryUid: number | string | null, options?: UseProductCategoryOptions): {
|
|
185
196
|
loading: boolean;
|
|
186
197
|
error: Error | null;
|
|
@@ -194,6 +205,7 @@ interface UseItemDetailsOptions {
|
|
|
194
205
|
enabled?: boolean;
|
|
195
206
|
queryFn?: () => Promise<TItemDetails>;
|
|
196
207
|
}
|
|
208
|
+
/** @deprecated Use `useQuery(q.items.invMast.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
197
209
|
declare function useItemDetails(itemId: number | string | undefined, options?: UseItemDetailsOptions): {
|
|
198
210
|
itemCategoryUid: number | null | undefined;
|
|
199
211
|
itemDetails: TItemDetails | null;
|
|
@@ -207,6 +219,7 @@ interface UseItemAttributesOptions {
|
|
|
207
219
|
attributes: TAttribute[];
|
|
208
220
|
}>;
|
|
209
221
|
}
|
|
222
|
+
/** @deprecated Use `useQuery(q.items.invMast.attributes.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
210
223
|
declare function useItemAttributes(itemCategoryUid: number | string | null, options?: UseItemAttributesOptions): {
|
|
211
224
|
attributes: any;
|
|
212
225
|
loading: boolean;
|
|
@@ -222,6 +235,8 @@ interface UseProductSearchOptions {
|
|
|
222
235
|
queryFn?: () => Promise<ProductSearchResponse>;
|
|
223
236
|
}
|
|
224
237
|
/**
|
|
238
|
+
* @deprecated Use `useQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
239
|
+
*
|
|
225
240
|
* Searches products via the augur-api OpenSearch endpoint.
|
|
226
241
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
227
242
|
*/
|
|
@@ -240,6 +255,8 @@ interface UseSearchSuggestionsOptions {
|
|
|
240
255
|
queryFn?: () => Promise<SearchSuggestionsResponse>;
|
|
241
256
|
}
|
|
242
257
|
/**
|
|
258
|
+
* @deprecated Use `useQuery(q.opensearch.suggestions.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
259
|
+
*
|
|
243
260
|
* Fetches search suggestions via the augur-api OpenSearch endpoint.
|
|
244
261
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
245
262
|
*/
|
|
@@ -442,6 +459,8 @@ interface UseCategoryItemsInfiniteOptions {
|
|
|
442
459
|
}) => Promise<InfiniteScrollPage>;
|
|
443
460
|
}
|
|
444
461
|
/**
|
|
462
|
+
* @deprecated Use `useInfiniteQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
463
|
+
*
|
|
445
464
|
* Infinite scroll for category product listings.
|
|
446
465
|
* Fetches pages of products via the augur-api SDK.
|
|
447
466
|
*/
|
|
@@ -455,6 +474,8 @@ interface UseItemSearchInfiniteOptions {
|
|
|
455
474
|
}) => Promise<InfiniteScrollPage>;
|
|
456
475
|
}
|
|
457
476
|
/**
|
|
477
|
+
* @deprecated Use `useInfiniteQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
478
|
+
*
|
|
458
479
|
* Infinite scroll for search results.
|
|
459
480
|
* Fetches pages of products via the augur-api SDK OpenSearch endpoint.
|
|
460
481
|
*/
|
|
@@ -464,6 +485,7 @@ interface UseJoomlaContentOptions {
|
|
|
464
485
|
enabled?: boolean;
|
|
465
486
|
queryFn?: () => Promise<TJoomlaContent>;
|
|
466
487
|
}
|
|
488
|
+
/** @deprecated Use `useQuery(q.joomla.content.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
467
489
|
declare function useJoomlaContent(articleId: number | string | undefined, options?: UseJoomlaContentOptions): {
|
|
468
490
|
article: TJoomlaContent | null;
|
|
469
491
|
isLoading: boolean;
|
|
@@ -475,6 +497,7 @@ interface UseJoomlaContentListOptions {
|
|
|
475
497
|
queryFn?: () => Promise<TJoomlaContent[]>;
|
|
476
498
|
filters?: Partial<TJoomlaContentFilters>;
|
|
477
499
|
}
|
|
500
|
+
/** @deprecated Use `useQuery(q.joomla.content.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
478
501
|
declare function useJoomlaContentList(categoryId: number | string | undefined, options?: UseJoomlaContentListOptions): {
|
|
479
502
|
articles: TJoomlaContent[];
|
|
480
503
|
isLoading: boolean;
|
|
@@ -486,6 +509,7 @@ interface UseJoomlaMenuOptions {
|
|
|
486
509
|
queryFn?: () => Promise<MenuItem[]>;
|
|
487
510
|
filters?: Partial<TMenuFilters>;
|
|
488
511
|
}
|
|
512
|
+
/** @deprecated Use `useQuery(q.joomla.menu.list(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
489
513
|
declare function useJoomlaMenu(options?: UseJoomlaMenuOptions): {
|
|
490
514
|
menuItems: MenuItem[];
|
|
491
515
|
isLoading: boolean;
|
|
@@ -496,6 +520,7 @@ interface UseJoomlaMenuDocOptions {
|
|
|
496
520
|
enabled?: boolean;
|
|
497
521
|
queryFn?: () => Promise<MenuItem>;
|
|
498
522
|
}
|
|
523
|
+
/** @deprecated Use `useQuery(q.joomla.menu.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
499
524
|
declare function useJoomlaMenuDoc(menuId: number | string | undefined, options?: UseJoomlaMenuDocOptions): {
|
|
500
525
|
menuItem: MenuItem | null;
|
|
501
526
|
isLoading: boolean;
|
|
@@ -510,6 +535,7 @@ interface UseCustomerOrdersOptions {
|
|
|
510
535
|
enabled?: boolean;
|
|
511
536
|
queryFn?: () => Promise<CustomerListResult$2>;
|
|
512
537
|
}
|
|
538
|
+
/** @deprecated Use `useQuery(q.customers.customer.orders.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
513
539
|
declare function useCustomerOrders(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerOrdersOptions): {
|
|
514
540
|
orders: unknown[];
|
|
515
541
|
total: number;
|
|
@@ -520,6 +546,7 @@ interface UseOrderDetailOptions {
|
|
|
520
546
|
enabled?: boolean;
|
|
521
547
|
queryFn?: () => Promise<unknown>;
|
|
522
548
|
}
|
|
549
|
+
/** @deprecated Use `useQuery(q.customers.customer.orders.get(custId, orderNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
523
550
|
declare function useOrderDetail(customerId: number | string | undefined, orderId: number | string | undefined, options?: UseOrderDetailOptions): {
|
|
524
551
|
order: {} | null;
|
|
525
552
|
isLoading: boolean;
|
|
@@ -534,6 +561,7 @@ interface UseCustomerInvoicesOptions {
|
|
|
534
561
|
enabled?: boolean;
|
|
535
562
|
queryFn?: () => Promise<CustomerListResult$1>;
|
|
536
563
|
}
|
|
564
|
+
/** @deprecated Use `useQuery(q.customers.customer.invoices.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
537
565
|
declare function useCustomerInvoices(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerInvoicesOptions): {
|
|
538
566
|
invoices: unknown[];
|
|
539
567
|
total: number;
|
|
@@ -544,6 +572,7 @@ interface UseInvoiceDetailOptions {
|
|
|
544
572
|
enabled?: boolean;
|
|
545
573
|
queryFn?: () => Promise<unknown>;
|
|
546
574
|
}
|
|
575
|
+
/** @deprecated Use `useQuery(q.customers.customer.invoices.get(custId, invoiceNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
547
576
|
declare function useInvoiceDetail(customerId: number | string | undefined, invoiceNo: number | string | undefined, options?: UseInvoiceDetailOptions): {
|
|
548
577
|
invoice: {} | null;
|
|
549
578
|
isLoading: boolean;
|
|
@@ -558,6 +587,7 @@ interface UseCustomerQuotesOptions {
|
|
|
558
587
|
enabled?: boolean;
|
|
559
588
|
queryFn?: () => Promise<CustomerListResult>;
|
|
560
589
|
}
|
|
590
|
+
/** @deprecated Use `useQuery(q.customers.customer.quotes.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
561
591
|
declare function useCustomerQuotes(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerQuotesOptions): {
|
|
562
592
|
quotes: unknown[];
|
|
563
593
|
total: number;
|
|
@@ -568,6 +598,7 @@ interface UseQuoteDetailOptions {
|
|
|
568
598
|
enabled?: boolean;
|
|
569
599
|
queryFn?: () => Promise<unknown>;
|
|
570
600
|
}
|
|
601
|
+
/** @deprecated Use `useQuery(q.customers.customer.quotes.get(custId, quoteNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
571
602
|
declare function useQuoteDetail(customerId: number | string | undefined, quoteNo: number | string | undefined, options?: UseQuoteDetailOptions): {
|
|
572
603
|
quote: {} | null;
|
|
573
604
|
isLoading: boolean;
|
|
@@ -650,6 +681,8 @@ interface SiteHooks {
|
|
|
650
681
|
useImageWithFallback: (imagePath: string | undefined, options?: ImageUrlOptions) => ReturnType<typeof useImageWithFallback>;
|
|
651
682
|
}
|
|
652
683
|
/**
|
|
684
|
+
* @deprecated Use `AugurHooksProvider` and `useAugurOptions()` instead. Will be removed in the next major version.
|
|
685
|
+
*
|
|
653
686
|
* Creates a pre-configured provider component and re-exports all hooks.
|
|
654
687
|
*
|
|
655
688
|
* The returned `Provider` merges `config.defaultCustomerId` into the auth
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, A as AugurCallbacks, b as AugurApiClient, c as PersistenceConfig } from './customer-quotes-
|
|
2
|
-
export { d as AugurHooksProvider, e as BatchQueryConfig, f as executeBatchQuery, g as getBatchInvMastDocKey, h as getBatchInvMastDocOptions, i as getCartPricingQueryOptions, j as getCategoryItemsInfiniteKey, k as getCategoryItemsInfiniteOptions, l as getCustomerInvoiceDetailKey, m as getCustomerInvoicesKey, n as getCustomerOrderDetailKey, o as getCustomerOrdersKey, p as getCustomerQuoteDetailKey, q as getCustomerQuotesKey, r as getInvMastDocKey, s as getInvMastDocOptions, t as getInvMastKey, u as getInvMastOptions, v as getInvMastStockKey, w as getInvMastStockOptions, x as getItemAttributesKey, y as getItemAttributesOptions, z as getItemCategoryKey, C as getItemCategoryOptions, D as getItemDetailsKey, E as getItemDetailsOptions, F as getItemPriceKey, H as getItemPriceOptions, I 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, a2 as useAugurOptions } from './customer-quotes-
|
|
1
|
+
import { G as GetItemCategoryApiOptions, B as BatchInvMastDocParam, P as PageData, S as SearchSuggestionsResponse, a as SearchSuggestion, A as AugurCallbacks, b as AugurApiClient, c as PersistenceConfig } from './customer-quotes-G2WMZu_X.js';
|
|
2
|
+
export { d as AugurHooksProvider, e as BatchQueryConfig, f as executeBatchQuery, g as getBatchInvMastDocKey, h as getBatchInvMastDocOptions, i as getCartPricingQueryOptions, j as getCategoryItemsInfiniteKey, k as getCategoryItemsInfiniteOptions, l as getCustomerInvoiceDetailKey, m as getCustomerInvoicesKey, n as getCustomerOrderDetailKey, o as getCustomerOrdersKey, p as getCustomerQuoteDetailKey, q as getCustomerQuotesKey, r as getInvMastDocKey, s as getInvMastDocOptions, t as getInvMastKey, u as getInvMastOptions, v as getInvMastStockKey, w as getInvMastStockOptions, x as getItemAttributesKey, y as getItemAttributesOptions, z as getItemCategoryKey, C as getItemCategoryOptions, D as getItemDetailsKey, E as getItemDetailsOptions, F as getItemPriceKey, H as getItemPriceOptions, I 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, a2 as useAugurOptions } from './customer-quotes-G2WMZu_X.js';
|
|
3
3
|
import { InfiniteScrollPage, CacheConfig, AugurAuthContext } from '@simpleapps-com/augur-core';
|
|
4
4
|
export { AugurAuthContext, CacheConfig, CacheProvider, CacheTierConfig, DeepQueryOptions, EdgeCacheValue, InfiniteScrollPage, ProxyMutationOptions, ProxyQueryOptions } from '@simpleapps-com/augur-core';
|
|
5
5
|
import * as zustand from 'zustand';
|
|
@@ -88,6 +88,8 @@ interface UseItemPriceOptions {
|
|
|
88
88
|
queryFn?: () => Promise<TPriceData>;
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
|
+
* @deprecated Use `useQuery(q.pricing.priceEngine.get(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
92
|
+
*
|
|
91
93
|
* Fetches and caches item pricing via the augur-api SDK.
|
|
92
94
|
*
|
|
93
95
|
* Pass `options.queryFn` to override with a cached server action:
|
|
@@ -108,6 +110,8 @@ interface UseInvMastDocOptions {
|
|
|
108
110
|
queryFn?: () => Promise<TInvMastDoc>;
|
|
109
111
|
}
|
|
110
112
|
/**
|
|
113
|
+
* @deprecated Use `useQuery(q.items.invMast.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
114
|
+
*
|
|
111
115
|
* Fetches and caches an inventory master document via the augur-api SDK.
|
|
112
116
|
*/
|
|
113
117
|
declare function useInvMastDoc(invMastUid: number, itemId: string, options?: UseInvMastDocOptions): {
|
|
@@ -123,6 +127,8 @@ interface UseItemCategoryOptions {
|
|
|
123
127
|
queryFn?: () => Promise<TCategory>;
|
|
124
128
|
}
|
|
125
129
|
/**
|
|
130
|
+
* @deprecated Use `useQuery(q.items.categories.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
131
|
+
*
|
|
126
132
|
* Fetches and caches item category data via the augur-api SDK.
|
|
127
133
|
*/
|
|
128
134
|
declare function useItemCategory(itemCategoryUid: number, options?: UseItemCategoryOptions): {
|
|
@@ -135,6 +141,7 @@ interface UseInvMastOptions {
|
|
|
135
141
|
enabled?: boolean;
|
|
136
142
|
queryFn?: () => Promise<TItemDetails>;
|
|
137
143
|
}
|
|
144
|
+
/** @deprecated Use `useQuery(q.items.invMast.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
138
145
|
declare function useInvMast(invMastUid: number, itemId: string, options?: UseInvMastOptions): {
|
|
139
146
|
item: TItemDetails | undefined;
|
|
140
147
|
isLoading: boolean;
|
|
@@ -145,6 +152,7 @@ interface UseInvMastStockOptions {
|
|
|
145
152
|
enabled?: boolean;
|
|
146
153
|
queryFn?: () => Promise<number>;
|
|
147
154
|
}
|
|
155
|
+
/** @deprecated Use `useQuery(q.items.invMast.stock.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
148
156
|
declare function useInvMastStock(invMastUid: number | string, options?: UseInvMastStockOptions): {
|
|
149
157
|
qtyOnHand: number | null;
|
|
150
158
|
loading: boolean;
|
|
@@ -158,6 +166,8 @@ interface UseBatchInvMastDocOptions {
|
|
|
158
166
|
queryFn?: (params: BatchInvMastDocParam[], includePricing: "Y" | "N") => Promise<Record<string, TInvMastDoc>>;
|
|
159
167
|
}
|
|
160
168
|
/**
|
|
169
|
+
* @deprecated Use `useQueries` with `q.items.invMast.doc.get(id)` and `useAugurOptions()` instead. Will be removed in the next major version.
|
|
170
|
+
*
|
|
161
171
|
* Fetches and caches multiple inventory master documents in a single batch.
|
|
162
172
|
*
|
|
163
173
|
* Checks the queryClient cache for each param before fetching.
|
|
@@ -181,6 +191,7 @@ interface UseProductCategoryOptions {
|
|
|
181
191
|
enabled?: boolean;
|
|
182
192
|
queryFn?: () => Promise<ProductCategoryResponse>;
|
|
183
193
|
}
|
|
194
|
+
/** @deprecated Use `useQuery(q.items.itemCategory.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
184
195
|
declare function useProductCategory(itemCategoryUid: number | string | null, options?: UseProductCategoryOptions): {
|
|
185
196
|
loading: boolean;
|
|
186
197
|
error: Error | null;
|
|
@@ -194,6 +205,7 @@ interface UseItemDetailsOptions {
|
|
|
194
205
|
enabled?: boolean;
|
|
195
206
|
queryFn?: () => Promise<TItemDetails>;
|
|
196
207
|
}
|
|
208
|
+
/** @deprecated Use `useQuery(q.items.invMast.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
197
209
|
declare function useItemDetails(itemId: number | string | undefined, options?: UseItemDetailsOptions): {
|
|
198
210
|
itemCategoryUid: number | null | undefined;
|
|
199
211
|
itemDetails: TItemDetails | null;
|
|
@@ -207,6 +219,7 @@ interface UseItemAttributesOptions {
|
|
|
207
219
|
attributes: TAttribute[];
|
|
208
220
|
}>;
|
|
209
221
|
}
|
|
222
|
+
/** @deprecated Use `useQuery(q.items.invMast.attributes.get(uid))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
210
223
|
declare function useItemAttributes(itemCategoryUid: number | string | null, options?: UseItemAttributesOptions): {
|
|
211
224
|
attributes: any;
|
|
212
225
|
loading: boolean;
|
|
@@ -222,6 +235,8 @@ interface UseProductSearchOptions {
|
|
|
222
235
|
queryFn?: () => Promise<ProductSearchResponse>;
|
|
223
236
|
}
|
|
224
237
|
/**
|
|
238
|
+
* @deprecated Use `useQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
239
|
+
*
|
|
225
240
|
* Searches products via the augur-api OpenSearch endpoint.
|
|
226
241
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
227
242
|
*/
|
|
@@ -240,6 +255,8 @@ interface UseSearchSuggestionsOptions {
|
|
|
240
255
|
queryFn?: () => Promise<SearchSuggestionsResponse>;
|
|
241
256
|
}
|
|
242
257
|
/**
|
|
258
|
+
* @deprecated Use `useQuery(q.opensearch.suggestions.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
259
|
+
*
|
|
243
260
|
* Fetches search suggestions via the augur-api OpenSearch endpoint.
|
|
244
261
|
* Replaces the ampro-online pattern of fetching from a Next.js API route.
|
|
245
262
|
*/
|
|
@@ -442,6 +459,8 @@ interface UseCategoryItemsInfiniteOptions {
|
|
|
442
459
|
}) => Promise<InfiniteScrollPage>;
|
|
443
460
|
}
|
|
444
461
|
/**
|
|
462
|
+
* @deprecated Use `useInfiniteQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
463
|
+
*
|
|
445
464
|
* Infinite scroll for category product listings.
|
|
446
465
|
* Fetches pages of products via the augur-api SDK.
|
|
447
466
|
*/
|
|
@@ -455,6 +474,8 @@ interface UseItemSearchInfiniteOptions {
|
|
|
455
474
|
}) => Promise<InfiniteScrollPage>;
|
|
456
475
|
}
|
|
457
476
|
/**
|
|
477
|
+
* @deprecated Use `useInfiniteQuery(q.opensearch.itemSearch.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version.
|
|
478
|
+
*
|
|
458
479
|
* Infinite scroll for search results.
|
|
459
480
|
* Fetches pages of products via the augur-api SDK OpenSearch endpoint.
|
|
460
481
|
*/
|
|
@@ -464,6 +485,7 @@ interface UseJoomlaContentOptions {
|
|
|
464
485
|
enabled?: boolean;
|
|
465
486
|
queryFn?: () => Promise<TJoomlaContent>;
|
|
466
487
|
}
|
|
488
|
+
/** @deprecated Use `useQuery(q.joomla.content.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
467
489
|
declare function useJoomlaContent(articleId: number | string | undefined, options?: UseJoomlaContentOptions): {
|
|
468
490
|
article: TJoomlaContent | null;
|
|
469
491
|
isLoading: boolean;
|
|
@@ -475,6 +497,7 @@ interface UseJoomlaContentListOptions {
|
|
|
475
497
|
queryFn?: () => Promise<TJoomlaContent[]>;
|
|
476
498
|
filters?: Partial<TJoomlaContentFilters>;
|
|
477
499
|
}
|
|
500
|
+
/** @deprecated Use `useQuery(q.joomla.content.list(params))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
478
501
|
declare function useJoomlaContentList(categoryId: number | string | undefined, options?: UseJoomlaContentListOptions): {
|
|
479
502
|
articles: TJoomlaContent[];
|
|
480
503
|
isLoading: boolean;
|
|
@@ -486,6 +509,7 @@ interface UseJoomlaMenuOptions {
|
|
|
486
509
|
queryFn?: () => Promise<MenuItem[]>;
|
|
487
510
|
filters?: Partial<TMenuFilters>;
|
|
488
511
|
}
|
|
512
|
+
/** @deprecated Use `useQuery(q.joomla.menu.list(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
489
513
|
declare function useJoomlaMenu(options?: UseJoomlaMenuOptions): {
|
|
490
514
|
menuItems: MenuItem[];
|
|
491
515
|
isLoading: boolean;
|
|
@@ -496,6 +520,7 @@ interface UseJoomlaMenuDocOptions {
|
|
|
496
520
|
enabled?: boolean;
|
|
497
521
|
queryFn?: () => Promise<MenuItem>;
|
|
498
522
|
}
|
|
523
|
+
/** @deprecated Use `useQuery(q.joomla.menu.doc.get(id))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
499
524
|
declare function useJoomlaMenuDoc(menuId: number | string | undefined, options?: UseJoomlaMenuDocOptions): {
|
|
500
525
|
menuItem: MenuItem | null;
|
|
501
526
|
isLoading: boolean;
|
|
@@ -510,6 +535,7 @@ interface UseCustomerOrdersOptions {
|
|
|
510
535
|
enabled?: boolean;
|
|
511
536
|
queryFn?: () => Promise<CustomerListResult$2>;
|
|
512
537
|
}
|
|
538
|
+
/** @deprecated Use `useQuery(q.customers.customer.orders.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
513
539
|
declare function useCustomerOrders(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerOrdersOptions): {
|
|
514
540
|
orders: unknown[];
|
|
515
541
|
total: number;
|
|
@@ -520,6 +546,7 @@ interface UseOrderDetailOptions {
|
|
|
520
546
|
enabled?: boolean;
|
|
521
547
|
queryFn?: () => Promise<unknown>;
|
|
522
548
|
}
|
|
549
|
+
/** @deprecated Use `useQuery(q.customers.customer.orders.get(custId, orderNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
523
550
|
declare function useOrderDetail(customerId: number | string | undefined, orderId: number | string | undefined, options?: UseOrderDetailOptions): {
|
|
524
551
|
order: {} | null;
|
|
525
552
|
isLoading: boolean;
|
|
@@ -534,6 +561,7 @@ interface UseCustomerInvoicesOptions {
|
|
|
534
561
|
enabled?: boolean;
|
|
535
562
|
queryFn?: () => Promise<CustomerListResult$1>;
|
|
536
563
|
}
|
|
564
|
+
/** @deprecated Use `useQuery(q.customers.customer.invoices.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
537
565
|
declare function useCustomerInvoices(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerInvoicesOptions): {
|
|
538
566
|
invoices: unknown[];
|
|
539
567
|
total: number;
|
|
@@ -544,6 +572,7 @@ interface UseInvoiceDetailOptions {
|
|
|
544
572
|
enabled?: boolean;
|
|
545
573
|
queryFn?: () => Promise<unknown>;
|
|
546
574
|
}
|
|
575
|
+
/** @deprecated Use `useQuery(q.customers.customer.invoices.get(custId, invoiceNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
547
576
|
declare function useInvoiceDetail(customerId: number | string | undefined, invoiceNo: number | string | undefined, options?: UseInvoiceDetailOptions): {
|
|
548
577
|
invoice: {} | null;
|
|
549
578
|
isLoading: boolean;
|
|
@@ -558,6 +587,7 @@ interface UseCustomerQuotesOptions {
|
|
|
558
587
|
enabled?: boolean;
|
|
559
588
|
queryFn?: () => Promise<CustomerListResult>;
|
|
560
589
|
}
|
|
590
|
+
/** @deprecated Use `useQuery(q.customers.customer.quotes.list(custId))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
561
591
|
declare function useCustomerQuotes(customerId: number | string | undefined, params?: Record<string, unknown>, options?: UseCustomerQuotesOptions): {
|
|
562
592
|
quotes: unknown[];
|
|
563
593
|
total: number;
|
|
@@ -568,6 +598,7 @@ interface UseQuoteDetailOptions {
|
|
|
568
598
|
enabled?: boolean;
|
|
569
599
|
queryFn?: () => Promise<unknown>;
|
|
570
600
|
}
|
|
601
|
+
/** @deprecated Use `useQuery(q.customers.customer.quotes.get(custId, quoteNo))` with `useAugurOptions()` instead. Will be removed in the next major version. */
|
|
571
602
|
declare function useQuoteDetail(customerId: number | string | undefined, quoteNo: number | string | undefined, options?: UseQuoteDetailOptions): {
|
|
572
603
|
quote: {} | null;
|
|
573
604
|
isLoading: boolean;
|
|
@@ -650,6 +681,8 @@ interface SiteHooks {
|
|
|
650
681
|
useImageWithFallback: (imagePath: string | undefined, options?: ImageUrlOptions) => ReturnType<typeof useImageWithFallback>;
|
|
651
682
|
}
|
|
652
683
|
/**
|
|
684
|
+
* @deprecated Use `AugurHooksProvider` and `useAugurOptions()` instead. Will be removed in the next major version.
|
|
685
|
+
*
|
|
653
686
|
* Creates a pre-configured provider component and re-exports all hooks.
|
|
654
687
|
*
|
|
655
688
|
* The returned `Provider` merges `config.defaultCustomerId` into the auth
|
package/dist/index.js
CHANGED