@endora-commerce/contracts 0.107.0 → 0.108.0

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 (141) hide show
  1. package/dist/admin-feedback.d.ts +61 -0
  2. package/dist/admin-feedback.d.ts.map +1 -0
  3. package/dist/admin-feedback.js +71 -0
  4. package/dist/admin-feedback.js.map +1 -0
  5. package/dist/admin-name.d.ts +21 -0
  6. package/dist/admin-name.d.ts.map +1 -0
  7. package/dist/admin-name.js +30 -0
  8. package/dist/admin-name.js.map +1 -0
  9. package/dist/carts.d.ts +197 -1
  10. package/dist/carts.d.ts.map +1 -1
  11. package/dist/carts.js +29 -0
  12. package/dist/carts.js.map +1 -1
  13. package/dist/catalog.d.ts +243 -10
  14. package/dist/catalog.d.ts.map +1 -1
  15. package/dist/catalog.js +107 -4
  16. package/dist/catalog.js.map +1 -1
  17. package/dist/common.d.ts +4 -0
  18. package/dist/common.d.ts.map +1 -1
  19. package/dist/common.js +14 -0
  20. package/dist/common.js.map +1 -1
  21. package/dist/comparisons.d.ts +7 -0
  22. package/dist/comparisons.d.ts.map +1 -1
  23. package/dist/comparisons.js +2 -0
  24. package/dist/comparisons.js.map +1 -1
  25. package/dist/credit-limits.d.ts.map +1 -1
  26. package/dist/credit-limits.js +3 -2
  27. package/dist/credit-limits.js.map +1 -1
  28. package/dist/crm-rich-text.d.ts +64 -0
  29. package/dist/crm-rich-text.d.ts.map +1 -0
  30. package/dist/crm-rich-text.js +303 -0
  31. package/dist/crm-rich-text.js.map +1 -0
  32. package/dist/crm.d.ts +91 -1
  33. package/dist/crm.d.ts.map +1 -1
  34. package/dist/crm.js +49 -34
  35. package/dist/crm.js.map +1 -1
  36. package/dist/custom-fields.d.ts +414 -1
  37. package/dist/custom-fields.d.ts.map +1 -1
  38. package/dist/custom-fields.js +319 -10
  39. package/dist/custom-fields.js.map +1 -1
  40. package/dist/document-templates.d.ts +184 -8
  41. package/dist/document-templates.d.ts.map +1 -1
  42. package/dist/document-templates.js +98 -1
  43. package/dist/document-templates.js.map +1 -1
  44. package/dist/document-values.d.ts +4 -1
  45. package/dist/document-values.d.ts.map +1 -1
  46. package/dist/document-values.js +18 -6
  47. package/dist/document-values.js.map +1 -1
  48. package/dist/errors.d.ts +37 -8
  49. package/dist/errors.d.ts.map +1 -1
  50. package/dist/errors.js +66 -8
  51. package/dist/errors.js.map +1 -1
  52. package/dist/index.d.ts +11 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +16 -0
  55. package/dist/index.js.map +1 -1
  56. package/dist/invoices.d.ts.map +1 -1
  57. package/dist/invoices.js +7 -4
  58. package/dist/invoices.js.map +1 -1
  59. package/dist/line-groups.d.ts +80 -0
  60. package/dist/line-groups.d.ts.map +1 -0
  61. package/dist/line-groups.js +130 -0
  62. package/dist/line-groups.js.map +1 -0
  63. package/dist/localized-name.d.ts +20 -0
  64. package/dist/localized-name.d.ts.map +1 -0
  65. package/dist/localized-name.js +45 -0
  66. package/dist/localized-name.js.map +1 -0
  67. package/dist/money-decimal.d.ts +162 -0
  68. package/dist/money-decimal.d.ts.map +1 -0
  69. package/dist/money-decimal.js +365 -0
  70. package/dist/money-decimal.js.map +1 -0
  71. package/dist/money-input.d.ts +64 -0
  72. package/dist/money-input.d.ts.map +1 -0
  73. package/dist/money-input.js +111 -0
  74. package/dist/money-input.js.map +1 -0
  75. package/dist/order-minimums.d.ts +111 -0
  76. package/dist/order-minimums.d.ts.map +1 -0
  77. package/dist/order-minimums.js +196 -0
  78. package/dist/order-minimums.js.map +1 -0
  79. package/dist/orders.d.ts +181 -2
  80. package/dist/orders.d.ts.map +1 -1
  81. package/dist/orders.js +92 -5
  82. package/dist/orders.js.map +1 -1
  83. package/dist/payment-methods.d.ts.map +1 -1
  84. package/dist/payment-methods.js +2 -1
  85. package/dist/payment-methods.js.map +1 -1
  86. package/dist/price-book-decimal.d.ts +84 -0
  87. package/dist/price-book-decimal.d.ts.map +1 -0
  88. package/dist/price-book-decimal.js +175 -0
  89. package/dist/price-book-decimal.js.map +1 -0
  90. package/dist/price-books.d.ts +2206 -0
  91. package/dist/price-books.d.ts.map +1 -0
  92. package/dist/price-books.js +777 -0
  93. package/dist/price-books.js.map +1 -0
  94. package/dist/price-lists.d.ts +268 -607
  95. package/dist/price-lists.d.ts.map +1 -1
  96. package/dist/price-lists.js +92 -455
  97. package/dist/price-lists.js.map +1 -1
  98. package/dist/product-feeds.d.ts +89 -8
  99. package/dist/product-feeds.d.ts.map +1 -1
  100. package/dist/product-feeds.js +18 -1
  101. package/dist/product-feeds.js.map +1 -1
  102. package/dist/product-value-resolver.d.ts +6 -0
  103. package/dist/product-value-resolver.d.ts.map +1 -1
  104. package/dist/product-value-resolver.js +6 -1
  105. package/dist/product-value-resolver.js.map +1 -1
  106. package/dist/promotions.d.ts +2 -2
  107. package/dist/promotions.d.ts.map +1 -1
  108. package/dist/promotions.js +8 -2
  109. package/dist/promotions.js.map +1 -1
  110. package/dist/quick-order.d.ts +39 -0
  111. package/dist/quick-order.d.ts.map +1 -1
  112. package/dist/quick-order.js +43 -0
  113. package/dist/quick-order.js.map +1 -1
  114. package/dist/quote-requests.d.ts +270 -1
  115. package/dist/quote-requests.d.ts.map +1 -1
  116. package/dist/quote-requests.js +150 -6
  117. package/dist/quote-requests.js.map +1 -1
  118. package/dist/returns.d.ts +55 -2
  119. package/dist/returns.d.ts.map +1 -1
  120. package/dist/returns.js +39 -4
  121. package/dist/returns.js.map +1 -1
  122. package/dist/sales-channels.d.ts +2 -0
  123. package/dist/sales-channels.d.ts.map +1 -1
  124. package/dist/sales-channels.js +2 -0
  125. package/dist/sales-channels.js.map +1 -1
  126. package/dist/search.d.ts +60 -0
  127. package/dist/search.d.ts.map +1 -1
  128. package/dist/search.js +4 -0
  129. package/dist/search.js.map +1 -1
  130. package/dist/shipping-methods.d.ts.map +1 -1
  131. package/dist/shipping-methods.js +2 -1
  132. package/dist/shipping-methods.js.map +1 -1
  133. package/dist/shopping-lists.d.ts +24 -0
  134. package/dist/shopping-lists.d.ts.map +1 -1
  135. package/dist/shopping-lists.js +20 -1
  136. package/dist/shopping-lists.js.map +1 -1
  137. package/dist/storefront-value-overrides.d.ts +67 -0
  138. package/dist/storefront-value-overrides.d.ts.map +1 -0
  139. package/dist/storefront-value-overrides.js +93 -0
  140. package/dist/storefront-value-overrides.js.map +1 -0
  141. package/package.json +1 -1
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Integer decimal arithmetic for price-book prices — feature 161, G17
3
+ * (`specs/161-price-book-editor/contracts/backend-gaps.md`), moved here from
4
+ * `price_lists`' `matrix-decimal.ts` (features 148 and 160), which re-exports
5
+ * it: the resolver prices with these functions and the admin's labelled
6
+ * previews (FR-030) compute with the same ones, so a preview rounds exactly as
7
+ * the server does.
8
+ *
9
+ * Amounts are `numeric(14,4)` and percentages two places, and both travel as
10
+ * strings. A percentage or an amount adjustment is the one place a price is
11
+ * *computed* rather than read, so it is computed on integers: amounts in
12
+ * ten-thousandths, percentages in hundredths, one multiplication and one
13
+ * half-up rounding back to four fractional digits — the precision a typed row
14
+ * is stored at, so a computed price and a typed one are indistinguishable to
15
+ * carts and orders. A double carries fifteen significant digits and
16
+ * `numeric(14,4)` eighteen, which is why nothing here goes through `Number`.
17
+ * No dependency: one multiplication does not justify one (Constitution IV).
18
+ */
19
+ const AMOUNT = /^(\d+)(?:\.(\d{1,4}))?$/;
20
+ const SIGNED_AMOUNT = /^(-)?(\d+)(?:\.(\d{1,4}))?$/;
21
+ const SIGNED_PERCENT = /^(-)?(\d{1,4})(?:\.(\d{1,2}))?$/;
22
+ /** A non-negative decimal string with up to four fractional digits, as ten-thousandths. */
23
+ export function parseUnits(value) {
24
+ const match = AMOUNT.exec(value);
25
+ if (!match)
26
+ throw new Error(`Not a decimal amount with up to 4 fractional digits: "${value}"`);
27
+ return BigInt(match[1]) * 10000n + BigInt((match[2] ?? '').padEnd(4, '0'));
28
+ }
29
+ /** Ten-thousandths as a decimal string with exactly four fractional digits. */
30
+ export function formatUnits(units) {
31
+ const negative = units < 0n;
32
+ const abs = negative ? -units : units;
33
+ const whole = abs / 10000n;
34
+ const fraction = (abs % 10000n).toString().padStart(4, '0');
35
+ return `${negative ? '-' : ''}${whole.toString()}.${fraction}`;
36
+ }
37
+ /** Numeric comparison of two non-negative decimal strings: −1, 0 or 1. */
38
+ export function compareDecimal(a, b) {
39
+ const x = parseUnits(a);
40
+ const y = parseUnits(b);
41
+ return x < y ? -1 : x > y ? 1 : 0;
42
+ }
43
+ /** A signed decimal string with up to four fractional digits, as ten-thousandths. */
44
+ export function parseSignedUnits(value) {
45
+ const match = SIGNED_AMOUNT.exec(value);
46
+ if (!match)
47
+ throw new Error(`Not a signed decimal amount with up to 4 fractional digits: "${value}"`);
48
+ const units = BigInt(match[2]) * 10000n + BigInt((match[3] ?? '').padEnd(4, '0'));
49
+ return match[1] ? -units : units;
50
+ }
51
+ /** A signed percentage with up to two fractional digits, as hundredths of a percent. */
52
+ export function parseSignedPercentHundredths(value) {
53
+ const match = SIGNED_PERCENT.exec(value);
54
+ if (!match)
55
+ throw new Error(`Not a signed percentage with up to 2 fractional digits: "${value}"`);
56
+ const hundredths = BigInt(match[2]) * 100n + BigInt((match[3] ?? '').padEnd(2, '0'));
57
+ return match[1] ? -hundredths : hundredths;
58
+ }
59
+ /**
60
+ * `reference × (1 + percent / 100)`, rounded half-up to four fractional digits
61
+ * (FR-019 of spec 160) — `−10` is a 10 % discount, `+20` a 20 % surcharge. The
62
+ * reference is a price (never negative) and the percentage is at least −100,
63
+ * so the product is never negative and half-up is one integer step. `null`
64
+ * when the result would be negative, which the bounds make impossible but the
65
+ * caller treats as "this row does not price" all the same (FR-008).
66
+ */
67
+ export function applySignedPercent(reference, percent) {
68
+ const units = parseUnits(reference);
69
+ const factor = 10000n + parseSignedPercentHundredths(percent);
70
+ if (factor < 0n)
71
+ return null;
72
+ return formatUnits((units * factor + 5000n) / 10000n);
73
+ }
74
+ /** `reference + delta`, or `null` when that is below zero (FR-008). Zero is a price. */
75
+ export function applyAmountAdjustment(reference, delta) {
76
+ const units = parseUnits(reference) + parseSignedUnits(delta);
77
+ return units < 0n ? null : formatUnits(units);
78
+ }
79
+ /** A non-negative decimal string normalised to four fractional digits. */
80
+ export function normaliseAmount(value) {
81
+ return formatUnits(parseUnits(value));
82
+ }
83
+ const DECIMAL = /^(-)?(\d+)(?:\.(\d+))?$/;
84
+ /**
85
+ * A decimal as text: a string trimmed, a number as the shortest decimal that
86
+ * round-trips it — `String(9.045)` is `"9.045"`, which is the decimal a
87
+ * four-place amount string parsed with `Number` came from. A magnitude
88
+ * `String` writes in exponent form is far outside any price, but is still a
89
+ * number: a large one is an integer (every double from 2^53 up is), a tiny one
90
+ * is read at twelve places. The one reading every helper here and the
91
+ * storefront's gross share (review 3 of release 0.108.0, D1).
92
+ */
93
+ export function decimalText(value) {
94
+ if (typeof value === 'string')
95
+ return value.trim();
96
+ if (!Number.isFinite(value))
97
+ throw new Error(`Not a finite number: ${value}`);
98
+ const text = String(value);
99
+ if (!/e/i.test(text))
100
+ return text;
101
+ return Math.abs(value) >= 1 ? BigInt(value).toString() : value.toFixed(12);
102
+ }
103
+ /**
104
+ * An amount at two places, rounded **half-up on its decimal digits** (half
105
+ * away from zero for a negative amount) — the one rule every surface that
106
+ * shows or stores a price at two places applies to a resolver amount: the
107
+ * cart line (which the order copies), the admin order preview, a quote's
108
+ * reference price and the product feed, and what the storefront shows, since
109
+ * `Intl.NumberFormat` rounds the same decimal digits half-expand.
110
+ *
111
+ * `Number(amount).toFixed(2)` is not this rule: it rounds the binary double,
112
+ * and 9.0450 is the double 9.04499…, so it answered 9.04 where the card showed
113
+ * 9,05 (review finding 2 of release 0.108.0; `specs/pricing/worked-examples.md`
114
+ * §10.16). A number is read as the shortest decimal that round-trips it —
115
+ * `String(9.045)` is `"9.045"` — which is the decimal a four-place amount
116
+ * string parsed with `Number` came from.
117
+ */
118
+ export function roundAmountHalfUp(value) {
119
+ const text = decimalText(value);
120
+ const match = DECIMAL.exec(text);
121
+ if (!match)
122
+ throw new Error(`Not a decimal amount: "${String(value)}"`);
123
+ const fraction = (match[3] ?? '').padEnd(3, '0');
124
+ // Hundredths, plus one when the dropped digits are at least half of one.
125
+ let hundredths = BigInt(match[2]) * 100n + BigInt(fraction.slice(0, 2));
126
+ if (Number(fraction[2]) >= 5)
127
+ hundredths += 1n;
128
+ const negative = match[1] === '-' && hundredths !== 0n;
129
+ const whole = hundredths / 100n;
130
+ const cents = (hundredths % 100n).toString().padStart(2, '0');
131
+ return `${negative ? '-' : ''}${whole.toString()}.${cents}`;
132
+ }
133
+ const UNSIGNED_DECIMAL = /^(\d+)(?:\.(\d+))?$/;
134
+ /** A non-negative decimal ({@link decimalText}) as an integer and a scale. */
135
+ function decimalParts(value, what) {
136
+ const text = decimalText(value);
137
+ const match = UNSIGNED_DECIMAL.exec(text);
138
+ if (!match)
139
+ throw new Error(`Not a non-negative decimal ${what}: "${String(value)}"`);
140
+ const fraction = match[2] ?? '';
141
+ return { digits: BigInt(match[1] + fraction), scale: fraction.length };
142
+ }
143
+ /**
144
+ * The gross of a net amount at a tax rate — `net × (1 + rate / 100)` for a
145
+ * rate in percent — at two places, rounded **half-up on the exact decimal product** (review 2,
146
+ * finding 2 of release 0.108.0; `specs/pricing/worked-examples.md` §10.16).
147
+ *
148
+ * The companion of {@link roundAmountHalfUp} for a figure that is computed
149
+ * rather than read: a product feed's gross price, and the gross the storefront
150
+ * shows beside a net one. Computed on integers — `net` and `rate` as written,
151
+ * one multiplication, one half-up step — because `29.50 × 1.23` is the double
152
+ * 36.28499…, so binary arithmetic published 36.28 where the price is 36.29.
153
+ * Both arguments are non-negative decimals ({@link decimalText}). The rate is
154
+ * in percent (`23`) unless `unit` says it is a fraction (`0.23`, the
155
+ * storefront's `DEFAULT_VAT_RATE`), which is read as written rather than
156
+ * multiplied by 100 on a double.
157
+ */
158
+ export function grossAmountHalfUp(net, rate, unit = 'percent') {
159
+ const amount = decimalParts(net, 'amount');
160
+ const parts = decimalParts(rate, 'rate');
161
+ // A percent is a fraction written two places further right.
162
+ const shift = unit === 'percent' ? 2 : 0;
163
+ // (1 + rate) as an integer at the rate's scale plus the shift.
164
+ const factor = 10n ** BigInt(parts.scale + shift) + parts.digits;
165
+ const product = amount.digits * factor;
166
+ const scale = amount.scale + parts.scale + shift;
167
+ // Hundredths, half-up: add half of the dropped unit, then truncate.
168
+ const hundredths = scale <= 2
169
+ ? product * 10n ** BigInt(2 - scale)
170
+ : (product + 10n ** BigInt(scale - 2) / 2n) / 10n ** BigInt(scale - 2);
171
+ const whole = hundredths / 100n;
172
+ const cents = (hundredths % 100n).toString().padStart(2, '0');
173
+ return `${whole.toString()}.${cents}`;
174
+ }
175
+ //# sourceMappingURL=price-book-decimal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"price-book-decimal.js","sourceRoot":"","sources":["../src/price-book-decimal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,GAAG,yBAAyB,CAAC;AACzC,MAAM,aAAa,GAAG,6BAA6B,CAAC;AACpD,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAEzD,2FAA2F;AAC3F,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,yDAAyD,KAAK,GAAG,CAAC,CAAC;IAC/F,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,CAAC,GAAG,MAAO,GAAG,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,QAAQ,GAAG,KAAK,GAAG,EAAE,CAAC;IAC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