@epilot/sdk 2.13.2 → 2.14.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/definitions/message-runtime.json +1 -1
- package/definitions/message.json +146 -1
- package/definitions/targeting-runtime.json +1 -1
- package/definitions/targeting.json +291 -0
- package/definitions/webhooks.json +8 -7
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +8 -8
- package/dist/apis/message.d.cts +2 -2
- package/dist/apis/message.d.ts +2 -2
- package/dist/apis/message.js +2 -2
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +8 -8
- package/dist/apis/targeting.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- package/dist/apis/targeting.js +2 -2
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.d.cts +2 -2
- package/dist/apis/webhooks.d.ts +2 -2
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/chunk-2ESIGECW.js +14 -0
- package/dist/chunk-JM63KEFZ.cjs +14 -0
- package/dist/{chunk-CRUXTTHI.js → chunk-OJLX6U66.js} +5 -5
- package/dist/{chunk-GHPSNA2U.cjs → chunk-SNERI3PK.cjs} +5 -5
- package/dist/chunk-UH24GU2Z.js +14 -0
- package/dist/chunk-W3SPZ6V5.cjs +14 -0
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/dist/message-663RPFCZ.js +7 -0
- package/dist/message-CEJ6VDZ6.cjs +7 -0
- package/dist/{message-runtime-XOQ5EJN6.js → message-runtime-5AUGENW3.js} +1 -1
- package/dist/{message-runtime-JSZCNCNU.cjs → message-runtime-5Z3POFZV.cjs} +2 -2
- package/dist/{message.d-B5UuSqgw.d.cts → message.d-VMmPsZVq.d.cts} +317 -4
- package/dist/{message.d-B5UuSqgw.d.ts → message.d-VMmPsZVq.d.ts} +317 -4
- package/dist/targeting-A2X6X7BF.js +7 -0
- package/dist/targeting-CSGKITGV.cjs +7 -0
- package/dist/{targeting-runtime-X3DQ527N.cjs → targeting-runtime-HWL6PLJF.cjs} +2 -2
- package/dist/{targeting-runtime-QI7322HB.js → targeting-runtime-L5RGDNSH.js} +1 -1
- package/dist/{targeting.d-Bq3onSes.d.cts → targeting.d-DaK3kwZg.d.cts} +286 -1
- package/dist/{targeting.d-Bq3onSes.d.ts → targeting.d-DaK3kwZg.d.ts} +286 -1
- package/dist/{webhooks-762WMLN2.cjs → webhooks-PNLMQFE2.cjs} +1 -1
- package/dist/{webhooks-5VDXUDDB.js → webhooks-QYVT2NUP.js} +1 -1
- package/dist/{webhooks.d-B6v_xmSD.d.ts → webhooks.d-DqOEzFsp.d.cts} +18 -14
- package/dist/{webhooks.d-B6v_xmSD.d.cts → webhooks.d-DqOEzFsp.d.ts} +18 -14
- package/docs/message.md +97 -9
- package/docs/targeting.md +192 -0
- package/docs/webhooks.md +10 -7
- package/package.json +11 -12
- package/definitions/focus-pocus-runtime.json +0 -1
- package/definitions/focus-pocus.json +0 -757
- package/dist/chunk-7ILTRJDQ.cjs +0 -14
- package/dist/chunk-DUHAG5CO.cjs +0 -14
- package/dist/chunk-FAZ63FEX.js +0 -14
- package/dist/chunk-H3NMCCSA.js +0 -14
- package/dist/message-6IFCB7GH.js +0 -7
- package/dist/message-7LNAFKKV.cjs +0 -7
- package/dist/targeting-4YMBBPDW.cjs +0 -7
- package/dist/targeting-VCENULF6.js +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/message.json
|
|
4
|
+
var message_default = '# Message API\n\n- **Base URL:** `https://message.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/message](https://docs.epilot.io/api/message)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.message.sendMessage(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/message\'\n\nconst messageClient = getClient()\nauthorize(messageClient, () => \'<token>\')\nconst { data } = await messageClient.sendMessage(...)\n```\n\n## Operations\n\n**Messages**\n- [`sendMessage`](#sendmessage)\n- [`updateMessage`](#updatemessage)\n- [`getMessage`](#getmessage)\n- [`deleteMessage`](#deletemessage)\n- [`getMessageEml`](#getmessageeml)\n- [`searchMessages`](#searchmessages)\n- [`trashMessage`](#trashmessage)\n- [`untrashMessage`](#untrashmessage)\n- [`markReadMessage`](#markreadmessage)\n- [`markReadMessageV2`](#markreadmessagev2)\n- [`markUnreadMessage`](#markunreadmessage)\n- [`getUnread`](#getunread)\n- [`markUnreadMessageV2`](#markunreadmessagev2)\n- [`spamMessage`](#spammessage)\n- [`unspamMessage`](#unspammessage)\n- [`getMessageV2`](#getmessagev2)\n\n**Threads**\n- [`searchThreads`](#searchthreads)\n- [`searchThreadsV2`](#searchthreadsv2)\n- [`searchIds`](#searchids)\n- [`getAssigneeWorkload`](#getassigneeworkload)\n- [`updateThread`](#updatethread)\n- [`deleteThread`](#deletethread)\n- [`moveThread`](#movethread)\n- [`markThreadAsDone`](#markthreadasdone)\n- [`markThreadAsOpen`](#markthreadasopen)\n- [`getThreadTimeline`](#getthreadtimeline)\n- [`trashThread`](#trashthread)\n- [`untrashThread`](#untrashthread)\n- [`spamThread`](#spamthread)\n- [`unspamThread`](#unspamthread)\n- [`bulkMoveThreads`](#bulkmovethreads)\n- [`bulkAssignThreads`](#bulkassignthreads)\n- [`threadBulkActionsRead`](#threadbulkactionsread)\n- [`threadBulkActionsUnread`](#threadbulkactionsunread)\n- [`threadBulkActionsFavorite`](#threadbulkactionsfavorite)\n- [`threadBulkActionsUnfavorite`](#threadbulkactionsunfavorite)\n- [`threadBulkActionsTrash`](#threadbulkactionstrash)\n- [`threadBulkActionsUntrash`](#threadbulkactionsuntrash)\n- [`threadBulkActionsDelete`](#threadbulkactionsdelete)\n- [`threadBulkActionsDone`](#threadbulkactionsdone)\n- [`threadBulkActionsOpen`](#threadbulkactionsopen)\n- [`markReadThread`](#markreadthread)\n- [`markReadThreadV2`](#markreadthreadv2)\n- [`markUnreadThread`](#markunreadthread)\n- [`markUnreadThreadV2`](#markunreadthreadv2)\n- [`assignThread`](#assignthread)\n- [`unassignThread`](#unassignthread)\n- [`assignUsers`](#assignusers)\n- [`assignUsersV2`](#assignusersv2)\n- [`pinThread`](#pinthread)\n- [`unpinThread`](#unpinthread)\n\n**Drafts**\n- [`createDraft`](#createdraft)\n- [`sendDraft`](#senddraft)\n\n**Schemas**\n- [`ErrorResponse`](#errorresponse)\n- [`MoveThreadPayload`](#movethreadpayload)\n- [`BaseEntity`](#baseentity)\n- [`Thread`](#thread)\n- [`Message`](#message)\n- [`MessageV2`](#messagev2)\n- [`Address`](#address)\n- [`AttachmentsRelation`](#attachmentsrelation)\n- [`File`](#file)\n- [`MessageRequestParams`](#messagerequestparams)\n- [`SearchParamsV2`](#searchparamsv2)\n- [`SearchParams`](#searchparams)\n- [`SearchIDParams`](#searchidparams)\n- [`AssigneeWorkloadParams`](#assigneeworkloadparams)\n- [`AssigneeWorkload`](#assigneeworkload)\n- [`AssigneeWorkloadResults`](#assigneeworkloadresults)\n- [`ReadMessagePayload`](#readmessagepayload)\n- [`ReadingScope`](#readingscope)\n- [`ThreadTimeline`](#threadtimeline)\n- [`ThreadDoneEvent`](#threaddoneevent)\n- [`ThreadOpenEvent`](#threadopenevent)\n- [`TimelineEventData`](#timelineeventdata)\n- [`TimelineEvent`](#timelineevent)\n- [`BulkActionsPayloadWithScopes`](#bulkactionspayloadwithscopes)\n- [`BulkActionsPayload`](#bulkactionspayload)\n- [`FieldsParam`](#fieldsparam)\n\n### `sendMessage`\n\nSend an email message\n\n`POST /v1/message/messages`\n\n```ts\nconst { data } = await client.sendMessage(\n {\n do_not_create_entities: true,\n },\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{}\n```\n\n</details>\n\n---\n\n### `updateMessage`\n\nUpdate message metadata\n\n`PUT /v1/message/messages`\n\n```ts\nconst { data } = await client.updateMessage()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `getMessage`\n\nGet an email message by id\n\n`GET /v1/message/messages/{id}`\n\n```ts\nconst { data } = await client.getMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `deleteMessage`\n\nImmediately and permanently delete a message. This operation cannot be undone.\n\n`DELETE /v1/message/messages/{id}`\n\n```ts\nconst { data } = await client.deleteMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getMessageEml`\n\nDownload a message as an EML file.\nReturns a 302 redirect to a pre-signed S3 URL where the EML file can be downloaded.\n\n`GET /v1/message/messages/{id}/eml`\n\n```ts\nconst { data } = await client.getMessageEml({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `searchMessages`\n\nSearch Messages\n\n`POST /v1/message/messages:search`\n\n```ts\nconst { data } = await client.searchMessages(\n null,\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\'],\n from: 0,\n size: 10,\n hydrate: false,\n include_scores: false,\n sort: \'string\',\n highlight: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `trashMessage`\n\nMove a message to the trash\n\n`POST /v1/message/messages/{id}/trash`\n\n```ts\nconst { data } = await client.trashMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `untrashMessage`\n\nRestore a trashed message\n\n`POST /v1/message/messages/{id}/untrash`\n\n```ts\nconst { data } = await client.untrashMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadMessage`\n\nMark message as read\n\n`POST /v1/message/messages/{id}/read`\n\n```ts\nconst { data } = await client.markReadMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadMessageV2`\n\nMark message as read within a scope\n\n`POST /v2/message/messages/{id}/read`\n\n```ts\nconst { data } = await client.markReadMessageV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `markUnreadMessage`\n\nMark message as unread\n\n`POST /v1/message/messages/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getUnread`\n\nGet all unread messages by actor\n\n`GET /v1/message/messages/unread/{actor}`\n\n```ts\nconst { data } = await client.getUnread({\n actor: \'example\',\n email_filter: [\'...\'],\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "count": 14,\n "unread": 0,\n "drafts": 12,\n "unassigned": 1,\n "spam": 3\n}\n```\n\n</details>\n\n---\n\n### `markUnreadMessageV2`\n\nMark message as unread within a scope\n\n`POST /v2/message/messages/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadMessageV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `searchThreads`\n\nSearch for threads of email messages.\n\n`POST /v1/message/threads:search`\n\n```ts\nconst { data } = await client.searchThreads(\n null,\n {\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n from: 0,\n size: 10,\n hydrate: false\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {},\n "latest_trash_message": {},\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchThreadsV2`\n\nSearch for threads of email messages.\n\n`POST /v2/message/threads:search`\n\n```ts\nconst { data } = await client.searchThreadsV2(\n null,\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\',\n fields: [\'_id\', \'_title\', \'first_name\', \'account\', \'!account.*._files\', \'**._product\'],\n from: 0,\n size: 10,\n hydrate: false,\n include_scores: false,\n sort: \'string\',\n highlight: {}\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": [\n {\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {},\n "latest_trash_message": {},\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `searchIds`\n\nSearch threads and return all id\'s\n\n`POST /v1/message/threads:searchIds`\n\n```ts\nconst { data } = await client.searchIds(\n null,\n {\n q: \'subject:"Request for solar panel price" AND _tags:INBOX\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 14,\n "results": ["string"]\n}\n```\n\n</details>\n\n---\n\n### `getAssigneeWorkload`\n\nReturn the open-thread workload for a set of user ids.\n\n`POST /v2/message/threads:workload`\n\n```ts\nconst { data } = await client.getAssigneeWorkload(\n null,\n {\n user_ids: [\'11000902\', \'11001053\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "workloads": [\n {\n "user_id": "11000902",\n "open_threads": 2\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `updateThread`\n\nModify thread metadata\n\n`PUT /v1/message/threads`\n\n```ts\nconst { data } = await client.updateThread()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "topic": "CUSTOMER_MESSAGE",\n "assigned_to": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "done": false,\n "latest_message": {\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {}\n ],\n "cc": [\n {}\n ],\n "bcc": [\n {}\n ],\n "file": {\n "$relation": []\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n },\n "latest_trash_message": {\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {}\n ],\n "cc": [\n {}\n ],\n "bcc": [\n {}\n ],\n "file": {\n "$relation": []\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n },\n "latest_message_at": "2024-02-10T09:14:31.990Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteThread`\n\nImmediately and permanently delete a thread. This operation cannot be undone.\n\n`DELETE /v1/message/threads/{id}`\n\n```ts\nconst { data } = await client.deleteThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `moveThread`\n\nMove thread to a different Inbox\n\n`POST /v1/message/threads/{id}:move`\n\n```ts\nconst { data } = await client.moveThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\'\n },\n)\n```\n\n---\n\n### `markThreadAsDone`\n\nMark thread as done\n\n`POST /v1/message/threads/{id}:markAsDone`\n\n```ts\nconst { data } = await client.markThreadAsDone({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markThreadAsOpen`\n\nMark thread as open\n\n`POST /v1/message/threads/{id}:markAsOpen`\n\n```ts\nconst { data } = await client.markThreadAsOpen({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `getThreadTimeline`\n\nGet thread timeline\n\n`GET /v1/message/threads/{id}/timeline`\n\n```ts\nconst { data } = await client.getThreadTimeline({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "events": [\n {\n "data": {\n "type": "THREAD_DONE",\n "user_id": "123",\n "organization_id": "456"\n },\n "timestamp": "2024-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `trashThread`\n\nMove a thread to trash\n\n`POST /v1/message/threads/{id}/trash`\n\n```ts\nconst { data } = await client.trashThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `untrashThread`\n\nRestore a trashed thread\n\n`POST /v1/message/threads/{id}/untrash`\n\n```ts\nconst { data } = await client.untrashThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `spamThread`\n\nMark a thread as spam\n\n`POST /v1/message/threads/{id}/spam`\n\n```ts\nconst { data } = await client.spamThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unspamThread`\n\nRemove spam marking from a thread\n\n`POST /v1/message/threads/{id}/unspam`\n\n```ts\nconst { data } = await client.unspamThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `spamMessage`\n\nMark a single message as spam. Also marks the parent thread as spam if all messages in the thread are spam.\n\n`POST /v1/message/messages/{id}/spam`\n\n```ts\nconst { data } = await client.spamMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unspamMessage`\n\nRemove spam marking from a single message. Also removes spam from the parent thread if no other messages are spam.\n\n`POST /v1/message/messages/{id}/unspam`\n\n```ts\nconst { data } = await client.unspamMessage({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `bulkMoveThreads`\n\nMove many threads to a different inbox\n\n`POST /v1/message/threads/bulk:move`\n\n```ts\nconst { data } = await client.bulkMoveThreads(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `bulkAssignThreads`\n\nAssign many threads\n\n`POST /v1/message/threads/bulk:assign`\n\n```ts\nconst { data } = await client.bulkAssignThreads(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsRead`\n\nPerform a bulk action of marking an array of thread ids as read\n\n`POST /v1/message/threads/bulk:read`\n\n```ts\nconst { data } = await client.threadBulkActionsRead(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUnread`\n\nPerform a bulk action of marking an array of thread ids as unread\n\n`POST /v1/message/threads/bulk:unread`\n\n```ts\nconst { data } = await client.threadBulkActionsUnread(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\'],\n assign_to: [\'206801\'],\n inbox_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsFavorite`\n\nPerform a bulk action of marking an array of thread ids favorite\n\n`POST /v1/message/threads/bulk:favorite`\n\n```ts\nconst { data } = await client.threadBulkActionsFavorite(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUnfavorite`\n\nPerform a bulk action of marking an array of thread ids unfavorited\n\n`POST /v1/message/threads/bulk:unfavorite`\n\n```ts\nconst { data } = await client.threadBulkActionsUnfavorite(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsTrash`\n\nPerform a bulk action of trashing an array of threads\n\n`POST /v1/message/threads/bulk:trash`\n\n```ts\nconst { data } = await client.threadBulkActionsTrash(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsUntrash`\n\nPerform a bulk action of untrashing an array of threads\n\n`POST /v1/message/threads/bulk:untrash`\n\n```ts\nconst { data } = await client.threadBulkActionsUntrash(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsDelete`\n\nPerforms a bulk permanent delete for all threads\n\n`POST /v1/message/threads/bulk:delete`\n\n```ts\nconst { data } = await client.threadBulkActionsDelete(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsDone`\n\nPerform a bulk action of marking an array of threads as done\n\n`POST /v1/message/threads/bulk:done`\n\n```ts\nconst { data } = await client.threadBulkActionsDone(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `threadBulkActionsOpen`\n\nPerform a bulk action of marking an array of threads as open\n\n`POST /v1/message/threads/bulk:open`\n\n```ts\nconst { data } = await client.threadBulkActionsOpen(\n null,\n {\n ids: [\'6b299eda-4018-4554-8965-c4b5598e6531\']\n },\n)\n```\n\n---\n\n### `markReadThread`\n\nMark thread as read\n\n`POST /v1/message/threads/{id}/read`\n\n```ts\nconst { data } = await client.markReadThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markReadThreadV2`\n\nMark thread as read within a scope\n\n`POST /v2/message/threads/{id}/read`\n\n```ts\nconst { data } = await client.markReadThreadV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `markUnreadThread`\n\nMark thread as unread\n\n`POST /v1/message/threads/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `markUnreadThreadV2`\n\nMark thread as unread within a scope\n\n`POST /v2/message/threads/{id}/unread`\n\n```ts\nconst { data } = await client.markUnreadThreadV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n scopes: [\'organization\', \'user\']\n },\n)\n```\n\n---\n\n### `assignThread`\n\nAssign thread to entities\n\n`POST /v1/message/threads/{id}/assign`\n\n```ts\nconst { data } = await client.assignThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n [\n {\n slug: \'contact\',\n entity_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\',\n org_id: \'206801\',\n is_main_entity: true\n }\n ],\n)\n```\n\n---\n\n### `unassignThread`\n\nUnassign thread from entities\n\n`POST /v1/message/threads/{id}/unassign`\n\n```ts\nconst { data } = await client.unassignThread(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n unlink_mapped_entities: true,\n },\n [\n {\n slug: \'contact\',\n entity_id: \'3f34ce73-089c-4d45-a5ee-c161234e41c3\'\n }\n ],\n)\n```\n\n---\n\n### `assignUsers`\n\nAssign users to thread for receiving notifications.\nThe operation replaces all existing assigned users in thread.\n\n`POST /v1/message/threads/{id}/assign:users`\n\n```ts\nconst { data } = await client.assignUsers(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n assigned_to: [\'206801\']\n },\n)\n```\n\n---\n\n### `assignUsersV2`\n\nAssign users to thread.\n\n`POST /v2/message/threads/{id}/assign:users`\n\n```ts\nconst { data } = await client.assignUsersV2(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n add: [\'206801\'],\n remove: [\'206801\']\n },\n)\n```\n\n---\n\n### `pinThread`\n\nPin a single thread\n\n`POST /v1/message/threads/{id}:pin`\n\n```ts\nconst { data } = await client.pinThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `unpinThread`\n\nUnpin a single thread\n\n`DELETE /v1/message/threads/{id}:pin`\n\n```ts\nconst { data } = await client.unpinThread({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `createDraft`\n\nCreate a new draft\n\n`POST /v1/message/drafts`\n\n```ts\nconst { data } = await client.createDraft(\n null,\n {},\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `sendDraft`\n\nSend the existing draft to the recipients\n\n`POST /v1/message/drafts:send`\n\n```ts\nconst { data } = await client.sendDraft()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n### `getMessageV2`\n\n- 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 _schem\n\n`GET /v2/message/messages/{id}`\n\n```ts\nconst { data } = await client.getMessageV2({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "html_omitted": false,\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 "_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",\n "_title": "string",\n "_org": "206801",\n "_schema": "message",\n "_tags": ["pricing", "INBOX"],\n "_created_at": "2021-02-09T12:41:43.662Z",\n "_updated_at": "2021-02-10T09:14:31.990Z",\n "message_id": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>",\n "sender": "206801",\n "updated_by": "206801",\n "subject": "Request for solar panel price",\n "html": "<div>We at ABC GmbH would like to request a price quote for the solar panel.</div>",\n "text": "We at ABC GmbH would like to request a price quote for the solar panel.",\n "from": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "reply_to": {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n },\n "to": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "cc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "bcc": [\n {\n "name": "epilot",\n "address": "messaging@epilot.cloud",\n "email_type": "INTERNAL",\n "send_status": "SEND",\n "send_error": {}\n }\n ],\n "file": {\n "$relation": [\n {\n "entity_id": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",\n "filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",\n "is_message_attachment": true,\n "may_be_signature_attachment": true,\n "cid": "fb222496-a1a5-4639-94f2-07b5e35e4068",\n "inline": false,\n "send_as_link": false,\n "save_to_entity": true\n }\n ]\n },\n "references": "<0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "in_reply_to": "<CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>",\n "user_read_message": ["206801", "200109"],\n "org_read_message": ["789372", "210291"],\n "send_status": ["SEND"],\n "type": "SENT",\n "template_id": "3f34ce73-089c-4d45-a5ee-c161234e41c3"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n error?: string\n}\n```\n\n### `MoveThreadPayload`\n\n```ts\ntype MoveThreadPayload = {\n inbox_id: string\n}\n```\n\n### `BaseEntity`\n\n```ts\ntype BaseEntity = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n}\n```\n\n### `Thread`\n\nThread properties depend on API caller as it\'s not pre-defined. We do recommend having at least `topic` property for categorizing.\n\n```ts\ntype Thread = {\n topic: string\n assigned_to?: string[]\n org_read_message?: string[]\n done?: boolean\n latest_message?: {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n reply_to?: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n to?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n cc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n bcc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n file?: {\n $relation?: { ... }\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n }\n latest_trash_message?: {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n reply_to?: {\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }\n to?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n cc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n bcc?: Array<{\n name?: { ... }\n address: { ... }\n email_type?: { ... }\n send_status?: { ... }\n send_error?: { ... }\n }>\n // ...\n}\n```\n\n### `Message`\n\n```ts\ntype Message = {\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n}\n```\n\n### `MessageV2`\n\n```ts\ntype MessageV2 = {\n _id: string\n _title: string\n _org: string\n _schema: string\n _tags?: string[]\n _created_at: string // date-time\n _updated_at: string // date-time\n message_id?: string\n sender?: string\n updated_by?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n references?: string\n in_reply_to?: string\n user_read_message?: string[]\n org_read_message?: string[]\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"[]\n type?: "SENT" | "RECEIVED"\n template_id?: string\n}\n```\n\n### `Address`\n\n```ts\ntype Address = {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n}\n```\n\n### `AttachmentsRelation`\n\nMessage attachments\n\n```ts\ntype AttachmentsRelation = {\n $relation?: Array<{\n entity_id: string\n filename?: string\n is_message_attachment?: boolean\n may_be_signature_attachment?: boolean\n cid?: string\n inline?: boolean\n send_as_link?: boolean\n save_to_entity?: boolean\n }>\n}\n```\n\n### `File`\n\n```ts\ntype File = {\n entity_id: string\n filename?: string\n is_message_attachment?: boolean\n may_be_signature_attachment?: boolean\n cid?: string\n inline?: boolean\n send_as_link?: boolean\n save_to_entity?: boolean\n}\n```\n\n### `MessageRequestParams`\n\n```ts\ntype MessageRequestParams = {\n complete_thread?: boolean\n mark_thread_as_read?: boolean\n thread?: {\n topic: string\n assigned_to?: string[]\n }\n parent_id?: string\n subject: string\n html?: string\n text?: string\n from: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n reply_to?: {\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }\n to?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n cc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n bcc?: Array<{\n name?: string\n address: string\n email_type?: "INTERNAL" | "EXTERNAL" | "PARTNER"\n send_status?: "SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR"\n send_error?: object\n }>\n file?: {\n $relation?: Array<{\n entity_id: { ... }\n filename?: { ... }\n is_message_attachment?: { ... }\n may_be_signature_attachment?: { ... }\n cid?: { ... }\n inline?: { ... }\n send_as_link?: { ... }\n save_to_entity?: { ... }\n }>\n }\n template_id?: string\n source?: "manual" | "automation" | "workflow" | "partner" | "bulk" | "system"\n}\n```\n\n### `SearchParamsV2`\n\n```ts\ntype SearchParamsV2 = {\n inbox_id?: string | string[]\n q: string\n fields?: string[]\n from?: number\n size?: number\n hydrate?: boolean\n include_scores?: boolean\n sort?: string\n highlight?: unknown\n}\n```\n\n### `SearchParams`\n\n```ts\ntype SearchParams = {\n q: string\n from?: number\n size?: number\n hydrate?: boolean\n}\n```\n\n### `SearchIDParams`\n\n```ts\ntype SearchIDParams = {\n q?: string\n}\n```\n\n### `AssigneeWorkloadParams`\n\n```ts\ntype AssigneeWorkloadParams = {\n user_ids: string[]\n}\n```\n\n### `AssigneeWorkload`\n\n```ts\ntype AssigneeWorkload = {\n user_id: string\n open_threads: number\n}\n```\n\n### `AssigneeWorkloadResults`\n\n```ts\ntype AssigneeWorkloadResults = {\n workloads: Array<{\n user_id: string\n open_threads: number\n }>\n}\n```\n\n### `ReadMessagePayload`\n\n```ts\ntype ReadMessagePayload = {\n scopes: "organization" | "user"[]\n}\n```\n\n### `ReadingScope`\n\nWho is marking an item as read or unread.\n\n```ts\ntype ReadingScope = "organization" | "user"\n```\n\n### `ThreadTimeline`\n\n```ts\ntype ThreadTimeline = {\n events: Array<{\n data: {\n type: { ... }\n user_id: { ... }\n organization_id: { ... }\n } | {\n type: { ... }\n user_id: { ... }\n organization_id: { ... }\n }\n timestamp: string\n }>\n}\n```\n\n### `ThreadDoneEvent`\n\n```ts\ntype ThreadDoneEvent = {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n}\n```\n\n### `ThreadOpenEvent`\n\n```ts\ntype ThreadOpenEvent = {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n}\n```\n\n### `TimelineEventData`\n\n```ts\ntype TimelineEventData = {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n} | {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n}\n```\n\n### `TimelineEvent`\n\n```ts\ntype TimelineEvent = {\n data: {\n type: "THREAD_DONE"\n user_id: string\n organization_id: string\n } | {\n type: "THREAD_OPEN"\n user_id: string\n organization_id: string\n }\n timestamp: string\n}\n```\n\n### `BulkActionsPayloadWithScopes`\n\n```ts\ntype BulkActionsPayloadWithScopes = {\n ids: string[]\n assign_to?: string[]\n inbox_id?: string\n scopes?: "organization" | "user"[]\n}\n```\n\n### `BulkActionsPayload`\n\n```ts\ntype BulkActionsPayload = {\n ids: string[]\n}\n```\n\n### `FieldsParam`\n\nList of entity fields to include or exclude in the response\n\nUse ! to exclude fields, e.g. `!_id` to exclude the `_id` field.\n\nGlobbing and globstart (**) is supported for nested fields.\n\n\n```ts\ntype FieldsParam = string[]\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = message_default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJM63KEFZcjs = require('./chunk-JM63KEFZ.cjs');
|
|
4
4
|
require('./chunk-NJK5F5TF.cjs');
|
|
5
|
-
exports. default =
|
|
5
|
+
exports. default = _chunkJM63KEFZcjs.require_message_runtime.call(void 0, );
|
|
@@ -43,6 +43,40 @@ declare namespace Components {
|
|
|
43
43
|
[key: string]: any;
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
+
export interface AssigneeWorkload {
|
|
47
|
+
/**
|
|
48
|
+
* The user id.
|
|
49
|
+
* example:
|
|
50
|
+
* 11000902
|
|
51
|
+
*/
|
|
52
|
+
user_id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Number of open threads assigned directly to the user.
|
|
55
|
+
* example:
|
|
56
|
+
* 2
|
|
57
|
+
*/
|
|
58
|
+
open_threads: number;
|
|
59
|
+
}
|
|
60
|
+
export interface AssigneeWorkloadParams {
|
|
61
|
+
/**
|
|
62
|
+
* User ids to compute the open-thread workload for. At most 100 per request; larger requests are rejected with 422.
|
|
63
|
+
* example:
|
|
64
|
+
* [
|
|
65
|
+
* "11000902",
|
|
66
|
+
* "11001053"
|
|
67
|
+
* ]
|
|
68
|
+
*/
|
|
69
|
+
user_ids: [
|
|
70
|
+
string,
|
|
71
|
+
...string[]
|
|
72
|
+
];
|
|
73
|
+
}
|
|
74
|
+
export interface AssigneeWorkloadResults {
|
|
75
|
+
/**
|
|
76
|
+
* Open-thread workload per requested user id, in request order.
|
|
77
|
+
*/
|
|
78
|
+
workloads: AssigneeWorkload[];
|
|
79
|
+
}
|
|
46
80
|
/**
|
|
47
81
|
* Message attachments
|
|
48
82
|
*/
|
|
@@ -199,6 +233,11 @@ declare namespace Components {
|
|
|
199
233
|
*
|
|
200
234
|
*/
|
|
201
235
|
send_as_link?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* If false, this file relation is kept on the message (e.g. for CID/inline rendering) but is NOT propagated to the entity the email is sent from. Used for inline images such as logos, signatures and social icons. Defaults to true.
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
save_to_entity?: boolean;
|
|
202
241
|
}
|
|
203
242
|
export interface Message {
|
|
204
243
|
/**
|
|
@@ -213,6 +252,12 @@ declare namespace Components {
|
|
|
213
252
|
* 206801
|
|
214
253
|
*/
|
|
215
254
|
sender?: string;
|
|
255
|
+
/**
|
|
256
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
257
|
+
* example:
|
|
258
|
+
* 206801
|
|
259
|
+
*/
|
|
260
|
+
updated_by?: string;
|
|
216
261
|
/**
|
|
217
262
|
* Subject
|
|
218
263
|
* example:
|
|
@@ -300,6 +345,14 @@ declare namespace Components {
|
|
|
300
345
|
* Whether the thread is marked as Done immediately after sending the message
|
|
301
346
|
*/
|
|
302
347
|
complete_thread?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Whether to mark the thread as read by the sender's org/user after sending a reply.
|
|
350
|
+
* Only applies when `parent_id` is set. When false, the thread's `org_read_message` and
|
|
351
|
+
* `user_read_message` arrays are left unchanged, so the thread remains unread for anyone
|
|
352
|
+
* who had it unread before. Defaults to true for backward compatibility.
|
|
353
|
+
*
|
|
354
|
+
*/
|
|
355
|
+
mark_thread_as_read?: boolean;
|
|
303
356
|
/**
|
|
304
357
|
* 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,...). Thread properties depend on API caller as it's not pre-defined. We do recommend having at least `topic` property for categorizing. `thread` or `parent_id` must be provided either.
|
|
305
358
|
*
|
|
@@ -369,6 +422,17 @@ declare namespace Components {
|
|
|
369
422
|
* 3f34ce73-089c-4d45-a5ee-c161234e41c3
|
|
370
423
|
*/
|
|
371
424
|
template_id?: string;
|
|
425
|
+
/**
|
|
426
|
+
* Identifies who triggered the send so server-side policy can branch on it.
|
|
427
|
+
* For `manual` sends, the caller's curated `_tags` are trusted as-is and no
|
|
428
|
+
* server-side enrichment from the referenced `template_id` (e.g. merging the
|
|
429
|
+
* template's `email_tags`) is performed. Any non-manual value (or omitting the
|
|
430
|
+
* field) opts into template-derived enrichment.
|
|
431
|
+
*
|
|
432
|
+
* example:
|
|
433
|
+
* manual
|
|
434
|
+
*/
|
|
435
|
+
source?: "manual" | "automation" | "workflow" | "partner" | "bulk" | "system";
|
|
372
436
|
}
|
|
373
437
|
export interface MessageV2 {
|
|
374
438
|
/**
|
|
@@ -426,6 +490,12 @@ declare namespace Components {
|
|
|
426
490
|
* 206801
|
|
427
491
|
*/
|
|
428
492
|
sender?: string;
|
|
493
|
+
/**
|
|
494
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
495
|
+
* example:
|
|
496
|
+
* 206801
|
|
497
|
+
*/
|
|
498
|
+
updated_by?: string;
|
|
429
499
|
/**
|
|
430
500
|
* Subject
|
|
431
501
|
* example:
|
|
@@ -673,7 +743,7 @@ declare namespace Components {
|
|
|
673
743
|
/**
|
|
674
744
|
* Timestamp of the event
|
|
675
745
|
* example:
|
|
676
|
-
* 2024-01-01T00:00:
|
|
746
|
+
* 2024-01-01T00:00:00.000Z
|
|
677
747
|
*/
|
|
678
748
|
timestamp: string;
|
|
679
749
|
}
|
|
@@ -848,6 +918,12 @@ declare namespace Paths {
|
|
|
848
918
|
* 206801
|
|
849
919
|
*/
|
|
850
920
|
sender?: string;
|
|
921
|
+
/**
|
|
922
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
923
|
+
* example:
|
|
924
|
+
* 206801
|
|
925
|
+
*/
|
|
926
|
+
updated_by?: string;
|
|
851
927
|
/**
|
|
852
928
|
* Subject
|
|
853
929
|
* example:
|
|
@@ -961,6 +1037,14 @@ declare namespace Paths {
|
|
|
961
1037
|
}
|
|
962
1038
|
}
|
|
963
1039
|
}
|
|
1040
|
+
namespace GetAssigneeWorkload {
|
|
1041
|
+
export type RequestBody = Components.Schemas.AssigneeWorkloadParams;
|
|
1042
|
+
namespace Responses {
|
|
1043
|
+
export type $200 = Components.Schemas.AssigneeWorkloadResults;
|
|
1044
|
+
export interface $403 {
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
964
1048
|
namespace GetMessage {
|
|
965
1049
|
namespace Parameters {
|
|
966
1050
|
/**
|
|
@@ -1033,6 +1117,12 @@ declare namespace Paths {
|
|
|
1033
1117
|
* 206801
|
|
1034
1118
|
*/
|
|
1035
1119
|
sender?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1122
|
+
* example:
|
|
1123
|
+
* 206801
|
|
1124
|
+
*/
|
|
1125
|
+
updated_by?: string;
|
|
1036
1126
|
/**
|
|
1037
1127
|
* Subject
|
|
1038
1128
|
* example:
|
|
@@ -1216,6 +1306,12 @@ declare namespace Paths {
|
|
|
1216
1306
|
* 206801
|
|
1217
1307
|
*/
|
|
1218
1308
|
sender?: string;
|
|
1309
|
+
/**
|
|
1310
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1311
|
+
* example:
|
|
1312
|
+
* 206801
|
|
1313
|
+
*/
|
|
1314
|
+
updated_by?: string;
|
|
1219
1315
|
/**
|
|
1220
1316
|
* Subject
|
|
1221
1317
|
* example:
|
|
@@ -1642,6 +1738,12 @@ declare namespace Paths {
|
|
|
1642
1738
|
* 206801
|
|
1643
1739
|
*/
|
|
1644
1740
|
sender?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
1743
|
+
* example:
|
|
1744
|
+
* 206801
|
|
1745
|
+
*/
|
|
1746
|
+
updated_by?: string;
|
|
1645
1747
|
/**
|
|
1646
1748
|
* Subject
|
|
1647
1749
|
* example:
|
|
@@ -1988,6 +2090,12 @@ declare namespace Paths {
|
|
|
1988
2090
|
* 206801
|
|
1989
2091
|
*/
|
|
1990
2092
|
sender?: string;
|
|
2093
|
+
/**
|
|
2094
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2095
|
+
* example:
|
|
2096
|
+
* 206801
|
|
2097
|
+
*/
|
|
2098
|
+
updated_by?: string;
|
|
1991
2099
|
/**
|
|
1992
2100
|
* Subject
|
|
1993
2101
|
* example:
|
|
@@ -2401,6 +2509,12 @@ declare namespace Paths {
|
|
|
2401
2509
|
* 206801
|
|
2402
2510
|
*/
|
|
2403
2511
|
sender?: string;
|
|
2512
|
+
/**
|
|
2513
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2514
|
+
* example:
|
|
2515
|
+
* 206801
|
|
2516
|
+
*/
|
|
2517
|
+
updated_by?: string;
|
|
2404
2518
|
/**
|
|
2405
2519
|
* Subject
|
|
2406
2520
|
* example:
|
|
@@ -2484,6 +2598,160 @@ declare namespace Paths {
|
|
|
2484
2598
|
}
|
|
2485
2599
|
export interface $403 {
|
|
2486
2600
|
}
|
|
2601
|
+
export interface $409 {
|
|
2602
|
+
/**
|
|
2603
|
+
* Human-readable conflict message
|
|
2604
|
+
* example:
|
|
2605
|
+
* This draft was edited by someone else. Please reload and try again.
|
|
2606
|
+
*/
|
|
2607
|
+
error?: string;
|
|
2608
|
+
/**
|
|
2609
|
+
* The current server version of the message (includes updated_by / _updated_at)
|
|
2610
|
+
*/
|
|
2611
|
+
current_message?: {
|
|
2612
|
+
/**
|
|
2613
|
+
* Entity ID
|
|
2614
|
+
* example:
|
|
2615
|
+
* 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
|
2616
|
+
*/
|
|
2617
|
+
_id: string;
|
|
2618
|
+
/**
|
|
2619
|
+
* Entity title
|
|
2620
|
+
*/
|
|
2621
|
+
_title: string;
|
|
2622
|
+
/**
|
|
2623
|
+
* Organization ID the entity belongs to
|
|
2624
|
+
* example:
|
|
2625
|
+
* 206801
|
|
2626
|
+
*/
|
|
2627
|
+
_org: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* URL-friendly identifier for the entity schema
|
|
2630
|
+
* example:
|
|
2631
|
+
* message
|
|
2632
|
+
*/
|
|
2633
|
+
_schema: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* Entity tags
|
|
2636
|
+
* example:
|
|
2637
|
+
* [
|
|
2638
|
+
* "pricing",
|
|
2639
|
+
* "INBOX"
|
|
2640
|
+
* ]
|
|
2641
|
+
*/
|
|
2642
|
+
_tags?: string[];
|
|
2643
|
+
/**
|
|
2644
|
+
* Created date
|
|
2645
|
+
* example:
|
|
2646
|
+
* 2021-02-09T12:41:43.662Z
|
|
2647
|
+
*/
|
|
2648
|
+
_created_at: string; // date-time
|
|
2649
|
+
/**
|
|
2650
|
+
* Updated date
|
|
2651
|
+
* example:
|
|
2652
|
+
* 2021-02-10T09:14:31.990Z
|
|
2653
|
+
*/
|
|
2654
|
+
_updated_at: string; // date-time
|
|
2655
|
+
/**
|
|
2656
|
+
* Message ID which is from email provider. If you provide `message-id`, API overrides by its own value.
|
|
2657
|
+
* example:
|
|
2658
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com>
|
|
2659
|
+
*/
|
|
2660
|
+
message_id?: string;
|
|
2661
|
+
/**
|
|
2662
|
+
* User ID of user sends the message.
|
|
2663
|
+
* example:
|
|
2664
|
+
* 206801
|
|
2665
|
+
*/
|
|
2666
|
+
sender?: string;
|
|
2667
|
+
/**
|
|
2668
|
+
* User ID of the user who last updated (edited) the message. Set for drafts on each save.
|
|
2669
|
+
* example:
|
|
2670
|
+
* 206801
|
|
2671
|
+
*/
|
|
2672
|
+
updated_by?: string;
|
|
2673
|
+
/**
|
|
2674
|
+
* Subject
|
|
2675
|
+
* example:
|
|
2676
|
+
* Request for solar panel price
|
|
2677
|
+
*/
|
|
2678
|
+
subject: string;
|
|
2679
|
+
/**
|
|
2680
|
+
* HTML body
|
|
2681
|
+
* example:
|
|
2682
|
+
* <div>We at ABC GmbH would like to request a price quote for the solar panel.</div>
|
|
2683
|
+
*/
|
|
2684
|
+
html?: string;
|
|
2685
|
+
/**
|
|
2686
|
+
* Text body
|
|
2687
|
+
* example:
|
|
2688
|
+
* We at ABC GmbH would like to request a price quote for the solar panel.
|
|
2689
|
+
*/
|
|
2690
|
+
text?: string;
|
|
2691
|
+
from: Components.Schemas.Address;
|
|
2692
|
+
reply_to?: Components.Schemas.Address;
|
|
2693
|
+
/**
|
|
2694
|
+
* To email addresses
|
|
2695
|
+
*/
|
|
2696
|
+
to?: Components.Schemas.Address[];
|
|
2697
|
+
/**
|
|
2698
|
+
* Cc email addresses
|
|
2699
|
+
*/
|
|
2700
|
+
cc?: Components.Schemas.Address[];
|
|
2701
|
+
/**
|
|
2702
|
+
* Bcc email addresses
|
|
2703
|
+
*/
|
|
2704
|
+
bcc?: Components.Schemas.Address[];
|
|
2705
|
+
file?: /* Message attachments */ Components.Schemas.AttachmentsRelation;
|
|
2706
|
+
/**
|
|
2707
|
+
* References header. Value is the series of `message_id` which is reparated by space to indicate that message has parent. The last message ID in references identifies the parent. The first message ID in references identifies the first message in the thread. The basic idea is that sender should copy `references` from the parent and append the parent's `message_id` when replying.
|
|
2708
|
+
*
|
|
2709
|
+
* example:
|
|
2710
|
+
* <0102017b97a502f8-a67f01c2-68cc-4928-b91b-45853f34e259-000000@eu-west-1.amazonses.com> <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
2711
|
+
*/
|
|
2712
|
+
references?: string;
|
|
2713
|
+
/**
|
|
2714
|
+
* In-Reply-To header. Value is the `message_id` of parent message.
|
|
2715
|
+
*
|
|
2716
|
+
* example:
|
|
2717
|
+
* <CALHgQpziyxW9NaFUs+nRMykzr6Ljq6vjq4WO9SaihAuMasuDyg@mail.gmail.com>
|
|
2718
|
+
*/
|
|
2719
|
+
in_reply_to?: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* User ID of user read the message.
|
|
2722
|
+
* example:
|
|
2723
|
+
* [
|
|
2724
|
+
* "206801",
|
|
2725
|
+
* "200109"
|
|
2726
|
+
* ]
|
|
2727
|
+
*/
|
|
2728
|
+
user_read_message?: string[];
|
|
2729
|
+
/**
|
|
2730
|
+
* Organization ID of organization read the message.
|
|
2731
|
+
* example:
|
|
2732
|
+
* [
|
|
2733
|
+
* "789372",
|
|
2734
|
+
* "210291"
|
|
2735
|
+
* ]
|
|
2736
|
+
*/
|
|
2737
|
+
org_read_message?: string[];
|
|
2738
|
+
/**
|
|
2739
|
+
* 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` Reference at <https://docs.aws.amazon.com/ses/latest/DeveloperGuide/monitor-sending-activity.html>
|
|
2740
|
+
*
|
|
2741
|
+
*/
|
|
2742
|
+
send_status?: ("SEND" | "DELIVERY" | "REJECT" | "COMPLAINT" | "BOUNCE" | "ERROR")[];
|
|
2743
|
+
/**
|
|
2744
|
+
* Message type
|
|
2745
|
+
*/
|
|
2746
|
+
type?: "SENT" | "RECEIVED";
|
|
2747
|
+
/**
|
|
2748
|
+
* Template ID used for sending message.
|
|
2749
|
+
* example:
|
|
2750
|
+
* 3f34ce73-089c-4d45-a5ee-c161234e41c3
|
|
2751
|
+
*/
|
|
2752
|
+
template_id?: string;
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2487
2755
|
}
|
|
2488
2756
|
}
|
|
2489
2757
|
namespace UpdateThread {
|
|
@@ -2580,7 +2848,6 @@ declare namespace Paths {
|
|
|
2580
2848
|
}
|
|
2581
2849
|
}
|
|
2582
2850
|
|
|
2583
|
-
|
|
2584
2851
|
interface OperationMethods {
|
|
2585
2852
|
/**
|
|
2586
2853
|
* updateMessage - updateMessage
|
|
@@ -2757,6 +3024,27 @@ interface OperationMethods {
|
|
|
2757
3024
|
data?: Paths.SearchIds.RequestBody,
|
|
2758
3025
|
config?: AxiosRequestConfig
|
|
2759
3026
|
): OperationResponse<Paths.SearchIds.Responses.$200>
|
|
3027
|
+
/**
|
|
3028
|
+
* getAssigneeWorkload - getAssigneeWorkload
|
|
3029
|
+
*
|
|
3030
|
+
* Return the open-thread workload for a set of user ids.
|
|
3031
|
+
*
|
|
3032
|
+
* For each requested user id, returns the number of *open* threads assigned
|
|
3033
|
+
* directly to that user — matching what the user sees in their central-inbox
|
|
3034
|
+
* open view: in inbox, not trashed, not done, and excluding notification-only
|
|
3035
|
+
* and spam threads.
|
|
3036
|
+
*
|
|
3037
|
+
* Only threads assigned directly to a user are counted; threads assigned to a
|
|
3038
|
+
* group the user belongs to are not. Intended for assignment load-balancing
|
|
3039
|
+
* (e.g. even-distribution automations) that need a consistent, inbox-aligned
|
|
3040
|
+
* workload per user.
|
|
3041
|
+
*
|
|
3042
|
+
*/
|
|
3043
|
+
'getAssigneeWorkload'(
|
|
3044
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3045
|
+
data?: Paths.GetAssigneeWorkload.RequestBody,
|
|
3046
|
+
config?: AxiosRequestConfig
|
|
3047
|
+
): OperationResponse<Paths.GetAssigneeWorkload.Responses.$200>
|
|
2760
3048
|
/**
|
|
2761
3049
|
* updateThread - updateThread
|
|
2762
3050
|
*
|
|
@@ -3336,6 +3624,29 @@ interface PathsDictionary {
|
|
|
3336
3624
|
config?: AxiosRequestConfig
|
|
3337
3625
|
): OperationResponse<Paths.SearchIds.Responses.$200>
|
|
3338
3626
|
}
|
|
3627
|
+
['/v2/message/threads:workload']: {
|
|
3628
|
+
/**
|
|
3629
|
+
* getAssigneeWorkload - getAssigneeWorkload
|
|
3630
|
+
*
|
|
3631
|
+
* Return the open-thread workload for a set of user ids.
|
|
3632
|
+
*
|
|
3633
|
+
* For each requested user id, returns the number of *open* threads assigned
|
|
3634
|
+
* directly to that user — matching what the user sees in their central-inbox
|
|
3635
|
+
* open view: in inbox, not trashed, not done, and excluding notification-only
|
|
3636
|
+
* and spam threads.
|
|
3637
|
+
*
|
|
3638
|
+
* Only threads assigned directly to a user are counted; threads assigned to a
|
|
3639
|
+
* group the user belongs to are not. Intended for assignment load-balancing
|
|
3640
|
+
* (e.g. even-distribution automations) that need a consistent, inbox-aligned
|
|
3641
|
+
* workload per user.
|
|
3642
|
+
*
|
|
3643
|
+
*/
|
|
3644
|
+
'post'(
|
|
3645
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
3646
|
+
data?: Paths.GetAssigneeWorkload.RequestBody,
|
|
3647
|
+
config?: AxiosRequestConfig
|
|
3648
|
+
): OperationResponse<Paths.GetAssigneeWorkload.Responses.$200>
|
|
3649
|
+
}
|
|
3339
3650
|
['/v1/message/threads']: {
|
|
3340
3651
|
/**
|
|
3341
3652
|
* updateThread - updateThread
|
|
@@ -3783,8 +4094,10 @@ interface PathsDictionary {
|
|
|
3783
4094
|
|
|
3784
4095
|
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
3785
4096
|
|
|
3786
|
-
|
|
3787
4097
|
type Address = Components.Schemas.Address;
|
|
4098
|
+
type AssigneeWorkload = Components.Schemas.AssigneeWorkload;
|
|
4099
|
+
type AssigneeWorkloadParams = Components.Schemas.AssigneeWorkloadParams;
|
|
4100
|
+
type AssigneeWorkloadResults = Components.Schemas.AssigneeWorkloadResults;
|
|
3788
4101
|
type AttachmentsRelation = Components.Schemas.AttachmentsRelation;
|
|
3789
4102
|
type BaseEntity = Components.Schemas.BaseEntity;
|
|
3790
4103
|
type BulkActionsPayload = Components.Schemas.BulkActionsPayload;
|
|
@@ -3808,4 +4121,4 @@ type ThreadTimeline = Components.Schemas.ThreadTimeline;
|
|
|
3808
4121
|
type TimelineEvent = Components.Schemas.TimelineEvent;
|
|
3809
4122
|
type TimelineEventData = Components.Schemas.TimelineEventData;
|
|
3810
4123
|
|
|
3811
|
-
export { type Address as A, type BaseEntity as B, type Client as C, type ErrorResponse as E, type FieldsParam as F, type Message as M, type OperationMethods as O, Paths as P, type ReadMessagePayload as R, type SearchIDParams as S, type Thread as T, Components as a, type PathsDictionary as b, type
|
|
4124
|
+
export { type Address as A, type BaseEntity as B, type Client as C, type ErrorResponse as E, type FieldsParam as F, type Message as M, type OperationMethods as O, Paths as P, type ReadMessagePayload as R, type SearchIDParams as S, type Thread as T, Components as a, type PathsDictionary as b, type AssigneeWorkload as c, type AssigneeWorkloadParams as d, type AssigneeWorkloadResults as e, type AttachmentsRelation as f, type BulkActionsPayload as g, type BulkActionsPayloadWithScopes as h, type File as i, type MessageRequestParams as j, type MessageV2 as k, type MoveThreadPayload as l, type ReadingScope as m, type SearchParams as n, type SearchParamsV2 as o, type ThreadDoneEvent as p, type ThreadOpenEvent as q, type ThreadTimeline as r, type TimelineEvent as s, type TimelineEventData as t };
|