sinfactura-types 1.10.342 → 1.10.344

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 CHANGED
@@ -716,6 +716,26 @@ declare global {
716
716
  * race gets the same permanent answer either way.
717
717
  */
718
718
  type CouponRefusal = 'COUPON_NOT_FOUND' | 'COUPON_NOT_ACTIVE' | 'COUPON_EXPIRED' | 'COUPON_EXHAUSTED' | 'COUPON_EXHAUSTED_AT_CHECKOUT' | 'COUPON_MIN_SUBTOTAL' | 'COUPON_REQUIRES_CUSTOMER' | 'COUPON_BUDGET_EXHAUSTED' | 'COUPON_RATE_LIMITED' | 'COUPON_CURRENCY_MISMATCH';
719
+ /**
720
+ * Why a promotion is not available to a cart.
721
+ *
722
+ * ⚠️ **Raised at TWO points with the same vocabulary, and the second is the
723
+ * one that matters.** Applying a promotion judges these once
724
+ * (`400`, the shopper chose something unavailable); CHECKOUT re-judges them
725
+ * against a fresh promotion row and answers `409 CART_PROMOTION_UNAVAILABLE`
726
+ * carrying this code in `data.reason`. The cart's frozen `CartPromotion`
727
+ * holds only the mechanic TERMS — no window, no status — so nothing on the
728
+ * cart-write path can notice a promotion that ended after it was applied.
729
+ *
730
+ * ⚠️ The CHECKOUT refusal is never the shopper's fault. There is no
731
+ * `_AT_CHECKOUT` split here, unlike {@link CouponRefusal}: a coupon splits
732
+ * because a per-customer cap can be raced by the SAME shopper submitting
733
+ * twice, so "you already used this" is sometimes true. A promotion carries
734
+ * no per-customer counter and no global one, so every checkout-time refusal
735
+ * means the merchant changed something while the cart sat. Copy should say
736
+ * so, and must not imply the shopper did anything.
737
+ */
738
+ type PromotionRefusal = 'PROMOTION_NOT_FOUND' | 'PROMOTION_NOT_ACTIVE' | 'PROMOTION_NOT_STARTED' | 'PROMOTION_EXPIRED' | 'PROMOTION_NOT_CART_APPLICABLE';
719
739
  /**
720
740
  * The request body for every cart mutation, discriminated on `mode`.
721
741
  *
package/dist/invoice.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  declare global {
2
- type FiscalStatus = 'pending_cae' | 'authorized_cae' | 'authorized_caea' | 'caea_reported' | 'rejected' | 'voided';
2
+ type FiscalStatus = 'pending_cae' | 'authorized_cae' | 'authorized_caea' | 'caea_reported' | 'rejected';
3
3
  /**
4
4
  * One discriminated IVA alicuota on an issued voucher.
5
5
  *
@@ -379,7 +379,7 @@ declare global {
379
379
  caea: string;
380
380
  validFrom: string;
381
381
  validTo: string;
382
- status: 'active' | 'used' | 'informed' | 'expired';
382
+ status: 'active' | 'informed';
383
383
  invoiceCount: number;
384
384
  informedAt?: string;
385
385
  fchTopeInf?: string;
@@ -546,7 +546,7 @@ declare global {
546
546
  }[];
547
547
  fetchedAt: string;
548
548
  }
549
- type FceStatus = 'emitted' | 'accepted' | 'rejected' | 'ceded';
549
+ type FceStatus = 'emitted' | 'accepted' | 'rejected';
550
550
  /** FCE-specific fields, present only when Invoice.invoiceType is 201/202/203, 206/207/208, or 211/212/213. */
551
551
  interface FceFields {
552
552
  cbu: string;
@@ -554,7 +554,6 @@ declare global {
554
554
  status: FceStatus;
555
555
  statusChangedAt?: string;
556
556
  acceptanceDeadline: string;
557
- cesionId?: string;
558
557
  }
559
558
  /**
560
559
  * The annually/periodically-adjusted FCE threshold -- do not hard-code the
package/dist/order.d.ts CHANGED
@@ -807,7 +807,7 @@ declare global {
807
807
  * - `ready` — `readyAt > 0`.
808
808
  * - `delivered` — `deliveredAt > 0` or `deliveredDate > 0`.
809
809
  * - `disabled` — `disabled === true` (soft-delete; NOT cancellation).
810
- * - `invoiced` — `invoices[]` holds a voucher that is not `rejected`/`voided`.
810
+ * - `invoiced` — `invoices[]` holds a voucher that is not `rejected`.
811
811
  * A voucher with no `fiscalStatus` at all is legacy and counts as live.
812
812
  * - `payment-linked` — `linkedPayments` is non-empty. The platform never
813
813
  * unlinks or refunds a provider payment on the operator's behalf.
@@ -88,7 +88,7 @@ declare global {
88
88
  * needs: "an accept/reject is owed and the clock is running". Sharing one enum
89
89
  * across both sides is precisely the semantic collision `typecheck` cannot police.
90
90
  */
91
- type SupplierInvoiceFceStatus = 'pending' | 'accepted' | 'rejected' | 'ceded';
91
+ type SupplierInvoiceFceStatus = 'pending' | 'accepted' | 'rejected';
92
92
  interface SupplierInvoiceFce {
93
93
  status: SupplierInvoiceFceStatus;
94
94
  statusChangedAt?: string;
@@ -112,7 +112,6 @@ declare global {
112
112
  codTipoCmp?: number;
113
113
  /** The EMISOR's CBU. The buyer never sets this — recorded as observed. */
114
114
  emisorCbu?: string;
115
- cesionId?: string;
116
115
  /** From WSFECRED `MotivoRechazoType`, stamped when THIS tenant rejected. */
117
116
  rejection?: {
118
117
  codMotivo: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sinfactura-types",
3
- "version": "1.10.342",
3
+ "version": "1.10.344",
4
4
  "description": "Shared wire and entity contracts for the SINFACTURA platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",