@shipstatic/types 0.3.12 → 0.3.13
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/index.d.ts +10 -19
- package/package.json +1 -1
- package/src/index.ts +11 -21
package/dist/index.d.ts
CHANGED
|
@@ -442,31 +442,30 @@ export interface TokenResource {
|
|
|
442
442
|
}
|
|
443
443
|
/**
|
|
444
444
|
* Billing status response from GET /billing/status
|
|
445
|
+
*
|
|
446
|
+
* Note: The user's `plan` comes from Account, not here.
|
|
447
|
+
* This endpoint only returns billing-specific data (usage, portal, etc.)
|
|
448
|
+
*
|
|
449
|
+
* If `billing` is null, the user has no active billing.
|
|
445
450
|
*/
|
|
446
451
|
export interface BillingStatus {
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
/** Current account plan */
|
|
450
|
-
plan: AccountPlanType;
|
|
451
|
-
/** Creem billing ID (if subscribed) */
|
|
452
|
-
billing?: string;
|
|
452
|
+
/** Creem billing ID, or null if no active billing */
|
|
453
|
+
billing: string | null;
|
|
453
454
|
/** Number of billing units (1 unit = 1 custom domain) */
|
|
454
455
|
units?: number;
|
|
455
456
|
/** Number of custom domains currently in use */
|
|
456
|
-
|
|
457
|
+
usage?: number;
|
|
457
458
|
/** Billing status from Creem (active, trialing, canceled, etc.) */
|
|
458
459
|
status?: string;
|
|
459
460
|
/** Link to Creem customer portal for billing management */
|
|
460
|
-
|
|
461
|
+
portal?: string | null;
|
|
461
462
|
}
|
|
462
463
|
/**
|
|
463
464
|
* Checkout session response from POST /billing/checkout
|
|
464
465
|
*/
|
|
465
466
|
export interface CheckoutSession {
|
|
466
467
|
/** URL to redirect user to Creem checkout page */
|
|
467
|
-
|
|
468
|
-
/** Creem checkout session ID */
|
|
469
|
-
checkoutId: string;
|
|
468
|
+
url: string;
|
|
470
469
|
}
|
|
471
470
|
/**
|
|
472
471
|
* Billing resource interface - the contract all implementations must follow
|
|
@@ -486,14 +485,6 @@ export interface BillingResource {
|
|
|
486
485
|
*/
|
|
487
486
|
status: () => Promise<BillingStatus>;
|
|
488
487
|
}
|
|
489
|
-
/**
|
|
490
|
-
* @deprecated Use BillingStatus instead. Kept for backward compatibility.
|
|
491
|
-
*/
|
|
492
|
-
export type SubscriptionStatus = BillingStatus;
|
|
493
|
-
/**
|
|
494
|
-
* @deprecated Use BillingResource instead. Kept for backward compatibility.
|
|
495
|
-
*/
|
|
496
|
-
export type SubscriptionResource = BillingResource;
|
|
497
488
|
/**
|
|
498
489
|
* Keys resource interface - the contract all implementations must follow
|
|
499
490
|
*/
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -692,32 +692,32 @@ export interface TokenResource {
|
|
|
692
692
|
|
|
693
693
|
/**
|
|
694
694
|
* Billing status response from GET /billing/status
|
|
695
|
+
*
|
|
696
|
+
* Note: The user's `plan` comes from Account, not here.
|
|
697
|
+
* This endpoint only returns billing-specific data (usage, portal, etc.)
|
|
698
|
+
*
|
|
699
|
+
* If `billing` is null, the user has no active billing.
|
|
695
700
|
*/
|
|
696
701
|
export interface BillingStatus {
|
|
697
|
-
/**
|
|
698
|
-
|
|
699
|
-
/** Current account plan */
|
|
700
|
-
plan: AccountPlanType;
|
|
701
|
-
/** Creem billing ID (if subscribed) */
|
|
702
|
-
billing?: string;
|
|
702
|
+
/** Creem billing ID, or null if no active billing */
|
|
703
|
+
billing: string | null;
|
|
703
704
|
/** Number of billing units (1 unit = 1 custom domain) */
|
|
704
705
|
units?: number;
|
|
705
706
|
/** Number of custom domains currently in use */
|
|
706
|
-
|
|
707
|
+
usage?: number;
|
|
707
708
|
/** Billing status from Creem (active, trialing, canceled, etc.) */
|
|
708
709
|
status?: string;
|
|
709
710
|
/** Link to Creem customer portal for billing management */
|
|
710
|
-
|
|
711
|
+
portal?: string | null;
|
|
711
712
|
}
|
|
712
713
|
|
|
714
|
+
|
|
713
715
|
/**
|
|
714
716
|
* Checkout session response from POST /billing/checkout
|
|
715
717
|
*/
|
|
716
718
|
export interface CheckoutSession {
|
|
717
719
|
/** URL to redirect user to Creem checkout page */
|
|
718
|
-
|
|
719
|
-
/** Creem checkout session ID */
|
|
720
|
-
checkoutId: string;
|
|
720
|
+
url: string;
|
|
721
721
|
}
|
|
722
722
|
|
|
723
723
|
/**
|
|
@@ -740,16 +740,6 @@ export interface BillingResource {
|
|
|
740
740
|
status: () => Promise<BillingStatus>;
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
/**
|
|
744
|
-
* @deprecated Use BillingStatus instead. Kept for backward compatibility.
|
|
745
|
-
*/
|
|
746
|
-
export type SubscriptionStatus = BillingStatus;
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* @deprecated Use BillingResource instead. Kept for backward compatibility.
|
|
750
|
-
*/
|
|
751
|
-
export type SubscriptionResource = BillingResource;
|
|
752
|
-
|
|
753
743
|
|
|
754
744
|
/**
|
|
755
745
|
* Keys resource interface - the contract all implementations must follow
|