@epilot/message-client 1.3.3 → 1.5.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.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +30 -0
- package/dist/openapi.d.ts +353 -0
- package/dist/openapi.json +127 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -253
- package/package-lock.json +0 -19718
package/dist/definition.js
CHANGED
|
@@ -1 +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})})();
|
|
@@ -187,6 +187,24 @@
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
},
|
|
190
|
+
"/v1/message/threads/{id}/assign:users": {
|
|
191
|
+
"post": {
|
|
192
|
+
"operationId": "assignUsers",
|
|
193
|
+
"parameters": [
|
|
194
|
+
{
|
|
195
|
+
"name": "id",
|
|
196
|
+
"in": "path",
|
|
197
|
+
"required": true
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"requestBody": {
|
|
201
|
+
"required": true,
|
|
202
|
+
"content": {
|
|
203
|
+
"application/json": {}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
190
208
|
"/v1/message/drafts": {
|
|
191
209
|
"post": {
|
|
192
210
|
"operationId": "createDraft",
|
|
@@ -201,6 +219,18 @@
|
|
|
201
219
|
"post": {
|
|
202
220
|
"operationId": "sendDraft"
|
|
203
221
|
}
|
|
222
|
+
},
|
|
223
|
+
"/v2/message/messages/{id}": {
|
|
224
|
+
"get": {
|
|
225
|
+
"operationId": "getMessageV2",
|
|
226
|
+
"parameters": [
|
|
227
|
+
{
|
|
228
|
+
"name": "id",
|
|
229
|
+
"in": "path",
|
|
230
|
+
"required": true
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
204
234
|
}
|
|
205
235
|
},
|
|
206
236
|
"components": {},
|
package/dist/openapi.d.ts
CHANGED
|
@@ -276,6 +276,140 @@ declare namespace Components {
|
|
|
276
276
|
bcc?: Address[];
|
|
277
277
|
file?: /* Message attachments */ AttachmentsRelation;
|
|
278
278
|
}
|
|
279
|
+
export interface MessageV2 {
|
|
280
|
+
/**
|
|
281
|
+
* Entity ID
|
|
282
|
+
* example:
|
|
283
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
284
|
+
*/
|
|
285
|
+
_id: string;
|
|
286
|
+
/**
|
|
287
|
+
* Entity title
|
|
288
|
+
*/
|
|
289
|
+
_title: string;
|
|
290
|
+
/**
|
|
291
|
+
* Ivy Organization ID the entity belongs to
|
|
292
|
+
* example:
|
|
293
|
+
* 206801
|
|
294
|
+
*/
|
|
295
|
+
_org: string;
|
|
296
|
+
/**
|
|
297
|
+
* URL-friendly identifier for the entity schema
|
|
298
|
+
* example:
|
|
299
|
+
* message
|
|
300
|
+
*/
|
|
301
|
+
_schema: string;
|
|
302
|
+
/**
|
|
303
|
+
* Entity tags
|
|
304
|
+
* example:
|
|
305
|
+
* [
|
|
306
|
+
* "pricing",
|
|
307
|
+
* "INBOX"
|
|
308
|
+
* ]
|
|
309
|
+
*/
|
|
310
|
+
_tags?: string[];
|
|
311
|
+
/**
|
|
312
|
+
* Created date
|
|
313
|
+
* example:
|
|
314
|
+
* 2021-02-09T12:41:43.662Z
|
|
315
|
+
*/
|
|
316
|
+
_created_at: string; // date-time
|
|
317
|
+
/**
|
|
318
|
+
* Updated date
|
|
319
|
+
* example:
|
|
320
|
+
* 2021-02-10T09:14:31.990Z
|
|
321
|
+
*/
|
|
322
|
+
_updated_at: string; // date-time
|
|
323
|
+
/**
|
|
324
|
+
* Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
|
|
325
|
+
* example:
|
|
326
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
|
|
327
|
+
*/
|
|
328
|
+
message_id?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Ivy User ID of user sends the message.
|
|
331
|
+
* example:
|
|
332
|
+
* 206801
|
|
333
|
+
*/
|
|
334
|
+
sender?: string;
|
|
335
|
+
/**
|
|
336
|
+
* Subject
|
|
337
|
+
* example:
|
|
338
|
+
* Request for solar panel price
|
|
339
|
+
*/
|
|
340
|
+
subject: string;
|
|
341
|
+
/**
|
|
342
|
+
* HTML body
|
|
343
|
+
* example:
|
|
344
|
+
* <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
|
|
345
|
+
*/
|
|
346
|
+
html?: string;
|
|
347
|
+
/**
|
|
348
|
+
* Text body
|
|
349
|
+
* example:
|
|
350
|
+
* We at ABC GmbH would like to request a price quote for the solar panel.
|
|
351
|
+
*/
|
|
352
|
+
text?: string;
|
|
353
|
+
from: Address;
|
|
354
|
+
reply_to?: Address;
|
|
355
|
+
/**
|
|
356
|
+
* To email addresses
|
|
357
|
+
*/
|
|
358
|
+
to?: Address[];
|
|
359
|
+
/**
|
|
360
|
+
* Cc email addresses
|
|
361
|
+
*/
|
|
362
|
+
cc?: Address[];
|
|
363
|
+
/**
|
|
364
|
+
* Bcc email addresses
|
|
365
|
+
*/
|
|
366
|
+
bcc?: Address[];
|
|
367
|
+
file?: /* Message attachments */ AttachmentsRelation;
|
|
368
|
+
/**
|
|
369
|
+
* References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
|
|
370
|
+
* The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
|
|
371
|
+
* The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
|
|
372
|
+
*
|
|
373
|
+
* example:
|
|
374
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
375
|
+
*/
|
|
376
|
+
references?: string;
|
|
377
|
+
/**
|
|
378
|
+
* In-Reply-To header. Value is the `message_id` of parent message.
|
|
379
|
+
*
|
|
380
|
+
* example:
|
|
381
|
+
* <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
382
|
+
*/
|
|
383
|
+
in_reply_to?: string;
|
|
384
|
+
/**
|
|
385
|
+
* Ivy User ID of user read the message.
|
|
386
|
+
*/
|
|
387
|
+
user_read_message?: string[];
|
|
388
|
+
/**
|
|
389
|
+
* Ivy Organization ID of organization read the message.
|
|
390
|
+
*/
|
|
391
|
+
org_read_message?: string[];
|
|
392
|
+
/**
|
|
393
|
+
* Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
|
|
394
|
+
* Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
|
|
395
|
+
*
|
|
396
|
+
*/
|
|
397
|
+
send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
|
|
398
|
+
/**
|
|
399
|
+
* Message type
|
|
400
|
+
*/
|
|
401
|
+
type?: "SENT" | "RECEIVED";
|
|
402
|
+
/**
|
|
403
|
+
* If true then html is not provided and must be downloaded using the html_download_url
|
|
404
|
+
*/
|
|
405
|
+
html_ommitted?: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* HTML body download URL
|
|
408
|
+
* example:
|
|
409
|
+
* https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html
|
|
410
|
+
*/
|
|
411
|
+
html_download_url?: string;
|
|
412
|
+
}
|
|
279
413
|
export interface SearchParams {
|
|
280
414
|
/**
|
|
281
415
|
* Lucene query syntax supported with ElasticSearch
|
|
@@ -353,6 +487,29 @@ declare namespace Paths {
|
|
|
353
487
|
}
|
|
354
488
|
}
|
|
355
489
|
}
|
|
490
|
+
namespace AssignUsers {
|
|
491
|
+
namespace Parameters {
|
|
492
|
+
export type Id = string;
|
|
493
|
+
}
|
|
494
|
+
export interface PathParameters {
|
|
495
|
+
id: Parameters.Id;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* User IDs of users assigned to thread
|
|
499
|
+
*/
|
|
500
|
+
export interface RequestBody {
|
|
501
|
+
/**
|
|
502
|
+
* IDs of users assigned to thread
|
|
503
|
+
*/
|
|
504
|
+
assigned_to?: string[];
|
|
505
|
+
}
|
|
506
|
+
namespace Responses {
|
|
507
|
+
export interface $204 {
|
|
508
|
+
}
|
|
509
|
+
export interface $403 {
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
356
513
|
namespace CreateDraft {
|
|
357
514
|
export type RequestBody = Components.Schemas.MessageRequestParams;
|
|
358
515
|
namespace Responses {
|
|
@@ -644,6 +801,154 @@ declare namespace Paths {
|
|
|
644
801
|
*/
|
|
645
802
|
type?: "SENT" | "RECEIVED";
|
|
646
803
|
}
|
|
804
|
+
export interface $302 {
|
|
805
|
+
}
|
|
806
|
+
export interface $403 {
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
namespace GetMessageV2 {
|
|
811
|
+
namespace Parameters {
|
|
812
|
+
export type Id = string;
|
|
813
|
+
}
|
|
814
|
+
export interface PathParameters {
|
|
815
|
+
id: Parameters.Id;
|
|
816
|
+
}
|
|
817
|
+
namespace Responses {
|
|
818
|
+
export interface $201 {
|
|
819
|
+
/**
|
|
820
|
+
* Entity ID
|
|
821
|
+
* example:
|
|
822
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
823
|
+
*/
|
|
824
|
+
_id: string;
|
|
825
|
+
/**
|
|
826
|
+
* Entity title
|
|
827
|
+
*/
|
|
828
|
+
_title: string;
|
|
829
|
+
/**
|
|
830
|
+
* Ivy Organization ID the entity belongs to
|
|
831
|
+
* example:
|
|
832
|
+
* 206801
|
|
833
|
+
*/
|
|
834
|
+
_org: string;
|
|
835
|
+
/**
|
|
836
|
+
* URL-friendly identifier for the entity schema
|
|
837
|
+
* example:
|
|
838
|
+
* message
|
|
839
|
+
*/
|
|
840
|
+
_schema: string;
|
|
841
|
+
/**
|
|
842
|
+
* Entity tags
|
|
843
|
+
* example:
|
|
844
|
+
* [
|
|
845
|
+
* "pricing",
|
|
846
|
+
* "INBOX"
|
|
847
|
+
* ]
|
|
848
|
+
*/
|
|
849
|
+
_tags?: string[];
|
|
850
|
+
/**
|
|
851
|
+
* Created date
|
|
852
|
+
* example:
|
|
853
|
+
* 2021-02-09T12:41:43.662Z
|
|
854
|
+
*/
|
|
855
|
+
_created_at: string; // date-time
|
|
856
|
+
/**
|
|
857
|
+
* Updated date
|
|
858
|
+
* example:
|
|
859
|
+
* 2021-02-10T09:14:31.990Z
|
|
860
|
+
*/
|
|
861
|
+
_updated_at: string; // date-time
|
|
862
|
+
/**
|
|
863
|
+
* Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
|
|
864
|
+
* example:
|
|
865
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
|
|
866
|
+
*/
|
|
867
|
+
message_id?: string;
|
|
868
|
+
/**
|
|
869
|
+
* Ivy User ID of user sends the message.
|
|
870
|
+
* example:
|
|
871
|
+
* 206801
|
|
872
|
+
*/
|
|
873
|
+
sender?: string;
|
|
874
|
+
/**
|
|
875
|
+
* Subject
|
|
876
|
+
* example:
|
|
877
|
+
* Request for solar panel price
|
|
878
|
+
*/
|
|
879
|
+
subject: string;
|
|
880
|
+
/**
|
|
881
|
+
* HTML body
|
|
882
|
+
* example:
|
|
883
|
+
* <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
|
|
884
|
+
*/
|
|
885
|
+
html?: string;
|
|
886
|
+
/**
|
|
887
|
+
* Text body
|
|
888
|
+
* example:
|
|
889
|
+
* We at ABC GmbH would like to request a price quote for the solar panel.
|
|
890
|
+
*/
|
|
891
|
+
text?: string;
|
|
892
|
+
from: Components.Schemas.Address;
|
|
893
|
+
reply_to?: Components.Schemas.Address;
|
|
894
|
+
/**
|
|
895
|
+
* To email addresses
|
|
896
|
+
*/
|
|
897
|
+
to?: Components.Schemas.Address[];
|
|
898
|
+
/**
|
|
899
|
+
* Cc email addresses
|
|
900
|
+
*/
|
|
901
|
+
cc?: Components.Schemas.Address[];
|
|
902
|
+
/**
|
|
903
|
+
* Bcc email addresses
|
|
904
|
+
*/
|
|
905
|
+
bcc?: Components.Schemas.Address[];
|
|
906
|
+
file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
|
|
907
|
+
/**
|
|
908
|
+
* References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
|
|
909
|
+
* The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
|
|
910
|
+
* The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
|
|
911
|
+
*
|
|
912
|
+
* example:
|
|
913
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
914
|
+
*/
|
|
915
|
+
references?: string;
|
|
916
|
+
/**
|
|
917
|
+
* In-Reply-To header. Value is the `message_id` of parent message.
|
|
918
|
+
*
|
|
919
|
+
* example:
|
|
920
|
+
* <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
921
|
+
*/
|
|
922
|
+
in_reply_to?: string;
|
|
923
|
+
/**
|
|
924
|
+
* Ivy User ID of user read the message.
|
|
925
|
+
*/
|
|
926
|
+
user_read_message?: string[];
|
|
927
|
+
/**
|
|
928
|
+
* Ivy Organization ID of organization read the message.
|
|
929
|
+
*/
|
|
930
|
+
org_read_message?: string[];
|
|
931
|
+
/**
|
|
932
|
+
* Sent message status. The array contains sending message status corresponding to all recipients. For more detail, check `send_status` of each recipient in `to`, `cc`, `bcc`\
|
|
933
|
+
* Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
|
|
934
|
+
*
|
|
935
|
+
*/
|
|
936
|
+
send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
|
|
937
|
+
/**
|
|
938
|
+
* Message type
|
|
939
|
+
*/
|
|
940
|
+
type?: "SENT" | "RECEIVED";
|
|
941
|
+
/**
|
|
942
|
+
* If true then html is not provided and must be downloaded using the html_download_url
|
|
943
|
+
*/
|
|
944
|
+
html_ommitted?: boolean;
|
|
945
|
+
/**
|
|
946
|
+
* HTML body download URL
|
|
947
|
+
* example:
|
|
948
|
+
* https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html
|
|
949
|
+
*/
|
|
950
|
+
html_download_url?: string;
|
|
951
|
+
}
|
|
647
952
|
export interface $403 {
|
|
648
953
|
}
|
|
649
954
|
}
|
|
@@ -1474,6 +1779,18 @@ export interface OperationMethods {
|
|
|
1474
1779
|
data?: Paths.AssignThread.RequestBody,
|
|
1475
1780
|
config?: AxiosRequestConfig
|
|
1476
1781
|
): OperationResponse<Paths.AssignThread.Responses.$204>
|
|
1782
|
+
/**
|
|
1783
|
+
* assignUsers - assignUsers
|
|
1784
|
+
*
|
|
1785
|
+
* Assign users to thread for receiving notifications.
|
|
1786
|
+
* The operation replaces all existing assigned users in thread.
|
|
1787
|
+
*
|
|
1788
|
+
*/
|
|
1789
|
+
'assignUsers'(
|
|
1790
|
+
parameters?: Parameters<Paths.AssignUsers.PathParameters> | null,
|
|
1791
|
+
data?: Paths.AssignUsers.RequestBody,
|
|
1792
|
+
config?: AxiosRequestConfig
|
|
1793
|
+
): OperationResponse<Paths.AssignUsers.Responses.$204>
|
|
1477
1794
|
/**
|
|
1478
1795
|
* createDraft - createDraft
|
|
1479
1796
|
*
|
|
@@ -1494,6 +1811,16 @@ export interface OperationMethods {
|
|
|
1494
1811
|
data?: any,
|
|
1495
1812
|
config?: AxiosRequestConfig
|
|
1496
1813
|
): OperationResponse<Paths.SendDraft.Responses.$201>
|
|
1814
|
+
/**
|
|
1815
|
+
* getMessageV2 - getMessageV2
|
|
1816
|
+
*
|
|
1817
|
+
* Get an email message by id
|
|
1818
|
+
*/
|
|
1819
|
+
'getMessageV2'(
|
|
1820
|
+
parameters?: Parameters<Paths.GetMessageV2.PathParameters> | null,
|
|
1821
|
+
data?: any,
|
|
1822
|
+
config?: AxiosRequestConfig
|
|
1823
|
+
): OperationResponse<Paths.GetMessageV2.Responses.$201>
|
|
1497
1824
|
}
|
|
1498
1825
|
|
|
1499
1826
|
export interface PathsDictionary {
|
|
@@ -1690,6 +2017,20 @@ export interface PathsDictionary {
|
|
|
1690
2017
|
config?: AxiosRequestConfig
|
|
1691
2018
|
): OperationResponse<Paths.AssignThread.Responses.$204>
|
|
1692
2019
|
}
|
|
2020
|
+
['/v1/message/threads/{id}/assign:users']: {
|
|
2021
|
+
/**
|
|
2022
|
+
* assignUsers - assignUsers
|
|
2023
|
+
*
|
|
2024
|
+
* Assign users to thread for receiving notifications.
|
|
2025
|
+
* The operation replaces all existing assigned users in thread.
|
|
2026
|
+
*
|
|
2027
|
+
*/
|
|
2028
|
+
'post'(
|
|
2029
|
+
parameters?: Parameters<Paths.AssignUsers.PathParameters> | null,
|
|
2030
|
+
data?: Paths.AssignUsers.RequestBody,
|
|
2031
|
+
config?: AxiosRequestConfig
|
|
2032
|
+
): OperationResponse<Paths.AssignUsers.Responses.$204>
|
|
2033
|
+
}
|
|
1693
2034
|
['/v1/message/drafts']: {
|
|
1694
2035
|
/**
|
|
1695
2036
|
* createDraft - createDraft
|
|
@@ -1714,6 +2055,18 @@ export interface PathsDictionary {
|
|
|
1714
2055
|
config?: AxiosRequestConfig
|
|
1715
2056
|
): OperationResponse<Paths.SendDraft.Responses.$201>
|
|
1716
2057
|
}
|
|
2058
|
+
['/v2/message/messages/{id}']: {
|
|
2059
|
+
/**
|
|
2060
|
+
* getMessageV2 - getMessageV2
|
|
2061
|
+
*
|
|
2062
|
+
* Get an email message by id
|
|
2063
|
+
*/
|
|
2064
|
+
'get'(
|
|
2065
|
+
parameters?: Parameters<Paths.GetMessageV2.PathParameters> | null,
|
|
2066
|
+
data?: any,
|
|
2067
|
+
config?: AxiosRequestConfig
|
|
2068
|
+
): OperationResponse<Paths.GetMessageV2.Responses.$201>
|
|
2069
|
+
}
|
|
1717
2070
|
}
|
|
1718
2071
|
|
|
1719
2072
|
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
package/dist/openapi.json
CHANGED
|
@@ -30,7 +30,9 @@
|
|
|
30
30
|
"operationId": "sendMessage",
|
|
31
31
|
"summary": "sendMessage",
|
|
32
32
|
"description": "Send an email message",
|
|
33
|
-
"tags":
|
|
33
|
+
"tags": [
|
|
34
|
+
"Messages"
|
|
35
|
+
],
|
|
34
36
|
"parameters": [
|
|
35
37
|
{
|
|
36
38
|
"in": "query",
|
|
@@ -142,6 +144,18 @@
|
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
},
|
|
147
|
+
"302": {
|
|
148
|
+
"description": "Redirect to download URL",
|
|
149
|
+
"headers": {
|
|
150
|
+
"Location": {
|
|
151
|
+
"description": "Download URL",
|
|
152
|
+
"schema": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"example": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
145
159
|
"403": {
|
|
146
160
|
"description": "Forbidden"
|
|
147
161
|
}
|
|
@@ -587,6 +601,56 @@
|
|
|
587
601
|
}
|
|
588
602
|
}
|
|
589
603
|
},
|
|
604
|
+
"/v1/message/threads/{id}/assign:users": {
|
|
605
|
+
"post": {
|
|
606
|
+
"operationId": "assignUsers",
|
|
607
|
+
"summary": "assignUsers",
|
|
608
|
+
"description": "Assign users to thread for receiving notifications. \nThe operation replaces all existing assigned users in thread.\n",
|
|
609
|
+
"tags": [
|
|
610
|
+
"Threads"
|
|
611
|
+
],
|
|
612
|
+
"parameters": [
|
|
613
|
+
{
|
|
614
|
+
"name": "id",
|
|
615
|
+
"description": "Thread ID",
|
|
616
|
+
"in": "path",
|
|
617
|
+
"required": true,
|
|
618
|
+
"schema": {
|
|
619
|
+
"type": "string"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
],
|
|
623
|
+
"requestBody": {
|
|
624
|
+
"required": true,
|
|
625
|
+
"content": {
|
|
626
|
+
"application/json": {
|
|
627
|
+
"schema": {
|
|
628
|
+
"description": "User IDs of users assigned to thread",
|
|
629
|
+
"type": "object",
|
|
630
|
+
"properties": {
|
|
631
|
+
"assigned_to": {
|
|
632
|
+
"type": "array",
|
|
633
|
+
"description": "IDs of users assigned to thread",
|
|
634
|
+
"items": {
|
|
635
|
+
"type": "string",
|
|
636
|
+
"example": "206801"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
"responses": {
|
|
645
|
+
"204": {
|
|
646
|
+
"description": "Success"
|
|
647
|
+
},
|
|
648
|
+
"403": {
|
|
649
|
+
"description": "Forbidden"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
},
|
|
590
654
|
"/v1/message/drafts": {
|
|
591
655
|
"post": {
|
|
592
656
|
"operationId": "createDraft",
|
|
@@ -659,6 +723,46 @@
|
|
|
659
723
|
}
|
|
660
724
|
}
|
|
661
725
|
}
|
|
726
|
+
},
|
|
727
|
+
"/v2/message/messages/{id}": {
|
|
728
|
+
"get": {
|
|
729
|
+
"operationId": "getMessageV2",
|
|
730
|
+
"summary": "getMessageV2",
|
|
731
|
+
"description": "Get an email message by id",
|
|
732
|
+
"tags": [
|
|
733
|
+
"Messages"
|
|
734
|
+
],
|
|
735
|
+
"parameters": [
|
|
736
|
+
{
|
|
737
|
+
"name": "id",
|
|
738
|
+
"description": "Message ID",
|
|
739
|
+
"in": "path",
|
|
740
|
+
"required": true,
|
|
741
|
+
"schema": {
|
|
742
|
+
"type": "string"
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
],
|
|
746
|
+
"responses": {
|
|
747
|
+
"201": {
|
|
748
|
+
"description": "Success",
|
|
749
|
+
"content": {
|
|
750
|
+
"application/json": {
|
|
751
|
+
"schema": {
|
|
752
|
+
"allOf": [
|
|
753
|
+
{
|
|
754
|
+
"$ref": "#/components/schemas/MessageV2"
|
|
755
|
+
}
|
|
756
|
+
]
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
"403": {
|
|
762
|
+
"description": "Forbidden"
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
662
766
|
}
|
|
663
767
|
},
|
|
664
768
|
"components": {
|
|
@@ -896,6 +1000,28 @@
|
|
|
896
1000
|
}
|
|
897
1001
|
}
|
|
898
1002
|
},
|
|
1003
|
+
"MessageV2": {
|
|
1004
|
+
"allOf": [
|
|
1005
|
+
{
|
|
1006
|
+
"$ref": "#/components/schemas/BaseEntity"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"$ref": "#/components/schemas/Message"
|
|
1010
|
+
}
|
|
1011
|
+
],
|
|
1012
|
+
"properties": {
|
|
1013
|
+
"html_ommitted": {
|
|
1014
|
+
"type": "boolean",
|
|
1015
|
+
"description": "If true then html is not provided and must be downloaded using the html_download_url",
|
|
1016
|
+
"default": false
|
|
1017
|
+
},
|
|
1018
|
+
"html_download_url": {
|
|
1019
|
+
"type": "string",
|
|
1020
|
+
"description": "HTML body download URL",
|
|
1021
|
+
"example": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html"
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
},
|
|
899
1025
|
"Address": {
|
|
900
1026
|
"type": "object",
|
|
901
1027
|
"required": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/message-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "API Client for epilot Message API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@dazn/lambda-powertools-correlation-ids": "^1.28.1",
|
|
52
52
|
"buffer": "^6.0.3",
|
|
53
53
|
"https-browserify": "^1.0.0",
|
|
54
|
-
"openapi-client-axios": "^
|
|
54
|
+
"openapi-client-axios": "^7.1.3",
|
|
55
55
|
"stream-http": "^3.1.1",
|
|
56
56
|
"url": "^0.11.0",
|
|
57
57
|
"util": "^0.12.3"
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"copy-webpack-plugin": "^7.0.0",
|
|
63
63
|
"jest": "^26.6.3",
|
|
64
64
|
"json-loader": "^0.5.7",
|
|
65
|
-
"openapi-client-axios-typegen": "^7.
|
|
65
|
+
"openapi-client-axios-typegen": "^7.4.1",
|
|
66
66
|
"openapicmd": "^1.16.2",
|
|
67
67
|
"ts-jest": "^26.5.0",
|
|
68
68
|
"ts-loader": "^8.0.14",
|
|
69
69
|
"ts-node": "^10.9.1",
|
|
70
70
|
"typescript": "^4.1.3",
|
|
71
|
-
"webpack": "
|
|
71
|
+
"webpack": "^5.18.0",
|
|
72
72
|
"webpack-cli": "^4.4.0"
|
|
73
73
|
},
|
|
74
74
|
"gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
|
|
75
|
-
}
|
|
75
|
+
}
|