@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.
@@ -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: unknown;
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<unknown>;
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 P21PimApiClient as $, type AgrInfoActions as A, type Basecamp2Actions as B, type CommerceActions as C, type JoomlaApiClient as D, type LegacyActionsConfig as E, type LegacyApiClient as F, type GregorovichActions as G, type LogisticsActions as H, type ItemActions as I, type JoomlaActions as J, type LogisticsActionsConfig as K, type LegacyActions as L, type LogisticsApiClient as M, type NexusActions as N, type NexusActionsConfig as O, type NexusApiClient as P, type OrderActions as Q, type OrderActionsConfig as R, type OrderApiClient as S, type P21ApisActions as T, type P21ApisActionsConfig as U, type P21ApisApiClient as V, type P21CoreActions as W, type P21CoreActionsConfig as X, type P21CoreApiClient as Y, type P21PimActions as Z, type P21PimActionsConfig as _, type AgrInfoActionsConfig as a, type P21SismActions as a0, type P21SismActionsConfig as a1, type P21SismApiClient as a2, type PaymentsActions as a3, type PaymentsActionsConfig as a4, type PaymentsApiClient as a5, type PricingActions as a6, type PricingActionsConfig as a7, type PricingApiClient as a8, type SearchActions as a9, createBrandFolderActions as aA, createCommerceActions as aB, createCustomersActions as aC, createGregorovichActions as aD, createItemActions as aE, createJoomlaActions as aF, createLegacyActions as aG, createLogisticsActions as aH, createNexusActions as aI, createOrderActions as aJ, createP21ApisActions as aK, createP21CoreActions as aL, createP21PimActions as aM, createP21SismActions as aN, createPaymentsActions as aO, createPricingActions as aP, createSearchActions as aQ, createShippingActions as aR, createSiteActions as aS, createSlackActions as aT, createSmartyStreetsActions as aU, createUpsActions as aV, createVmiActions as aW, type SearchActionsConfig as aa, type SearchApiClient as ab, type SearchPage as ac, type ShippingActions as ad, type ShippingActionsConfig as ae, type ShippingAddress as af, type ShippingApiClient as ag, type SiteActions as ah, type SiteActionsConfig as ai, type SlackActions as aj, type SlackActionsConfig as ak, type SlackApiClient as al, type SmartyStreetsActions as am, type SmartyStreetsActionsConfig as an, type SmartyStreetsApiClient as ao, type UpsActions as ap, type UpsActionsConfig as aq, type UpsApiClient as ar, type VmiActions as as, type VmiActionsConfig as at, type VmiApiClient as au, createAgrInfoActions as av, createAgrSiteActions as aw, createAgrWorkActions as ax, createAvalaraActions as ay, createBasecamp2Actions as az, type AgrInfoApiClient as b, type AgrSiteActions as c, type AgrSiteActionsConfig as d, type AgrSiteApiClient as e, type AgrWorkActions as f, type AgrWorkActionsConfig as g, type AgrWorkApiClient as h, type AvalaraActions as i, type AvalaraActionsConfig as j, type AvalaraApiClient as k, type Basecamp2ActionsConfig as l, type Basecamp2ApiClient as m, type BrandFolderActions as n, type BrandFolderActionsConfig as o, type BrandFolderApiClient as p, type CommerceActionsConfig as q, type CommerceApiClient as r, type CustomersActions as s, type CustomersActionsConfig as t, type CustomersApiClient as u, type GregorovichActionsConfig as v, type GregorovichApiClient as w, type ItemActionsConfig as x, type ItemsApiClient as y, type JoomlaActionsConfig as z };
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
@@ -1,4 +1,4 @@
1
- import { ah as SiteActions } from './site-CZvrFj_i.js';
1
+ import { ai as SiteActions } from './site-DibGofHe.js';
2
2
  import '@simpleapps-com/augur-utils';
3
3
 
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleapps-com/augur-server",
3
- "version": "0.2.12",
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.12"
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.12"
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.12"
76
+ "@simpleapps-com/augur-hooks": "0.2.13"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "tsup",