@epilot/message-client 1.4.0 → 1.5.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.
- package/dist/definition.js +1 -1
- package/dist/openapi-runtime.json +12 -0
- package/dist/openapi.d.ts +344 -4
- package/dist/openapi.json +81 -6
- package/package.json +1 -1
package/dist/definition.js
CHANGED
|
@@ -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"}}},"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,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})})();
|
|
@@ -219,6 +219,18 @@
|
|
|
219
219
|
"post": {
|
|
220
220
|
"operationId": "sendDraft"
|
|
221
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
|
+
}
|
|
222
234
|
}
|
|
223
235
|
},
|
|
224
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_omitted?: 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
|
|
@@ -537,13 +671,21 @@ declare namespace Paths {
|
|
|
537
671
|
}
|
|
538
672
|
namespace GetMessage {
|
|
539
673
|
namespace Parameters {
|
|
674
|
+
/**
|
|
675
|
+
* example:
|
|
676
|
+
* 4d74976d-fb64-47fd-85e2-65eea140f5eb
|
|
677
|
+
*/
|
|
540
678
|
export type Id = string;
|
|
541
679
|
}
|
|
542
680
|
export interface PathParameters {
|
|
543
|
-
id:
|
|
681
|
+
id: /**
|
|
682
|
+
* example:
|
|
683
|
+
* 4d74976d-fb64-47fd-85e2-65eea140f5eb
|
|
684
|
+
*/
|
|
685
|
+
Parameters.Id;
|
|
544
686
|
}
|
|
545
687
|
namespace Responses {
|
|
546
|
-
export interface $
|
|
688
|
+
export interface $200 {
|
|
547
689
|
/**
|
|
548
690
|
* Entity ID
|
|
549
691
|
* example:
|
|
@@ -667,6 +809,162 @@ declare namespace Paths {
|
|
|
667
809
|
*/
|
|
668
810
|
type?: "SENT" | "RECEIVED";
|
|
669
811
|
}
|
|
812
|
+
export interface $302 {
|
|
813
|
+
}
|
|
814
|
+
export interface $403 {
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
namespace GetMessageV2 {
|
|
819
|
+
namespace Parameters {
|
|
820
|
+
/**
|
|
821
|
+
* example:
|
|
822
|
+
* 4d74976d-fb64-47fd-85e2-65eea140f5eb
|
|
823
|
+
*/
|
|
824
|
+
export type Id = string;
|
|
825
|
+
}
|
|
826
|
+
export interface PathParameters {
|
|
827
|
+
id: /**
|
|
828
|
+
* example:
|
|
829
|
+
* 4d74976d-fb64-47fd-85e2-65eea140f5eb
|
|
830
|
+
*/
|
|
831
|
+
Parameters.Id;
|
|
832
|
+
}
|
|
833
|
+
namespace Responses {
|
|
834
|
+
export interface $200 {
|
|
835
|
+
/**
|
|
836
|
+
* Entity ID
|
|
837
|
+
* example:
|
|
838
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
839
|
+
*/
|
|
840
|
+
_id: string;
|
|
841
|
+
/**
|
|
842
|
+
* Entity title
|
|
843
|
+
*/
|
|
844
|
+
_title: string;
|
|
845
|
+
/**
|
|
846
|
+
* Ivy Organization ID the entity belongs to
|
|
847
|
+
* example:
|
|
848
|
+
* 206801
|
|
849
|
+
*/
|
|
850
|
+
_org: string;
|
|
851
|
+
/**
|
|
852
|
+
* URL-friendly identifier for the entity schema
|
|
853
|
+
* example:
|
|
854
|
+
* message
|
|
855
|
+
*/
|
|
856
|
+
_schema: string;
|
|
857
|
+
/**
|
|
858
|
+
* Entity tags
|
|
859
|
+
* example:
|
|
860
|
+
* [
|
|
861
|
+
* "pricing",
|
|
862
|
+
* "INBOX"
|
|
863
|
+
* ]
|
|
864
|
+
*/
|
|
865
|
+
_tags?: string[];
|
|
866
|
+
/**
|
|
867
|
+
* Created date
|
|
868
|
+
* example:
|
|
869
|
+
* 2021-02-09T12:41:43.662Z
|
|
870
|
+
*/
|
|
871
|
+
_created_at: string; // date-time
|
|
872
|
+
/**
|
|
873
|
+
* Updated date
|
|
874
|
+
* example:
|
|
875
|
+
* 2021-02-10T09:14:31.990Z
|
|
876
|
+
*/
|
|
877
|
+
_updated_at: string; // date-time
|
|
878
|
+
/**
|
|
879
|
+
* Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
|
|
880
|
+
* example:
|
|
881
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
|
|
882
|
+
*/
|
|
883
|
+
message_id?: string;
|
|
884
|
+
/**
|
|
885
|
+
* Ivy User ID of user sends the message.
|
|
886
|
+
* example:
|
|
887
|
+
* 206801
|
|
888
|
+
*/
|
|
889
|
+
sender?: string;
|
|
890
|
+
/**
|
|
891
|
+
* Subject
|
|
892
|
+
* example:
|
|
893
|
+
* Request for solar panel price
|
|
894
|
+
*/
|
|
895
|
+
subject: string;
|
|
896
|
+
/**
|
|
897
|
+
* HTML body
|
|
898
|
+
* example:
|
|
899
|
+
* <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
|
|
900
|
+
*/
|
|
901
|
+
html?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Text body
|
|
904
|
+
* example:
|
|
905
|
+
* We at ABC GmbH would like to request a price quote for the solar panel.
|
|
906
|
+
*/
|
|
907
|
+
text?: string;
|
|
908
|
+
from: Components.Schemas.Address;
|
|
909
|
+
reply_to?: Components.Schemas.Address;
|
|
910
|
+
/**
|
|
911
|
+
* To email addresses
|
|
912
|
+
*/
|
|
913
|
+
to?: Components.Schemas.Address[];
|
|
914
|
+
/**
|
|
915
|
+
* Cc email addresses
|
|
916
|
+
*/
|
|
917
|
+
cc?: Components.Schemas.Address[];
|
|
918
|
+
/**
|
|
919
|
+
* Bcc email addresses
|
|
920
|
+
*/
|
|
921
|
+
bcc?: Components.Schemas.Address[];
|
|
922
|
+
file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
|
|
923
|
+
/**
|
|
924
|
+
* References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\
|
|
925
|
+
* The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\
|
|
926
|
+
* The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
|
|
927
|
+
*
|
|
928
|
+
* example:
|
|
929
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
930
|
+
*/
|
|
931
|
+
references?: string;
|
|
932
|
+
/**
|
|
933
|
+
* In-Reply-To header. Value is the `message_id` of parent message.
|
|
934
|
+
*
|
|
935
|
+
* example:
|
|
936
|
+
* <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
937
|
+
*/
|
|
938
|
+
in_reply_to?: string;
|
|
939
|
+
/**
|
|
940
|
+
* Ivy User ID of user read the message.
|
|
941
|
+
*/
|
|
942
|
+
user_read_message?: string[];
|
|
943
|
+
/**
|
|
944
|
+
* Ivy Organization ID of organization read the message.
|
|
945
|
+
*/
|
|
946
|
+
org_read_message?: string[];
|
|
947
|
+
/**
|
|
948
|
+
* 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`\
|
|
949
|
+
* Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
|
|
950
|
+
*
|
|
951
|
+
*/
|
|
952
|
+
send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
|
|
953
|
+
/**
|
|
954
|
+
* Message type
|
|
955
|
+
*/
|
|
956
|
+
type?: "SENT" | "RECEIVED";
|
|
957
|
+
/**
|
|
958
|
+
* If true then html is not provided and must be downloaded using the html_download_url
|
|
959
|
+
*/
|
|
960
|
+
html_omitted?: boolean;
|
|
961
|
+
/**
|
|
962
|
+
* HTML body download URL
|
|
963
|
+
* example:
|
|
964
|
+
* https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html
|
|
965
|
+
*/
|
|
966
|
+
html_download_url?: string;
|
|
967
|
+
}
|
|
670
968
|
export interface $403 {
|
|
671
969
|
}
|
|
672
970
|
}
|
|
@@ -1361,7 +1659,7 @@ export interface OperationMethods {
|
|
|
1361
1659
|
parameters?: Parameters<Paths.GetMessage.PathParameters> | null,
|
|
1362
1660
|
data?: any,
|
|
1363
1661
|
config?: AxiosRequestConfig
|
|
1364
|
-
): OperationResponse<Paths.GetMessage.Responses.$
|
|
1662
|
+
): OperationResponse<Paths.GetMessage.Responses.$200>
|
|
1365
1663
|
/**
|
|
1366
1664
|
* deleteMessage - deleteMessage
|
|
1367
1665
|
*
|
|
@@ -1529,6 +1827,26 @@ export interface OperationMethods {
|
|
|
1529
1827
|
data?: any,
|
|
1530
1828
|
config?: AxiosRequestConfig
|
|
1531
1829
|
): OperationResponse<Paths.SendDraft.Responses.$201>
|
|
1830
|
+
/**
|
|
1831
|
+
* getMessageV2 - getMessageV2
|
|
1832
|
+
*
|
|
1833
|
+
* - Fetches message by ID
|
|
1834
|
+
* - If the message html is omitted on the entity, then it keeps the content on the message as a signed url
|
|
1835
|
+
* {
|
|
1836
|
+
* ...
|
|
1837
|
+
* _id: "4d74976d-fb64-47fd-85e2-65eea140f5eb",
|
|
1838
|
+
* _schema: "message",
|
|
1839
|
+
* _org: "org-123",
|
|
1840
|
+
* html_omitted: true,
|
|
1841
|
+
* html_download_url: "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html"
|
|
1842
|
+
* }
|
|
1843
|
+
*
|
|
1844
|
+
*/
|
|
1845
|
+
'getMessageV2'(
|
|
1846
|
+
parameters?: Parameters<Paths.GetMessageV2.PathParameters> | null,
|
|
1847
|
+
data?: any,
|
|
1848
|
+
config?: AxiosRequestConfig
|
|
1849
|
+
): OperationResponse<Paths.GetMessageV2.Responses.$200>
|
|
1532
1850
|
}
|
|
1533
1851
|
|
|
1534
1852
|
export interface PathsDictionary {
|
|
@@ -1564,7 +1882,7 @@ export interface PathsDictionary {
|
|
|
1564
1882
|
parameters?: Parameters<Paths.GetMessage.PathParameters> | null,
|
|
1565
1883
|
data?: any,
|
|
1566
1884
|
config?: AxiosRequestConfig
|
|
1567
|
-
): OperationResponse<Paths.GetMessage.Responses.$
|
|
1885
|
+
): OperationResponse<Paths.GetMessage.Responses.$200>
|
|
1568
1886
|
/**
|
|
1569
1887
|
* deleteMessage - deleteMessage
|
|
1570
1888
|
*
|
|
@@ -1763,6 +2081,28 @@ export interface PathsDictionary {
|
|
|
1763
2081
|
config?: AxiosRequestConfig
|
|
1764
2082
|
): OperationResponse<Paths.SendDraft.Responses.$201>
|
|
1765
2083
|
}
|
|
2084
|
+
['/v2/message/messages/{id}']: {
|
|
2085
|
+
/**
|
|
2086
|
+
* getMessageV2 - getMessageV2
|
|
2087
|
+
*
|
|
2088
|
+
* - Fetches message by ID
|
|
2089
|
+
* - If the message html is omitted on the entity, then it keeps the content on the message as a signed url
|
|
2090
|
+
* {
|
|
2091
|
+
* ...
|
|
2092
|
+
* _id: "4d74976d-fb64-47fd-85e2-65eea140f5eb",
|
|
2093
|
+
* _schema: "message",
|
|
2094
|
+
* _org: "org-123",
|
|
2095
|
+
* html_omitted: true,
|
|
2096
|
+
* html_download_url: "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html"
|
|
2097
|
+
* }
|
|
2098
|
+
*
|
|
2099
|
+
*/
|
|
2100
|
+
'get'(
|
|
2101
|
+
parameters?: Parameters<Paths.GetMessageV2.PathParameters> | null,
|
|
2102
|
+
data?: any,
|
|
2103
|
+
config?: AxiosRequestConfig
|
|
2104
|
+
): OperationResponse<Paths.GetMessageV2.Responses.$200>
|
|
2105
|
+
}
|
|
1766
2106
|
}
|
|
1767
2107
|
|
|
1768
2108
|
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",
|
|
@@ -120,12 +122,13 @@
|
|
|
120
122
|
"in": "path",
|
|
121
123
|
"required": true,
|
|
122
124
|
"schema": {
|
|
123
|
-
"type": "string"
|
|
125
|
+
"type": "string",
|
|
126
|
+
"example": "4d74976d-fb64-47fd-85e2-65eea140f5eb"
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
],
|
|
127
130
|
"responses": {
|
|
128
|
-
"
|
|
131
|
+
"200": {
|
|
129
132
|
"description": "Success",
|
|
130
133
|
"content": {
|
|
131
134
|
"application/json": {
|
|
@@ -142,6 +145,18 @@
|
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
147
|
},
|
|
148
|
+
"302": {
|
|
149
|
+
"description": "Redirect to V2 API to fetch the download URL",
|
|
150
|
+
"headers": {
|
|
151
|
+
"Location": {
|
|
152
|
+
"description": "V2 API",
|
|
153
|
+
"schema": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"example": "https://message.sls.epilot.io/v2/messages/4d74976d-fb64-47fd-85e2-65eea140f5eb"
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
145
160
|
"403": {
|
|
146
161
|
"description": "Forbidden"
|
|
147
162
|
}
|
|
@@ -709,6 +724,47 @@
|
|
|
709
724
|
}
|
|
710
725
|
}
|
|
711
726
|
}
|
|
727
|
+
},
|
|
728
|
+
"/v2/message/messages/{id}": {
|
|
729
|
+
"get": {
|
|
730
|
+
"operationId": "getMessageV2",
|
|
731
|
+
"summary": "getMessageV2",
|
|
732
|
+
"description": "- Fetches message by ID\n- If the message html is omitted on the entity, then it keeps the content on the message as a signed url\n {\n ...\n _id: \"4d74976d-fb64-47fd-85e2-65eea140f5eb\",\n _schema: \"message\",\n _org: \"org-123\",\n html_omitted: true,\n html_download_url: \"https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html\"\n }\n",
|
|
733
|
+
"tags": [
|
|
734
|
+
"Messages"
|
|
735
|
+
],
|
|
736
|
+
"parameters": [
|
|
737
|
+
{
|
|
738
|
+
"name": "id",
|
|
739
|
+
"description": "Message ID",
|
|
740
|
+
"in": "path",
|
|
741
|
+
"required": true,
|
|
742
|
+
"schema": {
|
|
743
|
+
"type": "string",
|
|
744
|
+
"example": "4d74976d-fb64-47fd-85e2-65eea140f5eb"
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
],
|
|
748
|
+
"responses": {
|
|
749
|
+
"200": {
|
|
750
|
+
"description": "Success",
|
|
751
|
+
"content": {
|
|
752
|
+
"application/json": {
|
|
753
|
+
"schema": {
|
|
754
|
+
"allOf": [
|
|
755
|
+
{
|
|
756
|
+
"$ref": "#/components/schemas/MessageV2"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
"403": {
|
|
764
|
+
"description": "Forbidden"
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
712
768
|
}
|
|
713
769
|
},
|
|
714
770
|
"components": {
|
|
@@ -946,6 +1002,28 @@
|
|
|
946
1002
|
}
|
|
947
1003
|
}
|
|
948
1004
|
},
|
|
1005
|
+
"MessageV2": {
|
|
1006
|
+
"allOf": [
|
|
1007
|
+
{
|
|
1008
|
+
"$ref": "#/components/schemas/BaseEntity"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"$ref": "#/components/schemas/Message"
|
|
1012
|
+
}
|
|
1013
|
+
],
|
|
1014
|
+
"properties": {
|
|
1015
|
+
"html_omitted": {
|
|
1016
|
+
"type": "boolean",
|
|
1017
|
+
"description": "If true then html is not provided and must be downloaded using the html_download_url",
|
|
1018
|
+
"default": false
|
|
1019
|
+
},
|
|
1020
|
+
"html_download_url": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"description": "HTML body download URL",
|
|
1023
|
+
"example": "https://s3.eu-central-1.amazonaws.com/epilot-attachments/3f34ce73-089c-4d45-a5ee-c161234e41c3/3f34ce73-089c-4d45-a5ee-c161234e41c3.html"
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
949
1027
|
"Address": {
|
|
950
1028
|
"type": "object",
|
|
951
1029
|
"required": [
|
|
@@ -1142,9 +1220,6 @@
|
|
|
1142
1220
|
}
|
|
1143
1221
|
},
|
|
1144
1222
|
"servers": [
|
|
1145
|
-
{
|
|
1146
|
-
"url": "https://message.sls.epilot.io"
|
|
1147
|
-
},
|
|
1148
1223
|
{
|
|
1149
1224
|
"url": "https://message.sls.epilot.io"
|
|
1150
1225
|
}
|