@simpleapps-com/augur-server 2.0.3 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/actions.d.ts +72 -71
  2. package/dist/actions.js +51 -159
  3. package/dist/actions.js.map +1 -1
  4. package/dist/auth.d.ts +1 -1
  5. package/dist/auth.js +1 -1
  6. package/dist/{chunk-XHI7OYKV.js → chunk-3YLC52GL.js} +174 -246
  7. package/dist/chunk-3YLC52GL.js.map +1 -0
  8. package/dist/{chunk-I7EWYSPA.js → chunk-DCBWABAP.js} +2 -4
  9. package/dist/{chunk-I7EWYSPA.js.map → chunk-DCBWABAP.js.map} +1 -1
  10. package/dist/{chunk-GYZT5Q2K.js → chunk-OHXPJ225.js} +12 -1
  11. package/dist/chunk-OHXPJ225.js.map +1 -0
  12. package/dist/{chunk-Z7QWERHW.js → chunk-R3XT54FD.js} +8 -10
  13. package/dist/chunk-R3XT54FD.js.map +1 -0
  14. package/dist/{chunk-I26RJDRF.js → chunk-TQP67TGL.js} +1 -1
  15. package/dist/chunk-TQP67TGL.js.map +1 -0
  16. package/dist/index.d.ts +6 -6
  17. package/dist/index.js +8 -11
  18. package/dist/index.js.map +1 -1
  19. package/dist/prefetch.d.ts +3 -4
  20. package/dist/prefetch.js +3 -13
  21. package/dist/prefetch.js.map +1 -1
  22. package/dist/query.js +1 -1
  23. package/dist/{server-site-registry-RvjtgbHN.d.ts → server-site-registry-BtBMmWYF.d.ts} +1 -1
  24. package/dist/{site-CjgTIpnT.d.ts → site-C1raVxkq.d.ts} +107 -59
  25. package/dist/site.d.ts +2 -2
  26. package/dist/site.js +3 -2
  27. package/dist/site.js.map +1 -1
  28. package/dist/{smarty-streets-xASjXqym.d.ts → smarty-streets-DshoLeug.d.ts} +19 -69
  29. package/dist/testing.d.ts +3 -3
  30. package/dist/testing.js +5 -31
  31. package/dist/testing.js.map +1 -1
  32. package/package.json +8 -8
  33. package/dist/chunk-GYZT5Q2K.js.map +0 -1
  34. package/dist/chunk-I26RJDRF.js.map +0 -1
  35. package/dist/chunk-XHI7OYKV.js.map +0 -1
  36. package/dist/chunk-Z7QWERHW.js.map +0 -1
package/dist/actions.d.ts CHANGED
@@ -1,49 +1,52 @@
1
1
  import { S as SafeActionResult } from './sdk-call-CPDSzeu0.js';
2
- import { P as PaginatedResult, C as CustomerListResult, G as GetItemCategoryOptions, m as ShippingAddress, N as NormalizedUserProfile, j as SearchPage, A as AddressValidationResult } from './smarty-streets-xASjXqym.js';
3
- import { TAccountQuery, TInvMastDoc, TPriceData, TStockData, TBillingUpdate, TCardInfo, TCartLookUp, TCheckoutResult, CustomerDocument, TRelatedProduct, TCartLine, TItemsFilters, TCategoryItemsResult, TProductItem, TInvMast, TItemAccessory, TAttribute, TCategory, TWebDesc, TJoomlaContent, TMenu, TShippingMethod, TSurcharge, TTaxItem, TTax, TTransactionSetup, TPaymentValidation, TPasswordVerification } from '@simpleapps-com/augur-utils';
2
+ import { P as PaginatedResult, G as GetItemCategoryOptions, j as ShippingAddress, N as NormalizedUserProfile, g as SearchPage, A as AddressValidationResult } from './smarty-streets-DshoLeug.js';
3
+ import { TAccountQuery, TInvMastDoc, TPriceData, TStock, TBillingUpdate, TCardInfo, TCartLookUp, TCheckoutResult, CustomerDocument, TRelatedProduct, TCartLine, TItemsFilters, TCategoryItemsResult, TProductItem, TInvMast, TItemAccessory, TAttribute, TCategory, TWebDesc, TJoomlaContent, TMenu, TShippingMethod, TSearchSuggestionsResponse, TSurcharge, TTaxItem, TTax, TTransactionSetup, TPaymentValidation, TPasswordVerification } from '@simpleapps-com/augur-utils';
4
+ import { ListResult } from '@simpleapps-com/augur-core';
5
+ export { ApiResult, ListResult } from '@simpleapps-com/augur-core';
4
6
  import '@simpleapps-com/augur-api';
5
- import '@simpleapps-com/augur-core';
6
7
 
7
8
  declare function getCustomer(customerId: number): Promise<SafeActionResult<CustomerDocument>>;
8
- declare function customerLookup(params: Record<string, unknown>): Promise<SafeActionResult<CustomerDocument[]>>;
9
+ declare function customerLookup(params: Record<string, unknown>): Promise<SafeActionResult<ListResult<CustomerDocument>>>;
9
10
  declare function getCustomerDoc(customerId: number): Promise<SafeActionResult<CustomerDocument>>;
10
- declare function getCustomerOrders(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<CustomerListResult>>;
11
+ declare function getCustomerOrders(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
11
12
  declare function getCustomerOrderDetail(customerId: number, orderId: number): Promise<SafeActionResult<unknown>>;
12
- declare function getCustomerInvoices(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<CustomerListResult>>;
13
+ declare function getCustomerInvoices(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
13
14
  declare function getCustomerInvoiceDetail(customerId: number, invoiceNo: number): Promise<SafeActionResult<unknown>>;
14
- declare function getCustomerQuotes(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<CustomerListResult>>;
15
+ declare function getCustomerQuotes(customerId: number, params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
15
16
  declare function getCustomerQuoteDetail(customerId: number, quoteNo: number): Promise<SafeActionResult<unknown>>;
16
- declare function getContacts(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
17
- declare function getShipToAddresses(customerId: number): Promise<SafeActionResult<unknown[]>>;
17
+ declare function getContacts(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
18
+ declare function getShipToAddresses(customerId: number): Promise<SafeActionResult<ListResult>>;
18
19
  declare function itemCategoryLookup(path: string): Promise<SafeActionResult<unknown>>;
19
20
  declare function getItemCategory(uid: number, options?: GetItemCategoryOptions): Promise<SafeActionResult<TCategory>>;
20
21
  declare function getCategoryItems(uid: number, filters: Record<string, unknown> | TItemsFilters): Promise<SafeActionResult<TCategoryItemsResult>>;
21
22
  declare function getCategoryItemsInfinite(uid: number, itemsFilters?: TItemsFilters, pageParam?: number): Promise<SafeActionResult<PaginatedResult<TProductItem>>>;
22
- declare function getItemAttributes(categoryUid: number): Promise<SafeActionResult<TAttribute[]>>;
23
+ declare function getItemAttributes(categoryUid: number): Promise<SafeActionResult<{
24
+ attributes: TAttribute[];
25
+ }>>;
23
26
  declare function getInvMast(uid: number): Promise<SafeActionResult<TInvMast>>;
24
27
  declare function getInvMastDoc(paramsOrUid: {
25
28
  invMastUid?: number;
26
29
  itemId?: string;
27
30
  includePricing?: "Y" | "N";
28
31
  } | number, itemId?: string, includePricing?: "Y" | "N"): Promise<SafeActionResult<TInvMastDoc>>;
29
- declare function getStock(invMastUid: number): Promise<SafeActionResult<TStockData[]>>;
32
+ declare function getStock(invMastUid: number): Promise<SafeActionResult<TStock>>;
30
33
  declare function getStockCompanySummary(invMastUid: number): Promise<SafeActionResult<Record<string, number>>>;
31
- declare function getItemFaqs(invMastUid: number): Promise<SafeActionResult<unknown[]>>;
32
- declare function getItemSubstitutes(invMastUid: number): Promise<SafeActionResult<unknown[]>>;
33
- declare function getItemAccessories(invMastUid: number): Promise<SafeActionResult<TItemAccessory[]>>;
34
- declare function getSimilarItems(invMastUid: number): Promise<SafeActionResult<unknown[]>>;
34
+ declare function getItemFaqs(invMastUid: number): Promise<SafeActionResult<ListResult>>;
35
+ declare function getItemSubstitutes(invMastUid: number): Promise<SafeActionResult<ListResult>>;
36
+ declare function getItemAccessories(invMastUid: number): Promise<SafeActionResult<ListResult<TItemAccessory>>>;
37
+ declare function getSimilarItems(invMastUid: number): Promise<SafeActionResult<ListResult>>;
35
38
  declare function batchGetInvMastDocs(params: {
36
39
  invMastUid?: number;
37
40
  itemId?: string;
38
41
  }[]): Promise<SafeActionResult<Record<string, TInvMastDoc>>>;
39
- declare function batchGetStockData(invMastUids: number[]): Promise<SafeActionResult<Record<number, TStockData[]>>>;
42
+ declare function batchGetStockData(invMastUids: number[]): Promise<SafeActionResult<Record<number, TStock>>>;
40
43
  declare function cartHdrLookup(params: {
41
44
  userId?: string | number;
42
45
  cartToken?: string;
43
46
  contactId?: string | number;
44
47
  customerId?: string | number;
45
48
  }): Promise<SafeActionResult<TCartLookUp>>;
46
- declare function getCartLines(cartHdrUid: number): Promise<SafeActionResult<TCartLine[]>>;
49
+ declare function getCartLines(cartHdrUid: number): Promise<SafeActionResult<ListResult<TCartLine>>>;
47
50
  declare function addToCart(cartHdrUid: number, items: {
48
51
  itemId?: string;
49
52
  invMastUid?: number;
@@ -56,17 +59,15 @@ declare function updateCartLines(cartHdrUid: number, lines: {
56
59
  unitOfMeasure: string;
57
60
  }[]): Promise<SafeActionResult<unknown>>;
58
61
  declare function deleteCartItems(cartHdrUid: number): Promise<SafeActionResult<void>>;
59
- declare function getCartAlsoBought(cartHdrUid: number): Promise<SafeActionResult<TRelatedProduct[]>>;
62
+ declare function getCartAlsoBought(cartHdrUid: number): Promise<SafeActionResult<ListResult<TRelatedProduct>>>;
60
63
  declare function checkoutOrder(cartHdrUid: number, data: Record<string, unknown>): Promise<SafeActionResult<TCheckoutResult | undefined>>;
61
64
  declare function getItemPrice(itemId: string, customerId?: string | number, quantity?: number): Promise<SafeActionResult<TPriceData>>;
62
65
  declare function batchGetItemPrices(itemIds: string[], customerId?: string | number, quantity?: number): Promise<SafeActionResult<Record<string, TPriceData>>>;
63
66
  declare function getTaxEstimate(customerId?: string | number, postalCode?: string, items?: TTaxItem[]): Promise<SafeActionResult<TTax>>;
64
- declare function getSearchAttributes(q: string): Promise<SafeActionResult<TAttribute[]>>;
65
- declare function getSearchSuggestions(q: string, limit?: number, offset?: number): Promise<SafeActionResult<{
66
- data: unknown[];
67
- total: number;
68
- totalResults: number;
67
+ declare function getSearchAttributes(q: string): Promise<SafeActionResult<{
68
+ attributes: TAttribute[];
69
69
  }>>;
70
+ declare function getSearchSuggestions(q: string, limit?: number, offset?: number): Promise<SafeActionResult<TSearchSuggestionsResponse>>;
70
71
  declare function itemSearch(filters: {
71
72
  q: string;
72
73
  limit: number;
@@ -84,27 +85,27 @@ declare function itemSearchInfinite(filters: {
84
85
  filters?: [string, string][];
85
86
  }, itemCategoryUid?: number | string, pageParam?: number): Promise<SafeActionResult<SearchPage>>;
86
87
  declare function getOrderDoc(orderNo: string, postalCode: string): Promise<SafeActionResult<unknown>>;
87
- declare function getShippingRates(toAddress: ShippingAddress, weight: number, serviceCodes?: string[]): Promise<SafeActionResult<TShippingMethod[]>>;
88
+ declare function getShippingRates(toAddress: ShippingAddress, weight: number, serviceCodes?: string[]): Promise<SafeActionResult<ListResult<TShippingMethod>>>;
88
89
  declare function getJoomlaContent(articleId: number | string, options?: {
89
90
  alias: string;
90
91
  catId?: number;
91
92
  }): Promise<SafeActionResult<TJoomlaContent>>;
92
- declare function getJoomlaContentList(params?: Record<string, unknown>): Promise<SafeActionResult<TJoomlaContent[]>>;
93
- declare function getJoomlaMenu(paramsOrParentId?: Record<string, unknown> | number, menuType?: string): Promise<SafeActionResult<TMenu[]>>;
93
+ declare function getJoomlaContentList(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult<TJoomlaContent>>>;
94
+ declare function getJoomlaMenu(paramsOrParentId?: Record<string, unknown> | number, menuType?: string): Promise<SafeActionResult<ListResult<TMenu>>>;
94
95
  declare function getJoomlaMenuDoc(menuId: number | string): Promise<SafeActionResult<TMenu>>;
95
96
  declare function getUserProfile(userId: number | string): Promise<SafeActionResult<NormalizedUserProfile>>;
96
97
  declare function verifyPassword(username: string, password: string): Promise<SafeActionResult<TPasswordVerification>>;
97
98
  declare function getItemWebDesc(invMastUid: number): Promise<SafeActionResult<TWebDesc | undefined>>;
98
- declare function getAlsoBoughtItems(invMastUid: number): Promise<SafeActionResult<TRelatedProduct[]>>;
99
- declare function getItemTags(invMastUid: number): Promise<SafeActionResult<unknown[]>>;
99
+ declare function getAlsoBoughtItems(invMastUid: number): Promise<SafeActionResult<ListResult<TRelatedProduct>>>;
100
+ declare function getItemTags(invMastUid: number): Promise<SafeActionResult<ListResult>>;
100
101
  declare function getStates(params?: {
101
102
  twoLetterCode?: string;
102
- }): Promise<SafeActionResult<unknown[]>>;
103
+ }): Promise<SafeActionResult<ListResult>>;
103
104
  declare function validateAddress(params: Record<string, unknown>): Promise<SafeActionResult<AddressValidationResult>>;
104
105
  declare function getInvMastExt(invMastUid: number): Promise<SafeActionResult<unknown>>;
105
- declare function listInvMastExt(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
106
- declare function getSettings(serviceName?: string): Promise<SafeActionResult<unknown[]>>;
107
- declare function getMetaFiles(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
106
+ declare function listInvMastExt(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
107
+ declare function getSettings(serviceName?: string): Promise<SafeActionResult<ListResult>>;
108
+ declare function getMetaFiles(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
108
109
  declare function calculateTax(data: Record<string, unknown>): Promise<SafeActionResult<unknown>>;
109
110
  declare function transactionSetup(params: Record<string, unknown>): Promise<SafeActionResult<TTransactionSetup | undefined>>;
110
111
  declare function accountQuery(params: Record<string, unknown>): Promise<SafeActionResult<TAccountQuery | undefined>>;
@@ -112,65 +113,65 @@ declare function getSurcharge(params: Record<string, unknown>): Promise<SafeActi
112
113
  declare function cardInfo(params: Record<string, unknown>): Promise<SafeActionResult<TCardInfo | undefined>>;
113
114
  declare function billingUpdate(params: Record<string, unknown>): Promise<SafeActionResult<TBillingUpdate | undefined>>;
114
115
  declare function validatePayment(params: Record<string, unknown>): Promise<SafeActionResult<TPaymentValidation | undefined>>;
115
- declare function getRates(params: Record<string, unknown>): Promise<SafeActionResult<TShippingMethod[] | undefined>>;
116
+ declare function getRates(params: Record<string, unknown>): Promise<SafeActionResult<ListResult<TShippingMethod> | undefined>>;
116
117
  declare function getFreightRates(params: Record<string, unknown>): Promise<SafeActionResult<unknown>>;
117
- declare function getShipVia(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
118
+ declare function getShipVia(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
118
119
  declare function createBinTransfer(data: Record<string, unknown>): Promise<SafeActionResult<unknown>>;
119
120
  declare function createReceiving(data: Record<string, unknown>): Promise<SafeActionResult<unknown>>;
120
121
  declare function createTransfer(data: Record<string, unknown>): Promise<SafeActionResult<unknown>>;
121
- declare function getPurchaseOrderReceipts(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
122
- declare function getTransferReceipts(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
123
- declare function getTransferShipping(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
124
- declare function getWarehouses(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
125
- declare function getWarehouseAvailability(warehouseUid: number, params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
126
- declare function getDistributors(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
127
- declare function getProducts(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
128
- declare function getInventoryProfiles(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
129
- declare function getRestockHeaders(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
130
- declare function getSections(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
131
- declare function getAddresses(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
132
- declare function getCompanies(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
122
+ declare function getPurchaseOrderReceipts(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
123
+ declare function getTransferReceipts(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
124
+ declare function getTransferShipping(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
125
+ declare function getWarehouses(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
126
+ declare function getWarehouseAvailability(warehouseUid: number, params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
127
+ declare function getDistributors(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
128
+ declare function getProducts(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
129
+ declare function getInventoryProfiles(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
130
+ declare function getRestockHeaders(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
131
+ declare function getSections(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
132
+ declare function getAddresses(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
133
+ declare function getCompanies(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
133
134
  declare function getCompany(companyId: number): Promise<SafeActionResult<unknown | undefined>>;
134
- declare function getLocations(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
135
- declare function getPaymentTypes(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
136
- declare function getCashDrawers(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
137
- declare function getCodeP21(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
138
- declare function getP21Categories(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
135
+ declare function getLocations(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
136
+ declare function getPaymentTypes(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
137
+ declare function getCashDrawers(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
138
+ declare function getCodeP21(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
139
+ declare function getP21Categories(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
139
140
  declare function getCategoryDefaults(categoryId: number): Promise<SafeActionResult<unknown | undefined>>;
140
- declare function getP21Companies(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
141
- declare function getUsers(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
142
- declare function getWebDisplayTypes(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
141
+ declare function getP21Companies(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
142
+ declare function getUsers(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
143
+ declare function getWebDisplayTypes(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
143
144
  declare function getWebDisplayTypeDefaults(id?: number): Promise<SafeActionResult<unknown | undefined>>;
144
145
  declare function refreshContacts(params?: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
145
146
  declare function refreshCustomers(params?: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
146
- declare function getRecentImports(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
147
+ declare function getRecentImports(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
147
148
  declare function getImport(importId: string): Promise<SafeActionResult<unknown | undefined>>;
148
- declare function getImportLines(importId: number, params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
149
- declare function getScheduledImports(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
149
+ declare function getImportLines(importId: number, params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
150
+ declare function getScheduledImports(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
150
151
  declare function healthCheck(): Promise<SafeActionResult<string | undefined>>;
151
152
  declare function ping(): Promise<SafeActionResult<string | undefined>>;
152
- declare function getContext(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
153
- declare function getRubrics(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
154
- declare function getMicroservices(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
153
+ declare function getContext(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
154
+ declare function getRubrics(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
155
+ declare function getMicroservices(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
155
156
  declare function generateAkasha(data?: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
156
157
  declare function generateJoomla(data?: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
157
- declare function getTodos(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
158
+ declare function getTodos(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
158
159
  declare function getTodo(todoId: number): Promise<SafeActionResult<unknown>>;
159
- declare function getTodosSummary(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
160
- declare function getComments(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
161
- declare function getPeople(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
162
- declare function getProjects(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
163
- declare function getEvents(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
164
- declare function getMetrics(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
165
- declare function getTodolists(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
166
- declare function getBrandFolderCategories(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
160
+ declare function getTodosSummary(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
161
+ declare function getComments(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
162
+ declare function getPeople(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
163
+ declare function getProjects(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
164
+ declare function getEvents(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
165
+ declare function getMetrics(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
166
+ declare function getTodolists(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
167
+ declare function getBrandFolderCategories(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
167
168
  declare function getCategory(categoryId: string): Promise<SafeActionResult<unknown>>;
168
169
  declare function createFocus(categoryId: string, data: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
169
170
  declare function askChatGpt(params: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
170
- declare function getDocuments(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
171
+ declare function getDocuments(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
171
172
  declare function createDocument(data: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
172
173
  declare function generateOllama(data: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
173
174
  declare function sendWebhook(data: Record<string, unknown>): Promise<SafeActionResult<unknown | undefined>>;
174
- declare function getWebhooks(params?: Record<string, unknown>): Promise<SafeActionResult<unknown[]>>;
175
+ declare function getWebhooks(params?: Record<string, unknown>): Promise<SafeActionResult<ListResult>>;
175
176
 
176
177
  export { SafeActionResult, accountQuery, addToCart, askChatGpt, batchGetInvMastDocs, batchGetItemPrices, batchGetStockData, billingUpdate, calculateTax, cardInfo, cartHdrLookup, checkoutOrder, createBinTransfer, createDocument, createFocus, createReceiving, createTransfer, customerLookup, deleteCartItems, generateAkasha, generateJoomla, generateOllama, getAddresses, getAlsoBoughtItems, getBrandFolderCategories, getCartAlsoBought, getCartLines, getCashDrawers, getCategory, getCategoryDefaults, getCategoryItems, getCategoryItemsInfinite, getCodeP21, getComments, getCompanies, getCompany, getContacts, getContext, getCustomer, getCustomerDoc, getCustomerInvoiceDetail, getCustomerInvoices, getCustomerOrderDetail, getCustomerOrders, getCustomerQuoteDetail, getCustomerQuotes, getDistributors, getDocuments, getEvents, getFreightRates, getImport, getImportLines, getInvMast, getInvMastDoc, getInvMastExt, getInventoryProfiles, getItemAccessories, getItemAttributes, getItemCategory, getItemFaqs, getItemPrice, getItemSubstitutes, getItemTags, getItemWebDesc, getJoomlaContent, getJoomlaContentList, getJoomlaMenu, getJoomlaMenuDoc, getLocations, getMetaFiles, getMetrics, getMicroservices, getOrderDoc, getP21Categories, getP21Companies, getPaymentTypes, getPeople, getProducts, getProjects, getPurchaseOrderReceipts, getRates, getRecentImports, getRestockHeaders, getRubrics, getScheduledImports, getSearchAttributes, getSearchSuggestions, getSections, getSettings, getShipToAddresses, getShipVia, getShippingRates, getSimilarItems, getStates, getStock, getStockCompanySummary, getSurcharge, getTaxEstimate, getTodo, getTodolists, getTodos, getTodosSummary, getTransferReceipts, getTransferShipping, getUserProfile, getUsers, getWarehouseAvailability, getWarehouses, getWebDisplayTypeDefaults, getWebDisplayTypes, getWebhooks, healthCheck, itemCategoryLookup, itemSearch, itemSearchInfinite, listInvMastExt, ping, refreshContacts, refreshCustomers, sendWebhook, transactionSetup, updateCartLines, validateAddress, validatePayment, verifyPassword };
package/dist/actions.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use server";
2
2
  import {
3
3
  safeAction
4
- } from "./chunk-GYZT5Q2K.js";
4
+ } from "./chunk-OHXPJ225.js";
5
5
  import {
6
6
  getSiteActions
7
7
  } from "./chunk-QRCB7P2N.js";
@@ -21,65 +21,43 @@ async function getCustomerDoc(customerId) {
21
21
  return siteAction((a) => a.customers.getCustomerDoc(customerId));
22
22
  }
23
23
  async function getCustomerOrders(customerId, params) {
24
- return siteAction(
25
- (a) => a.customers.getCustomerOrders(customerId, params)
26
- );
24
+ return siteAction((a) => a.customers.getCustomerOrders(customerId, params));
27
25
  }
28
26
  async function getCustomerOrderDetail(customerId, orderId) {
29
- return siteAction(
30
- (a) => a.customers.getCustomerOrderDetail(customerId, orderId)
31
- );
27
+ return siteAction((a) => a.customers.getCustomerOrderDetail(customerId, orderId));
32
28
  }
33
29
  async function getCustomerInvoices(customerId, params) {
34
- return siteAction(
35
- (a) => a.customers.getCustomerInvoices(customerId, params)
36
- );
30
+ return siteAction((a) => a.customers.getCustomerInvoices(customerId, params));
37
31
  }
38
32
  async function getCustomerInvoiceDetail(customerId, invoiceNo) {
39
- return siteAction(
40
- (a) => a.customers.getCustomerInvoiceDetail(customerId, invoiceNo)
41
- );
33
+ return siteAction((a) => a.customers.getCustomerInvoiceDetail(customerId, invoiceNo));
42
34
  }
43
35
  async function getCustomerQuotes(customerId, params) {
44
- return siteAction(
45
- (a) => a.customers.getCustomerQuotes(customerId, params)
46
- );
36
+ return siteAction((a) => a.customers.getCustomerQuotes(customerId, params));
47
37
  }
48
38
  async function getCustomerQuoteDetail(customerId, quoteNo) {
49
- return siteAction(
50
- (a) => a.customers.getCustomerQuoteDetail(customerId, quoteNo)
51
- );
39
+ return siteAction((a) => a.customers.getCustomerQuoteDetail(customerId, quoteNo));
52
40
  }
53
41
  async function getContacts(params) {
54
42
  return siteAction((a) => a.customers.getContacts(params));
55
43
  }
56
44
  async function getShipToAddresses(customerId) {
57
- return siteAction(
58
- (a) => a.customers.getShipToAddresses(customerId)
59
- );
45
+ return siteAction((a) => a.customers.getShipToAddresses(customerId));
60
46
  }
61
47
  async function itemCategoryLookup(path) {
62
48
  return siteAction((a) => a.items.itemCategoryLookup(path));
63
49
  }
64
50
  async function getItemCategory(uid, options) {
65
- return siteAction(
66
- (a) => a.items.getItemCategory(uid, options)
67
- );
51
+ return siteAction((a) => a.items.getItemCategory(uid, options));
68
52
  }
69
53
  async function getCategoryItems(uid, filters) {
70
- return siteAction(
71
- (a) => a.items.getCategoryItems(uid, filters)
72
- );
54
+ return siteAction((a) => a.items.getCategoryItems(uid, filters));
73
55
  }
74
56
  async function getCategoryItemsInfinite(uid, itemsFilters, pageParam) {
75
- return siteAction(
76
- (a) => a.items.getCategoryItemsInfinite(uid, itemsFilters, pageParam)
77
- );
57
+ return siteAction((a) => a.items.getCategoryItemsInfinite(uid, itemsFilters, pageParam));
78
58
  }
79
59
  async function getItemAttributes(categoryUid) {
80
- return siteAction(
81
- (a) => a.items.getItemAttributes(categoryUid)
82
- );
60
+ return siteAction((a) => a.items.getItemAttributes(categoryUid));
83
61
  }
84
62
  async function getInvMast(uid) {
85
63
  return siteAction((a) => a.items.getInvMast(uid));
@@ -93,35 +71,25 @@ async function getStock(invMastUid) {
93
71
  return siteAction((a) => a.items.getStock(invMastUid));
94
72
  }
95
73
  async function getStockCompanySummary(invMastUid) {
96
- return siteAction(
97
- (a) => a.items.getStockCompanySummary(invMastUid)
98
- );
74
+ return siteAction((a) => a.items.getStockCompanySummary(invMastUid));
99
75
  }
100
76
  async function getItemFaqs(invMastUid) {
101
77
  return siteAction((a) => a.items.getItemFaqs(invMastUid));
102
78
  }
103
79
  async function getItemSubstitutes(invMastUid) {
104
- return siteAction(
105
- (a) => a.items.getItemSubstitutes(invMastUid)
106
- );
80
+ return siteAction((a) => a.items.getItemSubstitutes(invMastUid));
107
81
  }
108
82
  async function getItemAccessories(invMastUid) {
109
- return siteAction(
110
- (a) => a.items.getItemAccessories(invMastUid)
111
- );
83
+ return siteAction((a) => a.items.getItemAccessories(invMastUid));
112
84
  }
113
85
  async function getSimilarItems(invMastUid) {
114
- return siteAction(
115
- (a) => a.items.getSimilarItems(invMastUid)
116
- );
86
+ return siteAction((a) => a.items.getSimilarItems(invMastUid));
117
87
  }
118
88
  async function batchGetInvMastDocs(params) {
119
89
  return siteAction((a) => a.items.batchGetInvMastDocs(params));
120
90
  }
121
91
  async function batchGetStockData(invMastUids) {
122
- return siteAction(
123
- (a) => a.items.batchGetStockData(invMastUids)
124
- );
92
+ return siteAction((a) => a.items.batchGetStockData(invMastUids));
125
93
  }
126
94
  async function cartHdrLookup(params) {
127
95
  return siteAction((a) => a.commerce.cartHdrLookup(params));
@@ -130,80 +98,46 @@ async function getCartLines(cartHdrUid) {
130
98
  return siteAction((a) => a.commerce.getCartLines(cartHdrUid));
131
99
  }
132
100
  async function addToCart(cartHdrUid, items) {
133
- return siteAction(
134
- (a) => a.commerce.addToCart(cartHdrUid, items)
135
- );
101
+ return siteAction((a) => a.commerce.addToCart(cartHdrUid, items));
136
102
  }
137
103
  async function updateCartLines(cartHdrUid, lines) {
138
- return siteAction(
139
- (a) => a.commerce.updateCartLines(cartHdrUid, lines)
140
- );
104
+ return siteAction((a) => a.commerce.updateCartLines(cartHdrUid, lines));
141
105
  }
142
106
  async function deleteCartItems(cartHdrUid) {
143
- return siteAction(
144
- (a) => a.commerce.deleteCartItems(cartHdrUid)
145
- );
107
+ return siteAction((a) => a.commerce.deleteCartItems(cartHdrUid));
146
108
  }
147
109
  async function getCartAlsoBought(cartHdrUid) {
148
- return siteAction(
149
- (a) => a.commerce.getCartAlsoBought(cartHdrUid)
150
- );
110
+ return siteAction((a) => a.commerce.getCartAlsoBought(cartHdrUid));
151
111
  }
152
112
  async function checkoutOrder(cartHdrUid, data) {
153
- return siteAction(
154
- (a) => a.commerce.checkoutOrder(cartHdrUid, data)
155
- );
113
+ return siteAction((a) => a.commerce.checkoutOrder(cartHdrUid, data));
156
114
  }
157
115
  async function getItemPrice(itemId, customerId, quantity) {
158
- return siteAction(
159
- (a) => a.pricing.getItemPrice(itemId, customerId, quantity)
160
- );
116
+ return siteAction((a) => a.pricing.getItemPrice(itemId, customerId, quantity));
161
117
  }
162
118
  async function batchGetItemPrices(itemIds, customerId, quantity) {
163
- return siteAction(
164
- (a) => a.pricing.batchGetItemPrices(itemIds, customerId, quantity)
165
- );
119
+ return siteAction((a) => a.pricing.batchGetItemPrices(itemIds, customerId, quantity));
166
120
  }
167
121
  async function getTaxEstimate(customerId, postalCode, items) {
168
- return siteAction(
169
- (a) => a.pricing.getTaxEstimate(customerId, postalCode, items)
170
- );
122
+ return siteAction((a) => a.pricing.getTaxEstimate(customerId, postalCode, items));
171
123
  }
172
124
  async function getSearchAttributes(q) {
173
125
  return siteAction((a) => a.search.getSearchAttributes(q));
174
126
  }
175
127
  async function getSearchSuggestions(q, limit, offset) {
176
- return siteAction(
177
- (a) => a.search.getSearchSuggestions(q, limit, offset)
178
- );
128
+ return siteAction((a) => a.search.getSearchSuggestions(q, limit, offset));
179
129
  }
180
130
  async function itemSearch(filters, itemCategoryUid) {
181
- return siteAction(
182
- (a) => a.search.itemSearch(filters, itemCategoryUid)
183
- );
131
+ return siteAction((a) => a.search.itemSearch(filters, itemCategoryUid));
184
132
  }
185
133
  async function itemSearchInfinite(filters, itemCategoryUid, pageParam) {
186
- return siteAction(
187
- (a) => a.search.itemSearchInfinite(
188
- filters,
189
- itemCategoryUid,
190
- pageParam
191
- )
192
- );
134
+ return siteAction((a) => a.search.itemSearchInfinite(filters, itemCategoryUid, pageParam));
193
135
  }
194
136
  async function getOrderDoc(orderNo, postalCode) {
195
- return siteAction(
196
- (a) => a.orders.getOrderDoc(orderNo, postalCode)
197
- );
137
+ return siteAction((a) => a.orders.getOrderDoc(orderNo, postalCode));
198
138
  }
199
139
  async function getShippingRates(toAddress, weight, serviceCodes) {
200
- return siteAction(
201
- (a) => a.shipping.getShippingRates(
202
- toAddress,
203
- weight,
204
- serviceCodes
205
- )
206
- );
140
+ return siteAction((a) => a.shipping.getShippingRates(toAddress, weight, serviceCodes));
207
141
  }
208
142
  async function getJoomlaContent(articleId, options) {
209
143
  return siteAction(
@@ -211,9 +145,7 @@ async function getJoomlaContent(articleId, options) {
211
145
  );
212
146
  }
213
147
  async function getJoomlaContentList(params) {
214
- return siteAction(
215
- (a) => a.joomla.getJoomlaContentList(params)
216
- );
148
+ return siteAction((a) => a.joomla.getJoomlaContentList(params));
217
149
  }
218
150
  async function getJoomlaMenu(paramsOrParentId, menuType) {
219
151
  return siteAction(
@@ -227,17 +159,13 @@ async function getUserProfile(userId) {
227
159
  return siteAction((a) => a.joomla.getUserProfile(userId));
228
160
  }
229
161
  async function verifyPassword(username, password) {
230
- return siteAction(
231
- (a) => a.joomla.verifyPassword(username, password)
232
- );
162
+ return siteAction((a) => a.joomla.verifyPassword(username, password));
233
163
  }
234
164
  async function getItemWebDesc(invMastUid) {
235
165
  return siteAction((a) => a.legacy.getItemWebDesc(invMastUid));
236
166
  }
237
167
  async function getAlsoBoughtItems(invMastUid) {
238
- return siteAction(
239
- (a) => a.legacy.getAlsoBoughtItems(invMastUid)
240
- );
168
+ return siteAction((a) => a.legacy.getAlsoBoughtItems(invMastUid));
241
169
  }
242
170
  async function getItemTags(invMastUid) {
243
171
  return siteAction((a) => a.legacy.getItemTags(invMastUid));
@@ -246,9 +174,7 @@ async function getStates(params) {
246
174
  return siteAction((a) => a.legacy.getStates(params));
247
175
  }
248
176
  async function validateAddress(params) {
249
- return siteAction(
250
- (a) => a.smartyStreets.validateAddress(params)
251
- );
177
+ return siteAction((a) => a.smartyStreets.validateAddress(params));
252
178
  }
253
179
  async function getInvMastExt(invMastUid) {
254
180
  return siteAction((a) => a.p21Pim.getInvMastExt(invMastUid));
@@ -266,9 +192,7 @@ async function calculateTax(data) {
266
192
  return siteAction((a) => a.avalara.calculateTax(data));
267
193
  }
268
194
  async function transactionSetup(params) {
269
- return siteAction(
270
- (a) => a.payments.transactionSetup(params)
271
- );
195
+ return siteAction((a) => a.payments.transactionSetup(params));
272
196
  }
273
197
  async function accountQuery(params) {
274
198
  return siteAction((a) => a.payments.accountQuery(params));
@@ -304,27 +228,19 @@ async function createTransfer(data) {
304
228
  return siteAction((a) => a.nexus.createTransfer(data));
305
229
  }
306
230
  async function getPurchaseOrderReceipts(params) {
307
- return siteAction(
308
- (a) => a.nexus.getPurchaseOrderReceipts(params)
309
- );
231
+ return siteAction((a) => a.nexus.getPurchaseOrderReceipts(params));
310
232
  }
311
233
  async function getTransferReceipts(params) {
312
- return siteAction(
313
- (a) => a.nexus.getTransferReceipts(params)
314
- );
234
+ return siteAction((a) => a.nexus.getTransferReceipts(params));
315
235
  }
316
236
  async function getTransferShipping(params) {
317
- return siteAction(
318
- (a) => a.nexus.getTransferShipping(params)
319
- );
237
+ return siteAction((a) => a.nexus.getTransferShipping(params));
320
238
  }
321
239
  async function getWarehouses(params) {
322
240
  return siteAction((a) => a.vmi.getWarehouses(params));
323
241
  }
324
242
  async function getWarehouseAvailability(warehouseUid, params) {
325
- return siteAction(
326
- (a) => a.vmi.getWarehouseAvailability(warehouseUid, params)
327
- );
243
+ return siteAction((a) => a.vmi.getWarehouseAvailability(warehouseUid, params));
328
244
  }
329
245
  async function getDistributors(params) {
330
246
  return siteAction((a) => a.vmi.getDistributors(params));
@@ -366,9 +282,7 @@ async function getP21Categories(params) {
366
282
  return siteAction((a) => a.p21Apis.getCategories(params));
367
283
  }
368
284
  async function getCategoryDefaults(categoryId) {
369
- return siteAction(
370
- (a) => a.p21Apis.getCategoryDefaults(categoryId)
371
- );
285
+ return siteAction((a) => a.p21Apis.getCategoryDefaults(categoryId));
372
286
  }
373
287
  async function getP21Companies(params) {
374
288
  return siteAction((a) => a.p21Apis.getCompanies(params));
@@ -377,22 +291,16 @@ async function getUsers(params) {
377
291
  return siteAction((a) => a.p21Apis.getUsers(params));
378
292
  }
379
293
  async function getWebDisplayTypes(params) {
380
- return siteAction(
381
- (a) => a.p21Apis.getWebDisplayTypes(params)
382
- );
294
+ return siteAction((a) => a.p21Apis.getWebDisplayTypes(params));
383
295
  }
384
296
  async function getWebDisplayTypeDefaults(id) {
385
- return siteAction(
386
- (a) => a.p21Apis.getWebDisplayTypeDefaults(id)
387
- );
297
+ return siteAction((a) => a.p21Apis.getWebDisplayTypeDefaults(id));
388
298
  }
389
299
  async function refreshContacts(params) {
390
300
  return siteAction((a) => a.p21Apis.refreshContacts(params));
391
301
  }
392
302
  async function refreshCustomers(params) {
393
- return siteAction(
394
- (a) => a.p21Apis.refreshCustomers(params)
395
- );
303
+ return siteAction((a) => a.p21Apis.refreshCustomers(params));
396
304
  }
397
305
  async function getRecentImports(params) {
398
306
  return siteAction((a) => a.p21Sism.getRecentImports(params));
@@ -401,14 +309,10 @@ async function getImport(importId) {
401
309
  return siteAction((a) => a.p21Sism.getImport(importId));
402
310
  }
403
311
  async function getImportLines(importId, params) {
404
- return siteAction(
405
- (a) => a.p21Sism.getImportLines(importId, params)
406
- );
312
+ return siteAction((a) => a.p21Sism.getImportLines(importId, params));
407
313
  }
408
314
  async function getScheduledImports(params) {
409
- return siteAction(
410
- (a) => a.p21Sism.getScheduledImports(params)
411
- );
315
+ return siteAction((a) => a.p21Sism.getScheduledImports(params));
412
316
  }
413
317
  async function healthCheck() {
414
318
  return siteAction((a) => a.agrWork.healthCheck());
@@ -438,9 +342,7 @@ async function getTodo(todoId) {
438
342
  return siteAction((a) => a.basecamp2.getTodo(todoId));
439
343
  }
440
344
  async function getTodosSummary(params) {
441
- return siteAction(
442
- (a) => a.basecamp2.getTodosSummary(params)
443
- );
345
+ return siteAction((a) => a.basecamp2.getTodosSummary(params));
444
346
  }
445
347
  async function getComments(params) {
446
348
  return siteAction((a) => a.basecamp2.getComments(params));
@@ -461,19 +363,13 @@ async function getTodolists(params) {
461
363
  return siteAction((a) => a.basecamp2.getTodolists(params));
462
364
  }
463
365
  async function getBrandFolderCategories(params) {
464
- return siteAction(
465
- (a) => a.brandFolder.getCategories(params)
466
- );
366
+ return siteAction((a) => a.brandFolder.getCategories(params));
467
367
  }
468
368
  async function getCategory(categoryId) {
469
- return siteAction(
470
- (a) => a.brandFolder.getCategory(categoryId)
471
- );
369
+ return siteAction((a) => a.brandFolder.getCategory(categoryId));
472
370
  }
473
371
  async function createFocus(categoryId, data) {
474
- return siteAction(
475
- (a) => a.brandFolder.createFocus(categoryId, data)
476
- );
372
+ return siteAction((a) => a.brandFolder.createFocus(categoryId, data));
477
373
  }
478
374
  async function askChatGpt(params) {
479
375
  return siteAction((a) => a.gregorovich.askChatGpt(params));
@@ -482,14 +378,10 @@ async function getDocuments(params) {
482
378
  return siteAction((a) => a.gregorovich.getDocuments(params));
483
379
  }
484
380
  async function createDocument(data) {
485
- return siteAction(
486
- (a) => a.gregorovich.createDocument(data)
487
- );
381
+ return siteAction((a) => a.gregorovich.createDocument(data));
488
382
  }
489
383
  async function generateOllama(data) {
490
- return siteAction(
491
- (a) => a.gregorovich.generateOllama(data)
492
- );
384
+ return siteAction((a) => a.gregorovich.generateOllama(data));
493
385
  }
494
386
  async function sendWebhook(data) {
495
387
  return siteAction((a) => a.slack.sendWebhook(data));