sinfactura-types 1.10.613 → 1.10.615

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.
@@ -294,8 +294,8 @@ declare global {
294
294
  /**
295
295
  * A recorded transport outcome or send-time preference refusal — the
296
296
  * wire half of the `NOTIFY#{storeId}` delivery row. The stored row,
297
- * `NotifyDeliveryRecord` (`contracts/src/internal/rows.ts`), adds only its
298
- * keys and its `ttl`.
297
+ * `NotifyDeliveryRecord` (`contracts/src/internal/rows.ts`), adds its
298
+ * keys, `ttl` and optional private envelope metadata.
299
299
  *
300
300
  * No endpoint returns it yet; it is published so the reader that will is not
301
301
  * the first place the shape gets declared.
package/dist/order.d.ts CHANGED
@@ -100,10 +100,17 @@ declare global {
100
100
  * a negative leg. Reversals are minted server-side from a provider's own
101
101
  * refund event.
102
102
  *
103
- * `Order.amountPaid` is this array's signed sum minus its `change`, so it
104
- * already accounts for reversals with no reader change.
103
+ * `Order.amountPaid` derives from separately ledger-quantized signed
104
+ * amounts minus changes. Fully refunded deposit pairs contribute zero;
105
+ * ordinary reversals retain their signed contribution.
105
106
  */
106
107
  amount: number;
108
+ /**
109
+ * Replay arithmetic for newly minted ledger-scale legs. Absence retains
110
+ * historical display-rounded identity; never inferred from the amount.
111
+ * Existing legs are never marked or rewritten.
112
+ */
113
+ roundingVersion?: 1;
107
114
  /** catalogId — FK to PlatformCurrency. Self-describing per leg (ADR-0013). */
108
115
  currency: string;
109
116
  /**
@@ -1327,10 +1334,9 @@ declare global {
1327
1334
  * 'pending' <- 'Pendiente' still owing, and nothing has been paid
1328
1335
  * ```
1329
1336
  *
1330
- * ⚠️ `epsilon` is a FIXED `0.01` in the order's own currency, not a
1331
- * per-store value derived from `priceDecimals`. `FINANCIAL_EPSILON` in
1332
- * `stacks/services/orderTransitions.ts` is the single source and every
1333
- * producer compares through it. A shortfall that small is not a shortfall:
1337
+ * ⚠️ `epsilon` is ONE minor unit at the order currency ledger scale, independent
1338
+ * of store display `priceDecimals`. `deriveFinancialStatus` in
1339
+ * `stacks/services/orderTransitions.ts` compares integer minor units. A shortfall that small is not a shortfall:
1334
1340
  * an exact-zero test disagrees with the app on every order whose FIFO
1335
1341
  * allocation leaves a sub-centavo residual, and puts a live "collect" button
1336
1342
  * next to a paid chip.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.613",
3
+ "version": "1.10.615",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",