sinfactura-types 1.7.3 → 1.7.5
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 +1 -0
- package/dist/subscription.d.ts +28 -6
- package/package.json +1 -1
package/dist/store.d.ts
CHANGED
package/dist/subscription.d.ts
CHANGED
|
@@ -294,20 +294,42 @@ declare global {
|
|
|
294
294
|
entitlements: SubscriptionEntitlementEntry[];
|
|
295
295
|
usage: SubscriptionUsageEntry[];
|
|
296
296
|
}
|
|
297
|
+
/**
|
|
298
|
+
* Compact subscription summary attached to `Store.subscription` on
|
|
299
|
+
* `GET /tenants` (list) and `GET /tenants?storeId=X` (single-store)
|
|
300
|
+
* responses — the only subscription data SUPERVISOR can read (managerToken
|
|
301
|
+
* still owns the full audit/override surface). No Stripe ids or amounts
|
|
302
|
+
* (least-privilege). Absent entirely on a store with no SUBSCRIPTION row.
|
|
303
|
+
*/
|
|
304
|
+
interface StoreRowSubscriptionSummary {
|
|
305
|
+
planTier: PlanTier;
|
|
306
|
+
status: SubscriptionStatus;
|
|
307
|
+
/** `null` when the row has no billing cycle yet (pre-checkout). */
|
|
308
|
+
billingCycle: BillingCycle | null;
|
|
309
|
+
/** Courtesy-gift cutoff (ADR-0010). `YYYY-MM-DD`, matches `Subscription.freeUntil` — not epoch ms. */
|
|
310
|
+
freeUntil?: string;
|
|
311
|
+
/** Unix ms. Only meaningful while `status === 'trialing'`. */
|
|
312
|
+
trialEndsAt?: number;
|
|
313
|
+
currentPeriodEnd?: number;
|
|
314
|
+
}
|
|
297
315
|
/**
|
|
298
316
|
* Request body for the MANAGER out-of-band override
|
|
299
317
|
* `PUT /platform/stores/{storeId}/subscription` (api#827). No Stripe call —
|
|
300
|
-
* a direct DynamoDB write + audit row. `trialEndsAt` is required
|
|
301
|
-
* `status === 'trialing'`; `reason` is the audit message (min 10 chars).
|
|
318
|
+
* a direct DynamoDB write + audit row. `trialEndsAt` is required (non-null)
|
|
319
|
+
* when `status === 'trialing'`; `reason` is the audit message (min 10 chars).
|
|
320
|
+
*
|
|
321
|
+
* `freeUntil` / `trialEndsAt` are three-state (api#1907): omit the key to
|
|
322
|
+
* leave the existing value untouched, send `null` to clear it, send a value
|
|
323
|
+
* to set it.
|
|
302
324
|
*/
|
|
303
325
|
interface SubscriptionAdminOverrideInput {
|
|
304
326
|
planTier: PlanTier;
|
|
305
327
|
status: SubscriptionStatus;
|
|
306
328
|
billingCycle: BillingCycle;
|
|
307
|
-
/** Courtesy-gift cutoff (ADR-0010), `YYYY-MM-DD`. Optional on any status. */
|
|
308
|
-
freeUntil?: string;
|
|
309
|
-
/** Trial end (Unix ms). Required when `status === 'trialing'
|
|
310
|
-
trialEndsAt?: number;
|
|
329
|
+
/** Courtesy-gift cutoff (ADR-0010), `YYYY-MM-DD`. Optional on any status; `null` clears it. */
|
|
330
|
+
freeUntil?: string | null;
|
|
331
|
+
/** Trial end (Unix ms). Required (non-null) when `status === 'trialing'`; `null` clears it otherwise. */
|
|
332
|
+
trialEndsAt?: number | null;
|
|
311
333
|
reason: string;
|
|
312
334
|
}
|
|
313
335
|
/**
|