sinfactura-types 1.1.1 → 1.1.2
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/subscription.d.ts +26 -4
- package/package.json +1 -1
package/dist/subscription.d.ts
CHANGED
|
@@ -77,12 +77,17 @@ declare global {
|
|
|
77
77
|
label: string;
|
|
78
78
|
/** Short marketing tagline (Spanish). */
|
|
79
79
|
blurb?: string;
|
|
80
|
-
/** Price in
|
|
80
|
+
/** Price in the plan's `currency` smallest unit for monthly billing. `null` = contactar. */
|
|
81
81
|
priceMonthly: number | null;
|
|
82
|
-
/** Price in
|
|
82
|
+
/** Price in the plan's `currency` smallest unit for annual billing (total / 12; ~20% discount). `null` = contactar. */
|
|
83
83
|
priceAnnual: number | null;
|
|
84
|
-
/**
|
|
85
|
-
|
|
84
|
+
/**
|
|
85
|
+
* Currency the prices are denominated in. `'ARS'` at launch; `'USD'`
|
|
86
|
+
* is the migration target (api#841). Widened from the launch-only
|
|
87
|
+
* `'ARS'` literal in api#842 so the FE can render either currency
|
|
88
|
+
* without a type change once the platform flips.
|
|
89
|
+
*/
|
|
90
|
+
currency: 'ARS' | 'USD';
|
|
86
91
|
/**
|
|
87
92
|
* Whether the plan is accepting new subscribers. Closed-cohort plans
|
|
88
93
|
* (e.g. Founders after 2026-05-31) set this to `false` without deleting
|
|
@@ -99,6 +104,14 @@ declare global {
|
|
|
99
104
|
/** Stripe Price IDs once the plan is wired to Stripe Products (api#627). */
|
|
100
105
|
stripeMonthlyPriceId?: string;
|
|
101
106
|
stripeAnnualPriceId?: string;
|
|
107
|
+
/**
|
|
108
|
+
* MercadoPago PreApprovalPlan IDs — populated by the future
|
|
109
|
+
* `seed-mercadopago-plans` Lambda (api#843). Coexist with the Stripe
|
|
110
|
+
* IDs above on the same Plan row so both providers' state can live
|
|
111
|
+
* in one place; unused fields stay dormant.
|
|
112
|
+
*/
|
|
113
|
+
mpPreApprovalPlanIdMonthly?: string;
|
|
114
|
+
mpPreApprovalPlanIdAnnual?: string;
|
|
102
115
|
/** Per-tier entitlement configuration. */
|
|
103
116
|
entitlements: Record<FeatureKey, Entitlement>;
|
|
104
117
|
createdAt: number;
|
|
@@ -113,6 +126,15 @@ declare global {
|
|
|
113
126
|
planTier: PlanTier;
|
|
114
127
|
status: SubscriptionStatus;
|
|
115
128
|
billingCycle: BillingCycle;
|
|
129
|
+
/**
|
|
130
|
+
* Currency this subscription was billed in at checkout time.
|
|
131
|
+
* Snapshotted from the Plan's `currency` field so it survives
|
|
132
|
+
* platform-wide currency switches (api#841 / api#842) — a customer
|
|
133
|
+
* who signed up on ARS keeps being charged in ARS even after the
|
|
134
|
+
* platform flips to USD for new signups. Required for accurate
|
|
135
|
+
* historical reporting + AFIP invoices.
|
|
136
|
+
*/
|
|
137
|
+
currency?: 'ARS' | 'USD';
|
|
116
138
|
/** Current period window (Unix ms). */
|
|
117
139
|
currentPeriodStart: number;
|
|
118
140
|
currentPeriodEnd: number;
|