@epilot/message-client 1.15.2 → 1.15.4

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={914: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(240));s.default=t.default},240: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/{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":{}}},"/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":{}}},"/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}/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/{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/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}(914),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={914: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(240));s.default=t.default},240: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/{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":{}}},"/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":{}}},"/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/{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/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}(914),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -151,6 +151,17 @@
151
151
  "responses": {}
152
152
  }
153
153
  },
154
+ "/v1/message/threads:searchIds": {
155
+ "post": {
156
+ "operationId": "searchIds",
157
+ "requestBody": {
158
+ "content": {
159
+ "application/json": {}
160
+ }
161
+ },
162
+ "responses": {}
163
+ }
164
+ },
154
165
  "/v1/message/threads": {
155
166
  "put": {
156
167
  "operationId": "updateThread",
@@ -170,6 +181,45 @@
170
181
  "responses": {}
171
182
  }
172
183
  },
184
+ "/v1/message/threads/{id}:markAsDone": {
185
+ "post": {
186
+ "operationId": "markThreadAsDone",
187
+ "parameters": [
188
+ {
189
+ "name": "id",
190
+ "in": "path",
191
+ "required": true
192
+ }
193
+ ],
194
+ "responses": {}
195
+ }
196
+ },
197
+ "/v1/message/threads/{id}:markAsOpen": {
198
+ "post": {
199
+ "operationId": "markThreadAsOpen",
200
+ "parameters": [
201
+ {
202
+ "name": "id",
203
+ "in": "path",
204
+ "required": true
205
+ }
206
+ ],
207
+ "responses": {}
208
+ }
209
+ },
210
+ "/v1/message/threads/{id}/timeline": {
211
+ "get": {
212
+ "operationId": "getThreadTimeline",
213
+ "parameters": [
214
+ {
215
+ "name": "id",
216
+ "in": "path",
217
+ "required": true
218
+ }
219
+ ],
220
+ "responses": {}
221
+ }
222
+ },
173
223
  "/v1/message/threads/{id}/trash": {
174
224
  "post": {
175
225
  "operationId": "trashThread",
@@ -196,6 +246,78 @@
196
246
  "responses": {}
197
247
  }
198
248
  },
249
+ "/v1/message/threads/bulk:read": {
250
+ "post": {
251
+ "operationId": "threadBulkActionsRead",
252
+ "requestBody": {
253
+ "required": true,
254
+ "content": {
255
+ "application/json": {}
256
+ }
257
+ },
258
+ "responses": {}
259
+ }
260
+ },
261
+ "/v1/message/threads/bulk:unread": {
262
+ "post": {
263
+ "operationId": "threadBulkActionsUnread",
264
+ "requestBody": {
265
+ "required": true,
266
+ "content": {
267
+ "application/json": {}
268
+ }
269
+ },
270
+ "responses": {}
271
+ }
272
+ },
273
+ "/v1/message/threads/bulk:favorite": {
274
+ "post": {
275
+ "operationId": "threadBulkActionsFavorite",
276
+ "requestBody": {
277
+ "required": true,
278
+ "content": {
279
+ "application/json": {}
280
+ }
281
+ },
282
+ "responses": {}
283
+ }
284
+ },
285
+ "/v1/message/threads/bulk:unfavorite": {
286
+ "post": {
287
+ "operationId": "threadBulkActionsUnfavorite",
288
+ "requestBody": {
289
+ "required": true,
290
+ "content": {
291
+ "application/json": {}
292
+ }
293
+ },
294
+ "responses": {}
295
+ }
296
+ },
297
+ "/v1/message/threads/bulk:trash": {
298
+ "post": {
299
+ "operationId": "threadBulkActionsTrash",
300
+ "requestBody": {
301
+ "required": true,
302
+ "content": {
303
+ "application/json": {}
304
+ }
305
+ },
306
+ "responses": {}
307
+ }
308
+ },
309
+ "/v1/message/threads/bulk:untrash": {
310
+ "post": {
311
+ "operationId": "threadBulkActionsUntrash",
312
+ "requestBody": {
313
+ "required": true,
314
+ "content": {
315
+ "application/json": {}
316
+ }
317
+ },
318
+ "responses": {}
319
+ }
320
+ },
199
321
  "/v1/message/threads/{id}/read": {
200
322
  "post": {
201
323
  "operationId": "markReadThread",
package/dist/openapi.d.ts CHANGED
@@ -95,6 +95,35 @@ declare namespace Components {
95
95
  */
96
96
  _updated_at: string; // date-time
97
97
  }
98
+ export interface BulkActionsPayload {
99
+ /**
100
+ * Array of threads you wish to perform bulk actions on
101
+ * example:
102
+ * [
103
+ * "6b299eda-4018-4554-8965-c4b5598e6531"
104
+ * ]
105
+ */
106
+ ids: string[];
107
+ }
108
+ export interface BulkActionsPayloadWithScopes {
109
+ /**
110
+ * Array of threads you wish to perform bulk actions on
111
+ * example:
112
+ * [
113
+ * "6b299eda-4018-4554-8965-c4b5598e6531"
114
+ * ]
115
+ */
116
+ ids: string[];
117
+ /**
118
+ * The scopes to be used when marking an item as read or unread. The read status will be synced for all provided scopes.
119
+ * example:
120
+ * [
121
+ * "organization",
122
+ * "user"
123
+ * ]
124
+ */
125
+ scopes?: /* Who is marking an item as read or unread. */ ReadingScope[];
126
+ }
98
127
  export interface File {
99
128
  /**
100
129
  * File entity ID
@@ -441,6 +470,14 @@ declare namespace Components {
441
470
  * Who is marking an item as read or unread.
442
471
  */
443
472
  export type ReadingScope = "organization" | "user";
473
+ export interface SearchIDParams {
474
+ /**
475
+ * Lucene query syntax supported with ElasticSearch
476
+ * example:
477
+ * subject:"Request for solar panel price" AND _tags:INBOX
478
+ */
479
+ q?: string;
480
+ }
444
481
  export interface SearchParams {
445
482
  /**
446
483
  * Lucene query syntax supported with ElasticSearch
@@ -450,6 +487,7 @@ declare namespace Components {
450
487
  q: string;
451
488
  from?: number;
452
489
  size?: number;
490
+ hydrate?: boolean;
453
491
  }
454
492
  /**
455
493
  * Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.
@@ -469,6 +507,12 @@ declare namespace Components {
469
507
  * Organization ID of organization read the message.
470
508
  */
471
509
  org_read_message?: string[];
510
+ /**
511
+ * Whether the thread is marked as Done
512
+ * example:
513
+ * false
514
+ */
515
+ done?: boolean;
472
516
  /**
473
517
  * Latest message of thread
474
518
  */
@@ -484,6 +528,49 @@ declare namespace Components {
484
528
  */
485
529
  latest_message_at?: string;
486
530
  }
531
+ export interface ThreadDoneEvent {
532
+ type: "THREAD_DONE";
533
+ /**
534
+ * User ID of the user who marked the thread as done
535
+ * example:
536
+ * 123
537
+ */
538
+ user_id: string;
539
+ /**
540
+ * Organization ID of the organization who marked the thread as done
541
+ * example:
542
+ * 456
543
+ */
544
+ organization_id: string;
545
+ }
546
+ export interface ThreadOpenEvent {
547
+ type: "THREAD_OPEN";
548
+ /**
549
+ * User ID of the user who marked the thread as open
550
+ * example:
551
+ * 123
552
+ */
553
+ user_id: string;
554
+ /**
555
+ * Organization ID of the organization who marked the thread as open
556
+ * example:
557
+ * 456
558
+ */
559
+ organization_id: string;
560
+ }
561
+ export interface ThreadTimeline {
562
+ events: TimelineEvent[];
563
+ }
564
+ export interface TimelineEvent {
565
+ data: TimelineEventData;
566
+ /**
567
+ * Timestamp of the event
568
+ * example:
569
+ * 2024-01-01T00:00:00.000Z
570
+ */
571
+ timestamp: string;
572
+ }
573
+ export type TimelineEventData = ThreadDoneEvent | ThreadOpenEvent;
487
574
  }
488
575
  }
489
576
  declare namespace Paths {
@@ -510,6 +597,12 @@ declare namespace Paths {
510
597
  * 3f34ce73-089c-4d45-a5ee-c161234e41c3
511
598
  */
512
599
  entity_id?: string;
600
+ /**
601
+ * Organization ID
602
+ * example:
603
+ * 206801
604
+ */
605
+ org_id?: string;
513
606
  /**
514
607
  * To indicate this is main entity
515
608
  * example:
@@ -1015,6 +1108,19 @@ declare namespace Paths {
1015
1108
  }
1016
1109
  }
1017
1110
  }
1111
+ namespace GetThreadTimeline {
1112
+ namespace Parameters {
1113
+ export type Id = string;
1114
+ }
1115
+ export interface PathParameters {
1116
+ id: Parameters.Id;
1117
+ }
1118
+ namespace Responses {
1119
+ export type $200 = Components.Schemas.ThreadTimeline;
1120
+ export interface $403 {
1121
+ }
1122
+ }
1123
+ }
1018
1124
  namespace MarkReadMessage {
1019
1125
  namespace Parameters {
1020
1126
  export type Id = string;
@@ -1073,6 +1179,34 @@ declare namespace Paths {
1073
1179
  }
1074
1180
  }
1075
1181
  }
1182
+ namespace MarkThreadAsDone {
1183
+ namespace Parameters {
1184
+ export type Id = string;
1185
+ }
1186
+ export interface PathParameters {
1187
+ id: Parameters.Id;
1188
+ }
1189
+ namespace Responses {
1190
+ export interface $204 {
1191
+ }
1192
+ export interface $400 {
1193
+ }
1194
+ }
1195
+ }
1196
+ namespace MarkThreadAsOpen {
1197
+ namespace Parameters {
1198
+ export type Id = string;
1199
+ }
1200
+ export interface PathParameters {
1201
+ id: Parameters.Id;
1202
+ }
1203
+ namespace Responses {
1204
+ export interface $204 {
1205
+ }
1206
+ export interface $400 {
1207
+ }
1208
+ }
1209
+ }
1076
1210
  namespace MarkUnreadMessage {
1077
1211
  namespace Parameters {
1078
1212
  export type Id = string;
@@ -1131,6 +1265,25 @@ declare namespace Paths {
1131
1265
  }
1132
1266
  }
1133
1267
  }
1268
+ namespace SearchIds {
1269
+ export type RequestBody = Components.Schemas.SearchIDParams;
1270
+ namespace Responses {
1271
+ export interface $200 {
1272
+ /**
1273
+ * Total of matched threads
1274
+ * example:
1275
+ * 14
1276
+ */
1277
+ hits: number;
1278
+ /**
1279
+ * Matched threads ids
1280
+ */
1281
+ results: string[];
1282
+ }
1283
+ export interface $403 {
1284
+ }
1285
+ }
1286
+ }
1134
1287
  namespace SearchThreads {
1135
1288
  export type RequestBody = Components.Schemas.SearchParams;
1136
1289
  namespace Responses {
@@ -1202,6 +1355,12 @@ declare namespace Paths {
1202
1355
  * Organization ID of organization read the message.
1203
1356
  */
1204
1357
  org_read_message?: string[];
1358
+ /**
1359
+ * Whether the thread is marked as Done
1360
+ * example:
1361
+ * false
1362
+ */
1363
+ done?: boolean;
1205
1364
  latest_message?: Components.Schemas.Message;
1206
1365
  latest_trash_message?: Components.Schemas.Message;
1207
1366
  /**
@@ -1363,6 +1522,60 @@ declare namespace Paths {
1363
1522
  }
1364
1523
  }
1365
1524
  }
1525
+ namespace ThreadBulkActionsFavorite {
1526
+ export type RequestBody = Components.Schemas.BulkActionsPayload;
1527
+ namespace Responses {
1528
+ export interface $204 {
1529
+ }
1530
+ export interface $403 {
1531
+ }
1532
+ }
1533
+ }
1534
+ namespace ThreadBulkActionsRead {
1535
+ export type RequestBody = Components.Schemas.BulkActionsPayloadWithScopes;
1536
+ namespace Responses {
1537
+ export interface $204 {
1538
+ }
1539
+ export interface $403 {
1540
+ }
1541
+ }
1542
+ }
1543
+ namespace ThreadBulkActionsTrash {
1544
+ export type RequestBody = Components.Schemas.BulkActionsPayload;
1545
+ namespace Responses {
1546
+ export interface $204 {
1547
+ }
1548
+ export interface $403 {
1549
+ }
1550
+ }
1551
+ }
1552
+ namespace ThreadBulkActionsUnfavorite {
1553
+ export type RequestBody = Components.Schemas.BulkActionsPayload;
1554
+ namespace Responses {
1555
+ export interface $204 {
1556
+ }
1557
+ export interface $403 {
1558
+ }
1559
+ }
1560
+ }
1561
+ namespace ThreadBulkActionsUnread {
1562
+ export type RequestBody = Components.Schemas.BulkActionsPayloadWithScopes;
1563
+ namespace Responses {
1564
+ export interface $204 {
1565
+ }
1566
+ export interface $403 {
1567
+ }
1568
+ }
1569
+ }
1570
+ namespace ThreadBulkActionsUntrash {
1571
+ export type RequestBody = Components.Schemas.BulkActionsPayload;
1572
+ namespace Responses {
1573
+ export interface $204 {
1574
+ }
1575
+ export interface $403 {
1576
+ }
1577
+ }
1578
+ }
1366
1579
  namespace TrashMessage {
1367
1580
  namespace Parameters {
1368
1581
  export type Id = string;
@@ -1646,6 +1859,12 @@ declare namespace Paths {
1646
1859
  * Organization ID of organization read the message.
1647
1860
  */
1648
1861
  org_read_message?: string[];
1862
+ /**
1863
+ * Whether the thread is marked as Done
1864
+ * example:
1865
+ * false
1866
+ */
1867
+ done?: boolean;
1649
1868
  latest_message?: Components.Schemas.Message;
1650
1869
  latest_trash_message?: Components.Schemas.Message;
1651
1870
  /**
@@ -1777,6 +1996,19 @@ export interface OperationMethods {
1777
1996
  data?: Paths.SearchThreads.RequestBody,
1778
1997
  config?: AxiosRequestConfig
1779
1998
  ): OperationResponse<Paths.SearchThreads.Responses.$200>
1999
+ /**
2000
+ * searchIds - Search threads and return all id's
2001
+ *
2002
+ * Return all thread id's that match a criteria
2003
+ *
2004
+ * Lucene syntax supported.
2005
+ *
2006
+ */
2007
+ 'searchIds'(
2008
+ parameters?: Parameters<UnknownParamsObject> | null,
2009
+ data?: Paths.SearchIds.RequestBody,
2010
+ config?: AxiosRequestConfig
2011
+ ): OperationResponse<Paths.SearchIds.Responses.$200>
1780
2012
  /**
1781
2013
  * updateThread - updateThread
1782
2014
  *
@@ -1797,6 +2029,36 @@ export interface OperationMethods {
1797
2029
  data?: any,
1798
2030
  config?: AxiosRequestConfig
1799
2031
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
2032
+ /**
2033
+ * markThreadAsDone - markThreadAsDone
2034
+ *
2035
+ * Mark thread as done
2036
+ */
2037
+ 'markThreadAsDone'(
2038
+ parameters?: Parameters<Paths.MarkThreadAsDone.PathParameters> | null,
2039
+ data?: any,
2040
+ config?: AxiosRequestConfig
2041
+ ): OperationResponse<Paths.MarkThreadAsDone.Responses.$204>
2042
+ /**
2043
+ * markThreadAsOpen - markThreadAsOpen
2044
+ *
2045
+ * Mark thread as open
2046
+ */
2047
+ 'markThreadAsOpen'(
2048
+ parameters?: Parameters<Paths.MarkThreadAsOpen.PathParameters> | null,
2049
+ data?: any,
2050
+ config?: AxiosRequestConfig
2051
+ ): OperationResponse<Paths.MarkThreadAsOpen.Responses.$204>
2052
+ /**
2053
+ * getThreadTimeline - getThreadTimeline
2054
+ *
2055
+ * Get thread timeline
2056
+ */
2057
+ 'getThreadTimeline'(
2058
+ parameters?: Parameters<Paths.GetThreadTimeline.PathParameters> | null,
2059
+ data?: any,
2060
+ config?: AxiosRequestConfig
2061
+ ): OperationResponse<Paths.GetThreadTimeline.Responses.$200>
1800
2062
  /**
1801
2063
  * trashThread - trashThread
1802
2064
  *
@@ -1817,6 +2079,66 @@ export interface OperationMethods {
1817
2079
  data?: any,
1818
2080
  config?: AxiosRequestConfig
1819
2081
  ): OperationResponse<Paths.UntrashThread.Responses.$204>
2082
+ /**
2083
+ * threadBulkActionsRead - threadBulkActionsRead
2084
+ *
2085
+ * Perform a bulk action of marking an array of thread ids as read
2086
+ */
2087
+ 'threadBulkActionsRead'(
2088
+ parameters?: Parameters<UnknownParamsObject> | null,
2089
+ data?: Paths.ThreadBulkActionsRead.RequestBody,
2090
+ config?: AxiosRequestConfig
2091
+ ): OperationResponse<Paths.ThreadBulkActionsRead.Responses.$204>
2092
+ /**
2093
+ * threadBulkActionsUnread - threadBulkActionsUnread
2094
+ *
2095
+ * Perform a bulk action of marking an array of thread ids as unread
2096
+ */
2097
+ 'threadBulkActionsUnread'(
2098
+ parameters?: Parameters<UnknownParamsObject> | null,
2099
+ data?: Paths.ThreadBulkActionsUnread.RequestBody,
2100
+ config?: AxiosRequestConfig
2101
+ ): OperationResponse<Paths.ThreadBulkActionsUnread.Responses.$204>
2102
+ /**
2103
+ * threadBulkActionsFavorite - threadBulkActionsFavorite
2104
+ *
2105
+ * Perform a bulk action of marking an array of thread ids favorite
2106
+ */
2107
+ 'threadBulkActionsFavorite'(
2108
+ parameters?: Parameters<UnknownParamsObject> | null,
2109
+ data?: Paths.ThreadBulkActionsFavorite.RequestBody,
2110
+ config?: AxiosRequestConfig
2111
+ ): OperationResponse<Paths.ThreadBulkActionsFavorite.Responses.$204>
2112
+ /**
2113
+ * threadBulkActionsUnfavorite - threadBulkActionsUnfavorite
2114
+ *
2115
+ * Perform a bulk action of marking an array of thread ids unfavorited
2116
+ */
2117
+ 'threadBulkActionsUnfavorite'(
2118
+ parameters?: Parameters<UnknownParamsObject> | null,
2119
+ data?: Paths.ThreadBulkActionsUnfavorite.RequestBody,
2120
+ config?: AxiosRequestConfig
2121
+ ): OperationResponse<Paths.ThreadBulkActionsUnfavorite.Responses.$204>
2122
+ /**
2123
+ * threadBulkActionsTrash - threadBulkActionsTrash
2124
+ *
2125
+ * Perform a bulk action of trashing an array of threads
2126
+ */
2127
+ 'threadBulkActionsTrash'(
2128
+ parameters?: Parameters<UnknownParamsObject> | null,
2129
+ data?: Paths.ThreadBulkActionsTrash.RequestBody,
2130
+ config?: AxiosRequestConfig
2131
+ ): OperationResponse<Paths.ThreadBulkActionsTrash.Responses.$204>
2132
+ /**
2133
+ * threadBulkActionsUntrash - threadBulkActionsUntrash
2134
+ *
2135
+ * Perform a bulk action of untrashing an array of threads
2136
+ */
2137
+ 'threadBulkActionsUntrash'(
2138
+ parameters?: Parameters<UnknownParamsObject> | null,
2139
+ data?: Paths.ThreadBulkActionsUntrash.RequestBody,
2140
+ config?: AxiosRequestConfig
2141
+ ): OperationResponse<Paths.ThreadBulkActionsUntrash.Responses.$204>
1820
2142
  /**
1821
2143
  * markReadThread - markReadThread
1822
2144
  *
@@ -2065,6 +2387,21 @@ export interface PathsDictionary {
2065
2387
  config?: AxiosRequestConfig
2066
2388
  ): OperationResponse<Paths.SearchThreads.Responses.$200>
2067
2389
  }
2390
+ ['/v1/message/threads:searchIds']: {
2391
+ /**
2392
+ * searchIds - Search threads and return all id's
2393
+ *
2394
+ * Return all thread id's that match a criteria
2395
+ *
2396
+ * Lucene syntax supported.
2397
+ *
2398
+ */
2399
+ 'post'(
2400
+ parameters?: Parameters<UnknownParamsObject> | null,
2401
+ data?: Paths.SearchIds.RequestBody,
2402
+ config?: AxiosRequestConfig
2403
+ ): OperationResponse<Paths.SearchIds.Responses.$200>
2404
+ }
2068
2405
  ['/v1/message/threads']: {
2069
2406
  /**
2070
2407
  * updateThread - updateThread
@@ -2089,6 +2426,42 @@ export interface PathsDictionary {
2089
2426
  config?: AxiosRequestConfig
2090
2427
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
2091
2428
  }
2429
+ ['/v1/message/threads/{id}:markAsDone']: {
2430
+ /**
2431
+ * markThreadAsDone - markThreadAsDone
2432
+ *
2433
+ * Mark thread as done
2434
+ */
2435
+ 'post'(
2436
+ parameters?: Parameters<Paths.MarkThreadAsDone.PathParameters> | null,
2437
+ data?: any,
2438
+ config?: AxiosRequestConfig
2439
+ ): OperationResponse<Paths.MarkThreadAsDone.Responses.$204>
2440
+ }
2441
+ ['/v1/message/threads/{id}:markAsOpen']: {
2442
+ /**
2443
+ * markThreadAsOpen - markThreadAsOpen
2444
+ *
2445
+ * Mark thread as open
2446
+ */
2447
+ 'post'(
2448
+ parameters?: Parameters<Paths.MarkThreadAsOpen.PathParameters> | null,
2449
+ data?: any,
2450
+ config?: AxiosRequestConfig
2451
+ ): OperationResponse<Paths.MarkThreadAsOpen.Responses.$204>
2452
+ }
2453
+ ['/v1/message/threads/{id}/timeline']: {
2454
+ /**
2455
+ * getThreadTimeline - getThreadTimeline
2456
+ *
2457
+ * Get thread timeline
2458
+ */
2459
+ 'get'(
2460
+ parameters?: Parameters<Paths.GetThreadTimeline.PathParameters> | null,
2461
+ data?: any,
2462
+ config?: AxiosRequestConfig
2463
+ ): OperationResponse<Paths.GetThreadTimeline.Responses.$200>
2464
+ }
2092
2465
  ['/v1/message/threads/{id}/trash']: {
2093
2466
  /**
2094
2467
  * trashThread - trashThread
@@ -2113,6 +2486,78 @@ export interface PathsDictionary {
2113
2486
  config?: AxiosRequestConfig
2114
2487
  ): OperationResponse<Paths.UntrashThread.Responses.$204>
2115
2488
  }
2489
+ ['/v1/message/threads/bulk:read']: {
2490
+ /**
2491
+ * threadBulkActionsRead - threadBulkActionsRead
2492
+ *
2493
+ * Perform a bulk action of marking an array of thread ids as read
2494
+ */
2495
+ 'post'(
2496
+ parameters?: Parameters<UnknownParamsObject> | null,
2497
+ data?: Paths.ThreadBulkActionsRead.RequestBody,
2498
+ config?: AxiosRequestConfig
2499
+ ): OperationResponse<Paths.ThreadBulkActionsRead.Responses.$204>
2500
+ }
2501
+ ['/v1/message/threads/bulk:unread']: {
2502
+ /**
2503
+ * threadBulkActionsUnread - threadBulkActionsUnread
2504
+ *
2505
+ * Perform a bulk action of marking an array of thread ids as unread
2506
+ */
2507
+ 'post'(
2508
+ parameters?: Parameters<UnknownParamsObject> | null,
2509
+ data?: Paths.ThreadBulkActionsUnread.RequestBody,
2510
+ config?: AxiosRequestConfig
2511
+ ): OperationResponse<Paths.ThreadBulkActionsUnread.Responses.$204>
2512
+ }
2513
+ ['/v1/message/threads/bulk:favorite']: {
2514
+ /**
2515
+ * threadBulkActionsFavorite - threadBulkActionsFavorite
2516
+ *
2517
+ * Perform a bulk action of marking an array of thread ids favorite
2518
+ */
2519
+ 'post'(
2520
+ parameters?: Parameters<UnknownParamsObject> | null,
2521
+ data?: Paths.ThreadBulkActionsFavorite.RequestBody,
2522
+ config?: AxiosRequestConfig
2523
+ ): OperationResponse<Paths.ThreadBulkActionsFavorite.Responses.$204>
2524
+ }
2525
+ ['/v1/message/threads/bulk:unfavorite']: {
2526
+ /**
2527
+ * threadBulkActionsUnfavorite - threadBulkActionsUnfavorite
2528
+ *
2529
+ * Perform a bulk action of marking an array of thread ids unfavorited
2530
+ */
2531
+ 'post'(
2532
+ parameters?: Parameters<UnknownParamsObject> | null,
2533
+ data?: Paths.ThreadBulkActionsUnfavorite.RequestBody,
2534
+ config?: AxiosRequestConfig
2535
+ ): OperationResponse<Paths.ThreadBulkActionsUnfavorite.Responses.$204>
2536
+ }
2537
+ ['/v1/message/threads/bulk:trash']: {
2538
+ /**
2539
+ * threadBulkActionsTrash - threadBulkActionsTrash
2540
+ *
2541
+ * Perform a bulk action of trashing an array of threads
2542
+ */
2543
+ 'post'(
2544
+ parameters?: Parameters<UnknownParamsObject> | null,
2545
+ data?: Paths.ThreadBulkActionsTrash.RequestBody,
2546
+ config?: AxiosRequestConfig
2547
+ ): OperationResponse<Paths.ThreadBulkActionsTrash.Responses.$204>
2548
+ }
2549
+ ['/v1/message/threads/bulk:untrash']: {
2550
+ /**
2551
+ * threadBulkActionsUntrash - threadBulkActionsUntrash
2552
+ *
2553
+ * Perform a bulk action of untrashing an array of threads
2554
+ */
2555
+ 'post'(
2556
+ parameters?: Parameters<UnknownParamsObject> | null,
2557
+ data?: Paths.ThreadBulkActionsUntrash.RequestBody,
2558
+ config?: AxiosRequestConfig
2559
+ ): OperationResponse<Paths.ThreadBulkActionsUntrash.Responses.$204>
2560
+ }
2116
2561
  ['/v1/message/threads/{id}/read']: {
2117
2562
  /**
2118
2563
  * markReadThread - markReadThread
@@ -2252,11 +2697,19 @@ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
2252
2697
  export type Address = Components.Schemas.Address;
2253
2698
  export type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
2254
2699
  export type BaseEntity = Components.Schemas.BaseEntity;
2700
+ export type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
2701
+ export type BulkActionsPayloadWithScopes = Components.Schemas.BulkActionsPayloadWithScopes;
2255
2702
  export type File = Components.Schemas.File;
2256
2703
  export type Message = Components.Schemas.Message;
2257
2704
  export type MessageRequestParams = Components.Schemas.MessageRequestParams;
2258
2705
  export type MessageV2 = Components.Schemas.MessageV2;
2259
2706
  export type ReadMessagePayload = Components.Schemas.ReadMessagePayload;
2260
2707
  export type ReadingScope = Components.Schemas.ReadingScope;
2708
+ export type SearchIDParams = Components.Schemas.SearchIDParams;
2261
2709
  export type SearchParams = Components.Schemas.SearchParams;
2262
2710
  export type Thread = Components.Schemas.Thread;
2711
+ export type ThreadDoneEvent = Components.Schemas.ThreadDoneEvent;
2712
+ export type ThreadOpenEvent = Components.Schemas.ThreadOpenEvent;
2713
+ export type ThreadTimeline = Components.Schemas.ThreadTimeline;
2714
+ export type TimelineEvent = Components.Schemas.TimelineEvent;
2715
+ export type TimelineEventData = Components.Schemas.TimelineEventData;
package/dist/openapi.json CHANGED
@@ -22,6 +22,33 @@
22
22
  },
23
23
  {
24
24
  "name": "Drafts"
25
+ },
26
+ {
27
+ "name": "message_schema",
28
+ "x-displayName": "Message",
29
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Message\" />\n"
30
+ },
31
+ {
32
+ "name": "thread_schema",
33
+ "x-displayName": "Thread",
34
+ "description": "<SchemaDefinition schemaRef=\"#/components/schemas/Thread\" />\n"
35
+ }
36
+ ],
37
+ "x-tagGroups": [
38
+ {
39
+ "name": "APIs",
40
+ "tags": [
41
+ "Messages",
42
+ "Threads",
43
+ "Drafts"
44
+ ]
45
+ },
46
+ {
47
+ "name": "Schemas",
48
+ "tags": [
49
+ "message_schema",
50
+ "thread_schema"
51
+ ]
25
52
  }
26
53
  ],
27
54
  "paths": {
@@ -436,6 +463,58 @@
436
463
  }
437
464
  }
438
465
  },
466
+ "/v1/message/threads:searchIds": {
467
+ "post": {
468
+ "operationId": "searchIds",
469
+ "summary": "Search threads and return all id's",
470
+ "description": "Return all thread id's that match a criteria\n\nLucene syntax supported.\n",
471
+ "tags": [
472
+ "Threads"
473
+ ],
474
+ "requestBody": {
475
+ "content": {
476
+ "application/json": {
477
+ "schema": {
478
+ "$ref": "#/components/schemas/SearchIDParams"
479
+ }
480
+ }
481
+ }
482
+ },
483
+ "responses": {
484
+ "200": {
485
+ "description": "Success",
486
+ "content": {
487
+ "application/json": {
488
+ "schema": {
489
+ "type": "object",
490
+ "required": [
491
+ "hits",
492
+ "results"
493
+ ],
494
+ "properties": {
495
+ "hits": {
496
+ "type": "number",
497
+ "description": "Total of matched threads",
498
+ "example": 14
499
+ },
500
+ "results": {
501
+ "type": "array",
502
+ "description": "Matched threads ids",
503
+ "items": {
504
+ "type": "string"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
510
+ }
511
+ },
512
+ "403": {
513
+ "description": "Forbidden"
514
+ }
515
+ }
516
+ }
517
+ },
439
518
  "/v1/message/threads": {
440
519
  "put": {
441
520
  "operationId": "updateThread",
@@ -497,6 +576,100 @@
497
576
  }
498
577
  }
499
578
  },
579
+ "/v1/message/threads/{id}:markAsDone": {
580
+ "post": {
581
+ "operationId": "markThreadAsDone",
582
+ "summary": "markThreadAsDone",
583
+ "description": "Mark thread as done",
584
+ "tags": [
585
+ "Threads"
586
+ ],
587
+ "parameters": [
588
+ {
589
+ "name": "id",
590
+ "description": "Thread ID",
591
+ "in": "path",
592
+ "required": true,
593
+ "schema": {
594
+ "type": "string"
595
+ }
596
+ }
597
+ ],
598
+ "responses": {
599
+ "204": {
600
+ "description": "Success"
601
+ },
602
+ "400": {
603
+ "description": "Bad Request"
604
+ }
605
+ }
606
+ }
607
+ },
608
+ "/v1/message/threads/{id}:markAsOpen": {
609
+ "post": {
610
+ "operationId": "markThreadAsOpen",
611
+ "summary": "markThreadAsOpen",
612
+ "description": "Mark thread as open",
613
+ "tags": [
614
+ "Threads"
615
+ ],
616
+ "parameters": [
617
+ {
618
+ "name": "id",
619
+ "description": "Thread ID",
620
+ "in": "path",
621
+ "required": true,
622
+ "schema": {
623
+ "type": "string"
624
+ }
625
+ }
626
+ ],
627
+ "responses": {
628
+ "204": {
629
+ "description": "Success"
630
+ },
631
+ "400": {
632
+ "description": "Bad Request"
633
+ }
634
+ }
635
+ }
636
+ },
637
+ "/v1/message/threads/{id}/timeline": {
638
+ "get": {
639
+ "operationId": "getThreadTimeline",
640
+ "summary": "getThreadTimeline",
641
+ "description": "Get thread timeline",
642
+ "tags": [
643
+ "Threads"
644
+ ],
645
+ "parameters": [
646
+ {
647
+ "name": "id",
648
+ "description": "Thread ID",
649
+ "in": "path",
650
+ "required": true,
651
+ "schema": {
652
+ "type": "string"
653
+ }
654
+ }
655
+ ],
656
+ "responses": {
657
+ "200": {
658
+ "description": "Success",
659
+ "content": {
660
+ "application/json": {
661
+ "schema": {
662
+ "$ref": "#/components/schemas/ThreadTimeline"
663
+ }
664
+ }
665
+ }
666
+ },
667
+ "403": {
668
+ "description": "Forbidden"
669
+ }
670
+ }
671
+ }
672
+ },
500
673
  "/v1/message/threads/{id}/trash": {
501
674
  "post": {
502
675
  "operationId": "trashThread",
@@ -555,6 +728,174 @@
555
728
  }
556
729
  }
557
730
  },
731
+ "/v1/message/threads/bulk:read": {
732
+ "post": {
733
+ "operationId": "threadBulkActionsRead",
734
+ "summary": "threadBulkActionsRead",
735
+ "description": "Perform a bulk action of marking an array of thread ids as read",
736
+ "tags": [
737
+ "Threads"
738
+ ],
739
+ "requestBody": {
740
+ "required": true,
741
+ "content": {
742
+ "application/json": {
743
+ "schema": {
744
+ "$ref": "#/components/schemas/BulkActionsPayloadWithScopes"
745
+ }
746
+ }
747
+ }
748
+ },
749
+ "responses": {
750
+ "204": {
751
+ "description": "Success"
752
+ },
753
+ "403": {
754
+ "description": "Forbidden"
755
+ }
756
+ }
757
+ }
758
+ },
759
+ "/v1/message/threads/bulk:unread": {
760
+ "post": {
761
+ "operationId": "threadBulkActionsUnread",
762
+ "summary": "threadBulkActionsUnread",
763
+ "description": "Perform a bulk action of marking an array of thread ids as unread",
764
+ "tags": [
765
+ "Threads"
766
+ ],
767
+ "requestBody": {
768
+ "required": true,
769
+ "content": {
770
+ "application/json": {
771
+ "schema": {
772
+ "$ref": "#/components/schemas/BulkActionsPayloadWithScopes"
773
+ }
774
+ }
775
+ }
776
+ },
777
+ "responses": {
778
+ "204": {
779
+ "description": "Success"
780
+ },
781
+ "403": {
782
+ "description": "Forbidden"
783
+ }
784
+ }
785
+ }
786
+ },
787
+ "/v1/message/threads/bulk:favorite": {
788
+ "post": {
789
+ "operationId": "threadBulkActionsFavorite",
790
+ "summary": "threadBulkActionsFavorite",
791
+ "description": "Perform a bulk action of marking an array of thread ids favorite",
792
+ "tags": [
793
+ "Threads"
794
+ ],
795
+ "requestBody": {
796
+ "required": true,
797
+ "content": {
798
+ "application/json": {
799
+ "schema": {
800
+ "$ref": "#/components/schemas/BulkActionsPayload"
801
+ }
802
+ }
803
+ }
804
+ },
805
+ "responses": {
806
+ "204": {
807
+ "description": "Success"
808
+ },
809
+ "403": {
810
+ "description": "Forbidden"
811
+ }
812
+ }
813
+ }
814
+ },
815
+ "/v1/message/threads/bulk:unfavorite": {
816
+ "post": {
817
+ "operationId": "threadBulkActionsUnfavorite",
818
+ "summary": "threadBulkActionsUnfavorite",
819
+ "description": "Perform a bulk action of marking an array of thread ids unfavorited",
820
+ "tags": [
821
+ "Threads"
822
+ ],
823
+ "requestBody": {
824
+ "required": true,
825
+ "content": {
826
+ "application/json": {
827
+ "schema": {
828
+ "$ref": "#/components/schemas/BulkActionsPayload"
829
+ }
830
+ }
831
+ }
832
+ },
833
+ "responses": {
834
+ "204": {
835
+ "description": "Success"
836
+ },
837
+ "403": {
838
+ "description": "Forbidden"
839
+ }
840
+ }
841
+ }
842
+ },
843
+ "/v1/message/threads/bulk:trash": {
844
+ "post": {
845
+ "operationId": "threadBulkActionsTrash",
846
+ "summary": "threadBulkActionsTrash",
847
+ "description": "Perform a bulk action of trashing an array of threads",
848
+ "tags": [
849
+ "Threads"
850
+ ],
851
+ "requestBody": {
852
+ "required": true,
853
+ "content": {
854
+ "application/json": {
855
+ "schema": {
856
+ "$ref": "#/components/schemas/BulkActionsPayload"
857
+ }
858
+ }
859
+ }
860
+ },
861
+ "responses": {
862
+ "204": {
863
+ "description": "Success"
864
+ },
865
+ "403": {
866
+ "description": "Forbidden"
867
+ }
868
+ }
869
+ }
870
+ },
871
+ "/v1/message/threads/bulk:untrash": {
872
+ "post": {
873
+ "operationId": "threadBulkActionsUntrash",
874
+ "summary": "threadBulkActionsUntrash",
875
+ "description": "Perform a bulk action of untrashing an array of threads",
876
+ "tags": [
877
+ "Threads"
878
+ ],
879
+ "requestBody": {
880
+ "required": true,
881
+ "content": {
882
+ "application/json": {
883
+ "schema": {
884
+ "$ref": "#/components/schemas/BulkActionsPayload"
885
+ }
886
+ }
887
+ }
888
+ },
889
+ "responses": {
890
+ "204": {
891
+ "description": "Success"
892
+ },
893
+ "403": {
894
+ "description": "Forbidden"
895
+ }
896
+ }
897
+ }
898
+ },
558
899
  "/v1/message/threads/{id}/read": {
559
900
  "post": {
560
901
  "operationId": "markReadThread",
@@ -730,6 +1071,11 @@
730
1071
  "type": "string",
731
1072
  "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
732
1073
  },
1074
+ "org_id": {
1075
+ "description": "Organization ID",
1076
+ "type": "string",
1077
+ "example": "206801"
1078
+ },
733
1079
  "is_main_entity": {
734
1080
  "description": "To indicate this is main entity",
735
1081
  "type": "boolean",
@@ -1075,6 +1421,11 @@
1075
1421
  ]
1076
1422
  }
1077
1423
  },
1424
+ "done": {
1425
+ "type": "boolean",
1426
+ "description": "Whether the thread is marked as Done",
1427
+ "example": false
1428
+ },
1078
1429
  "latest_message": {
1079
1430
  "type": "object",
1080
1431
  "description": "Latest message of thread",
@@ -1448,6 +1799,20 @@
1448
1799
  "type": "integer",
1449
1800
  "minimum": 1,
1450
1801
  "default": 10
1802
+ },
1803
+ "hydrate": {
1804
+ "type": "boolean",
1805
+ "default": false
1806
+ }
1807
+ }
1808
+ },
1809
+ "SearchIDParams": {
1810
+ "type": "object",
1811
+ "properties": {
1812
+ "q": {
1813
+ "description": "Lucene query syntax supported with ElasticSearch",
1814
+ "type": "string",
1815
+ "example": "subject:\"Request for solar panel price\" AND _tags:INBOX"
1451
1816
  }
1452
1817
  }
1453
1818
  },
@@ -1481,6 +1846,148 @@
1481
1846
  "organization",
1482
1847
  "user"
1483
1848
  ]
1849
+ },
1850
+ "ThreadTimeline": {
1851
+ "type": "object",
1852
+ "required": [
1853
+ "events"
1854
+ ],
1855
+ "properties": {
1856
+ "events": {
1857
+ "type": "array",
1858
+ "items": {
1859
+ "$ref": "#/components/schemas/TimelineEvent"
1860
+ }
1861
+ }
1862
+ }
1863
+ },
1864
+ "ThreadDoneEvent": {
1865
+ "type": "object",
1866
+ "required": [
1867
+ "type",
1868
+ "user_id",
1869
+ "organization_id"
1870
+ ],
1871
+ "properties": {
1872
+ "type": {
1873
+ "type": "string",
1874
+ "enum": [
1875
+ "THREAD_DONE"
1876
+ ]
1877
+ },
1878
+ "user_id": {
1879
+ "type": "string",
1880
+ "description": "User ID of the user who marked the thread as done",
1881
+ "example": 123
1882
+ },
1883
+ "organization_id": {
1884
+ "type": "string",
1885
+ "description": "Organization ID of the organization who marked the thread as done",
1886
+ "example": 456
1887
+ }
1888
+ }
1889
+ },
1890
+ "ThreadOpenEvent": {
1891
+ "type": "object",
1892
+ "required": [
1893
+ "type",
1894
+ "user_id",
1895
+ "organization_id"
1896
+ ],
1897
+ "properties": {
1898
+ "type": {
1899
+ "type": "string",
1900
+ "enum": [
1901
+ "THREAD_OPEN"
1902
+ ]
1903
+ },
1904
+ "user_id": {
1905
+ "type": "string",
1906
+ "description": "User ID of the user who marked the thread as open",
1907
+ "example": 123
1908
+ },
1909
+ "organization_id": {
1910
+ "type": "string",
1911
+ "description": "Organization ID of the organization who marked the thread as open",
1912
+ "example": 456
1913
+ }
1914
+ }
1915
+ },
1916
+ "TimelineEventData": {
1917
+ "type": "object",
1918
+ "discriminator": {
1919
+ "propertyName": "type"
1920
+ },
1921
+ "oneOf": [
1922
+ {
1923
+ "$ref": "#/components/schemas/ThreadDoneEvent"
1924
+ },
1925
+ {
1926
+ "$ref": "#/components/schemas/ThreadOpenEvent"
1927
+ }
1928
+ ]
1929
+ },
1930
+ "TimelineEvent": {
1931
+ "type": "object",
1932
+ "required": [
1933
+ "timestamp",
1934
+ "data"
1935
+ ],
1936
+ "properties": {
1937
+ "data": {
1938
+ "$ref": "#/components/schemas/TimelineEventData"
1939
+ },
1940
+ "timestamp": {
1941
+ "type": "string",
1942
+ "description": "Timestamp of the event",
1943
+ "example": "2024-01-01T00:00:00.000Z"
1944
+ }
1945
+ }
1946
+ },
1947
+ "BulkActionsPayloadWithScopes": {
1948
+ "allOf": [
1949
+ {
1950
+ "$ref": "#/components/schemas/BulkActionsPayload"
1951
+ },
1952
+ {
1953
+ "type": "object",
1954
+ "properties": {
1955
+ "scopes": {
1956
+ "description": "The scopes to be used when marking an item as read or unread. The read status will be synced for all provided scopes.",
1957
+ "example": [
1958
+ "organization",
1959
+ "user"
1960
+ ],
1961
+ "type": "array",
1962
+ "default": [
1963
+ "organization",
1964
+ "user"
1965
+ ],
1966
+ "items": {
1967
+ "$ref": "#/components/schemas/ReadingScope"
1968
+ }
1969
+ }
1970
+ }
1971
+ }
1972
+ ]
1973
+ },
1974
+ "BulkActionsPayload": {
1975
+ "type": "object",
1976
+ "required": [
1977
+ "ids"
1978
+ ],
1979
+ "properties": {
1980
+ "ids": {
1981
+ "description": "Array of threads you wish to perform bulk actions on",
1982
+ "example": [
1983
+ "6b299eda-4018-4554-8965-c4b5598e6531"
1984
+ ],
1985
+ "type": "array",
1986
+ "items": {
1987
+ "type": "string"
1988
+ }
1989
+ }
1990
+ }
1484
1991
  }
1485
1992
  }
1486
1993
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.15.2",
3
+ "version": "1.15.4",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -72,4 +72,4 @@
72
72
  "webpack-cli": "^4.4.0"
73
73
  },
74
74
  "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
75
- }
75
+ }