@simpleapps-com/augur-hooks 1.0.8 → 1.0.9
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-CPPFLOLS.js → chunk-DDN6MAPI.js} +33 -1
- package/dist/chunk-DDN6MAPI.js.map +1 -0
- package/dist/{chunk-C7JC34SM.cjs → chunk-DYM6U3QO.cjs} +98 -66
- package/dist/chunk-DYM6U3QO.cjs.map +1 -0
- package/dist/{customer-quotes-Bdeo_I1q.d.cts → customer-quotes-DIpZNjT1.d.cts} +12 -2
- package/dist/{customer-quotes-Bdeo_I1q.d.ts → customer-quotes-DIpZNjT1.d.ts} +12 -2
- package/dist/index.cjs +175 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +85 -15
- package/dist/index.d.ts +85 -15
- package/dist/index.js +111 -51
- package/dist/index.js.map +1 -1
- package/dist/server.cjs +6 -2
- 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 +5 -1
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-C7JC34SM.cjs.map +0 -1
- package/dist/chunk-CPPFLOLS.js.map +0 -1
|
@@ -194,6 +194,36 @@ var getInvMastStockOptions = (api, invMastUid, cache) => {
|
|
|
194
194
|
};
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
+
// src/queries/stock.ts
|
|
198
|
+
var getStockKey = (invMastUid) => {
|
|
199
|
+
return ["stock", invMastUid];
|
|
200
|
+
};
|
|
201
|
+
var getStockOptions = (api, invMastUid, cache) => {
|
|
202
|
+
const tier = cache?.semiStatic;
|
|
203
|
+
return {
|
|
204
|
+
queryKey: getStockKey(invMastUid),
|
|
205
|
+
queryFn: async () => {
|
|
206
|
+
const edgeCache = tier?.edgeCache;
|
|
207
|
+
return withCache(
|
|
208
|
+
cache?.provider,
|
|
209
|
+
tier,
|
|
210
|
+
"items.invMast.stock.list",
|
|
211
|
+
async () => {
|
|
212
|
+
const response = await api.items.invMast.stock.list(Number(invMastUid), {
|
|
213
|
+
...edgeCache != null ? { edgeCache } : {}
|
|
214
|
+
});
|
|
215
|
+
const stockData = response.data?.stockData ?? [];
|
|
216
|
+
const companySummary = response.data?.companySummary ?? {};
|
|
217
|
+
return { stockData, companySummary };
|
|
218
|
+
},
|
|
219
|
+
invMastUid
|
|
220
|
+
);
|
|
221
|
+
},
|
|
222
|
+
staleTime: tier?.staleTime,
|
|
223
|
+
gcTime: tier?.gcTime
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
197
227
|
// src/queries/batch-inv-mast-doc.ts
|
|
198
228
|
var getBatchInvMastDocKey = (params, includePricing) => {
|
|
199
229
|
const sorted = [...params].sort(
|
|
@@ -690,6 +720,8 @@ export {
|
|
|
690
720
|
getInvMastOptions,
|
|
691
721
|
getInvMastStockKey,
|
|
692
722
|
getInvMastStockOptions,
|
|
723
|
+
getStockKey,
|
|
724
|
+
getStockOptions,
|
|
693
725
|
getBatchInvMastDocKey,
|
|
694
726
|
getBatchInvMastDocOptions,
|
|
695
727
|
executeBatchQuery,
|
|
@@ -723,4 +755,4 @@ export {
|
|
|
723
755
|
getCustomerQuotesKey,
|
|
724
756
|
getCustomerQuoteDetailKey
|
|
725
757
|
};
|
|
726
|
-
//# sourceMappingURL=chunk-
|
|
758
|
+
//# sourceMappingURL=chunk-DDN6MAPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/queries/stable-stringify.ts","../src/queries/cache-helper.ts","../src/queries/item-price.ts","../src/queries/inv-mast-doc.ts","../src/queries/item-category.ts","../src/queries/inv-mast.ts","../src/queries/inv-mast-stock.ts","../src/queries/stock.ts","../src/queries/batch-inv-mast-doc.ts","../src/queries/batch-query.ts","../src/queries/product-category.ts","../src/queries/item-details.ts","../src/queries/item-attributes.ts","../src/queries/product-search.ts","../src/queries/search-suggestions.ts","../src/queries/cart-pricing.ts","../src/queries/category-items-infinite.ts","../src/queries/item-search-infinite.ts","../src/queries/joomla-content.ts","../src/queries/joomla-content-list.ts","../src/queries/joomla-menu.ts","../src/queries/joomla-menu-doc.ts","../src/queries/customer-orders.ts","../src/queries/customer-invoices.ts","../src/queries/customer-quotes.ts"],"sourcesContent":["/**\n * Re-export from augur-core — single source of truth for deterministic key generation.\n * @deprecated Import from `@simpleapps-com/augur-core` instead. Will be removed in the next major version.\n */\nexport { stableStringify } from \"@simpleapps-com/augur-core\";\n","import type { CacheProvider, CacheTierConfig } from \"../types\";\nimport { stableStringify } from \"./stable-stringify\";\n\n/**\n * FNV-1a 32-bit hash. Fast, cross-platform (no Node crypto needed).\n */\nfunction fnv1a(str: string): string {\n let h = 0x811c9dc5;\n for (let i = 0; i < str.length; i++) {\n h ^= str.charCodeAt(i);\n h = Math.imul(h, 0x01000193);\n }\n return (h >>> 0).toString(16).padStart(8, \"0\");\n}\n\n/**\n * Wraps an async function with optional Redis caching.\n *\n * - When `provider` and `tier.redis` are both set, checks Redis before\n * calling `fn`, then caches the result on miss.\n * - When either is missing, calls `fn` directly (no-op passthrough).\n *\n * @param provider Redis-compatible get/set + prefix. Undefined = skip Redis.\n * @param tier Cache tier config. Undefined or missing `redis` = skip Redis.\n * @param methodPath Dot-separated SDK method path (used as cache key segment).\n * @param fn The async function to cache (typically the SDK call).\n * @param keyArgs Values to hash for the cache key (e.g. query params).\n */\nexport async function withCache<T>(\n provider: CacheProvider | undefined,\n tier: CacheTierConfig | undefined,\n methodPath: string,\n fn: () => Promise<T>,\n ...keyArgs: unknown[]\n): Promise<T> {\n const redisTtl = tier?.redis;\n if (!provider || !redisTtl) return fn();\n\n const key = `${provider.prefix}sdk:${methodPath}:${fnv1a(stableStringify(keyArgs))}`;\n\n try {\n const cached = await provider.get(key);\n if (cached != null) return JSON.parse(cached) as T;\n } catch {\n /* Redis read error — fall through to SDK call */\n }\n\n const result = await fn();\n\n try {\n provider.set(key, JSON.stringify(result), redisTtl).catch(() => {});\n } catch {\n /* Non-serializable or write error — skip caching */\n }\n\n return result;\n}\n","import type { TPriceData } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/**\n * Generates a consistent query key for item price queries.\n * Usable in both client hooks and server-side prefetch.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getItemPriceKey = (\n itemId: string | undefined,\n customerId: string | number | undefined,\n quantity: number = 1,\n) => {\n return [\"price\", itemId?.toUpperCase() || \"\", customerId, quantity] as const;\n};\n\n/**\n * Query options for item price. Accepts the SDK instance so it works\n * in both client (via provider) and server (via direct construction).\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getItemPriceOptions = (\n api: AugurApiClient,\n itemId: string | undefined,\n customerId: string | number | undefined,\n quantity: number = 1,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getItemPriceKey(itemId, customerId, quantity),\n queryFn: async (): Promise<TPriceData> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"pricing.priceEngine.get\",\n async () => {\n const response = await api.pricing.priceEngine.get({\n itemId: itemId?.toUpperCase() || \"\",\n customerId: Number(customerId),\n quantity,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data;\n },\n itemId, customerId, quantity,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n refetchOnReconnect: true,\n refetchOnWindowFocus: false,\n meta: { persist: true },\n };\n};\n","import type { TInvMastDoc } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/**\n * Generates a consistent query key for inv mast doc queries.\n * Usable in both client hooks and server-side prefetch.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getInvMastDocKey = (\n invMastUid: number,\n itemId: string,\n includePricing: \"Y\" | \"N\",\n) => {\n return [\n \"invMastDoc\",\n invMastUid,\n itemId.toUpperCase(),\n includePricing,\n ] as const;\n};\n\n/**\n * Query options for inv mast doc. Accepts the SDK instance so it works\n * in both client (via provider) and server (via direct construction).\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getInvMastDocOptions = (\n api: AugurApiClient,\n invMastUid: number,\n itemId: string,\n includePricing: \"Y\" | \"N\",\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getInvMastDocKey(invMastUid, itemId, includePricing),\n queryFn: async (): Promise<TInvMastDoc> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.invMast.doc.list\",\n async () => {\n const response = await api.items.invMast.doc.list(invMastUid, {\n itemId: itemId.toUpperCase(),\n includePricing,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n if (!response.data) throw new Error(\"Item not found\");\n return response.data;\n },\n invMastUid,\n itemId,\n includePricing,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TCategory } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig, GetItemCategoryApiOptions } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\ntype ItemCategoryQueryKey = readonly [\n \"itemCategory\",\n number,\n GetItemCategoryApiOptions | undefined,\n];\n\n/**\n * Generates a consistent query key for item category queries.\n * Usable in both client hooks and server-side prefetch.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getItemCategoryKey = (\n itemCategoryUid: number,\n apiOptions?: GetItemCategoryApiOptions,\n): ItemCategoryQueryKey => {\n return [\"itemCategory\", itemCategoryUid, apiOptions] as const;\n};\n\n/**\n * Query options for item category. Accepts the SDK instance so it works\n * in both client (via provider) and server (via direct construction).\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getItemCategoryOptions = (\n api: AugurApiClient,\n itemCategoryUid: number,\n apiOptions?: GetItemCategoryApiOptions,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getItemCategoryKey(itemCategoryUid, apiOptions),\n queryFn: async (): Promise<TCategory> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.categories.get\",\n async () => {\n const response = await api.items.categories.get(\n itemCategoryUid,\n { ...apiOptions, ...(edgeCache != null ? { edgeCache } : {}) },\n );\n if (!response.data) throw new Error(\"Item category not found\");\n return response.data;\n },\n itemCategoryUid,\n apiOptions,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TItemDetails } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getInvMastKey = (invMastUid: number, itemId: string) => {\n return [\"invMast\", invMastUid, itemId.toUpperCase()] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getInvMastOptions = (\n api: AugurApiClient,\n invMastUid: number,\n itemId: string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getInvMastKey(invMastUid, itemId),\n queryFn: async (): Promise<TItemDetails> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.invMast.get\",\n async () => {\n const response = await api.items.invMast.get(invMastUid, {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n if (!response.data) throw new Error(\"Item not found\");\n return response.data;\n },\n invMastUid,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TStockData } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getInvMastStockKey = (invMastUid: number | string) => {\n return [\"invMastStock\", invMastUid] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getInvMastStockOptions = (\n api: AugurApiClient,\n invMastUid: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getInvMastStockKey(invMastUid),\n queryFn: async (): Promise<number> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.invMast.stock.list\",\n async () => {\n const response = await api.items.invMast.stock.list(Number(invMastUid), {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n const stockData: TStockData[] = response.data?.stockData ?? [];\n return stockData.reduce(\n (qty: number, stock: TStockData) => qty + stock.qtyOnHand,\n 0,\n );\n },\n invMastUid,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TStock } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\nexport const getStockKey = (invMastUid: number | string) => {\n return [\"stock\", invMastUid] as const;\n};\n\nexport const getStockOptions = (\n api: AugurApiClient,\n invMastUid: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getStockKey(invMastUid),\n queryFn: async (): Promise<TStock> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.invMast.stock.list\",\n async () => {\n const response = await api.items.invMast.stock.list(Number(invMastUid), {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n const stockData = response.data?.stockData ?? [];\n const companySummary = response.data?.companySummary ?? {};\n return { stockData, companySummary } as TStock;\n },\n invMastUid,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TInvMastDoc } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { getInvMastDocOptions } from \"./inv-mast-doc\";\nimport { stableStringify } from \"./stable-stringify\";\n\nexport interface BatchInvMastDocParam {\n invMastUid: number;\n itemId: string;\n}\n\n/**\n * Generates a deterministic query key for a batch inv mast doc query.\n * Params are sorted by uppercased itemId to ensure stable keys\n * regardless of input order.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getBatchInvMastDocKey = (\n params: BatchInvMastDocParam[],\n includePricing: \"Y\" | \"N\",\n) => {\n const sorted = [...params].sort((a, b) =>\n a.itemId.toUpperCase().localeCompare(b.itemId.toUpperCase()),\n );\n return [\n \"batchInvMastDoc\",\n stableStringify(sorted.map((p) => ({ invMastUid: p.invMastUid, itemId: p.itemId.toUpperCase() }))),\n includePricing,\n ] as const;\n};\n\n/**\n * Server-side query options for batch inv mast doc.\n * Uses Promise.all over individual getInvMastDocOptions queryFns\n * since queryClient is not available server-side.\n * Failed items are silently excluded from the result.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getBatchInvMastDocOptions = (\n api: AugurApiClient,\n params: BatchInvMastDocParam[],\n includePricing: \"Y\" | \"N\",\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getBatchInvMastDocKey(params, includePricing),\n queryFn: async (): Promise<Record<string, TInvMastDoc>> => {\n const results: Record<string, TInvMastDoc> = {};\n const settled = await Promise.allSettled(\n params.map(async (p) => {\n const opts = getInvMastDocOptions(\n api,\n p.invMastUid,\n p.itemId,\n includePricing,\n cache,\n );\n const data = await opts.queryFn();\n return { key: p.itemId.toUpperCase(), data };\n }),\n );\n for (const entry of settled) {\n if (entry.status === \"fulfilled\") {\n results[entry.value.key] = entry.value.data;\n }\n }\n return results;\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { QueryClient } from \"@tanstack/react-query\";\n\nexport interface BatchQueryConfig<TParam, TData> {\n params: TParam[];\n queryClient: QueryClient;\n /** Build individual cache key for a single param. */\n getItemKey: (param: TParam) => readonly unknown[];\n /** Build the string key for the result Record from a param. */\n getResultKey: (param: TParam) => string;\n /** Fetch only uncached items, return keyed Record. */\n fetchItems: (uncached: TParam[]) => Promise<Record<string, TData>>;\n /** Extract individual cache key from a fetched result entry (for seeding). */\n getSeedKey: (resultKey: string, data: TData) => readonly unknown[];\n}\n\n/**\n * Generic batch query executor.\n *\n * 1. Checks queryClient cache for each param\n * 2. Fetches only uncached items in a single batch call\n * 3. Seeds individual cache entries from the response\n * 4. Returns merged cached + fetched record\n */\nexport async function executeBatchQuery<TParam, TData>(\n config: BatchQueryConfig<TParam, TData>,\n): Promise<Record<string, TData>> {\n const { params, queryClient, getItemKey, getResultKey, fetchItems, getSeedKey } = config;\n\n if (params.length === 0) {\n return {};\n }\n\n const cached: Record<string, TData> = {};\n const uncached: TParam[] = [];\n\n for (const param of params) {\n const existing = queryClient.getQueryData<TData>(getItemKey(param));\n if (existing !== undefined) {\n cached[getResultKey(param)] = existing;\n } else {\n uncached.push(param);\n }\n }\n\n if (uncached.length === 0) {\n return cached;\n }\n\n const fetched = await fetchItems(uncached);\n\n for (const [key, data] of Object.entries(fetched)) {\n queryClient.setQueryData(getSeedKey(key, data as TData), data);\n }\n\n return { ...cached, ...fetched };\n}\n","import type { TProductCategory } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\ntype ProductCategoryResponse = {\n itemCategoryDesc: string;\n childrenTotal: number;\n children: TProductCategory[];\n categoryImage: string | null;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getProductCategoryKey = (\n itemCategoryUid: number | string | null,\n) => {\n return [\"productCategory\", itemCategoryUid] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getProductCategoryOptions = (\n api: AugurApiClient,\n itemCategoryUid: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getProductCategoryKey(itemCategoryUid),\n queryFn: async (): Promise<ProductCategoryResponse> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.categories.get\",\n async () => {\n const response = await api.items.categories.get(Number(itemCategoryUid), {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data;\n },\n itemCategoryUid,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TItemDetails } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getItemDetailsKey = (itemId: number | string) => {\n const normalizedId = typeof itemId === \"string\" ? itemId.toUpperCase() : itemId;\n return [\"itemDetails\", normalizedId] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getItemDetailsOptions = (\n api: AugurApiClient,\n itemId: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getItemDetailsKey(itemId),\n queryFn: async (): Promise<TItemDetails> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"items.invMast.doc.list\",\n async () => {\n const response = await api.items.invMast.doc.list(Number(itemId), {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n if (!response.data) throw new Error(\"Item not found\");\n return response.data;\n },\n itemId,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getItemAttributesKey = (\n itemCategoryUid: number | string | null,\n) => {\n return [\"itemAttributes\", itemCategoryUid] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getItemAttributesOptions = (\n api: AugurApiClient,\n itemCategoryUid: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getItemAttributesKey(itemCategoryUid),\n queryFn: async () => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"openSearch.itemSearch.attributes.list\",\n async () => {\n const response = await api.openSearch.itemSearch.attributes.list({\n q: \"\",\n searchType: \"query\",\n classId5List: String(itemCategoryUid),\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data;\n },\n itemCategoryUid,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { TProductItem } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig, PageData } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\ntype ProductSearchResponse = {\n items: TProductItem[];\n totalResults: number;\n};\n\n/**\n * Generates a consistent query key for product search queries.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getProductSearchKey = (pageData: PageData) => {\n return [\n \"productSearch\",\n pageData.q,\n pageData.limit,\n pageData.offset,\n pageData.sortBy,\n pageData.itemCategoryUid,\n ] as const;\n};\n\n/**\n * Query options for product search. Accepts the SDK instance so it works\n * in both client (via provider) and server (via direct construction).\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getProductSearchOptions = (\n api: AugurApiClient,\n pageData: PageData,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getProductSearchKey(pageData),\n queryFn: async (): Promise<ProductSearchResponse> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"openSearch.itemSearch.list\",\n async () => {\n const response = await api.openSearch.itemSearch.list({\n q: pageData.q,\n searchType: \"query\",\n size: pageData.limit,\n from: pageData.offset,\n classId5List: pageData.itemCategoryUid\n ? String(pageData.itemCategoryUid)\n : undefined,\n filters: pageData.filters\n ? JSON.stringify(pageData.filters)\n : undefined,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data;\n },\n pageData,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig, SearchSuggestionsResponse } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/**\n * Generates a consistent query key for search suggestion queries.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version.\n */\nexport const getSearchSuggestionsKey = (\n query: string,\n limit: number,\n offset: number,\n) => {\n return [\"searchSuggestions\", query, limit, offset] as const;\n};\n\n/**\n * Query options for search suggestions. Accepts the SDK instance so it works\n * in both client (via provider) and server (via direct construction).\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getSearchSuggestionsOptions = (\n api: AugurApiClient,\n query: string,\n limit: number = 10,\n offset: number = 0,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getSearchSuggestionsKey(query, limit, offset),\n queryFn: async (): Promise<SearchSuggestionsResponse> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"openSearch.suggestions.suggest.list\",\n async () => {\n const response = await api.openSearch.suggestions.suggest.list({\n q: query,\n size: limit,\n from: offset,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data;\n },\n query,\n limit,\n offset,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { getItemPriceOptions } from \"./item-price\";\n\n/**\n * Get cart pricing query options for prefetching or parent components.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport function getCartPricingQueryOptions(\n api: AugurApiClient,\n cartLines: Array<{ itemId: string; quantity: number }>,\n customerId: string | number | undefined,\n cache?: CacheConfig,\n) {\n return cartLines.map((line) => ({\n ...getItemPriceOptions(api, line.itemId, customerId, line.quantity, cache),\n enabled: !!customerId && !!line.itemId,\n }));\n}\n","import {\n type TItemsFilters,\n type TProductItem,\n} from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { InfiniteScrollPage } from \"../callbacks\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\nimport { stableStringify } from \"./stable-stringify\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCategoryItemsInfiniteKey = (\n itemCategoryUid: number,\n itemsFilters: TItemsFilters,\n) => {\n return [\n \"categoryItemsInfinite\",\n itemCategoryUid,\n stableStringify(itemsFilters),\n ] as const;\n};\n\n/**\n * Full infinite query options for category items.\n * Usable for server-side prefetch with `queryClient.prefetchInfiniteQuery()`.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getCategoryItemsInfiniteOptions = (\n api: AugurApiClient,\n itemCategoryUid: number,\n itemsFilters: TItemsFilters,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getCategoryItemsInfiniteKey(itemCategoryUid, itemsFilters),\n queryFn: async ({\n pageParam = 0,\n }: {\n pageParam?: unknown;\n }): Promise<InfiniteScrollPage> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"openSearch.itemSearch.list\",\n async () => {\n const response = await api.openSearch.itemSearch.list({\n q: itemsFilters.q || \"\",\n searchType: \"query\",\n size: itemsFilters.limit,\n from: pageParam as number,\n classId5List: String(itemCategoryUid),\n filters: itemsFilters.filters?.length\n ? JSON.stringify(itemsFilters.filters)\n : undefined,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n const items: TProductItem[] = response.data?.items ?? [];\n const total: number = response.data?.totalResults ?? 0;\n const nextOffset = (pageParam as number) + itemsFilters.limit;\n return {\n data: items,\n total,\n nextCursor: nextOffset < total ? nextOffset : undefined,\n };\n },\n itemCategoryUid, itemsFilters, pageParam,\n );\n },\n initialPageParam: 0,\n getNextPageParam: (lastPage: InfiniteScrollPage) => lastPage.nextCursor,\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import {\n type TItemsFilters,\n type TProductItem,\n} from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { InfiniteScrollPage } from \"../callbacks\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\nimport { stableStringify } from \"./stable-stringify\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getItemSearchInfiniteKey = (\n itemsFilters: TItemsFilters,\n itemCategoryUid?: number | string,\n) => {\n return [\n \"itemSearchInfinite\",\n stableStringify(itemsFilters),\n itemCategoryUid,\n ] as const;\n};\n\n/**\n * Full infinite query options for item search.\n * Usable for server-side prefetch with `queryClient.prefetchInfiniteQuery()`.\n * @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version.\n */\nexport const getItemSearchInfiniteOptions = (\n api: AugurApiClient,\n itemsFilters: TItemsFilters,\n itemCategoryUid?: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getItemSearchInfiniteKey(itemsFilters, itemCategoryUid),\n queryFn: async ({\n pageParam = 0,\n }: {\n pageParam?: unknown;\n }): Promise<InfiniteScrollPage> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"openSearch.itemSearch.list\",\n async () => {\n const response = await api.openSearch.itemSearch.list({\n q: itemsFilters.q,\n searchType: \"query\",\n size: itemsFilters.limit,\n from: pageParam as number,\n classId5List: itemCategoryUid ? String(itemCategoryUid) : undefined,\n filters: itemsFilters.filters?.length\n ? JSON.stringify(itemsFilters.filters)\n : undefined,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n const items: TProductItem[] = response.data?.items ?? [];\n const total: number = response.data?.totalResults ?? 0;\n const nextOffset = (pageParam as number) + itemsFilters.limit;\n return {\n data: items,\n total,\n nextCursor: nextOffset < total ? nextOffset : undefined,\n };\n },\n itemsFilters, itemCategoryUid, pageParam,\n );\n },\n initialPageParam: 0,\n getNextPageParam: (lastPage: InfiniteScrollPage) => lastPage.nextCursor,\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n meta: { persist: true },\n };\n};\n","import type { TJoomlaContent } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getJoomlaContentKey = (articleId: number | string) => {\n return [\"joomlaContent\", articleId] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getJoomlaContentOptions = (\n api: AugurApiClient,\n articleId: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getJoomlaContentKey(articleId),\n queryFn: async (): Promise<TJoomlaContent> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"joomla.content.doc.get\",\n async () => {\n const response = await api.joomla.content.doc.get(articleId, {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n if (!response.data) throw new Error(\"Article not found\");\n return response.data;\n },\n articleId,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import {\n type TJoomlaContent,\n type TJoomlaContentFilters,\n} from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getJoomlaContentListKey = (\n categoryId: number | string,\n filters?: Partial<TJoomlaContentFilters>,\n) => {\n return [\"joomlaContentList\", categoryId, filters] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getJoomlaContentListOptions = (\n api: AugurApiClient,\n categoryId: number | string,\n filters?: Partial<TJoomlaContentFilters>,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getJoomlaContentListKey(categoryId, filters),\n queryFn: async (): Promise<TJoomlaContent[]> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"joomla.content.list\",\n async () => {\n const response = await api.joomla.content.list({\n catid: categoryId,\n ...filters,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data ?? [];\n },\n categoryId, filters,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { MenuItem, TMenuFilters } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getJoomlaMenuKey = (\n filters?: Partial<TMenuFilters>,\n) => {\n return [\"joomlaMenu\", filters] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getJoomlaMenuOptions = (\n api: AugurApiClient,\n filters?: Partial<TMenuFilters>,\n cache?: CacheConfig,\n) => {\n const tier = cache?.semiStatic;\n return {\n queryKey: getJoomlaMenuKey(filters),\n queryFn: async (): Promise<MenuItem[]> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"joomla.menu.list\",\n async () => {\n const response = await api.joomla.menu.list({\n ...filters,\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n return response.data ?? [];\n },\n filters,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","import type { MenuItem } from \"@simpleapps-com/augur-utils\";\nimport type { AugurApiClient } from \"../provider\";\nimport type { CacheConfig } from \"../types\";\nimport { withCache } from \"./cache-helper\";\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getJoomlaMenuDocKey = (menuId: number | string) => {\n return [\"joomlaMenuDoc\", menuId] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead. Will be removed in the next major version. */\nexport const getJoomlaMenuDocOptions = (\n api: AugurApiClient,\n menuId: number | string,\n cache?: CacheConfig,\n) => {\n const tier = cache?.static;\n return {\n queryKey: getJoomlaMenuDocKey(menuId),\n queryFn: async (): Promise<MenuItem> => {\n const edgeCache = tier?.edgeCache;\n return withCache(\n cache?.provider,\n tier,\n \"joomla.menu.doc.get\",\n async () => {\n const response = await api.joomla.menu.doc.get(menuId, {\n ...(edgeCache != null ? { edgeCache } : {}),\n });\n if (!response.data) throw new Error(\"Menu item not found\");\n return response.data;\n },\n menuId,\n );\n },\n staleTime: tier?.staleTime,\n gcTime: tier?.gcTime,\n };\n};\n","/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerOrdersKey = (\n customerId: number | string | undefined,\n params?: Record<string, unknown>,\n) => {\n return [\"customerOrders\", customerId, params] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerOrderDetailKey = (\n customerId: number | string | undefined,\n orderId: number | string | undefined,\n) => {\n return [\"customerOrderDetail\", customerId, orderId] as const;\n};\n","/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerInvoicesKey = (\n customerId: number | string | undefined,\n params?: Record<string, unknown>,\n) => {\n return [\"customerInvoices\", customerId, params] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerInvoiceDetailKey = (\n customerId: number | string | undefined,\n invoiceNo: number | string | undefined,\n) => {\n return [\"customerInvoiceDetail\", customerId, invoiceNo] as const;\n};\n","/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerQuotesKey = (\n customerId: number | string | undefined,\n params?: Record<string, unknown>,\n) => {\n return [\"customerQuotes\", customerId, params] as const;\n};\n\n/** @deprecated Use `useAugurOptions()` or `createAugurOptions()` instead — query keys are derived automatically. Will be removed in the next major version. */\nexport const getCustomerQuoteDetailKey = (\n customerId: number | string | undefined,\n quoteNo: number | string | undefined,\n) => {\n return [\"customerQuoteDetail\", customerId, quoteNo] as const;\n};\n"],"mappings":";AAIA,SAAS,uBAAuB;;;ACEhC,SAAS,MAAM,KAAqB;AAClC,MAAI,IAAI;AACR,WAAS,IAAI,GAAG,IAAI,IAAI,QAAQ,KAAK;AACnC,SAAK,IAAI,WAAW,CAAC;AACrB,QAAI,KAAK,KAAK,GAAG,QAAU;AAAA,EAC7B;AACA,UAAQ,MAAM,GAAG,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG;AAC/C;AAeA,eAA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;AACH,SAAO,CAAC,kBAAkB,YAAY,MAAM;AAC9C;AAGO,IAAM,4BAA4B,CACvC,YACA,YACG;AACH,SAAO,CAAC,uBAAuB,YAAY,OAAO;AACpD;;;ACbO,IAAM,yBAAyB,CACpC,YACA,WACG;AACH,SAAO,CAAC,oBAAoB,YAAY,MAAM;AAChD;AAGO,IAAM,8BAA8B,CACzC,YACA,cACG;AACH,SAAO,CAAC,yBAAyB,YAAY,SAAS;AACxD;;;ACbO,IAAM,uBAAuB,CAClC,YACA,WACG;AACH,SAAO,CAAC,kBAAkB,YAAY,MAAM;AAC9C;AAGO,IAAM,4BAA4B,CACvC,YACA,YACG;AACH,SAAO,CAAC,uBAAuB,YAAY,OAAO;AACpD;","names":[]}
|
|
@@ -194,6 +194,36 @@ var getInvMastStockOptions = (api, invMastUid, cache) => {
|
|
|
194
194
|
};
|
|
195
195
|
};
|
|
196
196
|
|
|
197
|
+
// src/queries/stock.ts
|
|
198
|
+
var getStockKey = (invMastUid) => {
|
|
199
|
+
return ["stock", invMastUid];
|
|
200
|
+
};
|
|
201
|
+
var getStockOptions = (api, invMastUid, cache) => {
|
|
202
|
+
const tier = _optionalChain([cache, 'optionalAccess', _33 => _33.semiStatic]);
|
|
203
|
+
return {
|
|
204
|
+
queryKey: getStockKey(invMastUid),
|
|
205
|
+
queryFn: async () => {
|
|
206
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _34 => _34.edgeCache]);
|
|
207
|
+
return withCache(
|
|
208
|
+
_optionalChain([cache, 'optionalAccess', _35 => _35.provider]),
|
|
209
|
+
tier,
|
|
210
|
+
"items.invMast.stock.list",
|
|
211
|
+
async () => {
|
|
212
|
+
const response = await api.items.invMast.stock.list(Number(invMastUid), {
|
|
213
|
+
...edgeCache != null ? { edgeCache } : {}
|
|
214
|
+
});
|
|
215
|
+
const stockData = _nullishCoalesce(_optionalChain([response, 'access', _36 => _36.data, 'optionalAccess', _37 => _37.stockData]), () => ( []));
|
|
216
|
+
const companySummary = _nullishCoalesce(_optionalChain([response, 'access', _38 => _38.data, 'optionalAccess', _39 => _39.companySummary]), () => ( {}));
|
|
217
|
+
return { stockData, companySummary };
|
|
218
|
+
},
|
|
219
|
+
invMastUid
|
|
220
|
+
);
|
|
221
|
+
},
|
|
222
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _40 => _40.staleTime]),
|
|
223
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _41 => _41.gcTime])
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
197
227
|
// src/queries/batch-inv-mast-doc.ts
|
|
198
228
|
var getBatchInvMastDocKey = (params, includePricing) => {
|
|
199
229
|
const sorted = [...params].sort(
|
|
@@ -206,7 +236,7 @@ var getBatchInvMastDocKey = (params, includePricing) => {
|
|
|
206
236
|
];
|
|
207
237
|
};
|
|
208
238
|
var getBatchInvMastDocOptions = (api, params, includePricing, cache) => {
|
|
209
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
239
|
+
const tier = _optionalChain([cache, 'optionalAccess', _42 => _42.static]);
|
|
210
240
|
return {
|
|
211
241
|
queryKey: getBatchInvMastDocKey(params, includePricing),
|
|
212
242
|
queryFn: async () => {
|
|
@@ -231,8 +261,8 @@ var getBatchInvMastDocOptions = (api, params, includePricing, cache) => {
|
|
|
231
261
|
}
|
|
232
262
|
return results;
|
|
233
263
|
},
|
|
234
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
235
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
264
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _43 => _43.staleTime]),
|
|
265
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _44 => _44.gcTime])
|
|
236
266
|
};
|
|
237
267
|
};
|
|
238
268
|
|
|
@@ -267,13 +297,13 @@ var getProductCategoryKey = (itemCategoryUid) => {
|
|
|
267
297
|
return ["productCategory", itemCategoryUid];
|
|
268
298
|
};
|
|
269
299
|
var getProductCategoryOptions = (api, itemCategoryUid, cache) => {
|
|
270
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
300
|
+
const tier = _optionalChain([cache, 'optionalAccess', _45 => _45.static]);
|
|
271
301
|
return {
|
|
272
302
|
queryKey: getProductCategoryKey(itemCategoryUid),
|
|
273
303
|
queryFn: async () => {
|
|
274
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
304
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _46 => _46.edgeCache]);
|
|
275
305
|
return withCache(
|
|
276
|
-
_optionalChain([cache, 'optionalAccess',
|
|
306
|
+
_optionalChain([cache, 'optionalAccess', _47 => _47.provider]),
|
|
277
307
|
tier,
|
|
278
308
|
"items.categories.get",
|
|
279
309
|
async () => {
|
|
@@ -285,8 +315,8 @@ var getProductCategoryOptions = (api, itemCategoryUid, cache) => {
|
|
|
285
315
|
itemCategoryUid
|
|
286
316
|
);
|
|
287
317
|
},
|
|
288
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
289
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
318
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _48 => _48.staleTime]),
|
|
319
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _49 => _49.gcTime])
|
|
290
320
|
};
|
|
291
321
|
};
|
|
292
322
|
|
|
@@ -296,13 +326,13 @@ var getItemDetailsKey = (itemId) => {
|
|
|
296
326
|
return ["itemDetails", normalizedId];
|
|
297
327
|
};
|
|
298
328
|
var getItemDetailsOptions = (api, itemId, cache) => {
|
|
299
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
329
|
+
const tier = _optionalChain([cache, 'optionalAccess', _50 => _50.static]);
|
|
300
330
|
return {
|
|
301
331
|
queryKey: getItemDetailsKey(itemId),
|
|
302
332
|
queryFn: async () => {
|
|
303
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
333
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _51 => _51.edgeCache]);
|
|
304
334
|
return withCache(
|
|
305
|
-
_optionalChain([cache, 'optionalAccess',
|
|
335
|
+
_optionalChain([cache, 'optionalAccess', _52 => _52.provider]),
|
|
306
336
|
tier,
|
|
307
337
|
"items.invMast.doc.list",
|
|
308
338
|
async () => {
|
|
@@ -315,8 +345,8 @@ var getItemDetailsOptions = (api, itemId, cache) => {
|
|
|
315
345
|
itemId
|
|
316
346
|
);
|
|
317
347
|
},
|
|
318
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
319
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
348
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _53 => _53.staleTime]),
|
|
349
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _54 => _54.gcTime])
|
|
320
350
|
};
|
|
321
351
|
};
|
|
322
352
|
|
|
@@ -325,13 +355,13 @@ var getItemAttributesKey = (itemCategoryUid) => {
|
|
|
325
355
|
return ["itemAttributes", itemCategoryUid];
|
|
326
356
|
};
|
|
327
357
|
var getItemAttributesOptions = (api, itemCategoryUid, cache) => {
|
|
328
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
358
|
+
const tier = _optionalChain([cache, 'optionalAccess', _55 => _55.static]);
|
|
329
359
|
return {
|
|
330
360
|
queryKey: getItemAttributesKey(itemCategoryUid),
|
|
331
361
|
queryFn: async () => {
|
|
332
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
362
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _56 => _56.edgeCache]);
|
|
333
363
|
return withCache(
|
|
334
|
-
_optionalChain([cache, 'optionalAccess',
|
|
364
|
+
_optionalChain([cache, 'optionalAccess', _57 => _57.provider]),
|
|
335
365
|
tier,
|
|
336
366
|
"openSearch.itemSearch.attributes.list",
|
|
337
367
|
async () => {
|
|
@@ -346,8 +376,8 @@ var getItemAttributesOptions = (api, itemCategoryUid, cache) => {
|
|
|
346
376
|
itemCategoryUid
|
|
347
377
|
);
|
|
348
378
|
},
|
|
349
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
350
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
379
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _58 => _58.staleTime]),
|
|
380
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _59 => _59.gcTime])
|
|
351
381
|
};
|
|
352
382
|
};
|
|
353
383
|
|
|
@@ -363,13 +393,13 @@ var getProductSearchKey = (pageData) => {
|
|
|
363
393
|
];
|
|
364
394
|
};
|
|
365
395
|
var getProductSearchOptions = (api, pageData, cache) => {
|
|
366
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
396
|
+
const tier = _optionalChain([cache, 'optionalAccess', _60 => _60.semiStatic]);
|
|
367
397
|
return {
|
|
368
398
|
queryKey: getProductSearchKey(pageData),
|
|
369
399
|
queryFn: async () => {
|
|
370
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
400
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _61 => _61.edgeCache]);
|
|
371
401
|
return withCache(
|
|
372
|
-
_optionalChain([cache, 'optionalAccess',
|
|
402
|
+
_optionalChain([cache, 'optionalAccess', _62 => _62.provider]),
|
|
373
403
|
tier,
|
|
374
404
|
"openSearch.itemSearch.list",
|
|
375
405
|
async () => {
|
|
@@ -387,8 +417,8 @@ var getProductSearchOptions = (api, pageData, cache) => {
|
|
|
387
417
|
pageData
|
|
388
418
|
);
|
|
389
419
|
},
|
|
390
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
391
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
420
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _63 => _63.staleTime]),
|
|
421
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _64 => _64.gcTime])
|
|
392
422
|
};
|
|
393
423
|
};
|
|
394
424
|
|
|
@@ -397,13 +427,13 @@ var getSearchSuggestionsKey = (query, limit, offset) => {
|
|
|
397
427
|
return ["searchSuggestions", query, limit, offset];
|
|
398
428
|
};
|
|
399
429
|
var getSearchSuggestionsOptions = (api, query, limit = 10, offset = 0, cache) => {
|
|
400
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
430
|
+
const tier = _optionalChain([cache, 'optionalAccess', _65 => _65.static]);
|
|
401
431
|
return {
|
|
402
432
|
queryKey: getSearchSuggestionsKey(query, limit, offset),
|
|
403
433
|
queryFn: async () => {
|
|
404
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
434
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _66 => _66.edgeCache]);
|
|
405
435
|
return withCache(
|
|
406
|
-
_optionalChain([cache, 'optionalAccess',
|
|
436
|
+
_optionalChain([cache, 'optionalAccess', _67 => _67.provider]),
|
|
407
437
|
tier,
|
|
408
438
|
"openSearch.suggestions.suggest.list",
|
|
409
439
|
async () => {
|
|
@@ -420,8 +450,8 @@ var getSearchSuggestionsOptions = (api, query, limit = 10, offset = 0, cache) =>
|
|
|
420
450
|
offset
|
|
421
451
|
);
|
|
422
452
|
},
|
|
423
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
424
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
453
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _68 => _68.staleTime]),
|
|
454
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _69 => _69.gcTime])
|
|
425
455
|
};
|
|
426
456
|
};
|
|
427
457
|
|
|
@@ -442,15 +472,15 @@ var getCategoryItemsInfiniteKey = (itemCategoryUid, itemsFilters) => {
|
|
|
442
472
|
];
|
|
443
473
|
};
|
|
444
474
|
var getCategoryItemsInfiniteOptions = (api, itemCategoryUid, itemsFilters, cache) => {
|
|
445
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
475
|
+
const tier = _optionalChain([cache, 'optionalAccess', _70 => _70.semiStatic]);
|
|
446
476
|
return {
|
|
447
477
|
queryKey: getCategoryItemsInfiniteKey(itemCategoryUid, itemsFilters),
|
|
448
478
|
queryFn: async ({
|
|
449
479
|
pageParam = 0
|
|
450
480
|
}) => {
|
|
451
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
481
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _71 => _71.edgeCache]);
|
|
452
482
|
return withCache(
|
|
453
|
-
_optionalChain([cache, 'optionalAccess',
|
|
483
|
+
_optionalChain([cache, 'optionalAccess', _72 => _72.provider]),
|
|
454
484
|
tier,
|
|
455
485
|
"openSearch.itemSearch.list",
|
|
456
486
|
async () => {
|
|
@@ -460,11 +490,11 @@ var getCategoryItemsInfiniteOptions = (api, itemCategoryUid, itemsFilters, cache
|
|
|
460
490
|
size: itemsFilters.limit,
|
|
461
491
|
from: pageParam,
|
|
462
492
|
classId5List: String(itemCategoryUid),
|
|
463
|
-
filters: _optionalChain([itemsFilters, 'access',
|
|
493
|
+
filters: _optionalChain([itemsFilters, 'access', _73 => _73.filters, 'optionalAccess', _74 => _74.length]) ? JSON.stringify(itemsFilters.filters) : void 0,
|
|
464
494
|
...edgeCache != null ? { edgeCache } : {}
|
|
465
495
|
});
|
|
466
|
-
const items = _nullishCoalesce(_optionalChain([response, 'access',
|
|
467
|
-
const total = _nullishCoalesce(_optionalChain([response, 'access',
|
|
496
|
+
const items = _nullishCoalesce(_optionalChain([response, 'access', _75 => _75.data, 'optionalAccess', _76 => _76.items]), () => ( []));
|
|
497
|
+
const total = _nullishCoalesce(_optionalChain([response, 'access', _77 => _77.data, 'optionalAccess', _78 => _78.totalResults]), () => ( 0));
|
|
468
498
|
const nextOffset = pageParam + itemsFilters.limit;
|
|
469
499
|
return {
|
|
470
500
|
data: items,
|
|
@@ -479,8 +509,8 @@ var getCategoryItemsInfiniteOptions = (api, itemCategoryUid, itemsFilters, cache
|
|
|
479
509
|
},
|
|
480
510
|
initialPageParam: 0,
|
|
481
511
|
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
482
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
483
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
512
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _79 => _79.staleTime]),
|
|
513
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _80 => _80.gcTime])
|
|
484
514
|
};
|
|
485
515
|
};
|
|
486
516
|
|
|
@@ -493,15 +523,15 @@ var getItemSearchInfiniteKey = (itemsFilters, itemCategoryUid) => {
|
|
|
493
523
|
];
|
|
494
524
|
};
|
|
495
525
|
var getItemSearchInfiniteOptions = (api, itemsFilters, itemCategoryUid, cache) => {
|
|
496
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
526
|
+
const tier = _optionalChain([cache, 'optionalAccess', _81 => _81.semiStatic]);
|
|
497
527
|
return {
|
|
498
528
|
queryKey: getItemSearchInfiniteKey(itemsFilters, itemCategoryUid),
|
|
499
529
|
queryFn: async ({
|
|
500
530
|
pageParam = 0
|
|
501
531
|
}) => {
|
|
502
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
532
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _82 => _82.edgeCache]);
|
|
503
533
|
return withCache(
|
|
504
|
-
_optionalChain([cache, 'optionalAccess',
|
|
534
|
+
_optionalChain([cache, 'optionalAccess', _83 => _83.provider]),
|
|
505
535
|
tier,
|
|
506
536
|
"openSearch.itemSearch.list",
|
|
507
537
|
async () => {
|
|
@@ -511,11 +541,11 @@ var getItemSearchInfiniteOptions = (api, itemsFilters, itemCategoryUid, cache) =
|
|
|
511
541
|
size: itemsFilters.limit,
|
|
512
542
|
from: pageParam,
|
|
513
543
|
classId5List: itemCategoryUid ? String(itemCategoryUid) : void 0,
|
|
514
|
-
filters: _optionalChain([itemsFilters, 'access',
|
|
544
|
+
filters: _optionalChain([itemsFilters, 'access', _84 => _84.filters, 'optionalAccess', _85 => _85.length]) ? JSON.stringify(itemsFilters.filters) : void 0,
|
|
515
545
|
...edgeCache != null ? { edgeCache } : {}
|
|
516
546
|
});
|
|
517
|
-
const items = _nullishCoalesce(_optionalChain([response, 'access',
|
|
518
|
-
const total = _nullishCoalesce(_optionalChain([response, 'access',
|
|
547
|
+
const items = _nullishCoalesce(_optionalChain([response, 'access', _86 => _86.data, 'optionalAccess', _87 => _87.items]), () => ( []));
|
|
548
|
+
const total = _nullishCoalesce(_optionalChain([response, 'access', _88 => _88.data, 'optionalAccess', _89 => _89.totalResults]), () => ( 0));
|
|
519
549
|
const nextOffset = pageParam + itemsFilters.limit;
|
|
520
550
|
return {
|
|
521
551
|
data: items,
|
|
@@ -530,8 +560,8 @@ var getItemSearchInfiniteOptions = (api, itemsFilters, itemCategoryUid, cache) =
|
|
|
530
560
|
},
|
|
531
561
|
initialPageParam: 0,
|
|
532
562
|
getNextPageParam: (lastPage) => lastPage.nextCursor,
|
|
533
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
534
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
563
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _90 => _90.staleTime]),
|
|
564
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _91 => _91.gcTime]),
|
|
535
565
|
meta: { persist: true }
|
|
536
566
|
};
|
|
537
567
|
};
|
|
@@ -541,13 +571,13 @@ var getJoomlaContentKey = (articleId) => {
|
|
|
541
571
|
return ["joomlaContent", articleId];
|
|
542
572
|
};
|
|
543
573
|
var getJoomlaContentOptions = (api, articleId, cache) => {
|
|
544
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
574
|
+
const tier = _optionalChain([cache, 'optionalAccess', _92 => _92.static]);
|
|
545
575
|
return {
|
|
546
576
|
queryKey: getJoomlaContentKey(articleId),
|
|
547
577
|
queryFn: async () => {
|
|
548
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
578
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _93 => _93.edgeCache]);
|
|
549
579
|
return withCache(
|
|
550
|
-
_optionalChain([cache, 'optionalAccess',
|
|
580
|
+
_optionalChain([cache, 'optionalAccess', _94 => _94.provider]),
|
|
551
581
|
tier,
|
|
552
582
|
"joomla.content.doc.get",
|
|
553
583
|
async () => {
|
|
@@ -560,8 +590,8 @@ var getJoomlaContentOptions = (api, articleId, cache) => {
|
|
|
560
590
|
articleId
|
|
561
591
|
);
|
|
562
592
|
},
|
|
563
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
564
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
593
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _95 => _95.staleTime]),
|
|
594
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _96 => _96.gcTime])
|
|
565
595
|
};
|
|
566
596
|
};
|
|
567
597
|
|
|
@@ -570,13 +600,13 @@ var getJoomlaContentListKey = (categoryId, filters) => {
|
|
|
570
600
|
return ["joomlaContentList", categoryId, filters];
|
|
571
601
|
};
|
|
572
602
|
var getJoomlaContentListOptions = (api, categoryId, filters, cache) => {
|
|
573
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
603
|
+
const tier = _optionalChain([cache, 'optionalAccess', _97 => _97.semiStatic]);
|
|
574
604
|
return {
|
|
575
605
|
queryKey: getJoomlaContentListKey(categoryId, filters),
|
|
576
606
|
queryFn: async () => {
|
|
577
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
607
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _98 => _98.edgeCache]);
|
|
578
608
|
return withCache(
|
|
579
|
-
_optionalChain([cache, 'optionalAccess',
|
|
609
|
+
_optionalChain([cache, 'optionalAccess', _99 => _99.provider]),
|
|
580
610
|
tier,
|
|
581
611
|
"joomla.content.list",
|
|
582
612
|
async () => {
|
|
@@ -591,8 +621,8 @@ var getJoomlaContentListOptions = (api, categoryId, filters, cache) => {
|
|
|
591
621
|
filters
|
|
592
622
|
);
|
|
593
623
|
},
|
|
594
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
595
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
624
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _100 => _100.staleTime]),
|
|
625
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _101 => _101.gcTime])
|
|
596
626
|
};
|
|
597
627
|
};
|
|
598
628
|
|
|
@@ -601,13 +631,13 @@ var getJoomlaMenuKey = (filters) => {
|
|
|
601
631
|
return ["joomlaMenu", filters];
|
|
602
632
|
};
|
|
603
633
|
var getJoomlaMenuOptions = (api, filters, cache) => {
|
|
604
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
634
|
+
const tier = _optionalChain([cache, 'optionalAccess', _102 => _102.semiStatic]);
|
|
605
635
|
return {
|
|
606
636
|
queryKey: getJoomlaMenuKey(filters),
|
|
607
637
|
queryFn: async () => {
|
|
608
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
638
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _103 => _103.edgeCache]);
|
|
609
639
|
return withCache(
|
|
610
|
-
_optionalChain([cache, 'optionalAccess',
|
|
640
|
+
_optionalChain([cache, 'optionalAccess', _104 => _104.provider]),
|
|
611
641
|
tier,
|
|
612
642
|
"joomla.menu.list",
|
|
613
643
|
async () => {
|
|
@@ -620,8 +650,8 @@ var getJoomlaMenuOptions = (api, filters, cache) => {
|
|
|
620
650
|
filters
|
|
621
651
|
);
|
|
622
652
|
},
|
|
623
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
624
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
653
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _105 => _105.staleTime]),
|
|
654
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _106 => _106.gcTime])
|
|
625
655
|
};
|
|
626
656
|
};
|
|
627
657
|
|
|
@@ -630,13 +660,13 @@ var getJoomlaMenuDocKey = (menuId) => {
|
|
|
630
660
|
return ["joomlaMenuDoc", menuId];
|
|
631
661
|
};
|
|
632
662
|
var getJoomlaMenuDocOptions = (api, menuId, cache) => {
|
|
633
|
-
const tier = _optionalChain([cache, 'optionalAccess',
|
|
663
|
+
const tier = _optionalChain([cache, 'optionalAccess', _107 => _107.static]);
|
|
634
664
|
return {
|
|
635
665
|
queryKey: getJoomlaMenuDocKey(menuId),
|
|
636
666
|
queryFn: async () => {
|
|
637
|
-
const edgeCache = _optionalChain([tier, 'optionalAccess',
|
|
667
|
+
const edgeCache = _optionalChain([tier, 'optionalAccess', _108 => _108.edgeCache]);
|
|
638
668
|
return withCache(
|
|
639
|
-
_optionalChain([cache, 'optionalAccess',
|
|
669
|
+
_optionalChain([cache, 'optionalAccess', _109 => _109.provider]),
|
|
640
670
|
tier,
|
|
641
671
|
"joomla.menu.doc.get",
|
|
642
672
|
async () => {
|
|
@@ -649,8 +679,8 @@ var getJoomlaMenuDocOptions = (api, menuId, cache) => {
|
|
|
649
679
|
menuId
|
|
650
680
|
);
|
|
651
681
|
},
|
|
652
|
-
staleTime: _optionalChain([tier, 'optionalAccess',
|
|
653
|
-
gcTime: _optionalChain([tier, 'optionalAccess',
|
|
682
|
+
staleTime: _optionalChain([tier, 'optionalAccess', _110 => _110.staleTime]),
|
|
683
|
+
gcTime: _optionalChain([tier, 'optionalAccess', _111 => _111.gcTime])
|
|
654
684
|
};
|
|
655
685
|
};
|
|
656
686
|
|
|
@@ -722,5 +752,7 @@ var getCustomerQuoteDetailKey = (customerId, quoteNo) => {
|
|
|
722
752
|
|
|
723
753
|
|
|
724
754
|
|
|
725
|
-
|
|
726
|
-
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
exports.stableStringify = _augurcore.stableStringify; exports.getItemPriceKey = getItemPriceKey; exports.getItemPriceOptions = getItemPriceOptions; exports.getInvMastDocKey = getInvMastDocKey; exports.getInvMastDocOptions = getInvMastDocOptions; exports.getItemCategoryKey = getItemCategoryKey; exports.getItemCategoryOptions = getItemCategoryOptions; exports.getInvMastKey = getInvMastKey; exports.getInvMastOptions = getInvMastOptions; exports.getInvMastStockKey = getInvMastStockKey; exports.getInvMastStockOptions = getInvMastStockOptions; exports.getStockKey = getStockKey; exports.getStockOptions = getStockOptions; exports.getBatchInvMastDocKey = getBatchInvMastDocKey; exports.getBatchInvMastDocOptions = getBatchInvMastDocOptions; exports.executeBatchQuery = executeBatchQuery; exports.getProductCategoryKey = getProductCategoryKey; exports.getProductCategoryOptions = getProductCategoryOptions; exports.getItemDetailsKey = getItemDetailsKey; exports.getItemDetailsOptions = getItemDetailsOptions; exports.getItemAttributesKey = getItemAttributesKey; exports.getItemAttributesOptions = getItemAttributesOptions; exports.getProductSearchKey = getProductSearchKey; exports.getProductSearchOptions = getProductSearchOptions; exports.getSearchSuggestionsKey = getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = getSearchSuggestionsOptions; exports.getCartPricingQueryOptions = getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = getCategoryItemsInfiniteOptions; exports.getItemSearchInfiniteKey = getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = getItemSearchInfiniteOptions; exports.getJoomlaContentKey = getJoomlaContentKey; exports.getJoomlaContentOptions = getJoomlaContentOptions; exports.getJoomlaContentListKey = getJoomlaContentListKey; exports.getJoomlaContentListOptions = getJoomlaContentListOptions; exports.getJoomlaMenuKey = getJoomlaMenuKey; exports.getJoomlaMenuOptions = getJoomlaMenuOptions; exports.getJoomlaMenuDocKey = getJoomlaMenuDocKey; exports.getJoomlaMenuDocOptions = getJoomlaMenuDocOptions; exports.getCustomerOrdersKey = getCustomerOrdersKey; exports.getCustomerOrderDetailKey = getCustomerOrderDetailKey; exports.getCustomerInvoicesKey = getCustomerInvoicesKey; exports.getCustomerInvoiceDetailKey = getCustomerInvoiceDetailKey; exports.getCustomerQuotesKey = getCustomerQuotesKey; exports.getCustomerQuoteDetailKey = getCustomerQuoteDetailKey;
|
|
758
|
+
//# sourceMappingURL=chunk-DYM6U3QO.cjs.map
|