@epilot/message-client 1.6.0 → 1.7.1

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.
package/dist/openapi.d.ts CHANGED
@@ -23,14 +23,17 @@ declare namespace Components {
23
23
  */
24
24
  address: string;
25
25
  /**
26
- * Sent message status regarding to this recipient.\
27
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
26
+ * Type of the email, Internal (360 Agents), Partners, External users(Customers)
27
+ *
28
+ */
29
+ email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER";
30
+ /**
31
+ * Sent message status regarding to this recipient. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
28
32
  *
29
33
  */
30
34
  send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR";
31
35
  /**
32
- * Information about reject, complaint or bounce event. Only available if `send_status` is REJECT, COMPLAINT, BOUNCE or ERROR.\
33
- * JSON object is defined by AWS SES. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html>
36
+ * Information about reject, complaint or bounce event. Only available if `send_status` is REJECT, COMPLAINT, BOUNCE or ERROR. JSON object is defined by AWS SES. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html>
34
37
  *
35
38
  */
36
39
  send_error?: {
@@ -115,14 +118,12 @@ declare namespace Components {
115
118
  */
116
119
  cid?: string;
117
120
  /**
118
- * If true then this attachment should not be offered for download (at least not in the main attachments list).\
119
- * The usecase is CID embedded image (aka inline image).
121
+ * If true then this attachment should not be offered for download (at least not in the main attachments list). The usecase is CID embedded image (aka inline image).
120
122
  *
121
123
  */
122
124
  inline?: boolean;
123
125
  /**
124
- * If true then this attachment is sent via link. The link have to be inserted to email body by API caller.\
125
- * In this case, service doesn't process this attachment.
126
+ * If true then this attachment is sent via link. The link have to be inserted to email body by API caller. In this case, service doesn't process this attachment.
126
127
  *
127
128
  */
128
129
  send_as_link?: boolean;
@@ -174,9 +175,7 @@ declare namespace Components {
174
175
  bcc?: Address[];
175
176
  file?: /* Message attachments */ AttachmentsRelation;
176
177
  /**
177
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
178
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
179
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
178
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
180
179
  *
181
180
  * example:
182
181
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -198,8 +197,7 @@ declare namespace Components {
198
197
  */
199
198
  org_read_message?: string[];
200
199
  /**
201
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
202
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
200
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
203
201
  *
204
202
  */
205
203
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -207,12 +205,17 @@ declare namespace Components {
207
205
  * Message type
208
206
  */
209
207
  type?: "SENT" | "RECEIVED";
208
+ /**
209
+ * Template ID used for sending message.
210
+ * example:
211
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
212
+ */
213
+ template_id?: string;
210
214
  }
211
215
  export interface MessageRequestParams {
216
+ [name: string]: any;
212
217
  /**
213
- * Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...).\
214
- * Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.\
215
- * `thread` or `parent_id` must be provided either.
218
+ * Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...). Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing. `thread` or `parent_id` must be provided either.
216
219
  *
217
220
  * example:
218
221
  * {
@@ -235,8 +238,7 @@ declare namespace Components {
235
238
  assigned_to?: string[];
236
239
  };
237
240
  /**
238
- * Entity ID of parent message which this message replies to or forwards from.\
239
- * If both `parent_id` and `thread` are provided, `thread` is discarded.
241
+ * Entity ID of parent message which this message replies to or forwards from. If both `parent_id` and `thread` are provided, `thread` is discarded.
240
242
  *
241
243
  * example:
242
244
  * 44d7a3eb-0cce-4bd3-a7cd-0b3e652de0c2
@@ -275,6 +277,12 @@ declare namespace Components {
275
277
  */
276
278
  bcc?: Address[];
277
279
  file?: /* Message attachments */ AttachmentsRelation;
280
+ /**
281
+ * Template ID used for sending message.
282
+ * example:
283
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
284
+ */
285
+ template_id?: string;
278
286
  }
279
287
  export interface MessageV2 {
280
288
  /**
@@ -366,9 +374,7 @@ declare namespace Components {
366
374
  bcc?: Address[];
367
375
  file?: /* Message attachments */ AttachmentsRelation;
368
376
  /**
369
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
370
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
371
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
377
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
372
378
  *
373
379
  * example:
374
380
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -390,8 +396,7 @@ declare namespace Components {
390
396
  */
391
397
  org_read_message?: string[];
392
398
  /**
393
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
394
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
399
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
395
400
  *
396
401
  */
397
402
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -399,6 +404,12 @@ declare namespace Components {
399
404
  * Message type
400
405
  */
401
406
  type?: "SENT" | "RECEIVED";
407
+ /**
408
+ * Template ID used for sending message.
409
+ * example:
410
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
411
+ */
412
+ template_id?: string;
402
413
  /**
403
414
  * If true then html is not provided and must be downloaded using the html_download_url
404
415
  */
@@ -446,6 +457,12 @@ declare namespace Components {
446
457
  * Latest trash message of thread
447
458
  */
448
459
  latest_trash_message?: Message;
460
+ /**
461
+ * The date of the latest message time in the thread
462
+ * example:
463
+ * 2024-02-10T09:14:31.990Z
464
+ */
465
+ latest_message_at?: string;
449
466
  }
450
467
  }
451
468
  }
@@ -603,9 +620,7 @@ declare namespace Paths {
603
620
  bcc?: Components.Schemas.Address[];
604
621
  file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
605
622
  /**
606
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
607
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
608
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
623
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
609
624
  *
610
625
  * example:
611
626
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -627,8 +642,7 @@ declare namespace Paths {
627
642
  */
628
643
  org_read_message?: string[];
629
644
  /**
630
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
631
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
645
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
632
646
  *
633
647
  */
634
648
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -636,6 +650,12 @@ declare namespace Paths {
636
650
  * Message type
637
651
  */
638
652
  type?: "SENT" | "RECEIVED";
653
+ /**
654
+ * Template ID used for sending message.
655
+ * example:
656
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
657
+ */
658
+ template_id?: string;
639
659
  }
640
660
  export interface $403 {
641
661
  }
@@ -775,9 +795,7 @@ declare namespace Paths {
775
795
  bcc?: Components.Schemas.Address[];
776
796
  file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
777
797
  /**
778
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
779
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
780
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
798
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
781
799
  *
782
800
  * example:
783
801
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -799,8 +817,7 @@ declare namespace Paths {
799
817
  */
800
818
  org_read_message?: string[];
801
819
  /**
802
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
803
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
820
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
804
821
  *
805
822
  */
806
823
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -808,6 +825,12 @@ declare namespace Paths {
808
825
  * Message type
809
826
  */
810
827
  type?: "SENT" | "RECEIVED";
828
+ /**
829
+ * Template ID used for sending message.
830
+ * example:
831
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
832
+ */
833
+ template_id?: string;
811
834
  }
812
835
  export interface $302 {
813
836
  }
@@ -921,9 +944,7 @@ declare namespace Paths {
921
944
  bcc?: Components.Schemas.Address[];
922
945
  file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
923
946
  /**
924
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
925
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
926
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
947
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
927
948
  *
928
949
  * example:
929
950
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -945,8 +966,7 @@ declare namespace Paths {
945
966
  */
946
967
  org_read_message?: string[];
947
968
  /**
948
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
949
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
969
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
950
970
  *
951
971
  */
952
972
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -954,6 +974,12 @@ declare namespace Paths {
954
974
  * Message type
955
975
  */
956
976
  type?: "SENT" | "RECEIVED";
977
+ /**
978
+ * Template ID used for sending message.
979
+ * example:
980
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
981
+ */
982
+ template_id?: string;
957
983
  /**
958
984
  * If true then html is not provided and must be downloaded using the html_download_url
959
985
  */
@@ -1098,6 +1124,12 @@ declare namespace Paths {
1098
1124
  org_read_message?: string[];
1099
1125
  latest_message?: Components.Schemas.Message;
1100
1126
  latest_trash_message?: Components.Schemas.Message;
1127
+ /**
1128
+ * The date of the latest message time in the thread
1129
+ * example:
1130
+ * 2024-02-10T09:14:31.990Z
1131
+ */
1132
+ latest_message_at?: string;
1101
1133
  }[];
1102
1134
  }
1103
1135
  export interface $403 {
@@ -1196,9 +1228,7 @@ declare namespace Paths {
1196
1228
  bcc?: Components.Schemas.Address[];
1197
1229
  file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
1198
1230
  /**
1199
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
1200
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
1201
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
1231
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
1202
1232
  *
1203
1233
  * example:
1204
1234
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -1220,8 +1250,7 @@ declare namespace Paths {
1220
1250
  */
1221
1251
  org_read_message?: string[];
1222
1252
  /**
1223
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
1224
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
1253
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
1225
1254
  *
1226
1255
  */
1227
1256
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -1229,6 +1258,12 @@ declare namespace Paths {
1229
1258
  * Message type
1230
1259
  */
1231
1260
  type?: "SENT" | "RECEIVED";
1261
+ /**
1262
+ * Template ID used for sending message.
1263
+ * example:
1264
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
1265
+ */
1266
+ template_id?: string;
1232
1267
  }
1233
1268
  export interface $403 {
1234
1269
  }
@@ -1243,130 +1278,7 @@ declare namespace Paths {
1243
1278
  }
1244
1279
  export type RequestBody = Components.Schemas.MessageRequestParams;
1245
1280
  namespace Responses {
1246
- export interface $201 {
1247
- /**
1248
- * Entity ID
1249
- * example:
1250
- * 3fa85f64-5717-4562-b3fc-2c963f66afa6
1251
- */
1252
- _id: string;
1253
- /**
1254
- * Entity title
1255
- */
1256
- _title: string;
1257
- /**
1258
- * Ivy Organization ID the entity belongs to
1259
- * example:
1260
- * 206801
1261
- */
1262
- _org: string;
1263
- /**
1264
- * URL-friendly identifier for the entity schema
1265
- * example:
1266
- * message
1267
- */
1268
- _schema: string;
1269
- /**
1270
- * Entity tags
1271
- * example:
1272
- * [
1273
- * "pricing",
1274
- * "INBOX"
1275
- * ]
1276
- */
1277
- _tags?: string[];
1278
- /**
1279
- * Created date
1280
- * example:
1281
- * 2021-02-09T12:41:43.662Z
1282
- */
1283
- _created_at: string; // date-time
1284
- /**
1285
- * Updated date
1286
- * example:
1287
- * 2021-02-10T09:14:31.990Z
1288
- */
1289
- _updated_at: string; // date-time
1290
- /**
1291
- * Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
1292
- * example:
1293
- * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
1294
- */
1295
- message_id?: string;
1296
- /**
1297
- * Ivy User ID of user sends the message.
1298
- * example:
1299
- * 206801
1300
- */
1301
- sender?: string;
1302
- /**
1303
- * Subject
1304
- * example:
1305
- * Request for solar panel price
1306
- */
1307
- subject: string;
1308
- /**
1309
- * HTML body
1310
- * example:
1311
- * <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
1312
- */
1313
- html?: string;
1314
- /**
1315
- * Text body
1316
- * example:
1317
- * We at ABC GmbH would like to request a price quote for the solar panel.
1318
- */
1319
- text?: string;
1320
- from: Components.Schemas.Address;
1321
- reply_to?: Components.Schemas.Address;
1322
- /**
1323
- * To email addresses
1324
- */
1325
- to?: Components.Schemas.Address[];
1326
- /**
1327
- * Cc email addresses
1328
- */
1329
- cc?: Components.Schemas.Address[];
1330
- /**
1331
- * Bcc email addresses
1332
- */
1333
- bcc?: Components.Schemas.Address[];
1334
- file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
1335
- /**
1336
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
1337
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
1338
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
1339
- *
1340
- * example:
1341
- * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
1342
- */
1343
- references?: string;
1344
- /**
1345
- * In-Reply-To header. Value is the `message_id` of parent message.
1346
- *
1347
- * example:
1348
- * <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
1349
- */
1350
- in_reply_to?: string;
1351
- /**
1352
- * Ivy User ID of user read the message.
1353
- */
1354
- user_read_message?: string[];
1355
- /**
1356
- * Ivy Organization ID of organization read the message.
1357
- */
1358
- org_read_message?: string[];
1359
- /**
1360
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
1361
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
1362
- *
1363
- */
1364
- send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
1365
- /**
1366
- * Message type
1367
- */
1368
- type?: "SENT" | "RECEIVED";
1369
- }
1281
+ export type $201 = Components.Schemas.MessageRequestParams;
1370
1282
  export interface $403 {
1371
1283
  }
1372
1284
  }
@@ -1519,9 +1431,7 @@ declare namespace Paths {
1519
1431
  bcc?: Components.Schemas.Address[];
1520
1432
  file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
1521
1433
  /**
1522
- * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
1523
- * The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
1524
- * The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
1434
+ * References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
1525
1435
  *
1526
1436
  * example:
1527
1437
  * <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
@@ -1543,8 +1453,7 @@ declare namespace Paths {
1543
1453
  */
1544
1454
  org_read_message?: string[];
1545
1455
  /**
1546
- * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
1547
- * Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
1456
+ * Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
1548
1457
  *
1549
1458
  */
1550
1459
  send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
@@ -1552,6 +1461,12 @@ declare namespace Paths {
1552
1461
  * Message type
1553
1462
  */
1554
1463
  type?: "SENT" | "RECEIVED";
1464
+ /**
1465
+ * Template ID used for sending message.
1466
+ * example:
1467
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
1468
+ */
1469
+ template_id?: string;
1555
1470
  }
1556
1471
  export interface $403 {
1557
1472
  }
@@ -1622,6 +1537,12 @@ declare namespace Paths {
1622
1537
  org_read_message?: string[];
1623
1538
  latest_message?: Components.Schemas.Message;
1624
1539
  latest_trash_message?: Components.Schemas.Message;
1540
+ /**
1541
+ * The date of the latest message time in the thread
1542
+ * example:
1543
+ * 2024-02-10T09:14:31.990Z
1544
+ */
1545
+ latest_message_at?: string;
1625
1546
  }
1626
1547
  export interface $403 {
1627
1548
  }
@@ -1798,7 +1719,7 @@ export interface OperationMethods {
1798
1719
  /**
1799
1720
  * assignUsers - assignUsers
1800
1721
  *
1801
- * Assign users to thread for receiving notifications.
1722
+ * Assign users to thread for receiving notifications.
1802
1723
  * The operation replaces all existing assigned users in thread.
1803
1724
  *
1804
1725
  */
@@ -2047,7 +1968,7 @@ export interface PathsDictionary {
2047
1968
  /**
2048
1969
  * assignUsers - assignUsers
2049
1970
  *
2050
- * Assign users to thread for receiving notifications.
1971
+ * Assign users to thread for receiving notifications.
2051
1972
  * The operation replaces all existing assigned users in thread.
2052
1973
  *
2053
1974
  */
package/dist/openapi.json CHANGED
@@ -59,14 +59,7 @@
59
59
  "content": {
60
60
  "application/json": {
61
61
  "schema": {
62
- "allOf": [
63
- {
64
- "$ref": "#/components/schemas/BaseEntity"
65
- },
66
- {
67
- "$ref": "#/components/schemas/Message"
68
- }
69
- ]
62
+ "$ref": "#/components/schemas/MessageRequestParams"
70
63
  }
71
64
  }
72
65
  }
@@ -606,7 +599,7 @@
606
599
  "post": {
607
600
  "operationId": "assignUsers",
608
601
  "summary": "assignUsers",
609
- "description": "Assign users to thread for receiving notifications. \nThe operation replaces all existing assigned users in thread.\n",
602
+ "description": "Assign users to thread for receiving notifications.\nThe operation replaces all existing assigned users in thread.\n",
610
603
  "tags": [
611
604
  "Threads"
612
605
  ],
@@ -880,6 +873,11 @@
880
873
  "type": "object",
881
874
  "description": "Latest trash message of thread",
882
875
  "$ref": "#/components/schemas/Message"
876
+ },
877
+ "latest_message_at": {
878
+ "type": "string",
879
+ "description": "The date of the latest message time in the thread",
880
+ "example": "2024-02-10T09:14:31.990Z"
883
881
  }
884
882
  }
885
883
  },
@@ -947,7 +945,7 @@
947
945
  },
948
946
  "references": {
949
947
  "type": "string",
950
- "description": "References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\nThe basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.\n",
948
+ "description": "References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.\n",
951
949
  "example": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"
952
950
  },
953
951
  "in_reply_to": {
@@ -979,7 +977,7 @@
979
977
  },
980
978
  "send_status": {
981
979
  "type": "array",
982
- "description": "Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\n",
980
+ "description": "Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\n",
983
981
  "items": {
984
982
  "type": "string",
985
983
  "enum": [
@@ -999,6 +997,11 @@
999
997
  "SENT",
1000
998
  "RECEIVED"
1001
999
  ]
1000
+ },
1001
+ "template_id": {
1002
+ "type": "string",
1003
+ "description": "Template ID used for sending message.",
1004
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
1002
1005
  }
1003
1006
  }
1004
1007
  },
@@ -1040,9 +1043,19 @@
1040
1043
  "description": "Email address",
1041
1044
  "example": "messaging@epilot.cloud"
1042
1045
  },
1046
+ "email_type": {
1047
+ "type": "string",
1048
+ "description": "Type of the email, Internal (360 Agents), Partners, External users(Customers)\n",
1049
+ "nullable": true,
1050
+ "enum": [
1051
+ "INTERNAL",
1052
+ "EXTERNAL",
1053
+ "PARTNER"
1054
+ ]
1055
+ },
1043
1056
  "send_status": {
1044
1057
  "type": "string",
1045
- "description": "Sent message status regarding to this recipient.\\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\n",
1058
+ "description": "Sent message status regarding to this recipient. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\n",
1046
1059
  "enum": [
1047
1060
  "SEND",
1048
1061
  "DELIVERY",
@@ -1054,7 +1067,7 @@
1054
1067
  },
1055
1068
  "send_error": {
1056
1069
  "type": "object",
1057
- "description": "Information about reject, complaint or bounce event. Only available if `send_status` is REJECT, COMPLAINT, BOUNCE or ERROR.\\\nJSON object is defined by AWS SES. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html>\n"
1070
+ "description": "Information about reject, complaint or bounce event. Only available if `send_status` is REJECT, COMPLAINT, BOUNCE or ERROR. JSON object is defined by AWS SES. Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/notification-contents.html>\n"
1058
1071
  }
1059
1072
  }
1060
1073
  },
@@ -1098,12 +1111,12 @@
1098
1111
  },
1099
1112
  "inline": {
1100
1113
  "type": "boolean",
1101
- "description": "If true then this attachment should not be offered for download (at least not in the main attachments list).\\\nThe usecase is CID embedded image (aka inline image).\n",
1114
+ "description": "If true then this attachment should not be offered for download (at least not in the main attachments list). The usecase is CID embedded image (aka inline image).\n",
1102
1115
  "default": false
1103
1116
  },
1104
1117
  "send_as_link": {
1105
1118
  "type": "boolean",
1106
- "description": "If true then this attachment is sent via link. The link have to be inserted to email body by API caller.\\\nIn this case, service doesn't process this attachment.\n",
1119
+ "description": "If true then this attachment is sent via link. The link have to be inserted to email body by API caller. In this case, service doesn't process this attachment.\n",
1107
1120
  "default": false
1108
1121
  }
1109
1122
  }
@@ -1113,13 +1126,14 @@
1113
1126
  "subject",
1114
1127
  "from"
1115
1128
  ],
1129
+ "additionalProperties": true,
1116
1130
  "properties": {
1117
1131
  "thread": {
1118
1132
  "type": "object",
1119
1133
  "required": [
1120
1134
  "topic"
1121
1135
  ],
1122
- "description": "Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...).\\\nThread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.\\\n`thread` or `parent_id` must be provided either.\n",
1136
+ "description": "Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...). Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing. `thread` or `parent_id` must be provided either.\n",
1123
1137
  "properties": {
1124
1138
  "topic": {
1125
1139
  "type": "string",
@@ -1144,7 +1158,7 @@
1144
1158
  },
1145
1159
  "parent_id": {
1146
1160
  "type": "string",
1147
- "description": "Entity ID of parent message which this message replies to or forwards from.\\\nIf both `parent_id` and `thread` are provided, `thread` is discarded.\n",
1161
+ "description": "Entity ID of parent message which this message replies to or forwards from. If both `parent_id` and `thread` are provided, `thread` is discarded.\n",
1148
1162
  "example": "44d7a3eb-0cce-4bd3-a7cd-0b3e652de0c2"
1149
1163
  },
1150
1164
  "subject": {
@@ -1191,6 +1205,11 @@
1191
1205
  },
1192
1206
  "file": {
1193
1207
  "$ref": "#/components/schemas/AttachmentsRelation"
1208
+ },
1209
+ "template_id": {
1210
+ "type": "string",
1211
+ "description": "Template ID used for sending message.",
1212
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
1194
1213
  }
1195
1214
  }
1196
1215
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",