sinfactura-types 1.10.352 → 1.10.353
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/marketing.d.ts +22 -0
- package/package.json +1 -1
package/dist/marketing.d.ts
CHANGED
|
@@ -370,6 +370,28 @@ declare global {
|
|
|
370
370
|
* own mechanics, and are the only three a cart can freeze onto itself.
|
|
371
371
|
*/
|
|
372
372
|
type Promotion = CouponPromotion | BuyXGetYPromotion | FreeShippingPromotion | BundlePromotion;
|
|
373
|
+
/**
|
|
374
|
+
* What a non-admin-tier operator socket receives for a promotion the staff
|
|
375
|
+
* view of `GET /promotions` would NOT serve — a RETRACTION, not a row.
|
|
376
|
+
*
|
|
377
|
+
* ⚠️ It exists because withholding the frame entirely is indistinguishable,
|
|
378
|
+
* at the client, from no write having happened: a POS that cached the
|
|
379
|
+
* promotion while it was `active` and cart-applicable keeps offering it
|
|
380
|
+
* after it is paused, ended or made non-cart-applicable, and only the
|
|
381
|
+
* server's refusal at apply time tells the cashier. `staffVisible: false`
|
|
382
|
+
* is the instruction to drop it from the picker.
|
|
383
|
+
*
|
|
384
|
+
* ⚠️ The THREE keys are the whole shape, deliberately. `status` is the only
|
|
385
|
+
* attribute beyond the id, because a tombstone must never carry a field the
|
|
386
|
+
* staff view itself withholds — `CouponPromotion.couponCode` above all —
|
|
387
|
+
* and every extra key is one more thing to withhold correctly.
|
|
388
|
+
*/
|
|
389
|
+
type PromotionStaffTombstone = {
|
|
390
|
+
promotionId: string;
|
|
391
|
+
status: PromotionBase['status'];
|
|
392
|
+
/** Always `false` — the literal is the discriminant a client branches on. */
|
|
393
|
+
staffVisible: false;
|
|
394
|
+
};
|
|
373
395
|
/**
|
|
374
396
|
* What arms an {@link AutomationRule} — the SIGNAL a rule listens for.
|
|
375
397
|
*
|