@epilot/sdk 2.1.0-rc.1 → 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 -8
- package/dist/apis/access-token.js +5 -3
- package/dist/apis/address-suggestions.cjs +10 -8
- package/dist/apis/address-suggestions.js +5 -3
- package/dist/apis/address.cjs +10 -8
- package/dist/apis/address.js +5 -3
- package/dist/apis/ai-agents.cjs +10 -8
- package/dist/apis/ai-agents.js +5 -3
- package/dist/apis/app.cjs +10 -8
- package/dist/apis/app.js +5 -3
- package/dist/apis/audit-logs.cjs +10 -8
- package/dist/apis/audit-logs.js +5 -3
- package/dist/apis/automation.cjs +10 -8
- package/dist/apis/automation.js +5 -3
- package/dist/apis/billing.cjs +10 -8
- package/dist/apis/billing.js +5 -3
- package/dist/apis/blueprint-manifest.cjs +10 -8
- package/dist/apis/blueprint-manifest.js +5 -3
- package/dist/apis/consent.cjs +10 -8
- package/dist/apis/consent.js +5 -3
- package/dist/apis/customer-portal.cjs +10 -8
- package/dist/apis/customer-portal.js +5 -3
- package/dist/apis/dashboard.cjs +10 -8
- package/dist/apis/dashboard.js +5 -3
- package/dist/apis/data-management.cjs +10 -8
- package/dist/apis/data-management.js +5 -3
- package/dist/apis/deduplication.cjs +10 -8
- package/dist/apis/deduplication.js +5 -3
- package/dist/apis/design.cjs +10 -8
- package/dist/apis/design.js +5 -3
- package/dist/apis/document.cjs +10 -8
- package/dist/apis/document.js +5 -3
- package/dist/apis/email-settings.cjs +10 -8
- package/dist/apis/email-settings.js +5 -3
- package/dist/apis/email-template.cjs +10 -8
- package/dist/apis/email-template.js +5 -3
- package/dist/apis/entity-mapping.cjs +10 -8
- package/dist/apis/entity-mapping.js +5 -3
- package/dist/apis/entity.cjs +10 -8
- package/dist/apis/entity.js +5 -3
- package/dist/apis/environments.cjs +10 -8
- package/dist/apis/environments.js +5 -3
- package/dist/apis/erp-integration.cjs +10 -8
- package/dist/apis/erp-integration.js +5 -3
- package/dist/apis/event-catalog.cjs +10 -8
- package/dist/apis/event-catalog.js +5 -3
- package/dist/apis/file.cjs +10 -8
- package/dist/apis/file.js +5 -3
- package/dist/apis/iban.cjs +10 -8
- package/dist/apis/iban.js +5 -3
- package/dist/apis/journey.cjs +10 -8
- package/dist/apis/journey.js +5 -3
- package/dist/apis/kanban.cjs +10 -8
- package/dist/apis/kanban.js +5 -3
- package/dist/apis/message.cjs +10 -8
- package/dist/apis/message.js +5 -3
- package/dist/apis/metering.cjs +10 -8
- package/dist/apis/metering.js +5 -3
- package/dist/apis/notes.cjs +10 -8
- package/dist/apis/notes.js +5 -3
- package/dist/apis/notification.cjs +10 -8
- package/dist/apis/notification.js +5 -3
- package/dist/apis/organization.cjs +10 -8
- package/dist/apis/organization.d.cts +2 -2
- package/dist/apis/organization.d.ts +2 -2
- package/dist/apis/organization.js +5 -3
- package/dist/apis/partner-directory.cjs +10 -8
- package/dist/apis/partner-directory.js +5 -3
- package/dist/apis/permissions.cjs +10 -8
- package/dist/apis/permissions.js +5 -3
- package/dist/apis/pricing-tier.cjs +10 -8
- package/dist/apis/pricing-tier.js +5 -3
- package/dist/apis/pricing.cjs +10 -8
- package/dist/apis/pricing.js +5 -3
- package/dist/apis/purpose.cjs +10 -8
- package/dist/apis/purpose.js +5 -3
- package/dist/apis/sandbox.cjs +10 -8
- package/dist/apis/sandbox.js +5 -3
- package/dist/apis/submission.cjs +10 -8
- package/dist/apis/submission.js +5 -3
- package/dist/apis/targeting.cjs +10 -8
- package/dist/apis/targeting.js +5 -3
- package/dist/apis/template-variables.cjs +10 -8
- package/dist/apis/template-variables.js +5 -3
- package/dist/apis/user.cjs +10 -8
- package/dist/apis/user.js +5 -3
- package/dist/apis/validation-rules.cjs +10 -8
- package/dist/apis/validation-rules.js +5 -3
- package/dist/apis/webhooks.cjs +10 -8
- package/dist/apis/webhooks.js +5 -3
- package/dist/apis/workflow-definition.cjs +10 -8
- package/dist/apis/workflow-definition.js +5 -3
- package/dist/apis/workflow.cjs +10 -8
- package/dist/apis/workflow.js +5 -3
- 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-6J7CIOKR.js → chunk-2HOJWFQ4.js} +1 -1
- package/dist/{chunk-BDIJHJOG.js → chunk-372VUPHN.js} +1 -1
- package/dist/{chunk-Q5TESEDZ.cjs → chunk-3HJEWWPS.cjs} +2 -2
- package/dist/{chunk-ID6BXIOZ.js → chunk-3N67SSL3.js} +1 -1
- package/dist/chunk-3XEP56SV.cjs +204 -0
- package/dist/{chunk-7KFKA3AH.cjs → chunk-3ZZ57K3S.cjs} +2 -2
- package/dist/{chunk-CVSQT5PV.cjs → chunk-4SWC43JO.cjs} +2 -2
- package/dist/{chunk-O3R6C3WW.js → chunk-4VFQTSJQ.js} +1 -1
- package/dist/{chunk-LXAJ722U.js → chunk-57QIBYDN.js} +1 -1
- package/dist/{chunk-SPZSDRM6.cjs → chunk-5SNJAD6F.cjs} +2 -2
- package/dist/{chunk-OI2M6FSB.js → chunk-73H6TVKN.js} +1 -1
- package/dist/{chunk-BB7WFIE2.cjs → chunk-A6JOROUC.cjs} +2 -2
- package/dist/{chunk-SHPXCOTN.cjs → chunk-AJKH25H2.cjs} +3 -3
- package/dist/{chunk-DBNEZWK2.cjs → chunk-ARWMTXJV.cjs} +2 -2
- package/dist/{chunk-7BPPP4M2.js → chunk-B3ZGAG7B.js} +1 -1
- package/dist/{chunk-5WN2YXNU.cjs → chunk-BH5ZXK4J.cjs} +2 -2
- package/dist/{chunk-JM6HKPSC.cjs → chunk-BWFXLUK5.cjs} +2 -2
- package/dist/{chunk-V56ZCL54.js → chunk-C6UTZEHH.js} +1 -1
- package/dist/{chunk-ZPCMZO2O.js → chunk-CPKBR34V.js} +1 -1
- package/dist/{chunk-UTQY2DSM.js → chunk-CWSHYFVZ.js} +1 -1
- package/dist/{chunk-5YVVQBA2.js → chunk-DJKSULPK.js} +1 -1
- package/dist/{chunk-XLOXC52O.js → chunk-DNJ54L2G.js} +1 -1
- package/dist/{chunk-YXPUCBVK.cjs → chunk-DY2D2IW5.cjs} +2 -2
- package/dist/{chunk-Z5LLUUFD.cjs → chunk-E26ZO7QM.cjs} +2 -2
- package/dist/{chunk-RNKZDJOY.js → chunk-EBCHCYUO.js} +1 -1
- package/dist/{chunk-4MO4WLKA.cjs → chunk-EPAIOB5U.cjs} +2 -2
- package/dist/{chunk-UX2IZQNM.cjs → chunk-EQZMT2HF.cjs} +2 -2
- package/dist/{chunk-U52A2DMK.cjs → chunk-F376L6PP.cjs} +2 -2
- package/dist/{chunk-TBBLLEB2.cjs → chunk-F472YLJG.cjs} +2 -2
- package/dist/{chunk-W3MM2BSK.cjs → chunk-FXOX3X7E.cjs} +2 -2
- package/dist/{chunk-E4IFBCNM.cjs → chunk-G2REP2VZ.cjs} +2 -2
- package/dist/{chunk-CFGXI3FX.js → chunk-GLO477NZ.js} +1 -1
- package/dist/{chunk-PBNPZ7UX.js → chunk-H4VSK4KF.js} +1 -1
- package/dist/{chunk-33TQRYMY.js → chunk-HPSGM6QP.js} +1 -1
- package/dist/{chunk-RQKN4WTW.cjs → chunk-HPYHWTTA.cjs} +2 -2
- package/dist/{chunk-5RXE7X63.js → chunk-IH4CMOML.js} +2 -2
- package/dist/{chunk-VD5TBK2T.cjs → chunk-IMT3IE5M.cjs} +2 -2
- package/dist/{chunk-DIP442PL.js → chunk-IP2WWEOU.js} +1 -1
- package/dist/{chunk-FCLW3FLF.js → chunk-IS2VB342.js} +1 -1
- package/dist/{chunk-UNHWLNE4.js → chunk-ITX53XAZ.js} +1 -1
- package/dist/{chunk-KU2XF4TS.cjs → chunk-JXBXDTFG.cjs} +2 -2
- package/dist/{chunk-Y4YQEDR3.js → chunk-K62XK7KU.js} +1 -1
- package/dist/chunk-KA3TGFJP.js +14 -0
- package/dist/{chunk-IXRDP4VP.js → chunk-KBOVBUBM.js} +1 -1
- package/dist/{chunk-MKZGM4A6.js → chunk-KPGC2D6E.js} +1 -1
- package/dist/{chunk-ZAPA4RPI.js → chunk-KSXTBGIV.js} +1 -1
- package/dist/{chunk-PLBIQ2Y7.cjs → chunk-LCIJ4TJ4.cjs} +2 -2
- package/dist/{chunk-TUAAE3UC.cjs → chunk-LQOLYXGQ.cjs} +2 -2
- package/dist/{chunk-6ADJEPMJ.js → chunk-LSIWCIQV.js} +1 -1
- package/dist/{chunk-CBRWUULQ.js → chunk-MHNSZ4HE.js} +1 -1
- package/dist/{chunk-WOOKHE7Y.cjs → chunk-MKX4CKAB.cjs} +2 -2
- package/dist/{chunk-N2P26AAD.js → chunk-MRTAFRO7.js} +1 -1
- package/dist/{chunk-YGULLD73.js → chunk-MRZ7LGKZ.js} +1 -1
- package/dist/{chunk-CLMZ2EXW.js → chunk-MSASBR2Y.js} +1 -1
- package/dist/{chunk-KEJRWMXR.cjs → chunk-NAWLLC3T.cjs} +2 -2
- package/dist/chunk-NJK5F5TF.cjs +21 -0
- package/dist/{chunk-HBPCJRZX.cjs → chunk-NLSZVGHK.cjs} +2 -2
- package/dist/{chunk-CK36RZXR.js → chunk-O4LRVGOY.js} +1 -1
- package/dist/chunk-OG2DMGU6.cjs +14 -0
- package/dist/{chunk-TIJGLQKO.js → chunk-OGQKJTXF.js} +1 -1
- package/dist/{chunk-UE4XPL43.js → chunk-PETLAONH.js} +1 -1
- package/dist/{chunk-MK4ZGXVE.cjs → chunk-PVSS2WPM.cjs} +2 -2
- package/dist/{chunk-ONN5COYQ.cjs → chunk-PXITFTJA.cjs} +2 -2
- package/dist/{chunk-ZAXYMQ2B.cjs → chunk-QDVPPRWI.cjs} +2 -2
- package/dist/{chunk-IPFHV2FV.cjs → chunk-QKERXNJJ.cjs} +2 -2
- package/dist/{chunk-ZDJ3J6Z6.cjs → chunk-QLML3IP5.cjs} +2 -2
- package/dist/{chunk-YFHQYQII.js → chunk-QVAJ5JP4.js} +1 -1
- package/dist/{chunk-S2QF6HG2.cjs → chunk-RD7E4OSJ.cjs} +2 -2
- package/dist/{chunk-XIB2G42L.cjs → chunk-RWSA3LXE.cjs} +2 -2
- package/dist/{chunk-R6WNZVTA.cjs → chunk-RXSS67VI.cjs} +2 -2
- package/dist/{chunk-UXVV3BSC.cjs → chunk-S3ZNESMC.cjs} +2 -2
- package/dist/{chunk-YNPRF4BX.js → chunk-S7NDMDRX.js} +1 -1
- package/dist/{chunk-HO7KACZZ.cjs → chunk-SK3VYIZ6.cjs} +2 -2
- package/dist/{chunk-CX3KG7D2.cjs → chunk-SMGHAG5C.cjs} +2 -2
- package/dist/{chunk-D5FJ26GG.js → chunk-T46LODOF.js} +1 -1
- package/dist/{chunk-Y4ZMNMYI.js → chunk-TIJWJVKZ.js} +1 -1
- package/dist/{chunk-EIILOQ6X.js → chunk-TLWCYLNA.js} +1 -1
- package/dist/{chunk-JX45ME2Z.js → chunk-TRJLYZHD.js} +1 -1
- package/dist/{chunk-RNBO3DEN.js → chunk-UKKJMCNH.js} +1 -1
- package/dist/chunk-ULBEEHG4.js +204 -0
- package/dist/{chunk-UDO4JYVU.cjs → chunk-VGTUK3QD.cjs} +2 -2
- package/dist/{chunk-4JPVFLVU.js → chunk-VQ7R36AC.js} +1 -1
- package/dist/{chunk-IPDIEZBN.cjs → chunk-VVQB5W7U.cjs} +2 -2
- package/dist/{chunk-HKZQ56AS.cjs → chunk-VVVATFGK.cjs} +2 -2
- package/dist/{chunk-URRL33D5.cjs → chunk-WMTYO5OX.cjs} +2 -2
- package/dist/{chunk-U4BMKRG6.js → chunk-WOSSSFXB.js} +1 -1
- package/dist/{chunk-OBQIS3KU.js → chunk-WOXXNKTE.js} +1 -1
- package/dist/{chunk-WAKSLH7V.cjs → chunk-XKI2OAYV.cjs} +2 -2
- package/dist/{chunk-5Y2KLUU6.cjs → chunk-XR4QF6KQ.cjs} +2 -2
- package/dist/{chunk-6BERHKDQ.cjs → chunk-XYHTQ523.cjs} +2 -2
- package/dist/{chunk-XD6XML3Z.cjs → chunk-XZYZLSUO.cjs} +2 -2
- package/dist/chunk-YPSWSI3M.js +21 -0
- package/dist/{chunk-4K3MX2J6.js → chunk-YYBIU5BQ.js} +1 -1
- package/dist/{chunk-HSGQSTVK.js → chunk-YZA5WZUS.js} +1 -1
- package/dist/{chunk-GGBSLAVO.cjs → chunk-Z4LUE424.cjs} +2 -2
- package/dist/{chunk-NSOHW3R6.js → chunk-ZV6XYUXS.js} +1 -1
- 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 +107 -100
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +58 -51
- 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-GMBRXWMD.cjs +0 -14
- package/dist/chunk-L43U5IO3.js +0 -14
- package/dist/chunk-XE25WERA.js +0 -125
- package/dist/chunk-XEQMAKGA.cjs +0 -125
|
@@ -0,0 +1,1148 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/template-variables.json
|
|
4
|
+
var template_variables_default = `# Template Variables API
|
|
5
|
+
|
|
6
|
+
- **Base URL:** \`https://template-variables-api.sls.epilot.io\`
|
|
7
|
+
- **Full API Docs:** [https://docs.epilot.io/api/template-variables](https://docs.epilot.io/api/template-variables)
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
\`\`\`ts
|
|
12
|
+
import { epilot } from '@epilot/sdk'
|
|
13
|
+
|
|
14
|
+
epilot.authorize(() => '<token>')
|
|
15
|
+
const { data } = await epilot.templateVariables.getCategories(...)
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
### Tree-shakeable import
|
|
19
|
+
|
|
20
|
+
\`\`\`ts
|
|
21
|
+
import { getClient, authorize } from '@epilot/sdk/template-variables'
|
|
22
|
+
|
|
23
|
+
const templateVariablesClient = getClient()
|
|
24
|
+
authorize(templateVariablesClient, () => '<token>')
|
|
25
|
+
const { data } = await templateVariablesClient.getCategories(...)
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
## Operations
|
|
29
|
+
|
|
30
|
+
**Templates**
|
|
31
|
+
- [\`getCategories\`](#getcategories)
|
|
32
|
+
- [\`searchVariables\`](#searchvariables)
|
|
33
|
+
- [\`getVariableContext\`](#getvariablecontext)
|
|
34
|
+
- [\`replaceTemplates\`](#replacetemplates)
|
|
35
|
+
- [\`replaceTemplatesV2\`](#replacetemplatesv2)
|
|
36
|
+
|
|
37
|
+
**Custom Variables**
|
|
38
|
+
- [\`getCustomVariables\`](#getcustomvariables)
|
|
39
|
+
- [\`createCustomVariable\`](#createcustomvariable)
|
|
40
|
+
- [\`searchCustomVariables\`](#searchcustomvariables)
|
|
41
|
+
- [\`updateCustomVariable\`](#updatecustomvariable)
|
|
42
|
+
- [\`getCustomVariable\`](#getcustomvariable)
|
|
43
|
+
- [\`deleteCustomVariable\`](#deletecustomvariable)
|
|
44
|
+
- [\`getBluePrintTableConfig\`](#getblueprinttableconfig)
|
|
45
|
+
|
|
46
|
+
**Schemas**
|
|
47
|
+
- [\`Language\`](#language)
|
|
48
|
+
- [\`VariableParameters\`](#variableparameters)
|
|
49
|
+
- [\`ReplacementOutput\`](#replacementoutput)
|
|
50
|
+
- [\`ReplacementOutputV2\`](#replacementoutputv2)
|
|
51
|
+
- [\`VariableResult\`](#variableresult)
|
|
52
|
+
- [\`CustomVariablesSearchParams\`](#customvariablessearchparams)
|
|
53
|
+
- [\`VariableContext\`](#variablecontext)
|
|
54
|
+
- [\`TemplateType\`](#templatetype)
|
|
55
|
+
- [\`CategoryResult\`](#categoryresult)
|
|
56
|
+
- [\`ExternalCustomVariable\`](#externalcustomvariable)
|
|
57
|
+
- [\`CustomVariable\`](#customvariable)
|
|
58
|
+
|
|
59
|
+
### \`getCategories\`
|
|
60
|
+
|
|
61
|
+
Get all template variable categories
|
|
62
|
+
|
|
63
|
+
\`GET /v1/template-variables/categories\`
|
|
64
|
+
|
|
65
|
+
\`\`\`ts
|
|
66
|
+
const { data } = await client.getCategories({
|
|
67
|
+
lang: 'example',
|
|
68
|
+
})
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
<details>
|
|
72
|
+
<summary>Response</summary>
|
|
73
|
+
|
|
74
|
+
\`\`\`json
|
|
75
|
+
[
|
|
76
|
+
{
|
|
77
|
+
"category": "contact",
|
|
78
|
+
"description": "Contact"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
\`\`\`
|
|
82
|
+
|
|
83
|
+
</details>
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
### \`searchVariables\`
|
|
88
|
+
|
|
89
|
+
Search variables
|
|
90
|
+
|
|
91
|
+
\`POST /v1/template-variables:search\`
|
|
92
|
+
|
|
93
|
+
\`\`\`ts
|
|
94
|
+
const { data } = await client.searchVariables(
|
|
95
|
+
null,
|
|
96
|
+
{
|
|
97
|
+
template_type: 'email',
|
|
98
|
+
query: 'logo',
|
|
99
|
+
from: 0,
|
|
100
|
+
size: 25,
|
|
101
|
+
lang: 'de',
|
|
102
|
+
entity_schemas: ['contact']
|
|
103
|
+
},
|
|
104
|
+
)
|
|
105
|
+
\`\`\`
|
|
106
|
+
|
|
107
|
+
<details>
|
|
108
|
+
<summary>Response</summary>
|
|
109
|
+
|
|
110
|
+
\`\`\`json
|
|
111
|
+
[
|
|
112
|
+
{
|
|
113
|
+
"type": "simple",
|
|
114
|
+
"qrdata": "string",
|
|
115
|
+
"group": "string",
|
|
116
|
+
"insert": "string",
|
|
117
|
+
"description": "string"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
\`\`\`
|
|
121
|
+
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
### \`getVariableContext\`
|
|
127
|
+
|
|
128
|
+
Get full variable context
|
|
129
|
+
|
|
130
|
+
\`POST /v1/template-variables:context\`
|
|
131
|
+
|
|
132
|
+
\`\`\`ts
|
|
133
|
+
const { data } = await client.getVariableContext(
|
|
134
|
+
null,
|
|
135
|
+
{
|
|
136
|
+
parameters: {
|
|
137
|
+
template_type: 'email',
|
|
138
|
+
language: 'de',
|
|
139
|
+
main_entity_id: '63753437-c9e2-4e83-82bb-b1c666514561',
|
|
140
|
+
brand_id: 123451,
|
|
141
|
+
user_id: '50001',
|
|
142
|
+
user_org_id: '729224',
|
|
143
|
+
custom_variables: [
|
|
144
|
+
{
|
|
145
|
+
variable: '{{craftsmen.invitation_link}}',
|
|
146
|
+
value: 'https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19'
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
context_data: {},
|
|
150
|
+
template_name: 'string',
|
|
151
|
+
template_tags: ['string'],
|
|
152
|
+
variables_version: '2'
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
)
|
|
156
|
+
\`\`\`
|
|
157
|
+
|
|
158
|
+
<details>
|
|
159
|
+
<summary>Response</summary>
|
|
160
|
+
|
|
161
|
+
\`\`\`json
|
|
162
|
+
{
|
|
163
|
+
"unsubscribe_url": "https://consent.sls.epilot.io/v1/unsubscribe?token=abc123",
|
|
164
|
+
"main": {
|
|
165
|
+
"_id": "03be777b-3cf8-4bff-bb0c-253fd1128479",
|
|
166
|
+
"_title": "Example Customer",
|
|
167
|
+
"customer_number": 123,
|
|
168
|
+
"first_name": "Example",
|
|
169
|
+
"last_name": "Customer",
|
|
170
|
+
"title": "Prof.",
|
|
171
|
+
"salutation": "Ms. / Mrs.",
|
|
172
|
+
"birthdate": "2018-03-03",
|
|
173
|
+
"email": [
|
|
174
|
+
{},
|
|
175
|
+
{}
|
|
176
|
+
],
|
|
177
|
+
"phone": [
|
|
178
|
+
{},
|
|
179
|
+
{}
|
|
180
|
+
],
|
|
181
|
+
"address": [
|
|
182
|
+
{},
|
|
183
|
+
{}
|
|
184
|
+
],
|
|
185
|
+
"account": [
|
|
186
|
+
{}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
"contact": {
|
|
190
|
+
"_id": "03be777b-3cf8-4bff-bb0c-253fd1128479",
|
|
191
|
+
"_title": "Example Customer",
|
|
192
|
+
"customer_number": 123,
|
|
193
|
+
"first_name": "Example",
|
|
194
|
+
"last_name": "Customer",
|
|
195
|
+
"title": "Prof.",
|
|
196
|
+
"salutation": "Ms. / Mrs.",
|
|
197
|
+
"birthdate": "2018-03-03",
|
|
198
|
+
"email": [
|
|
199
|
+
{},
|
|
200
|
+
{}
|
|
201
|
+
],
|
|
202
|
+
"phone": [
|
|
203
|
+
{},
|
|
204
|
+
{}
|
|
205
|
+
],
|
|
206
|
+
"address": [
|
|
207
|
+
{},
|
|
208
|
+
{}
|
|
209
|
+
],
|
|
210
|
+
"account": [
|
|
211
|
+
{}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
"brand": {
|
|
215
|
+
"id": 123453,
|
|
216
|
+
"name": "Brand name",
|
|
217
|
+
"signature": "Signature"
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
\`\`\`
|
|
221
|
+
|
|
222
|
+
</details>
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### \`replaceTemplates\`
|
|
227
|
+
|
|
228
|
+
Replace variables in handlebars templates
|
|
229
|
+
|
|
230
|
+
\`POST /v1/template-variables:replace\`
|
|
231
|
+
|
|
232
|
+
\`\`\`ts
|
|
233
|
+
const { data } = await client.replaceTemplates(
|
|
234
|
+
null,
|
|
235
|
+
{
|
|
236
|
+
inputs: ['Hello, {{contact.first_name}}!
|
|
237
|
+
|
|
238
|
+
{{{brand.signature}}}
|
|
239
|
+
'],
|
|
240
|
+
parameters: {
|
|
241
|
+
template_type: 'email',
|
|
242
|
+
language: 'de',
|
|
243
|
+
main_entity_id: '63753437-c9e2-4e83-82bb-b1c666514561',
|
|
244
|
+
brand_id: 123451,
|
|
245
|
+
user_id: '50001',
|
|
246
|
+
user_org_id: '729224',
|
|
247
|
+
custom_variables: [
|
|
248
|
+
{
|
|
249
|
+
variable: '{{craftsmen.invitation_link}}',
|
|
250
|
+
value: 'https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19'
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
context_data: {},
|
|
254
|
+
template_name: 'string',
|
|
255
|
+
template_tags: ['string'],
|
|
256
|
+
variables_version: '2'
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
)
|
|
260
|
+
\`\`\`
|
|
261
|
+
|
|
262
|
+
<details>
|
|
263
|
+
<summary>Response</summary>
|
|
264
|
+
|
|
265
|
+
\`\`\`json
|
|
266
|
+
{
|
|
267
|
+
"outputs": ["[Brand Name GmbH] Order confirmation\\nHello Customer Name\\n\\n<span color=\\"#ccc\\">Brand Name GmbH</span>\\n<img src=\\"https://logobucket.s3.amazonaws.com/brandlogo.png\\" alt=\\"Brand Name\\"/>\\n<a href=\\"https://company.com/imprint\\">imprint</a>\\n"]
|
|
268
|
+
}
|
|
269
|
+
\`\`\`
|
|
270
|
+
|
|
271
|
+
</details>
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
### \`replaceTemplatesV2\`
|
|
276
|
+
|
|
277
|
+
Replace variables in templates (V2)
|
|
278
|
+
|
|
279
|
+
\`POST /v2/template:replace\`
|
|
280
|
+
|
|
281
|
+
\`\`\`ts
|
|
282
|
+
const { data } = await client.replaceTemplatesV2(
|
|
283
|
+
null,
|
|
284
|
+
{
|
|
285
|
+
inputs: ['Hello, {{contact.first_name}}!
|
|
286
|
+
'],
|
|
287
|
+
parameters: {
|
|
288
|
+
template_type: 'email',
|
|
289
|
+
language: 'de',
|
|
290
|
+
main_entity_id: '63753437-c9e2-4e83-82bb-b1c666514561',
|
|
291
|
+
brand_id: 123451,
|
|
292
|
+
user_id: '50001',
|
|
293
|
+
user_org_id: '729224',
|
|
294
|
+
custom_variables: [
|
|
295
|
+
{
|
|
296
|
+
variable: '{{craftsmen.invitation_link}}',
|
|
297
|
+
value: 'https://partner.epilot.cloud/activate-account?user_name=htny.pct%2Btet%40gmail.com&confirmation_code=EdXPRW19'
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
context_data: {},
|
|
301
|
+
template_name: 'string',
|
|
302
|
+
template_tags: ['string'],
|
|
303
|
+
variables_version: '2'
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
)
|
|
307
|
+
\`\`\`
|
|
308
|
+
|
|
309
|
+
<details>
|
|
310
|
+
<summary>Response</summary>
|
|
311
|
+
|
|
312
|
+
\`\`\`json
|
|
313
|
+
{
|
|
314
|
+
"outputs": {
|
|
315
|
+
"Hello {{first_name}}": "Hello John",
|
|
316
|
+
"{{first_name}}": "John",
|
|
317
|
+
"{{product_images[*].public_url}}": ["http://myimage.server.com/img1.png", "http://myimage.server.com/img2.png"]
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
\`\`\`
|
|
321
|
+
|
|
322
|
+
</details>
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
### \`getCustomVariables\`
|
|
327
|
+
|
|
328
|
+
Get custom variables
|
|
329
|
+
|
|
330
|
+
\`GET /v1/custom-variables\`
|
|
331
|
+
|
|
332
|
+
\`\`\`ts
|
|
333
|
+
const { data } = await client.getCustomVariables()
|
|
334
|
+
\`\`\`
|
|
335
|
+
|
|
336
|
+
<details>
|
|
337
|
+
<summary>Response</summary>
|
|
338
|
+
|
|
339
|
+
\`\`\`json
|
|
340
|
+
[
|
|
341
|
+
{
|
|
342
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
343
|
+
"type": "order_table",
|
|
344
|
+
"name": "My Custom table",
|
|
345
|
+
"key": "my_custom_table",
|
|
346
|
+
"_tags": ["string"],
|
|
347
|
+
"helper_params": ["param1", "param2"],
|
|
348
|
+
"helper_logic": "return param1 * param2;",
|
|
349
|
+
"config": {
|
|
350
|
+
"header": null,
|
|
351
|
+
"style": {},
|
|
352
|
+
"columns": [],
|
|
353
|
+
"body": {},
|
|
354
|
+
"footer": {}
|
|
355
|
+
},
|
|
356
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
357
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
358
|
+
"created_by": "100042",
|
|
359
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
360
|
+
"updated_by": "100042"
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
\`\`\`
|
|
364
|
+
|
|
365
|
+
</details>
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
### \`createCustomVariable\`
|
|
370
|
+
|
|
371
|
+
Create custom variable
|
|
372
|
+
|
|
373
|
+
\`POST /v1/custom-variables\`
|
|
374
|
+
|
|
375
|
+
\`\`\`ts
|
|
376
|
+
const { data } = await client.createCustomVariable(
|
|
377
|
+
null,
|
|
378
|
+
{
|
|
379
|
+
id: 'rbse777b-3cf8-4bff-bb0c-253fd1123250',
|
|
380
|
+
type: 'order_table',
|
|
381
|
+
name: 'My Custom table',
|
|
382
|
+
key: 'my_custom_table',
|
|
383
|
+
_tags: ['string'],
|
|
384
|
+
helper_params: ['param1', 'param2'],
|
|
385
|
+
helper_logic: 'return param1 * param2;',
|
|
386
|
+
config: {
|
|
387
|
+
header: null,
|
|
388
|
+
style: {
|
|
389
|
+
color: '#222',
|
|
390
|
+
background: '#fff',
|
|
391
|
+
'font-size': '16px',
|
|
392
|
+
'font-family': '',
|
|
393
|
+
'padding-bottom': '4px',
|
|
394
|
+
'font-weight': 'bold',
|
|
395
|
+
border: 'none !important',
|
|
396
|
+
'text-align': 'left'
|
|
397
|
+
},
|
|
398
|
+
columns: [
|
|
399
|
+
{ /* ... */ },
|
|
400
|
+
{ /* ... */ },
|
|
401
|
+
/* ... 4 more */
|
|
402
|
+
],
|
|
403
|
+
body: {
|
|
404
|
+
product_name: { /* ... */ },
|
|
405
|
+
price_description: { /* ... */ },
|
|
406
|
+
product_description: { /* ... */ },
|
|
407
|
+
quantity: { /* ... */ },
|
|
408
|
+
tax: { /* ... */ },
|
|
409
|
+
unit_amount: { /* ... */ },
|
|
410
|
+
net_total: { /* ... */ },
|
|
411
|
+
gross_total: { /* ... */ }
|
|
412
|
+
},
|
|
413
|
+
footer: {
|
|
414
|
+
payment_type: { /* ... */ },
|
|
415
|
+
net_total: { /* ... */ },
|
|
416
|
+
amount_tax: { /* ... */ },
|
|
417
|
+
gross_total: { /* ... */ }
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
template: '<table style="table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;">
|
|
421
|
+
<thead>
|
|
422
|
+
<tr style="height: 48px;border-bottom: 1px solid #D5E1ED;">
|
|
423
|
+
{{#each table_config.header.columns as |column|}}
|
|
424
|
+
{{#if column.enable}}
|
|
425
|
+
<th style="{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};">{{column._label}}</th>
|
|
426
|
+
{{/if}}
|
|
427
|
+
{{/each}}
|
|
428
|
+
</tr>
|
|
429
|
+
</thead>
|
|
430
|
+
<tbody style="vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;">
|
|
431
|
+
<!-- Start rendering products -->
|
|
432
|
+
{{#each order.products as |product|}}
|
|
433
|
+
{{#if @last}}
|
|
434
|
+
<tr style="height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;">
|
|
435
|
+
{{else}}
|
|
436
|
+
<tr style="height: 48px;;font-size:14px;">
|
|
437
|
+
{{/if}}
|
|
438
|
+
{{#each @root.table_config.header.columns as |column|}}
|
|
439
|
+
{{#if column.enable}}
|
|
440
|
+
{{#if (eq column.id \\'item\\')}}
|
|
441
|
+
<!-- Item -->
|
|
442
|
+
<td style="{{makeStyle @root.table_config.body.product_name.style}}">
|
|
443
|
+
{{#if @root.table_config.body.product_name.enable}}
|
|
444
|
+
{{product.name}}
|
|
445
|
+
{{/if}}
|
|
446
|
+
{{#if @root.table_config.body.price_description.enable}}
|
|
447
|
+
<br>
|
|
448
|
+
<span style="{{makeStyle @root.table_config.body.price_description.style}}">{{product.price.description}}</span>
|
|
449
|
+
{{/if}}
|
|
450
|
+
{{#if @root.table_config.body.product_description.enable}}
|
|
451
|
+
<br>
|
|
452
|
+
<span style="{{makeStyle @root.table_config.body.product_description.style}}">{{product.description}}</span>
|
|
453
|
+
{{/if}}
|
|
454
|
+
</td>
|
|
455
|
+
{{/if}}
|
|
456
|
+
{{#if (eq column.id \\'quantity\\')}}
|
|
457
|
+
<!-- Quantity -->
|
|
458
|
+
<td style="{{makeStyle @root.table_config.body.quantity.style}}">{{product.price.quantity}}
|
|
459
|
+
</td>
|
|
460
|
+
{{/if}}
|
|
461
|
+
{{#if (eq column.id \\'tax\\')}}
|
|
462
|
+
<!-- Tax -->
|
|
463
|
+
<td style="{{makeStyle @root.table_config.body.tax.style}}">
|
|
464
|
+
{{product.price.tax_rate}}
|
|
465
|
+
</td>
|
|
466
|
+
{{/if}}
|
|
467
|
+
{{#if (eq column.id \\'unit_amount\\')}}
|
|
468
|
+
<!-- Unit amount -->
|
|
469
|
+
<td style="{{makeStyle @root.table_config.body.unit_amount.style}}">
|
|
470
|
+
{{product.price.unit_amount_net}}
|
|
471
|
+
</td>
|
|
472
|
+
{{/if}}
|
|
473
|
+
{{#if (eq column.id \\'net_total\\')}}
|
|
474
|
+
<!-- Amount Subtotal -->
|
|
475
|
+
<td style="{{makeStyle @root.table_config.body.net_total.style}}">
|
|
476
|
+
{{product.price.amount_subtotal}}
|
|
477
|
+
</td>
|
|
478
|
+
{{/if}}
|
|
479
|
+
{{#if (eq column.id \\'amount_tax\\')}}
|
|
480
|
+
<!-- Tax amount-->
|
|
481
|
+
<td style="{{makeStyle @root.table_config.body.amount_tax.style}}">
|
|
482
|
+
{{product.price.amount_tax}}
|
|
483
|
+
</td>
|
|
484
|
+
{{/if}}
|
|
485
|
+
{{#if (eq column.id \\'gross_total\\')}}
|
|
486
|
+
<!-- Gross total -->
|
|
487
|
+
<td style="{{makeStyle @root.table_config.body.gross_total.style}}">
|
|
488
|
+
{{product.price.amount_total}}
|
|
489
|
+
{{#if @root.table_config.body.payment_type.enable}}
|
|
490
|
+
{{#if (eq product.price.type \\'recurring\\')}}
|
|
491
|
+
<br>
|
|
492
|
+
<span style="{{makeStyle @root.table_config.body.payment_type.style}}">{{product.price.billing_period}}</span>
|
|
493
|
+
{{/if}}
|
|
494
|
+
{{/if}}
|
|
495
|
+
</td>
|
|
496
|
+
{{/if}}
|
|
497
|
+
{{/if}}
|
|
498
|
+
{{/each}}
|
|
499
|
+
</tr>
|
|
500
|
+
{{/each}}
|
|
501
|
+
<!-- Finish rendering products -->
|
|
502
|
+
{{#if table_config.footer.gross_total.enable}}
|
|
503
|
+
{{#each order.total_details.recurrences as |item|}}
|
|
504
|
+
<tr style="height: 48px;font-size: 14px;">
|
|
505
|
+
<td style="padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;" colspan="{{calculate_colspan @root.table_config}}"></td>
|
|
506
|
+
{{#if @root.table_config.footer.payment_type.enable}}
|
|
507
|
+
<td style="{{makeStyle @root.table_config.footer.payment_type.style}}" colspan="2">{{item.billing_period}}</td>
|
|
508
|
+
{{/if}}
|
|
509
|
+
{{#if (isColumnEnabled @root.table_config \\'net_total\\')}}
|
|
510
|
+
{{#if @root.table_config.footer.net_total.enable}}
|
|
511
|
+
<td style="{{makeStyle @root.table_config.footer.net_total.style}}">{{item.amount_subtotal}}</td>
|
|
512
|
+
{{/if}}
|
|
513
|
+
{{/if}}
|
|
514
|
+
<td style="{{makeStyle @root.table_config.footer.gross_total.style}}">{{item.amount_total}}
|
|
515
|
+
{{#if @root.table_config.footer.amount_tax.enable}}
|
|
516
|
+
<br>
|
|
517
|
+
<span style="{{makeStyle @root.table_config.footer.amount_tax.style}}">{{item.full_amount_tax}}</span>
|
|
518
|
+
{{/if}}
|
|
519
|
+
</td>
|
|
520
|
+
</tr>
|
|
521
|
+
{{/each}}
|
|
522
|
+
{{/if}}
|
|
523
|
+
<tr style="height:16px !important;"></tr>
|
|
524
|
+
</tbody>
|
|
525
|
+
</table>
|
|
526
|
+
',
|
|
527
|
+
created_at: '2022-04-19T12:41:43.662Z',
|
|
528
|
+
created_by: '100042',
|
|
529
|
+
updated_at: '2022-04-20T12:41:43.662Z',
|
|
530
|
+
updated_by: '100042'
|
|
531
|
+
},
|
|
532
|
+
)
|
|
533
|
+
\`\`\`
|
|
534
|
+
|
|
535
|
+
<details>
|
|
536
|
+
<summary>Response</summary>
|
|
537
|
+
|
|
538
|
+
\`\`\`json
|
|
539
|
+
{
|
|
540
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
541
|
+
"type": "order_table",
|
|
542
|
+
"name": "My Custom table",
|
|
543
|
+
"key": "my_custom_table",
|
|
544
|
+
"_tags": ["string"],
|
|
545
|
+
"helper_params": ["param1", "param2"],
|
|
546
|
+
"helper_logic": "return param1 * param2;",
|
|
547
|
+
"config": {
|
|
548
|
+
"header": null,
|
|
549
|
+
"style": {
|
|
550
|
+
"color": "#222",
|
|
551
|
+
"background": "#fff",
|
|
552
|
+
"font-size": "16px",
|
|
553
|
+
"font-family": "",
|
|
554
|
+
"padding-bottom": "4px",
|
|
555
|
+
"font-weight": "bold",
|
|
556
|
+
"border": "none !important",
|
|
557
|
+
"text-align": "left"
|
|
558
|
+
},
|
|
559
|
+
"columns": [
|
|
560
|
+
{},
|
|
561
|
+
{}
|
|
562
|
+
],
|
|
563
|
+
"body": {
|
|
564
|
+
"product_name": {},
|
|
565
|
+
"price_description": {},
|
|
566
|
+
"product_description": {},
|
|
567
|
+
"quantity": {},
|
|
568
|
+
"tax": {},
|
|
569
|
+
"unit_amount": {},
|
|
570
|
+
"net_total": {},
|
|
571
|
+
"gross_total": {}
|
|
572
|
+
},
|
|
573
|
+
"footer": {
|
|
574
|
+
"payment_type": {},
|
|
575
|
+
"net_total": {},
|
|
576
|
+
"amount_tax": {},
|
|
577
|
+
"gross_total": {}
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
581
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
582
|
+
"created_by": "100042",
|
|
583
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
584
|
+
"updated_by": "100042"
|
|
585
|
+
}
|
|
586
|
+
\`\`\`
|
|
587
|
+
|
|
588
|
+
</details>
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
### \`searchCustomVariables\`
|
|
593
|
+
|
|
594
|
+
Search custom variables
|
|
595
|
+
|
|
596
|
+
\`POST /v1/custom-variables:search\`
|
|
597
|
+
|
|
598
|
+
\`\`\`ts
|
|
599
|
+
const { data } = await client.searchCustomVariables(
|
|
600
|
+
null,
|
|
601
|
+
{
|
|
602
|
+
type: 'order_table',
|
|
603
|
+
tags: ['string'],
|
|
604
|
+
query: 'logo',
|
|
605
|
+
from: 0,
|
|
606
|
+
size: 25,
|
|
607
|
+
sort_by: 'created_at, name, key',
|
|
608
|
+
fields: ['string']
|
|
609
|
+
},
|
|
610
|
+
)
|
|
611
|
+
\`\`\`
|
|
612
|
+
|
|
613
|
+
<details>
|
|
614
|
+
<summary>Response</summary>
|
|
615
|
+
|
|
616
|
+
\`\`\`json
|
|
617
|
+
{
|
|
618
|
+
"results": [
|
|
619
|
+
{
|
|
620
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
621
|
+
"type": "order_table",
|
|
622
|
+
"name": "My Custom table",
|
|
623
|
+
"key": "my_custom_table",
|
|
624
|
+
"_tags": ["string"],
|
|
625
|
+
"helper_params": ["param1", "param2"],
|
|
626
|
+
"helper_logic": "return param1 * param2;",
|
|
627
|
+
"config": {},
|
|
628
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
629
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
630
|
+
"created_by": "100042",
|
|
631
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
632
|
+
"updated_by": "100042"
|
|
633
|
+
}
|
|
634
|
+
],
|
|
635
|
+
"hits": 100
|
|
636
|
+
}
|
|
637
|
+
\`\`\`
|
|
638
|
+
|
|
639
|
+
</details>
|
|
640
|
+
|
|
641
|
+
---
|
|
642
|
+
|
|
643
|
+
### \`updateCustomVariable\`
|
|
644
|
+
|
|
645
|
+
Update custom variable
|
|
646
|
+
|
|
647
|
+
\`PUT /v1/custom-variables/{id}\`
|
|
648
|
+
|
|
649
|
+
\`\`\`ts
|
|
650
|
+
const { data } = await client.updateCustomVariable(
|
|
651
|
+
{
|
|
652
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
id: 'rbse777b-3cf8-4bff-bb0c-253fd1123250',
|
|
656
|
+
type: 'order_table',
|
|
657
|
+
name: 'My Custom table',
|
|
658
|
+
key: 'my_custom_table',
|
|
659
|
+
_tags: ['string'],
|
|
660
|
+
helper_params: ['param1', 'param2'],
|
|
661
|
+
helper_logic: 'return param1 * param2;',
|
|
662
|
+
config: {
|
|
663
|
+
header: null,
|
|
664
|
+
style: {
|
|
665
|
+
color: '#222',
|
|
666
|
+
background: '#fff',
|
|
667
|
+
'font-size': '16px',
|
|
668
|
+
'font-family': '',
|
|
669
|
+
'padding-bottom': '4px',
|
|
670
|
+
'font-weight': 'bold',
|
|
671
|
+
border: 'none !important',
|
|
672
|
+
'text-align': 'left'
|
|
673
|
+
},
|
|
674
|
+
columns: [
|
|
675
|
+
{ /* ... */ },
|
|
676
|
+
{ /* ... */ },
|
|
677
|
+
/* ... 4 more */
|
|
678
|
+
],
|
|
679
|
+
body: {
|
|
680
|
+
product_name: { /* ... */ },
|
|
681
|
+
price_description: { /* ... */ },
|
|
682
|
+
product_description: { /* ... */ },
|
|
683
|
+
quantity: { /* ... */ },
|
|
684
|
+
tax: { /* ... */ },
|
|
685
|
+
unit_amount: { /* ... */ },
|
|
686
|
+
net_total: { /* ... */ },
|
|
687
|
+
gross_total: { /* ... */ }
|
|
688
|
+
},
|
|
689
|
+
footer: {
|
|
690
|
+
payment_type: { /* ... */ },
|
|
691
|
+
net_total: { /* ... */ },
|
|
692
|
+
amount_tax: { /* ... */ },
|
|
693
|
+
gross_total: { /* ... */ }
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
template: '<table style="table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;">
|
|
697
|
+
<thead>
|
|
698
|
+
<tr style="height: 48px;border-bottom: 1px solid #D5E1ED;">
|
|
699
|
+
{{#each table_config.header.columns as |column|}}
|
|
700
|
+
{{#if column.enable}}
|
|
701
|
+
<th style="{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};">{{column._label}}</th>
|
|
702
|
+
{{/if}}
|
|
703
|
+
{{/each}}
|
|
704
|
+
</tr>
|
|
705
|
+
</thead>
|
|
706
|
+
<tbody style="vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;">
|
|
707
|
+
<!-- Start rendering products -->
|
|
708
|
+
{{#each order.products as |product|}}
|
|
709
|
+
{{#if @last}}
|
|
710
|
+
<tr style="height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;">
|
|
711
|
+
{{else}}
|
|
712
|
+
<tr style="height: 48px;;font-size:14px;">
|
|
713
|
+
{{/if}}
|
|
714
|
+
{{#each @root.table_config.header.columns as |column|}}
|
|
715
|
+
{{#if column.enable}}
|
|
716
|
+
{{#if (eq column.id \\'item\\')}}
|
|
717
|
+
<!-- Item -->
|
|
718
|
+
<td style="{{makeStyle @root.table_config.body.product_name.style}}">
|
|
719
|
+
{{#if @root.table_config.body.product_name.enable}}
|
|
720
|
+
{{product.name}}
|
|
721
|
+
{{/if}}
|
|
722
|
+
{{#if @root.table_config.body.price_description.enable}}
|
|
723
|
+
<br>
|
|
724
|
+
<span style="{{makeStyle @root.table_config.body.price_description.style}}">{{product.price.description}}</span>
|
|
725
|
+
{{/if}}
|
|
726
|
+
{{#if @root.table_config.body.product_description.enable}}
|
|
727
|
+
<br>
|
|
728
|
+
<span style="{{makeStyle @root.table_config.body.product_description.style}}">{{product.description}}</span>
|
|
729
|
+
{{/if}}
|
|
730
|
+
</td>
|
|
731
|
+
{{/if}}
|
|
732
|
+
{{#if (eq column.id \\'quantity\\')}}
|
|
733
|
+
<!-- Quantity -->
|
|
734
|
+
<td style="{{makeStyle @root.table_config.body.quantity.style}}">{{product.price.quantity}}
|
|
735
|
+
</td>
|
|
736
|
+
{{/if}}
|
|
737
|
+
{{#if (eq column.id \\'tax\\')}}
|
|
738
|
+
<!-- Tax -->
|
|
739
|
+
<td style="{{makeStyle @root.table_config.body.tax.style}}">
|
|
740
|
+
{{product.price.tax_rate}}
|
|
741
|
+
</td>
|
|
742
|
+
{{/if}}
|
|
743
|
+
{{#if (eq column.id \\'unit_amount\\')}}
|
|
744
|
+
<!-- Unit amount -->
|
|
745
|
+
<td style="{{makeStyle @root.table_config.body.unit_amount.style}}">
|
|
746
|
+
{{product.price.unit_amount_net}}
|
|
747
|
+
</td>
|
|
748
|
+
{{/if}}
|
|
749
|
+
{{#if (eq column.id \\'net_total\\')}}
|
|
750
|
+
<!-- Amount Subtotal -->
|
|
751
|
+
<td style="{{makeStyle @root.table_config.body.net_total.style}}">
|
|
752
|
+
{{product.price.amount_subtotal}}
|
|
753
|
+
</td>
|
|
754
|
+
{{/if}}
|
|
755
|
+
{{#if (eq column.id \\'amount_tax\\')}}
|
|
756
|
+
<!-- Tax amount-->
|
|
757
|
+
<td style="{{makeStyle @root.table_config.body.amount_tax.style}}">
|
|
758
|
+
{{product.price.amount_tax}}
|
|
759
|
+
</td>
|
|
760
|
+
{{/if}}
|
|
761
|
+
{{#if (eq column.id \\'gross_total\\')}}
|
|
762
|
+
<!-- Gross total -->
|
|
763
|
+
<td style="{{makeStyle @root.table_config.body.gross_total.style}}">
|
|
764
|
+
{{product.price.amount_total}}
|
|
765
|
+
{{#if @root.table_config.body.payment_type.enable}}
|
|
766
|
+
{{#if (eq product.price.type \\'recurring\\')}}
|
|
767
|
+
<br>
|
|
768
|
+
<span style="{{makeStyle @root.table_config.body.payment_type.style}}">{{product.price.billing_period}}</span>
|
|
769
|
+
{{/if}}
|
|
770
|
+
{{/if}}
|
|
771
|
+
</td>
|
|
772
|
+
{{/if}}
|
|
773
|
+
{{/if}}
|
|
774
|
+
{{/each}}
|
|
775
|
+
</tr>
|
|
776
|
+
{{/each}}
|
|
777
|
+
<!-- Finish rendering products -->
|
|
778
|
+
{{#if table_config.footer.gross_total.enable}}
|
|
779
|
+
{{#each order.total_details.recurrences as |item|}}
|
|
780
|
+
<tr style="height: 48px;font-size: 14px;">
|
|
781
|
+
<td style="padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;" colspan="{{calculate_colspan @root.table_config}}"></td>
|
|
782
|
+
{{#if @root.table_config.footer.payment_type.enable}}
|
|
783
|
+
<td style="{{makeStyle @root.table_config.footer.payment_type.style}}" colspan="2">{{item.billing_period}}</td>
|
|
784
|
+
{{/if}}
|
|
785
|
+
{{#if (isColumnEnabled @root.table_config \\'net_total\\')}}
|
|
786
|
+
{{#if @root.table_config.footer.net_total.enable}}
|
|
787
|
+
<td style="{{makeStyle @root.table_config.footer.net_total.style}}">{{item.amount_subtotal}}</td>
|
|
788
|
+
{{/if}}
|
|
789
|
+
{{/if}}
|
|
790
|
+
<td style="{{makeStyle @root.table_config.footer.gross_total.style}}">{{item.amount_total}}
|
|
791
|
+
{{#if @root.table_config.footer.amount_tax.enable}}
|
|
792
|
+
<br>
|
|
793
|
+
<span style="{{makeStyle @root.table_config.footer.amount_tax.style}}">{{item.full_amount_tax}}</span>
|
|
794
|
+
{{/if}}
|
|
795
|
+
</td>
|
|
796
|
+
</tr>
|
|
797
|
+
{{/each}}
|
|
798
|
+
{{/if}}
|
|
799
|
+
<tr style="height:16px !important;"></tr>
|
|
800
|
+
</tbody>
|
|
801
|
+
</table>
|
|
802
|
+
',
|
|
803
|
+
created_at: '2022-04-19T12:41:43.662Z',
|
|
804
|
+
created_by: '100042',
|
|
805
|
+
updated_at: '2022-04-20T12:41:43.662Z',
|
|
806
|
+
updated_by: '100042'
|
|
807
|
+
},
|
|
808
|
+
)
|
|
809
|
+
\`\`\`
|
|
810
|
+
|
|
811
|
+
<details>
|
|
812
|
+
<summary>Response</summary>
|
|
813
|
+
|
|
814
|
+
\`\`\`json
|
|
815
|
+
{
|
|
816
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
817
|
+
"type": "order_table",
|
|
818
|
+
"name": "My Custom table",
|
|
819
|
+
"key": "my_custom_table",
|
|
820
|
+
"_tags": ["string"],
|
|
821
|
+
"helper_params": ["param1", "param2"],
|
|
822
|
+
"helper_logic": "return param1 * param2;",
|
|
823
|
+
"config": {
|
|
824
|
+
"header": null,
|
|
825
|
+
"style": {
|
|
826
|
+
"color": "#222",
|
|
827
|
+
"background": "#fff",
|
|
828
|
+
"font-size": "16px",
|
|
829
|
+
"font-family": "",
|
|
830
|
+
"padding-bottom": "4px",
|
|
831
|
+
"font-weight": "bold",
|
|
832
|
+
"border": "none !important",
|
|
833
|
+
"text-align": "left"
|
|
834
|
+
},
|
|
835
|
+
"columns": [
|
|
836
|
+
{},
|
|
837
|
+
{}
|
|
838
|
+
],
|
|
839
|
+
"body": {
|
|
840
|
+
"product_name": {},
|
|
841
|
+
"price_description": {},
|
|
842
|
+
"product_description": {},
|
|
843
|
+
"quantity": {},
|
|
844
|
+
"tax": {},
|
|
845
|
+
"unit_amount": {},
|
|
846
|
+
"net_total": {},
|
|
847
|
+
"gross_total": {}
|
|
848
|
+
},
|
|
849
|
+
"footer": {
|
|
850
|
+
"payment_type": {},
|
|
851
|
+
"net_total": {},
|
|
852
|
+
"amount_tax": {},
|
|
853
|
+
"gross_total": {}
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
857
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
858
|
+
"created_by": "100042",
|
|
859
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
860
|
+
"updated_by": "100042"
|
|
861
|
+
}
|
|
862
|
+
\`\`\`
|
|
863
|
+
|
|
864
|
+
</details>
|
|
865
|
+
|
|
866
|
+
---
|
|
867
|
+
|
|
868
|
+
### \`getCustomVariable\`
|
|
869
|
+
|
|
870
|
+
Get custom variable
|
|
871
|
+
|
|
872
|
+
\`GET /v1/custom-variables/{id}\`
|
|
873
|
+
|
|
874
|
+
\`\`\`ts
|
|
875
|
+
const { data } = await client.getCustomVariable({
|
|
876
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
877
|
+
})
|
|
878
|
+
\`\`\`
|
|
879
|
+
|
|
880
|
+
<details>
|
|
881
|
+
<summary>Response</summary>
|
|
882
|
+
|
|
883
|
+
\`\`\`json
|
|
884
|
+
{
|
|
885
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
886
|
+
"type": "order_table",
|
|
887
|
+
"name": "My Custom table",
|
|
888
|
+
"key": "my_custom_table",
|
|
889
|
+
"_tags": ["string"],
|
|
890
|
+
"helper_params": ["param1", "param2"],
|
|
891
|
+
"helper_logic": "return param1 * param2;",
|
|
892
|
+
"config": {
|
|
893
|
+
"header": null,
|
|
894
|
+
"style": {
|
|
895
|
+
"color": "#222",
|
|
896
|
+
"background": "#fff",
|
|
897
|
+
"font-size": "16px",
|
|
898
|
+
"font-family": "",
|
|
899
|
+
"padding-bottom": "4px",
|
|
900
|
+
"font-weight": "bold",
|
|
901
|
+
"border": "none !important",
|
|
902
|
+
"text-align": "left"
|
|
903
|
+
},
|
|
904
|
+
"columns": [
|
|
905
|
+
{},
|
|
906
|
+
{}
|
|
907
|
+
],
|
|
908
|
+
"body": {
|
|
909
|
+
"product_name": {},
|
|
910
|
+
"price_description": {},
|
|
911
|
+
"product_description": {},
|
|
912
|
+
"quantity": {},
|
|
913
|
+
"tax": {},
|
|
914
|
+
"unit_amount": {},
|
|
915
|
+
"net_total": {},
|
|
916
|
+
"gross_total": {}
|
|
917
|
+
},
|
|
918
|
+
"footer": {
|
|
919
|
+
"payment_type": {},
|
|
920
|
+
"net_total": {},
|
|
921
|
+
"amount_tax": {},
|
|
922
|
+
"gross_total": {}
|
|
923
|
+
}
|
|
924
|
+
},
|
|
925
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
926
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
927
|
+
"created_by": "100042",
|
|
928
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
929
|
+
"updated_by": "100042"
|
|
930
|
+
}
|
|
931
|
+
\`\`\`
|
|
932
|
+
|
|
933
|
+
</details>
|
|
934
|
+
|
|
935
|
+
---
|
|
936
|
+
|
|
937
|
+
### \`deleteCustomVariable\`
|
|
938
|
+
|
|
939
|
+
Delete custom variable
|
|
940
|
+
|
|
941
|
+
\`DELETE /v1/custom-variables/{id}\`
|
|
942
|
+
|
|
943
|
+
\`\`\`ts
|
|
944
|
+
const { data } = await client.deleteCustomVariable({
|
|
945
|
+
id: '123e4567-e89b-12d3-a456-426614174000',
|
|
946
|
+
})
|
|
947
|
+
\`\`\`
|
|
948
|
+
|
|
949
|
+
---
|
|
950
|
+
|
|
951
|
+
### \`getBluePrintTableConfig\`
|
|
952
|
+
|
|
953
|
+
Get default table config
|
|
954
|
+
|
|
955
|
+
\`GET /v1/custom-variables/order-table-blueprint\`
|
|
956
|
+
|
|
957
|
+
\`\`\`ts
|
|
958
|
+
const { data } = await client.getBluePrintTableConfig()
|
|
959
|
+
\`\`\`
|
|
960
|
+
|
|
961
|
+
<details>
|
|
962
|
+
<summary>Response</summary>
|
|
963
|
+
|
|
964
|
+
\`\`\`json
|
|
965
|
+
{
|
|
966
|
+
"id": "rbse777b-3cf8-4bff-bb0c-253fd1123250",
|
|
967
|
+
"type": "order_table",
|
|
968
|
+
"name": "My Custom table",
|
|
969
|
+
"key": "my_custom_table",
|
|
970
|
+
"_tags": ["string"],
|
|
971
|
+
"helper_params": ["param1", "param2"],
|
|
972
|
+
"helper_logic": "return param1 * param2;",
|
|
973
|
+
"config": {
|
|
974
|
+
"header": null,
|
|
975
|
+
"style": {
|
|
976
|
+
"color": "#222",
|
|
977
|
+
"background": "#fff",
|
|
978
|
+
"font-size": "16px",
|
|
979
|
+
"font-family": "",
|
|
980
|
+
"padding-bottom": "4px",
|
|
981
|
+
"font-weight": "bold",
|
|
982
|
+
"border": "none !important",
|
|
983
|
+
"text-align": "left"
|
|
984
|
+
},
|
|
985
|
+
"columns": [
|
|
986
|
+
{},
|
|
987
|
+
{}
|
|
988
|
+
],
|
|
989
|
+
"body": {
|
|
990
|
+
"product_name": {},
|
|
991
|
+
"price_description": {},
|
|
992
|
+
"product_description": {},
|
|
993
|
+
"quantity": {},
|
|
994
|
+
"tax": {},
|
|
995
|
+
"unit_amount": {},
|
|
996
|
+
"net_total": {},
|
|
997
|
+
"gross_total": {}
|
|
998
|
+
},
|
|
999
|
+
"footer": {
|
|
1000
|
+
"payment_type": {},
|
|
1001
|
+
"net_total": {},
|
|
1002
|
+
"amount_tax": {},
|
|
1003
|
+
"gross_total": {}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
"template": "<table style=\\"table-layout: fixed;width: 100%;max-width: 1000px;border-collapse: collapse;\\">\\n <thead>\\n <tr style=\\"height: 48px;border-bottom: 1px solid #D5E1ED;\\">\\n {{#each table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n <th style=\\"{{makeStyle @root.table_config.header.style}};{{makeStyle column.style}};\\">{{column._label}}</th>\\n {{/if}}\\n {{/each}}\\n </tr>\\n </thead>\\n <tbody style=\\"vertical-align: baseline !important;font-weight: 400;font-size: 12px;position: relative;\\">\\n <!-- Start rendering products -->\\n {{#each order.products as |product|}}\\n {{#if @last}}\\n <tr style=\\"height: 48px;;font-size:14px;border-bottom: 1px solid #D5E1ED;\\">\\n {{else}}\\n <tr style=\\"height: 48px;;font-size:14px;\\">\\n {{/if}}\\n {{#each @root.table_config.header.columns as |column|}}\\n {{#if column.enable}}\\n {{#if (eq column.id 'item')}}\\n <!-- Item -->\\n <td style=\\"{{makeStyle @root.table_config.body.product_name.style}}\\">\\n {{#if @root.table_config.body.product_name.enable}}\\n {{product.name}}\\n {{/if}}\\n {{#if @root.table_config.body.price_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.price_description.style}}\\">{{product.price.description}}</span>\\n {{/if}}\\n {{#if @root.table_config.body.product_description.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.product_description.style}}\\">{{product.description}}</span>\\n {{/if}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'quantity')}}\\n <!-- Quantity -->\\n <td style=\\"{{makeStyle @root.table_config.body.quantity.style}}\\">{{product.price.quantity}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'tax')}}\\n <!-- Tax -->\\n <td style=\\"{{makeStyle @root.table_config.body.tax.style}}\\">\\n {{product.price.tax_rate}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'unit_amount')}}\\n <!-- Unit amount -->\\n <td style=\\"{{makeStyle @root.table_config.body.unit_amount.style}}\\">\\n {{product.price.unit_amount_net}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'net_total')}}\\n <!-- Amount Subtotal -->\\n <td style=\\"{{makeStyle @root.table_config.body.net_total.style}}\\">\\n {{product.price.amount_subtotal}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'amount_tax')}}\\n <!-- Tax amount-->\\n <td style=\\"{{makeStyle @root.table_config.body.amount_tax.style}}\\">\\n {{product.price.amount_tax}}\\n </td>\\n {{/if}}\\n {{#if (eq column.id 'gross_total')}}\\n <!-- Gross total -->\\n <td style=\\"{{makeStyle @root.table_config.body.gross_total.style}}\\">\\n {{product.price.amount_total}}\\n {{#if @root.table_config.body.payment_type.enable}}\\n {{#if (eq product.price.type 'recurring')}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.body.payment_type.style}}\\">{{product.price.billing_period}}</span>\\n {{/if}}\\n {{/if}}\\n </td>\\n {{/if}}\\n {{/if}}\\n {{/each}}\\n </tr>\\n {{/each}}\\n <!-- Finish rendering products -->\\n {{#if table_config.footer.gross_total.enable}}\\n {{#each order.total_details.recurrences as |item|}}\\n <tr style=\\"height: 48px;font-size: 14px;\\">\\n <td style=\\"padding-top: 16px; padding-bottom: 8px; border: none !important; vertical-align: top;\\" colspan=\\"{{calculate_colspan @root.table_config}}\\"></td>\\n {{#if @root.table_config.footer.payment_type.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.payment_type.style}}\\" colspan=\\"2\\">{{item.billing_period}}</td>\\n {{/if}}\\n {{#if (isColumnEnabled @root.table_config 'net_total')}}\\n {{#if @root.table_config.footer.net_total.enable}}\\n <td style=\\"{{makeStyle @root.table_config.footer.net_total.style}}\\">{{item.amount_subtotal}}</td>\\n {{/if}}\\n {{/if}}\\n <td style=\\"{{makeStyle @root.table_config.footer.gross_total.style}}\\">{{item.amount_total}}\\n {{#if @root.table_config.footer.amount_tax.enable}}\\n <br>\\n <span style=\\"{{makeStyle @root.table_config.footer.amount_tax.style}}\\">{{item.full_amount_tax}}</span>\\n {{/if}}\\n </td>\\n </tr>\\n {{/each}}\\n {{/if}}\\n <tr style=\\"height:16px !important;\\"></tr>\\n </tbody>\\n</table>\\n",
|
|
1007
|
+
"created_at": "2022-04-19T12:41:43.662Z",
|
|
1008
|
+
"created_by": "100042",
|
|
1009
|
+
"updated_at": "2022-04-20T12:41:43.662Z",
|
|
1010
|
+
"updated_by": "100042"
|
|
1011
|
+
}
|
|
1012
|
+
\`\`\`
|
|
1013
|
+
|
|
1014
|
+
</details>
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
## Schemas
|
|
1019
|
+
|
|
1020
|
+
### \`Language\`
|
|
1021
|
+
|
|
1022
|
+
2-letter language code (ISO 639-1)
|
|
1023
|
+
|
|
1024
|
+
\`\`\`ts
|
|
1025
|
+
type Language = string
|
|
1026
|
+
\`\`\`
|
|
1027
|
+
|
|
1028
|
+
### \`VariableParameters\`
|
|
1029
|
+
|
|
1030
|
+
\`\`\`ts
|
|
1031
|
+
type VariableParameters = {
|
|
1032
|
+
template_type: "email" | "document"
|
|
1033
|
+
language?: string
|
|
1034
|
+
main_entity_id?: string // uuid
|
|
1035
|
+
brand_id?: number
|
|
1036
|
+
user_id?: string
|
|
1037
|
+
user_org_id?: string
|
|
1038
|
+
custom_variables?: Array<{
|
|
1039
|
+
variable?: string
|
|
1040
|
+
value?: string
|
|
1041
|
+
}>
|
|
1042
|
+
context_data?: object
|
|
1043
|
+
template_name?: string
|
|
1044
|
+
template_tags?: string[]
|
|
1045
|
+
variables_version?: string
|
|
1046
|
+
}
|
|
1047
|
+
\`\`\`
|
|
1048
|
+
|
|
1049
|
+
### \`ReplacementOutput\`
|
|
1050
|
+
|
|
1051
|
+
\`\`\`ts
|
|
1052
|
+
type ReplacementOutput = {
|
|
1053
|
+
outputs?: string[]
|
|
1054
|
+
}
|
|
1055
|
+
\`\`\`
|
|
1056
|
+
|
|
1057
|
+
### \`ReplacementOutputV2\`
|
|
1058
|
+
|
|
1059
|
+
\`\`\`ts
|
|
1060
|
+
type ReplacementOutputV2 = {
|
|
1061
|
+
outputs?: Record<string, string | number | boolean | unknown[] | Record<string, unknown>>
|
|
1062
|
+
}
|
|
1063
|
+
\`\`\`
|
|
1064
|
+
|
|
1065
|
+
### \`VariableResult\`
|
|
1066
|
+
|
|
1067
|
+
\`\`\`ts
|
|
1068
|
+
type VariableResult = {
|
|
1069
|
+
type?: "simple" | "partial"
|
|
1070
|
+
qrdata?: string
|
|
1071
|
+
group?: string
|
|
1072
|
+
insert?: string
|
|
1073
|
+
description?: string
|
|
1074
|
+
}
|
|
1075
|
+
\`\`\`
|
|
1076
|
+
|
|
1077
|
+
### \`CustomVariablesSearchParams\`
|
|
1078
|
+
|
|
1079
|
+
\`\`\`ts
|
|
1080
|
+
type CustomVariablesSearchParams = {
|
|
1081
|
+
type?: "order_table" | "custom" | "journey_link" | "snippet"
|
|
1082
|
+
tags?: string[]
|
|
1083
|
+
query?: string
|
|
1084
|
+
from?: number
|
|
1085
|
+
size?: number
|
|
1086
|
+
sort_by?: string
|
|
1087
|
+
fields?: string[]
|
|
1088
|
+
}
|
|
1089
|
+
\`\`\`
|
|
1090
|
+
|
|
1091
|
+
### \`VariableContext\`
|
|
1092
|
+
|
|
1093
|
+
\`\`\`ts
|
|
1094
|
+
type VariableContext = {
|
|
1095
|
+
unsubscribe_url?: string
|
|
1096
|
+
main?: Record<string, unknown>
|
|
1097
|
+
contact?: Record<string, unknown>
|
|
1098
|
+
brand?: Record<string, unknown>
|
|
1099
|
+
}
|
|
1100
|
+
\`\`\`
|
|
1101
|
+
|
|
1102
|
+
### \`TemplateType\`
|
|
1103
|
+
|
|
1104
|
+
\`\`\`ts
|
|
1105
|
+
type TemplateType = "email" | "document"
|
|
1106
|
+
\`\`\`
|
|
1107
|
+
|
|
1108
|
+
### \`CategoryResult\`
|
|
1109
|
+
|
|
1110
|
+
\`\`\`ts
|
|
1111
|
+
type CategoryResult = {
|
|
1112
|
+
category?: string
|
|
1113
|
+
description?: string
|
|
1114
|
+
}
|
|
1115
|
+
\`\`\`
|
|
1116
|
+
|
|
1117
|
+
### \`ExternalCustomVariable\`
|
|
1118
|
+
|
|
1119
|
+
\`\`\`ts
|
|
1120
|
+
type ExternalCustomVariable = {
|
|
1121
|
+
variable?: string
|
|
1122
|
+
value?: string
|
|
1123
|
+
}
|
|
1124
|
+
\`\`\`
|
|
1125
|
+
|
|
1126
|
+
### \`CustomVariable\`
|
|
1127
|
+
|
|
1128
|
+
\`\`\`ts
|
|
1129
|
+
type CustomVariable = {
|
|
1130
|
+
id?: string
|
|
1131
|
+
type?: "order_table" | "custom" | "journey_link" | "snippet"
|
|
1132
|
+
name?: string
|
|
1133
|
+
key: string
|
|
1134
|
+
_tags?: string[]
|
|
1135
|
+
helper_params?: string[]
|
|
1136
|
+
helper_logic?: string
|
|
1137
|
+
config?: object
|
|
1138
|
+
template: string
|
|
1139
|
+
created_at?: string
|
|
1140
|
+
created_by?: string
|
|
1141
|
+
updated_at?: string
|
|
1142
|
+
updated_by?: string
|
|
1143
|
+
}
|
|
1144
|
+
\`\`\`
|
|
1145
|
+
`;
|
|
1146
|
+
export {
|
|
1147
|
+
template_variables_default as default
|
|
1148
|
+
};
|