mailmeteor 0.0.8 → 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;
@@ -194,7 +287,6 @@ export type ContactListIdBody = {
194
287
  remove_contacts?: boolean;
195
288
  };
196
289
  export type ContactsBody = {
197
- owner: string;
198
290
  contact_list?: string;
199
291
  };
200
292
  export type ContactsResponse201 = {
@@ -423,33 +515,9 @@ export type AddonsResponse200 = {
423
515
  } | null;
424
516
  };
425
517
  };
426
- export type PreviewBody = {
427
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
428
- billing_period: 'month' | 'year';
429
- };
430
518
  export type PreviewParams = {
431
519
  addon: 'senders' | 'email_warmups';
432
520
  };
433
- export type PreviewResponse200 = {
434
- discount_percents: Array<number>;
435
- total_excluding_tax: number;
436
- total: number;
437
- amount_due: number;
438
- added_from_balance: number;
439
- consumed_balance: number;
440
- credited_to_balance: number;
441
- lines: Array<{
442
- amount: number;
443
- billing_period: 'day' | 'week' | 'month' | 'year';
444
- proration: boolean;
445
- plan?: 'free' | 'starter' | 'pro' | 'premium' | 'business';
446
- addon?: 'senders' | 'email_warmups';
447
- }>;
448
- next_renewal: number;
449
- total_tax_amounts: Array<{
450
- amount: number;
451
- }>;
452
- };
453
521
  export type AddonBody = {
454
522
  quantity: number;
455
523
  };
@@ -461,15 +529,6 @@ export type AddonResponse200 = Array<{
461
529
  email: string;
462
530
  usage: number;
463
531
  }>;
464
- export type SubscriptionResponse200 = {
465
- status: 'confirmation_required' | 'success' | 'payment_failed';
466
- client_secret?: string;
467
- failure_code?: string;
468
- };
469
- export type SubscriptionBody = {
470
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
471
- billing_period: 'month' | 'year';
472
- };
473
532
  export type PricesQuery = {
474
533
  currency: string;
475
534
  };
@@ -496,6 +555,114 @@ export type PricesResponse200 = {
496
555
  };
497
556
  };
498
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];
499
666
  export type UsersGetCurrentOrganizationData = {
500
667
  body?: never;
501
668
  path: {
@@ -521,7 +688,7 @@ export type UsersGetCurrentOrganizationResponses = {
521
688
  };
522
689
  export type UsersGetCurrentOrganizationResponse = UsersGetCurrentOrganizationResponses[keyof UsersGetCurrentOrganizationResponses];
523
690
  export type UsersSetCurrentOrganizationData = {
524
- body?: {
691
+ body: {
525
692
  organization_id?: string | null;
526
693
  };
527
694
  path: {
@@ -547,7 +714,7 @@ export type UsersSetCurrentOrganizationResponses = {
547
714
  };
548
715
  export type UsersSetCurrentOrganizationResponse = UsersSetCurrentOrganizationResponses[keyof UsersSetCurrentOrganizationResponses];
549
716
  export type UsersWatchMailboxData = {
550
- body?: {
717
+ body: {
551
718
  provider?: 'gmail' | 'outlook';
552
719
  force?: boolean;
553
720
  };
@@ -594,7 +761,7 @@ export type UsersDeleteActionResponses = {
594
761
  204: void;
595
762
  };
596
763
  export type UsersDeleteActionResponse = UsersDeleteActionResponses[keyof UsersDeleteActionResponses];
597
- export type OrganizationMemberListData = {
764
+ export type OrganizationMembersListData = {
598
765
  body?: never;
599
766
  path: {
600
767
  organization_id: string;
@@ -605,40 +772,35 @@ export type OrganizationMemberListData = {
605
772
  };
606
773
  url: '/organizations/{organization_id}/members';
607
774
  };
608
- export type OrganizationMemberListErrors = {
775
+ export type OrganizationMembersListErrors = {
609
776
  /**
610
777
  * Error response
611
778
  */
612
779
  default: ErrorResponse;
613
780
  };
614
- export type OrganizationMemberListError = OrganizationMemberListErrors[keyof OrganizationMemberListErrors];
615
- export type OrganizationMemberListResponses = {
781
+ export type OrganizationMembersListError = OrganizationMembersListErrors[keyof OrganizationMembersListErrors];
782
+ export type OrganizationMembersListResponses = {
616
783
  /**
617
784
  * Response
618
785
  */
619
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';
620
793
  email: string;
621
794
  name?: string;
622
795
  profile_picture_url?: string;
623
- role: 'admin' | 'member';
624
- /**
625
- * Creation date
626
- */
627
- created_at: string;
628
- /**
629
- * Last Update date
630
- */
631
- updated_at?: string;
632
- id: string;
633
- organization_id: string;
634
- object: 'organization_member';
796
+ organization: string;
635
797
  }>;
636
798
  };
637
- export type OrganizationMemberListResponse = OrganizationMemberListResponses[keyof OrganizationMemberListResponses];
638
- export type OrganizationMemberCreateData = {
639
- body?: {
799
+ export type OrganizationMembersListResponse = OrganizationMembersListResponses[keyof OrganizationMembersListResponses];
800
+ export type OrganizationMembersCreateData = {
801
+ body: {
640
802
  email: string;
641
- role: 'admin' | 'member';
803
+ roles: Array<'admin' | 'member'>;
642
804
  };
643
805
  path: {
644
806
  organization_id: string;
@@ -646,37 +808,32 @@ export type OrganizationMemberCreateData = {
646
808
  query?: never;
647
809
  url: '/organizations/{organization_id}/members';
648
810
  };
649
- export type OrganizationMemberCreateErrors = {
811
+ export type OrganizationMembersCreateErrors = {
650
812
  /**
651
813
  * Error response
652
814
  */
653
815
  default: ErrorResponse;
654
816
  };
655
- export type OrganizationMemberCreateError = OrganizationMemberCreateErrors[keyof OrganizationMemberCreateErrors];
656
- export type OrganizationMemberCreateResponses = {
817
+ export type OrganizationMembersCreateError = OrganizationMembersCreateErrors[keyof OrganizationMembersCreateErrors];
818
+ export type OrganizationMembersCreateResponses = {
657
819
  /**
658
820
  * Response
659
821
  */
660
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';
661
829
  email: string;
662
830
  name?: string;
663
831
  profile_picture_url?: string;
664
- role: 'admin' | 'member';
665
- /**
666
- * Creation date
667
- */
668
- created_at: string;
669
- /**
670
- * Last Update date
671
- */
672
- updated_at?: string;
673
- id: string;
674
- organization_id: string;
675
- object: 'organization_member';
832
+ organization: string;
676
833
  };
677
834
  };
678
- export type OrganizationMemberCreateResponse = OrganizationMemberCreateResponses[keyof OrganizationMemberCreateResponses];
679
- export type OrganizationMemberDeleteData = {
835
+ export type OrganizationMembersCreateResponse = OrganizationMembersCreateResponses[keyof OrganizationMembersCreateResponses];
836
+ export type OrganizationMembersDeleteData = {
680
837
  body?: never;
681
838
  path: {
682
839
  organization_id: string;
@@ -685,23 +842,23 @@ export type OrganizationMemberDeleteData = {
685
842
  query?: never;
686
843
  url: '/organizations/{organization_id}/members/{member_id}';
687
844
  };
688
- export type OrganizationMemberDeleteErrors = {
845
+ export type OrganizationMembersDeleteErrors = {
689
846
  /**
690
847
  * Error response
691
848
  */
692
849
  default: ErrorResponse;
693
850
  };
694
- export type OrganizationMemberDeleteError = OrganizationMemberDeleteErrors[keyof OrganizationMemberDeleteErrors];
695
- export type OrganizationMemberDeleteResponses = {
851
+ export type OrganizationMembersDeleteError = OrganizationMembersDeleteErrors[keyof OrganizationMembersDeleteErrors];
852
+ export type OrganizationMembersDeleteResponses = {
696
853
  /**
697
854
  * Response
698
855
  */
699
856
  204: void;
700
857
  };
701
- export type OrganizationMemberDeleteResponse = OrganizationMemberDeleteResponses[keyof OrganizationMemberDeleteResponses];
702
- export type OrganizationMemberUpdateData = {
703
- body?: {
704
- role: 'admin' | 'member';
858
+ export type OrganizationMembersDeleteResponse = OrganizationMembersDeleteResponses[keyof OrganizationMembersDeleteResponses];
859
+ export type OrganizationMembersUpdateData = {
860
+ body: {
861
+ roles?: Array<'admin' | 'member'>;
705
862
  };
706
863
  path: {
707
864
  organization_id: string;
@@ -710,36 +867,31 @@ export type OrganizationMemberUpdateData = {
710
867
  query?: never;
711
868
  url: '/organizations/{organization_id}/members/{member_id}';
712
869
  };
713
- export type OrganizationMemberUpdateErrors = {
870
+ export type OrganizationMembersUpdateErrors = {
714
871
  /**
715
872
  * Error response
716
873
  */
717
874
  default: ErrorResponse;
718
875
  };
719
- export type OrganizationMemberUpdateError = OrganizationMemberUpdateErrors[keyof OrganizationMemberUpdateErrors];
720
- export type OrganizationMemberUpdateResponses = {
876
+ export type OrganizationMembersUpdateError = OrganizationMembersUpdateErrors[keyof OrganizationMembersUpdateErrors];
877
+ export type OrganizationMembersUpdateResponses = {
721
878
  /**
722
879
  * Response
723
880
  */
724
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';
725
888
  email: string;
726
889
  name?: string;
727
890
  profile_picture_url?: string;
728
- role: 'admin' | 'member';
729
- /**
730
- * Creation date
731
- */
732
- created_at: string;
733
- /**
734
- * Last Update date
735
- */
736
- updated_at?: string;
737
- id: string;
738
- organization_id: string;
739
- object: 'organization_member';
891
+ organization: string;
740
892
  };
741
893
  };
742
- export type OrganizationMemberUpdateResponse = OrganizationMemberUpdateResponses[keyof OrganizationMemberUpdateResponses];
894
+ export type OrganizationMembersUpdateResponse = OrganizationMembersUpdateResponses[keyof OrganizationMembersUpdateResponses];
743
895
  export type OrganizationsListData = {
744
896
  body?: never;
745
897
  path?: never;
@@ -760,21 +912,17 @@ export type OrganizationsListResponses = {
760
912
  200: Array<{
761
913
  name: string;
762
914
  owner: string;
763
- /**
764
- * Creation date
765
- */
766
- created_at: string;
767
- /**
768
- * Last Update date
769
- */
770
- updated_at?: string;
915
+ customer?: string;
916
+ subscription?: string;
917
+ created_at: number;
918
+ updated_at?: number;
771
919
  id: string;
772
920
  object: 'organization';
773
921
  }>;
774
922
  };
775
923
  export type OrganizationsListResponse = OrganizationsListResponses[keyof OrganizationsListResponses];
776
924
  export type OrganizationsCreateData = {
777
- body?: {
925
+ body: {
778
926
  name: string;
779
927
  };
780
928
  path?: never;
@@ -795,14 +943,10 @@ export type OrganizationsCreateResponses = {
795
943
  201: {
796
944
  name: string;
797
945
  owner: string;
798
- /**
799
- * Creation date
800
- */
801
- created_at: string;
802
- /**
803
- * Last Update date
804
- */
805
- updated_at?: string;
946
+ customer?: string;
947
+ subscription?: string;
948
+ created_at: number;
949
+ updated_at?: number;
806
950
  id: string;
807
951
  object: 'organization';
808
952
  };
@@ -852,21 +996,17 @@ export type OrganizationsRetrieveResponses = {
852
996
  200: {
853
997
  name: string;
854
998
  owner: string;
855
- /**
856
- * Creation date
857
- */
858
- created_at: string;
859
- /**
860
- * Last Update date
861
- */
862
- updated_at?: string;
999
+ customer?: string;
1000
+ subscription?: string;
1001
+ created_at: number;
1002
+ updated_at?: number;
863
1003
  id: string;
864
1004
  object: 'organization';
865
1005
  };
866
1006
  };
867
1007
  export type OrganizationsRetrieveResponse = OrganizationsRetrieveResponses[keyof OrganizationsRetrieveResponses];
868
1008
  export type OrganizationsUpdateData = {
869
- body?: {
1009
+ body: {
870
1010
  name?: string;
871
1011
  };
872
1012
  path: {
@@ -889,21 +1029,164 @@ export type OrganizationsUpdateResponses = {
889
1029
  200: {
890
1030
  name: string;
891
1031
  owner: string;
892
- /**
893
- * Creation date
894
- */
895
- created_at: string;
896
- /**
897
- * Last Update date
898
- */
899
- updated_at?: string;
1032
+ customer?: string;
1033
+ subscription?: string;
1034
+ created_at: number;
1035
+ updated_at?: number;
900
1036
  id: string;
901
1037
  object: 'organization';
902
1038
  };
903
1039
  };
904
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];
905
1188
  export type ContactListsCreateData = {
906
- body?: {
1189
+ body: {
907
1190
  owner: string;
908
1191
  name: string;
909
1192
  metadata?: {
@@ -941,7 +1224,7 @@ export type ContactListsCreateResponses = {
941
1224
  };
942
1225
  export type ContactListsCreateResponse = ContactListsCreateResponses[keyof ContactListsCreateResponses];
943
1226
  export type ContactListsRemoveData = {
944
- body?: {
1227
+ body: {
945
1228
  remove_contacts?: boolean;
946
1229
  };
947
1230
  path: {
@@ -1011,7 +1294,7 @@ export type ContactListsRetrieveResponses = {
1011
1294
  };
1012
1295
  export type ContactListsRetrieveResponse = ContactListsRetrieveResponses[keyof ContactListsRetrieveResponses];
1013
1296
  export type ContactListsUpdateData = {
1014
- body?: {
1297
+ body: {
1015
1298
  name: string;
1016
1299
  metadata?: {
1017
1300
  [key: string]: string;
@@ -1050,8 +1333,7 @@ export type ContactListsUpdateResponses = {
1050
1333
  };
1051
1334
  export type ContactListsUpdateResponse = ContactListsUpdateResponses[keyof ContactListsUpdateResponses];
1052
1335
  export type ContactsDelAllData = {
1053
- body?: {
1054
- owner: string;
1336
+ body: {
1055
1337
  contact_list?: string;
1056
1338
  };
1057
1339
  path?: never;
@@ -1124,7 +1406,7 @@ export type ContactsListResponses = {
1124
1406
  };
1125
1407
  export type ContactsListResponse = ContactsListResponses[keyof ContactsListResponses];
1126
1408
  export type ContactsCreateData = {
1127
- body?: {
1409
+ body: {
1128
1410
  owner: string;
1129
1411
  email: string;
1130
1412
  blocked?: boolean;
@@ -1179,7 +1461,7 @@ export type ContactsCreateResponses = {
1179
1461
  };
1180
1462
  export type ContactsCreateResponse = ContactsCreateResponses[keyof ContactsCreateResponses];
1181
1463
  export type ContactsBatchCreateData = {
1182
- body?: {
1464
+ body: {
1183
1465
  contacts: Array<{
1184
1466
  owner: string;
1185
1467
  email: string;
@@ -1226,7 +1508,7 @@ export type ContactsBatchCreateResponses = {
1226
1508
  };
1227
1509
  export type ContactsBatchCreateResponse = ContactsBatchCreateResponses[keyof ContactsBatchCreateResponses];
1228
1510
  export type ContactsBatchCreate2Data = {
1229
- body?: unknown;
1511
+ body: unknown;
1230
1512
  path?: never;
1231
1513
  query?: never;
1232
1514
  url: '/contacts/batch_legacy';
@@ -1333,7 +1615,7 @@ export type ContactsRetrieveResponses = {
1333
1615
  };
1334
1616
  export type ContactsRetrieveResponse = ContactsRetrieveResponses[keyof ContactsRetrieveResponses];
1335
1617
  export type ContactsUpdateData = {
1336
- body?: {
1618
+ body: {
1337
1619
  blocked?: boolean;
1338
1620
  unsubscribed?: boolean;
1339
1621
  contact_lists?: Array<string>;
@@ -1565,7 +1847,7 @@ export type BillingAddonsGetAddonsResponses = {
1565
1847
  };
1566
1848
  export type BillingAddonsGetAddonsResponse = BillingAddonsGetAddonsResponses[keyof BillingAddonsGetAddonsResponses];
1567
1849
  export type BillingAddonsPreviewUpdateData = {
1568
- body?: {
1850
+ body: {
1569
1851
  quantity: number;
1570
1852
  };
1571
1853
  path: {
@@ -1623,7 +1905,7 @@ export type BillingAddonsGetAddonUsagesResponses = {
1623
1905
  };
1624
1906
  export type BillingAddonsGetAddonUsagesResponse = BillingAddonsGetAddonUsagesResponses[keyof BillingAddonsGetAddonUsagesResponses];
1625
1907
  export type BillingAddonsUpdateData = {
1626
- body?: {
1908
+ body: {
1627
1909
  quantity: number;
1628
1910
  };
1629
1911
  path: {
@@ -1650,123 +1932,6 @@ export type BillingAddonsUpdateResponses = {
1650
1932
  };
1651
1933
  };
1652
1934
  export type BillingAddonsUpdateResponse = BillingAddonsUpdateResponses[keyof BillingAddonsUpdateResponses];
1653
- export type BillingSubscriptionGetData = {
1654
- body?: never;
1655
- path?: never;
1656
- query?: never;
1657
- url: '/billing/subscription';
1658
- };
1659
- export type BillingSubscriptionGetErrors = {
1660
- /**
1661
- * Error response
1662
- */
1663
- default: ErrorResponse;
1664
- };
1665
- export type BillingSubscriptionGetError = BillingSubscriptionGetErrors[keyof BillingSubscriptionGetErrors];
1666
- export type BillingSubscriptionGetResponses = {
1667
- /**
1668
- * Response
1669
- */
1670
- 200: {
1671
- id: string;
1672
- created_at: number;
1673
- current_period_start: number;
1674
- current_period_end: number;
1675
- quantity: number;
1676
- currency: string;
1677
- amount: number | null;
1678
- discount_percentage?: number | null;
1679
- name: string | null;
1680
- billing_period: 'day' | 'week' | 'month' | 'year' | null;
1681
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business' | null;
1682
- default_payment_method: {
1683
- type: string;
1684
- brand?: string | null;
1685
- last4: string | null;
1686
- exp_month: number | null;
1687
- exp_year: number | null;
1688
- bank_name?: string | null;
1689
- } | null;
1690
- addons: {
1691
- senders?: {
1692
- quantity: number;
1693
- };
1694
- email_warmups?: {
1695
- quantity: number;
1696
- };
1697
- };
1698
- } | null;
1699
- };
1700
- export type BillingSubscriptionGetResponse = BillingSubscriptionGetResponses[keyof BillingSubscriptionGetResponses];
1701
- export type BillingSubscriptionUpdateData = {
1702
- body?: {
1703
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1704
- billing_period: 'month' | 'year';
1705
- };
1706
- path?: never;
1707
- query?: never;
1708
- url: '/billing/subscription';
1709
- };
1710
- export type BillingSubscriptionUpdateErrors = {
1711
- /**
1712
- * Error response
1713
- */
1714
- default: ErrorResponse;
1715
- };
1716
- export type BillingSubscriptionUpdateError = BillingSubscriptionUpdateErrors[keyof BillingSubscriptionUpdateErrors];
1717
- export type BillingSubscriptionUpdateResponses = {
1718
- /**
1719
- * Response
1720
- */
1721
- 200: {
1722
- status: 'confirmation_required' | 'success' | 'payment_failed';
1723
- client_secret?: string;
1724
- failure_code?: string;
1725
- };
1726
- };
1727
- export type BillingSubscriptionUpdateResponse = BillingSubscriptionUpdateResponses[keyof BillingSubscriptionUpdateResponses];
1728
- export type BillingSubscriptionPreviewUpdateData = {
1729
- body?: {
1730
- plan: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1731
- billing_period: 'month' | 'year';
1732
- };
1733
- path?: never;
1734
- query?: never;
1735
- url: '/billing/subscription/preview';
1736
- };
1737
- export type BillingSubscriptionPreviewUpdateErrors = {
1738
- /**
1739
- * Error response
1740
- */
1741
- default: ErrorResponse;
1742
- };
1743
- export type BillingSubscriptionPreviewUpdateError = BillingSubscriptionPreviewUpdateErrors[keyof BillingSubscriptionPreviewUpdateErrors];
1744
- export type BillingSubscriptionPreviewUpdateResponses = {
1745
- /**
1746
- * Response
1747
- */
1748
- 200: {
1749
- discount_percents: Array<number>;
1750
- total_excluding_tax: number;
1751
- total: number;
1752
- amount_due: number;
1753
- added_from_balance: number;
1754
- consumed_balance: number;
1755
- credited_to_balance: number;
1756
- lines: Array<{
1757
- amount: number;
1758
- billing_period: 'day' | 'week' | 'month' | 'year';
1759
- proration: boolean;
1760
- plan?: 'free' | 'starter' | 'pro' | 'premium' | 'business';
1761
- addon?: 'senders' | 'email_warmups';
1762
- }>;
1763
- next_renewal: number;
1764
- total_tax_amounts: Array<{
1765
- amount: number;
1766
- }>;
1767
- };
1768
- };
1769
- export type BillingSubscriptionPreviewUpdateResponse = BillingSubscriptionPreviewUpdateResponses[keyof BillingSubscriptionPreviewUpdateResponses];
1770
1935
  export type BillingGetPricesData = {
1771
1936
  body?: never;
1772
1937
  path?: never;