@epilot/sdk 2.1.0-rc.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/app.json +38 -0
- package/definitions/automation.json +2 -37
- package/definitions/blueprint-manifest-runtime.json +1 -1
- package/definitions/blueprint-manifest.json +115 -1
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +279 -42
- package/definitions/data-management.json +10 -0
- package/definitions/email-template.json +25 -3
- package/definitions/entity.json +205 -3
- package/definitions/erp-integration-runtime.json +1 -1
- package/definitions/erp-integration.json +472 -13
- package/definitions/journey.json +257 -12
- package/definitions/kanban.json +630 -78
- package/definitions/organization-runtime.json +1 -1
- package/definitions/organization.json +614 -51
- package/definitions/workflow.json +40 -0
- package/dist/README-VG67PX4R.js +7 -0
- package/dist/README-W4B35MRN.cjs +7 -0
- package/dist/_index-AMVZBT2K.cjs +99 -0
- package/dist/_index-S6LFD3ER.js +99 -0
- package/dist/access-token-6BJDZSFE.cjs +7 -0
- package/dist/access-token-GSQZLDXR.js +7 -0
- package/dist/address-HA4RMRNQ.cjs +7 -0
- package/dist/address-QVJUGMOG.js +7 -0
- package/dist/address-suggestions-74244BAJ.js +7 -0
- package/dist/address-suggestions-IUQMYF27.cjs +7 -0
- package/dist/ai-agents-IZWFEUSH.js +7 -0
- package/dist/ai-agents-PWHKNRCX.cjs +7 -0
- package/dist/apis/access-token.cjs +10 -13
- package/dist/apis/access-token.js +7 -10
- package/dist/apis/address-suggestions.cjs +10 -13
- package/dist/apis/address-suggestions.js +7 -10
- package/dist/apis/address.cjs +10 -13
- package/dist/apis/address.js +7 -10
- package/dist/apis/ai-agents.cjs +10 -13
- package/dist/apis/ai-agents.js +7 -10
- package/dist/apis/app.cjs +10 -13
- package/dist/apis/app.js +7 -10
- package/dist/apis/audit-logs.cjs +10 -13
- package/dist/apis/audit-logs.js +7 -10
- package/dist/apis/automation.cjs +10 -13
- package/dist/apis/automation.js +7 -10
- package/dist/apis/billing.cjs +10 -13
- package/dist/apis/billing.js +7 -10
- package/dist/apis/blueprint-manifest.cjs +10 -13
- package/dist/apis/blueprint-manifest.js +7 -10
- package/dist/apis/consent.cjs +10 -13
- package/dist/apis/consent.js +7 -10
- package/dist/apis/customer-portal.cjs +10 -13
- package/dist/apis/customer-portal.js +7 -10
- package/dist/apis/dashboard.cjs +10 -13
- package/dist/apis/dashboard.js +7 -10
- package/dist/apis/data-management.cjs +10 -13
- package/dist/apis/data-management.js +7 -10
- package/dist/apis/deduplication.cjs +10 -13
- package/dist/apis/deduplication.js +7 -10
- package/dist/apis/design.cjs +10 -13
- package/dist/apis/design.js +7 -10
- package/dist/apis/document.cjs +10 -13
- package/dist/apis/document.js +7 -10
- package/dist/apis/email-settings.cjs +10 -13
- package/dist/apis/email-settings.js +7 -10
- package/dist/apis/email-template.cjs +10 -13
- package/dist/apis/email-template.js +7 -10
- package/dist/apis/entity-mapping.cjs +10 -13
- package/dist/apis/entity-mapping.js +7 -10
- package/dist/apis/entity.cjs +10 -13
- package/dist/apis/entity.js +7 -10
- package/dist/apis/environments.cjs +10 -13
- package/dist/apis/environments.js +7 -10
- package/dist/apis/erp-integration.cjs +10 -13
- package/dist/apis/erp-integration.js +7 -10
- package/dist/apis/event-catalog.cjs +10 -13
- package/dist/apis/event-catalog.js +7 -10
- package/dist/apis/file.cjs +10 -13
- package/dist/apis/file.js +7 -10
- package/dist/apis/iban.cjs +10 -13
- package/dist/apis/iban.js +7 -10
- package/dist/apis/journey.cjs +10 -13
- package/dist/apis/journey.js +7 -10
- package/dist/apis/kanban.cjs +10 -13
- package/dist/apis/kanban.js +7 -10
- package/dist/apis/message.cjs +10 -13
- package/dist/apis/message.js +7 -10
- package/dist/apis/metering.cjs +10 -13
- package/dist/apis/metering.js +7 -10
- package/dist/apis/notes.cjs +10 -13
- package/dist/apis/notes.js +7 -10
- package/dist/apis/notification.cjs +10 -13
- package/dist/apis/notification.js +7 -10
- package/dist/apis/organization.cjs +10 -13
- package/dist/apis/organization.d.cts +2 -2
- package/dist/apis/organization.d.ts +2 -2
- package/dist/apis/organization.js +7 -10
- package/dist/apis/partner-directory.cjs +10 -13
- package/dist/apis/partner-directory.js +7 -10
- package/dist/apis/permissions.cjs +10 -13
- package/dist/apis/permissions.js +7 -10
- package/dist/apis/pricing-tier.cjs +10 -13
- package/dist/apis/pricing-tier.js +7 -10
- package/dist/apis/pricing.cjs +10 -13
- package/dist/apis/pricing.js +7 -10
- package/dist/apis/purpose.cjs +10 -13
- package/dist/apis/purpose.js +7 -10
- package/dist/apis/sandbox.cjs +10 -13
- package/dist/apis/sandbox.js +7 -10
- package/dist/apis/submission.cjs +10 -13
- package/dist/apis/submission.js +7 -10
- package/dist/apis/targeting.cjs +10 -13
- package/dist/apis/targeting.js +7 -10
- package/dist/apis/template-variables.cjs +10 -13
- package/dist/apis/template-variables.js +7 -10
- package/dist/apis/user.cjs +10 -13
- package/dist/apis/user.js +7 -10
- package/dist/apis/validation-rules.cjs +10 -13
- package/dist/apis/validation-rules.js +7 -10
- package/dist/apis/webhooks.cjs +10 -13
- package/dist/apis/webhooks.js +7 -10
- package/dist/apis/workflow-definition.cjs +10 -13
- package/dist/apis/workflow-definition.js +7 -10
- package/dist/apis/workflow.cjs +10 -13
- package/dist/apis/workflow.js +7 -10
- package/dist/app-IKHWU222.cjs +7 -0
- package/dist/app-VLM3SWKA.js +7 -0
- package/dist/audit-logs-5VXHOQ7S.js +7 -0
- package/dist/audit-logs-D2LFUA2R.cjs +7 -0
- package/dist/automation-3HGCK725.cjs +7 -0
- package/dist/automation-72VGEJCY.js +7 -0
- package/dist/billing-DUWDISHP.cjs +7 -0
- package/dist/billing-IPALEAG2.js +7 -0
- package/dist/blueprint-manifest-CXSCRQ5X.js +7 -0
- package/dist/blueprint-manifest-SHNZPK5O.cjs +7 -0
- package/dist/chunk-2HOJWFQ4.js +14 -0
- package/dist/chunk-372VUPHN.js +14 -0
- package/dist/chunk-3HJEWWPS.cjs +14 -0
- package/dist/chunk-3N67SSL3.js +14 -0
- package/dist/chunk-3XEP56SV.cjs +204 -0
- package/dist/chunk-3ZZ57K3S.cjs +14 -0
- package/dist/chunk-4SWC43JO.cjs +14 -0
- package/dist/chunk-4VFQTSJQ.js +14 -0
- package/dist/chunk-57QIBYDN.js +14 -0
- package/dist/chunk-5SNJAD6F.cjs +14 -0
- package/dist/chunk-73H6TVKN.js +14 -0
- package/dist/chunk-A6JOROUC.cjs +14 -0
- package/dist/chunk-AJKH25H2.cjs +14 -0
- package/dist/chunk-ARWMTXJV.cjs +14 -0
- package/dist/chunk-B3ZGAG7B.js +14 -0
- package/dist/chunk-BH5ZXK4J.cjs +14 -0
- package/dist/chunk-BWFXLUK5.cjs +14 -0
- package/dist/chunk-C6UTZEHH.js +14 -0
- package/dist/chunk-CPKBR34V.js +14 -0
- package/dist/chunk-CWSHYFVZ.js +14 -0
- package/dist/chunk-DJKSULPK.js +14 -0
- package/dist/chunk-DNJ54L2G.js +14 -0
- package/dist/chunk-DY2D2IW5.cjs +14 -0
- package/dist/chunk-E26ZO7QM.cjs +14 -0
- package/dist/chunk-EBCHCYUO.js +14 -0
- package/dist/chunk-EPAIOB5U.cjs +14 -0
- package/dist/chunk-EQZMT2HF.cjs +14 -0
- package/dist/chunk-F376L6PP.cjs +14 -0
- package/dist/chunk-F472YLJG.cjs +14 -0
- package/dist/chunk-FXOX3X7E.cjs +14 -0
- package/dist/chunk-G2REP2VZ.cjs +14 -0
- package/dist/chunk-GLO477NZ.js +14 -0
- package/dist/chunk-H4VSK4KF.js +14 -0
- package/dist/chunk-HPSGM6QP.js +14 -0
- package/dist/chunk-HPYHWTTA.cjs +14 -0
- package/dist/chunk-IH4CMOML.js +14 -0
- package/dist/chunk-IMT3IE5M.cjs +14 -0
- package/dist/chunk-IP2WWEOU.js +14 -0
- package/dist/chunk-IS2VB342.js +14 -0
- package/dist/chunk-ITX53XAZ.js +14 -0
- package/dist/chunk-JXBXDTFG.cjs +14 -0
- package/dist/chunk-K62XK7KU.js +14 -0
- package/dist/chunk-KA3TGFJP.js +14 -0
- package/dist/chunk-KBOVBUBM.js +14 -0
- package/dist/chunk-KPGC2D6E.js +14 -0
- package/dist/chunk-KSXTBGIV.js +14 -0
- package/dist/chunk-LCIJ4TJ4.cjs +14 -0
- package/dist/chunk-LQOLYXGQ.cjs +14 -0
- package/dist/chunk-LSIWCIQV.js +14 -0
- package/dist/chunk-MHNSZ4HE.js +14 -0
- package/dist/chunk-MKX4CKAB.cjs +14 -0
- package/dist/chunk-MRTAFRO7.js +14 -0
- package/dist/chunk-MRZ7LGKZ.js +14 -0
- package/dist/chunk-MSASBR2Y.js +14 -0
- package/dist/chunk-NAWLLC3T.cjs +14 -0
- package/dist/chunk-NJK5F5TF.cjs +21 -0
- package/dist/chunk-NLSZVGHK.cjs +14 -0
- package/dist/chunk-O4LRVGOY.js +14 -0
- package/dist/chunk-OG2DMGU6.cjs +14 -0
- package/dist/chunk-OGQKJTXF.js +14 -0
- package/dist/chunk-PETLAONH.js +14 -0
- package/dist/chunk-PVSS2WPM.cjs +14 -0
- package/dist/chunk-PXITFTJA.cjs +14 -0
- package/dist/chunk-QDVPPRWI.cjs +14 -0
- package/dist/chunk-QKERXNJJ.cjs +14 -0
- package/dist/chunk-QLML3IP5.cjs +14 -0
- package/dist/chunk-QVAJ5JP4.js +14 -0
- package/dist/chunk-RD7E4OSJ.cjs +14 -0
- package/dist/chunk-RWSA3LXE.cjs +14 -0
- package/dist/chunk-RXSS67VI.cjs +14 -0
- package/dist/chunk-S3ZNESMC.cjs +14 -0
- package/dist/chunk-S7NDMDRX.js +14 -0
- package/dist/chunk-SK3VYIZ6.cjs +14 -0
- package/dist/chunk-SMGHAG5C.cjs +14 -0
- package/dist/chunk-T46LODOF.js +14 -0
- package/dist/chunk-TIJWJVKZ.js +14 -0
- package/dist/chunk-TLWCYLNA.js +14 -0
- package/dist/chunk-TRJLYZHD.js +14 -0
- package/dist/chunk-UKKJMCNH.js +14 -0
- package/dist/chunk-ULBEEHG4.js +204 -0
- package/dist/chunk-VGTUK3QD.cjs +14 -0
- package/dist/chunk-VQ7R36AC.js +14 -0
- package/dist/chunk-VVQB5W7U.cjs +14 -0
- package/dist/chunk-VVVATFGK.cjs +14 -0
- package/dist/chunk-WMTYO5OX.cjs +14 -0
- package/dist/chunk-WOSSSFXB.js +14 -0
- package/dist/chunk-WOXXNKTE.js +14 -0
- package/dist/chunk-XKI2OAYV.cjs +14 -0
- package/dist/chunk-XR4QF6KQ.cjs +14 -0
- package/dist/chunk-XYHTQ523.cjs +14 -0
- package/dist/chunk-XZYZLSUO.cjs +14 -0
- package/dist/chunk-YPSWSI3M.js +21 -0
- package/dist/chunk-YYBIU5BQ.js +14 -0
- package/dist/chunk-YZA5WZUS.js +14 -0
- package/dist/chunk-Z4LUE424.cjs +14 -0
- package/dist/chunk-ZV6XYUXS.js +14 -0
- package/dist/consent-CS2ZBZX4.cjs +7 -0
- package/dist/consent-NNYHF2N4.js +7 -0
- package/dist/customer-portal-D3SLPAHZ.js +7 -0
- package/dist/customer-portal-UR3GN4VU.cjs +7 -0
- package/dist/dashboard-UHYR5RTY.cjs +7 -0
- package/dist/dashboard-UTPGXFW5.js +7 -0
- package/dist/data-management-QH2IJ5QV.js +7 -0
- package/dist/data-management-TEFRLGSU.cjs +7 -0
- package/dist/deduplication-ECVAZVVA.cjs +7 -0
- package/dist/deduplication-GYIST22B.js +7 -0
- package/dist/design-KUVXMFFK.cjs +7 -0
- package/dist/design-YKBXRW5C.js +7 -0
- package/dist/document-CY2A2OE7.js +7 -0
- package/dist/document-RYQ7MF6U.cjs +7 -0
- package/dist/email-settings-TQ5GGDYG.js +7 -0
- package/dist/email-settings-TQC34GST.cjs +7 -0
- package/dist/email-template-M2VVL4TI.cjs +7 -0
- package/dist/email-template-WYROV3UG.js +7 -0
- package/dist/entity-FA6PZX6S.js +7 -0
- package/dist/entity-IX5NSHPX.cjs +7 -0
- package/dist/entity-mapping-7J3IAGKQ.js +7 -0
- package/dist/entity-mapping-ZNMFCUKK.cjs +7 -0
- package/dist/environments-E3X6NYGX.js +7 -0
- package/dist/environments-P2JS4F5N.cjs +7 -0
- package/dist/erp-integration-EP2XFEH5.js +7 -0
- package/dist/erp-integration-NNV72VFI.cjs +7 -0
- package/dist/event-catalog-C45ISVMP.cjs +7 -0
- package/dist/event-catalog-D7VJ7WRS.js +7 -0
- package/dist/file-UOWBTDIU.cjs +7 -0
- package/dist/file-XSN3NAVZ.js +7 -0
- package/dist/iban-24GHLFDB.cjs +7 -0
- package/dist/iban-LDKYDVQV.js +7 -0
- package/dist/index.cjs +199 -58
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +197 -56
- package/dist/journey-7CKX67M7.js +7 -0
- package/dist/journey-EUZ6MVHG.cjs +7 -0
- package/dist/kanban-CHTH2ZSY.cjs +7 -0
- package/dist/kanban-HI6LL5WY.js +7 -0
- package/dist/message-3XZLJR6R.cjs +7 -0
- package/dist/message-ZNMCS5YH.js +7 -0
- package/dist/metering-DZNZPPY6.cjs +7 -0
- package/dist/metering-KOSCPPKB.js +7 -0
- package/dist/notes-3AO5GXIT.js +7 -0
- package/dist/notes-MPWOQC5J.cjs +7 -0
- package/dist/notification-PZOCUYD5.cjs +7 -0
- package/dist/notification-VWDZRSFZ.js +7 -0
- package/dist/organization-RARYYG2E.cjs +7 -0
- package/dist/organization-ZERPH2IH.js +7 -0
- package/dist/{organization.d-Bd2Hmk8v.d.cts → organization.d-DqwnNxMg.d.cts} +34 -7
- package/dist/{organization.d-Bd2Hmk8v.d.ts → organization.d-DqwnNxMg.d.ts} +34 -7
- package/dist/partner-directory-2XMPQWWX.js +7 -0
- package/dist/partner-directory-WHNTKQ5E.cjs +7 -0
- package/dist/permissions-4T3GFNB4.js +7 -0
- package/dist/permissions-FGBIJNN7.cjs +7 -0
- package/dist/pricing-4Z4TOETA.cjs +7 -0
- package/dist/pricing-C65DTZSX.js +7 -0
- package/dist/pricing-tier-NI35WOUP.cjs +7 -0
- package/dist/pricing-tier-VUOFK5Q7.js +7 -0
- package/dist/purpose-AKOEUHZ4.cjs +7 -0
- package/dist/purpose-RBRV3AQZ.js +7 -0
- package/dist/sandbox-2KN4X66E.cjs +7 -0
- package/dist/sandbox-L2SOOGGR.js +7 -0
- package/dist/submission-7BISSPO6.js +7 -0
- package/dist/submission-Q24BU4GS.cjs +7 -0
- package/dist/targeting-EYGYZD6M.cjs +7 -0
- package/dist/targeting-GEJTJN5Z.js +7 -0
- package/dist/template-variables-OAYS2E3G.cjs +1148 -0
- package/dist/template-variables-VKDJJZUT.js +1148 -0
- package/dist/user-EIEOI3OG.js +7 -0
- package/dist/user-NJJ7XVKB.cjs +7 -0
- package/dist/validation-rules-P6F5P73P.js +7 -0
- package/dist/validation-rules-VDU3CIZV.cjs +7 -0
- package/dist/webhooks-I7JWU34X.cjs +7 -0
- package/dist/webhooks-WPLEHVPX.js +7 -0
- package/dist/workflow-3LLURW3H.js +7 -0
- package/dist/workflow-RAGQDYXT.cjs +7 -0
- package/dist/workflow-definition-B6ELOZUR.cjs +7 -0
- package/dist/workflow-definition-D24CRCK2.js +7 -0
- package/docs/access-token.md +440 -0
- package/docs/address-suggestions.md +256 -0
- package/docs/address.md +284 -0
- package/docs/ai-agents.md +1891 -0
- package/docs/app.md +3388 -0
- package/docs/audit-logs.md +242 -0
- package/docs/automation.md +4044 -0
- package/docs/billing.md +783 -0
- package/docs/blueprint-manifest.md +3234 -0
- package/docs/consent.md +213 -0
- package/docs/customer-portal.md +11399 -0
- package/docs/dashboard.md +640 -0
- package/docs/data-management.md +883 -0
- package/docs/deduplication.md +135 -0
- package/docs/design.md +1273 -0
- package/docs/document.md +590 -0
- package/docs/email-settings.md +1544 -0
- package/docs/email-template.md +1197 -0
- package/docs/entity-mapping.md +2864 -0
- package/docs/entity.md +9595 -0
- package/docs/environments.md +259 -0
- package/docs/erp-integration.md +4572 -0
- package/docs/event-catalog.md +835 -0
- package/docs/file.md +1453 -0
- package/docs/iban.md +61 -0
- package/docs/journey.md +2268 -0
- package/docs/kanban.md +882 -0
- package/docs/message.md +2122 -0
- package/docs/metering.md +1431 -0
- package/docs/notes.md +670 -0
- package/docs/notification.md +1207 -0
- package/docs/organization.md +733 -0
- package/docs/partner-directory.md +1197 -0
- package/docs/permissions.md +1047 -0
- package/docs/pricing-tier.md +81 -0
- package/docs/pricing.md +5923 -0
- package/docs/purpose.md +283 -0
- package/docs/sandbox.md +389 -0
- package/docs/submission.md +195 -0
- package/docs/targeting.md +959 -0
- package/docs/template-variables.md +1141 -0
- package/docs/user.md +2555 -0
- package/docs/validation-rules.md +1597 -0
- package/docs/webhooks.md +996 -0
- package/docs/workflow-definition.md +3842 -0
- package/docs/workflow.md +4465 -0
- package/package.json +3 -2
- package/dist/chunk-XE25WERA.js +0 -125
- package/dist/chunk-XEQMAKGA.cjs +0 -125
|
@@ -0,0 +1,1197 @@
|
|
|
1
|
+
# Email template API
|
|
2
|
+
|
|
3
|
+
- **Base URL:** `https://email-template.sls.epilot.io`
|
|
4
|
+
- **Full API Docs:** [https://docs.epilot.io/api/email-template](https://docs.epilot.io/api/email-template)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { epilot } from '@epilot/sdk'
|
|
10
|
+
|
|
11
|
+
epilot.authorize(() => '<token>')
|
|
12
|
+
const { data } = await epilot.emailTemplate.saveTemplate(...)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Tree-shakeable import
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getClient, authorize } from '@epilot/sdk/email-template'
|
|
19
|
+
|
|
20
|
+
const emailTemplateClient = getClient()
|
|
21
|
+
authorize(emailTemplateClient, () => '<token>')
|
|
22
|
+
const { data } = await emailTemplateClient.saveTemplate(...)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
**Email templates**
|
|
28
|
+
- [`saveTemplate`](#savetemplate)
|
|
29
|
+
- [`getTemplateDetail`](#gettemplatedetail)
|
|
30
|
+
- [`updateTemplateDetail`](#updatetemplatedetail)
|
|
31
|
+
- [`bulkSendMessage`](#bulksendmessage)
|
|
32
|
+
- [`revertToOriginalTemplate`](#reverttooriginaltemplate)
|
|
33
|
+
|
|
34
|
+
**Variables**
|
|
35
|
+
- [`replaceVariablesAsync`](#replacevariablesasync)
|
|
36
|
+
|
|
37
|
+
**Schemas**
|
|
38
|
+
- [`BaseEntity`](#baseentity)
|
|
39
|
+
- [`EmailTemplateRequest`](#emailtemplaterequest)
|
|
40
|
+
- [`EmailTemplateEntity`](#emailtemplateentity)
|
|
41
|
+
- [`Attachment`](#attachment)
|
|
42
|
+
- [`From`](#from)
|
|
43
|
+
- [`To`](#to)
|
|
44
|
+
- [`PresignedRequest`](#presignedrequest)
|
|
45
|
+
- [`PresignedResponse`](#presignedresponse)
|
|
46
|
+
- [`AttachmentResponse`](#attachmentresponse)
|
|
47
|
+
- [`UserResponse`](#userresponse)
|
|
48
|
+
- [`VariableParameters`](#variableparameters)
|
|
49
|
+
- [`TemplateType`](#templatetype)
|
|
50
|
+
- [`EmailTemplateResponse`](#emailtemplateresponse)
|
|
51
|
+
- [`AsyncEmailTemplateResponse`](#asyncemailtemplateresponse)
|
|
52
|
+
- [`SkipCreatingEntities`](#skipcreatingentities)
|
|
53
|
+
- [`CompleteThread`](#completethread)
|
|
54
|
+
- [`BulkSendMessageRequest`](#bulksendmessagerequest)
|
|
55
|
+
- [`BulkSendMessageRequestWithQuery`](#bulksendmessagerequestwithquery)
|
|
56
|
+
- [`CustomVariables`](#customvariables)
|
|
57
|
+
- [`BulkSendMessageJob`](#bulksendmessagejob)
|
|
58
|
+
- [`CreateSystemTemplatesReq`](#createsystemtemplatesreq)
|
|
59
|
+
- [`CreateSystemTemplatesResp`](#createsystemtemplatesresp)
|
|
60
|
+
- [`OrgId`](#orgid)
|
|
61
|
+
- [`CreatedBy`](#createdby)
|
|
62
|
+
- [`CreatedAt`](#createdat)
|
|
63
|
+
- [`UpdatedAt`](#updatedat)
|
|
64
|
+
- [`ApprovedAt`](#approvedat)
|
|
65
|
+
- [`ApproveAction`](#approveaction)
|
|
66
|
+
- [`TaskToken`](#tasktoken)
|
|
67
|
+
|
|
68
|
+
### `saveTemplate`
|
|
69
|
+
|
|
70
|
+
Create or update a template. If `id` is provided, it will update the template.
|
|
71
|
+
|
|
72
|
+
`POST /v1/email-template/templates`
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
const { data } = await client.saveTemplate(
|
|
76
|
+
null,
|
|
77
|
+
{
|
|
78
|
+
_id: 'cd7809ba-a111-4dd9-8d15-18eb4de0faed',
|
|
79
|
+
_tags: ['template'],
|
|
80
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
81
|
+
_purpose: ['a0ec23ac-12f8-4d89-9a63-91cba3787f2a', '310cd388-2f15-4b5b-8f98-ca14c1e03304'],
|
|
82
|
+
name: 'Order confirmation',
|
|
83
|
+
brand_id: 0,
|
|
84
|
+
from: {
|
|
85
|
+
name: 'epilot',
|
|
86
|
+
email: 'no-reply@epilot.cloud'
|
|
87
|
+
},
|
|
88
|
+
to: [
|
|
89
|
+
{
|
|
90
|
+
name: 'Ny Huynh',
|
|
91
|
+
email: 'ny.huynh@axonactive.com'
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
cc: [
|
|
95
|
+
{
|
|
96
|
+
name: 'Ny Huynh',
|
|
97
|
+
email: 'ny.huynh@axonactive.com'
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
bcc: [
|
|
101
|
+
{
|
|
102
|
+
name: 'Ny Huynh',
|
|
103
|
+
email: 'ny.huynh@axonactive.com'
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
subject: 'We have received your order!',
|
|
107
|
+
body: 'Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly',
|
|
108
|
+
attachments: [
|
|
109
|
+
{
|
|
110
|
+
cid: 'f820ce3b-07b0-45ae-bcc6-babb2f53f79f',
|
|
111
|
+
filename: 'Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
112
|
+
size: 451349,
|
|
113
|
+
content_type: 'application/pdf',
|
|
114
|
+
url: 'https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
115
|
+
bucket: '893487340562-message-attachment',
|
|
116
|
+
object_key: 'attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
117
|
+
inline: false,
|
|
118
|
+
send_as_link: false,
|
|
119
|
+
type: 'Document template',
|
|
120
|
+
copy_to_message: true
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
file: {
|
|
124
|
+
$relation: [
|
|
125
|
+
{}
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
system_template: false,
|
|
129
|
+
created_by: 1234,
|
|
130
|
+
updated_by: 1234,
|
|
131
|
+
json_template: 'string'
|
|
132
|
+
},
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary>Response</summary>
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
142
|
+
"_title": "string",
|
|
143
|
+
"_org": "206801",
|
|
144
|
+
"_schema": "message",
|
|
145
|
+
"_tags": ["automatic email template"],
|
|
146
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
147
|
+
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
148
|
+
"_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"],
|
|
149
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
150
|
+
"name": "Order confirmation",
|
|
151
|
+
"brand_id": 0,
|
|
152
|
+
"from": {
|
|
153
|
+
"name": "epilot",
|
|
154
|
+
"email": "no-reply@epilot.cloud"
|
|
155
|
+
},
|
|
156
|
+
"to": [
|
|
157
|
+
{
|
|
158
|
+
"name": "Ny Huynh",
|
|
159
|
+
"email": "ny.huynh@axonactive.com"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"cc": [
|
|
163
|
+
{
|
|
164
|
+
"name": "Ny Huynh",
|
|
165
|
+
"email": "ny.huynh@axonactive.com"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"bcc": [
|
|
169
|
+
{
|
|
170
|
+
"name": "Ny Huynh",
|
|
171
|
+
"email": "ny.huynh@axonactive.com"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"subject": "We have received your order!",
|
|
175
|
+
"body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
|
|
176
|
+
"attachments": [
|
|
177
|
+
{
|
|
178
|
+
"cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
|
|
179
|
+
"filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
180
|
+
"size": 451349,
|
|
181
|
+
"content_type": "application/pdf",
|
|
182
|
+
"url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
183
|
+
"bucket": "893487340562-message-attachment",
|
|
184
|
+
"object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
185
|
+
"inline": false,
|
|
186
|
+
"send_as_link": false,
|
|
187
|
+
"type": "Document template",
|
|
188
|
+
"copy_to_message": true
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"file": {
|
|
192
|
+
"$relation": [
|
|
193
|
+
{}
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"created_by": 1234,
|
|
197
|
+
"updated_by": 1234,
|
|
198
|
+
"json_template": "string",
|
|
199
|
+
"system_template": false
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
### `getTemplateDetail`
|
|
208
|
+
|
|
209
|
+
Get email template by ID
|
|
210
|
+
|
|
211
|
+
`GET /v1/email-template/templates/{id}`
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
const { data } = await client.getTemplateDetail({
|
|
215
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
216
|
+
})
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
<details>
|
|
220
|
+
<summary>Response</summary>
|
|
221
|
+
|
|
222
|
+
```json
|
|
223
|
+
{
|
|
224
|
+
"entity": {
|
|
225
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
226
|
+
"_title": "string",
|
|
227
|
+
"_org": "206801",
|
|
228
|
+
"_schema": "message",
|
|
229
|
+
"_tags": ["automatic email template"],
|
|
230
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
231
|
+
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
232
|
+
"_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"],
|
|
233
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
234
|
+
"name": "Order confirmation",
|
|
235
|
+
"brand_id": 0,
|
|
236
|
+
"from": {
|
|
237
|
+
"name": "epilot",
|
|
238
|
+
"email": "no-reply@epilot.cloud"
|
|
239
|
+
},
|
|
240
|
+
"to": [
|
|
241
|
+
{
|
|
242
|
+
"name": "Ny Huynh",
|
|
243
|
+
"email": "ny.huynh@axonactive.com"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"cc": [
|
|
247
|
+
{
|
|
248
|
+
"name": "Ny Huynh",
|
|
249
|
+
"email": "ny.huynh@axonactive.com"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"bcc": [
|
|
253
|
+
{
|
|
254
|
+
"name": "Ny Huynh",
|
|
255
|
+
"email": "ny.huynh@axonactive.com"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
"subject": "We have received your order!",
|
|
259
|
+
"body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
|
|
260
|
+
"attachments": [
|
|
261
|
+
{
|
|
262
|
+
"cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
|
|
263
|
+
"filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
264
|
+
"size": 451349,
|
|
265
|
+
"content_type": "application/pdf",
|
|
266
|
+
"url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
267
|
+
"bucket": "893487340562-message-attachment",
|
|
268
|
+
"object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
269
|
+
"inline": false,
|
|
270
|
+
"send_as_link": false,
|
|
271
|
+
"type": "Document template",
|
|
272
|
+
"copy_to_message": true
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"file": {
|
|
276
|
+
"$relation": [
|
|
277
|
+
{}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
"created_by": 1234,
|
|
281
|
+
"updated_by": 1234,
|
|
282
|
+
"json_template": "string",
|
|
283
|
+
"system_template": false
|
|
284
|
+
},
|
|
285
|
+
"relations": [
|
|
286
|
+
{}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
</details>
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### `updateTemplateDetail`
|
|
296
|
+
|
|
297
|
+
Update email template by ID
|
|
298
|
+
|
|
299
|
+
`PUT /v1/email-template/templates/{id}`
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
const { data } = await client.updateTemplateDetail(
|
|
303
|
+
{
|
|
304
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
_id: 'cd7809ba-a111-4dd9-8d15-18eb4de0faed',
|
|
308
|
+
_tags: ['template'],
|
|
309
|
+
_manifest: ['123e4567-e89b-12d3-a456-426614174000'],
|
|
310
|
+
_purpose: ['a0ec23ac-12f8-4d89-9a63-91cba3787f2a', '310cd388-2f15-4b5b-8f98-ca14c1e03304'],
|
|
311
|
+
name: 'Order confirmation',
|
|
312
|
+
brand_id: 0,
|
|
313
|
+
from: {
|
|
314
|
+
name: 'epilot',
|
|
315
|
+
email: 'no-reply@epilot.cloud'
|
|
316
|
+
},
|
|
317
|
+
to: [
|
|
318
|
+
{
|
|
319
|
+
name: 'Ny Huynh',
|
|
320
|
+
email: 'ny.huynh@axonactive.com'
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
cc: [
|
|
324
|
+
{
|
|
325
|
+
name: 'Ny Huynh',
|
|
326
|
+
email: 'ny.huynh@axonactive.com'
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
bcc: [
|
|
330
|
+
{
|
|
331
|
+
name: 'Ny Huynh',
|
|
332
|
+
email: 'ny.huynh@axonactive.com'
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
subject: 'We have received your order!',
|
|
336
|
+
body: 'Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly',
|
|
337
|
+
attachments: [
|
|
338
|
+
{
|
|
339
|
+
cid: 'f820ce3b-07b0-45ae-bcc6-babb2f53f79f',
|
|
340
|
+
filename: 'Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
341
|
+
size: 451349,
|
|
342
|
+
content_type: 'application/pdf',
|
|
343
|
+
url: 'https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
344
|
+
bucket: '893487340562-message-attachment',
|
|
345
|
+
object_key: 'attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf',
|
|
346
|
+
inline: false,
|
|
347
|
+
send_as_link: false,
|
|
348
|
+
type: 'Document template',
|
|
349
|
+
copy_to_message: true
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
file: {
|
|
353
|
+
$relation: [
|
|
354
|
+
{}
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
system_template: false,
|
|
358
|
+
created_by: 1234,
|
|
359
|
+
updated_by: 1234,
|
|
360
|
+
json_template: 'string'
|
|
361
|
+
},
|
|
362
|
+
)
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
<details>
|
|
366
|
+
<summary>Response</summary>
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
371
|
+
"_title": "string",
|
|
372
|
+
"_org": "206801",
|
|
373
|
+
"_schema": "message",
|
|
374
|
+
"_tags": ["automatic email template"],
|
|
375
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
376
|
+
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
377
|
+
"_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"],
|
|
378
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
379
|
+
"name": "Order confirmation",
|
|
380
|
+
"brand_id": 0,
|
|
381
|
+
"from": {
|
|
382
|
+
"name": "epilot",
|
|
383
|
+
"email": "no-reply@epilot.cloud"
|
|
384
|
+
},
|
|
385
|
+
"to": [
|
|
386
|
+
{
|
|
387
|
+
"name": "Ny Huynh",
|
|
388
|
+
"email": "ny.huynh@axonactive.com"
|
|
389
|
+
}
|
|
390
|
+
],
|
|
391
|
+
"cc": [
|
|
392
|
+
{
|
|
393
|
+
"name": "Ny Huynh",
|
|
394
|
+
"email": "ny.huynh@axonactive.com"
|
|
395
|
+
}
|
|
396
|
+
],
|
|
397
|
+
"bcc": [
|
|
398
|
+
{
|
|
399
|
+
"name": "Ny Huynh",
|
|
400
|
+
"email": "ny.huynh@axonactive.com"
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
"subject": "We have received your order!",
|
|
404
|
+
"body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
|
|
405
|
+
"attachments": [
|
|
406
|
+
{
|
|
407
|
+
"cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
|
|
408
|
+
"filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
409
|
+
"size": 451349,
|
|
410
|
+
"content_type": "application/pdf",
|
|
411
|
+
"url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
412
|
+
"bucket": "893487340562-message-attachment",
|
|
413
|
+
"object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
414
|
+
"inline": false,
|
|
415
|
+
"send_as_link": false,
|
|
416
|
+
"type": "Document template",
|
|
417
|
+
"copy_to_message": true
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"file": {
|
|
421
|
+
"$relation": [
|
|
422
|
+
{}
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
"created_by": 1234,
|
|
426
|
+
"updated_by": 1234,
|
|
427
|
+
"json_template": "string",
|
|
428
|
+
"system_template": false
|
|
429
|
+
}
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
</details>
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
### `replaceVariablesAsync`
|
|
437
|
+
|
|
438
|
+
This endpoint allows to initiate an asynchronous process in replacing the template details & generating the documents.
|
|
439
|
+
On initial request, a jobId and STARTED status are returned. Subsequent requests
|
|
440
|
+
|
|
441
|
+
`POST /v1/email-template/templates:replaceAsync`
|
|
442
|
+
|
|
443
|
+
```ts
|
|
444
|
+
const { data } = await client.replaceVariablesAsync(
|
|
445
|
+
{
|
|
446
|
+
job_id: 'example',
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
email_template_id: '511ceb90-f738-47aa-8b1e-915ace0ae13c',
|
|
450
|
+
variable_parameters: {
|
|
451
|
+
template_type: 'email',
|
|
452
|
+
language: 'en',
|
|
453
|
+
main_entity_id: '63753437-c9e2-4e83-82bb-b1c666514561',
|
|
454
|
+
user_id: '123452',
|
|
455
|
+
custom_variables: [
|
|
456
|
+
{
|
|
457
|
+
variable: '{{abc.xyz}}',
|
|
458
|
+
value: 'ReplacedValue'
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
},
|
|
462
|
+
must_include_unsubscribe_link: false,
|
|
463
|
+
skip_document_generation: false
|
|
464
|
+
},
|
|
465
|
+
)
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
<details>
|
|
469
|
+
<summary>Response</summary>
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
|
|
474
|
+
"status": "STARTED",
|
|
475
|
+
"message": "string",
|
|
476
|
+
"doc_progress_count": {
|
|
477
|
+
"total": 10,
|
|
478
|
+
"completed": 5
|
|
479
|
+
},
|
|
480
|
+
"result": {
|
|
481
|
+
"entity": {
|
|
482
|
+
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
483
|
+
"_title": "string",
|
|
484
|
+
"_org": "206801",
|
|
485
|
+
"_schema": "message",
|
|
486
|
+
"_tags": ["automatic email template"],
|
|
487
|
+
"_created_at": "2021-02-09T12:41:43.662Z",
|
|
488
|
+
"_updated_at": "2021-02-10T09:14:31.990Z",
|
|
489
|
+
"_purpose": ["a0ec23ac-12f8-4d89-9a63-91cba3787f2a", "310cd388-2f15-4b5b-8f98-ca14c1e03304"],
|
|
490
|
+
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
|
|
491
|
+
"name": "Order confirmation",
|
|
492
|
+
"brand_id": 0,
|
|
493
|
+
"from": {
|
|
494
|
+
"name": "epilot",
|
|
495
|
+
"email": "no-reply@epilot.cloud"
|
|
496
|
+
},
|
|
497
|
+
"to": [
|
|
498
|
+
{
|
|
499
|
+
"name": "Ny Huynh",
|
|
500
|
+
"email": "ny.huynh@axonactive.com"
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"cc": [
|
|
504
|
+
{
|
|
505
|
+
"name": "Ny Huynh",
|
|
506
|
+
"email": "ny.huynh@axonactive.com"
|
|
507
|
+
}
|
|
508
|
+
],
|
|
509
|
+
"bcc": [
|
|
510
|
+
{
|
|
511
|
+
"name": "Ny Huynh",
|
|
512
|
+
"email": "ny.huynh@axonactive.com"
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"subject": "We have received your order!",
|
|
516
|
+
"body": "Hi Ms Ny Huynh, </br> Thank you for your order. We will contact you shortly",
|
|
517
|
+
"attachments": [
|
|
518
|
+
{
|
|
519
|
+
"cid": "f820ce3b-07b0-45ae-bcc6-babb2f53f79f",
|
|
520
|
+
"filename": "Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
521
|
+
"size": 451349,
|
|
522
|
+
"content_type": "application/pdf",
|
|
523
|
+
"url": "https://go.epilot.cloud/attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
524
|
+
"bucket": "893487340562-message-attachment",
|
|
525
|
+
"object_key": "attachments/3e7c616a-3e89-4f92-b4c5-ea5ab140e3dd/Produktinformationen_epilot360_Double_Opt_in.pdf",
|
|
526
|
+
"inline": false,
|
|
527
|
+
"send_as_link": false,
|
|
528
|
+
"type": "Document template",
|
|
529
|
+
"copy_to_message": true
|
|
530
|
+
}
|
|
531
|
+
],
|
|
532
|
+
"file": {
|
|
533
|
+
"$relation": [
|
|
534
|
+
{}
|
|
535
|
+
]
|
|
536
|
+
},
|
|
537
|
+
"created_by": 1234,
|
|
538
|
+
"updated_by": 1234,
|
|
539
|
+
"json_template": "string",
|
|
540
|
+
"system_template": false
|
|
541
|
+
},
|
|
542
|
+
"relations": [
|
|
543
|
+
{}
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
</details>
|
|
550
|
+
|
|
551
|
+
---
|
|
552
|
+
|
|
553
|
+
### `bulkSendMessage`
|
|
554
|
+
|
|
555
|
+
Send emails to multiple recipients using a template
|
|
556
|
+
|
|
557
|
+
`POST /v1/email-template/templates:bulkSendMessage`
|
|
558
|
+
|
|
559
|
+
```ts
|
|
560
|
+
const { data } = await client.bulkSendMessage(
|
|
561
|
+
null,
|
|
562
|
+
{
|
|
563
|
+
skip_creating_entities: true,
|
|
564
|
+
complete_thread: false,
|
|
565
|
+
email_template_id: '511ceb90-f738-47aa-8b1e-915ace0ae13c',
|
|
566
|
+
must_include_unsubscribe_link: false,
|
|
567
|
+
recipient_query: '_schema:contact AND consent_email_marketing:active',
|
|
568
|
+
custom_variables: [
|
|
569
|
+
{
|
|
570
|
+
variable: '{{abc.xyz}}',
|
|
571
|
+
value: 'ReplacedValue'
|
|
572
|
+
}
|
|
573
|
+
]
|
|
574
|
+
},
|
|
575
|
+
)
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
<details>
|
|
579
|
+
<summary>Response</summary>
|
|
580
|
+
|
|
581
|
+
```json
|
|
582
|
+
{
|
|
583
|
+
"org_id": "206801",
|
|
584
|
+
"job_id": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
|
|
585
|
+
"skip_creating_entities": true,
|
|
586
|
+
"complete_thread": false,
|
|
587
|
+
"status": "PROCESSING",
|
|
588
|
+
"request": {
|
|
589
|
+
"skip_creating_entities": true,
|
|
590
|
+
"complete_thread": false,
|
|
591
|
+
"email_template_id": "511ceb90-f738-47aa-8b1e-915ace0ae13c",
|
|
592
|
+
"must_include_unsubscribe_link": false,
|
|
593
|
+
"recipient_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6", "3fa85f64-5717-4562-b3fc-2c963f66afa7", "3fa85f64-5717-4562-b3fc-2c963f66afa8"],
|
|
594
|
+
"custom_variables": [
|
|
595
|
+
{
|
|
596
|
+
"variable": "{{abc.xyz}}",
|
|
597
|
+
"value": "ReplacedValue"
|
|
598
|
+
}
|
|
599
|
+
]
|
|
600
|
+
},
|
|
601
|
+
"created_by": "1234",
|
|
602
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
603
|
+
"updated_at": "1970-01-01T00:00:00.000Z",
|
|
604
|
+
"approved_at": "1970-01-01T00:00:00.000Z",
|
|
605
|
+
"approve_action": "APPROVE_WITH_CONSENT",
|
|
606
|
+
"task_token": "8c086140-f33e-4bb7-a993-50c0f2402c7b",
|
|
607
|
+
"total_queued": 100,
|
|
608
|
+
"queued": [
|
|
609
|
+
{
|
|
610
|
+
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
611
|
+
"email_to": ["recipient@example.com"],
|
|
612
|
+
"email_with_consent": ["recipient@example.com"]
|
|
613
|
+
}
|
|
614
|
+
],
|
|
615
|
+
"sent": [
|
|
616
|
+
{
|
|
617
|
+
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
618
|
+
"message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
619
|
+
"email_to": ["recipient@example.com"]
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"failed": [
|
|
623
|
+
{
|
|
624
|
+
"entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
625
|
+
"error": "string",
|
|
626
|
+
"email_to": ["recipient@example.com"]
|
|
627
|
+
}
|
|
628
|
+
]
|
|
629
|
+
}
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
</details>
|
|
633
|
+
|
|
634
|
+
---
|
|
635
|
+
|
|
636
|
+
### `revertToOriginalTemplate`
|
|
637
|
+
|
|
638
|
+
Revert to the original system generated email template
|
|
639
|
+
|
|
640
|
+
`POST /v1/email-template/templates:revert`
|
|
641
|
+
|
|
642
|
+
```ts
|
|
643
|
+
const { data } = await client.revertToOriginalTemplate(
|
|
644
|
+
null,
|
|
645
|
+
{
|
|
646
|
+
email_template_id: '511ceb90-f738-47aa-8b1e-915ace0ae13c'
|
|
647
|
+
},
|
|
648
|
+
)
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
## Schemas
|
|
654
|
+
|
|
655
|
+
### `BaseEntity`
|
|
656
|
+
|
|
657
|
+
```ts
|
|
658
|
+
type BaseEntity = {
|
|
659
|
+
_id: string
|
|
660
|
+
_title: string
|
|
661
|
+
_org: string
|
|
662
|
+
_schema: string
|
|
663
|
+
_tags?: string[]
|
|
664
|
+
_created_at: string // date-time
|
|
665
|
+
_updated_at: string // date-time
|
|
666
|
+
_purpose?: string[]
|
|
667
|
+
_manifest?: string // uuid[]
|
|
668
|
+
}
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### `EmailTemplateRequest`
|
|
672
|
+
|
|
673
|
+
```ts
|
|
674
|
+
type EmailTemplateRequest = {
|
|
675
|
+
_id?: string
|
|
676
|
+
_tags?: string[]
|
|
677
|
+
_manifest?: string // uuid[]
|
|
678
|
+
_purpose?: string[]
|
|
679
|
+
name: string
|
|
680
|
+
brand_id?: number
|
|
681
|
+
from?: {
|
|
682
|
+
name?: string
|
|
683
|
+
email: string
|
|
684
|
+
}
|
|
685
|
+
to?: Array<{
|
|
686
|
+
name?: string
|
|
687
|
+
email: string
|
|
688
|
+
}>
|
|
689
|
+
cc?: Array<{
|
|
690
|
+
name?: string
|
|
691
|
+
email: string
|
|
692
|
+
}>
|
|
693
|
+
bcc?: Array<{
|
|
694
|
+
name?: string
|
|
695
|
+
email: string
|
|
696
|
+
}>
|
|
697
|
+
subject: string
|
|
698
|
+
body?: string
|
|
699
|
+
attachments?: Array<{
|
|
700
|
+
cid?: string
|
|
701
|
+
filename: string
|
|
702
|
+
size: number
|
|
703
|
+
content_type: string
|
|
704
|
+
url?: string
|
|
705
|
+
bucket: string
|
|
706
|
+
object_key: string
|
|
707
|
+
inline?: boolean
|
|
708
|
+
send_as_link?: boolean
|
|
709
|
+
type?: string
|
|
710
|
+
copy_to_message?: boolean
|
|
711
|
+
}>
|
|
712
|
+
file?: {
|
|
713
|
+
$relation?: object[]
|
|
714
|
+
}
|
|
715
|
+
system_template?: boolean
|
|
716
|
+
created_by?: string
|
|
717
|
+
updated_by?: string
|
|
718
|
+
json_template?: string
|
|
719
|
+
}
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
### `EmailTemplateEntity`
|
|
723
|
+
|
|
724
|
+
```ts
|
|
725
|
+
type EmailTemplateEntity = {
|
|
726
|
+
_id: string
|
|
727
|
+
_title: string
|
|
728
|
+
_org: string
|
|
729
|
+
_schema: string
|
|
730
|
+
_tags?: string[]
|
|
731
|
+
_created_at: string // date-time
|
|
732
|
+
_updated_at: string // date-time
|
|
733
|
+
_purpose?: string[]
|
|
734
|
+
_manifest?: string // uuid[]
|
|
735
|
+
name: string
|
|
736
|
+
brand_id?: number
|
|
737
|
+
from?: {
|
|
738
|
+
name?: string
|
|
739
|
+
email: string
|
|
740
|
+
}
|
|
741
|
+
to?: Array<{
|
|
742
|
+
name?: string
|
|
743
|
+
email: string
|
|
744
|
+
}>
|
|
745
|
+
cc?: Array<{
|
|
746
|
+
name?: string
|
|
747
|
+
email: string
|
|
748
|
+
}>
|
|
749
|
+
bcc?: Array<{
|
|
750
|
+
name?: string
|
|
751
|
+
email: string
|
|
752
|
+
}>
|
|
753
|
+
subject?: string
|
|
754
|
+
body?: string
|
|
755
|
+
attachments?: Array<{
|
|
756
|
+
cid?: string
|
|
757
|
+
filename: string
|
|
758
|
+
size: number
|
|
759
|
+
content_type: string
|
|
760
|
+
url?: string
|
|
761
|
+
bucket: string
|
|
762
|
+
object_key: string
|
|
763
|
+
inline?: boolean
|
|
764
|
+
send_as_link?: boolean
|
|
765
|
+
type?: string
|
|
766
|
+
copy_to_message?: boolean
|
|
767
|
+
}>
|
|
768
|
+
file?: {
|
|
769
|
+
$relation?: object[]
|
|
770
|
+
}
|
|
771
|
+
created_by?: string
|
|
772
|
+
updated_by?: string
|
|
773
|
+
json_template?: string
|
|
774
|
+
system_template?: boolean
|
|
775
|
+
}
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
### `Attachment`
|
|
779
|
+
|
|
780
|
+
```ts
|
|
781
|
+
type Attachment = {
|
|
782
|
+
cid?: string
|
|
783
|
+
filename: string
|
|
784
|
+
size: number
|
|
785
|
+
content_type: string
|
|
786
|
+
url?: string
|
|
787
|
+
bucket: string
|
|
788
|
+
object_key: string
|
|
789
|
+
inline?: boolean
|
|
790
|
+
send_as_link?: boolean
|
|
791
|
+
type?: string
|
|
792
|
+
copy_to_message?: boolean
|
|
793
|
+
}
|
|
794
|
+
```
|
|
795
|
+
|
|
796
|
+
### `From`
|
|
797
|
+
|
|
798
|
+
```ts
|
|
799
|
+
type From = {
|
|
800
|
+
name?: string
|
|
801
|
+
email: string
|
|
802
|
+
}
|
|
803
|
+
```
|
|
804
|
+
|
|
805
|
+
### `To`
|
|
806
|
+
|
|
807
|
+
```ts
|
|
808
|
+
type To = {
|
|
809
|
+
name?: string
|
|
810
|
+
email: string
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
### `PresignedRequest`
|
|
815
|
+
|
|
816
|
+
```ts
|
|
817
|
+
type PresignedRequest = {
|
|
818
|
+
id: string
|
|
819
|
+
filename: string
|
|
820
|
+
content_type: string
|
|
821
|
+
}
|
|
822
|
+
```
|
|
823
|
+
|
|
824
|
+
### `PresignedResponse`
|
|
825
|
+
|
|
826
|
+
```ts
|
|
827
|
+
type PresignedResponse = {
|
|
828
|
+
download_url: string
|
|
829
|
+
upload_url: {
|
|
830
|
+
url: number
|
|
831
|
+
fields: object
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
### `AttachmentResponse`
|
|
837
|
+
|
|
838
|
+
```ts
|
|
839
|
+
type AttachmentResponse = {
|
|
840
|
+
total?: number
|
|
841
|
+
attachments?: Array<{
|
|
842
|
+
filename?: string
|
|
843
|
+
bucket?: string
|
|
844
|
+
object_key?: string
|
|
845
|
+
url?: string
|
|
846
|
+
document_type?: number
|
|
847
|
+
}>
|
|
848
|
+
}
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
### `UserResponse`
|
|
852
|
+
|
|
853
|
+
```ts
|
|
854
|
+
type UserResponse = {
|
|
855
|
+
id?: string
|
|
856
|
+
organization_id?: string
|
|
857
|
+
display_name?: string
|
|
858
|
+
email?: string // email
|
|
859
|
+
phone?: string
|
|
860
|
+
preferred_language?: string
|
|
861
|
+
image_uri?: {
|
|
862
|
+
original?: string // uri
|
|
863
|
+
thumbnail_32?: string // uri
|
|
864
|
+
}
|
|
865
|
+
properties?: Array<{
|
|
866
|
+
name: string
|
|
867
|
+
value: string
|
|
868
|
+
}>
|
|
869
|
+
}
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
### `VariableParameters`
|
|
873
|
+
|
|
874
|
+
```ts
|
|
875
|
+
type VariableParameters = {
|
|
876
|
+
template_type: "email" | "document"
|
|
877
|
+
language?: "en" | "de"
|
|
878
|
+
main_entity_id?: string
|
|
879
|
+
user_id?: string
|
|
880
|
+
custom_variables?: Array<{
|
|
881
|
+
variable?: string
|
|
882
|
+
value?: string
|
|
883
|
+
}>
|
|
884
|
+
}
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
### `TemplateType`
|
|
888
|
+
|
|
889
|
+
```ts
|
|
890
|
+
type TemplateType = "email" | "document"
|
|
891
|
+
```
|
|
892
|
+
|
|
893
|
+
### `EmailTemplateResponse`
|
|
894
|
+
|
|
895
|
+
```ts
|
|
896
|
+
type EmailTemplateResponse = {
|
|
897
|
+
entity?: {
|
|
898
|
+
_id: string
|
|
899
|
+
_title: string
|
|
900
|
+
_org: string
|
|
901
|
+
_schema: string
|
|
902
|
+
_tags?: string[]
|
|
903
|
+
_created_at: string // date-time
|
|
904
|
+
_updated_at: string // date-time
|
|
905
|
+
_purpose?: string[]
|
|
906
|
+
_manifest?: string // uuid[]
|
|
907
|
+
name: string
|
|
908
|
+
brand_id?: number
|
|
909
|
+
from?: {
|
|
910
|
+
name?: { ... }
|
|
911
|
+
email: { ... }
|
|
912
|
+
}
|
|
913
|
+
to?: Array<{
|
|
914
|
+
name?: { ... }
|
|
915
|
+
email: { ... }
|
|
916
|
+
}>
|
|
917
|
+
cc?: Array<{
|
|
918
|
+
name?: { ... }
|
|
919
|
+
email: { ... }
|
|
920
|
+
}>
|
|
921
|
+
bcc?: Array<{
|
|
922
|
+
name?: { ... }
|
|
923
|
+
email: { ... }
|
|
924
|
+
}>
|
|
925
|
+
subject?: string
|
|
926
|
+
body?: string
|
|
927
|
+
attachments?: Array<{
|
|
928
|
+
cid?: { ... }
|
|
929
|
+
filename: { ... }
|
|
930
|
+
size: { ... }
|
|
931
|
+
content_type: { ... }
|
|
932
|
+
url?: { ... }
|
|
933
|
+
bucket: { ... }
|
|
934
|
+
object_key: { ... }
|
|
935
|
+
inline?: { ... }
|
|
936
|
+
send_as_link?: { ... }
|
|
937
|
+
type?: { ... }
|
|
938
|
+
copy_to_message?: { ... }
|
|
939
|
+
}>
|
|
940
|
+
file?: {
|
|
941
|
+
$relation?: { ... }
|
|
942
|
+
}
|
|
943
|
+
created_by?: string
|
|
944
|
+
updated_by?: string
|
|
945
|
+
json_template?: string
|
|
946
|
+
system_template?: boolean
|
|
947
|
+
}
|
|
948
|
+
relations?: object[]
|
|
949
|
+
}
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
### `AsyncEmailTemplateResponse`
|
|
953
|
+
|
|
954
|
+
```ts
|
|
955
|
+
type AsyncEmailTemplateResponse = {
|
|
956
|
+
job_id: string
|
|
957
|
+
status: "STARTED" | "PROCESSING" | "SUCCESS" | "FAILED"
|
|
958
|
+
message?: string
|
|
959
|
+
doc_progress_count?: {
|
|
960
|
+
total: number
|
|
961
|
+
completed: number
|
|
962
|
+
}
|
|
963
|
+
result?: {
|
|
964
|
+
entity?: {
|
|
965
|
+
_id: { ... }
|
|
966
|
+
_title: { ... }
|
|
967
|
+
_org: { ... }
|
|
968
|
+
_schema: { ... }
|
|
969
|
+
_tags?: { ... }
|
|
970
|
+
_created_at: { ... }
|
|
971
|
+
_updated_at: { ... }
|
|
972
|
+
_purpose?: { ... }
|
|
973
|
+
_manifest?: { ... }
|
|
974
|
+
name: { ... }
|
|
975
|
+
brand_id?: { ... }
|
|
976
|
+
from?: { ... }
|
|
977
|
+
to?: { ... }
|
|
978
|
+
cc?: { ... }
|
|
979
|
+
bcc?: { ... }
|
|
980
|
+
subject?: { ... }
|
|
981
|
+
body?: { ... }
|
|
982
|
+
attachments?: { ... }
|
|
983
|
+
file?: { ... }
|
|
984
|
+
created_by?: { ... }
|
|
985
|
+
updated_by?: { ... }
|
|
986
|
+
json_template?: { ... }
|
|
987
|
+
system_template?: { ... }
|
|
988
|
+
}
|
|
989
|
+
relations?: object[]
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
### `SkipCreatingEntities`
|
|
995
|
+
|
|
996
|
+
When true, it lets to send only the email by skip creating the thread & message entities.
|
|
997
|
+
|
|
998
|
+
```ts
|
|
999
|
+
type SkipCreatingEntities = boolean
|
|
1000
|
+
```
|
|
1001
|
+
|
|
1002
|
+
### `CompleteThread`
|
|
1003
|
+
|
|
1004
|
+
Whether the thread is marked as Done immediately after sending the message
|
|
1005
|
+
|
|
1006
|
+
```ts
|
|
1007
|
+
type CompleteThread = boolean
|
|
1008
|
+
```
|
|
1009
|
+
|
|
1010
|
+
### `BulkSendMessageRequest`
|
|
1011
|
+
|
|
1012
|
+
It takes a list of entity ids, treating each as a separate mainEntity to construct individual messages.
|
|
1013
|
+
For e.g; if there some opportunityIds are provided, then each opportunityId is treated as a separate mainEntity to construct individual messages.
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
```ts
|
|
1017
|
+
type BulkSendMessageRequest = {
|
|
1018
|
+
skip_creating_entities?: boolean
|
|
1019
|
+
complete_thread?: boolean
|
|
1020
|
+
email_template_id: string
|
|
1021
|
+
must_include_unsubscribe_link?: boolean
|
|
1022
|
+
recipient_ids: string[]
|
|
1023
|
+
custom_variables?: Array<{
|
|
1024
|
+
variable?: string
|
|
1025
|
+
value?: string
|
|
1026
|
+
}>
|
|
1027
|
+
}
|
|
1028
|
+
```
|
|
1029
|
+
|
|
1030
|
+
### `BulkSendMessageRequestWithQuery`
|
|
1031
|
+
|
|
1032
|
+
It takes an entity query to derive recipient_ids, treating each as a separate mainEntity to construct individual messages.
|
|
1033
|
+
For e.g; if the query is provided as `_schema:opportunity AND status:PENDING`,
|
|
1034
|
+
then all the opportunity Ids with status PENDING are treated as separate mainEntity to construct
|
|
1035
|
+
|
|
1036
|
+
```ts
|
|
1037
|
+
type BulkSendMessageRequestWithQuery = {
|
|
1038
|
+
skip_creating_entities?: boolean
|
|
1039
|
+
complete_thread?: boolean
|
|
1040
|
+
email_template_id: string
|
|
1041
|
+
must_include_unsubscribe_link?: boolean
|
|
1042
|
+
recipient_query: string
|
|
1043
|
+
custom_variables?: Array<{
|
|
1044
|
+
variable?: string
|
|
1045
|
+
value?: string
|
|
1046
|
+
}>
|
|
1047
|
+
}
|
|
1048
|
+
```
|
|
1049
|
+
|
|
1050
|
+
### `CustomVariables`
|
|
1051
|
+
|
|
1052
|
+
Custom variables to be replaced in the email template
|
|
1053
|
+
|
|
1054
|
+
```ts
|
|
1055
|
+
type CustomVariables = Array<{
|
|
1056
|
+
variable?: string
|
|
1057
|
+
value?: string
|
|
1058
|
+
}>
|
|
1059
|
+
```
|
|
1060
|
+
|
|
1061
|
+
### `BulkSendMessageJob`
|
|
1062
|
+
|
|
1063
|
+
```ts
|
|
1064
|
+
type BulkSendMessageJob = {
|
|
1065
|
+
org_id?: string
|
|
1066
|
+
job_id: string
|
|
1067
|
+
skip_creating_entities?: boolean
|
|
1068
|
+
complete_thread?: boolean
|
|
1069
|
+
status: "PROCESSING" | "QUEUEING" | "APPROVAL" | "SENDING" | "SUCCESS" | "FAILED" | "CANCELLED"
|
|
1070
|
+
request: {
|
|
1071
|
+
skip_creating_entities?: boolean
|
|
1072
|
+
complete_thread?: boolean
|
|
1073
|
+
email_template_id: string
|
|
1074
|
+
must_include_unsubscribe_link?: boolean
|
|
1075
|
+
recipient_ids: string[]
|
|
1076
|
+
custom_variables?: Array<{
|
|
1077
|
+
variable?: { ... }
|
|
1078
|
+
value?: { ... }
|
|
1079
|
+
}>
|
|
1080
|
+
} | {
|
|
1081
|
+
skip_creating_entities?: boolean
|
|
1082
|
+
complete_thread?: boolean
|
|
1083
|
+
email_template_id: string
|
|
1084
|
+
must_include_unsubscribe_link?: boolean
|
|
1085
|
+
recipient_query: string
|
|
1086
|
+
custom_variables?: Array<{
|
|
1087
|
+
variable?: { ... }
|
|
1088
|
+
value?: { ... }
|
|
1089
|
+
}>
|
|
1090
|
+
}
|
|
1091
|
+
created_by?: string
|
|
1092
|
+
created_at?: string // date-time
|
|
1093
|
+
updated_at?: string // date-time
|
|
1094
|
+
approved_at?: string // date-time
|
|
1095
|
+
approve_action?: "APPROVE_WITH_CONSENT" | "APPROVE_ALL"
|
|
1096
|
+
task_token?: string
|
|
1097
|
+
total_queued?: number
|
|
1098
|
+
queued?: Array<{
|
|
1099
|
+
entity_id: string
|
|
1100
|
+
email_to: string[]
|
|
1101
|
+
email_with_consent: string[]
|
|
1102
|
+
}>
|
|
1103
|
+
sent?: Array<{
|
|
1104
|
+
entity_id: string
|
|
1105
|
+
message_id: string
|
|
1106
|
+
email_to?: string[]
|
|
1107
|
+
}>
|
|
1108
|
+
failed?: Array<{
|
|
1109
|
+
entity_id: string
|
|
1110
|
+
error: string
|
|
1111
|
+
email_to?: string[]
|
|
1112
|
+
}>
|
|
1113
|
+
}
|
|
1114
|
+
```
|
|
1115
|
+
|
|
1116
|
+
### `CreateSystemTemplatesReq`
|
|
1117
|
+
|
|
1118
|
+
```ts
|
|
1119
|
+
type CreateSystemTemplatesReq = {
|
|
1120
|
+
template_names: string[]
|
|
1121
|
+
}
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
### `CreateSystemTemplatesResp`
|
|
1125
|
+
|
|
1126
|
+
```ts
|
|
1127
|
+
type CreateSystemTemplatesResp = Array<{
|
|
1128
|
+
_id: string
|
|
1129
|
+
_title: string
|
|
1130
|
+
_org: string
|
|
1131
|
+
_schema: string
|
|
1132
|
+
_tags?: string[]
|
|
1133
|
+
_created_at: string // date-time
|
|
1134
|
+
_updated_at: string // date-time
|
|
1135
|
+
_purpose?: string[]
|
|
1136
|
+
_manifest?: string // uuid[]
|
|
1137
|
+
}>
|
|
1138
|
+
```
|
|
1139
|
+
|
|
1140
|
+
### `OrgId`
|
|
1141
|
+
|
|
1142
|
+
Organization ID
|
|
1143
|
+
|
|
1144
|
+
```ts
|
|
1145
|
+
type OrgId = string
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
### `CreatedBy`
|
|
1149
|
+
|
|
1150
|
+
User ID who created the bulk message action
|
|
1151
|
+
|
|
1152
|
+
```ts
|
|
1153
|
+
type CreatedBy = string
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
### `CreatedAt`
|
|
1157
|
+
|
|
1158
|
+
Time when the bulk message action was created
|
|
1159
|
+
|
|
1160
|
+
```ts
|
|
1161
|
+
type CreatedAt = string // date-time
|
|
1162
|
+
```
|
|
1163
|
+
|
|
1164
|
+
### `UpdatedAt`
|
|
1165
|
+
|
|
1166
|
+
Time when the bulk message action was last updated
|
|
1167
|
+
|
|
1168
|
+
```ts
|
|
1169
|
+
type UpdatedAt = string // date-time
|
|
1170
|
+
```
|
|
1171
|
+
|
|
1172
|
+
### `ApprovedAt`
|
|
1173
|
+
|
|
1174
|
+
Time when the bulk message action was last approved
|
|
1175
|
+
|
|
1176
|
+
```ts
|
|
1177
|
+
type ApprovedAt = string // date-time
|
|
1178
|
+
```
|
|
1179
|
+
|
|
1180
|
+
### `ApproveAction`
|
|
1181
|
+
|
|
1182
|
+
Type of approval action for the bulk message request.
|
|
1183
|
+
* APPROVE_WITH_CONSENT: Approve the bulk message request and send emails to queued recipients with consent
|
|
1184
|
+
* APPROVE_ALL: Approve the bulk message request and send emails to all queued recipients, including those without consent
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
```ts
|
|
1188
|
+
type ApproveAction = "APPROVE_WITH_CONSENT" | "APPROVE_ALL"
|
|
1189
|
+
```
|
|
1190
|
+
|
|
1191
|
+
### `TaskToken`
|
|
1192
|
+
|
|
1193
|
+
Task token to approve or cancel the bulk message action
|
|
1194
|
+
|
|
1195
|
+
```ts
|
|
1196
|
+
type TaskToken = string
|
|
1197
|
+
```
|