@epilot/message-client 1.15.2 → 1.15.3

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":{"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}/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})})();
@@ -170,6 +170,32 @@
170
170
  "responses": {}
171
171
  }
172
172
  },
173
+ "/v1/message/threads/{id}:markAsDone": {
174
+ "post": {
175
+ "operationId": "markThreadAsDone",
176
+ "parameters": [
177
+ {
178
+ "name": "id",
179
+ "in": "path",
180
+ "required": true
181
+ }
182
+ ],
183
+ "responses": {}
184
+ }
185
+ },
186
+ "/v1/message/threads/{id}:markAsOpen": {
187
+ "post": {
188
+ "operationId": "markThreadAsOpen",
189
+ "parameters": [
190
+ {
191
+ "name": "id",
192
+ "in": "path",
193
+ "required": true
194
+ }
195
+ ],
196
+ "responses": {}
197
+ }
198
+ },
173
199
  "/v1/message/threads/{id}/trash": {
174
200
  "post": {
175
201
  "operationId": "trashThread",
package/dist/openapi.d.ts CHANGED
@@ -450,6 +450,7 @@ declare namespace Components {
450
450
  q: string;
451
451
  from?: number;
452
452
  size?: number;
453
+ hydrate?: boolean;
453
454
  }
454
455
  /**
455
456
  * Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing.
@@ -469,6 +470,12 @@ declare namespace Components {
469
470
  * Organization ID of organization read the message.
470
471
  */
471
472
  org_read_message?: string[];
473
+ /**
474
+ * Whether the thread is marked as Done
475
+ * example:
476
+ * false
477
+ */
478
+ done?: boolean;
472
479
  /**
473
480
  * Latest message of thread
474
481
  */
@@ -510,6 +517,12 @@ declare namespace Paths {
510
517
  * 3f34ce73-089c-4d45-a5ee-c161234e41c3
511
518
  */
512
519
  entity_id?: string;
520
+ /**
521
+ * Organization ID
522
+ * example:
523
+ * 206801
524
+ */
525
+ org_id?: string;
513
526
  /**
514
527
  * To indicate this is main entity
515
528
  * example:
@@ -1073,6 +1086,34 @@ declare namespace Paths {
1073
1086
  }
1074
1087
  }
1075
1088
  }
1089
+ namespace MarkThreadAsDone {
1090
+ namespace Parameters {
1091
+ export type Id = string;
1092
+ }
1093
+ export interface PathParameters {
1094
+ id: Parameters.Id;
1095
+ }
1096
+ namespace Responses {
1097
+ export interface $204 {
1098
+ }
1099
+ export interface $400 {
1100
+ }
1101
+ }
1102
+ }
1103
+ namespace MarkThreadAsOpen {
1104
+ namespace Parameters {
1105
+ export type Id = string;
1106
+ }
1107
+ export interface PathParameters {
1108
+ id: Parameters.Id;
1109
+ }
1110
+ namespace Responses {
1111
+ export interface $204 {
1112
+ }
1113
+ export interface $400 {
1114
+ }
1115
+ }
1116
+ }
1076
1117
  namespace MarkUnreadMessage {
1077
1118
  namespace Parameters {
1078
1119
  export type Id = string;
@@ -1202,6 +1243,12 @@ declare namespace Paths {
1202
1243
  * Organization ID of organization read the message.
1203
1244
  */
1204
1245
  org_read_message?: string[];
1246
+ /**
1247
+ * Whether the thread is marked as Done
1248
+ * example:
1249
+ * false
1250
+ */
1251
+ done?: boolean;
1205
1252
  latest_message?: Components.Schemas.Message;
1206
1253
  latest_trash_message?: Components.Schemas.Message;
1207
1254
  /**
@@ -1646,6 +1693,12 @@ declare namespace Paths {
1646
1693
  * Organization ID of organization read the message.
1647
1694
  */
1648
1695
  org_read_message?: string[];
1696
+ /**
1697
+ * Whether the thread is marked as Done
1698
+ * example:
1699
+ * false
1700
+ */
1701
+ done?: boolean;
1649
1702
  latest_message?: Components.Schemas.Message;
1650
1703
  latest_trash_message?: Components.Schemas.Message;
1651
1704
  /**
@@ -1797,6 +1850,26 @@ export interface OperationMethods {
1797
1850
  data?: any,
1798
1851
  config?: AxiosRequestConfig
1799
1852
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
1853
+ /**
1854
+ * markThreadAsDone - markThreadAsDone
1855
+ *
1856
+ * Mark thread as done
1857
+ */
1858
+ 'markThreadAsDone'(
1859
+ parameters?: Parameters<Paths.MarkThreadAsDone.PathParameters> | null,
1860
+ data?: any,
1861
+ config?: AxiosRequestConfig
1862
+ ): OperationResponse<Paths.MarkThreadAsDone.Responses.$204>
1863
+ /**
1864
+ * markThreadAsOpen - markThreadAsOpen
1865
+ *
1866
+ * Mark thread as open
1867
+ */
1868
+ 'markThreadAsOpen'(
1869
+ parameters?: Parameters<Paths.MarkThreadAsOpen.PathParameters> | null,
1870
+ data?: any,
1871
+ config?: AxiosRequestConfig
1872
+ ): OperationResponse<Paths.MarkThreadAsOpen.Responses.$204>
1800
1873
  /**
1801
1874
  * trashThread - trashThread
1802
1875
  *
@@ -2089,6 +2162,30 @@ export interface PathsDictionary {
2089
2162
  config?: AxiosRequestConfig
2090
2163
  ): OperationResponse<Paths.DeleteThread.Responses.$204>
2091
2164
  }
2165
+ ['/v1/message/threads/{id}:markAsDone']: {
2166
+ /**
2167
+ * markThreadAsDone - markThreadAsDone
2168
+ *
2169
+ * Mark thread as done
2170
+ */
2171
+ 'post'(
2172
+ parameters?: Parameters<Paths.MarkThreadAsDone.PathParameters> | null,
2173
+ data?: any,
2174
+ config?: AxiosRequestConfig
2175
+ ): OperationResponse<Paths.MarkThreadAsDone.Responses.$204>
2176
+ }
2177
+ ['/v1/message/threads/{id}:markAsOpen']: {
2178
+ /**
2179
+ * markThreadAsOpen - markThreadAsOpen
2180
+ *
2181
+ * Mark thread as open
2182
+ */
2183
+ 'post'(
2184
+ parameters?: Parameters<Paths.MarkThreadAsOpen.PathParameters> | null,
2185
+ data?: any,
2186
+ config?: AxiosRequestConfig
2187
+ ): OperationResponse<Paths.MarkThreadAsOpen.Responses.$204>
2188
+ }
2092
2189
  ['/v1/message/threads/{id}/trash']: {
2093
2190
  /**
2094
2191
  * trashThread - trashThread
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": {
@@ -497,6 +524,64 @@
497
524
  }
498
525
  }
499
526
  },
527
+ "/v1/message/threads/{id}:markAsDone": {
528
+ "post": {
529
+ "operationId": "markThreadAsDone",
530
+ "summary": "markThreadAsDone",
531
+ "description": "Mark thread as done",
532
+ "tags": [
533
+ "Threads"
534
+ ],
535
+ "parameters": [
536
+ {
537
+ "name": "id",
538
+ "description": "Thread ID",
539
+ "in": "path",
540
+ "required": true,
541
+ "schema": {
542
+ "type": "string"
543
+ }
544
+ }
545
+ ],
546
+ "responses": {
547
+ "204": {
548
+ "description": "Success"
549
+ },
550
+ "400": {
551
+ "description": "Bad Request"
552
+ }
553
+ }
554
+ }
555
+ },
556
+ "/v1/message/threads/{id}:markAsOpen": {
557
+ "post": {
558
+ "operationId": "markThreadAsOpen",
559
+ "summary": "markThreadAsOpen",
560
+ "description": "Mark thread as open",
561
+ "tags": [
562
+ "Threads"
563
+ ],
564
+ "parameters": [
565
+ {
566
+ "name": "id",
567
+ "description": "Thread ID",
568
+ "in": "path",
569
+ "required": true,
570
+ "schema": {
571
+ "type": "string"
572
+ }
573
+ }
574
+ ],
575
+ "responses": {
576
+ "204": {
577
+ "description": "Success"
578
+ },
579
+ "400": {
580
+ "description": "Bad Request"
581
+ }
582
+ }
583
+ }
584
+ },
500
585
  "/v1/message/threads/{id}/trash": {
501
586
  "post": {
502
587
  "operationId": "trashThread",
@@ -730,6 +815,11 @@
730
815
  "type": "string",
731
816
  "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
732
817
  },
818
+ "org_id": {
819
+ "description": "Organization ID",
820
+ "type": "string",
821
+ "example": "206801"
822
+ },
733
823
  "is_main_entity": {
734
824
  "description": "To indicate this is main entity",
735
825
  "type": "boolean",
@@ -1075,6 +1165,11 @@
1075
1165
  ]
1076
1166
  }
1077
1167
  },
1168
+ "done": {
1169
+ "type": "boolean",
1170
+ "description": "Whether the thread is marked as Done",
1171
+ "example": false
1172
+ },
1078
1173
  "latest_message": {
1079
1174
  "type": "object",
1080
1175
  "description": "Latest message of thread",
@@ -1448,6 +1543,10 @@
1448
1543
  "type": "integer",
1449
1544
  "minimum": 1,
1450
1545
  "default": 10
1546
+ },
1547
+ "hydrate": {
1548
+ "type": "boolean",
1549
+ "default": false
1451
1550
  }
1452
1551
  }
1453
1552
  },
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.3",
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
+ }