@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.
Files changed (359) 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 -8
  30. package/dist/apis/access-token.js +5 -3
  31. package/dist/apis/address-suggestions.cjs +10 -8
  32. package/dist/apis/address-suggestions.js +5 -3
  33. package/dist/apis/address.cjs +10 -8
  34. package/dist/apis/address.js +5 -3
  35. package/dist/apis/ai-agents.cjs +10 -8
  36. package/dist/apis/ai-agents.js +5 -3
  37. package/dist/apis/app.cjs +10 -8
  38. package/dist/apis/app.js +5 -3
  39. package/dist/apis/audit-logs.cjs +10 -8
  40. package/dist/apis/audit-logs.js +5 -3
  41. package/dist/apis/automation.cjs +10 -8
  42. package/dist/apis/automation.js +5 -3
  43. package/dist/apis/billing.cjs +10 -8
  44. package/dist/apis/billing.js +5 -3
  45. package/dist/apis/blueprint-manifest.cjs +10 -8
  46. package/dist/apis/blueprint-manifest.js +5 -3
  47. package/dist/apis/consent.cjs +10 -8
  48. package/dist/apis/consent.js +5 -3
  49. package/dist/apis/customer-portal.cjs +10 -8
  50. package/dist/apis/customer-portal.js +5 -3
  51. package/dist/apis/dashboard.cjs +10 -8
  52. package/dist/apis/dashboard.js +5 -3
  53. package/dist/apis/data-management.cjs +10 -8
  54. package/dist/apis/data-management.js +5 -3
  55. package/dist/apis/deduplication.cjs +10 -8
  56. package/dist/apis/deduplication.js +5 -3
  57. package/dist/apis/design.cjs +10 -8
  58. package/dist/apis/design.js +5 -3
  59. package/dist/apis/document.cjs +10 -8
  60. package/dist/apis/document.js +5 -3
  61. package/dist/apis/email-settings.cjs +10 -8
  62. package/dist/apis/email-settings.js +5 -3
  63. package/dist/apis/email-template.cjs +10 -8
  64. package/dist/apis/email-template.js +5 -3
  65. package/dist/apis/entity-mapping.cjs +10 -8
  66. package/dist/apis/entity-mapping.js +5 -3
  67. package/dist/apis/entity.cjs +10 -8
  68. package/dist/apis/entity.js +5 -3
  69. package/dist/apis/environments.cjs +10 -8
  70. package/dist/apis/environments.js +5 -3
  71. package/dist/apis/erp-integration.cjs +10 -8
  72. package/dist/apis/erp-integration.js +5 -3
  73. package/dist/apis/event-catalog.cjs +10 -8
  74. package/dist/apis/event-catalog.js +5 -3
  75. package/dist/apis/file.cjs +10 -8
  76. package/dist/apis/file.js +5 -3
  77. package/dist/apis/iban.cjs +10 -8
  78. package/dist/apis/iban.js +5 -3
  79. package/dist/apis/journey.cjs +10 -8
  80. package/dist/apis/journey.js +5 -3
  81. package/dist/apis/kanban.cjs +10 -8
  82. package/dist/apis/kanban.js +5 -3
  83. package/dist/apis/message.cjs +10 -8
  84. package/dist/apis/message.js +5 -3
  85. package/dist/apis/metering.cjs +10 -8
  86. package/dist/apis/metering.js +5 -3
  87. package/dist/apis/notes.cjs +10 -8
  88. package/dist/apis/notes.js +5 -3
  89. package/dist/apis/notification.cjs +10 -8
  90. package/dist/apis/notification.js +5 -3
  91. package/dist/apis/organization.cjs +10 -8
  92. package/dist/apis/organization.d.cts +2 -2
  93. package/dist/apis/organization.d.ts +2 -2
  94. package/dist/apis/organization.js +5 -3
  95. package/dist/apis/partner-directory.cjs +10 -8
  96. package/dist/apis/partner-directory.js +5 -3
  97. package/dist/apis/permissions.cjs +10 -8
  98. package/dist/apis/permissions.js +5 -3
  99. package/dist/apis/pricing-tier.cjs +10 -8
  100. package/dist/apis/pricing-tier.js +5 -3
  101. package/dist/apis/pricing.cjs +10 -8
  102. package/dist/apis/pricing.js +5 -3
  103. package/dist/apis/purpose.cjs +10 -8
  104. package/dist/apis/purpose.js +5 -3
  105. package/dist/apis/sandbox.cjs +10 -8
  106. package/dist/apis/sandbox.js +5 -3
  107. package/dist/apis/submission.cjs +10 -8
  108. package/dist/apis/submission.js +5 -3
  109. package/dist/apis/targeting.cjs +10 -8
  110. package/dist/apis/targeting.js +5 -3
  111. package/dist/apis/template-variables.cjs +10 -8
  112. package/dist/apis/template-variables.js +5 -3
  113. package/dist/apis/user.cjs +10 -8
  114. package/dist/apis/user.js +5 -3
  115. package/dist/apis/validation-rules.cjs +10 -8
  116. package/dist/apis/validation-rules.js +5 -3
  117. package/dist/apis/webhooks.cjs +10 -8
  118. package/dist/apis/webhooks.js +5 -3
  119. package/dist/apis/workflow-definition.cjs +10 -8
  120. package/dist/apis/workflow-definition.js +5 -3
  121. package/dist/apis/workflow.cjs +10 -8
  122. package/dist/apis/workflow.js +5 -3
  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-6J7CIOKR.js → chunk-2HOJWFQ4.js} +1 -1
  134. package/dist/{chunk-BDIJHJOG.js → chunk-372VUPHN.js} +1 -1
  135. package/dist/{chunk-Q5TESEDZ.cjs → chunk-3HJEWWPS.cjs} +2 -2
  136. package/dist/{chunk-ID6BXIOZ.js → chunk-3N67SSL3.js} +1 -1
  137. package/dist/chunk-3XEP56SV.cjs +204 -0
  138. package/dist/{chunk-7KFKA3AH.cjs → chunk-3ZZ57K3S.cjs} +2 -2
  139. package/dist/{chunk-CVSQT5PV.cjs → chunk-4SWC43JO.cjs} +2 -2
  140. package/dist/{chunk-O3R6C3WW.js → chunk-4VFQTSJQ.js} +1 -1
  141. package/dist/{chunk-LXAJ722U.js → chunk-57QIBYDN.js} +1 -1
  142. package/dist/{chunk-SPZSDRM6.cjs → chunk-5SNJAD6F.cjs} +2 -2
  143. package/dist/{chunk-OI2M6FSB.js → chunk-73H6TVKN.js} +1 -1
  144. package/dist/{chunk-BB7WFIE2.cjs → chunk-A6JOROUC.cjs} +2 -2
  145. package/dist/{chunk-SHPXCOTN.cjs → chunk-AJKH25H2.cjs} +3 -3
  146. package/dist/{chunk-DBNEZWK2.cjs → chunk-ARWMTXJV.cjs} +2 -2
  147. package/dist/{chunk-7BPPP4M2.js → chunk-B3ZGAG7B.js} +1 -1
  148. package/dist/{chunk-5WN2YXNU.cjs → chunk-BH5ZXK4J.cjs} +2 -2
  149. package/dist/{chunk-JM6HKPSC.cjs → chunk-BWFXLUK5.cjs} +2 -2
  150. package/dist/{chunk-V56ZCL54.js → chunk-C6UTZEHH.js} +1 -1
  151. package/dist/{chunk-ZPCMZO2O.js → chunk-CPKBR34V.js} +1 -1
  152. package/dist/{chunk-UTQY2DSM.js → chunk-CWSHYFVZ.js} +1 -1
  153. package/dist/{chunk-5YVVQBA2.js → chunk-DJKSULPK.js} +1 -1
  154. package/dist/{chunk-XLOXC52O.js → chunk-DNJ54L2G.js} +1 -1
  155. package/dist/{chunk-YXPUCBVK.cjs → chunk-DY2D2IW5.cjs} +2 -2
  156. package/dist/{chunk-Z5LLUUFD.cjs → chunk-E26ZO7QM.cjs} +2 -2
  157. package/dist/{chunk-RNKZDJOY.js → chunk-EBCHCYUO.js} +1 -1
  158. package/dist/{chunk-4MO4WLKA.cjs → chunk-EPAIOB5U.cjs} +2 -2
  159. package/dist/{chunk-UX2IZQNM.cjs → chunk-EQZMT2HF.cjs} +2 -2
  160. package/dist/{chunk-U52A2DMK.cjs → chunk-F376L6PP.cjs} +2 -2
  161. package/dist/{chunk-TBBLLEB2.cjs → chunk-F472YLJG.cjs} +2 -2
  162. package/dist/{chunk-W3MM2BSK.cjs → chunk-FXOX3X7E.cjs} +2 -2
  163. package/dist/{chunk-E4IFBCNM.cjs → chunk-G2REP2VZ.cjs} +2 -2
  164. package/dist/{chunk-CFGXI3FX.js → chunk-GLO477NZ.js} +1 -1
  165. package/dist/{chunk-PBNPZ7UX.js → chunk-H4VSK4KF.js} +1 -1
  166. package/dist/{chunk-33TQRYMY.js → chunk-HPSGM6QP.js} +1 -1
  167. package/dist/{chunk-RQKN4WTW.cjs → chunk-HPYHWTTA.cjs} +2 -2
  168. package/dist/{chunk-5RXE7X63.js → chunk-IH4CMOML.js} +2 -2
  169. package/dist/{chunk-VD5TBK2T.cjs → chunk-IMT3IE5M.cjs} +2 -2
  170. package/dist/{chunk-DIP442PL.js → chunk-IP2WWEOU.js} +1 -1
  171. package/dist/{chunk-FCLW3FLF.js → chunk-IS2VB342.js} +1 -1
  172. package/dist/{chunk-UNHWLNE4.js → chunk-ITX53XAZ.js} +1 -1
  173. package/dist/{chunk-KU2XF4TS.cjs → chunk-JXBXDTFG.cjs} +2 -2
  174. package/dist/{chunk-Y4YQEDR3.js → chunk-K62XK7KU.js} +1 -1
  175. package/dist/chunk-KA3TGFJP.js +14 -0
  176. package/dist/{chunk-IXRDP4VP.js → chunk-KBOVBUBM.js} +1 -1
  177. package/dist/{chunk-MKZGM4A6.js → chunk-KPGC2D6E.js} +1 -1
  178. package/dist/{chunk-ZAPA4RPI.js → chunk-KSXTBGIV.js} +1 -1
  179. package/dist/{chunk-PLBIQ2Y7.cjs → chunk-LCIJ4TJ4.cjs} +2 -2
  180. package/dist/{chunk-TUAAE3UC.cjs → chunk-LQOLYXGQ.cjs} +2 -2
  181. package/dist/{chunk-6ADJEPMJ.js → chunk-LSIWCIQV.js} +1 -1
  182. package/dist/{chunk-CBRWUULQ.js → chunk-MHNSZ4HE.js} +1 -1
  183. package/dist/{chunk-WOOKHE7Y.cjs → chunk-MKX4CKAB.cjs} +2 -2
  184. package/dist/{chunk-N2P26AAD.js → chunk-MRTAFRO7.js} +1 -1
  185. package/dist/{chunk-YGULLD73.js → chunk-MRZ7LGKZ.js} +1 -1
  186. package/dist/{chunk-CLMZ2EXW.js → chunk-MSASBR2Y.js} +1 -1
  187. package/dist/{chunk-KEJRWMXR.cjs → chunk-NAWLLC3T.cjs} +2 -2
  188. package/dist/chunk-NJK5F5TF.cjs +21 -0
  189. package/dist/{chunk-HBPCJRZX.cjs → chunk-NLSZVGHK.cjs} +2 -2
  190. package/dist/{chunk-CK36RZXR.js → chunk-O4LRVGOY.js} +1 -1
  191. package/dist/chunk-OG2DMGU6.cjs +14 -0
  192. package/dist/{chunk-TIJGLQKO.js → chunk-OGQKJTXF.js} +1 -1
  193. package/dist/{chunk-UE4XPL43.js → chunk-PETLAONH.js} +1 -1
  194. package/dist/{chunk-MK4ZGXVE.cjs → chunk-PVSS2WPM.cjs} +2 -2
  195. package/dist/{chunk-ONN5COYQ.cjs → chunk-PXITFTJA.cjs} +2 -2
  196. package/dist/{chunk-ZAXYMQ2B.cjs → chunk-QDVPPRWI.cjs} +2 -2
  197. package/dist/{chunk-IPFHV2FV.cjs → chunk-QKERXNJJ.cjs} +2 -2
  198. package/dist/{chunk-ZDJ3J6Z6.cjs → chunk-QLML3IP5.cjs} +2 -2
  199. package/dist/{chunk-YFHQYQII.js → chunk-QVAJ5JP4.js} +1 -1
  200. package/dist/{chunk-S2QF6HG2.cjs → chunk-RD7E4OSJ.cjs} +2 -2
  201. package/dist/{chunk-XIB2G42L.cjs → chunk-RWSA3LXE.cjs} +2 -2
  202. package/dist/{chunk-R6WNZVTA.cjs → chunk-RXSS67VI.cjs} +2 -2
  203. package/dist/{chunk-UXVV3BSC.cjs → chunk-S3ZNESMC.cjs} +2 -2
  204. package/dist/{chunk-YNPRF4BX.js → chunk-S7NDMDRX.js} +1 -1
  205. package/dist/{chunk-HO7KACZZ.cjs → chunk-SK3VYIZ6.cjs} +2 -2
  206. package/dist/{chunk-CX3KG7D2.cjs → chunk-SMGHAG5C.cjs} +2 -2
  207. package/dist/{chunk-D5FJ26GG.js → chunk-T46LODOF.js} +1 -1
  208. package/dist/{chunk-Y4ZMNMYI.js → chunk-TIJWJVKZ.js} +1 -1
  209. package/dist/{chunk-EIILOQ6X.js → chunk-TLWCYLNA.js} +1 -1
  210. package/dist/{chunk-JX45ME2Z.js → chunk-TRJLYZHD.js} +1 -1
  211. package/dist/{chunk-RNBO3DEN.js → chunk-UKKJMCNH.js} +1 -1
  212. package/dist/chunk-ULBEEHG4.js +204 -0
  213. package/dist/{chunk-UDO4JYVU.cjs → chunk-VGTUK3QD.cjs} +2 -2
  214. package/dist/{chunk-4JPVFLVU.js → chunk-VQ7R36AC.js} +1 -1
  215. package/dist/{chunk-IPDIEZBN.cjs → chunk-VVQB5W7U.cjs} +2 -2
  216. package/dist/{chunk-HKZQ56AS.cjs → chunk-VVVATFGK.cjs} +2 -2
  217. package/dist/{chunk-URRL33D5.cjs → chunk-WMTYO5OX.cjs} +2 -2
  218. package/dist/{chunk-U4BMKRG6.js → chunk-WOSSSFXB.js} +1 -1
  219. package/dist/{chunk-OBQIS3KU.js → chunk-WOXXNKTE.js} +1 -1
  220. package/dist/{chunk-WAKSLH7V.cjs → chunk-XKI2OAYV.cjs} +2 -2
  221. package/dist/{chunk-5Y2KLUU6.cjs → chunk-XR4QF6KQ.cjs} +2 -2
  222. package/dist/{chunk-6BERHKDQ.cjs → chunk-XYHTQ523.cjs} +2 -2
  223. package/dist/{chunk-XD6XML3Z.cjs → chunk-XZYZLSUO.cjs} +2 -2
  224. package/dist/chunk-YPSWSI3M.js +21 -0
  225. package/dist/{chunk-4K3MX2J6.js → chunk-YYBIU5BQ.js} +1 -1
  226. package/dist/{chunk-HSGQSTVK.js → chunk-YZA5WZUS.js} +1 -1
  227. package/dist/{chunk-GGBSLAVO.cjs → chunk-Z4LUE424.cjs} +2 -2
  228. package/dist/{chunk-NSOHW3R6.js → chunk-ZV6XYUXS.js} +1 -1
  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 +107 -100
  262. package/dist/index.d.cts +17 -2
  263. package/dist/index.d.ts +17 -2
  264. package/dist/index.js +58 -51
  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-GMBRXWMD.cjs +0 -14
  357. package/dist/chunk-L43U5IO3.js +0 -14
  358. package/dist/chunk-XE25WERA.js +0 -125
  359. package/dist/chunk-XEQMAKGA.cjs +0 -125
@@ -0,0 +1,2864 @@
1
+ # Entity Mapping API
2
+
3
+ - **Base URL:** `https://entity-mapping.sls.epilot.io`
4
+ - **Full API Docs:** [https://docs.epilot.io/api/entity-mapping](https://docs.epilot.io/api/entity-mapping)
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { epilot } from '@epilot/sdk'
10
+
11
+ epilot.authorize(() => '<token>')
12
+ const { data } = await epilot.entityMapping.storeConfig(...)
13
+ ```
14
+
15
+ ### Tree-shakeable import
16
+
17
+ ```ts
18
+ import { getClient, authorize } from '@epilot/sdk/entity-mapping'
19
+
20
+ const entityMappingClient = getClient()
21
+ authorize(entityMappingClient, () => '<token>')
22
+ const { data } = await entityMappingClient.storeConfig(...)
23
+ ```
24
+
25
+ ## Operations
26
+
27
+ **mappings**
28
+ - [`storeConfig`](#storeconfig)
29
+ - [`getConfig`](#getconfig)
30
+ - [`deleteConfig`](#deleteconfig)
31
+ - [`getAllVersions`](#getallversions)
32
+ - [`storeNewVersion`](#storenewversion)
33
+ - [`getConfigVersion`](#getconfigversion)
34
+ - [`executeMapping`](#executemapping)
35
+ - [`searchConfigs`](#searchconfigs)
36
+ - [`queryMappingHistory`](#querymappinghistory)
37
+ - [`executeRelations`](#executerelations)
38
+ - [`getMappingConfig`](#getmappingconfig)
39
+ - [`putMappingConfig`](#putmappingconfig)
40
+
41
+ **Schemas**
42
+ - [`SearchMappingReq`](#searchmappingreq)
43
+ - [`MappingConfigsResp`](#mappingconfigsresp)
44
+ - [`MappingConfigs`](#mappingconfigs)
45
+ - [`MappingConfig`](#mappingconfig)
46
+ - [`MappingConfigV2`](#mappingconfigv2)
47
+ - [`MappingConfigCommonFields`](#mappingconfigcommonfields)
48
+ - [`Owner`](#owner)
49
+ - [`ExecuteRelationsReq`](#executerelationsreq)
50
+ - [`ExecuteRelationsResp`](#executerelationsresp)
51
+ - [`NewRelationItem`](#newrelationitem)
52
+ - [`RelationItem`](#relationitem)
53
+ - [`ExecuteMappingReq`](#executemappingreq)
54
+ - [`ExecuteMappingResp`](#executemappingresp)
55
+ - [`MappingFailure`](#mappingfailure)
56
+ - [`MappingWarning`](#mappingwarning)
57
+ - [`Entity`](#entity)
58
+ - [`EntityRef`](#entityref)
59
+ - [`SourceConfig`](#sourceconfig)
60
+ - [`JourneyRef`](#journeyref)
61
+ - [`Loop_Index_String`](#loop_index_string)
62
+ - [`TargetConfig`](#targetconfig)
63
+ - [`MapCondition`](#mapcondition)
64
+ - [`ConditionNode`](#conditionnode)
65
+ - [`RelationAttribute`](#relationattribute)
66
+ - [`MappingAttributeV2`](#mappingattributev2)
67
+ - [`AttributeOrigin`](#attributeorigin)
68
+ - [`OperationNode`](#operationnode)
69
+ - [`OperationObjectNode`](#operationobjectnode)
70
+ - [`PrimitiveJSONValue`](#primitivejsonvalue)
71
+ - [`RandomOperation`](#randomoperation)
72
+ - [`MappingAttribute`](#mappingattribute)
73
+ - [`MappingAttributeMode`](#mappingattributemode)
74
+ - [`SetValueMapper`](#setvaluemapper)
75
+ - [`CopyValueMapper`](#copyvaluemapper)
76
+ - [`AppendValueMapper`](#appendvaluemapper)
77
+ - [`MappingHistoryResp`](#mappinghistoryresp)
78
+ - [`MappingHistoryEntry`](#mappinghistoryentry)
79
+ - [`MappingSource`](#mappingsource)
80
+ - [`MappingSourceProperty`](#mappingsourceproperty)
81
+ - [`MappingSourceTargetType`](#mappingsourcetargettype)
82
+
83
+ ### `storeConfig`
84
+
85
+ Store new MappingConfig
86
+
87
+ `POST /v1/mappings`
88
+
89
+ ```ts
90
+ const { data } = await client.storeConfig(
91
+ {
92
+ with_id: 'example',
93
+ },
94
+ {
95
+ id: 'string',
96
+ source: {
97
+ type: 'journey',
98
+ config: {
99
+ journey_id: 'string'
100
+ }
101
+ },
102
+ targets: [
103
+ {
104
+ id: 'string',
105
+ name: 'string',
106
+ allow_failure: true,
107
+ target_schema: 'string',
108
+ target_unique: ['string'],
109
+ loop_config: {
110
+ source_path: 'string',
111
+ length: 'the length of the array'
112
+ },
113
+ conditionMode: 'oneOf',
114
+ conditions: [
115
+ {
116
+ _exists: {
117
+ source: 'string',
118
+ value: 'string'
119
+ },
120
+ _equals: {
121
+ source: 'string',
122
+ value: 'string'
123
+ },
124
+ _not_exists: {
125
+ source: 'string',
126
+ value: 'string'
127
+ },
128
+ _any_of: {
129
+ source: 'string',
130
+ value: 'string'
131
+ }
132
+ }
133
+ ],
134
+ mapping_attributes: [
135
+ {
136
+ target: '_tags',
137
+ operation: {
138
+ _append: ['new', 'tags'],
139
+ _uniq: true
140
+ }
141
+ },
142
+ {
143
+ mode: 'copy_if_exists',
144
+ target: 'string',
145
+ value: {}
146
+ }
147
+ ],
148
+ relation_attributes: [
149
+ {
150
+ target: 'string',
151
+ target_tags: ['string'],
152
+ target_tags_include_source: false,
153
+ override_with_source_filter: false,
154
+ source_filter: {
155
+ limit: 0,
156
+ schema: 'string',
157
+ attribute: 'string',
158
+ relation_tag: 'string',
159
+ tag: 'string',
160
+ self: false
161
+ },
162
+ related_to: {},
163
+ mode: 'append',
164
+ origin: 'system_recommendation'
165
+ }
166
+ ],
167
+ linkback_relation_attribute: 'mapped_entities',
168
+ linkback_relation_tags: ['string']
169
+ }
170
+ ],
171
+ created_at: '1970-01-01T00:00:00.000Z',
172
+ updated_at: '1970-01-01T00:00:00.000Z',
173
+ created_by: {
174
+ type: 'user',
175
+ org_id: 'string',
176
+ user_id: 'string'
177
+ },
178
+ last_updated_by: {
179
+ type: 'user',
180
+ org_id: 'string',
181
+ user_id: 'string'
182
+ },
183
+ org_id: '66',
184
+ version: 2
185
+ },
186
+ )
187
+ ```
188
+
189
+ <details>
190
+ <summary>Response</summary>
191
+
192
+ ```json
193
+ {
194
+ "id": "string",
195
+ "source": {
196
+ "type": "journey",
197
+ "config": {
198
+ "journey_id": "string"
199
+ }
200
+ },
201
+ "targets": [
202
+ {
203
+ "id": "string",
204
+ "name": "string",
205
+ "allow_failure": true,
206
+ "target_schema": "string",
207
+ "target_unique": ["string"],
208
+ "loop_config": {
209
+ "source_path": "string",
210
+ "length": "the length of the array"
211
+ },
212
+ "conditionMode": "oneOf",
213
+ "conditions": [
214
+ {
215
+ "_exists": {
216
+ "source": "string",
217
+ "value": "string"
218
+ },
219
+ "_equals": {
220
+ "source": "string",
221
+ "value": "string"
222
+ },
223
+ "_not_exists": {
224
+ "source": "string",
225
+ "value": "string"
226
+ },
227
+ "_any_of": {
228
+ "source": "string",
229
+ "value": "string"
230
+ }
231
+ }
232
+ ],
233
+ "mapping_attributes": [
234
+ {
235
+ "target": "_tags",
236
+ "operation": {
237
+ "_append": ["new", "tags"],
238
+ "_uniq": true
239
+ }
240
+ },
241
+ {
242
+ "mode": "copy_if_exists",
243
+ "target": "string",
244
+ "value": {}
245
+ }
246
+ ],
247
+ "relation_attributes": [
248
+ {
249
+ "target": "string",
250
+ "target_tags": ["string"],
251
+ "target_tags_include_source": false,
252
+ "override_with_source_filter": false,
253
+ "source_filter": {
254
+ "limit": 0,
255
+ "schema": "string",
256
+ "attribute": "string",
257
+ "relation_tag": "string",
258
+ "tag": "string",
259
+ "self": false
260
+ },
261
+ "related_to": {},
262
+ "mode": "append",
263
+ "origin": "system_recommendation"
264
+ }
265
+ ],
266
+ "linkback_relation_attribute": "mapped_entities",
267
+ "linkback_relation_tags": ["string"]
268
+ }
269
+ ],
270
+ "created_at": "1970-01-01T00:00:00.000Z",
271
+ "updated_at": "1970-01-01T00:00:00.000Z",
272
+ "created_by": {
273
+ "type": "user",
274
+ "org_id": "string",
275
+ "user_id": "string"
276
+ },
277
+ "last_updated_by": {
278
+ "type": "user",
279
+ "org_id": "string",
280
+ "user_id": "string"
281
+ },
282
+ "org_id": "66",
283
+ "version": 2
284
+ }
285
+ ```
286
+
287
+ </details>
288
+
289
+ ---
290
+
291
+ ### `getConfig`
292
+
293
+ Get latest version of a mapping config by id
294
+
295
+ `GET /v1/mappings/{id}`
296
+
297
+ ```ts
298
+ const { data } = await client.getConfig({
299
+ id: '123e4567-e89b-12d3-a456-426614174000',
300
+ })
301
+ ```
302
+
303
+ <details>
304
+ <summary>Response</summary>
305
+
306
+ ```json
307
+ {
308
+ "id": "string",
309
+ "source": {
310
+ "type": "journey",
311
+ "config": {
312
+ "journey_id": "string"
313
+ }
314
+ },
315
+ "targets": [
316
+ {
317
+ "id": "string",
318
+ "name": "string",
319
+ "allow_failure": true,
320
+ "target_schema": "string",
321
+ "target_unique": ["string"],
322
+ "loop_config": {
323
+ "source_path": "string",
324
+ "length": "the length of the array"
325
+ },
326
+ "conditionMode": "oneOf",
327
+ "conditions": [
328
+ {
329
+ "_exists": {
330
+ "source": "string",
331
+ "value": "string"
332
+ },
333
+ "_equals": {
334
+ "source": "string",
335
+ "value": "string"
336
+ },
337
+ "_not_exists": {
338
+ "source": "string",
339
+ "value": "string"
340
+ },
341
+ "_any_of": {
342
+ "source": "string",
343
+ "value": "string"
344
+ }
345
+ }
346
+ ],
347
+ "mapping_attributes": [
348
+ {
349
+ "target": "_tags",
350
+ "operation": {
351
+ "_append": ["new", "tags"],
352
+ "_uniq": true
353
+ }
354
+ },
355
+ {
356
+ "mode": "copy_if_exists",
357
+ "target": "string",
358
+ "value": {}
359
+ }
360
+ ],
361
+ "relation_attributes": [
362
+ {
363
+ "target": "string",
364
+ "target_tags": ["string"],
365
+ "target_tags_include_source": false,
366
+ "override_with_source_filter": false,
367
+ "source_filter": {
368
+ "limit": 0,
369
+ "schema": "string",
370
+ "attribute": "string",
371
+ "relation_tag": "string",
372
+ "tag": "string",
373
+ "self": false
374
+ },
375
+ "related_to": {},
376
+ "mode": "append",
377
+ "origin": "system_recommendation"
378
+ }
379
+ ],
380
+ "linkback_relation_attribute": "mapped_entities",
381
+ "linkback_relation_tags": ["string"]
382
+ }
383
+ ],
384
+ "created_at": "1970-01-01T00:00:00.000Z",
385
+ "updated_at": "1970-01-01T00:00:00.000Z",
386
+ "created_by": {
387
+ "type": "user",
388
+ "org_id": "string",
389
+ "user_id": "string"
390
+ },
391
+ "last_updated_by": {
392
+ "type": "user",
393
+ "org_id": "string",
394
+ "user_id": "string"
395
+ },
396
+ "org_id": "66",
397
+ "version": 2
398
+ }
399
+ ```
400
+
401
+ </details>
402
+
403
+ ---
404
+
405
+ ### `deleteConfig`
406
+
407
+ Delete entity mapping config
408
+
409
+ `DELETE /v1/mappings/{id}`
410
+
411
+ ```ts
412
+ const { data } = await client.deleteConfig({
413
+ id: '123e4567-e89b-12d3-a456-426614174000',
414
+ })
415
+ ```
416
+
417
+ <details>
418
+ <summary>Response</summary>
419
+
420
+ ```json
421
+ {
422
+ "id": "string",
423
+ "source": {
424
+ "type": "journey",
425
+ "config": {
426
+ "journey_id": "string"
427
+ }
428
+ },
429
+ "targets": [
430
+ {
431
+ "id": "string",
432
+ "name": "string",
433
+ "allow_failure": true,
434
+ "target_schema": "string",
435
+ "target_unique": ["string"],
436
+ "loop_config": {
437
+ "source_path": "string",
438
+ "length": "the length of the array"
439
+ },
440
+ "conditionMode": "oneOf",
441
+ "conditions": [
442
+ {
443
+ "_exists": {
444
+ "source": "string",
445
+ "value": "string"
446
+ },
447
+ "_equals": {
448
+ "source": "string",
449
+ "value": "string"
450
+ },
451
+ "_not_exists": {
452
+ "source": "string",
453
+ "value": "string"
454
+ },
455
+ "_any_of": {
456
+ "source": "string",
457
+ "value": "string"
458
+ }
459
+ }
460
+ ],
461
+ "mapping_attributes": [
462
+ {
463
+ "target": "_tags",
464
+ "operation": {
465
+ "_append": ["new", "tags"],
466
+ "_uniq": true
467
+ }
468
+ },
469
+ {
470
+ "mode": "copy_if_exists",
471
+ "target": "string",
472
+ "value": {}
473
+ }
474
+ ],
475
+ "relation_attributes": [
476
+ {
477
+ "target": "string",
478
+ "target_tags": ["string"],
479
+ "target_tags_include_source": false,
480
+ "override_with_source_filter": false,
481
+ "source_filter": {
482
+ "limit": 0,
483
+ "schema": "string",
484
+ "attribute": "string",
485
+ "relation_tag": "string",
486
+ "tag": "string",
487
+ "self": false
488
+ },
489
+ "related_to": {},
490
+ "mode": "append",
491
+ "origin": "system_recommendation"
492
+ }
493
+ ],
494
+ "linkback_relation_attribute": "mapped_entities",
495
+ "linkback_relation_tags": ["string"]
496
+ }
497
+ ],
498
+ "created_at": "1970-01-01T00:00:00.000Z",
499
+ "updated_at": "1970-01-01T00:00:00.000Z",
500
+ "created_by": {
501
+ "type": "user",
502
+ "org_id": "string",
503
+ "user_id": "string"
504
+ },
505
+ "last_updated_by": {
506
+ "type": "user",
507
+ "org_id": "string",
508
+ "user_id": "string"
509
+ },
510
+ "org_id": "66",
511
+ "version": 2
512
+ }
513
+ ```
514
+
515
+ </details>
516
+
517
+ ---
518
+
519
+ ### `getAllVersions`
520
+
521
+ Get all version of MappingConfig
522
+
523
+ `GET /v1/mappings/{id}/versions`
524
+
525
+ ```ts
526
+ const { data } = await client.getAllVersions({
527
+ id: '123e4567-e89b-12d3-a456-426614174000',
528
+ })
529
+ ```
530
+
531
+ <details>
532
+ <summary>Response</summary>
533
+
534
+ ```json
535
+ {
536
+ "configs": [
537
+ {
538
+ "id": "string",
539
+ "source": {
540
+ "type": "journey",
541
+ "config": {
542
+ "journey_id": "string"
543
+ }
544
+ },
545
+ "targets": [
546
+ {
547
+ "id": "string",
548
+ "name": "string",
549
+ "allow_failure": true,
550
+ "target_schema": "string",
551
+ "target_unique": ["string"],
552
+ "loop_config": {
553
+ "source_path": "string",
554
+ "length": "the length of the array"
555
+ },
556
+ "conditionMode": "oneOf",
557
+ "conditions": [
558
+ {
559
+ "_exists": {
560
+ "source": "string",
561
+ "value": "string"
562
+ },
563
+ "_equals": {
564
+ "source": "string",
565
+ "value": "string"
566
+ },
567
+ "_not_exists": {
568
+ "source": "string",
569
+ "value": "string"
570
+ },
571
+ "_any_of": {
572
+ "source": "string",
573
+ "value": "string"
574
+ }
575
+ }
576
+ ],
577
+ "mapping_attributes": [
578
+ {
579
+ "target": "_tags",
580
+ "operation": {
581
+ "_append": ["new", "tags"],
582
+ "_uniq": true
583
+ }
584
+ },
585
+ {
586
+ "mode": "copy_if_exists",
587
+ "target": "string",
588
+ "value": {}
589
+ }
590
+ ],
591
+ "relation_attributes": [
592
+ {
593
+ "target": "string",
594
+ "target_tags": ["string"],
595
+ "target_tags_include_source": false,
596
+ "override_with_source_filter": false,
597
+ "source_filter": {
598
+ "limit": 0,
599
+ "schema": "string",
600
+ "attribute": "string",
601
+ "relation_tag": "string",
602
+ "tag": "string",
603
+ "self": false
604
+ },
605
+ "related_to": {},
606
+ "mode": "append",
607
+ "origin": "system_recommendation"
608
+ }
609
+ ],
610
+ "linkback_relation_attribute": "mapped_entities",
611
+ "linkback_relation_tags": ["string"]
612
+ }
613
+ ],
614
+ "created_at": "1970-01-01T00:00:00.000Z",
615
+ "updated_at": "1970-01-01T00:00:00.000Z",
616
+ "created_by": {
617
+ "type": "user",
618
+ "org_id": "string",
619
+ "user_id": "string"
620
+ },
621
+ "last_updated_by": {
622
+ "type": "user",
623
+ "org_id": "string",
624
+ "user_id": "string"
625
+ },
626
+ "org_id": "66",
627
+ "version": 2
628
+ }
629
+ ]
630
+ }
631
+ ```
632
+
633
+ </details>
634
+
635
+ ---
636
+
637
+ ### `storeNewVersion`
638
+
639
+ Store new version of MappingConfig
640
+
641
+ `POST /v1/mappings/{id}/versions`
642
+
643
+ ```ts
644
+ const { data } = await client.storeNewVersion(
645
+ {
646
+ id: '123e4567-e89b-12d3-a456-426614174000',
647
+ },
648
+ {
649
+ id: 'string',
650
+ source: {
651
+ type: 'journey',
652
+ config: {
653
+ journey_id: 'string'
654
+ }
655
+ },
656
+ targets: [
657
+ {
658
+ id: 'string',
659
+ name: 'string',
660
+ allow_failure: true,
661
+ target_schema: 'string',
662
+ target_unique: ['string'],
663
+ loop_config: {
664
+ source_path: 'string',
665
+ length: 'the length of the array'
666
+ },
667
+ conditionMode: 'oneOf',
668
+ conditions: [
669
+ {
670
+ _exists: {
671
+ source: 'string',
672
+ value: 'string'
673
+ },
674
+ _equals: {
675
+ source: 'string',
676
+ value: 'string'
677
+ },
678
+ _not_exists: {
679
+ source: 'string',
680
+ value: 'string'
681
+ },
682
+ _any_of: {
683
+ source: 'string',
684
+ value: 'string'
685
+ }
686
+ }
687
+ ],
688
+ mapping_attributes: [
689
+ {
690
+ target: '_tags',
691
+ operation: {
692
+ _append: ['new', 'tags'],
693
+ _uniq: true
694
+ }
695
+ },
696
+ {
697
+ mode: 'copy_if_exists',
698
+ target: 'string',
699
+ value: {}
700
+ }
701
+ ],
702
+ relation_attributes: [
703
+ {
704
+ target: 'string',
705
+ target_tags: ['string'],
706
+ target_tags_include_source: false,
707
+ override_with_source_filter: false,
708
+ source_filter: {
709
+ limit: 0,
710
+ schema: 'string',
711
+ attribute: 'string',
712
+ relation_tag: 'string',
713
+ tag: 'string',
714
+ self: false
715
+ },
716
+ related_to: {},
717
+ mode: 'append',
718
+ origin: 'system_recommendation'
719
+ }
720
+ ],
721
+ linkback_relation_attribute: 'mapped_entities',
722
+ linkback_relation_tags: ['string']
723
+ }
724
+ ],
725
+ created_at: '1970-01-01T00:00:00.000Z',
726
+ updated_at: '1970-01-01T00:00:00.000Z',
727
+ created_by: {
728
+ type: 'user',
729
+ org_id: 'string',
730
+ user_id: 'string'
731
+ },
732
+ last_updated_by: {
733
+ type: 'user',
734
+ org_id: 'string',
735
+ user_id: 'string'
736
+ },
737
+ org_id: '66',
738
+ version: 2
739
+ },
740
+ )
741
+ ```
742
+
743
+ <details>
744
+ <summary>Response</summary>
745
+
746
+ ```json
747
+ {
748
+ "id": "string",
749
+ "source": {
750
+ "type": "journey",
751
+ "config": {
752
+ "journey_id": "string"
753
+ }
754
+ },
755
+ "targets": [
756
+ {
757
+ "id": "string",
758
+ "name": "string",
759
+ "allow_failure": true,
760
+ "target_schema": "string",
761
+ "target_unique": ["string"],
762
+ "loop_config": {
763
+ "source_path": "string",
764
+ "length": "the length of the array"
765
+ },
766
+ "conditionMode": "oneOf",
767
+ "conditions": [
768
+ {
769
+ "_exists": {
770
+ "source": "string",
771
+ "value": "string"
772
+ },
773
+ "_equals": {
774
+ "source": "string",
775
+ "value": "string"
776
+ },
777
+ "_not_exists": {
778
+ "source": "string",
779
+ "value": "string"
780
+ },
781
+ "_any_of": {
782
+ "source": "string",
783
+ "value": "string"
784
+ }
785
+ }
786
+ ],
787
+ "mapping_attributes": [
788
+ {
789
+ "target": "_tags",
790
+ "operation": {
791
+ "_append": ["new", "tags"],
792
+ "_uniq": true
793
+ }
794
+ },
795
+ {
796
+ "mode": "copy_if_exists",
797
+ "target": "string",
798
+ "value": {}
799
+ }
800
+ ],
801
+ "relation_attributes": [
802
+ {
803
+ "target": "string",
804
+ "target_tags": ["string"],
805
+ "target_tags_include_source": false,
806
+ "override_with_source_filter": false,
807
+ "source_filter": {
808
+ "limit": 0,
809
+ "schema": "string",
810
+ "attribute": "string",
811
+ "relation_tag": "string",
812
+ "tag": "string",
813
+ "self": false
814
+ },
815
+ "related_to": {},
816
+ "mode": "append",
817
+ "origin": "system_recommendation"
818
+ }
819
+ ],
820
+ "linkback_relation_attribute": "mapped_entities",
821
+ "linkback_relation_tags": ["string"]
822
+ }
823
+ ],
824
+ "created_at": "1970-01-01T00:00:00.000Z",
825
+ "updated_at": "1970-01-01T00:00:00.000Z",
826
+ "created_by": {
827
+ "type": "user",
828
+ "org_id": "string",
829
+ "user_id": "string"
830
+ },
831
+ "last_updated_by": {
832
+ "type": "user",
833
+ "org_id": "string",
834
+ "user_id": "string"
835
+ },
836
+ "org_id": "66",
837
+ "version": 2
838
+ }
839
+ ```
840
+
841
+ </details>
842
+
843
+ ---
844
+
845
+ ### `getConfigVersion`
846
+
847
+ Get specific version of a mapping config by id & version
848
+
849
+ `GET /v1/mappings/{id}/versions/{version}`
850
+
851
+ ```ts
852
+ const { data } = await client.getConfigVersion({
853
+ id: '123e4567-e89b-12d3-a456-426614174000',
854
+ version: 1,
855
+ })
856
+ ```
857
+
858
+ <details>
859
+ <summary>Response</summary>
860
+
861
+ ```json
862
+ {
863
+ "id": "string",
864
+ "source": {
865
+ "type": "journey",
866
+ "config": {
867
+ "journey_id": "string"
868
+ }
869
+ },
870
+ "targets": [
871
+ {
872
+ "id": "string",
873
+ "name": "string",
874
+ "allow_failure": true,
875
+ "target_schema": "string",
876
+ "target_unique": ["string"],
877
+ "loop_config": {
878
+ "source_path": "string",
879
+ "length": "the length of the array"
880
+ },
881
+ "conditionMode": "oneOf",
882
+ "conditions": [
883
+ {
884
+ "_exists": {
885
+ "source": "string",
886
+ "value": "string"
887
+ },
888
+ "_equals": {
889
+ "source": "string",
890
+ "value": "string"
891
+ },
892
+ "_not_exists": {
893
+ "source": "string",
894
+ "value": "string"
895
+ },
896
+ "_any_of": {
897
+ "source": "string",
898
+ "value": "string"
899
+ }
900
+ }
901
+ ],
902
+ "mapping_attributes": [
903
+ {
904
+ "target": "_tags",
905
+ "operation": {
906
+ "_append": ["new", "tags"],
907
+ "_uniq": true
908
+ }
909
+ },
910
+ {
911
+ "mode": "copy_if_exists",
912
+ "target": "string",
913
+ "value": {}
914
+ }
915
+ ],
916
+ "relation_attributes": [
917
+ {
918
+ "target": "string",
919
+ "target_tags": ["string"],
920
+ "target_tags_include_source": false,
921
+ "override_with_source_filter": false,
922
+ "source_filter": {
923
+ "limit": 0,
924
+ "schema": "string",
925
+ "attribute": "string",
926
+ "relation_tag": "string",
927
+ "tag": "string",
928
+ "self": false
929
+ },
930
+ "related_to": {},
931
+ "mode": "append",
932
+ "origin": "system_recommendation"
933
+ }
934
+ ],
935
+ "linkback_relation_attribute": "mapped_entities",
936
+ "linkback_relation_tags": ["string"]
937
+ }
938
+ ],
939
+ "created_at": "1970-01-01T00:00:00.000Z",
940
+ "updated_at": "1970-01-01T00:00:00.000Z",
941
+ "created_by": {
942
+ "type": "user",
943
+ "org_id": "string",
944
+ "user_id": "string"
945
+ },
946
+ "last_updated_by": {
947
+ "type": "user",
948
+ "org_id": "string",
949
+ "user_id": "string"
950
+ },
951
+ "org_id": "66",
952
+ "version": 2
953
+ }
954
+ ```
955
+
956
+ </details>
957
+
958
+ ---
959
+
960
+ ### `executeMapping`
961
+
962
+ Execute entity mapping based on a config
963
+
964
+ `POST /v1/mappings:execute`
965
+
966
+ ```ts
967
+ const { data } = await client.executeMapping(
968
+ {
969
+ preview_mode: true,
970
+ },
971
+ {
972
+ source_ref: {
973
+ entity_id: 'string',
974
+ entity_schema: 'submission'
975
+ },
976
+ targets: [
977
+ {
978
+ id: 'string',
979
+ name: 'string',
980
+ allow_failure: true,
981
+ target_schema: 'string',
982
+ target_unique: ['string'],
983
+ loop_config: {
984
+ source_path: 'string',
985
+ length: 'the length of the array'
986
+ },
987
+ conditionMode: 'oneOf',
988
+ conditions: [
989
+ {
990
+ _exists: {
991
+ source: 'string',
992
+ value: 'string'
993
+ },
994
+ _equals: {
995
+ source: 'string',
996
+ value: 'string'
997
+ },
998
+ _not_exists: {
999
+ source: 'string',
1000
+ value: 'string'
1001
+ },
1002
+ _any_of: {
1003
+ source: 'string',
1004
+ value: 'string'
1005
+ }
1006
+ }
1007
+ ],
1008
+ mapping_attributes: [
1009
+ {
1010
+ target: '_tags',
1011
+ operation: {
1012
+ _append: ['new', 'tags'],
1013
+ _uniq: true
1014
+ }
1015
+ },
1016
+ {
1017
+ mode: 'copy_if_exists',
1018
+ target: 'string',
1019
+ value: {}
1020
+ }
1021
+ ],
1022
+ relation_attributes: [
1023
+ {
1024
+ target: 'string',
1025
+ target_tags: ['string'],
1026
+ target_tags_include_source: false,
1027
+ override_with_source_filter: false,
1028
+ source_filter: {
1029
+ limit: 0,
1030
+ schema: 'string',
1031
+ attribute: 'string',
1032
+ relation_tag: 'string',
1033
+ tag: 'string',
1034
+ self: false
1035
+ },
1036
+ related_to: {},
1037
+ mode: 'append',
1038
+ origin: 'system_recommendation'
1039
+ }
1040
+ ],
1041
+ linkback_relation_attribute: 'mapped_entities',
1042
+ linkback_relation_tags: ['string']
1043
+ }
1044
+ ]
1045
+ },
1046
+ )
1047
+ ```
1048
+
1049
+ <details>
1050
+ <summary>Response</summary>
1051
+
1052
+ ```json
1053
+ {
1054
+ "mapped_entities": [
1055
+ {
1056
+ "_id": "string",
1057
+ "_schema": "string",
1058
+ "_title": "string",
1059
+ "_org": "string",
1060
+ "_tags": ["string"],
1061
+ "_created_at": "string",
1062
+ "_updated_at": "string",
1063
+ "required": {}
1064
+ }
1065
+ ],
1066
+ "failures": [
1067
+ {
1068
+ "target": {
1069
+ "id": "string",
1070
+ "name": "string",
1071
+ "allow_failure": true,
1072
+ "target_schema": "string",
1073
+ "target_unique": ["string"],
1074
+ "loop_config": {
1075
+ "source_path": "string",
1076
+ "length": "the length of the array"
1077
+ },
1078
+ "conditionMode": "oneOf",
1079
+ "conditions": [
1080
+ {
1081
+ "_exists": {
1082
+ "source": "string",
1083
+ "value": "string"
1084
+ },
1085
+ "_equals": {
1086
+ "source": "string",
1087
+ "value": "string"
1088
+ },
1089
+ "_not_exists": {
1090
+ "source": "string",
1091
+ "value": "string"
1092
+ },
1093
+ "_any_of": {
1094
+ "source": "string",
1095
+ "value": "string"
1096
+ }
1097
+ }
1098
+ ],
1099
+ "mapping_attributes": [
1100
+ {
1101
+ "target": "_tags",
1102
+ "operation": {
1103
+ "_append": ["new", "tags"],
1104
+ "_uniq": true
1105
+ }
1106
+ },
1107
+ {
1108
+ "mode": "copy_if_exists",
1109
+ "target": "string",
1110
+ "value": {}
1111
+ }
1112
+ ],
1113
+ "relation_attributes": [
1114
+ {
1115
+ "target": "string",
1116
+ "target_tags": ["string"],
1117
+ "target_tags_include_source": false,
1118
+ "override_with_source_filter": false,
1119
+ "source_filter": {
1120
+ "limit": 0,
1121
+ "schema": "string",
1122
+ "attribute": "string",
1123
+ "relation_tag": "string",
1124
+ "tag": "string",
1125
+ "self": false
1126
+ },
1127
+ "related_to": {},
1128
+ "mode": "append",
1129
+ "origin": "system_recommendation"
1130
+ }
1131
+ ],
1132
+ "linkback_relation_attribute": "mapped_entities",
1133
+ "linkback_relation_tags": ["string"]
1134
+ },
1135
+ "error": {
1136
+ "isSilent": true,
1137
+ "message": "string"
1138
+ }
1139
+ }
1140
+ ],
1141
+ "warnings": [
1142
+ {
1143
+ "explanation": "string",
1144
+ "context": "string",
1145
+ "id": "string"
1146
+ }
1147
+ ]
1148
+ }
1149
+ ```
1150
+
1151
+ </details>
1152
+
1153
+ ---
1154
+
1155
+ ### `searchConfigs`
1156
+
1157
+ Search mapping configs
1158
+
1159
+ `POST /v1/mappings:search`
1160
+
1161
+ ```ts
1162
+ const { data } = await client.searchConfigs(
1163
+ null,
1164
+ {
1165
+ source: {
1166
+ type: 'journey',
1167
+ config: {
1168
+ journey_id: 'string'
1169
+ }
1170
+ }
1171
+ },
1172
+ )
1173
+ ```
1174
+
1175
+ <details>
1176
+ <summary>Response</summary>
1177
+
1178
+ ```json
1179
+ {
1180
+ "id": "string",
1181
+ "source": {
1182
+ "type": "journey",
1183
+ "config": {
1184
+ "journey_id": "string"
1185
+ }
1186
+ },
1187
+ "targets": [
1188
+ {
1189
+ "id": "string",
1190
+ "name": "string",
1191
+ "allow_failure": true,
1192
+ "target_schema": "string",
1193
+ "target_unique": ["string"],
1194
+ "loop_config": {
1195
+ "source_path": "string",
1196
+ "length": "the length of the array"
1197
+ },
1198
+ "conditionMode": "oneOf",
1199
+ "conditions": [
1200
+ {
1201
+ "_exists": {
1202
+ "source": "string",
1203
+ "value": "string"
1204
+ },
1205
+ "_equals": {
1206
+ "source": "string",
1207
+ "value": "string"
1208
+ },
1209
+ "_not_exists": {
1210
+ "source": "string",
1211
+ "value": "string"
1212
+ },
1213
+ "_any_of": {
1214
+ "source": "string",
1215
+ "value": "string"
1216
+ }
1217
+ }
1218
+ ],
1219
+ "mapping_attributes": [
1220
+ {
1221
+ "target": "_tags",
1222
+ "operation": {
1223
+ "_append": ["new", "tags"],
1224
+ "_uniq": true
1225
+ }
1226
+ },
1227
+ {
1228
+ "mode": "copy_if_exists",
1229
+ "target": "string",
1230
+ "value": {}
1231
+ }
1232
+ ],
1233
+ "relation_attributes": [
1234
+ {
1235
+ "target": "string",
1236
+ "target_tags": ["string"],
1237
+ "target_tags_include_source": false,
1238
+ "override_with_source_filter": false,
1239
+ "source_filter": {
1240
+ "limit": 0,
1241
+ "schema": "string",
1242
+ "attribute": "string",
1243
+ "relation_tag": "string",
1244
+ "tag": "string",
1245
+ "self": false
1246
+ },
1247
+ "related_to": {},
1248
+ "mode": "append",
1249
+ "origin": "system_recommendation"
1250
+ }
1251
+ ],
1252
+ "linkback_relation_attribute": "mapped_entities",
1253
+ "linkback_relation_tags": ["string"]
1254
+ }
1255
+ ],
1256
+ "created_at": "1970-01-01T00:00:00.000Z",
1257
+ "updated_at": "1970-01-01T00:00:00.000Z",
1258
+ "created_by": {
1259
+ "type": "user",
1260
+ "org_id": "string",
1261
+ "user_id": "string"
1262
+ },
1263
+ "last_updated_by": {
1264
+ "type": "user",
1265
+ "org_id": "string",
1266
+ "user_id": "string"
1267
+ },
1268
+ "org_id": "66",
1269
+ "version": 2
1270
+ }
1271
+ ```
1272
+
1273
+ </details>
1274
+
1275
+ ---
1276
+
1277
+ ### `queryMappingHistory`
1278
+
1279
+ Get the Mapping History
1280
+
1281
+ `GET /v1/mappings/history`
1282
+
1283
+ ```ts
1284
+ const { data } = await client.queryMappingHistory({
1285
+ from: 'example',
1286
+ to: 'example',
1287
+ targetEntityId: 'example',
1288
+ sourceEntityId: 'example',
1289
+ })
1290
+ ```
1291
+
1292
+ <details>
1293
+ <summary>Response</summary>
1294
+
1295
+ ```json
1296
+ {}
1297
+ ```
1298
+
1299
+ </details>
1300
+
1301
+ ---
1302
+
1303
+ ### `executeRelations`
1304
+
1305
+ Execute relation mapping between source entity and target entities
1306
+
1307
+ `POST /v1/relations:execute`
1308
+
1309
+ ```ts
1310
+ const { data } = await client.executeRelations(
1311
+ null,
1312
+ {
1313
+ source_ref: {
1314
+ entity_id: 'string',
1315
+ entity_schema: 'submission'
1316
+ },
1317
+ target: {
1318
+ main_entity_ref: {
1319
+ entity_id: 'string',
1320
+ entity_schema: 'submission'
1321
+ },
1322
+ relation_attributes: [
1323
+ {
1324
+ target: 'string',
1325
+ target_tags: ['string'],
1326
+ target_tags_include_source: false,
1327
+ override_with_source_filter: false,
1328
+ source_filter: {
1329
+ limit: 0,
1330
+ schema: 'string',
1331
+ attribute: 'string',
1332
+ relation_tag: 'string',
1333
+ tag: 'string',
1334
+ self: false
1335
+ },
1336
+ related_to: {},
1337
+ mode: 'append',
1338
+ origin: 'system_recommendation'
1339
+ }
1340
+ ],
1341
+ linkback: {
1342
+ attribute: 'mapped_entities',
1343
+ relation_tags: ['string']
1344
+ }
1345
+ },
1346
+ additional_relations: [
1347
+ {
1348
+ entity_id: 'string',
1349
+ attribute: 'string'
1350
+ }
1351
+ ]
1352
+ },
1353
+ )
1354
+ ```
1355
+
1356
+ <details>
1357
+ <summary>Response</summary>
1358
+
1359
+ ```json
1360
+ {
1361
+ "relations": [
1362
+ {
1363
+ "source_entity_id": "string",
1364
+ "target_entity_id": "string",
1365
+ "relation_attr": "string",
1366
+ "tags": ["string"]
1367
+ }
1368
+ ]
1369
+ }
1370
+ ```
1371
+
1372
+ </details>
1373
+
1374
+ ---
1375
+
1376
+ ### `getMappingConfig`
1377
+
1378
+ Get latest version of a mapping config by id V2
1379
+
1380
+ `GET /v2/mappings/{id}`
1381
+
1382
+ ```ts
1383
+ const { data } = await client.getMappingConfig({
1384
+ id: '123e4567-e89b-12d3-a456-426614174000',
1385
+ })
1386
+ ```
1387
+
1388
+ <details>
1389
+ <summary>Response</summary>
1390
+
1391
+ ```json
1392
+ {
1393
+ "id": "string",
1394
+ "source": {
1395
+ "type": "journey",
1396
+ "config": {
1397
+ "journey_id": "string"
1398
+ }
1399
+ },
1400
+ "targets": [
1401
+ {
1402
+ "id": "string",
1403
+ "name": "string",
1404
+ "allow_failure": true,
1405
+ "target_schema": "string",
1406
+ "target_unique": ["string"],
1407
+ "loop_config": {
1408
+ "source_path": "string",
1409
+ "length": "the length of the array"
1410
+ },
1411
+ "conditionMode": "oneOf",
1412
+ "conditions": [
1413
+ {
1414
+ "_exists": {
1415
+ "source": "string",
1416
+ "value": "string"
1417
+ },
1418
+ "_equals": {
1419
+ "source": "string",
1420
+ "value": "string"
1421
+ },
1422
+ "_not_exists": {
1423
+ "source": "string",
1424
+ "value": "string"
1425
+ },
1426
+ "_any_of": {
1427
+ "source": "string",
1428
+ "value": "string"
1429
+ }
1430
+ }
1431
+ ],
1432
+ "mapping_attributes": [
1433
+ {
1434
+ "target": "_tags",
1435
+ "operation": {
1436
+ "_append": ["new", "tags"],
1437
+ "_uniq": true
1438
+ }
1439
+ },
1440
+ {
1441
+ "mode": "copy_if_exists",
1442
+ "target": "string",
1443
+ "value": {}
1444
+ }
1445
+ ],
1446
+ "relation_attributes": [
1447
+ {
1448
+ "target": "string",
1449
+ "target_tags": ["string"],
1450
+ "target_tags_include_source": false,
1451
+ "override_with_source_filter": false,
1452
+ "source_filter": {
1453
+ "limit": 0,
1454
+ "schema": "string",
1455
+ "attribute": "string",
1456
+ "relation_tag": "string",
1457
+ "tag": "string",
1458
+ "self": false
1459
+ },
1460
+ "related_to": {},
1461
+ "mode": "append",
1462
+ "origin": "system_recommendation"
1463
+ }
1464
+ ],
1465
+ "linkback_relation_attribute": "mapped_entities",
1466
+ "linkback_relation_tags": ["string"]
1467
+ }
1468
+ ],
1469
+ "created_at": "1970-01-01T00:00:00.000Z",
1470
+ "updated_at": "1970-01-01T00:00:00.000Z",
1471
+ "created_by": {
1472
+ "type": "user",
1473
+ "org_id": "string",
1474
+ "user_id": "string"
1475
+ },
1476
+ "last_updated_by": {
1477
+ "type": "user",
1478
+ "org_id": "string",
1479
+ "user_id": "string"
1480
+ },
1481
+ "org_id": "66",
1482
+ "version": 2
1483
+ }
1484
+ ```
1485
+
1486
+ </details>
1487
+
1488
+ ---
1489
+
1490
+ ### `putMappingConfig`
1491
+
1492
+ Stores new version of entity mapping config
1493
+
1494
+ `PUT /v2/mappings/{id}`
1495
+
1496
+ ```ts
1497
+ const { data } = await client.putMappingConfig(
1498
+ {
1499
+ id: '123e4567-e89b-12d3-a456-426614174000',
1500
+ },
1501
+ {
1502
+ id: 'string',
1503
+ source: {
1504
+ type: 'journey',
1505
+ config: {
1506
+ journey_id: 'string'
1507
+ }
1508
+ },
1509
+ targets: [
1510
+ {
1511
+ id: 'string',
1512
+ name: 'string',
1513
+ allow_failure: true,
1514
+ target_schema: 'string',
1515
+ target_unique: ['string'],
1516
+ loop_config: {
1517
+ source_path: 'string',
1518
+ length: 'the length of the array'
1519
+ },
1520
+ conditionMode: 'oneOf',
1521
+ conditions: [
1522
+ {
1523
+ _exists: {
1524
+ source: 'string',
1525
+ value: 'string'
1526
+ },
1527
+ _equals: {
1528
+ source: 'string',
1529
+ value: 'string'
1530
+ },
1531
+ _not_exists: {
1532
+ source: 'string',
1533
+ value: 'string'
1534
+ },
1535
+ _any_of: {
1536
+ source: 'string',
1537
+ value: 'string'
1538
+ }
1539
+ }
1540
+ ],
1541
+ mapping_attributes: [
1542
+ {
1543
+ target: '_tags',
1544
+ operation: {
1545
+ _append: ['new', 'tags'],
1546
+ _uniq: true
1547
+ }
1548
+ },
1549
+ {
1550
+ mode: 'copy_if_exists',
1551
+ target: 'string',
1552
+ value: {}
1553
+ }
1554
+ ],
1555
+ relation_attributes: [
1556
+ {
1557
+ target: 'string',
1558
+ target_tags: ['string'],
1559
+ target_tags_include_source: false,
1560
+ override_with_source_filter: false,
1561
+ source_filter: {
1562
+ limit: 0,
1563
+ schema: 'string',
1564
+ attribute: 'string',
1565
+ relation_tag: 'string',
1566
+ tag: 'string',
1567
+ self: false
1568
+ },
1569
+ related_to: {},
1570
+ mode: 'append',
1571
+ origin: 'system_recommendation'
1572
+ }
1573
+ ],
1574
+ linkback_relation_attribute: 'mapped_entities',
1575
+ linkback_relation_tags: ['string']
1576
+ }
1577
+ ],
1578
+ created_at: '1970-01-01T00:00:00.000Z',
1579
+ updated_at: '1970-01-01T00:00:00.000Z',
1580
+ created_by: {
1581
+ type: 'user',
1582
+ org_id: 'string',
1583
+ user_id: 'string'
1584
+ },
1585
+ last_updated_by: {
1586
+ type: 'user',
1587
+ org_id: 'string',
1588
+ user_id: 'string'
1589
+ },
1590
+ org_id: '66',
1591
+ version: 2
1592
+ },
1593
+ )
1594
+ ```
1595
+
1596
+ <details>
1597
+ <summary>Response</summary>
1598
+
1599
+ ```json
1600
+ {
1601
+ "id": "string",
1602
+ "source": {
1603
+ "type": "journey",
1604
+ "config": {
1605
+ "journey_id": "string"
1606
+ }
1607
+ },
1608
+ "targets": [
1609
+ {
1610
+ "id": "string",
1611
+ "name": "string",
1612
+ "allow_failure": true,
1613
+ "target_schema": "string",
1614
+ "target_unique": ["string"],
1615
+ "loop_config": {
1616
+ "source_path": "string",
1617
+ "length": "the length of the array"
1618
+ },
1619
+ "conditionMode": "oneOf",
1620
+ "conditions": [
1621
+ {
1622
+ "_exists": {
1623
+ "source": "string",
1624
+ "value": "string"
1625
+ },
1626
+ "_equals": {
1627
+ "source": "string",
1628
+ "value": "string"
1629
+ },
1630
+ "_not_exists": {
1631
+ "source": "string",
1632
+ "value": "string"
1633
+ },
1634
+ "_any_of": {
1635
+ "source": "string",
1636
+ "value": "string"
1637
+ }
1638
+ }
1639
+ ],
1640
+ "mapping_attributes": [
1641
+ {
1642
+ "target": "_tags",
1643
+ "operation": {
1644
+ "_append": ["new", "tags"],
1645
+ "_uniq": true
1646
+ }
1647
+ },
1648
+ {
1649
+ "mode": "copy_if_exists",
1650
+ "target": "string",
1651
+ "value": {}
1652
+ }
1653
+ ],
1654
+ "relation_attributes": [
1655
+ {
1656
+ "target": "string",
1657
+ "target_tags": ["string"],
1658
+ "target_tags_include_source": false,
1659
+ "override_with_source_filter": false,
1660
+ "source_filter": {
1661
+ "limit": 0,
1662
+ "schema": "string",
1663
+ "attribute": "string",
1664
+ "relation_tag": "string",
1665
+ "tag": "string",
1666
+ "self": false
1667
+ },
1668
+ "related_to": {},
1669
+ "mode": "append",
1670
+ "origin": "system_recommendation"
1671
+ }
1672
+ ],
1673
+ "linkback_relation_attribute": "mapped_entities",
1674
+ "linkback_relation_tags": ["string"]
1675
+ }
1676
+ ],
1677
+ "created_at": "1970-01-01T00:00:00.000Z",
1678
+ "updated_at": "1970-01-01T00:00:00.000Z",
1679
+ "created_by": {
1680
+ "type": "user",
1681
+ "org_id": "string",
1682
+ "user_id": "string"
1683
+ },
1684
+ "last_updated_by": {
1685
+ "type": "user",
1686
+ "org_id": "string",
1687
+ "user_id": "string"
1688
+ },
1689
+ "org_id": "66",
1690
+ "version": 2
1691
+ }
1692
+ ```
1693
+
1694
+ </details>
1695
+
1696
+ ---
1697
+
1698
+ ## Schemas
1699
+
1700
+ ### `SearchMappingReq`
1701
+
1702
+ ```ts
1703
+ type SearchMappingReq = {
1704
+ source?: {
1705
+ type?: "journey" | "entity"
1706
+ config?: {
1707
+ journey_id?: { ... }
1708
+ } | {
1709
+ entity_id: { ... }
1710
+ entity_schema?: { ... }
1711
+ }
1712
+ }
1713
+ }
1714
+ ```
1715
+
1716
+ ### `MappingConfigsResp`
1717
+
1718
+ ```ts
1719
+ type MappingConfigsResp = {
1720
+ configs: Array<{
1721
+ id: string
1722
+ source: {
1723
+ type?: { ... }
1724
+ config?: { ... }
1725
+ }
1726
+ targets: Array<{
1727
+ id?: { ... }
1728
+ name?: { ... }
1729
+ allow_failure?: { ... }
1730
+ target_schema: { ... }
1731
+ target_unique?: { ... }
1732
+ loop_config?: { ... }
1733
+ conditionMode?: { ... }
1734
+ conditions?: { ... }
1735
+ mapping_attributes: { ... }
1736
+ relation_attributes?: { ... }
1737
+ linkback_relation_attribute?: { ... }
1738
+ linkback_relation_tags?: { ... }
1739
+ }>
1740
+ created_at?: string // date-time
1741
+ updated_at?: string // date-time
1742
+ created_by?: {
1743
+ type: { ... }
1744
+ org_id?: { ... }
1745
+ user_id?: { ... }
1746
+ }
1747
+ last_updated_by?: {
1748
+ type: { ... }
1749
+ org_id?: { ... }
1750
+ user_id?: { ... }
1751
+ }
1752
+ org_id?: string
1753
+ version?: number
1754
+ }>
1755
+ }
1756
+ ```
1757
+
1758
+ ### `MappingConfigs`
1759
+
1760
+ ```ts
1761
+ type MappingConfigs = Array<{
1762
+ id: string
1763
+ source: {
1764
+ type?: "journey" | "entity"
1765
+ config?: {
1766
+ journey_id?: { ... }
1767
+ } | {
1768
+ entity_id: { ... }
1769
+ entity_schema?: { ... }
1770
+ }
1771
+ }
1772
+ targets: Array<{
1773
+ id?: string
1774
+ name?: string
1775
+ allow_failure?: boolean
1776
+ target_schema: string
1777
+ target_unique?: string[]
1778
+ loop_config?: {
1779
+ source_path?: { ... }
1780
+ length?: { ... }
1781
+ }
1782
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
1783
+ conditions?: Array<{
1784
+ _exists?: { ... }
1785
+ _equals?: { ... }
1786
+ _not_exists?: { ... }
1787
+ _any_of?: { ... }
1788
+ }>
1789
+ mapping_attributes: Array<{
1790
+ target: { ... }
1791
+ operation: { ... }
1792
+ origin?: { ... }
1793
+ } | {
1794
+ mode: { ... }
1795
+ target: { ... }
1796
+ value: { ... }
1797
+ } | {
1798
+ mode: { ... }
1799
+ target: { ... }
1800
+ source: { ... }
1801
+ } | {
1802
+ mode: { ... }
1803
+ target: { ... }
1804
+ source?: { ... }
1805
+ value_json: { ... }
1806
+ target_unique?: { ... }
1807
+ }>
1808
+ relation_attributes?: Array<{
1809
+ target: { ... }
1810
+ target_tags?: { ... }
1811
+ target_tags_include_source?: { ... }
1812
+ override_with_source_filter?: { ... }
1813
+ source_filter?: { ... }
1814
+ related_to?: { ... }
1815
+ mode: { ... }
1816
+ origin?: { ... }
1817
+ }>
1818
+ linkback_relation_attribute?: string
1819
+ linkback_relation_tags?: string[]
1820
+ }>
1821
+ created_at?: string // date-time
1822
+ updated_at?: string // date-time
1823
+ created_by?: {
1824
+ type: "user" | "internal_service"
1825
+ org_id?: string
1826
+ user_id?: string
1827
+ }
1828
+ last_updated_by?: {
1829
+ type: "user" | "internal_service"
1830
+ org_id?: string
1831
+ user_id?: string
1832
+ }
1833
+ org_id?: string
1834
+ version?: number
1835
+ }>
1836
+ ```
1837
+
1838
+ ### `MappingConfig`
1839
+
1840
+ ```ts
1841
+ type MappingConfig = {
1842
+ id: string
1843
+ source: {
1844
+ type?: "journey" | "entity"
1845
+ config?: {
1846
+ journey_id?: { ... }
1847
+ } | {
1848
+ entity_id: { ... }
1849
+ entity_schema?: { ... }
1850
+ }
1851
+ }
1852
+ targets: Array<{
1853
+ id?: string
1854
+ name?: string
1855
+ allow_failure?: boolean
1856
+ target_schema: string
1857
+ target_unique?: string[]
1858
+ loop_config?: {
1859
+ source_path?: { ... }
1860
+ length?: { ... }
1861
+ }
1862
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
1863
+ conditions?: Array<{
1864
+ _exists?: { ... }
1865
+ _equals?: { ... }
1866
+ _not_exists?: { ... }
1867
+ _any_of?: { ... }
1868
+ }>
1869
+ mapping_attributes: Array<{
1870
+ target: { ... }
1871
+ operation: { ... }
1872
+ origin?: { ... }
1873
+ } | {
1874
+ mode: { ... }
1875
+ target: { ... }
1876
+ value: { ... }
1877
+ } | {
1878
+ mode: { ... }
1879
+ target: { ... }
1880
+ source: { ... }
1881
+ } | {
1882
+ mode: { ... }
1883
+ target: { ... }
1884
+ source?: { ... }
1885
+ value_json: { ... }
1886
+ target_unique?: { ... }
1887
+ }>
1888
+ relation_attributes?: Array<{
1889
+ target: { ... }
1890
+ target_tags?: { ... }
1891
+ target_tags_include_source?: { ... }
1892
+ override_with_source_filter?: { ... }
1893
+ source_filter?: { ... }
1894
+ related_to?: { ... }
1895
+ mode: { ... }
1896
+ origin?: { ... }
1897
+ }>
1898
+ linkback_relation_attribute?: string
1899
+ linkback_relation_tags?: string[]
1900
+ }>
1901
+ created_at?: string // date-time
1902
+ updated_at?: string // date-time
1903
+ created_by?: {
1904
+ type: "user" | "internal_service"
1905
+ org_id?: string
1906
+ user_id?: string
1907
+ }
1908
+ last_updated_by?: {
1909
+ type: "user" | "internal_service"
1910
+ org_id?: string
1911
+ user_id?: string
1912
+ }
1913
+ org_id?: string
1914
+ version?: number
1915
+ }
1916
+ ```
1917
+
1918
+ ### `MappingConfigV2`
1919
+
1920
+ ```ts
1921
+ type MappingConfigV2 = {
1922
+ id: string
1923
+ source: {
1924
+ type?: "journey" | "entity"
1925
+ config?: {
1926
+ journey_id?: { ... }
1927
+ } | {
1928
+ entity_id: { ... }
1929
+ entity_schema?: { ... }
1930
+ }
1931
+ }
1932
+ targets: Array<{
1933
+ id?: string
1934
+ name?: string
1935
+ allow_failure?: boolean
1936
+ target_schema: string
1937
+ target_unique?: string[]
1938
+ loop_config?: {
1939
+ source_path?: { ... }
1940
+ length?: { ... }
1941
+ }
1942
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
1943
+ conditions?: Array<{
1944
+ _exists?: { ... }
1945
+ _equals?: { ... }
1946
+ _not_exists?: { ... }
1947
+ _any_of?: { ... }
1948
+ }>
1949
+ mapping_attributes: Array<{
1950
+ target: { ... }
1951
+ operation: { ... }
1952
+ origin?: { ... }
1953
+ } | {
1954
+ mode: { ... }
1955
+ target: { ... }
1956
+ value: { ... }
1957
+ } | {
1958
+ mode: { ... }
1959
+ target: { ... }
1960
+ source: { ... }
1961
+ } | {
1962
+ mode: { ... }
1963
+ target: { ... }
1964
+ source?: { ... }
1965
+ value_json: { ... }
1966
+ target_unique?: { ... }
1967
+ }>
1968
+ relation_attributes?: Array<{
1969
+ target: { ... }
1970
+ target_tags?: { ... }
1971
+ target_tags_include_source?: { ... }
1972
+ override_with_source_filter?: { ... }
1973
+ source_filter?: { ... }
1974
+ related_to?: { ... }
1975
+ mode: { ... }
1976
+ origin?: { ... }
1977
+ }>
1978
+ linkback_relation_attribute?: string
1979
+ linkback_relation_tags?: string[]
1980
+ }>
1981
+ created_at?: string // date-time
1982
+ updated_at?: string // date-time
1983
+ created_by?: {
1984
+ type: "user" | "internal_service"
1985
+ org_id?: string
1986
+ user_id?: string
1987
+ }
1988
+ last_updated_by?: {
1989
+ type: "user" | "internal_service"
1990
+ org_id?: string
1991
+ user_id?: string
1992
+ }
1993
+ org_id?: string
1994
+ version?: number
1995
+ }
1996
+ ```
1997
+
1998
+ ### `MappingConfigCommonFields`
1999
+
2000
+ ```ts
2001
+ type MappingConfigCommonFields = {
2002
+ id: string
2003
+ source: {
2004
+ type?: "journey" | "entity"
2005
+ config?: {
2006
+ journey_id?: { ... }
2007
+ } | {
2008
+ entity_id: { ... }
2009
+ entity_schema?: { ... }
2010
+ }
2011
+ }
2012
+ targets: Array<{
2013
+ id?: string
2014
+ name?: string
2015
+ allow_failure?: boolean
2016
+ target_schema: string
2017
+ target_unique?: string[]
2018
+ loop_config?: {
2019
+ source_path?: { ... }
2020
+ length?: { ... }
2021
+ }
2022
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
2023
+ conditions?: Array<{
2024
+ _exists?: { ... }
2025
+ _equals?: { ... }
2026
+ _not_exists?: { ... }
2027
+ _any_of?: { ... }
2028
+ }>
2029
+ mapping_attributes: Array<{
2030
+ target: { ... }
2031
+ operation: { ... }
2032
+ origin?: { ... }
2033
+ } | {
2034
+ mode: { ... }
2035
+ target: { ... }
2036
+ value: { ... }
2037
+ } | {
2038
+ mode: { ... }
2039
+ target: { ... }
2040
+ source: { ... }
2041
+ } | {
2042
+ mode: { ... }
2043
+ target: { ... }
2044
+ source?: { ... }
2045
+ value_json: { ... }
2046
+ target_unique?: { ... }
2047
+ }>
2048
+ relation_attributes?: Array<{
2049
+ target: { ... }
2050
+ target_tags?: { ... }
2051
+ target_tags_include_source?: { ... }
2052
+ override_with_source_filter?: { ... }
2053
+ source_filter?: { ... }
2054
+ related_to?: { ... }
2055
+ mode: { ... }
2056
+ origin?: { ... }
2057
+ }>
2058
+ linkback_relation_attribute?: string
2059
+ linkback_relation_tags?: string[]
2060
+ }>
2061
+ created_at?: string // date-time
2062
+ updated_at?: string // date-time
2063
+ created_by?: {
2064
+ type: "user" | "internal_service"
2065
+ org_id?: string
2066
+ user_id?: string
2067
+ }
2068
+ last_updated_by?: {
2069
+ type: "user" | "internal_service"
2070
+ org_id?: string
2071
+ user_id?: string
2072
+ }
2073
+ }
2074
+ ```
2075
+
2076
+ ### `Owner`
2077
+
2078
+ ```ts
2079
+ type Owner = {
2080
+ type: "user" | "internal_service"
2081
+ org_id?: string
2082
+ user_id?: string
2083
+ }
2084
+ ```
2085
+
2086
+ ### `ExecuteRelationsReq`
2087
+
2088
+ Build relations between a source entity and one or more target entities, dynamically identified
2089
+
2090
+ ```ts
2091
+ type ExecuteRelationsReq = {
2092
+ source_ref: {
2093
+ entity_id: string
2094
+ entity_schema?: string
2095
+ }
2096
+ target?: {
2097
+ main_entity_ref: {
2098
+ entity_id: { ... }
2099
+ entity_schema?: { ... }
2100
+ }
2101
+ relation_attributes: Array<{
2102
+ target: { ... }
2103
+ target_tags?: { ... }
2104
+ target_tags_include_source?: { ... }
2105
+ override_with_source_filter?: { ... }
2106
+ source_filter?: { ... }
2107
+ related_to?: { ... }
2108
+ mode: { ... }
2109
+ origin?: { ... }
2110
+ }>
2111
+ linkback?: {
2112
+ attribute: { ... }
2113
+ relation_tags: { ... }
2114
+ }
2115
+ }
2116
+ additional_relations?: Array<{
2117
+ entity_id: string
2118
+ attribute: string
2119
+ }>
2120
+ }
2121
+ ```
2122
+
2123
+ ### `ExecuteRelationsResp`
2124
+
2125
+ ```ts
2126
+ type ExecuteRelationsResp = {
2127
+ relations?: Array<{
2128
+ source_entity_id: string
2129
+ target_entity_id: string
2130
+ relation_attr: string
2131
+ tags?: string[]
2132
+ }>
2133
+ }
2134
+ ```
2135
+
2136
+ ### `NewRelationItem`
2137
+
2138
+ ```ts
2139
+ type NewRelationItem = {
2140
+ source_entity_id: string
2141
+ target_entity_id: string
2142
+ relation_attr: string
2143
+ tags?: string[]
2144
+ }
2145
+ ```
2146
+
2147
+ ### `RelationItem`
2148
+
2149
+ ```ts
2150
+ type RelationItem = {
2151
+ entity_id: string
2152
+ attribute: string
2153
+ }
2154
+ ```
2155
+
2156
+ ### `ExecuteMappingReq`
2157
+
2158
+ Pass either source or source_entity
2159
+
2160
+ ```ts
2161
+ type ExecuteMappingReq = {
2162
+ source_ref: {
2163
+ entity_id: string
2164
+ entity_schema?: string
2165
+ }
2166
+ targets: Array<{
2167
+ id?: string
2168
+ name?: string
2169
+ allow_failure?: boolean
2170
+ target_schema: string
2171
+ target_unique?: string[]
2172
+ loop_config?: {
2173
+ source_path?: { ... }
2174
+ length?: { ... }
2175
+ }
2176
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
2177
+ conditions?: Array<{
2178
+ _exists?: { ... }
2179
+ _equals?: { ... }
2180
+ _not_exists?: { ... }
2181
+ _any_of?: { ... }
2182
+ }>
2183
+ mapping_attributes: Array<{
2184
+ target: { ... }
2185
+ operation: { ... }
2186
+ origin?: { ... }
2187
+ } | {
2188
+ mode: { ... }
2189
+ target: { ... }
2190
+ value: { ... }
2191
+ } | {
2192
+ mode: { ... }
2193
+ target: { ... }
2194
+ source: { ... }
2195
+ } | {
2196
+ mode: { ... }
2197
+ target: { ... }
2198
+ source?: { ... }
2199
+ value_json: { ... }
2200
+ target_unique?: { ... }
2201
+ }>
2202
+ relation_attributes?: Array<{
2203
+ target: { ... }
2204
+ target_tags?: { ... }
2205
+ target_tags_include_source?: { ... }
2206
+ override_with_source_filter?: { ... }
2207
+ source_filter?: { ... }
2208
+ related_to?: { ... }
2209
+ mode: { ... }
2210
+ origin?: { ... }
2211
+ }>
2212
+ linkback_relation_attribute?: string
2213
+ linkback_relation_tags?: string[]
2214
+ }>
2215
+ }
2216
+ ```
2217
+
2218
+ ### `ExecuteMappingResp`
2219
+
2220
+ ```ts
2221
+ type ExecuteMappingResp = {
2222
+ mapped_entities: Array<{
2223
+ _id?: string
2224
+ _schema?: string
2225
+ _title?: string
2226
+ _org?: string
2227
+ _tags?: string[]
2228
+ _created_at?: string
2229
+ _updated_at?: string
2230
+ required?: unknown
2231
+ }>
2232
+ failures?: Array<{
2233
+ target?: {
2234
+ id?: { ... }
2235
+ name?: { ... }
2236
+ allow_failure?: { ... }
2237
+ target_schema: { ... }
2238
+ target_unique?: { ... }
2239
+ loop_config?: { ... }
2240
+ conditionMode?: { ... }
2241
+ conditions?: { ... }
2242
+ mapping_attributes: { ... }
2243
+ relation_attributes?: { ... }
2244
+ linkback_relation_attribute?: { ... }
2245
+ linkback_relation_tags?: { ... }
2246
+ }
2247
+ error?: {
2248
+ isSilent?: { ... }
2249
+ message?: { ... }
2250
+ }
2251
+ }>
2252
+ warnings?: Array<{
2253
+ explanation: string
2254
+ context?: string
2255
+ id?: string
2256
+ }>
2257
+ }
2258
+ ```
2259
+
2260
+ ### `MappingFailure`
2261
+
2262
+ ```ts
2263
+ type MappingFailure = {
2264
+ target?: {
2265
+ id?: string
2266
+ name?: string
2267
+ allow_failure?: boolean
2268
+ target_schema: string
2269
+ target_unique?: string[]
2270
+ loop_config?: {
2271
+ source_path?: { ... }
2272
+ length?: { ... }
2273
+ }
2274
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
2275
+ conditions?: Array<{
2276
+ _exists?: { ... }
2277
+ _equals?: { ... }
2278
+ _not_exists?: { ... }
2279
+ _any_of?: { ... }
2280
+ }>
2281
+ mapping_attributes: Array<{
2282
+ target: { ... }
2283
+ operation: { ... }
2284
+ origin?: { ... }
2285
+ } | {
2286
+ mode: { ... }
2287
+ target: { ... }
2288
+ value: { ... }
2289
+ } | {
2290
+ mode: { ... }
2291
+ target: { ... }
2292
+ source: { ... }
2293
+ } | {
2294
+ mode: { ... }
2295
+ target: { ... }
2296
+ source?: { ... }
2297
+ value_json: { ... }
2298
+ target_unique?: { ... }
2299
+ }>
2300
+ relation_attributes?: Array<{
2301
+ target: { ... }
2302
+ target_tags?: { ... }
2303
+ target_tags_include_source?: { ... }
2304
+ override_with_source_filter?: { ... }
2305
+ source_filter?: { ... }
2306
+ related_to?: { ... }
2307
+ mode: { ... }
2308
+ origin?: { ... }
2309
+ }>
2310
+ linkback_relation_attribute?: string
2311
+ linkback_relation_tags?: string[]
2312
+ }
2313
+ error?: {
2314
+ isSilent?: boolean
2315
+ message?: string
2316
+ }
2317
+ }
2318
+ ```
2319
+
2320
+ ### `MappingWarning`
2321
+
2322
+ ```ts
2323
+ type MappingWarning = {
2324
+ explanation: string
2325
+ context?: string
2326
+ id?: string
2327
+ }
2328
+ ```
2329
+
2330
+ ### `Entity`
2331
+
2332
+ ```ts
2333
+ type Entity = {
2334
+ _id?: string
2335
+ _schema?: string
2336
+ _title?: string
2337
+ _org?: string
2338
+ _tags?: string[]
2339
+ _created_at?: string
2340
+ _updated_at?: string
2341
+ required?: unknown
2342
+ }
2343
+ ```
2344
+
2345
+ ### `EntityRef`
2346
+
2347
+ ```ts
2348
+ type EntityRef = {
2349
+ entity_id: string
2350
+ entity_schema?: string
2351
+ }
2352
+ ```
2353
+
2354
+ ### `SourceConfig`
2355
+
2356
+ ```ts
2357
+ type SourceConfig = {
2358
+ type?: "journey" | "entity"
2359
+ config?: {
2360
+ journey_id?: string
2361
+ } | {
2362
+ entity_id: string
2363
+ entity_schema?: string
2364
+ }
2365
+ }
2366
+ ```
2367
+
2368
+ ### `JourneyRef`
2369
+
2370
+ ```ts
2371
+ type JourneyRef = {
2372
+ journey_id?: string
2373
+ }
2374
+ ```
2375
+
2376
+ ### `Loop_Index_String`
2377
+
2378
+ This string value will be replaced with the value of the loop index, when mapping in loop mode
2379
+
2380
+ ```ts
2381
+ type Loop_Index_String = "##LOOP_INDEX##"
2382
+ ```
2383
+
2384
+ ### `TargetConfig`
2385
+
2386
+ ```ts
2387
+ type TargetConfig = {
2388
+ id?: string
2389
+ name?: string
2390
+ allow_failure?: boolean
2391
+ target_schema: string
2392
+ target_unique?: string[]
2393
+ loop_config?: {
2394
+ source_path?: string
2395
+ length?: number
2396
+ }
2397
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
2398
+ conditions?: Array<{
2399
+ _exists?: {
2400
+ source?: { ... }
2401
+ value?: { ... }
2402
+ }
2403
+ _equals?: {
2404
+ source?: { ... }
2405
+ value?: { ... }
2406
+ }
2407
+ _not_exists?: {
2408
+ source?: { ... }
2409
+ value?: { ... }
2410
+ }
2411
+ _any_of?: {
2412
+ source?: { ... }
2413
+ value?: { ... }
2414
+ }
2415
+ }>
2416
+ mapping_attributes: Array<{
2417
+ target: string
2418
+ operation: {
2419
+ _set?: { ... }
2420
+ _append?: { ... }
2421
+ _prepend?: { ... }
2422
+ _uniq?: { ... }
2423
+ _retain_old_values?: { ... }
2424
+ _copy?: { ... }
2425
+ _template?: { ... }
2426
+ _random?: { ... }
2427
+ } | string | boolean | number | Record<string, unknown> | unknown[]
2428
+ origin?: "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2429
+ } | {
2430
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2431
+ target: string
2432
+ value: unknown
2433
+ } | {
2434
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2435
+ target: string
2436
+ source: string
2437
+ } | {
2438
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2439
+ target: string
2440
+ source?: string
2441
+ value_json: string
2442
+ target_unique?: string[]
2443
+ }>
2444
+ relation_attributes?: Array<{
2445
+ target: string
2446
+ target_tags?: string[]
2447
+ target_tags_include_source?: boolean
2448
+ override_with_source_filter?: boolean
2449
+ source_filter?: {
2450
+ limit?: { ... }
2451
+ schema?: { ... }
2452
+ attribute?: { ... }
2453
+ relation_tag?: { ... }
2454
+ tag?: { ... }
2455
+ self?: { ... }
2456
+ }
2457
+ related_to?: Record<string, unknown>
2458
+ mode: "append" | "prepend" | "set"
2459
+ origin?: "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2460
+ }>
2461
+ linkback_relation_attribute?: string
2462
+ linkback_relation_tags?: string[]
2463
+ }
2464
+ ```
2465
+
2466
+ ### `MapCondition`
2467
+
2468
+ ```ts
2469
+ type MapCondition = {
2470
+ _exists?: {
2471
+ source?: string
2472
+ value?: string | number | object | object[]
2473
+ }
2474
+ _equals?: {
2475
+ source?: string
2476
+ value?: string | number | object | object[]
2477
+ }
2478
+ _not_exists?: {
2479
+ source?: string
2480
+ value?: string | number | object | object[]
2481
+ }
2482
+ _any_of?: {
2483
+ source?: string
2484
+ value?: string | number | object | object[]
2485
+ }
2486
+ }
2487
+ ```
2488
+
2489
+ ### `ConditionNode`
2490
+
2491
+ ```ts
2492
+ type ConditionNode = {
2493
+ source?: string
2494
+ value?: string | number | object | object[]
2495
+ }
2496
+ ```
2497
+
2498
+ ### `RelationAttribute`
2499
+
2500
+ ```ts
2501
+ type RelationAttribute = {
2502
+ target: string
2503
+ target_tags?: string[]
2504
+ target_tags_include_source?: boolean
2505
+ override_with_source_filter?: boolean
2506
+ source_filter?: {
2507
+ limit?: number
2508
+ schema?: string
2509
+ attribute?: string
2510
+ relation_tag?: string
2511
+ tag?: string
2512
+ self?: boolean
2513
+ }
2514
+ related_to?: Record<string, unknown>
2515
+ mode: "append" | "prepend" | "set"
2516
+ origin?: "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2517
+ }
2518
+ ```
2519
+
2520
+ ### `MappingAttributeV2`
2521
+
2522
+ ```ts
2523
+ type MappingAttributeV2 = {
2524
+ target: string
2525
+ operation: {
2526
+ _set?: string | boolean | number | Record<string, unknown> | unknown[]
2527
+ _append?: unknown
2528
+ _prepend?: unknown
2529
+ _uniq?: boolean | string[]
2530
+ _retain_old_values?: boolean
2531
+ _copy?: string
2532
+ _template?: string
2533
+ _random?: {
2534
+ type: { ... }
2535
+ } | {
2536
+ type: { ... }
2537
+ min?: { ... }
2538
+ max?: { ... }
2539
+ }
2540
+ } | string | boolean | number | Record<string, unknown> | unknown[]
2541
+ origin?: "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2542
+ }
2543
+ ```
2544
+
2545
+ ### `AttributeOrigin`
2546
+
2547
+ Origin of an attribute.
2548
+
2549
+ ```ts
2550
+ type AttributeOrigin = "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2551
+ ```
2552
+
2553
+ ### `OperationNode`
2554
+
2555
+ Mapping operation nodes are either primitive values or operation node objects
2556
+
2557
+ ```ts
2558
+ type OperationNode = {
2559
+ _set?: string | boolean | number | Record<string, unknown> | unknown[]
2560
+ _append?: unknown
2561
+ _prepend?: unknown
2562
+ _uniq?: boolean | string[]
2563
+ _retain_old_values?: boolean
2564
+ _copy?: string
2565
+ _template?: string
2566
+ _random?: {
2567
+ type: "uuid" | "nanoid"
2568
+ } | {
2569
+ type: "number"
2570
+ min?: number
2571
+ max?: number
2572
+ }
2573
+ } | string | boolean | number | Record<string, unknown> | unknown[]
2574
+ ```
2575
+
2576
+ ### `OperationObjectNode`
2577
+
2578
+ ```ts
2579
+ type OperationObjectNode = {
2580
+ _set?: string | boolean | number | Record<string, unknown> | unknown[]
2581
+ _append?: unknown
2582
+ _prepend?: unknown
2583
+ _uniq?: boolean | string[]
2584
+ _retain_old_values?: boolean
2585
+ _copy?: string
2586
+ _template?: string
2587
+ _random?: {
2588
+ type: "uuid" | "nanoid"
2589
+ } | {
2590
+ type: "number"
2591
+ min?: number
2592
+ max?: number
2593
+ }
2594
+ }
2595
+ ```
2596
+
2597
+ ### `PrimitiveJSONValue`
2598
+
2599
+ Represents any primitive JSON value
2600
+
2601
+ ```ts
2602
+ type PrimitiveJSONValue = string | boolean | number | Record<string, unknown> | unknown[]
2603
+ ```
2604
+
2605
+ ### `RandomOperation`
2606
+
2607
+ ```ts
2608
+ type RandomOperation = {
2609
+ type: "uuid" | "nanoid"
2610
+ } | {
2611
+ type: "number"
2612
+ min?: number
2613
+ max?: number
2614
+ }
2615
+ ```
2616
+
2617
+ ### `MappingAttribute`
2618
+
2619
+ ```ts
2620
+ type MappingAttribute = {
2621
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2622
+ target: string
2623
+ value: unknown
2624
+ } | {
2625
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2626
+ target: string
2627
+ source: string
2628
+ } | {
2629
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2630
+ target: string
2631
+ source?: string
2632
+ value_json: string
2633
+ target_unique?: string[]
2634
+ }
2635
+ ```
2636
+
2637
+ ### `MappingAttributeMode`
2638
+
2639
+ - copy_if_exists - it replaces the target attribute with the source value - append_if_exists - it currently replaces target attribute with array like values. Useful when you have multiple values to be added into one attribute. - set_value - it sets a value to a predefined value. Must be used togethe
2640
+
2641
+ ```ts
2642
+ type MappingAttributeMode = "copy_if_exists" | "append_if_exists" | "set_value"
2643
+ ```
2644
+
2645
+ ### `SetValueMapper`
2646
+
2647
+ ```ts
2648
+ type SetValueMapper = {
2649
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2650
+ target: string
2651
+ value: unknown
2652
+ }
2653
+ ```
2654
+
2655
+ ### `CopyValueMapper`
2656
+
2657
+ ```ts
2658
+ type CopyValueMapper = {
2659
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2660
+ target: string
2661
+ source: string
2662
+ }
2663
+ ```
2664
+
2665
+ ### `AppendValueMapper`
2666
+
2667
+ ```ts
2668
+ type AppendValueMapper = {
2669
+ mode: "copy_if_exists" | "append_if_exists" | "set_value"
2670
+ target: string
2671
+ source?: string
2672
+ value_json: string
2673
+ target_unique?: string[]
2674
+ }
2675
+ ```
2676
+
2677
+ ### `MappingHistoryResp`
2678
+
2679
+ ```ts
2680
+ type MappingHistoryResp = {
2681
+ results: Array<{
2682
+ id: string
2683
+ timestamp: string // ISO datetime
2684
+ source_entity_snapshot: {
2685
+ _id?: { ... }
2686
+ _schema?: { ... }
2687
+ _title?: { ... }
2688
+ _org?: { ... }
2689
+ _tags?: { ... }
2690
+ _created_at?: { ... }
2691
+ _updated_at?: { ... }
2692
+ required?: { ... }
2693
+ }
2694
+ mapped_entities_snapshot: Array<{
2695
+ _id?: { ... }
2696
+ _schema?: { ... }
2697
+ _title?: { ... }
2698
+ _org?: { ... }
2699
+ _tags?: { ... }
2700
+ _created_at?: { ... }
2701
+ _updated_at?: { ... }
2702
+ required?: { ... }
2703
+ }>
2704
+ target_configs_snapshot: Array<{
2705
+ id?: { ... }
2706
+ name?: { ... }
2707
+ allow_failure?: { ... }
2708
+ target_schema: { ... }
2709
+ target_unique?: { ... }
2710
+ loop_config?: { ... }
2711
+ conditionMode?: { ... }
2712
+ conditions?: { ... }
2713
+ mapping_attributes: { ... }
2714
+ relation_attributes?: { ... }
2715
+ linkback_relation_attribute?: { ... }
2716
+ linkback_relation_tags?: { ... }
2717
+ }>
2718
+ }>
2719
+ }
2720
+ ```
2721
+
2722
+ ### `MappingHistoryEntry`
2723
+
2724
+ ```ts
2725
+ type MappingHistoryEntry = {
2726
+ id: string
2727
+ timestamp: string // ISO datetime
2728
+ source_entity_snapshot: {
2729
+ _id?: string
2730
+ _schema?: string
2731
+ _title?: string
2732
+ _org?: string
2733
+ _tags?: string[]
2734
+ _created_at?: string
2735
+ _updated_at?: string
2736
+ required?: unknown
2737
+ }
2738
+ mapped_entities_snapshot: Array<{
2739
+ _id?: string
2740
+ _schema?: string
2741
+ _title?: string
2742
+ _org?: string
2743
+ _tags?: string[]
2744
+ _created_at?: string
2745
+ _updated_at?: string
2746
+ required?: unknown
2747
+ }>
2748
+ target_configs_snapshot: Array<{
2749
+ id?: string
2750
+ name?: string
2751
+ allow_failure?: boolean
2752
+ target_schema: string
2753
+ target_unique?: string[]
2754
+ loop_config?: {
2755
+ source_path?: { ... }
2756
+ length?: { ... }
2757
+ }
2758
+ conditionMode?: "oneOf" | "anyOf" | "allOf"
2759
+ conditions?: Array<{
2760
+ _exists?: { ... }
2761
+ _equals?: { ... }
2762
+ _not_exists?: { ... }
2763
+ _any_of?: { ... }
2764
+ }>
2765
+ mapping_attributes: Array<{
2766
+ target: { ... }
2767
+ operation: { ... }
2768
+ origin?: { ... }
2769
+ } | {
2770
+ mode: { ... }
2771
+ target: { ... }
2772
+ value: { ... }
2773
+ } | {
2774
+ mode: { ... }
2775
+ target: { ... }
2776
+ source: { ... }
2777
+ } | {
2778
+ mode: { ... }
2779
+ target: { ... }
2780
+ source?: { ... }
2781
+ value_json: { ... }
2782
+ target_unique?: { ... }
2783
+ }>
2784
+ relation_attributes?: Array<{
2785
+ target: { ... }
2786
+ target_tags?: { ... }
2787
+ target_tags_include_source?: { ... }
2788
+ override_with_source_filter?: { ... }
2789
+ source_filter?: { ... }
2790
+ related_to?: { ... }
2791
+ mode: { ... }
2792
+ origin?: { ... }
2793
+ }>
2794
+ linkback_relation_attribute?: string
2795
+ linkback_relation_tags?: string[]
2796
+ }>
2797
+ }
2798
+ ```
2799
+
2800
+ ### `MappingSource`
2801
+
2802
+ ```ts
2803
+ type MappingSource = {
2804
+ key: string
2805
+ sub_properties?: Array<{
2806
+ value: string
2807
+ label: string
2808
+ initial_target_value?: string
2809
+ possible_target_types?: "string" | "date" | "datetime" | "boolean" | "number" | "image" | "file" | "address" | "email" | "phone" | "select" | "multiselect" | "payment" | "link" | "currency" | "sequence" | "relation" | "array"[]
2810
+ raw?: boolean
2811
+ }>
2812
+ source_type: string
2813
+ group?: string
2814
+ possible_target_types?: "string" | "date" | "datetime" | "boolean" | "number" | "image" | "file" | "address" | "email" | "phone" | "select" | "multiselect" | "payment" | "link" | "currency" | "sequence" | "relation" | "array"[]
2815
+ initial_relation?: {
2816
+ target: string
2817
+ target_tags?: string[]
2818
+ target_tags_include_source?: boolean
2819
+ override_with_source_filter?: boolean
2820
+ source_filter?: {
2821
+ limit?: { ... }
2822
+ schema?: { ... }
2823
+ attribute?: { ... }
2824
+ relation_tag?: { ... }
2825
+ tag?: { ... }
2826
+ self?: { ... }
2827
+ }
2828
+ related_to?: Record<string, unknown>
2829
+ mode: "append" | "prepend" | "set"
2830
+ origin?: "system_recommendation" | "user_manually" | "entity_updating_system_recommendation"
2831
+ }
2832
+ title: string
2833
+ sub_title?: string
2834
+ repeatable?: boolean
2835
+ target_settings?: {
2836
+ allowed_ui_actions?: "schema-select" | "attribute-select" | "target-delete" | "target-add" | "target"[]
2837
+ locked?: "each" | "first" | "system_recommendation"
2838
+ isSingleTarget?: boolean
2839
+ visibility?: {
2840
+ mode: { ... }
2841
+ if: { ... }
2842
+ message?: { ... }
2843
+ }
2844
+ }
2845
+ }
2846
+ ```
2847
+
2848
+ ### `MappingSourceProperty`
2849
+
2850
+ ```ts
2851
+ type MappingSourceProperty = {
2852
+ value: string
2853
+ label: string
2854
+ initial_target_value?: string
2855
+ possible_target_types?: "string" | "date" | "datetime" | "boolean" | "number" | "image" | "file" | "address" | "email" | "phone" | "select" | "multiselect" | "payment" | "link" | "currency" | "sequence" | "relation" | "array"[]
2856
+ raw?: boolean
2857
+ }
2858
+ ```
2859
+
2860
+ ### `MappingSourceTargetType`
2861
+
2862
+ ```ts
2863
+ type MappingSourceTargetType = "string" | "date" | "datetime" | "boolean" | "number" | "image" | "file" | "address" | "email" | "phone" | "select" | "multiselect" | "payment" | "link" | "currency" | "sequence" | "relation" | "array"
2864
+ ```