@simpleapps-com/augur-utils 2.3.1 → 2026.11.1

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 (114) hide show
  1. package/EXPORTS.md +24 -31
  2. package/README.md +19 -180
  3. package/dist/address-comparison.d.ts +18 -0
  4. package/dist/address-comparison.d.ts.map +1 -0
  5. package/dist/address-schemas.d.ts +45 -0
  6. package/dist/address-schemas.d.ts.map +1 -0
  7. package/dist/analytics.d.ts +66 -0
  8. package/dist/analytics.d.ts.map +1 -0
  9. package/dist/build-checkout-payload.d.ts +37 -0
  10. package/dist/build-checkout-payload.d.ts.map +1 -0
  11. package/dist/cache-config.d.ts +42 -0
  12. package/dist/cache-config.d.ts.map +1 -0
  13. package/dist/chunk-5UMFBGVA.cjs.map +1 -1
  14. package/dist/date-helpers.d.ts +16 -0
  15. package/dist/date-helpers.d.ts.map +1 -0
  16. package/dist/derive-price.d.ts +49 -0
  17. package/dist/derive-price.d.ts.map +1 -0
  18. package/dist/format-price.d.ts +6 -0
  19. package/dist/format-price.d.ts.map +1 -0
  20. package/dist/get-payment-status.d.ts +10 -0
  21. package/dist/get-payment-status.d.ts.map +1 -0
  22. package/dist/image-rules.d.ts +70 -0
  23. package/dist/image-rules.d.ts.map +1 -0
  24. package/dist/image.d.ts +80 -0
  25. package/dist/image.d.ts.map +1 -0
  26. package/dist/index.cjs +385 -171
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.ts +63 -1409
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +374 -160
  31. package/dist/index.js.map +1 -1
  32. package/dist/json-ld-rules.d.ts +50 -0
  33. package/dist/json-ld-rules.d.ts.map +1 -0
  34. package/dist/json-ld.d.ts +34 -0
  35. package/dist/json-ld.d.ts.map +1 -0
  36. package/dist/money.d.ts +37 -0
  37. package/dist/money.d.ts.map +1 -0
  38. package/dist/price-breaks.d.ts +16 -0
  39. package/dist/price-breaks.d.ts.map +1 -0
  40. package/dist/price-outcome.d.ts +19 -0
  41. package/dist/price-outcome.d.ts.map +1 -0
  42. package/dist/resolve-stock.d.ts +22 -0
  43. package/dist/resolve-stock.d.ts.map +1 -0
  44. package/dist/result.d.ts +33 -0
  45. package/dist/result.d.ts.map +1 -0
  46. package/dist/rules.d.ts +45 -0
  47. package/dist/rules.d.ts.map +1 -0
  48. package/dist/schema-availability.d.ts +11 -0
  49. package/dist/schema-availability.d.ts.map +1 -0
  50. package/dist/transform-ship-to-address.d.ts +15 -0
  51. package/dist/transform-ship-to-address.d.ts.map +1 -0
  52. package/dist/transforms.d.ts +70 -0
  53. package/dist/transforms.d.ts.map +1 -0
  54. package/dist/types/api.d.ts +8 -0
  55. package/dist/types/api.d.ts.map +1 -0
  56. package/dist/types/attribute.d.ts +12 -0
  57. package/dist/types/attribute.d.ts.map +1 -0
  58. package/dist/types/cart.d.ts +25 -0
  59. package/dist/types/cart.d.ts.map +1 -0
  60. package/dist/types/category-items.d.ts +4 -0
  61. package/dist/types/category-items.d.ts.map +1 -0
  62. package/dist/types/category.d.ts +19 -0
  63. package/dist/types/category.d.ts.map +1 -0
  64. package/dist/types/checkout.d.ts +4 -0
  65. package/dist/types/checkout.d.ts.map +1 -0
  66. package/dist/types/customer.d.ts +4 -0
  67. package/dist/types/customer.d.ts.map +1 -0
  68. package/dist/types/filter.d.ts +9 -0
  69. package/dist/types/filter.d.ts.map +1 -0
  70. package/dist/types/inventory.d.ts +10 -0
  71. package/dist/types/inventory.d.ts.map +1 -0
  72. package/dist/types/joomla.d.ts +11 -0
  73. package/dist/types/joomla.d.ts.map +1 -0
  74. package/dist/types/ltl-shipping.d.ts +45 -0
  75. package/dist/types/ltl-shipping.d.ts.map +1 -0
  76. package/dist/types/menu.d.ts +14 -0
  77. package/dist/types/menu.d.ts.map +1 -0
  78. package/dist/types/meta.d.ts +11 -0
  79. package/dist/types/meta.d.ts.map +1 -0
  80. package/dist/types/order.d.ts +72 -0
  81. package/dist/types/order.d.ts.map +1 -0
  82. package/dist/types/password.d.ts +7 -0
  83. package/dist/types/password.d.ts.map +1 -0
  84. package/dist/types/payment.d.ts +69 -0
  85. package/dist/types/payment.d.ts.map +1 -0
  86. package/dist/types/pricing.d.ts +25 -0
  87. package/dist/types/pricing.d.ts.map +1 -0
  88. package/dist/types/product.d.ts +58 -0
  89. package/dist/types/product.d.ts.map +1 -0
  90. package/dist/types/search.d.ts +16 -0
  91. package/dist/types/search.d.ts.map +1 -0
  92. package/dist/types/shipping.d.ts +4 -0
  93. package/dist/types/shipping.d.ts.map +1 -0
  94. package/dist/types/smarty-streets.d.ts +4 -0
  95. package/dist/types/smarty-streets.d.ts.map +1 -0
  96. package/dist/types/supplier.d.ts +4 -0
  97. package/dist/types/supplier.d.ts.map +1 -0
  98. package/dist/types/tax.d.ts +6 -0
  99. package/dist/types/tax.d.ts.map +1 -0
  100. package/dist/types/uom.d.ts +4 -0
  101. package/dist/types/uom.d.ts.map +1 -0
  102. package/dist/types/user-profile.d.ts +5 -0
  103. package/dist/types/user-profile.d.ts.map +1 -0
  104. package/dist/us-states.d.ts +15 -0
  105. package/dist/us-states.d.ts.map +1 -0
  106. package/dist/validation-patterns.d.ts +22 -0
  107. package/dist/validation-patterns.d.ts.map +1 -0
  108. package/dist/web.cjs.map +1 -1
  109. package/dist/web.d.ts +3 -5
  110. package/dist/web.d.ts.map +1 -0
  111. package/llms.txt +44 -38
  112. package/package.json +25 -13
  113. package/dist/index.d.cts +0 -1409
  114. package/dist/web.d.cts +0 -6
@@ -0,0 +1,72 @@
1
+ export type OrderHeader = {
2
+ carrier_id: string;
3
+ carrier_name: string;
4
+ contact_id: string;
5
+ customer_id: string;
6
+ company_id: string;
7
+ user_id: string;
8
+ user_email: string;
9
+ quote: "Y" | "N";
10
+ import_as_quote: "Y" | "N";
11
+ ip_address: string;
12
+ order_source: string;
13
+ web_source: string;
14
+ class_id1: string | null;
15
+ class_id2: string | null;
16
+ class_id3: string | null;
17
+ class_id4: string | null;
18
+ class_id5: string | null;
19
+ generate_po_number: number;
20
+ is_sample: string;
21
+ order_date: string;
22
+ customer_po_number: string;
23
+ ship_to_name: string;
24
+ ship_to_address1: string;
25
+ ship_to_address2: string;
26
+ ship_to_city: string;
27
+ ship_to_state: string;
28
+ ship_to_country: string;
29
+ ship_to_postal_code: string;
30
+ ship_to_address3: string | null;
31
+ ship_to_companyname: string;
32
+ ship_to_phone: string;
33
+ ship_to_email: string;
34
+ terms: string | null;
35
+ packing_basis: string | null;
36
+ delivery_instructions: string | null;
37
+ cart_tax: {
38
+ tax_amount: number;
39
+ tax_amount_string: string;
40
+ };
41
+ shipping_estimate: number;
42
+ incoming_freight: number;
43
+ handling_fee: number;
44
+ manager_approval_needed: number;
45
+ };
46
+ export type OrderLine = {
47
+ item_id: string;
48
+ item_name: string;
49
+ currency: string;
50
+ index: number;
51
+ item_category: string;
52
+ price: number;
53
+ quantity: number;
54
+ displayDesc: string;
55
+ };
56
+ export type OrderPayment = {
57
+ first_name: string;
58
+ last_name: string;
59
+ street_address1: string;
60
+ street_address2: string;
61
+ city: string;
62
+ state: string;
63
+ zip_code: string;
64
+ country: string;
65
+ processor: "invoice" | "element";
66
+ paymentType: "unified" | "invoice";
67
+ };
68
+ export type OrderNote = {
69
+ note: string;
70
+ note_areas: string[];
71
+ };
72
+ //# sourceMappingURL=order.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order.d.ts","sourceRoot":"","sources":["../../src/types/order.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,eAAe,EAAE,GAAG,GAAG,GAAG,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;QACnB,iBAAiB,EAAE,MAAM,CAAC;KAC3B,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { JoomlaTypes } from "@simpleapps-com/augur-api";
2
+ /**
3
+ * Result of `joomla.users.verifyPassword.create`. Aliases the augur-api SDK
4
+ * type. Check `isVerified`.
5
+ */
6
+ export type TPasswordVerification = JoomlaTypes.UsersVerifyPasswordCreateData;
7
+ //# sourceMappingURL=password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/types/password.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC,6BAA6B,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { PaymentsTypes } from "@simpleapps-com/augur-api";
2
+ /** Transaction setup from `payments.unified.transactionSetup.list`. Aliases the augur-api SDK type. */
3
+ export type TTransactionSetup = PaymentsTypes.UnifiedTransactionSetupListData;
4
+ export type TAccountQuery = {
5
+ PaymentAccountID: string;
6
+ TransactionSetupID?: string;
7
+ ExpressResponseCode?: string;
8
+ ExpressResponseMessage?: string;
9
+ ValidationCode?: string;
10
+ TruncatedCardNumber?: string;
11
+ ExpirationMonth?: string;
12
+ ExpirationYear?: string;
13
+ PaymentBrand?: string;
14
+ Bin?: string;
15
+ };
16
+ export type TCardInfo = {
17
+ cardNumber?: string;
18
+ expMonth?: string;
19
+ expYear?: string;
20
+ transactionSetupId?: string;
21
+ };
22
+ /**
23
+ * Response shape of the payments MS `GET /unified/surcharge` endpoint.
24
+ *
25
+ * All values arrive as strings (the API does not coerce). Consumers MUST parse:
26
+ * numeric fields via `Number(...)` (then round monetary results), and boolean
27
+ * fields by comparing to `"true"` (non-empty `"false"` is truthy in JS).
28
+ */
29
+ export type TSurcharge = {
30
+ /** SDK express response code, e.g. "0" for success. */
31
+ expressResponseCode: string;
32
+ /** Overall success flag as a string: "true" | "false". */
33
+ success: string;
34
+ /** Whether a surcharge applies, as a string: "true" | "false". */
35
+ surchargeAllowed: string;
36
+ /** Surcharge rate as a decimal fraction string, e.g. "0.03" = 3%. */
37
+ surchargePercent: string;
38
+ /** Total surcharge amount as a money string, e.g. "62". Parse with Number(). */
39
+ lumpSumTotalSurchargeAmount: string;
40
+ /** Human-readable surcharge description, e.g. "National". */
41
+ surchargeDescription: string;
42
+ /** Status message, e.g. "Surcharge returned". */
43
+ message: string;
44
+ };
45
+ /** Result of `payments.unified.billingUpdate.list` (boolean). Aliases the augur-api SDK type. */
46
+ export type TBillingUpdate = PaymentsTypes.UnifiedBillingUpdateListData;
47
+ /** Result of `payments.unified.validate.list` (boolean). Aliases the augur-api SDK type. */
48
+ export type TPaymentValidation = PaymentsTypes.UnifiedValidateListData;
49
+ export type CheckoutPayment = {
50
+ first_name: string;
51
+ last_name: string;
52
+ street_address1: string;
53
+ street_address2: string;
54
+ city: string;
55
+ state: string;
56
+ zip_code: string;
57
+ country: string;
58
+ processor: "invoice" | "element";
59
+ paymentType: "unified" | "invoice";
60
+ TransactionSetupID?: string;
61
+ PaymentAccountID?: string;
62
+ LastFour?: string;
63
+ ValidationCode?: string;
64
+ ExpirationMonth?: string;
65
+ ExpirationYear?: string;
66
+ PaymentBrand?: string;
67
+ Bin?: string;
68
+ };
69
+ //# sourceMappingURL=payment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/types/payment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,uGAAuG;AACvG,MAAM,MAAM,iBAAiB,GAAG,aAAa,CAAC,+BAA+B,CAAC;AAE9E,MAAM,MAAM,aAAa,GAAG;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,uDAAuD;IACvD,mBAAmB,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,gBAAgB,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,gBAAgB,EAAE,MAAM,CAAC;IACzB,gFAAgF;IAChF,2BAA2B,EAAE,MAAM,CAAC;IACpC,6DAA6D;IAC7D,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,iGAAiG;AACjG,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC,4BAA4B,CAAC;AAExE,4FAA4F;AAC5F,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,uBAAuB,CAAC;AAEvE,MAAM,MAAM,eAAe,GAAG;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { PricingTypes } from "@simpleapps-com/augur-api";
2
+ /**
3
+ * One quantity break tier of a price page, as returned by `pricing.priceEngine.list`.
4
+ * Aliases the augur-api SDK type, which is generated from the pricing service's
5
+ * openapi.json. Tiers arrive lowest quantity first; the last tier has
6
+ * `break: null` and `endQuantity: null` (open-ended). `unitPrice` is `false`
7
+ * when the tier could not be calculated.
8
+ */
9
+ export type TLibraryPriceBreak = PricingTypes.PriceEngineListDataLibraryPriceDataOption1BreaksItem;
10
+ /**
11
+ * Library pricing detail when a price page matched (the page/break shape).
12
+ * Carries `breaks`. Narrow `TPriceData["libraryPriceData"]` to this type with
13
+ * `hasPriceBreaks`.
14
+ */
15
+ export type TLibraryPriceData = PricingTypes.PriceEngineListDataLibraryPriceDataOption1;
16
+ /**
17
+ * Library pricing detail from the library-multiplier stage. Has no `breaks`.
18
+ */
19
+ export type TLibraryMultiplierData = PricingTypes.PriceEngineListDataLibraryPriceDataOption2;
20
+ /**
21
+ * Price engine response data (`pricing.priceEngine.list`). Aliases the augur-api
22
+ * SDK type. `libraryPriceData` is `TLibraryPriceData | TLibraryMultiplierData | null`.
23
+ */
24
+ export type TPriceData = PricingTypes.PriceEngineListData;
25
+ //# sourceMappingURL=pricing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricing.d.ts","sourceRoot":"","sources":["../../src/types/pricing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,oDAAoD,CAAC;AAEnG;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,0CAA0C,CAAC;AAExF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,0CAA0C,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,mBAAmB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { ItemsTypes } from "@simpleapps-com/augur-api";
2
+ import type { TItemUom } from "./uom";
3
+ import type { TItemAttribute } from "./attribute";
4
+ export type TProductStockData = {
5
+ locationId: number;
6
+ companyId: string;
7
+ qtyOnHand: number;
8
+ qtyAllocated: number;
9
+ stockable: string;
10
+ unallocated: number;
11
+ nextDueInPoDate: string | null;
12
+ qtyBackordered: number;
13
+ primaryBin: string;
14
+ discontinued: string;
15
+ qtyFrozen: number;
16
+ qtyQuarantined: number;
17
+ qtyAvailable: number;
18
+ };
19
+ /** One item of `items.categories.items.list`. Aliases the augur-api SDK type. */
20
+ export type TProductItem = ItemsTypes.CategoriesItemsListDataItemsItem;
21
+ export type TItemDetails = {
22
+ attributes: TItemAttribute[];
23
+ categoryList: number[];
24
+ classId1: string | null;
25
+ classId2: string | null;
26
+ classId3: string | null;
27
+ classId4: string | null;
28
+ classId5: string | null;
29
+ defaultSellingUnit: string;
30
+ displayDesc: string;
31
+ extendedDesc: string;
32
+ images: string[];
33
+ invMastText: string[];
34
+ invMastUid: number;
35
+ itemDesc: string;
36
+ itemId: string;
37
+ itemUom: TItemUom[];
38
+ length: number;
39
+ vndrStock: number | null;
40
+ userDefined: string[];
41
+ isWood: boolean;
42
+ defaultProductGroup: string | null;
43
+ };
44
+ /** One accessory of `items.invMast.invAccessory.list`. Aliases the augur-api SDK type. */
45
+ export type TItemAccessory = ItemsTypes.InvMastInvAccessoryListItem;
46
+ export type TItemRelatedProduct = TItemDetails & {
47
+ childItemUom: TItemUom[];
48
+ childItemDesc: string;
49
+ childInvMastUid: number;
50
+ childItemId: string;
51
+ childImages: string[];
52
+ };
53
+ /**
54
+ * Flat related product shape from the Items service (accessories). Aliases the
55
+ * augur-api SDK type `ItemsTypes.InvMastInvAccessoryListItem`.
56
+ */
57
+ export type TRelatedProduct = ItemsTypes.InvMastInvAccessoryListItem;
58
+ //# sourceMappingURL=product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product.d.ts","sourceRoot":"","sources":["../../src/types/product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,gCAAgC,CAAC;AAEvE,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,QAAQ,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,0FAA0F;AAC1F,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,2BAA2B,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,YAAY,GAAG;IAC/C,YAAY,EAAE,QAAQ,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,2BAA2B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { OpenSearchTypes } from "@simpleapps-com/augur-api";
2
+ /** One search suggestion. Aliases the augur-api SDK type. */
3
+ export type TSearchSuggestion = OpenSearchTypes.SuggestionsSuggestListItem;
4
+ /**
5
+ * Search suggestions as a list result: the suggestion items plus the envelope's
6
+ * paging metadata. Same shape as augur-core's `ListResult<TSearchSuggestion>`.
7
+ */
8
+ export type TSearchSuggestionsResponse = {
9
+ data: TSearchSuggestion[];
10
+ total: number;
11
+ count?: number;
12
+ totalResults?: number;
13
+ message?: string;
14
+ status?: number;
15
+ };
16
+ //# sourceMappingURL=search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/types/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,6DAA6D;AAC7D,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,0BAA0B,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { LogisticsTypes } from "@simpleapps-com/augur-api";
2
+ /** One UPS rate from `logistics.ups.rates.list`. Aliases the augur-api SDK type. */
3
+ export type TShippingMethod = LogisticsTypes.UPSRatesListItem;
4
+ //# sourceMappingURL=shipping.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shipping.d.ts","sourceRoot":"","sources":["../../src/types/shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,oFAAoF;AACpF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { SmartyStreetsTypes } from "@simpleapps-com/augur-api";
2
+ /** US address lookup result from `smartyStreets.us.lookup.get`. Aliases the augur-api SDK type. */
3
+ export type TSmartyStreets = SmartyStreetsTypes.UsLookupGetData;
4
+ //# sourceMappingURL=smarty-streets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smarty-streets.d.ts","sourceRoot":"","sources":["../../src/types/smarty-streets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,mGAAmG;AACnG,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAC,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ItemsTypes } from "@simpleapps-com/augur-api";
2
+ /** One supplier row on an item. Aliases the augur-api SDK type. */
3
+ export type TInventorySupplier = ItemsTypes.CategoriesItemsListDataItemsItemInventorySupplierItem;
4
+ //# sourceMappingURL=supplier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supplier.d.ts","sourceRoot":"","sources":["../../src/types/supplier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,mEAAmE;AACnE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,qDAAqD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { PricingTypes } from "@simpleapps-com/augur-api";
2
+ /** One item of a tax estimate. Aliases the augur-api SDK type. */
3
+ export type TTaxItem = PricingTypes.TaxEngineCreateBodyItemsItem;
4
+ /** Tax estimate from `pricing.taxEngine.create`. Aliases the augur-api SDK type. */
5
+ export type TTax = PricingTypes.TaxEngineCreateData;
6
+ //# sourceMappingURL=tax.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tax.d.ts","sourceRoot":"","sources":["../../src/types/tax.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE9D,kEAAkE;AAClE,MAAM,MAAM,QAAQ,GAAG,YAAY,CAAC,4BAA4B,CAAC;AAEjE,oFAAoF;AACpF,MAAM,MAAM,IAAI,GAAG,YAAY,CAAC,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ItemsTypes } from "@simpleapps-com/augur-api";
2
+ /** One unit of measure on an item. Aliases the augur-api SDK type. */
3
+ export type TItemUom = ItemsTypes.CategoriesItemsListDataItemsItemItemUomItem;
4
+ //# sourceMappingURL=uom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uom.d.ts","sourceRoot":"","sources":["../../src/types/uom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,sEAAsE;AACtE,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,2CAA2C,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { JoomlaTypes } from "@simpleapps-com/augur-api";
2
+ export type TProfileValues = Record<string, string | number | undefined>;
3
+ /** User document from `joomla.users.doc.list`. Aliases the augur-api SDK type. */
4
+ export type TUserProfile = JoomlaTypes.UsersDocListData;
5
+ //# sourceMappingURL=user-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-profile.d.ts","sourceRoot":"","sources":["../../src/types/user-profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC;AAEzE,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,gBAAgB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { State } from "states-us";
2
+ export type { State as USState };
3
+ /** All US states and territories — full data from states-us. */
4
+ export declare const US_STATES_FULL: State[];
5
+ /** All US states and territories — backward-compatible {code, name} shape. */
6
+ export declare const US_STATES: {
7
+ code: string;
8
+ name: string;
9
+ }[];
10
+ /** Lower 48 contiguous states. */
11
+ export declare const CONTIGUOUS_STATES: State[];
12
+ /** US territories (PR, GU, VI, AS, MP). */
13
+ export declare const US_TERRITORIES: State[];
14
+ export type USStateCode = (typeof US_STATES)[number]["code"];
15
+ //# sourceMappingURL=us-states.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"us-states.d.ts","sourceRoot":"","sources":["../src/us-states.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC,YAAY,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC;AAEjC,gEAAgE;AAChE,eAAO,MAAM,cAAc,SAAS,CAAC;AAErC,8EAA8E;AAC9E,eAAO,MAAM,SAAS;;;GAGnB,CAAC;AAEJ,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,SAAqC,CAAC;AAEpE,2CAA2C;AAC3C,eAAO,MAAM,cAAc,SAAoC,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Common regex patterns used for form validation across augur-hosted sites.
3
+ */
4
+ export declare const VALIDATION_PATTERNS: {
5
+ /** Phone number format: (123) 456-7890 or 123-456-7890 or 123.456.7890 */
6
+ readonly phoneNumber: RegExp;
7
+ /** Name format: Must start with non-hyphen/space, allow word chars, spaces, hyphens */
8
+ readonly nameFormat: RegExp;
9
+ /** Name must not contain numbers */
10
+ readonly nameNoNumbers: RegExp;
11
+ /** Address format: Allow word chars, spaces, hyphens, slashes, periods, hash, commas */
12
+ readonly addressFormat: RegExp;
13
+ /** No PO Box pattern - prevents PO Box addresses */
14
+ readonly noPOBox: RegExp;
15
+ /** Zip code: Exactly 5 digits */
16
+ readonly zipCode: RegExp;
17
+ /** City: Letters, spaces, periods, hyphens, apostrophes only */
18
+ readonly cityFormat: RegExp;
19
+ /** Address must contain at least one number */
20
+ readonly hasNumber: RegExp;
21
+ };
22
+ //# sourceMappingURL=validation-patterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation-patterns.d.ts","sourceRoot":"","sources":["../src/validation-patterns.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B,0EAA0E;;IAG1E,uFAAuF;;IAGvF,oCAAoC;;IAGpC,wFAAwF;;IAGxF,oDAAoD;;IAIpD,iCAAiC;;IAGjC,gEAAgE;;IAGhE,+CAA+C;;CAEvC,CAAC"}
package/dist/web.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/augur-packages/augur-packages/packages/augur-utils/dist/web.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,kCAAC","file":"/home/runner/work/augur-packages/augur-packages/packages/augur-utils/dist/web.cjs"}
1
+ {"version":3,"sources":["/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-utils/dist/web.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,kCAAC","file":"/Users/stuartjackson/Projects/simpleapps/atlas/repo/packages/augur-utils/dist/web.cjs"}
package/dist/web.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import { ClassValue } from 'clsx';
2
-
1
+ import { type ClassValue } from "clsx";
3
2
  /** Merge Tailwind classes without conflicts. Web only (tailwind-merge is meaningless in RN). */
4
- declare function cn(...inputs: ClassValue[]): string;
5
-
6
- export { cn };
3
+ export declare function cn(...inputs: ClassValue[]): string;
4
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,gGAAgG;AAChG,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
package/llms.txt CHANGED
@@ -1,22 +1,19 @@
1
1
  # Augur Platform Packages
2
2
 
3
3
  This package is part of the @simpleapps-com/augur-* platform.
4
- All packages use fixed versioning (same version number).
5
- The proxy pattern (createServerQueryProxy) is the primary data fetching API.
6
- Pure transform utilities bridge user-facing types to SDK params without breaking proxy type safety.
4
+ Each package releases on its own CalVer version; nothing requires them to share one.
5
+ The docs are at https://augur.build/docs/packages (the API reference lists every export).
7
6
 
8
7
  ## Sibling packages
9
8
 
10
- - @simpleapps-com/augur-config - Shared tooling configuration presets for Augur ecommerce sites
11
9
  - @simpleapps-com/augur-core - Universal foundation for Augur packages — proxy infrastructure, cache keys, method classification, shared types
10
+ - @simpleapps-com/augur-utils (this package) - Shared types, cache configuration, and utility functions for Augur ecommerce sites
12
11
  - @simpleapps-com/augur-hooks - Cross-platform React Query hooks and Zustand stores for Augur ecommerce sites
13
- - @simpleapps-com/augur-mobile - React Native/Expo adapters for Augur ecommerce apps (offline sync, biometrics, push)
14
12
  - @simpleapps-com/augur-server - Server-side utilities for Augur ecommerce sites (Redis caching, SDK helpers, auth)
15
- - @simpleapps-com/augur-tailwind - Shared Tailwind CSS v4 theme with HSL variables for Augur ecommerce sites
16
- - @simpleapps-com/augur-utils (this package) - Shared types, cache configuration, and utility functions for Augur ecommerce sites
17
13
  - @simpleapps-com/augur-web - Shared React UI components for Augur ecommerce sites (Radix + Tailwind)
18
-
19
- Each package ships its own llms.txt with exports and usage patterns.
14
+ - @simpleapps-com/augur-mobile - React Native/Expo adapters for Augur ecommerce apps (offline sync, biometrics, push)
15
+ - @simpleapps-com/augur-tailwind - Shared Tailwind CSS v4 theme with HSL variables for Augur ecommerce sites
16
+ - @simpleapps-com/augur-config - Shared tooling configuration presets for Augur ecommerce sites
20
17
 
21
18
  ---
22
19
 
@@ -24,51 +21,52 @@ Each package ships its own llms.txt with exports and usage patterns.
24
21
 
25
22
  > Shared types, cache configuration, and utility functions for Augur ecommerce sites
26
23
 
27
- Version: 2.2.29
28
-
29
24
  ## @simpleapps-com/augur-utils
30
25
 
31
- - const: BLUR_DATA_URL - 1x1 transparent PNG for Next.js `<Image blurDataURL={...}>` placeholders.
32
26
  - const: BillingAddressInvoiceSchema - Valibot schema for billing address with required PO number (invoice payments).
33
- - const: BillingAddressSchema - Valibot schema for billing address validation.
34
- - const: CACHE_CONFIG - Centralized cache configuration for React Query (TanStack Query)
35
- - const: CONTIGUOUS_STATES - Lower 48 contiguous states.
36
- - const: ShippingAddressSchema - Valibot schema for shipping address validation.
37
- - value: USState
38
- - const: US_STATES - All US states and territories — backward-compatible {code, name} shape.
39
- - const: US_STATES_FULL - All US states and territories — full data from states-us.
40
- - const: US_TERRITORIES - US territories (PR, GU, VI, AS, MP).
41
- - const: VALIDATION_PATTERNS - Common regex patterns used for form validation across augur-hosted sites.
27
+ - const: BillingAddressSchema - Valibot schema for billing address validation. Less strict than shipping: allows PO Box, no email/phone required.
28
+ - const: BLUR_DATA_URL - 1x1 transparent PNG for Next.js `<Image blurDataURL={...}>` placeholders.
42
29
  - function: buildCheckoutPayload - Builds the oe_hdr + oe_line payload required by the commerce checkout API from cart data.
43
30
  - function: buildImageLoader - Returns a loader function compatible with Next.js `<Image loader={...}>`.
44
31
  - function: buildTrackingData - Build a GA4 begin_checkout ecommerce payload from cart lines, item details, and prices.
45
- - value: cn
32
+ - const: CACHE_CONFIG - Centralized cache configuration for React Query (TanStack Query)
33
+ - function: categorySortBy - serializeCategoryFilters' sortBy: the prefix applied only when both are non-empty.
34
+ - function: cleanMoney - Remove JS float noise from a money product or sum.
35
+ - function: cn - Merge Tailwind classes without conflicts. Web only (tailwind-merge is meaningless in RN).
36
+ - const: CONTIGUOUS_STATES - Lower 48 contiguous states.
46
37
  - function: createImageConfig - Creates a frozen ImageConfig object.
47
38
  - function: derivePrice - Pure price derivation — usable in hooks AND server components.
48
- - function: formatPrice - Locale-aware currency formatting.
39
+ - function: formatPrice - Locale-aware currency formatting. Defaults to USD -- consumers can override locale and currency.
49
40
  - function: generateBreadcrumbJsonLd - Generates a Schema.org BreadcrumbList JSON-LD object from an array of breadcrumb items.
50
41
  - function: generateProductJsonLd - Generates a Schema.org Product JSON-LD string from an inventory document. Returns null if the item is suppressed, unnamed, or has no price.
51
42
  - function: getBusinessDay - Get the Nth business day from today (skipping weekends).
52
- - function: getDefaultImageUrl - Returns the default/placeholder image URL.
43
+ - function: getDefaultImageUrl - Returns the default/placeholder image URL. Per-call `options.defaultImage` overrides `config.defaultImage`.
53
44
  - function: getImageSrcSet - Generates a `srcset` string for responsive images.
54
45
  - function: getImageUrl - Builds a full agr.media URL for the given image path and transforms.
55
46
  - function: getPaymentStatus - Returns "Paid", "Partially Paid", or "Unpaid" based on invoice payment flags and amounts.
56
47
  - function: getSchemaAvailability - Maps resolved stock to a Schema.org availability URL.
57
- - function: getShippingLeadDate - Get shipping lead date estimate based on days string.
58
- - function: isAddressDifferent - Compares a user-entered address with a SmartyStreets-validated address.
59
- - function: normalizePath - Normalizes an image path by:
48
+ - function: getShippingLeadDate - Get shipping lead date estimate based on days string (the table is `shippingLeadOf`).
49
+ - function: hasPriceBreaks - Type guard: true when `libraryPriceData` is the price-page shape with quantity `breaks`.
50
+ - function: isAddressDifferent - Compares a user-entered address with a SmartyStreets-validated address. Returns true if any field differs (case-insensitive for address/city, exact match for state abbreviation and zip code).
51
+ - function: normalizePath - Normalizes an image path by: 1. Returning it as-is if it starts with `http` (external URL). 2. Stripping configured prefixes (defaults: `/images`, `images`). 3. Prepending `defaultPath` for bare filenames (no `/`). 4. Stripping leading slashes.
60
52
  - function: paginateOffset - Returns a copy of filters with offset adjusted for the given page.
61
53
  - function: pushTrackingData - Push ecommerce tracking data to window.dataLayer using the GA4 clear-then-push pattern.
62
54
  - function: resolveStock - Pure stock resolution -- usable in hooks AND server components.
63
- - function: sanitizeHtmlImages - Rewrites `<img src="...">` attributes in an HTML string to use agr.media URLs.
55
+ - function: roundHalfAway - Round half away from zero to `decimals` places.
56
+ - function: sanitizeHtmlImages - Rewrites `<img src="...">` attributes in an HTML string to use agr.media URLs. Useful for CMS/Joomla content that contains raw image references.
64
57
  - function: serializeCategoryFilters - Converts TItemsFilters to the SDK params shape for category item endpoints.
65
58
  - function: serializeSearchParams - Converts TItemsFilters to the SDK params shape for search endpoints.
66
- - function: serializeTransforms - Serializes transform options into the CDN path segment.
59
+ - function: serializeTransforms - Serializes transform options into the CDN path segment. Example: `{ width: 400, format: "webp" }` → `"w_400,f_webp"`
60
+ - const: ShippingAddressSchema - Valibot schema for shipping address validation. Enforces no PO Box, requires street number, formats phone number.
67
61
  - function: trackAddToCart - Track add_to_cart event to Google Analytics dataLayer.
68
62
  - function: trackViewItem - Track view_item event to Google Analytics dataLayer.
69
63
  - function: transformShipToAddress - Normalizes a raw ship-to address object (camelCase or snake_case, physical or mailing) into a consistent ShipToAddress shape.
70
64
  - function: unwrap - Extracts the data from a `SafeActionResult`, throwing on error.
71
65
  - function: unwrapOr - Extracts the data from a `SafeActionResult`, returning `null` on error.
66
+ - const: US_STATES - All US states and territories — backward-compatible {code, name} shape.
67
+ - const: US_STATES_FULL - All US states and territories — full data from states-us.
68
+ - const: US_TERRITORIES - US territories (PR, GU, VI, AS, MP).
69
+ - const: VALIDATION_PATTERNS - Common regex patterns used for form validation across augur-hosted sites.
72
70
  - type: AddToCartEventParams
73
71
  - type: BillingAddress
74
72
  - type: BreadcrumbJsonLdItem
@@ -78,8 +76,8 @@ Version: 2.2.29
78
76
  - type: CheckoutInput
79
77
  - type: CheckoutPayment
80
78
  - type: CustomerDocument
81
- - type: DerivePriceInput
82
79
  - type: DerivedPrice
80
+ - type: DerivePriceInput
83
81
  - type: ImageConfig
84
82
  - type: ImageTransforms
85
83
  - type: ImageUrlOptions
@@ -95,13 +93,13 @@ Version: 2.2.29
95
93
  - type: ProductJsonLdAggregateRating
96
94
  - type: ProductJsonLdOptions
97
95
  - type: ProductJsonLdSeller
98
- - type: ResolveStockInput
99
96
  - type: ResolvedStock
97
+ - type: ResolveStockInput
100
98
  - type: SafeActionResult
101
99
  - type: SchemaAvailability
102
100
  - type: SearchParamOptions
103
- - type: ShipToAddress
104
101
  - type: ShippingAddress
102
+ - type: ShipToAddress
105
103
  - type: TAccountQuery
106
104
  - type: TApiResponse
107
105
  - type: TAttribute
@@ -115,19 +113,20 @@ Version: 2.2.29
115
113
  - type: TCategoryChild
116
114
  - type: TCategoryItemsResult
117
115
  - type: TCheckoutResult
116
+ - type: TInventorySupplier
118
117
  - type: TInvMast
119
118
  - type: TInvMastDoc
120
- - type: TInventorySupplier
121
119
  - type: TItemAccessory
122
120
  - type: TItemAttribute
123
121
  - type: TItemAttributes
124
122
  - type: TItemCategory
125
123
  - type: TItemDetails
126
124
  - type: TItemRelatedProduct
127
- - type: TItemUom
128
125
  - type: TItemsFilters
126
+ - type: TItemUom
129
127
  - type: TJoomlaContent
130
128
  - type: TJoomlaContentFilters
129
+ - type: TLibraryMultiplierData
131
130
  - type: TLibraryPriceBreak
132
131
  - type: TLibraryPriceData
133
132
  - type: TLtlRatesResponse
@@ -143,6 +142,8 @@ Version: 2.2.29
143
142
  - type: TProductItem
144
143
  - type: TProductStockData
145
144
  - type: TProfileValues
145
+ - type: TrackingData
146
+ - type: TrackingItem
146
147
  - type: TRelatedProduct
147
148
  - type: TSearchSuggestion
148
149
  - type: TSearchSuggestionsResponse
@@ -156,14 +157,20 @@ Version: 2.2.29
156
157
  - type: TTransactionSetup
157
158
  - type: TUserProfile
158
159
  - type: TWebDesc
159
- - type: TrackingData
160
- - type: TrackingItem
161
- - type: USStateCode
162
160
  - type: UserAddress
161
+ - type: USState
162
+ - type: USStateCode
163
163
  - type: ViewItemEventParams
164
164
 
165
165
  ### Examples
166
166
 
167
+ hasPriceBreaks:
168
+ ```ts
169
+ if (hasPriceBreaks(priceData.libraryPriceData)) {
170
+ priceData.libraryPriceData.breaks.map((tier) => tier.startQuantity);
171
+ }
172
+ ```
173
+
167
174
  paginateOffset:
168
175
  ```tsx
169
176
  useInfiniteQuery({
@@ -188,7 +195,6 @@ const cart = unwrapOr(await getCartLines(cartId));
188
195
  if (!cart) { /* handle missing data *\/ }
189
196
  ```
190
197
 
191
-
192
198
  ## @simpleapps-com/augur-utils/web
193
199
 
194
200
  - function: cn - Merge Tailwind classes without conflicts. Web only (tailwind-merge is meaningless in RN).