@epilot/message-client 1.12.0 → 1.14.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={914:function(e,a,r){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0});var t=s(r(240));a.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":{}}}},"put":{"operationId":"updateMessage"}},"/v1/message/messages/{id}":{"get":{"operationId":"getMessage","parameters":[{"name":"id","in":"path","required":true}]},"delete":{"operationId":"deleteMessage","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/messages/{id}/trash":{"post":{"operationId":"trashMessage","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/messages/{id}/read":{"post":{"operationId":"markReadMessage","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads:search":{"post":{"operationId":"searchThreads","requestBody":{"content":{"application/json":{}}}}},"/v1/message/threads":{"put":{"operationId":"updateThread"}},"/v1/message/threads/{id}":{"delete":{"operationId":"deleteThread","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads/{id}/trash":{"post":{"operationId":"trashThread","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads/{id}/untrash":{"post":{"operationId":"untrashThread","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads/{id}/read":{"post":{"operationId":"markReadThread","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}]}},"/v1/message/threads/{id}/assign":{"post":{"operationId":"assignThread","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/message/threads/{id}/assign:users":{"post":{"operationId":"assignUsers","parameters":[{"name":"id","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}}}},"/v1/message/drafts":{"post":{"operationId":"createDraft","requestBody":{"content":{"application/json":{}}}}},"/v1/message/drafts:send":{"post":{"operationId":"sendDraft"}},"/v2/message/messages/{id}":{"get":{"operationId":"getMessageV2","parameters":[{"name":"id","in":"path","required":true}]}}},"components":{},"servers":[{"url":"https://message.sls.epilot.io"}]}')}},a={},r=function r(s){var t=a[s];if(void 0!==t)return t.exports;var d=a[s]={exports:{}};return e[s].call(d.exports,d,d.exports,r),d.exports}(914),s=exports;for(var t in r)s[t]=r[t];r.__esModule&&Object.defineProperty(s,"__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":{}}},"/v1/message/messages/{id}/unread":{"post":{"operationId":"markUnreadMessage","parameters":[{"name":"id","in":"path","required":true}],"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":{}}},"/v1/message/threads/{id}/unread":{"post":{"operationId":"markUnreadThread","parameters":[{"name":"id","in":"path","required":true}],"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})})();
@@ -18,10 +18,12 @@
18
18
  "content": {
19
19
  "application/json": {}
20
20
  }
21
- }
21
+ },
22
+ "responses": {}
22
23
  },
23
24
  "put": {
24
- "operationId": "updateMessage"
25
+ "operationId": "updateMessage",
26
+ "responses": {}
25
27
  }
26
28
  },
27
29
  "/v1/message/messages/{id}": {
@@ -33,7 +35,8 @@
33
35
  "in": "path",
34
36
  "required": true
35
37
  }
36
- ]
38
+ ],
39
+ "responses": {}
37
40
  },
38
41
  "delete": {
39
42
  "operationId": "deleteMessage",
@@ -43,7 +46,8 @@
43
46
  "in": "path",
44
47
  "required": true
45
48
  }
46
- ]
49
+ ],
50
+ "responses": {}
47
51
  }
48
52
  },
49
53
  "/v1/message/messages/{id}/trash": {
@@ -55,7 +59,8 @@
55
59
  "in": "path",
56
60
  "required": true
57
61
  }
58
- ]
62
+ ],
63
+ "responses": {}
59
64
  }
60
65
  },
61
66
  "/v1/message/messages/{id}/untrash": {
@@ -67,7 +72,8 @@
67
72
  "in": "path",
68
73
  "required": true
69
74
  }
70
- ]
75
+ ],
76
+ "responses": {}
71
77
  }
72
78
  },
73
79
  "/v1/message/messages/{id}/read": {
@@ -79,7 +85,8 @@
79
85
  "in": "path",
80
86
  "required": true
81
87
  }
82
- ]
88
+ ],
89
+ "responses": {}
83
90
  }
84
91
  },
85
92
  "/v1/message/messages/{id}/unread": {
@@ -91,7 +98,8 @@
91
98
  "in": "path",
92
99
  "required": true
93
100
  }
94
- ]
101
+ ],
102
+ "responses": {}
95
103
  }
96
104
  },
97
105
  "/v1/message/threads:search": {
@@ -101,12 +109,14 @@
101
109
  "content": {
102
110
  "application/json": {}
103
111
  }
104
- }
112
+ },
113
+ "responses": {}
105
114
  }
106
115
  },
107
116
  "/v1/message/threads": {
108
117
  "put": {
109
- "operationId": "updateThread"
118
+ "operationId": "updateThread",
119
+ "responses": {}
110
120
  }
111
121
  },
112
122
  "/v1/message/threads/{id}": {
@@ -118,7 +128,8 @@
118
128
  "in": "path",
119
129
  "required": true
120
130
  }
121
- ]
131
+ ],
132
+ "responses": {}
122
133
  }
123
134
  },
124
135
  "/v1/message/threads/{id}/trash": {
@@ -130,7 +141,8 @@
130
141
  "in": "path",
131
142
  "required": true
132
143
  }
133
- ]
144
+ ],
145
+ "responses": {}
134
146
  }
135
147
  },
136
148
  "/v1/message/threads/{id}/untrash": {
@@ -142,7 +154,8 @@
142
154
  "in": "path",
143
155
  "required": true
144
156
  }
145
- ]
157
+ ],
158
+ "responses": {}
146
159
  }
147
160
  },
148
161
  "/v1/message/threads/{id}/read": {
@@ -154,7 +167,8 @@
154
167
  "in": "path",
155
168
  "required": true
156
169
  }
157
- ]
170
+ ],
171
+ "responses": {}
158
172
  }
159
173
  },
160
174
  "/v1/message/threads/{id}/unread": {
@@ -166,7 +180,8 @@
166
180
  "in": "path",
167
181
  "required": true
168
182
  }
169
- ]
183
+ ],
184
+ "responses": {}
170
185
  }
171
186
  },
172
187
  "/v1/message/threads/{id}/assign": {
@@ -184,7 +199,27 @@
184
199
  "content": {
185
200
  "application/json": {}
186
201
  }
187
- }
202
+ },
203
+ "responses": {}
204
+ }
205
+ },
206
+ "/v1/message/threads/{id}/unassign": {
207
+ "post": {
208
+ "operationId": "unassignThread",
209
+ "parameters": [
210
+ {
211
+ "name": "id",
212
+ "in": "path",
213
+ "required": true
214
+ }
215
+ ],
216
+ "requestBody": {
217
+ "required": true,
218
+ "content": {
219
+ "application/json": {}
220
+ }
221
+ },
222
+ "responses": {}
188
223
  }
189
224
  },
190
225
  "/v1/message/threads/{id}/assign:users": {
@@ -202,7 +237,8 @@
202
237
  "content": {
203
238
  "application/json": {}
204
239
  }
205
- }
240
+ },
241
+ "responses": {}
206
242
  }
207
243
  },
208
244
  "/v1/message/drafts": {
@@ -212,12 +248,14 @@
212
248
  "content": {
213
249
  "application/json": {}
214
250
  }
215
- }
251
+ },
252
+ "responses": {}
216
253
  }
217
254
  },
218
255
  "/v1/message/drafts:send": {
219
256
  "post": {
220
- "operationId": "sendDraft"
257
+ "operationId": "sendDraft",
258
+ "responses": {}
221
259
  }
222
260
  },
223
261
  "/v2/message/messages/{id}": {
@@ -229,7 +267,8 @@
229
267
  "in": "path",
230
268
  "required": true
231
269
  }
232
- ]
270
+ ],
271
+ "responses": {}
233
272
  }
234
273
  }
235
274
  },
package/dist/openapi.d.ts CHANGED
@@ -205,6 +205,12 @@ declare namespace Components {
205
205
  * Message type
206
206
  */
207
207
  type?: "SENT" | "RECEIVED";
208
+ /**
209
+ * Template ID used for sending message.
210
+ * example:
211
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
212
+ */
213
+ template_id?: string;
208
214
  }
209
215
  export interface MessageRequestParams {
210
216
  [name: string]: any;
@@ -271,6 +277,12 @@ declare namespace Components {
271
277
  */
272
278
  bcc?: Address[];
273
279
  file?: /* Message attachments */ AttachmentsRelation;
280
+ /**
281
+ * Template ID used for sending message.
282
+ * example:
283
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
284
+ */
285
+ template_id?: string;
274
286
  }
275
287
  export interface MessageV2 {
276
288
  /**
@@ -392,6 +404,12 @@ declare namespace Components {
392
404
  * Message type
393
405
  */
394
406
  type?: "SENT" | "RECEIVED";
407
+ /**
408
+ * Template ID used for sending message.
409
+ * example:
410
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
411
+ */
412
+ template_id?: string;
395
413
  /**
396
414
  * If true then html is not provided and must be downloaded using the html_download_url
397
415
  */
@@ -632,6 +650,12 @@ declare namespace Paths {
632
650
  * Message type
633
651
  */
634
652
  type?: "SENT" | "RECEIVED";
653
+ /**
654
+ * Template ID used for sending message.
655
+ * example:
656
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
657
+ */
658
+ template_id?: string;
635
659
  }
636
660
  export interface $403 {
637
661
  }
@@ -801,6 +825,12 @@ declare namespace Paths {
801
825
  * Message type
802
826
  */
803
827
  type?: "SENT" | "RECEIVED";
828
+ /**
829
+ * Template ID used for sending message.
830
+ * example:
831
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
832
+ */
833
+ template_id?: string;
804
834
  }
805
835
  export interface $302 {
806
836
  }
@@ -944,6 +974,12 @@ declare namespace Paths {
944
974
  * Message type
945
975
  */
946
976
  type?: "SENT" | "RECEIVED";
977
+ /**
978
+ * Template ID used for sending message.
979
+ * example:
980
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
981
+ */
982
+ template_id?: string;
947
983
  /**
948
984
  * If true then html is not provided and must be downloaded using the html_download_url
949
985
  */
@@ -1222,6 +1258,12 @@ declare namespace Paths {
1222
1258
  * Message type
1223
1259
  */
1224
1260
  type?: "SENT" | "RECEIVED";
1261
+ /**
1262
+ * Template ID used for sending message.
1263
+ * example:
1264
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
1265
+ */
1266
+ template_id?: string;
1225
1267
  }
1226
1268
  export interface $403 {
1227
1269
  }
@@ -1269,6 +1311,37 @@ declare namespace Paths {
1269
1311
  }
1270
1312
  }
1271
1313
  }
1314
+ namespace UnassignThread {
1315
+ namespace Parameters {
1316
+ export type Id = string;
1317
+ }
1318
+ export interface PathParameters {
1319
+ id: Parameters.Id;
1320
+ }
1321
+ /**
1322
+ * Entities which thread is unassigned from
1323
+ */
1324
+ export type RequestBody = {
1325
+ /**
1326
+ * Entity slug
1327
+ * example:
1328
+ * contact
1329
+ */
1330
+ slug?: string;
1331
+ /**
1332
+ * Entity ID
1333
+ * example:
1334
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
1335
+ */
1336
+ entity_id?: string;
1337
+ }[];
1338
+ namespace Responses {
1339
+ export interface $204 {
1340
+ }
1341
+ export interface $403 {
1342
+ }
1343
+ }
1344
+ }
1272
1345
  namespace UntrashMessage {
1273
1346
  namespace Parameters {
1274
1347
  export type Id = string;
@@ -1419,6 +1492,12 @@ declare namespace Paths {
1419
1492
  * Message type
1420
1493
  */
1421
1494
  type?: "SENT" | "RECEIVED";
1495
+ /**
1496
+ * Template ID used for sending message.
1497
+ * example:
1498
+ * 3f34ce73-089c-4d45-a5ee-c161234e41c3
1499
+ */
1500
+ template_id?: string;
1422
1501
  }
1423
1502
  export interface $403 {
1424
1503
  }
@@ -1668,6 +1747,16 @@ export interface OperationMethods {
1668
1747
  data?: Paths.AssignThread.RequestBody,
1669
1748
  config?: AxiosRequestConfig
1670
1749
  ): OperationResponse<Paths.AssignThread.Responses.$204>
1750
+ /**
1751
+ * unassignThread - unassignThread
1752
+ *
1753
+ * Unassign thread from entities
1754
+ */
1755
+ 'unassignThread'(
1756
+ parameters?: Parameters<Paths.UnassignThread.PathParameters> | null,
1757
+ data?: Paths.UnassignThread.RequestBody,
1758
+ config?: AxiosRequestConfig
1759
+ ): OperationResponse<Paths.UnassignThread.Responses.$204>
1671
1760
  /**
1672
1761
  * assignUsers - assignUsers
1673
1762
  *
@@ -1916,6 +2005,18 @@ export interface PathsDictionary {
1916
2005
  config?: AxiosRequestConfig
1917
2006
  ): OperationResponse<Paths.AssignThread.Responses.$204>
1918
2007
  }
2008
+ ['/v1/message/threads/{id}/unassign']: {
2009
+ /**
2010
+ * unassignThread - unassignThread
2011
+ *
2012
+ * Unassign thread from entities
2013
+ */
2014
+ 'post'(
2015
+ parameters?: Parameters<Paths.UnassignThread.PathParameters> | null,
2016
+ data?: Paths.UnassignThread.RequestBody,
2017
+ config?: AxiosRequestConfig
2018
+ ): OperationResponse<Paths.UnassignThread.Responses.$204>
2019
+ }
1919
2020
  ['/v1/message/threads/{id}/assign:users']: {
1920
2021
  /**
1921
2022
  * assignUsers - assignUsers
package/dist/openapi.json CHANGED
@@ -595,6 +595,61 @@
595
595
  }
596
596
  }
597
597
  },
598
+ "/v1/message/threads/{id}/unassign": {
599
+ "post": {
600
+ "operationId": "unassignThread",
601
+ "summary": "unassignThread",
602
+ "description": "Unassign thread from entities",
603
+ "tags": [
604
+ "Threads"
605
+ ],
606
+ "parameters": [
607
+ {
608
+ "name": "id",
609
+ "description": "Thread ID",
610
+ "in": "path",
611
+ "required": true,
612
+ "schema": {
613
+ "type": "string"
614
+ }
615
+ }
616
+ ],
617
+ "requestBody": {
618
+ "required": true,
619
+ "content": {
620
+ "application/json": {
621
+ "schema": {
622
+ "description": "Entities which thread is unassigned from",
623
+ "type": "array",
624
+ "items": {
625
+ "type": "object",
626
+ "properties": {
627
+ "slug": {
628
+ "description": "Entity slug",
629
+ "type": "string",
630
+ "example": "contact"
631
+ },
632
+ "entity_id": {
633
+ "description": "Entity ID",
634
+ "type": "string",
635
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
641
+ }
642
+ },
643
+ "responses": {
644
+ "204": {
645
+ "description": "Success"
646
+ },
647
+ "403": {
648
+ "description": "Forbidden"
649
+ }
650
+ }
651
+ }
652
+ },
598
653
  "/v1/message/threads/{id}/assign:users": {
599
654
  "post": {
600
655
  "operationId": "assignUsers",
@@ -997,6 +1052,11 @@
997
1052
  "SENT",
998
1053
  "RECEIVED"
999
1054
  ]
1055
+ },
1056
+ "template_id": {
1057
+ "type": "string",
1058
+ "description": "Template ID used for sending message.",
1059
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
1000
1060
  }
1001
1061
  }
1002
1062
  },
@@ -1200,6 +1260,11 @@
1200
1260
  },
1201
1261
  "file": {
1202
1262
  "$ref": "#/components/schemas/AttachmentsRelation"
1263
+ },
1264
+ "template_id": {
1265
+ "type": "string",
1266
+ "description": "Template ID used for sending message.",
1267
+ "example": "3f34ce73-089c-4d45-a5ee-c161234e41c3"
1203
1268
  }
1204
1269
  }
1205
1270
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/message-client",
3
- "version": "1.12.0",
3
+ "version": "1.14.0",
4
4
  "description": "API Client for epilot Message API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",