sinfactura-types 1.10.290 → 1.10.291
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/cart.d.ts +27 -11
- package/package.json +1 -1
package/dist/cart.d.ts
CHANGED
|
@@ -134,10 +134,17 @@ declare global {
|
|
|
134
134
|
* the catalogue any more, so re-sending the list price on the next write
|
|
135
135
|
* would silently undo a negotiated price.
|
|
136
136
|
*
|
|
137
|
-
* ⚠️ `'staff'` is stamped only when the applied
|
|
138
|
-
* what the price list resolved. An override typed
|
|
139
|
-
* is indistinguishable from the list price and is
|
|
140
|
-
* price, so the line goes on tracking the catalogue.
|
|
137
|
+
* ⚠️ On a price the request NAMES, `'staff'` is stamped only when the applied
|
|
138
|
+
* price actually DIFFERS from what the price list resolved. An override typed
|
|
139
|
+
* at exactly the list price is indistinguishable from the list price and is
|
|
140
|
+
* recorded as the list price, so the line goes on tracking the catalogue.
|
|
141
|
+
*
|
|
142
|
+
* ⚠️ That comparison does NOT govern a pin the row ALREADY carried. A stored
|
|
143
|
+
* `'staff'` line whose price the catalogue has since caught up with stays
|
|
144
|
+
* `'staff'`: the row states the provenance, so there is nothing to infer from
|
|
145
|
+
* a coincidence of numbers. Inferring it anyway erased the pin on the next
|
|
146
|
+
* unrelated write, and the negotiated price was gone the moment the list
|
|
147
|
+
* moved off it again.
|
|
141
148
|
*
|
|
142
149
|
* ⚠️ Absent on a legacy row — the migration is forward-only and no stored
|
|
143
150
|
* cart is rewritten to add it. Absent means "no marker was recorded", never
|
|
@@ -159,10 +166,11 @@ declare global {
|
|
|
159
166
|
* pinned price can never drift below margin as costs rise.
|
|
160
167
|
*
|
|
161
168
|
* ⚠️ It SURVIVES every later write to the cart — another line being added, a
|
|
162
|
-
* coupon applied, this line's own quantity changed
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
169
|
+
* coupon applied, this line's own quantity changed, the price list moving to
|
|
170
|
+
* this very number and away again — until a write from a surface that may
|
|
171
|
+
* clears it explicitly by sending `price: null` on the action that names this
|
|
172
|
+
* line. That is the whole point of recording it: a rebuild that dropped it
|
|
173
|
+
* put the list price back without anybody asking.
|
|
166
174
|
*/
|
|
167
175
|
priceOverride?: number;
|
|
168
176
|
/**
|
|
@@ -666,9 +674,17 @@ declare global {
|
|
|
666
674
|
*
|
|
667
675
|
* ⚠️ `null` is the only unambiguous clear. `0` cannot be one (it floors to
|
|
668
676
|
* cost), and re-sending the list price requires knowing it, which a client
|
|
669
|
-
* cannot rely on across a customer switch or a promo starting.
|
|
670
|
-
*
|
|
671
|
-
*
|
|
677
|
+
* cannot rely on across a customer switch or a promo starting.
|
|
678
|
+
*
|
|
679
|
+
* ⚠️ The CLEAR is gated on the SURFACE exactly as the set is, and is
|
|
680
|
+
* deliberately NOT gated on `config.changePrice`. The store switch is about
|
|
681
|
+
* a caller NAMING a price and a clear names none, so gating it there would
|
|
682
|
+
* strand a pinned line the day a merchant turns the capability off. The
|
|
683
|
+
* surface is a different question — WHO is asking — and the storefront may
|
|
684
|
+
* not touch this line's pricing in either direction: a clear destroys a
|
|
685
|
+
* price an operator negotiated, and "back to the list" is the merchant's
|
|
686
|
+
* higher price, not the shopper's. `/basket` therefore ignores `null` here,
|
|
687
|
+
* exactly as it ignores a number.
|
|
672
688
|
*
|
|
673
689
|
* ⚠️ It reaches ONE line — the one this action names — never every line of
|
|
674
690
|
* the product. Read `CartLine.priceSource === 'staff'` to find out which
|