@simpleapps-com/augur-server 0.2.12 → 0.2.13
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/index.d.ts +34 -2
- package/dist/index.js +45 -13
- package/dist/index.js.map +1 -1
- package/dist/{site-CZvrFj_i.d.ts → site-DibGofHe.d.ts} +24 -4
- package/dist/testing.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TPriceData, TTaxItem, TTax, TCategory, TAttribute, TInvMast, TInvMastDoc, TStockData, TItemAccessory, TStock, TCartLookUp, TCartLine, TProductItem, TWebDesc } from '@simpleapps-com/augur-utils';
|
|
1
|
+
import { TPriceData, TTaxItem, TTax, TCategory, TAttribute, TInvMast, TInvMastDoc, TStockData, TItemAccessory, TStock, TCartLookUp, TCartLine, TProductItem, TWebDesc, TSmartyStreets } from '@simpleapps-com/augur-utils';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The subset of augur-api used by pricing actions.
|
|
@@ -137,6 +137,8 @@ interface ItemActionsConfig {
|
|
|
137
137
|
longRedisTtl?: number;
|
|
138
138
|
/** Sort category children by sequenceNo. Default: true. */
|
|
139
139
|
sortChildren?: boolean;
|
|
140
|
+
/** Prefix prepended to sortBy filter values (e.g. "item_category_sequence_no_min|"). */
|
|
141
|
+
sortByPrefix?: string;
|
|
140
142
|
}
|
|
141
143
|
interface ItemActions {
|
|
142
144
|
itemCategoryLookup: (path: string) => Promise<unknown>;
|
|
@@ -685,7 +687,7 @@ interface SmartyStreetsApiClient {
|
|
|
685
687
|
us: {
|
|
686
688
|
lookup: {
|
|
687
689
|
get: (params: Record<string, unknown>) => Promise<{
|
|
688
|
-
data:
|
|
690
|
+
data: TSmartyStreets | undefined;
|
|
689
691
|
}>;
|
|
690
692
|
};
|
|
691
693
|
};
|
|
@@ -695,8 +697,16 @@ interface SmartyStreetsActionsConfig {
|
|
|
695
697
|
/** Cache key prefix (e.g. "ampro:"). Default: "". */
|
|
696
698
|
cachePrefix?: string;
|
|
697
699
|
}
|
|
700
|
+
/** Standardized response from address validation. */
|
|
701
|
+
interface AddressValidationResult {
|
|
702
|
+
data: TSmartyStreets | undefined;
|
|
703
|
+
status: "success" | "not_found" | "error";
|
|
704
|
+
error?: {
|
|
705
|
+
message: string;
|
|
706
|
+
};
|
|
707
|
+
}
|
|
698
708
|
interface SmartyStreetsActions {
|
|
699
|
-
validateAddress: (params: Record<string, unknown>) => Promise<
|
|
709
|
+
validateAddress: (params: Record<string, unknown>) => Promise<AddressValidationResult>;
|
|
700
710
|
}
|
|
701
711
|
/**
|
|
702
712
|
* Creates server-side SmartyStreets actions for address validation.
|
|
@@ -717,6 +727,9 @@ interface SmartyStreetsActions {
|
|
|
717
727
|
* state: "UT",
|
|
718
728
|
* postalCode: "84606",
|
|
719
729
|
* });
|
|
730
|
+
* if (result.status === "success") {
|
|
731
|
+
* console.log(result.data); // TSmartyStreets
|
|
732
|
+
* }
|
|
720
733
|
* ```
|
|
721
734
|
*/
|
|
722
735
|
declare function createSmartyStreetsActions(api: SmartyStreetsApiClient, config?: SmartyStreetsActionsConfig): SmartyStreetsActions;
|
|
@@ -915,6 +928,8 @@ interface PaymentsApiClient {
|
|
|
915
928
|
interface PaymentsActionsConfig {
|
|
916
929
|
/** Cache key prefix (e.g. "ampro:"). Default: "". */
|
|
917
930
|
cachePrefix?: string;
|
|
931
|
+
/** Payment environment mode. Default: "live". */
|
|
932
|
+
mode?: string;
|
|
918
933
|
}
|
|
919
934
|
interface PaymentsActions {
|
|
920
935
|
transactionSetup: (params: Record<string, unknown>) => Promise<unknown>;
|
|
@@ -1851,11 +1866,16 @@ interface SiteActionsConfig {
|
|
|
1851
1866
|
/** Items-specific overrides */
|
|
1852
1867
|
items?: {
|
|
1853
1868
|
sortChildren?: boolean;
|
|
1869
|
+
sortByPrefix?: string;
|
|
1854
1870
|
};
|
|
1855
1871
|
/** Search-specific overrides */
|
|
1856
1872
|
search?: {
|
|
1857
1873
|
defaultSourceFields?: string;
|
|
1858
1874
|
};
|
|
1875
|
+
/** Payments-specific overrides */
|
|
1876
|
+
payments?: {
|
|
1877
|
+
mode?: string;
|
|
1878
|
+
};
|
|
1859
1879
|
/** Shipping config — fromAddress is required for shipping to work */
|
|
1860
1880
|
shipping?: {
|
|
1861
1881
|
fromAddress: ShippingAddress;
|
|
@@ -1927,4 +1947,4 @@ interface SiteActions {
|
|
|
1927
1947
|
*/
|
|
1928
1948
|
declare function createSiteActions<TApi extends object>(api: TApi, config?: SiteActionsConfig): SiteActions;
|
|
1929
1949
|
|
|
1930
|
-
export { type
|
|
1950
|
+
export { type P21PimActionsConfig as $, type AddressValidationResult as A, type Basecamp2Actions as B, type CommerceActions as C, type JoomlaActionsConfig as D, type JoomlaApiClient as E, type LegacyActionsConfig as F, type GregorovichActions as G, type LegacyApiClient as H, type ItemActions as I, type JoomlaActions as J, type LogisticsActions as K, type LegacyActions as L, type LogisticsActionsConfig as M, type LogisticsApiClient as N, type NexusActions as O, type NexusActionsConfig as P, type NexusApiClient as Q, type OrderActions as R, type OrderActionsConfig as S, type OrderApiClient as T, type P21ApisActions as U, type P21ApisActionsConfig as V, type P21ApisApiClient as W, type P21CoreActions as X, type P21CoreActionsConfig as Y, type P21CoreApiClient as Z, type P21PimActions as _, type AgrInfoActions as a, type P21PimApiClient as a0, type P21SismActions as a1, type P21SismActionsConfig as a2, type P21SismApiClient as a3, type PaymentsActions as a4, type PaymentsActionsConfig as a5, type PaymentsApiClient as a6, type PricingActions as a7, type PricingActionsConfig as a8, type PricingApiClient as a9, createBasecamp2Actions as aA, createBrandFolderActions as aB, createCommerceActions as aC, createCustomersActions as aD, createGregorovichActions as aE, createItemActions as aF, createJoomlaActions as aG, createLegacyActions as aH, createLogisticsActions as aI, createNexusActions as aJ, createOrderActions as aK, createP21ApisActions as aL, createP21CoreActions as aM, createP21PimActions as aN, createP21SismActions as aO, createPaymentsActions as aP, createPricingActions as aQ, createSearchActions as aR, createShippingActions as aS, createSiteActions as aT, createSlackActions as aU, createSmartyStreetsActions as aV, createUpsActions as aW, createVmiActions as aX, type SearchActions as aa, type SearchActionsConfig as ab, type SearchApiClient as ac, type SearchPage as ad, type ShippingActions as ae, type ShippingActionsConfig as af, type ShippingAddress as ag, type ShippingApiClient as ah, type SiteActions as ai, type SiteActionsConfig as aj, type SlackActions as ak, type SlackActionsConfig as al, type SlackApiClient as am, type SmartyStreetsActions as an, type SmartyStreetsActionsConfig as ao, type SmartyStreetsApiClient as ap, type UpsActions as aq, type UpsActionsConfig as ar, type UpsApiClient as as, type VmiActions as at, type VmiActionsConfig as au, type VmiApiClient as av, createAgrInfoActions as aw, createAgrSiteActions as ax, createAgrWorkActions as ay, createAvalaraActions as az, type AgrInfoActionsConfig as b, type AgrInfoApiClient as c, type AgrSiteActions as d, type AgrSiteActionsConfig as e, type AgrSiteApiClient as f, type AgrWorkActions as g, type AgrWorkActionsConfig as h, type AgrWorkApiClient as i, type AvalaraActions as j, type AvalaraActionsConfig as k, type AvalaraApiClient as l, type Basecamp2ActionsConfig as m, type Basecamp2ApiClient as n, type BrandFolderActions as o, type BrandFolderActionsConfig as p, type BrandFolderApiClient as q, type CommerceActionsConfig as r, type CommerceApiClient as s, type CustomersActions as t, type CustomersActionsConfig as u, type CustomersApiClient as v, type GregorovichActionsConfig as w, type GregorovichApiClient as x, type ItemActionsConfig as y, type ItemsApiClient as z };
|
package/dist/testing.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleapps-com/augur-server",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"description": "Server-side utilities for Augur ecommerce sites (Redis caching, SDK helpers, auth)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"valibot": "^1.0.0",
|
|
44
|
-
"@simpleapps-com/augur-utils": "0.2.
|
|
44
|
+
"@simpleapps-com/augur-utils": "0.2.13"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@simpleapps-com/augur-api": "^0.9.6",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"next": ">=16.0.0",
|
|
51
51
|
"next-auth": "5.0.0-beta.30",
|
|
52
52
|
"react": "^19.0.0",
|
|
53
|
-
"@simpleapps-com/augur-hooks": "0.2.
|
|
53
|
+
"@simpleapps-com/augur-hooks": "0.2.13"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"ioredis": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"tsup": "^8.5.0",
|
|
74
74
|
"vitest": "^3.2.0",
|
|
75
75
|
"@augur-packages/tsconfig": "0.0.0",
|
|
76
|
-
"@simpleapps-com/augur-hooks": "0.2.
|
|
76
|
+
"@simpleapps-com/augur-hooks": "0.2.13"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"build": "tsup",
|