@epilot/message-client 1.16.0 → 1.17.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.
@@ -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":{}}},"/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/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 o=s[a]={exports:{}};return e[a].call(o.exports,o,o.exports,r),o.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":{}}},"/v1/message/messages/unread/{actor}":{"get":{"operationId":"getUnread","parameters":[{"name":"actor","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":{}}},"/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}(914),a=exports;for(var t in r)a[t]=r[t];r.__esModule&&Object.defineProperty(a,"__esModule",{value:!0})})();
@@ -121,6 +121,19 @@
121
121
  "responses": {}
122
122
  }
123
123
  },
124
+ "/v1/message/messages/unread/{actor}": {
125
+ "get": {
126
+ "operationId": "getUnread",
127
+ "parameters": [
128
+ {
129
+ "name": "actor",
130
+ "in": "path",
131
+ "required": true
132
+ }
133
+ ],
134
+ "responses": {}
135
+ }
136
+ },
124
137
  "/v2/message/messages/{id}/unread": {
125
138
  "post": {
126
139
  "operationId": "markUnreadMessageV2",
@@ -486,6 +499,30 @@
486
499
  "responses": {}
487
500
  }
488
501
  },
502
+ "/v1/message/threads/{id}:pin": {
503
+ "post": {
504
+ "operationId": "pinThread",
505
+ "parameters": [
506
+ {
507
+ "name": "id",
508
+ "in": "path",
509
+ "required": true
510
+ }
511
+ ],
512
+ "responses": {}
513
+ },
514
+ "delete": {
515
+ "operationId": "unpinThread",
516
+ "parameters": [
517
+ {
518
+ "name": "id",
519
+ "in": "path",
520
+ "required": true
521
+ }
522
+ ],
523
+ "responses": {}
524
+ }
525
+ },
489
526
  "/v1/message/drafts": {
490
527
  "post": {
491
528
  "operationId": "createDraft",
package/dist/openapi.d.ts CHANGED
@@ -124,6 +124,24 @@ declare namespace Components {
124
124
  */
125
125
  scopes?: /* Who is marking an item as read or unread. */ ReadingScope[];
126
126
  }
127
+ /**
128
+ * List of entity fields to include or exclude in the response
129
+ *
130
+ * Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
131
+ *
132
+ * Globbing and globstart (**) is supported for nested fields.
133
+ *
134
+ * example:
135
+ * [
136
+ * "_id",
137
+ * "_title",
138
+ * "first_name",
139
+ * "account",
140
+ * "!account.*._files",
141
+ * "**._product"
142
+ * ]
143
+ */
144
+ export type FieldsParam = string[];
127
145
  export interface File {
128
146
  /**
129
147
  * File entity ID
@@ -496,6 +514,10 @@ declare namespace Components {
496
514
  * subject:"Request for solar panel price" AND _tags:INBOX
497
515
  */
498
516
  q: string;
517
+ /**
518
+ * List of entity fields to include in results
519
+ */
520
+ fields?: any;
499
521
  from?: number;
500
522
  size?: number;
501
523
  hydrate?: boolean;
@@ -1135,6 +1157,26 @@ declare namespace Paths {
1135
1157
  }
1136
1158
  }
1137
1159
  }
1160
+ namespace GetUnread {
1161
+ namespace Parameters {
1162
+ export type Actor = "organization" | "user";
1163
+ }
1164
+ export interface PathParameters {
1165
+ actor: Parameters.Actor;
1166
+ }
1167
+ namespace Responses {
1168
+ export interface $200 {
1169
+ /**
1170
+ * Total of unread messages
1171
+ * example:
1172
+ * 14
1173
+ */
1174
+ count: number;
1175
+ }
1176
+ export interface $403 {
1177
+ }
1178
+ }
1179
+ }
1138
1180
  namespace MarkReadMessage {
1139
1181
  namespace Parameters {
1140
1182
  export type Id = string;
@@ -1279,6 +1321,26 @@ declare namespace Paths {
1279
1321
  }
1280
1322
  }
1281
1323
  }
1324
+ namespace PinThread {
1325
+ namespace Parameters {
1326
+ export type Id = string;
1327
+ }
1328
+ export interface PathParameters {
1329
+ id: Parameters.Id;
1330
+ }
1331
+ namespace Responses {
1332
+ export interface $204 {
1333
+ }
1334
+ export interface $400 {
1335
+ }
1336
+ export interface $404 {
1337
+ }
1338
+ export interface $409 {
1339
+ }
1340
+ export interface $500 {
1341
+ }
1342
+ }
1343
+ }
1282
1344
  namespace SearchIds {
1283
1345
  export type RequestBody = Components.Schemas.SearchIDParams;
1284
1346
  namespace Responses {
@@ -1767,6 +1829,26 @@ declare namespace Paths {
1767
1829
  }
1768
1830
  }
1769
1831
  }
1832
+ namespace UnpinThread {
1833
+ namespace Parameters {
1834
+ export type Id = string;
1835
+ }
1836
+ export interface PathParameters {
1837
+ id: Parameters.Id;
1838
+ }
1839
+ namespace Responses {
1840
+ export interface $204 {
1841
+ }
1842
+ export interface $400 {
1843
+ }
1844
+ export interface $404 {
1845
+ }
1846
+ export interface $409 {
1847
+ }
1848
+ export interface $500 {
1849
+ }
1850
+ }
1851
+ }
1770
1852
  namespace UntrashMessage {
1771
1853
  namespace Parameters {
1772
1854
  export type Id = string;
@@ -2103,6 +2185,16 @@ export interface OperationMethods {
2103
2185
  data?: any,
2104
2186
  config?: AxiosRequestConfig
2105
2187
  ): OperationResponse<Paths.MarkUnreadMessage.Responses.$204>
2188
+ /**
2189
+ * getUnread - getUnread
2190
+ *
2191
+ * Get all unread messages by actor
2192
+ */
2193
+ 'getUnread'(
2194
+ parameters?: Parameters<Paths.GetUnread.PathParameters> | null,
2195
+ data?: any,
2196
+ config?: AxiosRequestConfig
2197
+ ): OperationResponse<Paths.GetUnread.Responses.$200>
2106
2198
  /**
2107
2199
  * markUnreadMessageV2 - markUnreadMessageV2
2108
2200
  *
@@ -2388,6 +2480,26 @@ export interface OperationMethods {
2388
2480
  data?: Paths.AssignUsers.RequestBody,
2389
2481
  config?: AxiosRequestConfig
2390
2482
  ): OperationResponse<Paths.AssignUsers.Responses.$204>
2483
+ /**
2484
+ * pinThread - Pin a single thread
2485
+ *
2486
+ * Pin a single thread
2487
+ */
2488
+ 'pinThread'(
2489
+ parameters?: Parameters<Paths.PinThread.PathParameters> | null,
2490
+ data?: any,
2491
+ config?: AxiosRequestConfig
2492
+ ): OperationResponse<Paths.PinThread.Responses.$204>
2493
+ /**
2494
+ * unpinThread - Unpin a single thread
2495
+ *
2496
+ * Unpin a single thread
2497
+ */
2498
+ 'unpinThread'(
2499
+ parameters?: Parameters<Paths.UnpinThread.PathParameters> | null,
2500
+ data?: any,
2501
+ config?: AxiosRequestConfig
2502
+ ): OperationResponse<Paths.UnpinThread.Responses.$204>
2391
2503
  /**
2392
2504
  * createDraft - createDraft
2393
2505
  *
@@ -2535,6 +2647,18 @@ export interface PathsDictionary {
2535
2647
  config?: AxiosRequestConfig
2536
2648
  ): OperationResponse<Paths.MarkUnreadMessage.Responses.$204>
2537
2649
  }
2650
+ ['/v1/message/messages/unread/{actor}']: {
2651
+ /**
2652
+ * getUnread - getUnread
2653
+ *
2654
+ * Get all unread messages by actor
2655
+ */
2656
+ 'get'(
2657
+ parameters?: Parameters<Paths.GetUnread.PathParameters> | null,
2658
+ data?: any,
2659
+ config?: AxiosRequestConfig
2660
+ ): OperationResponse<Paths.GetUnread.Responses.$200>
2661
+ }
2538
2662
  ['/v2/message/messages/{id}/unread']: {
2539
2663
  /**
2540
2664
  * markUnreadMessageV2 - markUnreadMessageV2
@@ -2874,6 +2998,28 @@ export interface PathsDictionary {
2874
2998
  config?: AxiosRequestConfig
2875
2999
  ): OperationResponse<Paths.AssignUsers.Responses.$204>
2876
3000
  }
3001
+ ['/v1/message/threads/{id}:pin']: {
3002
+ /**
3003
+ * pinThread - Pin a single thread
3004
+ *
3005
+ * Pin a single thread
3006
+ */
3007
+ 'post'(
3008
+ parameters?: Parameters<Paths.PinThread.PathParameters> | null,
3009
+ data?: any,
3010
+ config?: AxiosRequestConfig
3011
+ ): OperationResponse<Paths.PinThread.Responses.$204>
3012
+ /**
3013
+ * unpinThread - Unpin a single thread
3014
+ *
3015
+ * Unpin a single thread
3016
+ */
3017
+ 'delete'(
3018
+ parameters?: Parameters<Paths.UnpinThread.PathParameters> | null,
3019
+ data?: any,
3020
+ config?: AxiosRequestConfig
3021
+ ): OperationResponse<Paths.UnpinThread.Responses.$204>
3022
+ }
2877
3023
  ['/v1/message/drafts']: {
2878
3024
  /**
2879
3025
  * createDraft - createDraft
@@ -2929,6 +3075,7 @@ export type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
2929
3075
  export type BaseEntity = Components.Schemas.BaseEntity;
2930
3076
  export type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
2931
3077
  export type BulkActionsPayloadWithScopes = Components.Schemas.BulkActionsPayloadWithScopes;
3078
+ export type FieldsParam = Components.Schemas.FieldsParam;
2932
3079
  export type File = Components.Schemas.File;
2933
3080
  export type Message = Components.Schemas.Message;
2934
3081
  export type MessageRequestParams = Components.Schemas.MessageRequestParams;
package/dist/openapi.json CHANGED
@@ -365,6 +365,56 @@
365
365
  }
366
366
  }
367
367
  },
368
+ "/v1/message/messages/unread/{actor}": {
369
+ "get": {
370
+ "operationId": "getUnread",
371
+ "summary": "getUnread",
372
+ "description": "Get all unread messages by actor",
373
+ "tags": [
374
+ "Messages"
375
+ ],
376
+ "parameters": [
377
+ {
378
+ "name": "actor",
379
+ "description": "Actor performing call, can be user or organization",
380
+ "in": "path",
381
+ "required": true,
382
+ "schema": {
383
+ "type": "string",
384
+ "enum": [
385
+ "organization",
386
+ "user"
387
+ ]
388
+ }
389
+ }
390
+ ],
391
+ "responses": {
392
+ "200": {
393
+ "description": "Success",
394
+ "content": {
395
+ "application/json": {
396
+ "schema": {
397
+ "type": "object",
398
+ "required": [
399
+ "count"
400
+ ],
401
+ "properties": {
402
+ "count": {
403
+ "type": "number",
404
+ "description": "Total of unread messages",
405
+ "example": 14
406
+ }
407
+ }
408
+ }
409
+ }
410
+ }
411
+ },
412
+ "403": {
413
+ "description": "Forbidden"
414
+ }
415
+ }
416
+ }
417
+ },
368
418
  "/v2/message/messages/{id}/unread": {
369
419
  "post": {
370
420
  "operationId": "markUnreadMessageV2",
@@ -1345,6 +1395,80 @@
1345
1395
  }
1346
1396
  }
1347
1397
  },
1398
+ "/v1/message/threads/{id}:pin": {
1399
+ "post": {
1400
+ "operationId": "pinThread",
1401
+ "summary": "Pin a single thread",
1402
+ "description": "Pin a single thread",
1403
+ "tags": [
1404
+ "Threads"
1405
+ ],
1406
+ "parameters": [
1407
+ {
1408
+ "name": "id",
1409
+ "description": "Thread ID",
1410
+ "in": "path",
1411
+ "required": true,
1412
+ "schema": {
1413
+ "type": "string"
1414
+ }
1415
+ }
1416
+ ],
1417
+ "responses": {
1418
+ "204": {
1419
+ "description": "Success"
1420
+ },
1421
+ "400": {
1422
+ "description": "Bad request"
1423
+ },
1424
+ "404": {
1425
+ "description": "Thread not found"
1426
+ },
1427
+ "409": {
1428
+ "description": "Concurrent update error"
1429
+ },
1430
+ "500": {
1431
+ "description": "Internal server error"
1432
+ }
1433
+ }
1434
+ },
1435
+ "delete": {
1436
+ "operationId": "unpinThread",
1437
+ "summary": "Unpin a single thread",
1438
+ "description": "Unpin a single thread",
1439
+ "tags": [
1440
+ "Threads"
1441
+ ],
1442
+ "parameters": [
1443
+ {
1444
+ "name": "id",
1445
+ "description": "Thread ID",
1446
+ "in": "path",
1447
+ "required": true,
1448
+ "schema": {
1449
+ "type": "string"
1450
+ }
1451
+ }
1452
+ ],
1453
+ "responses": {
1454
+ "204": {
1455
+ "description": "Success"
1456
+ },
1457
+ "400": {
1458
+ "description": "Bad request"
1459
+ },
1460
+ "404": {
1461
+ "description": "Thread not found"
1462
+ },
1463
+ "409": {
1464
+ "description": "Concurrent update error"
1465
+ },
1466
+ "500": {
1467
+ "description": "Internal server error"
1468
+ }
1469
+ }
1470
+ }
1471
+ },
1348
1472
  "/v1/message/drafts": {
1349
1473
  "post": {
1350
1474
  "operationId": "createDraft",
@@ -1933,6 +2057,12 @@
1933
2057
  "type": "string",
1934
2058
  "example": "subject:\"Request for solar panel price\" AND _tags:INBOX"
1935
2059
  },
2060
+ "fields": {
2061
+ "description": "List of entity fields to include in results",
2062
+ "schema": {
2063
+ "$ref": "#/components/schemas/FieldsParam"
2064
+ }
2065
+ },
1936
2066
  "from": {
1937
2067
  "type": "integer",
1938
2068
  "minimum": 0,
@@ -2166,6 +2296,21 @@
2166
2296
  }
2167
2297
  }
2168
2298
  }
2299
+ },
2300
+ "FieldsParam": {
2301
+ "type": "array",
2302
+ "description": "List of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n",
2303
+ "items": {
2304
+ "type": "string"
2305
+ },
2306
+ "example": [
2307
+ "_id",
2308
+ "_title",
2309
+ "first_name",
2310
+ "account",
2311
+ "!account.*._files",
2312
+ "**._product"
2313
+ ]
2169
2314
  }
2170
2315
  }
2171
2316
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.16.0",
3
+ "version": "1.17.1",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",