@internxt/sdk 1.17.5 → 1.17.7

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.
@@ -66,6 +66,7 @@ export declare class MailApi {
66
66
  * @returns The email with the corresponding id - `EmailResponse`
67
67
  */
68
68
  getEmail(id: string): Promise<EmailResponse>;
69
+ getThreads(parentMessageId: string): Promise<EmailResponse[]>;
69
70
  /**
70
71
  * Deletes the email with the corresponding id
71
72
  *
@@ -92,6 +92,9 @@ class MailApi {
92
92
  getEmail(id) {
93
93
  return this.client.get(`/email/${id}`, this.headers());
94
94
  }
95
+ getThreads(parentMessageId) {
96
+ return this.client.get(`/email/threads/${parentMessageId}`, this.headers());
97
+ }
95
98
  /**
96
99
  * Deletes the email with the corresponding id
97
100
  *
@@ -99,7 +99,7 @@ export interface paths {
99
99
  patch?: never;
100
100
  trace?: never;
101
101
  };
102
- '/email/{id}': {
102
+ '/email/threads/{id}': {
103
103
  parameters: {
104
104
  query?: never;
105
105
  header?: never;
@@ -107,24 +107,16 @@ export interface paths {
107
107
  cookie?: never;
108
108
  };
109
109
  /**
110
- * Get email by ID
111
- * @description Returns the full email including body content, headers, and metadata.
110
+ * Get email thread by id
111
+ * @description Returns all emails in the same thread as the given id, ordered chronologically. If the email has no replies, returns a single-element array.
112
112
  */
113
- get: operations['EmailController_get'];
113
+ get: operations['EmailController_getThread'];
114
114
  put?: never;
115
115
  post?: never;
116
- /**
117
- * Delete an email
118
- * @description Permanently deletes an email by ID.
119
- */
120
- delete: operations['EmailController_delete'];
116
+ delete?: never;
121
117
  options?: never;
122
118
  head?: never;
123
- /**
124
- * Update an email
125
- * @description Partially update an email: move it to another mailbox, mark as read/unread, or flag/unflag. Multiple operations can be combined in a single request.
126
- */
127
- patch: operations['EmailController_update'];
119
+ patch?: never;
128
120
  trace?: never;
129
121
  };
130
122
  '/email/keys/lookup': {
@@ -227,6 +219,30 @@ export interface paths {
227
219
  patch?: never;
228
220
  trace?: never;
229
221
  };
222
+ '/email/{id}': {
223
+ parameters: {
224
+ query?: never;
225
+ header?: never;
226
+ path?: never;
227
+ cookie?: never;
228
+ };
229
+ get?: never;
230
+ put?: never;
231
+ post?: never;
232
+ /**
233
+ * Delete an email
234
+ * @description Permanently deletes an email by ID.
235
+ */
236
+ delete: operations['EmailController_delete'];
237
+ options?: never;
238
+ head?: never;
239
+ /**
240
+ * Update an email
241
+ * @description Partially update an email: move it to another mailbox, mark as read/unread, or flag/unflag. Multiple operations can be combined in a single request.
242
+ */
243
+ patch: operations['EmailController_update'];
244
+ trace?: never;
245
+ };
230
246
  '/users/me/mail-account': {
231
247
  parameters: {
232
248
  query?: never;
@@ -590,6 +606,16 @@ export interface components {
590
606
  htmlBody?: string;
591
607
  encryption?: components['schemas']['EncryptionBlockDto'];
592
608
  attachments?: components['schemas']['AttachmentRefDto'][];
609
+ /**
610
+ * @example INTERNXT
611
+ * @enum {string}
612
+ */
613
+ deliveryMode?: 'INTERNXT' | 'EXTERNAL';
614
+ /**
615
+ * @description JMAP id of the email being replied to (for threading)
616
+ * @example Ma1f09b…
617
+ */
618
+ inReplyToEmailId?: string;
593
619
  };
594
620
  EmailCreatedResponseDto: {
595
621
  /**
@@ -816,12 +842,12 @@ export interface operations {
816
842
  };
817
843
  };
818
844
  };
819
- EmailController_get: {
845
+ EmailController_getThread: {
820
846
  parameters: {
821
847
  query?: never;
822
848
  header?: never;
823
849
  path: {
824
- /** @description Email ID */
850
+ /** @description Any email id in the thread */
825
851
  id: string;
826
852
  };
827
853
  cookie?: never;
@@ -833,68 +859,8 @@ export interface operations {
833
859
  [name: string]: unknown;
834
860
  };
835
861
  content: {
836
- 'application/json': components['schemas']['EmailResponseDto'];
837
- };
838
- };
839
- /** @description Email not found */
840
- 404: {
841
- headers: {
842
- [name: string]: unknown;
843
- };
844
- content?: never;
845
- };
846
- };
847
- };
848
- EmailController_delete: {
849
- parameters: {
850
- query?: never;
851
- header?: never;
852
- path: {
853
- /** @description Email ID */
854
- id: string;
855
- };
856
- cookie?: never;
857
- };
858
- requestBody?: never;
859
- responses: {
860
- /** @description Email deleted successfully */
861
- 204: {
862
- headers: {
863
- [name: string]: unknown;
864
- };
865
- content?: never;
866
- };
867
- /** @description Email not found */
868
- 404: {
869
- headers: {
870
- [name: string]: unknown;
871
- };
872
- content?: never;
873
- };
874
- };
875
- };
876
- EmailController_update: {
877
- parameters: {
878
- query?: never;
879
- header?: never;
880
- path: {
881
- /** @description Email ID */
882
- id: string;
883
- };
884
- cookie?: never;
885
- };
886
- requestBody: {
887
- content: {
888
- 'application/json': components['schemas']['UpdateEmailRequestDto'];
889
- };
890
- };
891
- responses: {
892
- /** @description Email updated successfully */
893
- 204: {
894
- headers: {
895
- [name: string]: unknown;
862
+ 'application/json': components['schemas']['EmailResponseDto'][];
896
863
  };
897
- content?: never;
898
864
  };
899
865
  /** @description Email not found */
900
866
  404: {
@@ -1028,6 +994,66 @@ export interface operations {
1028
994
  };
1029
995
  };
1030
996
  };
997
+ EmailController_delete: {
998
+ parameters: {
999
+ query?: never;
1000
+ header?: never;
1001
+ path: {
1002
+ /** @description Email ID */
1003
+ id: string;
1004
+ };
1005
+ cookie?: never;
1006
+ };
1007
+ requestBody?: never;
1008
+ responses: {
1009
+ /** @description Email deleted successfully */
1010
+ 204: {
1011
+ headers: {
1012
+ [name: string]: unknown;
1013
+ };
1014
+ content?: never;
1015
+ };
1016
+ /** @description Email not found */
1017
+ 404: {
1018
+ headers: {
1019
+ [name: string]: unknown;
1020
+ };
1021
+ content?: never;
1022
+ };
1023
+ };
1024
+ };
1025
+ EmailController_update: {
1026
+ parameters: {
1027
+ query?: never;
1028
+ header?: never;
1029
+ path: {
1030
+ /** @description Email ID */
1031
+ id: string;
1032
+ };
1033
+ cookie?: never;
1034
+ };
1035
+ requestBody: {
1036
+ content: {
1037
+ 'application/json': components['schemas']['UpdateEmailRequestDto'];
1038
+ };
1039
+ };
1040
+ responses: {
1041
+ /** @description Email updated successfully */
1042
+ 204: {
1043
+ headers: {
1044
+ [name: string]: unknown;
1045
+ };
1046
+ content?: never;
1047
+ };
1048
+ /** @description Email not found */
1049
+ 404: {
1050
+ headers: {
1051
+ [name: string]: unknown;
1052
+ };
1053
+ content?: never;
1054
+ };
1055
+ };
1056
+ };
1031
1057
  UserController_getMailAccount: {
1032
1058
  parameters: {
1033
1059
  query?: never;
@@ -14,11 +14,13 @@ export type DraftEmailRequest = components['schemas']['DraftEmailRequestDto'];
14
14
  export type UpdateEmailRequest = components['schemas']['UpdateEmailRequestDto'];
15
15
  export type EmailAddress = components['schemas']['EmailAddressDto'];
16
16
  export type ListEmailsQuery = operations['EmailController_list']['parameters']['query'];
17
+ export type ThreadsQuery = operations['EmailController_getThread']['parameters']['query'];
17
18
  export type SearchFiltersQuery = operations['EmailController_search']['requestBody']['content']['application/json'];
18
19
  export type EmailDomainsResponse = components['schemas']['MailDomainDto'][];
19
20
  export type UploadAttachmentResponse = components['schemas']['UploadAttachmentResponseDto'];
20
21
  export type DownloadAttachmentPayload = operations['EmailController_downloadAttachment']['parameters']['query'];
21
22
  export type AttachmentRef = components['schemas']['EmailAttachmentDto'];
23
+ export type DeliveryMode = components['schemas']['SendEmailRequestDto']['deliveryMode'];
22
24
  export type DownloadAttachmentResponse = {
23
25
  data: ArrayBuffer;
24
26
  contentType: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@internxt/sdk",
3
3
  "author": "Internxt <hello@internxt.com>",
4
- "version": "1.17.5",
4
+ "version": "1.17.7",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",