ad2app-lib 1.6.1 → 1.7.0

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.
@@ -4,7 +4,7 @@
4
4
  * Covers subscription tier state, Stripe checkout flows,
5
5
  * and the customer portal redirect.
6
6
  */
7
- export type SchedulingSubscriptionTier = 'free' | 'pro';
7
+ export type SchedulingSubscriptionTier = 'free' | 'starter' | 'pro';
8
8
  export type SchedulingSubscriptionStatus = 'active' | 'canceled' | 'expired';
9
9
  /**
10
10
  * Current subscription state for the authenticated user.
@@ -14,6 +14,7 @@ export declare class SchedulingSubscriptionInfoDTO {
14
14
  tier: SchedulingSubscriptionTier;
15
15
  status: SchedulingSubscriptionStatus;
16
16
  expiresAt: string | null;
17
+ maxPlatforms: number;
17
18
  constructor(data: SchedulingSubscriptionInfoDTO);
18
19
  }
19
20
  /**
@@ -32,6 +33,18 @@ export declare class SchedulingPortalSessionResultDTO {
32
33
  url: string;
33
34
  constructor(data: SchedulingPortalSessionResultDTO);
34
35
  }
36
+ export interface SchedulingPlanPriceDTO {
37
+ tier: 'starter' | 'pro';
38
+ amount: number;
39
+ currency: string;
40
+ interval: string;
41
+ maxPlatforms: number;
42
+ }
43
+ export declare class SchedulingProductPricesDTO {
44
+ starter: SchedulingPlanPriceDTO;
45
+ pro: SchedulingPlanPriceDTO;
46
+ constructor(data: SchedulingProductPricesDTO);
47
+ }
35
48
  /**
36
49
  * Aggregated Pro-upgrade context DTO.
37
50
  * Combines subscription info with action URLs for UI display.
@@ -6,7 +6,7 @@
6
6
  * and the customer portal redirect.
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.SchedulingProUpgradeDTO = exports.SchedulingPortalSessionResultDTO = exports.SchedulingCheckoutSessionResultDTO = exports.SchedulingSubscriptionInfoDTO = void 0;
9
+ exports.SchedulingProUpgradeDTO = exports.SchedulingProductPricesDTO = exports.SchedulingPortalSessionResultDTO = exports.SchedulingCheckoutSessionResultDTO = exports.SchedulingSubscriptionInfoDTO = void 0;
10
10
  // ── SchedulingSubscriptionInfoDTO ────────────────────────────────────────────
11
11
  /**
12
12
  * Current subscription state for the authenticated user.
@@ -17,6 +17,7 @@ class SchedulingSubscriptionInfoDTO {
17
17
  this.tier = data.tier;
18
18
  this.status = data.status;
19
19
  this.expiresAt = data.expiresAt;
20
+ this.maxPlatforms = data.maxPlatforms;
20
21
  }
21
22
  }
22
23
  exports.SchedulingSubscriptionInfoDTO = SchedulingSubscriptionInfoDTO;
@@ -42,6 +43,14 @@ class SchedulingPortalSessionResultDTO {
42
43
  }
43
44
  }
44
45
  exports.SchedulingPortalSessionResultDTO = SchedulingPortalSessionResultDTO;
46
+ // ── SchedulingProductPricesDTO ────────────────────────────────────────────────
47
+ class SchedulingProductPricesDTO {
48
+ constructor(data) {
49
+ this.starter = data.starter;
50
+ this.pro = data.pro;
51
+ }
52
+ }
53
+ exports.SchedulingProductPricesDTO = SchedulingProductPricesDTO;
45
54
  // ── SchedulingProUpgradeDTO ───────────────────────────────────────────────────
46
55
  /**
47
56
  * Aggregated Pro-upgrade context DTO.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ad2app-lib",
3
- "version": "1.6.1",
3
+ "version": "1.7.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -7,7 +7,7 @@
7
7
 
8
8
  // ── SchedulingSubscriptionTier ────────────────────────────────────────────────
9
9
 
10
- export type SchedulingSubscriptionTier = 'free' | 'pro';
10
+ export type SchedulingSubscriptionTier = 'free' | 'starter' | 'pro';
11
11
 
12
12
  // ── SchedulingSubscriptionStatus ─────────────────────────────────────────────
13
13
 
@@ -23,11 +23,13 @@ export class SchedulingSubscriptionInfoDTO {
23
23
  tier: SchedulingSubscriptionTier;
24
24
  status: SchedulingSubscriptionStatus;
25
25
  expiresAt: string | null;
26
+ maxPlatforms: number;
26
27
 
27
28
  constructor(data: SchedulingSubscriptionInfoDTO) {
28
29
  this.tier = data.tier;
29
30
  this.status = data.status;
30
31
  this.expiresAt = data.expiresAt;
32
+ this.maxPlatforms = data.maxPlatforms;
31
33
  }
32
34
  }
33
35
 
@@ -59,6 +61,28 @@ export class SchedulingPortalSessionResultDTO {
59
61
  }
60
62
  }
61
63
 
64
+ // ── SchedulingPlanPriceDTO ────────────────────────────────────────────────────
65
+
66
+ export interface SchedulingPlanPriceDTO {
67
+ tier: 'starter' | 'pro';
68
+ amount: number;
69
+ currency: string;
70
+ interval: string;
71
+ maxPlatforms: number;
72
+ }
73
+
74
+ // ── SchedulingProductPricesDTO ────────────────────────────────────────────────
75
+
76
+ export class SchedulingProductPricesDTO {
77
+ starter: SchedulingPlanPriceDTO;
78
+ pro: SchedulingPlanPriceDTO;
79
+
80
+ constructor(data: SchedulingProductPricesDTO) {
81
+ this.starter = data.starter;
82
+ this.pro = data.pro;
83
+ }
84
+ }
85
+
62
86
  // ── SchedulingProUpgradeDTO ───────────────────────────────────────────────────
63
87
 
64
88
  /**