@shipstatic/types 0.3.9 → 0.3.10

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 CHANGED
@@ -440,26 +440,26 @@ export interface TokenResource {
440
440
  remove: (token: string) => Promise<void>;
441
441
  }
442
442
  /**
443
- * Subscription status response from GET /subscriptions/status
443
+ * Billing status response from GET /billing/status
444
444
  */
445
- export interface SubscriptionStatus {
446
- /** Whether the account has an active subscription */
447
- hasSubscription: boolean;
445
+ export interface BillingStatus {
446
+ /** Whether the account has an active billing plan */
447
+ hasActiveBilling: boolean;
448
448
  /** Current account plan */
449
449
  plan: AccountPlanType;
450
- /** Creem subscription ID (if subscribed) */
451
- subscriptionId?: string;
452
- /** Number of subscription units (1 unit = 1 custom domain) */
450
+ /** Creem billing ID (if subscribed) */
451
+ billing?: string;
452
+ /** Number of billing units (1 unit = 1 custom domain) */
453
453
  units?: number;
454
454
  /** Number of custom domains currently in use */
455
455
  customDomains?: number;
456
- /** Subscription status from Creem (active, trialing, canceled, etc.) */
456
+ /** Billing status from Creem (active, trialing, canceled, etc.) */
457
457
  status?: string;
458
- /** Link to Creem customer portal for subscription management */
458
+ /** Link to Creem customer portal for billing management */
459
459
  portalLink?: string | null;
460
460
  }
461
461
  /**
462
- * Checkout session response from POST /subscriptions/checkout
462
+ * Checkout session response from POST /billing/checkout
463
463
  */
464
464
  export interface CheckoutSession {
465
465
  /** URL to redirect user to Creem checkout page */
@@ -468,22 +468,22 @@ export interface CheckoutSession {
468
468
  checkoutId: string;
469
469
  }
470
470
  /**
471
- * Subscription resource interface - the contract all implementations must follow
471
+ * Billing resource interface - the contract all implementations must follow
472
472
  *
473
473
  * IMPOSSIBLE SIMPLICITY: No sync() method needed!
474
474
  * Webhooks are the single source of truth. Frontend just polls status().
475
475
  */
476
- export interface SubscriptionResource {
476
+ export interface BillingResource {
477
477
  /**
478
478
  * Create a checkout session
479
479
  * @returns Checkout session with URL to redirect user
480
480
  */
481
481
  checkout: () => Promise<CheckoutSession>;
482
482
  /**
483
- * Get current subscription status
484
- * @returns Subscription status and usage information
483
+ * Get current billing status
484
+ * @returns Billing status and usage information
485
485
  */
486
- status: () => Promise<SubscriptionStatus>;
486
+ status: () => Promise<BillingStatus>;
487
487
  }
488
488
  /**
489
489
  * Keys resource interface - the contract all implementations must follow
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -686,31 +686,31 @@ export interface TokenResource {
686
686
  }
687
687
 
688
688
  // =============================================================================
689
- // SUBSCRIPTION TYPES
689
+ // BILLING TYPES
690
690
  // =============================================================================
691
691
 
692
692
  /**
693
- * Subscription status response from GET /subscriptions/status
693
+ * Billing status response from GET /billing/status
694
694
  */
695
- export interface SubscriptionStatus {
696
- /** Whether the account has an active subscription */
697
- hasSubscription: boolean;
695
+ export interface BillingStatus {
696
+ /** Whether the account has an active billing plan */
697
+ hasActiveBilling: boolean;
698
698
  /** Current account plan */
699
699
  plan: AccountPlanType;
700
- /** Creem subscription ID (if subscribed) */
701
- subscriptionId?: string;
702
- /** Number of subscription units (1 unit = 1 custom domain) */
700
+ /** Creem billing ID (if subscribed) */
701
+ billing?: string;
702
+ /** Number of billing units (1 unit = 1 custom domain) */
703
703
  units?: number;
704
704
  /** Number of custom domains currently in use */
705
705
  customDomains?: number;
706
- /** Subscription status from Creem (active, trialing, canceled, etc.) */
706
+ /** Billing status from Creem (active, trialing, canceled, etc.) */
707
707
  status?: string;
708
- /** Link to Creem customer portal for subscription management */
708
+ /** Link to Creem customer portal for billing management */
709
709
  portalLink?: string | null;
710
710
  }
711
711
 
712
712
  /**
713
- * Checkout session response from POST /subscriptions/checkout
713
+ * Checkout session response from POST /billing/checkout
714
714
  */
715
715
  export interface CheckoutSession {
716
716
  /** URL to redirect user to Creem checkout page */
@@ -720,12 +720,12 @@ export interface CheckoutSession {
720
720
  }
721
721
 
722
722
  /**
723
- * Subscription resource interface - the contract all implementations must follow
723
+ * Billing resource interface - the contract all implementations must follow
724
724
  *
725
725
  * IMPOSSIBLE SIMPLICITY: No sync() method needed!
726
726
  * Webhooks are the single source of truth. Frontend just polls status().
727
727
  */
728
- export interface SubscriptionResource {
728
+ export interface BillingResource {
729
729
  /**
730
730
  * Create a checkout session
731
731
  * @returns Checkout session with URL to redirect user
@@ -733,10 +733,10 @@ export interface SubscriptionResource {
733
733
  checkout: () => Promise<CheckoutSession>;
734
734
 
735
735
  /**
736
- * Get current subscription status
737
- * @returns Subscription status and usage information
736
+ * Get current billing status
737
+ * @returns Billing status and usage information
738
738
  */
739
- status: () => Promise<SubscriptionStatus>;
739
+ status: () => Promise<BillingStatus>;
740
740
  }
741
741
 
742
742
  /**