@rodrigobeber/patoai-dtos 4.6.15 → 4.6.16

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.
@@ -7,7 +7,8 @@ export interface BillingSubscriptionActivatedDto {
7
7
  perExtra: number;
8
8
  periodStart: string;
9
9
  periodEnd: string;
10
- stripeSubscriptionId: string;
10
+ subscriptionId: string;
11
+ billingType: string;
11
12
  }
12
13
  export interface BillingSubscriptionRenewedDto {
13
14
  idCrew: number;
@@ -15,7 +16,7 @@ export interface BillingSubscriptionRenewedDto {
15
16
  included: number;
16
17
  price: number;
17
18
  perExtra: number;
18
- stripeSubscriptionId: string;
19
+ subscriptionId: string;
19
20
  periodStart: string;
20
21
  periodEnd: string;
21
22
  }
@@ -38,7 +39,8 @@ export interface BillingCreditsPurchasedDto {
38
39
  export interface BillingPaymentFailedDto {
39
40
  idCrew: number;
40
41
  amount: number;
41
- invoiceId: string;
42
+ asaasPaymentId: string;
43
+ graceDeadline: string;
42
44
  }
43
45
  export interface BillingSubscriptionUpgradedDto {
44
46
  idCrew: number;
@@ -71,6 +73,8 @@ export interface BillingCanOperateResponseDto {
71
73
  planCredits: number;
72
74
  extraCredits: number;
73
75
  hasPendingInvoice: boolean;
76
+ trial?: boolean;
77
+ trialEnd?: string;
74
78
  reason?: string;
75
79
  }
76
80
  export interface BillingCreditConsumedDto {
@@ -81,3 +85,9 @@ export interface BillingCreditConsumedDto {
81
85
  export interface BillingGetBalanceRequestDto {
82
86
  idCrew: number;
83
87
  }
88
+ export interface CrewGetTrialDateRequestDto {
89
+ idCrew: number;
90
+ }
91
+ export interface CrewGetTrialDateResponseDto {
92
+ trial: string | null;
93
+ }
@@ -1,23 +1,17 @@
1
1
  export interface CreateCheckoutSessionDto {
2
2
  idCrew: number;
3
3
  planSlug: string;
4
- successUrl: string;
5
- cancelUrl: string;
4
+ billingType: string;
6
5
  }
7
6
  export interface CreatePurchaseCheckoutDto {
8
7
  idCrew: number;
9
8
  idCreditPackage: number;
10
- successUrl: string;
11
- cancelUrl: string;
12
- }
13
- export interface CreatePortalSessionDto {
14
- idCrew: number;
15
- returnUrl: string;
9
+ billingType: string;
16
10
  }
17
11
  export interface ReactivateSubscriptionDto {
18
12
  idCrew: number;
19
13
  }
20
- export interface StripePlanDto {
14
+ export interface PlanDto {
21
15
  id: number;
22
16
  name: string;
23
17
  slug: string;
@@ -45,6 +39,9 @@ export interface SubscriptionStatusDto {
45
39
  currentPeriodEnd: string | null;
46
40
  cancelAtPeriodEnd: boolean;
47
41
  pendingDowngradePlan: string | null;
42
+ billingType: string | null;
43
+ trialEnd: string | null;
44
+ graceDeadline: string | null;
48
45
  }
49
46
  export interface UpgradeSubscriptionDto {
50
47
  idCrew: number;
@@ -57,6 +54,10 @@ export interface DowngradeSubscriptionDto {
57
54
  export interface CancelDowngradeDto {
58
55
  idCrew: number;
59
56
  }
57
+ export interface UpdateBillingTypeDto {
58
+ idCrew: number;
59
+ billingType: string;
60
+ }
60
61
  export interface BillingBalanceDto {
61
62
  idCrew: number;
62
63
  planCredits: number;
@@ -73,11 +74,10 @@ export interface CreditTransactionDto {
73
74
  amount: number;
74
75
  balanceAfter: number;
75
76
  description: string;
76
- stripeInvoiceId: string | null;
77
- stripeSessionId: string | null;
77
+ asaasPaymentId: string | null;
78
78
  createdAt: string;
79
79
  }
80
80
  export interface CheckoutResponseDto {
81
81
  url: string;
82
- type: 'checkout' | 'portal';
82
+ type: 'checkout' | 'payment_link';
83
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rodrigobeber/patoai-dtos",
3
- "version": "4.6.15",
3
+ "version": "4.6.16",
4
4
  "description": "Data Transfer Objects for PatoAI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",