@simpleapps-com/augur-server 2.0.9 → 2.0.11

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/EXPORTS.md ADDED
@@ -0,0 +1,303 @@
1
+ # @simpleapps-com/augur-server exports
2
+
3
+ Version: 2.0.9
4
+
5
+ > Auto-generated from built type declarations. Do not edit manually.
6
+ > Regenerate with: `pnpm run generate-exports`
7
+
8
+ ## `@simpleapps-com/augur-server`
9
+
10
+ ### Values
11
+
12
+ | Export | Kind | Description |
13
+ |--------|------|-------------|
14
+ | `ActionResult` | value | |
15
+ | `EdgeCacheValue` | value | |
16
+ | `QueryOptionsConfig` | value | |
17
+ | `SafeActionResult` | value | |
18
+ | `batchFetch` | function | Fetches data for multiple params in parallel, returning a Record keyed by |
19
+ | `cacheGet` | function | Read a cached value by key. |
20
+ | `cacheSet` | function | Write a value to cache with a TTL. Fire-and-forget semantics: no-ops |
21
+ | `createAgrInfoActions` | value | |
22
+ | `createAgrSiteActions` | value | |
23
+ | `createAgrWorkActions` | value | |
24
+ | `createAvalaraActions` | value | |
25
+ | `createBasecamp2Actions` | value | |
26
+ | `createBrandFolderActions` | value | |
27
+ | `createCommerceActions` | value | |
28
+ | `createCustomersActions` | value | |
29
+ | `createFavoritesActions` | function | |
30
+ | `createGregorovichActions` | value | |
31
+ | `createItemActions` | value | |
32
+ | `createJoomlaActions` | function | |
33
+ | `createLegacyActions` | value | |
34
+ | `createLogisticsActions` | value | |
35
+ | `createNexusActions` | value | |
36
+ | `createOrderActions` | value | |
37
+ | `createP21ApisActions` | value | |
38
+ | `createP21CoreActions` | value | |
39
+ | `createP21PimActions` | value | |
40
+ | `createP21SismActions` | value | |
41
+ | `createPaymentsActions` | value | |
42
+ | `createPricingActions` | value | |
43
+ | `createQueryOptions` | value | |
44
+ | `createSearchActions` | value | |
45
+ | `createServerQueryClient` | function | Creates a server-side query client optimised for prefetching. |
46
+ | `createShippingActions` | value | |
47
+ | `createSiteActions` | value | |
48
+ | `createSlackActions` | value | |
49
+ | `createSmartyStreetsActions` | value | |
50
+ | `createSuspenseQueryOptions` | value | |
51
+ | `createUpsActions` | value | |
52
+ | `createVmiActions` | value | |
53
+ | `createWishlistActions` | function | |
54
+ | `env` | const | Resolved environment: `"development"`, `"staging"`, or `"production"`. |
55
+ | `getCircuitState` | function | Returns the current circuit breaker state. |
56
+ | `getServerQueryClient` | const | Returns a per-request singleton QueryClient for React Server Components. |
57
+ | `getSiteActions` | function | |
58
+ | `isDev` | const | `true` when running locally (localhost / NODE_ENV=development). |
59
+ | `isProduction` | const | `true` when running on the production deployment. |
60
+ | `isRedisConnected` | function | Whether the Redis client is connected and ready to accept commands. |
61
+ | `isStaging` | const | `true` when running on the staging/dev deployment. |
62
+ | `paginateOffset` | value | |
63
+ | `registerSiteActions` | function | |
64
+ | `safeAction` | function | Wraps an async function call with error handling, returning a |
65
+ | `sdkCall` | function | Calls an Augur SDK method, forwarding all arguments with full type safety. |
66
+ | `unwrap` | value | |
67
+ | `unwrapOr` | value | |
68
+ | `verifyRecaptcha` | function | Server-side Google reCAPTCHA v3 verification. |
69
+ | `withServerCache` | function | Server-side cache wrapper using augur-server's Redis client. |
70
+
71
+ ### Types
72
+
73
+ `AddressValidationResult`, `AgrInfoActions`, `AgrInfoActionsConfig`, `AgrInfoApiClient`, `AgrSiteActions`, `AgrSiteActionsConfig`, `AgrSiteApiClient`, `AgrWorkActions`, `AgrWorkActionsConfig`, `AgrWorkApiClient`, `AvalaraActions`, `AvalaraActionsConfig`, `AvalaraApiClient`, `Basecamp2Actions`, `Basecamp2ActionsConfig`, `Basecamp2ApiClient`, `BrandFolderActions`, `BrandFolderActionsConfig`, `BrandFolderApiClient`, `CommerceActions`, `CommerceActionsConfig`, `CommerceApiClient`, `CustomerListResult`, `CustomersActions`, `CustomersActionsConfig`, `CustomersApiClient`, `FavoritesActions`, `FavoritesActionsConfig`, `FavoritesApiClient`, `GetItemCategoryOptions`, `GregorovichActions`, `GregorovichActionsConfig`, `GregorovichApiClient`, `ItemActions`, `ItemActionsConfig`, `ItemsApiClient`, `JoomlaActions`, `JoomlaActionsConfig`, `JoomlaApiClient`, `LegacyActions`, `LegacyActionsConfig`, `LegacyApiClient`, `LogisticsActions`, `LogisticsActionsConfig`, `LogisticsApiClient`, `NexusActions`, `NexusActionsConfig`, `NexusApiClient`, `NormalizedUserProfile`, `OrderActions`, `OrderActionsConfig`, `OrderApiClient`, `P21ApisActions`, `P21ApisActionsConfig`, `P21ApisApiClient`, `P21CoreActions`, `P21CoreActionsConfig`, `P21CoreApiClient`, `P21PimActions`, `P21PimActionsConfig`, `P21PimApiClient`, `P21SismActions`, `P21SismActionsConfig`, `P21SismApiClient`, `PaginatedResult`, `PaymentsActions`, `PaymentsApiClient`, `PricingActions`, `PricingActionsConfig`, `PricingApiClient`, `SafeData`, `SearchActions`, `SearchActionsConfig`, `SearchApiClient`, `SearchPage`, `ShippingActions`, `ShippingActionsConfig`, `ShippingAddress`, `ShippingApiClient`, `SiteActions`, `SiteActionsConfig`, `SlackActions`, `SlackActionsConfig`, `SlackApiClient`, `SmartyStreetsActions`, `SmartyStreetsActionsConfig`, `SmartyStreetsApiClient`, `UpsActions`, `UpsActionsConfig`, `UpsApiClient`, `VmiActions`, `VmiActionsConfig`, `VmiApiClient`, `WishlistActions`, `WishlistActionsConfig`, `WishlistsApiClient`
74
+
75
+ ```ts
76
+ import { ActionResult, EdgeCacheValue, QueryOptionsConfig } from "@simpleapps-com/augur-server";
77
+ ```
78
+
79
+ ## `@simpleapps-com/augur-server/auth`
80
+
81
+ ### Values
82
+
83
+ | Export | Kind | Description |
84
+ |--------|------|-------------|
85
+ | `createAuthConfig` | function | |
86
+
87
+ ### Types
88
+
89
+ `AugurAuthCallbacks`, `AugurAuthClient`, `AugurJWT`, `AugurSession`, `AugurUser`, `CreateAuthConfigOptions`
90
+
91
+ ```ts
92
+ import { createAuthConfig } from "@simpleapps-com/augur-server/auth";
93
+ ```
94
+
95
+ ## `@simpleapps-com/augur-server/query`
96
+
97
+ ### Values
98
+
99
+ | Export | Kind | Description |
100
+ |--------|------|-------------|
101
+ | `createQueryOptions` | const | Creates useQuery options with consistent key generation. |
102
+ | `createSuspenseQueryOptions` | const | Creates useSuspenseQuery options with consistent key generation. |
103
+
104
+ ### Types
105
+
106
+ `QueryOptionsConfig`
107
+
108
+ ```ts
109
+ import { createQueryOptions, createSuspenseQueryOptions } from "@simpleapps-com/augur-server/query";
110
+ ```
111
+
112
+ ## `@simpleapps-com/augur-server/prefetch`
113
+
114
+ ### Values
115
+
116
+ | Export | Kind | Description |
117
+ |--------|------|-------------|
118
+ | `CacheConfig` | value | |
119
+ | `createPrefetchUtilities` | function | Creates SSR prefetch utilities that pre-populate the React Query cache |
120
+
121
+ ### Types
122
+
123
+ `PrefetchConfig`, `PrefetchItemCategoryApiOptions`, `PrefetchUtilities`
124
+
125
+ ```ts
126
+ import { CacheConfig, createPrefetchUtilities } from "@simpleapps-com/augur-server/prefetch";
127
+ ```
128
+
129
+ ## `@simpleapps-com/augur-server/testing`
130
+
131
+ ### Values
132
+
133
+ | Export | Kind | Description |
134
+ |--------|------|-------------|
135
+ | `DeepMockClient` | value | |
136
+ | `MockClientResult` | value | |
137
+ | `clearSiteActions` | function | |
138
+ | `createMockClient` | value | |
139
+ | `createMockSiteActions` | function | Creates a fully-mocked SiteActions object for testing. |
140
+
141
+ ### Types
142
+
143
+ `MockFn`, `MockSiteActions`, `MockSiteActionsResult`
144
+
145
+ ```ts
146
+ import { DeepMockClient, MockClientResult, clearSiteActions } from "@simpleapps-com/augur-server/testing";
147
+ ```
148
+
149
+ ## `@simpleapps-com/augur-server/site`
150
+
151
+ ### Values
152
+
153
+ | Export | Kind | Description |
154
+ |--------|------|-------------|
155
+ | `createServerSite` | function | Create a server-side site instance that bundles the SDK client, server |
156
+
157
+ ### Types
158
+
159
+ `ServerSite`, `ServerSiteAuthConfig`, `ServerSiteConfig`
160
+
161
+ ```ts
162
+ import { createServerSite } from "@simpleapps-com/augur-server/site";
163
+ ```
164
+
165
+ ## `@simpleapps-com/augur-server/actions`
166
+
167
+ ### Values
168
+
169
+ | Export | Kind | Description |
170
+ |--------|------|-------------|
171
+ | `ApiResult` | value | |
172
+ | `ListResult` | value | |
173
+ | `SafeActionResult` | value | |
174
+ | `accountQuery` | function | |
175
+ | `addToCart` | function | |
176
+ | `askChatGpt` | function | |
177
+ | `batchGetInvMastDocs` | function | |
178
+ | `batchGetItemPrices` | function | |
179
+ | `batchGetStockData` | function | |
180
+ | `billingUpdate` | function | |
181
+ | `calculateTax` | function | |
182
+ | `cardInfo` | function | |
183
+ | `cartHdrLookup` | function | |
184
+ | `checkoutOrder` | function | |
185
+ | `createBinTransfer` | function | |
186
+ | `createDocument` | function | |
187
+ | `createFocus` | function | |
188
+ | `createReceiving` | function | |
189
+ | `createTransfer` | function | |
190
+ | `customerLookup` | function | |
191
+ | `deleteCartItems` | function | |
192
+ | `generateAkasha` | function | |
193
+ | `generateJoomla` | function | |
194
+ | `generateOllama` | function | |
195
+ | `getAddresses` | function | |
196
+ | `getAlsoBoughtItems` | function | |
197
+ | `getBrandFolderCategories` | function | |
198
+ | `getCartAlsoBought` | function | |
199
+ | `getCartLines` | function | |
200
+ | `getCashDrawers` | function | |
201
+ | `getCategory` | function | |
202
+ | `getCategoryDefaults` | function | |
203
+ | `getCategoryItems` | function | |
204
+ | `getCategoryItemsInfinite` | function | |
205
+ | `getCodeP21` | function | |
206
+ | `getComments` | function | |
207
+ | `getCompanies` | function | |
208
+ | `getCompany` | function | |
209
+ | `getContacts` | function | |
210
+ | `getContext` | function | |
211
+ | `getCustomer` | function | |
212
+ | `getCustomerDoc` | function | |
213
+ | `getCustomerInvoiceDetail` | function | |
214
+ | `getCustomerInvoices` | function | |
215
+ | `getCustomerOrderDetail` | function | |
216
+ | `getCustomerOrders` | function | |
217
+ | `getCustomerQuoteDetail` | function | |
218
+ | `getCustomerQuotes` | function | |
219
+ | `getDistributors` | function | |
220
+ | `getDocuments` | function | |
221
+ | `getEvents` | function | |
222
+ | `getFreightRates` | function | |
223
+ | `getImport` | function | |
224
+ | `getImportLines` | function | |
225
+ | `getInvMast` | function | |
226
+ | `getInvMastDoc` | function | |
227
+ | `getInvMastExt` | function | |
228
+ | `getInventoryProfiles` | function | |
229
+ | `getItemAccessories` | function | |
230
+ | `getItemAttributes` | function | |
231
+ | `getItemCategory` | function | |
232
+ | `getItemFaqs` | function | |
233
+ | `getItemPrice` | function | |
234
+ | `getItemSubstitutes` | function | |
235
+ | `getItemTags` | function | |
236
+ | `getItemWebDesc` | function | |
237
+ | `getJoomlaContent` | function | |
238
+ | `getJoomlaContentList` | function | |
239
+ | `getJoomlaMenu` | function | |
240
+ | `getJoomlaMenuDoc` | function | |
241
+ | `getLocations` | function | |
242
+ | `getMetaFiles` | function | |
243
+ | `getMetrics` | function | |
244
+ | `getMicroservices` | function | |
245
+ | `getOrderDoc` | function | |
246
+ | `getP21Categories` | function | |
247
+ | `getP21Companies` | function | |
248
+ | `getPaymentTypes` | function | |
249
+ | `getPeople` | function | |
250
+ | `getProducts` | function | |
251
+ | `getProjects` | function | |
252
+ | `getPurchaseOrderReceipts` | function | |
253
+ | `getRates` | function | |
254
+ | `getRecentImports` | function | |
255
+ | `getRestockHeaders` | function | |
256
+ | `getRubrics` | function | |
257
+ | `getScheduledImports` | function | |
258
+ | `getSearchAttributes` | function | |
259
+ | `getSearchSuggestions` | function | |
260
+ | `getSections` | function | |
261
+ | `getSettings` | function | |
262
+ | `getShipToAddresses` | function | |
263
+ | `getShipVia` | function | |
264
+ | `getShippingRates` | function | |
265
+ | `getSimilarItems` | function | |
266
+ | `getStates` | function | |
267
+ | `getStock` | function | |
268
+ | `getStockCompanySummary` | function | |
269
+ | `getSurcharge` | function | |
270
+ | `getTaxEstimate` | function | |
271
+ | `getTodo` | function | |
272
+ | `getTodolists` | function | |
273
+ | `getTodos` | function | |
274
+ | `getTodosSummary` | function | |
275
+ | `getTransferReceipts` | function | |
276
+ | `getTransferShipping` | function | |
277
+ | `getUserProfile` | function | |
278
+ | `getUsers` | function | |
279
+ | `getWarehouseAvailability` | function | |
280
+ | `getWarehouses` | function | |
281
+ | `getWebDisplayTypeDefaults` | function | |
282
+ | `getWebDisplayTypes` | function | |
283
+ | `getWebhooks` | function | |
284
+ | `healthCheck` | function | |
285
+ | `itemCategoryLookup` | function | |
286
+ | `itemSearch` | function | |
287
+ | `itemSearchInfinite` | function | |
288
+ | `listInvMastExt` | function | |
289
+ | `ping` | function | |
290
+ | `refreshContacts` | function | |
291
+ | `refreshCustomers` | function | |
292
+ | `sendWebhook` | function | |
293
+ | `transactionSetup` | function | |
294
+ | `updateCartLines` | function | |
295
+ | `validateAddress` | function | |
296
+ | `validatePayment` | function | |
297
+ | `verifyPassword` | function | |
298
+
299
+ ```ts
300
+ import { ApiResult, ListResult, SafeActionResult } from "@simpleapps-com/augur-server/actions";
301
+ ```
302
+
303
+ ## `@simpleapps-com/augur-server/next-auth`
package/dist/actions.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getSiteActions,
4
4
  safeAction
5
- } from "./chunk-L25NLWJU.js";
5
+ } from "./chunk-XW5ITWCZ.js";
6
6
  import "./chunk-XGRQ53P2.js";
7
7
  import "./chunk-DGUM43GV.js";
8
8
 
@@ -1347,7 +1347,14 @@ function createPaymentsActions(api, config = {}) {
1347
1347
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1348
1348
  await api.payments.unified.validate.get(withMode(params))
1349
1349
  );
1350
- return response.data;
1350
+ const raw = response.data;
1351
+ if (typeof raw === "boolean") {
1352
+ return { valid: raw };
1353
+ }
1354
+ if (typeof raw === "object" && raw !== null && "valid" in raw) {
1355
+ return raw;
1356
+ }
1357
+ return { valid: Boolean(raw) };
1351
1358
  } catch {
1352
1359
  return void 0;
1353
1360
  }
@@ -2643,4 +2650,4 @@ export {
2643
2650
  getSiteActions,
2644
2651
  clearSiteActions
2645
2652
  };
2646
- //# sourceMappingURL=chunk-L25NLWJU.js.map
2653
+ //# sourceMappingURL=chunk-XW5ITWCZ.js.map