@shipstatic/types 0.3.8 → 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/README.md CHANGED
@@ -48,7 +48,7 @@ interface Account {
48
48
  email: string; // User email address
49
49
  name: string; // User display name
50
50
  picture?: string; // Profile picture URL
51
- plan: 'free' | 'active' | 'suspended'; // Account plan status
51
+ plan: 'free' | 'standard' | 'sponsored' | 'enterprise' | 'suspended' | 'terminating' | 'terminated'; // Account plan status
52
52
  created: number; // Unix timestamp (seconds)
53
53
  }
54
54
  ```
package/dist/index.d.ts CHANGED
@@ -147,7 +147,7 @@ export interface TokenCreateResponse {
147
147
  */
148
148
  export declare const AccountPlan: {
149
149
  readonly FREE: "free";
150
- readonly PAID: "paid";
150
+ readonly STANDARD: "standard";
151
151
  readonly SPONSORED: "sponsored";
152
152
  readonly ENTERPRISE: "enterprise";
153
153
  readonly SUSPENDED: "suspended";
@@ -303,6 +303,7 @@ export declare const AuthMethod: {
303
303
  readonly API_KEY: "apiKey";
304
304
  readonly TOKEN: "token";
305
305
  readonly WEBHOOK: "webhook";
306
+ readonly SYSTEM: "system";
306
307
  };
307
308
  export type AuthMethodType = typeof AuthMethod[keyof typeof AuthMethod];
308
309
  export declare const DEPLOYMENT_CONFIG_FILENAME = "ship.json";
@@ -439,26 +440,26 @@ export interface TokenResource {
439
440
  remove: (token: string) => Promise<void>;
440
441
  }
441
442
  /**
442
- * Subscription status response from GET /subscriptions/status
443
+ * Billing status response from GET /billing/status
443
444
  */
444
- export interface SubscriptionStatus {
445
- /** Whether the account has an active subscription */
446
- hasSubscription: boolean;
445
+ export interface BillingStatus {
446
+ /** Whether the account has an active billing plan */
447
+ hasActiveBilling: boolean;
447
448
  /** Current account plan */
448
449
  plan: AccountPlanType;
449
- /** Creem subscription ID (if subscribed) */
450
- subscriptionId?: string;
451
- /** 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) */
452
453
  units?: number;
453
454
  /** Number of custom domains currently in use */
454
455
  customDomains?: number;
455
- /** Subscription status from Creem (active, trialing, canceled, etc.) */
456
+ /** Billing status from Creem (active, trialing, canceled, etc.) */
456
457
  status?: string;
457
- /** Link to Creem customer portal for subscription management */
458
+ /** Link to Creem customer portal for billing management */
458
459
  portalLink?: string | null;
459
460
  }
460
461
  /**
461
- * Checkout session response from POST /subscriptions/checkout
462
+ * Checkout session response from POST /billing/checkout
462
463
  */
463
464
  export interface CheckoutSession {
464
465
  /** URL to redirect user to Creem checkout page */
@@ -467,22 +468,22 @@ export interface CheckoutSession {
467
468
  checkoutId: string;
468
469
  }
469
470
  /**
470
- * Subscription resource interface - the contract all implementations must follow
471
+ * Billing resource interface - the contract all implementations must follow
471
472
  *
472
473
  * IMPOSSIBLE SIMPLICITY: No sync() method needed!
473
474
  * Webhooks are the single source of truth. Frontend just polls status().
474
475
  */
475
- export interface SubscriptionResource {
476
+ export interface BillingResource {
476
477
  /**
477
478
  * Create a checkout session
478
479
  * @returns Checkout session with URL to redirect user
479
480
  */
480
481
  checkout: () => Promise<CheckoutSession>;
481
482
  /**
482
- * Get current subscription status
483
- * @returns Subscription status and usage information
483
+ * Get current billing status
484
+ * @returns Billing status and usage information
484
485
  */
485
- status: () => Promise<SubscriptionStatus>;
486
+ status: () => Promise<BillingStatus>;
486
487
  }
487
488
  /**
488
489
  * Keys resource interface - the contract all implementations must follow
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ export const DomainStatus = {
34
34
  */
35
35
  export const AccountPlan = {
36
36
  FREE: 'free',
37
- PAID: 'paid',
37
+ STANDARD: 'standard',
38
38
  SPONSORED: 'sponsored',
39
39
  ENTERPRISE: 'enterprise',
40
40
  SUSPENDED: 'suspended',
@@ -194,7 +194,8 @@ export const AuthMethod = {
194
194
  JWT: 'jwt',
195
195
  API_KEY: 'apiKey',
196
196
  TOKEN: 'token',
197
- WEBHOOK: 'webhook'
197
+ WEBHOOK: 'webhook',
198
+ SYSTEM: 'system'
198
199
  };
199
200
  // Deployment Configuration
200
201
  export const DEPLOYMENT_CONFIG_FILENAME = 'ship.json';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.3.8",
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
@@ -177,7 +177,7 @@ export interface TokenCreateResponse {
177
177
  */
178
178
  export const AccountPlan = {
179
179
  FREE: 'free',
180
- PAID: 'paid',
180
+ STANDARD: 'standard',
181
181
  SPONSORED: 'sponsored',
182
182
  ENTERPRISE: 'enterprise',
183
183
  SUSPENDED: 'suspended',
@@ -467,7 +467,8 @@ export const AuthMethod = {
467
467
  JWT: 'jwt',
468
468
  API_KEY: 'apiKey',
469
469
  TOKEN: 'token',
470
- WEBHOOK: 'webhook'
470
+ WEBHOOK: 'webhook',
471
+ SYSTEM: 'system'
471
472
  } as const;
472
473
 
473
474
  export type AuthMethodType = typeof AuthMethod[keyof typeof AuthMethod];
@@ -685,31 +686,31 @@ export interface TokenResource {
685
686
  }
686
687
 
687
688
  // =============================================================================
688
- // SUBSCRIPTION TYPES
689
+ // BILLING TYPES
689
690
  // =============================================================================
690
691
 
691
692
  /**
692
- * Subscription status response from GET /subscriptions/status
693
+ * Billing status response from GET /billing/status
693
694
  */
694
- export interface SubscriptionStatus {
695
- /** Whether the account has an active subscription */
696
- hasSubscription: boolean;
695
+ export interface BillingStatus {
696
+ /** Whether the account has an active billing plan */
697
+ hasActiveBilling: boolean;
697
698
  /** Current account plan */
698
699
  plan: AccountPlanType;
699
- /** Creem subscription ID (if subscribed) */
700
- subscriptionId?: string;
701
- /** 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) */
702
703
  units?: number;
703
704
  /** Number of custom domains currently in use */
704
705
  customDomains?: number;
705
- /** Subscription status from Creem (active, trialing, canceled, etc.) */
706
+ /** Billing status from Creem (active, trialing, canceled, etc.) */
706
707
  status?: string;
707
- /** Link to Creem customer portal for subscription management */
708
+ /** Link to Creem customer portal for billing management */
708
709
  portalLink?: string | null;
709
710
  }
710
711
 
711
712
  /**
712
- * Checkout session response from POST /subscriptions/checkout
713
+ * Checkout session response from POST /billing/checkout
713
714
  */
714
715
  export interface CheckoutSession {
715
716
  /** URL to redirect user to Creem checkout page */
@@ -719,12 +720,12 @@ export interface CheckoutSession {
719
720
  }
720
721
 
721
722
  /**
722
- * Subscription resource interface - the contract all implementations must follow
723
+ * Billing resource interface - the contract all implementations must follow
723
724
  *
724
725
  * IMPOSSIBLE SIMPLICITY: No sync() method needed!
725
726
  * Webhooks are the single source of truth. Frontend just polls status().
726
727
  */
727
- export interface SubscriptionResource {
728
+ export interface BillingResource {
728
729
  /**
729
730
  * Create a checkout session
730
731
  * @returns Checkout session with URL to redirect user
@@ -732,10 +733,10 @@ export interface SubscriptionResource {
732
733
  checkout: () => Promise<CheckoutSession>;
733
734
 
734
735
  /**
735
- * Get current subscription status
736
- * @returns Subscription status and usage information
736
+ * Get current billing status
737
+ * @returns Billing status and usage information
737
738
  */
738
- status: () => Promise<SubscriptionStatus>;
739
+ status: () => Promise<BillingStatus>;
739
740
  }
740
741
 
741
742
  /**