@epilot/message-client 0.0.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/README.md +40 -0
- package/dist/client.d.ts +1 -0
- package/dist/client.js +14 -0
- package/dist/definition.d.ts +3 -0
- package/dist/definition.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -0
- package/dist/openapi.d.ts +791 -0
- package/dist/openapi.json +3161 -0
- package/package-lock.json +8340 -0
- package/package.json +58 -0
- package/tsconfig.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# `@epilot/message-client`
|
|
2
|
+
|
|
3
|
+
API Client for epilot Message API.
|
|
4
|
+
|
|
5
|
+
Uses [`openapi-client-axios`](https://github.com/anttiviljami/openapi-client-axios)
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
Install the package:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install --save-dev @epilot/message-client
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Import the package:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { getClient } from '@epilot/message-client';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Use the client:
|
|
22
|
+
```typescript
|
|
23
|
+
// get typed client
|
|
24
|
+
const client = await getClient();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## BaseURL & Authorization
|
|
28
|
+
|
|
29
|
+
To pass an authorization header and set up the API url, you can use axios
|
|
30
|
+
defaults:
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
const client = getClient();
|
|
34
|
+
client.defaults.baseURL = config.ENTITY_API_URL;
|
|
35
|
+
client.defaults.headers['authorization'] = `Bearer ${token}`;
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## API Docs:
|
|
39
|
+
|
|
40
|
+
https://docs.api.epilot.io/
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getClient: () => import("openapi-client-axios").OpenAPIClient<import("./openapi").OperationMethods, import("./openapi").PathsDictionary>;
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getClient = void 0;
|
|
7
|
+
var openapi_client_axios_1 = __importDefault(require("openapi-client-axios"));
|
|
8
|
+
var definition_1 = __importDefault(require("./definition"));
|
|
9
|
+
var getClient = function () {
|
|
10
|
+
var api = new openapi_client_axios_1.default({ definition: definition_1.default, quick: true });
|
|
11
|
+
return api.initSync();
|
|
12
|
+
};
|
|
13
|
+
exports.getClient = getClient;
|
|
14
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){for(var s in t)e[s]=t[s];t.__esModule&&Object.defineProperty(e,"__esModule",{value:!0})}(exports,(()=>{"use strict";var e={914:function(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(s(279));t.default=a.default},279:e=>{e.exports=JSON.parse('{"openapi":"3.0.2","info":{"title":"Message API","version":"1.0.0-RFC","description":"Message API service\\n"},"security":[{"EpilotAuth":[]},{"AsOrganization":[]}],"paths":{"/messages":{"post":{"operationId":"sendMessage","summary":"sendMessage","description":"Send the specified message to the recipients.","tags":["messages"],"requestBody":{"content":{"application/json":{"schema":{"required":["subject","from"],"properties":{"thread":{"type":"object","required":["topic"],"description":"Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...).\\\\\\nThread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.\\\\\\n`thread` or `parent_id` must be provided either.\\n","properties":{"topic":{"type":"string","description":"Message topic (e.g. which service sends the message or message category)"},"assigned_to":{"type":"array","description":"Ivy User ID of who the message is assigned to. Default is the user who sends message.","items":{"type":"string"}}},"example":{"topic":"CUSTOMER_MESSAGE","assigned_to":["206801","200109"],"opportunity_id":829072}},"parent_id":{"type":"string","description":"Entity ID of parent message which this message replies to or forwards from.\\\\\\nIf both `parent_id` and `thread` are provided, `thread` is discarded.\\n","example":"44d7a3eb-0cce-4bd3-a7cd-0b3e652de0c2"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["_id","_title","_org","_schema","_created_at","_updated_at"],"properties":{"_id":{"type":"string","description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"_title":{"type":"string","description":"Entity title"},"_org":{"type":"string","description":"Ivy Organization ID the entity belongs to","example":"206801"},"_schema":{"type":"string","description":"URL-friendly identifier for the entity schema","example":"message"},"_tags":{"type":"array","description":"Entity tags","items":{"type":"string"},"example":["pricing","INBOX"]},"_created_at":{"type":"string","description":"Created date","format":"date-time","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","description":"Updated date","format":"date-time","example":"2021-02-10T09:14:31.990Z"}}},{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}}}]}}}},"403":{"description":"Forbidden"}}}},"/messages/{id}":{"delete":{"operationId":"deleteMessage","summary":"deleteMessage","description":"Immediately and permanently deletes the specified message. This operation cannot be undone.","tags":["messages"],"parameters":[{"name":"id","description":"Message ID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/messages/{id}/trash":{"post":{"operationId":"trashMessage","summary":"trashMessage","description":"Moves the specified message to the trash.","tags":["messages"],"parameters":[{"name":"id","description":"Message ID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/messages/{id}/untrash":{"post":{"operationId":"untrashMessage","summary":"untrashMessage","description":"Removes the specified message from the trash.","tags":["messages"],"parameters":[{"name":"id","description":"Message ID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/threads:search":{"post":{"operationId":"searchThreads","summary":"searchThreads","description":"Search for message entity and return threads which contain matched message. If message doesn\'t have any reply yet, evaluate it as a thread with single message.\\\\\\nSupports pagination. Lucene query syntax supported for complex querying.\\n","tags":["threads"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["q"],"properties":{"q":{"description":"Lucene queries supported with ElasticSearch","type":"string","example":"subject:\\"Request for solar panel price\\" AND _tags:INBOX"},"from":{"type":"integer","minimum":0,"default":0},"size":{"type":"integer","minimum":1,"default":10}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["hits","results"],"properties":{"hits":{"type":"number","description":"Total of matched threads","example":14},"results":{"type":"array","description":"Matched threads","items":{"allOf":[{"type":"object","required":["_id","_title","_org","_schema","_created_at","_updated_at"],"properties":{"_id":{"type":"string","description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"_title":{"type":"string","description":"Entity title"},"_org":{"type":"string","description":"Ivy Organization ID the entity belongs to","example":"206801"},"_schema":{"type":"string","description":"URL-friendly identifier for the entity schema","example":"message"},"_tags":{"type":"array","description":"Entity tags","items":{"type":"string"},"example":["pricing","INBOX"]},"_created_at":{"type":"string","description":"Created date","format":"date-time","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","description":"Updated date","format":"date-time","example":"2021-02-10T09:14:31.990Z"}}},{"description":"Thread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.","required":["topic"],"properties":{"topic":{"type":"string","description":"Message topic (e.g. which service sends the message or message category)","example":"CUSTOMER_MESSAGE"},"assigned_to":{"type":"array","description":"Ivy User ID of who the message is assigned to. Default is the user who sends message.","items":{"type":"string","example":["206801","200109"]}},"latest_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest message of thread"},"latest_trash_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest trash message of thread"}}}]}}}}}}},"403":{"description":"Forbidden"}}}},"/threads":{"put":{"operationId":"updateThread","summary":"updateThread","description":"Modify the thread.","tags":["threads"],"requestBody":{"content":{"application/json":{"schema":{"description":"Thread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.","required":["topic"],"properties":{"topic":{"type":"string","description":"Message topic (e.g. which service sends the message or message category)","example":"CUSTOMER_MESSAGE"},"assigned_to":{"type":"array","description":"Ivy User ID of who the message is assigned to. Default is the user who sends message.","items":{"type":"string","example":["206801","200109"]}},"latest_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest message of thread"},"latest_trash_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest trash message of thread"}}}}}},"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/threads/{id}":{"delete":{"operationId":"deleteThread","summary":"deleteThread","description":"Immediately and permanently deletes the specified thread. This operation cannot be undone.","tags":["threads"],"parameters":[{"name":"id","description":"Thread ID","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden"}}}},"/attachments/upload-url":{"post":{"operationId":"createAttachmentUploadUrl","summary":"createAttachmentUploadUrl","description":"Create S3 POST presigned URL to upload attachment. The URL is valid in 30 minutes. Maximum file size is 100MB.","tags":["attachments"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["filename","content_type"],"properties":{"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"content_type":{"type":"string","description":"Content type","example":"application/pdf"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["download_url","upload_url"],"properties":{"download_url":{"type":"string","description":"URL to download the attachment. This URL is not accessible until attachment is uploaded successfully.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"upload_url":{"type":"object","required":["url","fields"],"properties":{"url":{"type":"number","description":"URL to upload the attachment","example":"https://s3.eu-central-1.amazonaws.com/893487340562-message-attachment"},"fields":{"type":"object","description":"Fields are provided by AWS to authenticate and validate the request. All fields should be included in form-data when performing upload request.","example":{}}}}}}}}},"403":{"description":"Forbidden"}}}}},"components":{"securitySchemes":{"EpilotAuth":{"type":"http","scheme":"bearer","description":"Epilot Bearer Custom Authorization Token\\n\\n```\\nbtoa(JSON.stringify(\\n {\\n idtoken: $idToken,\\n accesstoken: $accessToken\\n }\\n))\\n```\\n"},"AsOrganization":{"type":"apiKey","in":"header","name":"x-ivy-org-id","description":"Set organization id when using internal auth"}},"schemas":{"BaseEntity":{"type":"object","required":["_id","_title","_org","_schema","_created_at","_updated_at"],"properties":{"_id":{"type":"string","description":"Entity ID","example":"3fa85f64-5717-4562-b3fc-2c963f66afa6"},"_title":{"type":"string","description":"Entity title"},"_org":{"type":"string","description":"Ivy Organization ID the entity belongs to","example":"206801"},"_schema":{"type":"string","description":"URL-friendly identifier for the entity schema","example":"message"},"_tags":{"type":"array","description":"Entity tags","items":{"type":"string"},"example":["pricing","INBOX"]},"_created_at":{"type":"string","description":"Created date","format":"date-time","example":"2021-02-09T12:41:43.662Z"},"_updated_at":{"type":"string","description":"Updated date","format":"date-time","example":"2021-02-10T09:14:31.990Z"}}},"Thread":{"description":"Thread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.","required":["topic"],"properties":{"topic":{"type":"string","description":"Message topic (e.g. which service sends the message or message category)","example":"CUSTOMER_MESSAGE"},"assigned_to":{"type":"array","description":"Ivy User ID of who the message is assigned to. Default is the user who sends message.","items":{"type":"string","example":["206801","200109"]}},"latest_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest message of thread"},"latest_trash_message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}},"description":"Latest trash message of thread"}}},"Message":{"type":"object","required":["subject","from"],"properties":{"message_id":{"type":"string","description":"Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>"},"sender":{"type":"string","description":"Ivy User ID of user sends the message.","example":"206801"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}},"references":{"type":"string","description":"References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent.\\\\\\nThe last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread.\\\\\\nThe basic idea is that sender should copy `references` from the parent and append the parent\'s `message_id` when replying.\\n","example":"<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"in_reply_to":{"type":"string","description":"In-Reply-To header. Value is the `message_id` of parent message.\\n","example":"<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>"},"user_read_message":{"type":"array","description":"Ivy User ID of user read the message.","items":{"type":"string","example":["206801","200109"]}},"status":{"type":"string","description":"Message status. Only apply for sent message.\\nReference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>\\n","enum":["SEND","REJECT","BOUNCE","COMPLAINT","DELIVERY",null]},"type":{"type":"string","description":"Message type","enum":["SENT","RECEIVED"]}}},"Address":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"Attachment":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}},"MessageRequestParams":{"required":["subject","from"],"properties":{"thread":{"type":"object","required":["topic"],"description":"Open new thread when sending the very first message in conversation. Thread should contains context related to all messages in it (eg. topic, brand_id, opportunity_id, assigned_to,...).\\\\\\nThread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.\\\\\\n`thread` or `parent_id` must be provided either.\\n","properties":{"topic":{"type":"string","description":"Message topic (e.g. which service sends the message or message category)"},"assigned_to":{"type":"array","description":"Ivy User ID of who the message is assigned to. Default is the user who sends message.","items":{"type":"string"}}},"example":{"topic":"CUSTOMER_MESSAGE","assigned_to":["206801","200109"],"opportunity_id":829072}},"parent_id":{"type":"string","description":"Entity ID of parent message which this message replies to or forwards from.\\\\\\nIf both `parent_id` and `thread` are provided, `thread` is discarded.\\n","example":"44d7a3eb-0cce-4bd3-a7cd-0b3e652de0c2"},"subject":{"type":"string","description":"Subject","example":"Request for solar panel price"},"html":{"type":"string","description":"HTML body","example":"<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>"},"text":{"type":"string","description":"Text body","example":"We at ABC GmbH would like to request a price quote for the solar panel."},"from":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"reply_to":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}},"to":{"type":"array","description":"To email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"cc":{"type":"array","description":"Cc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"bcc":{"type":"array","description":"Bcc email addresses","items":{"type":"object","required":["address"],"properties":{"name":{"type":"string","description":"Email address alias","example":"epilot"},"address":{"type":"string","description":"Email address","example":"messaging@epilot.cloud"}}}},"attachments":{"type":"array","description":"Message attachments","items":{"type":"object","required":["filename","size","content_type","url","bucket","object_key"],"properties":{"cid":{"type":"string","description":"Attachment ID","example":"f820ce3b-07b0-45ae-bcc6-babb2f53f79f"},"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"size":{"type":"number","description":"File size in bytes","example":451349},"content_type":{"type":"string","description":"Content type","example":"application/pdf"},"url":{"type":"string","description":"URL to download the attachment.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"bucket":{"type":"string","description":"S3 bucket where file is stored","example":"893487340562-message-attachment"},"object_key":{"type":"string","description":"S3 object apiKey","example":"attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"inline":{"type":"boolean","description":"If true then this attachment should not be offered for download (at least not in the main attachments list).\\\\\\nThe usecase is CID embedded image (aka inline image).\\n","default":false},"send_as_link":{"type":"boolean","description":"If true then this attachment is sent via link. The link is already inserted to email body by API caller. In this case, service doesn\'t process this attachment.","default":false},"copy_to_message":{"type":"boolean","description":"If true then this attachment is copied to the message and replaces corresponding one. The new attachment has different `cid`, `url`, `object_key`. This property supports for forwarding message.\\\\\\nIf both `send_as_link` and `copy_to_message` are provided, `copy_to_message` is discarded.\\n","default":false}}}}}},"SearchParams":{"type":"object","required":["q"],"properties":{"q":{"description":"Lucene queries supported with ElasticSearch","type":"string","example":"subject:\\"Request for solar panel price\\" AND _tags:INBOX"},"from":{"type":"integer","minimum":0,"default":0},"size":{"type":"integer","minimum":1,"default":10}}},"CreateAttachmentUploadUrlParams":{"type":"object","required":["filename","content_type"],"properties":{"filename":{"type":"string","description":"File name","example":"Produktinformationen_epilot360_Double_Opt_in.pdf"},"content_type":{"type":"string","description":"Content type","example":"application/pdf"}}},"AttachmentUploadUrl":{"type":"object","required":["download_url","upload_url"],"properties":{"download_url":{"type":"string","description":"URL to download the attachment. This URL is not accessible until attachment is uploaded successfully.","example":"https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf"},"upload_url":{"type":"object","required":["url","fields"],"properties":{"url":{"type":"number","description":"URL to upload the attachment","example":"https://s3.eu-central-1.amazonaws.com/893487340562-message-attachment"},"fields":{"type":"object","description":"Fields are provided by AWS to authenticate and validate the request. All fields should be included in form-data when performing upload request.","example":{}}}}}}}}}')}},t={};return function s(i){if(t[i])return t[i].exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,s),a.exports}(914)})());
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./client"), exports);
|
|
14
|
+
//# sourceMappingURL=index.js.map
|