@epilot/message-client 1.18.2 → 1.19.0

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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={390:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(466));s.default=t.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages:search":{"post":{"operationId":"searchMessages","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/read":{"post":{"operationId":"markReadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/unread/{actor}":{"get":{"operationId":"getUnread","parameters":[{"name":"actor","in":"path","required":true},{"in":"query","name":"email_filter"}],"responses":{}}},"/v2/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/message/threads:search":{"post":{"operationId":"searchThreadsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:searchIds":{"post":{"operationId":"searchIds","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads":{"put":{"operationId":"updateThread","responses":{}}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsDone":{"post":{"operationId":"markThreadAsDone","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsOpen":{"post":{"operationId":"markThreadAsOpen","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/timeline":{"get":{"operationId":"getThreadTimeline","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/bulk:read":{"post":{"operationId":"threadBulkActionsRead","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unread":{"post":{"operationId":"threadBulkActionsUnread","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:favorite":{"post":{"operationId":"threadBulkActionsFavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unfavorite":{"post":{"operationId":"threadBulkActionsUnfavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:trash":{"post":{"operationId":"threadBulkActionsTrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:untrash":{"post":{"operationId":"threadBulkActionsUntrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:delete":{"post":{"operationId":"threadBulkActionsDelete","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:done":{"post":{"operationId":"threadBulkActionsDone","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:open":{"post":{"operationId":"threadBulkActionsOpen","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/read":{"post":{"operationId":"markReadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unassign":{"post":{"operationId":"unassignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:pin":{"post":{"operationId":"pinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"unpinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft","responses":{}}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}}},"components":{},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},s={},r=function r(a){var t=s[a];if(void 0!==t)return t.exports;var n=s[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(390),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={390:function(e,s,r){var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0});var t=a(r(466));s.default=t.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"","version":""},"paths":{"/v1/message/messages":{"post":{"operationId":"sendMessage","parameters":[{"in":"query","name":"do_not_create_entities"}],"requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"updateMessage","responses":{}}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages:search":{"post":{"operationId":"searchMessages","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/messages/{id}/read":{"post":{"operationId":"markReadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/messages/unread/{actor}":{"get":{"operationId":"getUnread","parameters":[{"name":"actor","in":"path","required":true},{"in":"query","name":"email_filter"}],"responses":{}}},"/v2/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessageV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v2/message/threads:search":{"post":{"operationId":"searchThreadsV2","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads:searchIds":{"post":{"operationId":"searchIds","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads":{"put":{"operationId":"updateThread","responses":{}}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:move":{"post":{"operationId":"moveThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:markAsDone":{"post":{"operationId":"markThreadAsDone","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}:markAsOpen":{"post":{"operationId":"markThreadAsOpen","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/timeline":{"get":{"operationId":"getThreadTimeline","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/threads/bulk:read":{"post":{"operationId":"threadBulkActionsRead","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unread":{"post":{"operationId":"threadBulkActionsUnread","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:favorite":{"post":{"operationId":"threadBulkActionsFavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:unfavorite":{"post":{"operationId":"threadBulkActionsUnfavorite","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:trash":{"post":{"operationId":"threadBulkActionsTrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:untrash":{"post":{"operationId":"threadBulkActionsUntrash","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:delete":{"post":{"operationId":"threadBulkActionsDelete","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:done":{"post":{"operationId":"threadBulkActionsDone","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/bulk:open":{"post":{"operationId":"threadBulkActionsOpen","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/read":{"post":{"operationId":"markReadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v2/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThreadV2","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/unassign":{"post":{"operationId":"unassignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/message/threads/{id}:pin":{"post":{"operationId":"pinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}},"delete":{"operationId":"unpinThread","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft","responses":{}}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}],"responses":{}}}},"components":{"responses":{"NotFound":{"content":{"application/json":{}}},"Conflict":{"content":{"application/json":{}}},"InternalServerError":{"content":{"application/json":{}}},"BadRequest":{"content":{"application/json":{}}},"Forbidden":{"content":{"application/json":{}}}}},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},s={},r=function r(a){var t=s[a];if(void 0!==t)return t.exports;var n=s[a]={exports:{}};return e[a].call(n.exports,n,n.exports,r),n.exports}(390),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -220,6 +220,25 @@
220
220
  "responses": {}
221
221
  }
222
222
  },
223
+ "/v1/message/threads/{id}:move": {
224
+ "post": {
225
+ "operationId": "moveThread",
226
+ "parameters": [
227
+ {
228
+ "name": "id",
229
+ "in": "path",
230
+ "required": true
231
+ }
232
+ ],
233
+ "requestBody": {
234
+ "required": true,
235
+ "content": {
236
+ "application/json": {}
237
+ }
238
+ },
239
+ "responses": {}
240
+ }
241
+ },
223
242
  "/v1/message/threads/{id}:markAsDone": {
224
243
  "post": {
225
244
  "operationId": "markThreadAsDone",
@@ -569,7 +588,35 @@
569
588
  }
570
589
  }
571
590
  },
572
- "components": {},
591
+ "components": {
592
+ "responses": {
593
+ "NotFound": {
594
+ "content": {
595
+ "application/json": {}
596
+ }
597
+ },
598
+ "Conflict": {
599
+ "content": {
600
+ "application/json": {}
601
+ }
602
+ },
603
+ "InternalServerError": {
604
+ "content": {
605
+ "application/json": {}
606
+ }
607
+ },
608
+ "BadRequest": {
609
+ "content": {
610
+ "application/json": {}
611
+ }
612
+ },
613
+ "Forbidden": {
614
+ "content": {
615
+ "application/json": {}
616
+ }
617
+ }
618
+ }
619
+ },
573
620
  "servers": [
574
621
  {
575
622
  "url": "https://message.sls.epilot.io"
package/dist/openapi.d.ts CHANGED
@@ -9,6 +9,13 @@ import type {
9
9
  } from 'openapi-client-axios';
10
10
 
11
11
  declare namespace Components {
12
+ namespace Responses {
13
+ export type BadRequest = Schemas.ErrorResponse;
14
+ export type Conflict = Schemas.ErrorResponse;
15
+ export type Forbidden = Schemas.ErrorResponse;
16
+ export type InternalServerError = Schemas.ErrorResponse;
17
+ export type NotFound = Schemas.ErrorResponse;
18
+ }
12
19
  namespace Schemas {
13
20
  export interface Address {
14
21
  /**
@@ -124,6 +131,14 @@ declare namespace Components {
124
131
  */
125
132
  scopes?: /* Who is marking an item as read or unread. */ ReadingScope[];
126
133
  }
134
+ export interface ErrorResponse {
135
+ /**
136
+ * Error message
137
+ * example:
138
+ * Thread not found
139
+ */
140
+ error?: string;
141
+ }
127
142
  /**
128
143
  * List of entity fields to include or exclude in the response
129
144
  *
@@ -242,10 +257,20 @@ declare namespace Components {
242
257
  in_reply_to?: string;
243
258
  /**
244
259
  * User ID of user read the message.
260
+ * example:
261
+ * [
262
+ * "206801",
263
+ * "200109"
264
+ * ]
245
265
  */
246
266
  user_read_message?: string[];
247
267
  /**
248
268
  * Organization ID of organization read the message.
269
+ * example:
270
+ * [
271
+ * "789372",
272
+ * "210291"
273
+ * ]
249
274
  */
250
275
  org_read_message?: string[];
251
276
  /**
@@ -441,10 +466,20 @@ declare namespace Components {
441
466
  in_reply_to?: string;
442
467
  /**
443
468
  * User ID of user read the message.
469
+ * example:
470
+ * [
471
+ * "206801",
472
+ * "200109"
473
+ * ]
444
474
  */
445
475
  user_read_message?: string[];
446
476
  /**
447
477
  * Organization ID of organization read the message.
478
+ * example:
479
+ * [
480
+ * "789372",
481
+ * "210291"
482
+ * ]
448
483
  */
449
484
  org_read_message?: string[];
450
485
  /**
@@ -473,6 +508,14 @@ declare namespace Components {
473
508
  */
474
509
  html_download_url?: string;
475
510
  }
511
+ export interface MoveThreadPayload {
512
+ /**
513
+ * Inbox ID
514
+ * example:
515
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
516
+ */
517
+ inbox_id: string;
518
+ }
476
519
  export interface ReadMessagePayload {
477
520
  /**
478
521
  * The scopes to be used when marking an item as read or unread. The read status will be synced for all provided scopes.
@@ -514,10 +557,24 @@ declare namespace Components {
514
557
  * subject:"Request for solar panel price" AND _tags:INBOX
515
558
  */
516
559
  q: string;
517
- /**
518
- * List of entity fields to include in results
560
+ fields?: /**
561
+ * List of entity fields to include or exclude in the response
562
+ *
563
+ * Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
564
+ *
565
+ * Globbing and globstart (**) is supported for nested fields.
566
+ *
567
+ * example:
568
+ * [
569
+ * "_id",
570
+ * "_title",
571
+ * "first_name",
572
+ * "account",
573
+ * "!account.*._files",
574
+ * "**._product"
575
+ * ]
519
576
  */
520
- fields?: any;
577
+ FieldsParam;
521
578
  from?: number;
522
579
  size?: number;
523
580
  hydrate?: boolean;
@@ -537,10 +594,20 @@ declare namespace Components {
537
594
  topic: string;
538
595
  /**
539
596
  * User ID of who the message is assigned to. Default is the user who sends message.
597
+ * example:
598
+ * [
599
+ * "206801",
600
+ * "200109"
601
+ * ]
540
602
  */
541
603
  assigned_to?: string[];
542
604
  /**
543
605
  * Organization ID of organization read the message.
606
+ * example:
607
+ * [
608
+ * "789372",
609
+ * "210291"
610
+ * ]
544
611
  */
545
612
  org_read_message?: string[];
546
613
  /**
@@ -549,13 +616,7 @@ declare namespace Components {
549
616
  * false
550
617
  */
551
618
  done?: boolean;
552
- /**
553
- * Latest message of thread
554
- */
555
619
  latest_message?: Message;
556
- /**
557
- * Latest trash message of thread
558
- */
559
620
  latest_trash_message?: Message;
560
621
  /**
561
622
  * The date of the latest message time in the thread
@@ -784,10 +845,20 @@ declare namespace Paths {
784
845
  in_reply_to?: string;
785
846
  /**
786
847
  * User ID of user read the message.
848
+ * example:
849
+ * [
850
+ * "206801",
851
+ * "200109"
852
+ * ]
787
853
  */
788
854
  user_read_message?: string[];
789
855
  /**
790
856
  * Organization ID of organization read the message.
857
+ * example:
858
+ * [
859
+ * "789372",
860
+ * "210291"
861
+ * ]
791
862
  */
792
863
  org_read_message?: string[];
793
864
  /**
@@ -959,10 +1030,20 @@ declare namespace Paths {
959
1030
  in_reply_to?: string;
960
1031
  /**
961
1032
  * User ID of user read the message.
1033
+ * example:
1034
+ * [
1035
+ * "206801",
1036
+ * "200109"
1037
+ * ]
962
1038
  */
963
1039
  user_read_message?: string[];
964
1040
  /**
965
1041
  * Organization ID of organization read the message.
1042
+ * example:
1043
+ * [
1044
+ * "789372",
1045
+ * "210291"
1046
+ * ]
966
1047
  */
967
1048
  org_read_message?: string[];
968
1049
  /**
@@ -1108,10 +1189,20 @@ declare namespace Paths {
1108
1189
  in_reply_to?: string;
1109
1190
  /**
1110
1191
  * User ID of user read the message.
1192
+ * example:
1193
+ * [
1194
+ * "206801",
1195
+ * "200109"
1196
+ * ]
1111
1197
  */
1112
1198
  user_read_message?: string[];
1113
1199
  /**
1114
1200
  * Organization ID of organization read the message.
1201
+ * example:
1202
+ * [
1203
+ * "789372",
1204
+ * "210291"
1205
+ * ]
1115
1206
  */
1116
1207
  org_read_message?: string[];
1117
1208
  /**
@@ -1160,7 +1251,7 @@ declare namespace Paths {
1160
1251
  namespace GetUnread {
1161
1252
  namespace Parameters {
1162
1253
  export type Actor = "organization" | "user";
1163
- export type EmailFilter = any[];
1254
+ export type EmailFilter = string[] | string;
1164
1255
  }
1165
1256
  export interface PathParameters {
1166
1257
  actor: Parameters.Actor;
@@ -1343,6 +1434,24 @@ declare namespace Paths {
1343
1434
  }
1344
1435
  }
1345
1436
  }
1437
+ namespace MoveThread {
1438
+ namespace Parameters {
1439
+ export type Id = string;
1440
+ }
1441
+ export interface PathParameters {
1442
+ id: Parameters.Id;
1443
+ }
1444
+ export type RequestBody = Components.Schemas.MoveThreadPayload;
1445
+ namespace Responses {
1446
+ export interface $204 {
1447
+ }
1448
+ export type $400 = Components.Responses.BadRequest;
1449
+ export type $403 = Components.Responses.Forbidden;
1450
+ export type $404 = Components.Responses.NotFound;
1451
+ export type $409 = Components.Responses.Conflict;
1452
+ export type $500 = Components.Responses.InternalServerError;
1453
+ }
1454
+ }
1346
1455
  namespace PinThread {
1347
1456
  namespace Parameters {
1348
1457
  export type Id = string;
@@ -1500,10 +1609,20 @@ declare namespace Paths {
1500
1609
  in_reply_to?: string;
1501
1610
  /**
1502
1611
  * User ID of user read the message.
1612
+ * example:
1613
+ * [
1614
+ * "206801",
1615
+ * "200109"
1616
+ * ]
1503
1617
  */
1504
1618
  user_read_message?: string[];
1505
1619
  /**
1506
1620
  * Organization ID of organization read the message.
1621
+ * example:
1622
+ * [
1623
+ * "789372",
1624
+ * "210291"
1625
+ * ]
1507
1626
  */
1508
1627
  org_read_message?: string[];
1509
1628
  /**
@@ -1592,10 +1711,20 @@ declare namespace Paths {
1592
1711
  topic: string;
1593
1712
  /**
1594
1713
  * User ID of who the message is assigned to. Default is the user who sends message.
1714
+ * example:
1715
+ * [
1716
+ * "206801",
1717
+ * "200109"
1718
+ * ]
1595
1719
  */
1596
1720
  assigned_to?: string[];
1597
1721
  /**
1598
1722
  * Organization ID of organization read the message.
1723
+ * example:
1724
+ * [
1725
+ * "789372",
1726
+ * "210291"
1727
+ * ]
1599
1728
  */
1600
1729
  org_read_message?: string[];
1601
1730
  /**
@@ -1683,10 +1812,20 @@ declare namespace Paths {
1683
1812
  topic: string;
1684
1813
  /**
1685
1814
  * User ID of who the message is assigned to. Default is the user who sends message.
1815
+ * example:
1816
+ * [
1817
+ * "206801",
1818
+ * "200109"
1819
+ * ]
1686
1820
  */
1687
1821
  assigned_to?: string[];
1688
1822
  /**
1689
1823
  * Organization ID of organization read the message.
1824
+ * example:
1825
+ * [
1826
+ * "789372",
1827
+ * "210291"
1828
+ * ]
1690
1829
  */
1691
1830
  org_read_message?: string[];
1692
1831
  /**
@@ -1816,10 +1955,20 @@ declare namespace Paths {
1816
1955
  in_reply_to?: string;
1817
1956
  /**
1818
1957
  * User ID of user read the message.
1958
+ * example:
1959
+ * [
1960
+ * "206801",
1961
+ * "200109"
1962
+ * ]
1819
1963
  */
1820
1964
  user_read_message?: string[];
1821
1965
  /**
1822
1966
  * Organization ID of organization read the message.
1967
+ * example:
1968
+ * [
1969
+ * "789372",
1970
+ * "210291"
1971
+ * ]
1823
1972
  */
1824
1973
  org_read_message?: string[];
1825
1974
  /**
@@ -2151,10 +2300,20 @@ declare namespace Paths {
2151
2300
  in_reply_to?: string;
2152
2301
  /**
2153
2302
  * User ID of user read the message.
2303
+ * example:
2304
+ * [
2305
+ * "206801",
2306
+ * "200109"
2307
+ * ]
2154
2308
  */
2155
2309
  user_read_message?: string[];
2156
2310
  /**
2157
2311
  * Organization ID of organization read the message.
2312
+ * example:
2313
+ * [
2314
+ * "789372",
2315
+ * "210291"
2316
+ * ]
2158
2317
  */
2159
2318
  org_read_message?: string[];
2160
2319
  /**
@@ -2234,10 +2393,20 @@ declare namespace Paths {
2234
2393
  topic: string;
2235
2394
  /**
2236
2395
  * User ID of who the message is assigned to. Default is the user who sends message.
2396
+ * example:
2397
+ * [
2398
+ * "206801",
2399
+ * "200109"
2400
+ * ]
2237
2401
  */
2238
2402
  assigned_to?: string[];
2239
2403
  /**
2240
2404
  * Organization ID of organization read the message.
2405
+ * example:
2406
+ * [
2407
+ * "789372",
2408
+ * "210291"
2409
+ * ]
2241
2410
  */
2242
2411
  org_read_message?: string[];
2243
2412
  /**
@@ -2446,6 +2615,16 @@ export interface OperationMethods {
2446
2615
  data?: any,
2447
2616
  config?: AxiosRequestConfig
2448
2617
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
2618
+ /**
2619
+ * moveThread - moveThread
2620
+ *
2621
+ * Move thread to a different Inbox
2622
+ */
2623
+ 'moveThread'(
2624
+ parameters?: Parameters<Paths.MoveThread.PathParameters> | null,
2625
+ data?: Paths.MoveThread.RequestBody,
2626
+ config?: AxiosRequestConfig
2627
+ ): OperationResponse<Paths.MoveThread.Responses.$204>
2449
2628
  /**
2450
2629
  * markThreadAsDone - markThreadAsDone
2451
2630
  *
@@ -2934,6 +3113,18 @@ export interface PathsDictionary {
2934
3113
  config?: AxiosRequestConfig
2935
3114
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
2936
3115
  }
3116
+ ['/v1/message/threads/{id}:move']: {
3117
+ /**
3118
+ * moveThread - moveThread
3119
+ *
3120
+ * Move thread to a different Inbox
3121
+ */
3122
+ 'post'(
3123
+ parameters?: Parameters<Paths.MoveThread.PathParameters> | null,
3124
+ data?: Paths.MoveThread.RequestBody,
3125
+ config?: AxiosRequestConfig
3126
+ ): OperationResponse<Paths.MoveThread.Responses.$204>
3127
+ }
2937
3128
  ['/v1/message/threads/{id}:markAsDone']: {
2938
3129
  /**
2939
3130
  * markThreadAsDone - markThreadAsDone
@@ -3266,11 +3457,13 @@ export type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
3266
3457
  export type BaseEntity = Components.Schemas.BaseEntity;
3267
3458
  export type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
3268
3459
  export type BulkActionsPayloadWithScopes = Components.Schemas.BulkActionsPayloadWithScopes;
3460
+ export type ErrorResponse = Components.Schemas.ErrorResponse;
3269
3461
  export type FieldsParam = Components.Schemas.FieldsParam;
3270
3462
  export type File = Components.Schemas.File;
3271
3463
  export type Message = Components.Schemas.Message;
3272
3464
  export type MessageRequestParams = Components.Schemas.MessageRequestParams;
3273
3465
  export type MessageV2 = Components.Schemas.MessageV2;
3466
+ export type MoveThreadPayload = Components.Schemas.MoveThreadPayload;
3274
3467
  export type ReadMessagePayload = Components.Schemas.ReadMessagePayload;
3275
3468
  export type ReadingScope = Components.Schemas.ReadingScope;
3276
3469
  export type SearchIDParams = Components.Schemas.SearchIDParams;
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.2",
3
3
  "info": {
4
4
  "title": "Message API",
5
- "version": "1.0.0",
5
+ "version": "1.1.0",
6
6
  "description": "Send and receive email messages via your epilot organization\n"
7
7
  },
8
8
  "security": [
@@ -66,8 +66,8 @@
66
66
  "name": "do_not_create_entities",
67
67
  "description": "When true, this flag lets the caller to send only the message and by-pass creating the thread & message entities.",
68
68
  "schema": {
69
- "default": false,
70
- "type": "boolean"
69
+ "type": "boolean",
70
+ "default": false
71
71
  }
72
72
  }
73
73
  ],
@@ -451,8 +451,17 @@
451
451
  "name": "email_filter",
452
452
  "description": "emails to filter by",
453
453
  "schema": {
454
- "default": "test@epilot.dev",
455
- "type": "array"
454
+ "oneOf": [
455
+ {
456
+ "type": "array",
457
+ "items": {
458
+ "type": "string"
459
+ }
460
+ },
461
+ {
462
+ "type": "string"
463
+ }
464
+ ]
456
465
  }
457
466
  }
458
467
  ],
@@ -768,6 +777,57 @@
768
777
  }
769
778
  }
770
779
  },
780
+ "/v1/message/threads/{id}:move": {
781
+ "post": {
782
+ "operationId": "moveThread",
783
+ "summary": "moveThread",
784
+ "description": "Move thread to a different Inbox",
785
+ "tags": [
786
+ "Threads"
787
+ ],
788
+ "parameters": [
789
+ {
790
+ "name": "id",
791
+ "description": "Thread ID",
792
+ "in": "path",
793
+ "required": true,
794
+ "schema": {
795
+ "type": "string"
796
+ }
797
+ }
798
+ ],
799
+ "requestBody": {
800
+ "required": true,
801
+ "content": {
802
+ "application/json": {
803
+ "schema": {
804
+ "$ref": "#/components/schemas/MoveThreadPayload"
805
+ }
806
+ }
807
+ }
808
+ },
809
+ "responses": {
810
+ "204": {
811
+ "description": "Success"
812
+ },
813
+ "400": {
814
+ "$ref": "#/components/responses/BadRequest"
815
+ },
816
+ "403": {
817
+ "$ref": "#/components/responses/Forbidden"
818
+ },
819
+ "404": {
820
+ "$ref": "#/components/responses/NotFound"
821
+ },
822
+ "409": {
823
+ "$ref": "#/components/responses/Conflict"
824
+ },
825
+ "500": {
826
+ "$ref": "#/components/responses/InternalServerError"
827
+ }
828
+ }
829
+ }
830
+ },
771
831
  "/v1/message/threads/{id}:markAsDone": {
772
832
  "post": {
773
833
  "operationId": "markThreadAsDone",
@@ -1668,6 +1728,58 @@
1668
1728
  }
1669
1729
  },
1670
1730
  "components": {
1731
+ "responses": {
1732
+ "NotFound": {
1733
+ "description": "Not found",
1734
+ "content": {
1735
+ "application/json": {
1736
+ "schema": {
1737
+ "$ref": "#/components/schemas/ErrorResponse"
1738
+ }
1739
+ }
1740
+ }
1741
+ },
1742
+ "Conflict": {
1743
+ "description": "Conflict",
1744
+ "content": {
1745
+ "application/json": {
1746
+ "schema": {
1747
+ "$ref": "#/components/schemas/ErrorResponse"
1748
+ }
1749
+ }
1750
+ }
1751
+ },
1752
+ "InternalServerError": {
1753
+ "description": "Internal server error",
1754
+ "content": {
1755
+ "application/json": {
1756
+ "schema": {
1757
+ "$ref": "#/components/schemas/ErrorResponse"
1758
+ }
1759
+ }
1760
+ }
1761
+ },
1762
+ "BadRequest": {
1763
+ "description": "Bad request",
1764
+ "content": {
1765
+ "application/json": {
1766
+ "schema": {
1767
+ "$ref": "#/components/schemas/ErrorResponse"
1768
+ }
1769
+ }
1770
+ }
1771
+ },
1772
+ "Forbidden": {
1773
+ "description": "Forbidden",
1774
+ "content": {
1775
+ "application/json": {
1776
+ "schema": {
1777
+ "$ref": "#/components/schemas/ErrorResponse"
1778
+ }
1779
+ }
1780
+ }
1781
+ }
1782
+ },
1671
1783
  "securitySchemes": {
1672
1784
  "EpilotAuth": {
1673
1785
  "type": "http",
@@ -1683,6 +1795,29 @@
1683
1795
  }
1684
1796
  },
1685
1797
  "schemas": {
1798
+ "ErrorResponse": {
1799
+ "type": "object",
1800
+ "properties": {
1801
+ "error": {
1802
+ "type": "string",
1803
+ "description": "Error message",
1804
+ "example": "Thread not found"
1805
+ }
1806
+ }
1807
+ },
1808
+ "MoveThreadPayload": {
1809
+ "type": "object",
1810
+ "required": [
1811
+ "inbox_id"
1812
+ ],
1813
+ "properties": {
1814
+ "inbox_id": {
1815
+ "type": "string",
1816
+ "description": "Inbox ID",
1817
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
1818
+ }
1819
+ }
1820
+ },
1686
1821
  "BaseEntity": {
1687
1822
  "type": "object",
1688
1823
  "required": [
@@ -1753,23 +1888,23 @@
1753
1888
  "type": "array",
1754
1889
  "description": "User ID of who the message is assigned to. Default is the user who sends message.",
1755
1890
  "items": {
1756
- "type": "string",
1757
- "example": [
1758
- "206801",
1759
- "200109"
1760
- ]
1761
- }
1891
+ "type": "string"
1892
+ },
1893
+ "example": [
1894
+ "206801",
1895
+ "200109"
1896
+ ]
1762
1897
  },
1763
1898
  "org_read_message": {
1764
1899
  "type": "array",
1765
1900
  "description": "Organization ID of organization read the message.",
1766
1901
  "items": {
1767
- "type": "string",
1768
- "example": [
1769
- "789372",
1770
- "210291"
1771
- ]
1772
- }
1902
+ "type": "string"
1903
+ },
1904
+ "example": [
1905
+ "789372",
1906
+ "210291"
1907
+ ]
1773
1908
  },
1774
1909
  "done": {
1775
1910
  "type": "boolean",
@@ -1777,13 +1912,9 @@
1777
1912
  "example": false
1778
1913
  },
1779
1914
  "latest_message": {
1780
- "type": "object",
1781
- "description": "Latest message of thread",
1782
1915
  "$ref": "#/components/schemas/Message"
1783
1916
  },
1784
1917
  "latest_trash_message": {
1785
- "type": "object",
1786
- "description": "Latest trash message of thread",
1787
1918
  "$ref": "#/components/schemas/Message"
1788
1919
  },
1789
1920
  "latest_message_at": {
@@ -1869,23 +2000,23 @@
1869
2000
  "type": "array",
1870
2001
  "description": "User ID of user read the message.",
1871
2002
  "items": {
1872
- "type": "string",
1873
- "example": [
1874
- "206801",
1875
- "200109"
1876
- ]
1877
- }
2003
+ "type": "string"
2004
+ },
2005
+ "example": [
2006
+ "206801",
2007
+ "200109"
2008
+ ]
1878
2009
  },
1879
2010
  "org_read_message": {
1880
2011
  "type": "array",
1881
2012
  "description": "Organization ID of organization read the message.",
1882
2013
  "items": {
1883
- "type": "string",
1884
- "example": [
1885
- "789372",
1886
- "210291"
1887
- ]
1888
- }
2014
+ "type": "string"
2015
+ },
2016
+ "example": [
2017
+ "789372",
2018
+ "210291"
2019
+ ]
1889
2020
  },
1890
2021
  "send_status": {
1891
2022
  "type": "array",
@@ -2141,10 +2272,7 @@
2141
2272
  "example": "subject:\"Request for solar panel price\" AND _tags:INBOX"
2142
2273
  },
2143
2274
  "fields": {
2144
- "description": "List of entity fields to include in results",
2145
- "schema": {
2146
- "$ref": "#/components/schemas/FieldsParam"
2147
- }
2275
+ "$ref": "#/components/schemas/FieldsParam"
2148
2276
  },
2149
2277
  "from": {
2150
2278
  "type": "integer",
@@ -2269,12 +2397,12 @@
2269
2397
  "user_id": {
2270
2398
  "type": "string",
2271
2399
  "description": "User ID of the user who marked the thread as done",
2272
- "example": 123
2400
+ "example": "123"
2273
2401
  },
2274
2402
  "organization_id": {
2275
2403
  "type": "string",
2276
2404
  "description": "Organization ID of the organization who marked the thread as done",
2277
- "example": 456
2405
+ "example": "456"
2278
2406
  }
2279
2407
  }
2280
2408
  },
@@ -2295,12 +2423,12 @@
2295
2423
  "user_id": {
2296
2424
  "type": "string",
2297
2425
  "description": "User ID of the user who marked the thread as open",
2298
- "example": 123
2426
+ "example": "123"
2299
2427
  },
2300
2428
  "organization_id": {
2301
2429
  "type": "string",
2302
2430
  "description": "Organization ID of the organization who marked the thread as open",
2303
- "example": 456
2431
+ "example": "456"
2304
2432
  }
2305
2433
  }
2306
2434
  },
@@ -2398,6 +2526,9 @@
2398
2526
  }
2399
2527
  },
2400
2528
  "servers": [
2529
+ {
2530
+ "url": "https://message.sls.epilot.io"
2531
+ },
2401
2532
  {
2402
2533
  "url": "https://message.sls.epilot.io"
2403
2534
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.18.2",
3
+ "version": "1.19.0",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,18 @@
18
18
  "sdk",
19
19
  "message"
20
20
  ],
21
+ "scripts": {
22
+ "test": "jest",
23
+ "typescript": "tsc",
24
+ "bundle-definition": "webpack",
25
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/message.yaml",
26
+ "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
27
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
28
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
29
+ "build:watch": "npm run build && tsc -w",
30
+ "prepublishOnly": "npm run typegen && npm run build",
31
+ "lint": "pnpm exec eslint src"
32
+ },
21
33
  "files": [
22
34
  "*.js",
23
35
  "*.d.ts",
@@ -60,16 +72,5 @@
60
72
  "webpack": "^5.18.0",
61
73
  "webpack-cli": "^4.4.0"
62
74
  },
63
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
64
- "scripts": {
65
- "test": "jest",
66
- "typescript": "tsc",
67
- "bundle-definition": "webpack",
68
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/message.yaml",
69
- "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
70
- "build": "tsc && npm run build:patch && npm run bundle-definition",
71
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
72
- "build:watch": "npm run build && tsc -w",
73
- "lint": "pnpm exec eslint src"
74
- }
75
- }
75
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
76
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2025 epilot GmbH
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.