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