sinfactura-types 1.6.27 → 1.6.29
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/store.d.ts +5 -0
- package/dist/subscription.d.ts +45 -6
- package/package.json +1 -1
package/dist/store.d.ts
CHANGED
|
@@ -184,6 +184,11 @@ declare global {
|
|
|
184
184
|
afip?: Afip;
|
|
185
185
|
mercadopago?: Mercadopago;
|
|
186
186
|
whatsapp?: WhatsAppConfig;
|
|
187
|
+
sms?: SmsIntegration;
|
|
188
|
+
}
|
|
189
|
+
interface SmsIntegration {
|
|
190
|
+
/** When true, the store may send SMS through the shared platform account. */
|
|
191
|
+
enabled?: boolean;
|
|
187
192
|
}
|
|
188
193
|
type FxAutoUpdateStrategy = "overwrite" | "overwrite-if-stale" | "notify-only";
|
|
189
194
|
interface FxAutoUpdateBinding {
|
package/dist/subscription.d.ts
CHANGED
|
@@ -178,8 +178,9 @@ declare global {
|
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
180
|
* One audit row per SUPER_ADMIN-driven plan mutation. Returned by
|
|
181
|
-
* `GET /
|
|
182
|
-
*
|
|
181
|
+
* `GET /platform/billing/plans/{tier}/audit` (api#859). The store-subscription
|
|
182
|
+
* audit (api#827) shares this storage shape but is read as
|
|
183
|
+
* `SubscriptionAuditEntry`.
|
|
183
184
|
*
|
|
184
185
|
* `before` and `after` carry only the fields that changed (diff slice),
|
|
185
186
|
* not the full row blob.
|
|
@@ -264,11 +265,13 @@ declare global {
|
|
|
264
265
|
/** A single usage entry as returned by GET /subscription. */
|
|
265
266
|
interface SubscriptionUsageEntry {
|
|
266
267
|
key: FeatureKey;
|
|
267
|
-
/** Period in YYYYMM format. */
|
|
268
|
-
period: string;
|
|
268
|
+
/** Period in YYYYMM format; `null` for lifetime caps (maxProducts/maxCustomers/maxUsers). */
|
|
269
|
+
period: string | null;
|
|
269
270
|
current: number;
|
|
270
|
-
|
|
271
|
-
|
|
271
|
+
/** `null` for unlimited tiers (no cap). */
|
|
272
|
+
limit: number | null;
|
|
273
|
+
/** `null` when `limit` is unlimited/uncapped. */
|
|
274
|
+
remaining: number | null;
|
|
272
275
|
}
|
|
273
276
|
/**
|
|
274
277
|
* Full subscription snapshot pushed to the frontend on subscription/entitlement
|
|
@@ -277,6 +280,8 @@ declare global {
|
|
|
277
280
|
interface SubscriptionSyncPayload {
|
|
278
281
|
planTier: PlanTier;
|
|
279
282
|
status: SubscriptionStatus;
|
|
283
|
+
/** Billing currency snapshotted from the plan template; `null` on free/unbilled tiers (basico). */
|
|
284
|
+
currency: 'ARS' | 'USD' | null;
|
|
280
285
|
billingCycle: BillingCycle | null;
|
|
281
286
|
currentPeriodStart: number | null;
|
|
282
287
|
currentPeriodEnd: number | null;
|
|
@@ -288,5 +293,39 @@ declare global {
|
|
|
288
293
|
entitlements: SubscriptionEntitlementEntry[];
|
|
289
294
|
usage: SubscriptionUsageEntry[];
|
|
290
295
|
}
|
|
296
|
+
/**
|
|
297
|
+
* Request body for the MANAGER out-of-band override
|
|
298
|
+
* `PUT /platform/stores/{storeId}/subscription` (api#827). No Stripe call —
|
|
299
|
+
* a direct DynamoDB write + audit row. `trialEndsAt` is required when
|
|
300
|
+
* `status === 'trialing'`; `reason` is the audit message (min 10 chars).
|
|
301
|
+
*/
|
|
302
|
+
interface SubscriptionAdminOverrideInput {
|
|
303
|
+
planTier: PlanTier;
|
|
304
|
+
status: SubscriptionStatus;
|
|
305
|
+
billingCycle: BillingCycle;
|
|
306
|
+
/** Courtesy-gift cutoff (ADR-0010), `YYYY-MM-DD`. Optional on any status. */
|
|
307
|
+
freeUntil?: string;
|
|
308
|
+
/** Trial end (Unix ms). Required when `status === 'trialing'`. */
|
|
309
|
+
trialEndsAt?: number;
|
|
310
|
+
reason: string;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* One audit row for a MANAGER out-of-band subscription change, as returned by
|
|
314
|
+
* `GET /platform/stores/{storeId}/subscription/audit` (api#827). Written by
|
|
315
|
+
* the override endpoint and the gift endpoint to the
|
|
316
|
+
* `AUDIT#SUBSCRIPTION#{storeId}` partition. `before`/`after` carry the
|
|
317
|
+
* subscription fields an operator can change.
|
|
318
|
+
*/
|
|
319
|
+
interface SubscriptionAuditEntry {
|
|
320
|
+
storeId: string;
|
|
321
|
+
timestamp: number;
|
|
322
|
+
actor: {
|
|
323
|
+
userId: string;
|
|
324
|
+
fullName: string;
|
|
325
|
+
};
|
|
326
|
+
before: Pick<Subscription, 'planTier' | 'status' | 'billingCycle' | 'freeUntil' | 'trialEndsAt'>;
|
|
327
|
+
after: Pick<Subscription, 'planTier' | 'status' | 'billingCycle' | 'freeUntil' | 'trialEndsAt'>;
|
|
328
|
+
reason: string;
|
|
329
|
+
}
|
|
291
330
|
}
|
|
292
331
|
export {};
|