mailmeteor 0.0.9 → 0.0.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.
@@ -14,6 +14,97 @@ export type ErrorResponse = {
14
14
  message: string;
15
15
  code?: 'url_invalid' | 'authentication_required' | 'rate_limit' | 'resource_missing' | 'resource_conflict' | 'resource_exhausted' | 'resource_already_exists' | 'resource_action_required' | 'account_verification_required' | 'account_unauthorized' | 'account_blocked' | 'parameter_missing' | 'parameter_invalid' | 'esp_unsupported' | 'unknown_error' | 'api_error' | 'quota_exceeded' | 'sender_missing_service' | 'sender_insufficient_permission' | 'admin_role_required' | 'TEST_ERROR';
16
16
  };
17
+ export type UserIdQuery = {
18
+ expand?: Array<'subscription'>;
19
+ };
20
+ export type UserIdParams = {
21
+ user_id: string;
22
+ };
23
+ export type UserIdResponse200 = {
24
+ id: string;
25
+ object: 'user';
26
+ email: string;
27
+ name?: string;
28
+ blocked?: boolean;
29
+ plan: string;
30
+ quota: {
31
+ limit: number;
32
+ usage: number;
33
+ available: number;
34
+ updated: string;
35
+ refreshDate?: string;
36
+ };
37
+ organization: string | null;
38
+ /**
39
+ * Creation date as a Unix timestamp (ms)
40
+ */
41
+ created_at: number;
42
+ credentials?: {
43
+ google?: {
44
+ access_token?: string;
45
+ refresh_token?: string;
46
+ expiry_date?: number;
47
+ expires_in?: number;
48
+ update_date?: number;
49
+ scope?: string;
50
+ api_domain?: string;
51
+ };
52
+ microsoft?: {
53
+ access_token?: string;
54
+ refresh_token?: string;
55
+ expiry_date?: number;
56
+ expires_in?: number;
57
+ update_date?: number;
58
+ scope?: string;
59
+ api_domain?: string;
60
+ };
61
+ zoho?: {
62
+ access_token?: string;
63
+ refresh_token?: string;
64
+ expiry_date?: number;
65
+ expires_in?: number;
66
+ update_date?: number;
67
+ scope?: string;
68
+ api_domain?: string;
69
+ };
70
+ sendgrid?: {
71
+ api_key?: string;
72
+ };
73
+ };
74
+ subscription?: {
75
+ id: string;
76
+ created_at: number;
77
+ /**
78
+ * Whether the user is a billing admin
79
+ */
80
+ admin: boolean;
81
+ current_period_start: number;
82
+ current_period_end: number;
83
+ quantity: number;
84
+ currency: string;
85
+ amount: number | null;
86
+ discount_percentage?: number | null;
87
+ name: string | null;
88
+ billing_period: 'day' | 'week' | 'month' | 'year' | null;
89
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business' | null;
90
+ default_payment_method: {
91
+ type: string;
92
+ brand?: string | null;
93
+ last4: string | null;
94
+ exp_month: number | null;
95
+ exp_year: number | null;
96
+ bank_name?: string | null;
97
+ } | null;
98
+ addons: {
99
+ senders?: {
100
+ quantity: number;
101
+ };
102
+ email_warmups?: {
103
+ quantity: number;
104
+ };
105
+ };
106
+ } | null;
107
+ };
17
108
  export type CurrentOrganizationParams = {
18
109
  user_id: string;
19
110
  };
@@ -42,78 +133,59 @@ export type MembersParams = {
42
133
  organization_id: string;
43
134
  };
44
135
  export type MembersResponse200 = Array<{
136
+ user: string;
137
+ roles: Array<'admin' | 'member'>;
138
+ created_at: number;
139
+ updated_at?: number;
140
+ id: string;
141
+ object: 'organization_member';
45
142
  email: string;
46
143
  name?: string;
47
144
  profile_picture_url?: string;
48
- role: 'admin' | 'member';
49
- /**
50
- * Creation date
51
- */
52
- created_at: string;
53
- /**
54
- * Last Update date
55
- */
56
- updated_at?: string;
57
- id: string;
58
- organization_id: string;
59
- object: 'organization_member';
145
+ organization: string;
60
146
  }>;
61
147
  export type MembersBody = {
62
148
  email: string;
63
- role: 'admin' | 'member';
149
+ roles: Array<'admin' | 'member'>;
64
150
  };
65
151
  export type MembersResponse201 = {
152
+ user: string;
153
+ roles: Array<'admin' | 'member'>;
154
+ created_at: number;
155
+ updated_at?: number;
156
+ id: string;
157
+ object: 'organization_member';
66
158
  email: string;
67
159
  name?: string;
68
160
  profile_picture_url?: string;
69
- role: 'admin' | 'member';
70
- /**
71
- * Creation date
72
- */
73
- created_at: string;
74
- /**
75
- * Last Update date
76
- */
77
- updated_at?: string;
78
- id: string;
79
- organization_id: string;
80
- object: 'organization_member';
161
+ organization: string;
81
162
  };
82
163
  export type MemberIdBody = {
83
- role: 'admin' | 'member';
164
+ roles?: Array<'admin' | 'member'>;
84
165
  };
85
166
  export type MemberIdParams = {
86
167
  organization_id: string;
87
168
  member_id: string;
88
169
  };
89
170
  export type MemberIdResponse200 = {
171
+ user: string;
172
+ roles: Array<'admin' | 'member'>;
173
+ created_at: number;
174
+ updated_at?: number;
175
+ id: string;
176
+ object: 'organization_member';
90
177
  email: string;
91
178
  name?: string;
92
179
  profile_picture_url?: string;
93
- role: 'admin' | 'member';
94
- /**
95
- * Creation date
96
- */
97
- created_at: string;
98
- /**
99
- * Last Update date
100
- */
101
- updated_at?: string;
102
- id: string;
103
- organization_id: string;
104
- object: 'organization_member';
180
+ organization: string;
105
181
  };
106
182
  export type OrganizationsResponse200 = Array<{
107
183
  name: string;
108
184
  owner: string;
109
- /**
110
- * Creation date
111
- */
112
- created_at: string;
113
- /**
114
- * Last Update date
115
- */
116
- updated_at?: string;
185
+ customer?: string;
186
+ subscription?: string;
187
+ created_at: number;
188
+ updated_at?: number;
117
189
  id: string;
118
190
  object: 'organization';
119
191
  }>;
@@ -123,14 +195,10 @@ export type OrganizationsBody = {
123
195
  export type OrganizationsResponse201 = {
124
196
  name: string;
125
197
  owner: string;
126
- /**
127
- * Creation date
128
- */
129
- created_at: string;
130
- /**
131
- * Last Update date
132
- */
133
- updated_at?: string;
198
+ customer?: string;
199
+ subscription?: string;
200
+ created_at: number;
201
+ updated_at?: number;
134
202
  id: string;
135
203
  object: 'organization';
136
204
  };
@@ -140,20 +208,45 @@ export type OrganizationIdParams = {
140
208
  export type OrganizationIdResponse200 = {
141
209
  name: string;
142
210
  owner: string;
143
- /**
144
- * Creation date
145
- */
146
- created_at: string;
147
- /**
148
- * Last Update date
149
- */
150
- updated_at?: string;
211
+ customer?: string;
212
+ subscription?: string;
213
+ created_at: number;
214
+ updated_at?: number;
151
215
  id: string;
152
216
  object: 'organization';
153
217
  };
154
218
  export type OrganizationIdBody = {
155
219
  name?: string;
156
220
  };
221
+ export type SubscriptionResponse200 = {
222
+ status: 'confirmation_required' | 'success' | 'payment_failed';
223
+ client_secret?: string;
224
+ failure_code?: string;
225
+ };
226
+ export type SubscriptionBody = {
227
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
228
+ billing_period: 'month' | 'year';
229
+ };
230
+ export type PreviewBody = {
231
+ quantity: number;
232
+ };
233
+ export type PreviewResponse200 = {
234
+ discount_percents: Array<number>;
235
+ total_excluding_tax: number;
236
+ total: number;
237
+ amount_due: number;
238
+ added_from_balance: number;
239
+ consumed_balance: number;
240
+ credited_to_balance: number;
241
+ };
242
+ export type CheckoutBody = {
243
+ price_id: string;
244
+ coupon?: string;
245
+ currency?: 'usd' | 'eur' | 'inr';
246
+ };
247
+ export type CheckoutResponse200 = {
248
+ url: string;
249
+ };
157
250
  export type ContactListsBody = {
158
251
  owner: string;
159
252
  name: string;
@@ -422,33 +515,9 @@ export type AddonsResponse200 = {
422
515
  } | null;
423
516
  };
424
517
  };
425
- export type PreviewBody = {
426
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
427
- billing_period: 'month' | 'year';
428
- };
429
518
  export type PreviewParams = {
430
519
  addon: 'senders' | 'email_warmups';
431
520
  };
432
- export type PreviewResponse200 = {
433
- discount_percents: Array<number>;
434
- total_excluding_tax: number;
435
- total: number;
436
- amount_due: number;
437
- added_from_balance: number;
438
- consumed_balance: number;
439
- credited_to_balance: number;
440
- lines: Array<{
441
- amount: number;
442
- billing_period: 'day' | 'week' | 'month' | 'year';
443
- proration: boolean;
444
- plan?: 'free' | 'starter' | 'pro' | 'premium' | 'business';
445
- addon?: 'senders' | 'email_warmups';
446
- }>;
447
- next_renewal: number;
448
- total_tax_amounts: Array<{
449
- amount: number;
450
- }>;
451
- };
452
521
  export type AddonBody = {
453
522
  quantity: number;
454
523
  };
@@ -460,15 +529,6 @@ export type AddonResponse200 = Array<{
460
529
  email: string;
461
530
  usage: number;
462
531
  }>;
463
- export type SubscriptionResponse200 = {
464
- status: 'confirmation_required' | 'success' | 'payment_failed';
465
- client_secret?: string;
466
- failure_code?: string;
467
- };
468
- export type SubscriptionBody = {
469
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
470
- billing_period: 'month' | 'year';
471
- };
472
532
  export type PricesQuery = {
473
533
  currency: string;
474
534
  };
@@ -495,6 +555,114 @@ export type PricesResponse200 = {
495
555
  };
496
556
  };
497
557
  export type OpenapiJsonResponse200 = unknown;
558
+ export type UsersRetrieveData = {
559
+ body?: never;
560
+ path: {
561
+ user_id: string;
562
+ };
563
+ query?: {
564
+ expand?: Array<'subscription'>;
565
+ };
566
+ url: '/users/{user_id}';
567
+ };
568
+ export type UsersRetrieveErrors = {
569
+ /**
570
+ * Error response
571
+ */
572
+ default: ErrorResponse;
573
+ };
574
+ export type UsersRetrieveError = UsersRetrieveErrors[keyof UsersRetrieveErrors];
575
+ export type UsersRetrieveResponses = {
576
+ /**
577
+ * Response
578
+ */
579
+ 200: {
580
+ id: string;
581
+ object: 'user';
582
+ email: string;
583
+ name?: string;
584
+ blocked?: boolean;
585
+ plan: string;
586
+ quota: {
587
+ limit: number;
588
+ usage: number;
589
+ available: number;
590
+ updated: string;
591
+ refreshDate?: string;
592
+ };
593
+ organization: string | null;
594
+ /**
595
+ * Creation date as a Unix timestamp (ms)
596
+ */
597
+ created_at: number;
598
+ credentials?: {
599
+ google?: {
600
+ access_token?: string;
601
+ refresh_token?: string;
602
+ expiry_date?: number;
603
+ expires_in?: number;
604
+ update_date?: number;
605
+ scope?: string;
606
+ api_domain?: string;
607
+ };
608
+ microsoft?: {
609
+ access_token?: string;
610
+ refresh_token?: string;
611
+ expiry_date?: number;
612
+ expires_in?: number;
613
+ update_date?: number;
614
+ scope?: string;
615
+ api_domain?: string;
616
+ };
617
+ zoho?: {
618
+ access_token?: string;
619
+ refresh_token?: string;
620
+ expiry_date?: number;
621
+ expires_in?: number;
622
+ update_date?: number;
623
+ scope?: string;
624
+ api_domain?: string;
625
+ };
626
+ sendgrid?: {
627
+ api_key?: string;
628
+ };
629
+ };
630
+ subscription?: {
631
+ id: string;
632
+ created_at: number;
633
+ /**
634
+ * Whether the user is a billing admin
635
+ */
636
+ admin: boolean;
637
+ current_period_start: number;
638
+ current_period_end: number;
639
+ quantity: number;
640
+ currency: string;
641
+ amount: number | null;
642
+ discount_percentage?: number | null;
643
+ name: string | null;
644
+ billing_period: 'day' | 'week' | 'month' | 'year' | null;
645
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business' | null;
646
+ default_payment_method: {
647
+ type: string;
648
+ brand?: string | null;
649
+ last4: string | null;
650
+ exp_month: number | null;
651
+ exp_year: number | null;
652
+ bank_name?: string | null;
653
+ } | null;
654
+ addons: {
655
+ senders?: {
656
+ quantity: number;
657
+ };
658
+ email_warmups?: {
659
+ quantity: number;
660
+ };
661
+ };
662
+ } | null;
663
+ };
664
+ };
665
+ export type UsersRetrieveResponse = UsersRetrieveResponses[keyof UsersRetrieveResponses];
498
666
  export type UsersGetCurrentOrganizationData = {
499
667
  body?: never;
500
668
  path: {
@@ -593,7 +761,7 @@ export type UsersDeleteActionResponses = {
593
761
  204: void;
594
762
  };
595
763
  export type UsersDeleteActionResponse = UsersDeleteActionResponses[keyof UsersDeleteActionResponses];
596
- export type OrganizationMemberListData = {
764
+ export type OrganizationMembersListData = {
597
765
  body?: never;
598
766
  path: {
599
767
  organization_id: string;
@@ -604,40 +772,35 @@ export type OrganizationMemberListData = {
604
772
  };
605
773
  url: '/organizations/{organization_id}/members';
606
774
  };
607
- export type OrganizationMemberListErrors = {
775
+ export type OrganizationMembersListErrors = {
608
776
  /**
609
777
  * Error response
610
778
  */
611
779
  default: ErrorResponse;
612
780
  };
613
- export type OrganizationMemberListError = OrganizationMemberListErrors[keyof OrganizationMemberListErrors];
614
- export type OrganizationMemberListResponses = {
781
+ export type OrganizationMembersListError = OrganizationMembersListErrors[keyof OrganizationMembersListErrors];
782
+ export type OrganizationMembersListResponses = {
615
783
  /**
616
784
  * Response
617
785
  */
618
786
  200: Array<{
787
+ user: string;
788
+ roles: Array<'admin' | 'member'>;
789
+ created_at: number;
790
+ updated_at?: number;
791
+ id: string;
792
+ object: 'organization_member';
619
793
  email: string;
620
794
  name?: string;
621
795
  profile_picture_url?: string;
622
- role: 'admin' | 'member';
623
- /**
624
- * Creation date
625
- */
626
- created_at: string;
627
- /**
628
- * Last Update date
629
- */
630
- updated_at?: string;
631
- id: string;
632
- organization_id: string;
633
- object: 'organization_member';
796
+ organization: string;
634
797
  }>;
635
798
  };
636
- export type OrganizationMemberListResponse = OrganizationMemberListResponses[keyof OrganizationMemberListResponses];
637
- export type OrganizationMemberCreateData = {
799
+ export type OrganizationMembersListResponse = OrganizationMembersListResponses[keyof OrganizationMembersListResponses];
800
+ export type OrganizationMembersCreateData = {
638
801
  body: {
639
802
  email: string;
640
- role: 'admin' | 'member';
803
+ roles: Array<'admin' | 'member'>;
641
804
  };
642
805
  path: {
643
806
  organization_id: string;
@@ -645,37 +808,32 @@ export type OrganizationMemberCreateData = {
645
808
  query?: never;
646
809
  url: '/organizations/{organization_id}/members';
647
810
  };
648
- export type OrganizationMemberCreateErrors = {
811
+ export type OrganizationMembersCreateErrors = {
649
812
  /**
650
813
  * Error response
651
814
  */
652
815
  default: ErrorResponse;
653
816
  };
654
- export type OrganizationMemberCreateError = OrganizationMemberCreateErrors[keyof OrganizationMemberCreateErrors];
655
- export type OrganizationMemberCreateResponses = {
817
+ export type OrganizationMembersCreateError = OrganizationMembersCreateErrors[keyof OrganizationMembersCreateErrors];
818
+ export type OrganizationMembersCreateResponses = {
656
819
  /**
657
820
  * Response
658
821
  */
659
822
  201: {
823
+ user: string;
824
+ roles: Array<'admin' | 'member'>;
825
+ created_at: number;
826
+ updated_at?: number;
827
+ id: string;
828
+ object: 'organization_member';
660
829
  email: string;
661
830
  name?: string;
662
831
  profile_picture_url?: string;
663
- role: 'admin' | 'member';
664
- /**
665
- * Creation date
666
- */
667
- created_at: string;
668
- /**
669
- * Last Update date
670
- */
671
- updated_at?: string;
672
- id: string;
673
- organization_id: string;
674
- object: 'organization_member';
832
+ organization: string;
675
833
  };
676
834
  };
677
- export type OrganizationMemberCreateResponse = OrganizationMemberCreateResponses[keyof OrganizationMemberCreateResponses];
678
- export type OrganizationMemberDeleteData = {
835
+ export type OrganizationMembersCreateResponse = OrganizationMembersCreateResponses[keyof OrganizationMembersCreateResponses];
836
+ export type OrganizationMembersDeleteData = {
679
837
  body?: never;
680
838
  path: {
681
839
  organization_id: string;
@@ -684,23 +842,23 @@ export type OrganizationMemberDeleteData = {
684
842
  query?: never;
685
843
  url: '/organizations/{organization_id}/members/{member_id}';
686
844
  };
687
- export type OrganizationMemberDeleteErrors = {
845
+ export type OrganizationMembersDeleteErrors = {
688
846
  /**
689
847
  * Error response
690
848
  */
691
849
  default: ErrorResponse;
692
850
  };
693
- export type OrganizationMemberDeleteError = OrganizationMemberDeleteErrors[keyof OrganizationMemberDeleteErrors];
694
- export type OrganizationMemberDeleteResponses = {
851
+ export type OrganizationMembersDeleteError = OrganizationMembersDeleteErrors[keyof OrganizationMembersDeleteErrors];
852
+ export type OrganizationMembersDeleteResponses = {
695
853
  /**
696
854
  * Response
697
855
  */
698
856
  204: void;
699
857
  };
700
- export type OrganizationMemberDeleteResponse = OrganizationMemberDeleteResponses[keyof OrganizationMemberDeleteResponses];
701
- export type OrganizationMemberUpdateData = {
858
+ export type OrganizationMembersDeleteResponse = OrganizationMembersDeleteResponses[keyof OrganizationMembersDeleteResponses];
859
+ export type OrganizationMembersUpdateData = {
702
860
  body: {
703
- role: 'admin' | 'member';
861
+ roles?: Array<'admin' | 'member'>;
704
862
  };
705
863
  path: {
706
864
  organization_id: string;
@@ -709,36 +867,31 @@ export type OrganizationMemberUpdateData = {
709
867
  query?: never;
710
868
  url: '/organizations/{organization_id}/members/{member_id}';
711
869
  };
712
- export type OrganizationMemberUpdateErrors = {
870
+ export type OrganizationMembersUpdateErrors = {
713
871
  /**
714
872
  * Error response
715
873
  */
716
874
  default: ErrorResponse;
717
875
  };
718
- export type OrganizationMemberUpdateError = OrganizationMemberUpdateErrors[keyof OrganizationMemberUpdateErrors];
719
- export type OrganizationMemberUpdateResponses = {
876
+ export type OrganizationMembersUpdateError = OrganizationMembersUpdateErrors[keyof OrganizationMembersUpdateErrors];
877
+ export type OrganizationMembersUpdateResponses = {
720
878
  /**
721
879
  * Response
722
880
  */
723
881
  200: {
882
+ user: string;
883
+ roles: Array<'admin' | 'member'>;
884
+ created_at: number;
885
+ updated_at?: number;
886
+ id: string;
887
+ object: 'organization_member';
724
888
  email: string;
725
889
  name?: string;
726
890
  profile_picture_url?: string;
727
- role: 'admin' | 'member';
728
- /**
729
- * Creation date
730
- */
731
- created_at: string;
732
- /**
733
- * Last Update date
734
- */
735
- updated_at?: string;
736
- id: string;
737
- organization_id: string;
738
- object: 'organization_member';
891
+ organization: string;
739
892
  };
740
893
  };
741
- export type OrganizationMemberUpdateResponse = OrganizationMemberUpdateResponses[keyof OrganizationMemberUpdateResponses];
894
+ export type OrganizationMembersUpdateResponse = OrganizationMembersUpdateResponses[keyof OrganizationMembersUpdateResponses];
742
895
  export type OrganizationsListData = {
743
896
  body?: never;
744
897
  path?: never;
@@ -759,14 +912,10 @@ export type OrganizationsListResponses = {
759
912
  200: Array<{
760
913
  name: string;
761
914
  owner: string;
762
- /**
763
- * Creation date
764
- */
765
- created_at: string;
766
- /**
767
- * Last Update date
768
- */
769
- updated_at?: string;
915
+ customer?: string;
916
+ subscription?: string;
917
+ created_at: number;
918
+ updated_at?: number;
770
919
  id: string;
771
920
  object: 'organization';
772
921
  }>;
@@ -794,14 +943,10 @@ export type OrganizationsCreateResponses = {
794
943
  201: {
795
944
  name: string;
796
945
  owner: string;
797
- /**
798
- * Creation date
799
- */
800
- created_at: string;
801
- /**
802
- * Last Update date
803
- */
804
- updated_at?: string;
946
+ customer?: string;
947
+ subscription?: string;
948
+ created_at: number;
949
+ updated_at?: number;
805
950
  id: string;
806
951
  object: 'organization';
807
952
  };
@@ -851,14 +996,10 @@ export type OrganizationsRetrieveResponses = {
851
996
  200: {
852
997
  name: string;
853
998
  owner: string;
854
- /**
855
- * Creation date
856
- */
857
- created_at: string;
858
- /**
859
- * Last Update date
860
- */
861
- updated_at?: string;
999
+ customer?: string;
1000
+ subscription?: string;
1001
+ created_at: number;
1002
+ updated_at?: number;
862
1003
  id: string;
863
1004
  object: 'organization';
864
1005
  };
@@ -888,19 +1029,162 @@ export type OrganizationsUpdateResponses = {
888
1029
  200: {
889
1030
  name: string;
890
1031
  owner: string;
891
- /**
892
- * Creation date
893
- */
894
- created_at: string;
895
- /**
896
- * Last Update date
897
- */
898
- updated_at?: string;
1032
+ customer?: string;
1033
+ subscription?: string;
1034
+ created_at: number;
1035
+ updated_at?: number;
899
1036
  id: string;
900
1037
  object: 'organization';
901
1038
  };
902
1039
  };
903
1040
  export type OrganizationsUpdateResponse = OrganizationsUpdateResponses[keyof OrganizationsUpdateResponses];
1041
+ export type BillingSubscriptionGetData = {
1042
+ body?: never;
1043
+ path?: never;
1044
+ query?: never;
1045
+ url: '/billing/subscription';
1046
+ };
1047
+ export type BillingSubscriptionGetErrors = {
1048
+ /**
1049
+ * Error response
1050
+ */
1051
+ default: ErrorResponse;
1052
+ };
1053
+ export type BillingSubscriptionGetError = BillingSubscriptionGetErrors[keyof BillingSubscriptionGetErrors];
1054
+ export type BillingSubscriptionGetResponses = {
1055
+ /**
1056
+ * Response
1057
+ */
1058
+ 200: {
1059
+ id: string;
1060
+ created_at: number;
1061
+ /**
1062
+ * Whether the user is a billing admin
1063
+ */
1064
+ admin: boolean;
1065
+ current_period_start: number;
1066
+ current_period_end: number;
1067
+ quantity: number;
1068
+ currency: string;
1069
+ amount: number | null;
1070
+ discount_percentage?: number | null;
1071
+ name: string | null;
1072
+ billing_period: 'day' | 'week' | 'month' | 'year' | null;
1073
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business' | null;
1074
+ default_payment_method: {
1075
+ type: string;
1076
+ brand?: string | null;
1077
+ last4: string | null;
1078
+ exp_month: number | null;
1079
+ exp_year: number | null;
1080
+ bank_name?: string | null;
1081
+ } | null;
1082
+ addons: {
1083
+ senders?: {
1084
+ quantity: number;
1085
+ };
1086
+ email_warmups?: {
1087
+ quantity: number;
1088
+ };
1089
+ };
1090
+ } | null;
1091
+ };
1092
+ export type BillingSubscriptionGetResponse = BillingSubscriptionGetResponses[keyof BillingSubscriptionGetResponses];
1093
+ export type BillingSubscriptionUpdateData = {
1094
+ body: {
1095
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1096
+ billing_period: 'month' | 'year';
1097
+ };
1098
+ path?: never;
1099
+ query?: never;
1100
+ url: '/billing/subscription';
1101
+ };
1102
+ export type BillingSubscriptionUpdateErrors = {
1103
+ /**
1104
+ * Error response
1105
+ */
1106
+ default: ErrorResponse;
1107
+ };
1108
+ export type BillingSubscriptionUpdateError = BillingSubscriptionUpdateErrors[keyof BillingSubscriptionUpdateErrors];
1109
+ export type BillingSubscriptionUpdateResponses = {
1110
+ /**
1111
+ * Response
1112
+ */
1113
+ 200: {
1114
+ status: 'confirmation_required' | 'success' | 'payment_failed';
1115
+ client_secret?: string;
1116
+ failure_code?: string;
1117
+ };
1118
+ };
1119
+ export type BillingSubscriptionUpdateResponse = BillingSubscriptionUpdateResponses[keyof BillingSubscriptionUpdateResponses];
1120
+ export type BillingSubscriptionPreviewUpdateData = {
1121
+ body: {
1122
+ plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1123
+ billing_period: 'month' | 'year';
1124
+ };
1125
+ path?: never;
1126
+ query?: never;
1127
+ url: '/billing/subscription/preview';
1128
+ };
1129
+ export type BillingSubscriptionPreviewUpdateErrors = {
1130
+ /**
1131
+ * Error response
1132
+ */
1133
+ default: ErrorResponse;
1134
+ };
1135
+ export type BillingSubscriptionPreviewUpdateError = BillingSubscriptionPreviewUpdateErrors[keyof BillingSubscriptionPreviewUpdateErrors];
1136
+ export type BillingSubscriptionPreviewUpdateResponses = {
1137
+ /**
1138
+ * Response
1139
+ */
1140
+ 200: {
1141
+ discount_percents: Array<number>;
1142
+ total_excluding_tax: number;
1143
+ total: number;
1144
+ amount_due: number;
1145
+ added_from_balance: number;
1146
+ consumed_balance: number;
1147
+ credited_to_balance: number;
1148
+ lines: Array<{
1149
+ amount: number;
1150
+ billing_period: 'day' | 'week' | 'month' | 'year';
1151
+ proration: boolean;
1152
+ plan?: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1153
+ addon?: 'senders' | 'email_warmups';
1154
+ }>;
1155
+ next_renewal: number;
1156
+ total_tax_amounts: Array<{
1157
+ amount: number;
1158
+ }>;
1159
+ };
1160
+ };
1161
+ export type BillingSubscriptionPreviewUpdateResponse = BillingSubscriptionPreviewUpdateResponses[keyof BillingSubscriptionPreviewUpdateResponses];
1162
+ export type BillingSubscriptionCheckoutData = {
1163
+ body: {
1164
+ price_id: string;
1165
+ coupon?: string;
1166
+ currency?: 'usd' | 'eur' | 'inr';
1167
+ };
1168
+ path?: never;
1169
+ query?: never;
1170
+ url: '/billing/subscription/checkout';
1171
+ };
1172
+ export type BillingSubscriptionCheckoutErrors = {
1173
+ /**
1174
+ * Error response
1175
+ */
1176
+ default: ErrorResponse;
1177
+ };
1178
+ export type BillingSubscriptionCheckoutError = BillingSubscriptionCheckoutErrors[keyof BillingSubscriptionCheckoutErrors];
1179
+ export type BillingSubscriptionCheckoutResponses = {
1180
+ /**
1181
+ * Response
1182
+ */
1183
+ 200: {
1184
+ url: string;
1185
+ };
1186
+ };
1187
+ export type BillingSubscriptionCheckoutResponse = BillingSubscriptionCheckoutResponses[keyof BillingSubscriptionCheckoutResponses];
904
1188
  export type ContactListsCreateData = {
905
1189
  body: {
906
1190
  owner: string;
@@ -1648,123 +1932,6 @@ export type BillingAddonsUpdateResponses = {
1648
1932
  };
1649
1933
  };
1650
1934
  export type BillingAddonsUpdateResponse = BillingAddonsUpdateResponses[keyof BillingAddonsUpdateResponses];
1651
- export type BillingSubscriptionGetData = {
1652
- body?: never;
1653
- path?: never;
1654
- query?: never;
1655
- url: '/billing/subscription';
1656
- };
1657
- export type BillingSubscriptionGetErrors = {
1658
- /**
1659
- * Error response
1660
- */
1661
- default: ErrorResponse;
1662
- };
1663
- export type BillingSubscriptionGetError = BillingSubscriptionGetErrors[keyof BillingSubscriptionGetErrors];
1664
- export type BillingSubscriptionGetResponses = {
1665
- /**
1666
- * Response
1667
- */
1668
- 200: {
1669
- id: string;
1670
- created_at: number;
1671
- current_period_start: number;
1672
- current_period_end: number;
1673
- quantity: number;
1674
- currency: string;
1675
- amount: number | null;
1676
- discount_percentage?: number | null;
1677
- name: string | null;
1678
- billing_period: 'day' | 'week' | 'month' | 'year' | null;
1679
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business' | null;
1680
- default_payment_method: {
1681
- type: string;
1682
- brand?: string | null;
1683
- last4: string | null;
1684
- exp_month: number | null;
1685
- exp_year: number | null;
1686
- bank_name?: string | null;
1687
- } | null;
1688
- addons: {
1689
- senders?: {
1690
- quantity: number;
1691
- };
1692
- email_warmups?: {
1693
- quantity: number;
1694
- };
1695
- };
1696
- } | null;
1697
- };
1698
- export type BillingSubscriptionGetResponse = BillingSubscriptionGetResponses[keyof BillingSubscriptionGetResponses];
1699
- export type BillingSubscriptionUpdateData = {
1700
- body: {
1701
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1702
- billing_period: 'month' | 'year';
1703
- };
1704
- path?: never;
1705
- query?: never;
1706
- url: '/billing/subscription';
1707
- };
1708
- export type BillingSubscriptionUpdateErrors = {
1709
- /**
1710
- * Error response
1711
- */
1712
- default: ErrorResponse;
1713
- };
1714
- export type BillingSubscriptionUpdateError = BillingSubscriptionUpdateErrors[keyof BillingSubscriptionUpdateErrors];
1715
- export type BillingSubscriptionUpdateResponses = {
1716
- /**
1717
- * Response
1718
- */
1719
- 200: {
1720
- status: 'confirmation_required' | 'success' | 'payment_failed';
1721
- client_secret?: string;
1722
- failure_code?: string;
1723
- };
1724
- };
1725
- export type BillingSubscriptionUpdateResponse = BillingSubscriptionUpdateResponses[keyof BillingSubscriptionUpdateResponses];
1726
- export type BillingSubscriptionPreviewUpdateData = {
1727
- body: {
1728
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1729
- billing_period: 'month' | 'year';
1730
- };
1731
- path?: never;
1732
- query?: never;
1733
- url: '/billing/subscription/preview';
1734
- };
1735
- export type BillingSubscriptionPreviewUpdateErrors = {
1736
- /**
1737
- * Error response
1738
- */
1739
- default: ErrorResponse;
1740
- };
1741
- export type BillingSubscriptionPreviewUpdateError = BillingSubscriptionPreviewUpdateErrors[keyof BillingSubscriptionPreviewUpdateErrors];
1742
- export type BillingSubscriptionPreviewUpdateResponses = {
1743
- /**
1744
- * Response
1745
- */
1746
- 200: {
1747
- discount_percents: Array<number>;
1748
- total_excluding_tax: number;
1749
- total: number;
1750
- amount_due: number;
1751
- added_from_balance: number;
1752
- consumed_balance: number;
1753
- credited_to_balance: number;
1754
- lines: Array<{
1755
- amount: number;
1756
- billing_period: 'day' | 'week' | 'month' | 'year';
1757
- proration: boolean;
1758
- plan?: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1759
- addon?: 'senders' | 'email_warmups';
1760
- }>;
1761
- next_renewal: number;
1762
- total_tax_amounts: Array<{
1763
- amount: number;
1764
- }>;
1765
- };
1766
- };
1767
- export type BillingSubscriptionPreviewUpdateResponse = BillingSubscriptionPreviewUpdateResponses[keyof BillingSubscriptionPreviewUpdateResponses];
1768
1935
  export type BillingGetPricesData = {
1769
1936
  body?: never;
1770
1937
  path?: never;