@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,1597 @@
1
+ # Validation Rules API
2
+
3
+ - **Base URL:** `https://validation-rules.sls.epilot.io`
4
+ - **Full API Docs:** [https://docs.epilot.io/api/validation-rules](https://docs.epilot.io/api/validation-rules)
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { epilot } from '@epilot/sdk'
10
+
11
+ epilot.authorize(() => '<token>')
12
+ const { data } = await epilot.validationRules.getValidationRules(...)
13
+ ```
14
+
15
+ ### Tree-shakeable import
16
+
17
+ ```ts
18
+ import { getClient, authorize } from '@epilot/sdk/validation-rules'
19
+
20
+ const validationRulesClient = getClient()
21
+ authorize(validationRulesClient, () => '<token>')
22
+ const { data } = await validationRulesClient.getValidationRules(...)
23
+ ```
24
+
25
+ ## Operations
26
+
27
+ **Validation Rules**
28
+ - [`getValidationRules`](#getvalidationrules)
29
+ - [`createValidationRule`](#createvalidationrule)
30
+ - [`getValidationRuleById`](#getvalidationrulebyid)
31
+ - [`updateValidationRule`](#updatevalidationrule)
32
+ - [`deleteValidationRule`](#deletevalidationrule)
33
+ - [`addUsedByReference`](#addusedbyreference)
34
+ - [`removeUsedByReference`](#removeusedbyreference)
35
+
36
+ **Schemas**
37
+ - [`GetValidationRulesResponse`](#getvalidationrulesresponse)
38
+ - [`CreateValidationRuleRequest`](#createvalidationrulerequest)
39
+ - [`UpdateValidationRuleRequest`](#updatevalidationrulerequest)
40
+ - [`ValidationRuleBase`](#validationrulebase)
41
+ - [`ValidationRule`](#validationrule)
42
+ - [`UsedBy`](#usedby)
43
+ - [`RegexRuleType`](#regexruletype)
44
+ - [`PatternRuleType`](#patternruletype)
45
+ - [`NumericRuleType`](#numericruletype)
46
+ - [`RegexCondition`](#regexcondition)
47
+ - [`RegexNestedCondition`](#regexnestedcondition)
48
+ - [`RegexFactCondition`](#regexfactcondition)
49
+ - [`PatternCondition`](#patterncondition)
50
+ - [`PatternNestedCondition`](#patternnestedcondition)
51
+ - [`PatternFactCondition`](#patternfactcondition)
52
+ - [`NumericCondition`](#numericcondition)
53
+ - [`NumericNestedCondition`](#numericnestedcondition)
54
+ - [`NumericFactCondition`](#numericfactcondition)
55
+
56
+ ### `getValidationRules`
57
+
58
+ Get all validation rules by organization Id
59
+
60
+ `GET /v1/validation-rules`
61
+
62
+ ```ts
63
+ const { data } = await client.getValidationRules()
64
+ ```
65
+
66
+ <details>
67
+ <summary>Response</summary>
68
+
69
+ ```json
70
+ {
71
+ "results": [
72
+ {
73
+ "title": "string",
74
+ "placeholder": "string",
75
+ "used_by": [
76
+ {
77
+ "type": "journey",
78
+ "schema_slug": "string",
79
+ "source_id": "string"
80
+ }
81
+ ],
82
+ "rule": {
83
+ "type": "regex",
84
+ "conditions": {
85
+ "all": [
86
+ {
87
+ "fact": "inputValue",
88
+ "operator": "regexMatch",
89
+ "value": "string",
90
+ "params": {
91
+ "errorMessage": "string"
92
+ }
93
+ },
94
+ {
95
+ "all": [
96
+ {
97
+ "fact": "inputValue",
98
+ "operator": "regexMatch",
99
+ "value": "string",
100
+ "params": {
101
+ "errorMessage": "string"
102
+ }
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ }
108
+ },
109
+ "_schema_version": "string",
110
+ "_id": "string",
111
+ "_organization_id": "string",
112
+ "created_at": "string",
113
+ "updated_at": "string",
114
+ "created_by": "string",
115
+ "updated_by": "string"
116
+ }
117
+ ]
118
+ }
119
+ ```
120
+
121
+ </details>
122
+
123
+ ---
124
+
125
+ ### `createValidationRule`
126
+
127
+ Create Validation Rule
128
+
129
+ `POST /v1/validation-rules`
130
+
131
+ ```ts
132
+ const { data } = await client.createValidationRule(
133
+ null,
134
+ {
135
+ title: 'string',
136
+ placeholder: 'string',
137
+ used_by: [
138
+ {
139
+ type: 'journey',
140
+ schema_slug: 'string',
141
+ source_id: 'string'
142
+ }
143
+ ],
144
+ rule: {
145
+ type: 'regex',
146
+ conditions: {
147
+ all: [
148
+ {
149
+ fact: 'inputValue',
150
+ operator: 'regexMatch',
151
+ value: 'string',
152
+ params: {
153
+ errorMessage: 'string'
154
+ }
155
+ },
156
+ {
157
+ all: [
158
+ {
159
+ fact: 'inputValue',
160
+ operator: 'regexMatch',
161
+ value: 'string',
162
+ params: {
163
+ errorMessage: 'string'
164
+ }
165
+ }
166
+ ]
167
+ }
168
+ ]
169
+ }
170
+ }
171
+ },
172
+ )
173
+ ```
174
+
175
+ <details>
176
+ <summary>Response</summary>
177
+
178
+ ```json
179
+ {
180
+ "title": "string",
181
+ "placeholder": "string",
182
+ "used_by": [
183
+ {
184
+ "type": "journey",
185
+ "schema_slug": "string",
186
+ "source_id": "string"
187
+ }
188
+ ],
189
+ "rule": {
190
+ "type": "regex",
191
+ "conditions": {
192
+ "all": [
193
+ {
194
+ "fact": "inputValue",
195
+ "operator": "regexMatch",
196
+ "value": "string",
197
+ "params": {
198
+ "errorMessage": "string"
199
+ }
200
+ },
201
+ {
202
+ "all": [
203
+ {
204
+ "fact": "inputValue",
205
+ "operator": "regexMatch",
206
+ "value": "string",
207
+ "params": {
208
+ "errorMessage": "string"
209
+ }
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
215
+ },
216
+ "_schema_version": "string",
217
+ "_id": "string",
218
+ "_organization_id": "string",
219
+ "created_at": "string",
220
+ "updated_at": "string",
221
+ "created_by": "string",
222
+ "updated_by": "string"
223
+ }
224
+ ```
225
+
226
+ </details>
227
+
228
+ ---
229
+
230
+ ### `getValidationRuleById`
231
+
232
+ Get validation rule by ID
233
+
234
+ `GET /v1/validation-rules/{ruleId}`
235
+
236
+ ```ts
237
+ const { data } = await client.getValidationRuleById({
238
+ ruleId: 'example',
239
+ })
240
+ ```
241
+
242
+ <details>
243
+ <summary>Response</summary>
244
+
245
+ ```json
246
+ {
247
+ "title": "string",
248
+ "placeholder": "string",
249
+ "used_by": [
250
+ {
251
+ "type": "journey",
252
+ "schema_slug": "string",
253
+ "source_id": "string"
254
+ }
255
+ ],
256
+ "rule": {
257
+ "type": "regex",
258
+ "conditions": {
259
+ "all": [
260
+ {
261
+ "fact": "inputValue",
262
+ "operator": "regexMatch",
263
+ "value": "string",
264
+ "params": {
265
+ "errorMessage": "string"
266
+ }
267
+ },
268
+ {
269
+ "all": [
270
+ {
271
+ "fact": "inputValue",
272
+ "operator": "regexMatch",
273
+ "value": "string",
274
+ "params": {
275
+ "errorMessage": "string"
276
+ }
277
+ }
278
+ ]
279
+ }
280
+ ]
281
+ }
282
+ },
283
+ "_schema_version": "string",
284
+ "_id": "string",
285
+ "_organization_id": "string",
286
+ "created_at": "string",
287
+ "updated_at": "string",
288
+ "created_by": "string",
289
+ "updated_by": "string"
290
+ }
291
+ ```
292
+
293
+ </details>
294
+
295
+ ---
296
+
297
+ ### `updateValidationRule`
298
+
299
+ Update Validation Rule (partial update)
300
+
301
+ `PATCH /v1/validation-rules/{ruleId}`
302
+
303
+ ```ts
304
+ const { data } = await client.updateValidationRule(
305
+ {
306
+ ruleId: 'example',
307
+ },
308
+ {
309
+ title: 'string',
310
+ placeholder: 'string',
311
+ used_by: [
312
+ {
313
+ type: 'journey',
314
+ schema_slug: 'string',
315
+ source_id: 'string'
316
+ }
317
+ ],
318
+ rule: {
319
+ type: 'regex',
320
+ conditions: {
321
+ all: [
322
+ {
323
+ fact: 'inputValue',
324
+ operator: 'regexMatch',
325
+ value: 'string',
326
+ params: {
327
+ errorMessage: 'string'
328
+ }
329
+ },
330
+ {
331
+ all: [
332
+ {
333
+ fact: 'inputValue',
334
+ operator: 'regexMatch',
335
+ value: 'string',
336
+ params: {
337
+ errorMessage: 'string'
338
+ }
339
+ }
340
+ ]
341
+ }
342
+ ]
343
+ }
344
+ }
345
+ },
346
+ )
347
+ ```
348
+
349
+ <details>
350
+ <summary>Response</summary>
351
+
352
+ ```json
353
+ {
354
+ "title": "string",
355
+ "placeholder": "string",
356
+ "used_by": [
357
+ {
358
+ "type": "journey",
359
+ "schema_slug": "string",
360
+ "source_id": "string"
361
+ }
362
+ ],
363
+ "rule": {
364
+ "type": "regex",
365
+ "conditions": {
366
+ "all": [
367
+ {
368
+ "fact": "inputValue",
369
+ "operator": "regexMatch",
370
+ "value": "string",
371
+ "params": {
372
+ "errorMessage": "string"
373
+ }
374
+ },
375
+ {
376
+ "all": [
377
+ {
378
+ "fact": "inputValue",
379
+ "operator": "regexMatch",
380
+ "value": "string",
381
+ "params": {
382
+ "errorMessage": "string"
383
+ }
384
+ }
385
+ ]
386
+ }
387
+ ]
388
+ }
389
+ },
390
+ "_schema_version": "string",
391
+ "_id": "string",
392
+ "_organization_id": "string",
393
+ "created_at": "string",
394
+ "updated_at": "string",
395
+ "created_by": "string",
396
+ "updated_by": "string"
397
+ }
398
+ ```
399
+
400
+ </details>
401
+
402
+ ---
403
+
404
+ ### `deleteValidationRule`
405
+
406
+ Delete Validation Rule
407
+
408
+ `DELETE /v1/validation-rules/{ruleId}`
409
+
410
+ ```ts
411
+ const { data } = await client.deleteValidationRule({
412
+ ruleId: 'example',
413
+ })
414
+ ```
415
+
416
+ ---
417
+
418
+ ### `addUsedByReference`
419
+
420
+ Add a reference to the usedBy array
421
+
422
+ `POST /v1/validation-rules/{ruleId}/used-by`
423
+
424
+ ```ts
425
+ const { data } = await client.addUsedByReference(
426
+ {
427
+ ruleId: 'example',
428
+ },
429
+ {
430
+ type: 'journey',
431
+ schema_slug: 'string',
432
+ source_id: 'string'
433
+ },
434
+ )
435
+ ```
436
+
437
+ <details>
438
+ <summary>Response</summary>
439
+
440
+ ```json
441
+ {
442
+ "title": "string",
443
+ "placeholder": "string",
444
+ "used_by": [
445
+ {
446
+ "type": "journey",
447
+ "schema_slug": "string",
448
+ "source_id": "string"
449
+ }
450
+ ],
451
+ "rule": {
452
+ "type": "regex",
453
+ "conditions": {
454
+ "all": [
455
+ {
456
+ "fact": "inputValue",
457
+ "operator": "regexMatch",
458
+ "value": "string",
459
+ "params": {
460
+ "errorMessage": "string"
461
+ }
462
+ },
463
+ {
464
+ "all": [
465
+ {
466
+ "fact": "inputValue",
467
+ "operator": "regexMatch",
468
+ "value": "string",
469
+ "params": {
470
+ "errorMessage": "string"
471
+ }
472
+ }
473
+ ]
474
+ }
475
+ ]
476
+ }
477
+ },
478
+ "_schema_version": "string",
479
+ "_id": "string",
480
+ "_organization_id": "string",
481
+ "created_at": "string",
482
+ "updated_at": "string",
483
+ "created_by": "string",
484
+ "updated_by": "string"
485
+ }
486
+ ```
487
+
488
+ </details>
489
+
490
+ ---
491
+
492
+ ### `removeUsedByReference`
493
+
494
+ Remove a reference from the usedBy array
495
+
496
+ `DELETE /v1/validation-rules/{ruleId}/used-by`
497
+
498
+ ```ts
499
+ const { data } = await client.removeUsedByReference(
500
+ {
501
+ ruleId: 'example',
502
+ },
503
+ {
504
+ type: 'journey',
505
+ schema_slug: 'string',
506
+ source_id: 'string'
507
+ },
508
+ )
509
+ ```
510
+
511
+ <details>
512
+ <summary>Response</summary>
513
+
514
+ ```json
515
+ {
516
+ "title": "string",
517
+ "placeholder": "string",
518
+ "used_by": [
519
+ {
520
+ "type": "journey",
521
+ "schema_slug": "string",
522
+ "source_id": "string"
523
+ }
524
+ ],
525
+ "rule": {
526
+ "type": "regex",
527
+ "conditions": {
528
+ "all": [
529
+ {
530
+ "fact": "inputValue",
531
+ "operator": "regexMatch",
532
+ "value": "string",
533
+ "params": {
534
+ "errorMessage": "string"
535
+ }
536
+ },
537
+ {
538
+ "all": [
539
+ {
540
+ "fact": "inputValue",
541
+ "operator": "regexMatch",
542
+ "value": "string",
543
+ "params": {
544
+ "errorMessage": "string"
545
+ }
546
+ }
547
+ ]
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ "_schema_version": "string",
553
+ "_id": "string",
554
+ "_organization_id": "string",
555
+ "created_at": "string",
556
+ "updated_at": "string",
557
+ "created_by": "string",
558
+ "updated_by": "string"
559
+ }
560
+ ```
561
+
562
+ </details>
563
+
564
+ ---
565
+
566
+ ## Schemas
567
+
568
+ ### `GetValidationRulesResponse`
569
+
570
+ ```ts
571
+ type GetValidationRulesResponse = {
572
+ results?: Array<{
573
+ _schema_version: string
574
+ _id: string
575
+ _organization_id: string
576
+ created_at: string
577
+ updated_at: string
578
+ created_by: string
579
+ updated_by: string
580
+ }>
581
+ }
582
+ ```
583
+
584
+ ### `CreateValidationRuleRequest`
585
+
586
+ ```ts
587
+ type CreateValidationRuleRequest = object
588
+ ```
589
+
590
+ ### `UpdateValidationRuleRequest`
591
+
592
+ ```ts
593
+ type UpdateValidationRuleRequest = {
594
+ title?: string
595
+ placeholder?: string
596
+ used_by?: Array<{
597
+ type: "journey" | "entity"
598
+ schema_slug?: string
599
+ source_id?: string
600
+ }>
601
+ rule?: {
602
+ type: "regex"
603
+ conditions: {
604
+ all: { ... }
605
+ } | {
606
+ any: { ... }
607
+ } | {
608
+ not: { ... }
609
+ }
610
+ } | {
611
+ type: "pattern"
612
+ conditions: {
613
+ all: { ... }
614
+ } | {
615
+ any: { ... }
616
+ } | {
617
+ not: { ... }
618
+ }
619
+ } | {
620
+ type: "numeric"
621
+ conditions: {
622
+ all: { ... }
623
+ } | {
624
+ any: { ... }
625
+ } | {
626
+ not: { ... }
627
+ }
628
+ }
629
+ }
630
+ ```
631
+
632
+ ### `ValidationRuleBase`
633
+
634
+ ```ts
635
+ type ValidationRuleBase = {
636
+ title?: string
637
+ placeholder?: string
638
+ used_by?: Array<{
639
+ type: "journey" | "entity"
640
+ schema_slug?: string
641
+ source_id?: string
642
+ }>
643
+ rule?: {
644
+ type: "regex"
645
+ conditions: {
646
+ all: { ... }
647
+ } | {
648
+ any: { ... }
649
+ } | {
650
+ not: { ... }
651
+ }
652
+ } | {
653
+ type: "pattern"
654
+ conditions: {
655
+ all: { ... }
656
+ } | {
657
+ any: { ... }
658
+ } | {
659
+ not: { ... }
660
+ }
661
+ } | {
662
+ type: "numeric"
663
+ conditions: {
664
+ all: { ... }
665
+ } | {
666
+ any: { ... }
667
+ } | {
668
+ not: { ... }
669
+ }
670
+ }
671
+ }
672
+ ```
673
+
674
+ ### `ValidationRule`
675
+
676
+ The Validation rule definition.
677
+
678
+ ```ts
679
+ type ValidationRule = {
680
+ _schema_version: string
681
+ _id: string
682
+ _organization_id: string
683
+ created_at: string
684
+ updated_at: string
685
+ created_by: string
686
+ updated_by: string
687
+ }
688
+ ```
689
+
690
+ ### `UsedBy`
691
+
692
+ Describes where and how a validation rule is applied.
693
+
694
+ ```ts
695
+ type UsedBy = {
696
+ type: "journey" | "entity"
697
+ schema_slug?: string
698
+ source_id?: string
699
+ }
700
+ ```
701
+
702
+ ### `RegexRuleType`
703
+
704
+ Validation rule that uses a regular expression to validate input.
705
+
706
+ ```ts
707
+ type RegexRuleType = {
708
+ type: "regex"
709
+ conditions: {
710
+ all: Array<{
711
+ fact: { ... }
712
+ operator: { ... }
713
+ value: { ... }
714
+ params?: { ... }
715
+ } | {
716
+ all: { ... }
717
+ } | {
718
+ any: { ... }
719
+ } | {
720
+ not: { ... }
721
+ }>
722
+ } | {
723
+ any: Array<{
724
+ fact: { ... }
725
+ operator: { ... }
726
+ value: { ... }
727
+ params?: { ... }
728
+ } | {
729
+ all: { ... }
730
+ } | {
731
+ any: { ... }
732
+ } | {
733
+ not: { ... }
734
+ }>
735
+ } | {
736
+ not: {
737
+ fact: { ... }
738
+ operator: { ... }
739
+ value: { ... }
740
+ params?: { ... }
741
+ } | {
742
+ all: { ... }
743
+ } | {
744
+ any: { ... }
745
+ } | {
746
+ not: { ... }
747
+ }
748
+ }
749
+ }
750
+ ```
751
+
752
+ ### `PatternRuleType`
753
+
754
+ Validation rule that uses a sequence of patterns to validate input.
755
+
756
+ ```ts
757
+ type PatternRuleType = {
758
+ type: "pattern"
759
+ conditions: {
760
+ all: Array<{
761
+ fact: { ... }
762
+ operator: { ... }
763
+ value: { ... }
764
+ params?: { ... }
765
+ } | {
766
+ fact: { ... }
767
+ operator: { ... }
768
+ value: { ... }
769
+ params?: { ... }
770
+ } | {
771
+ fact: { ... }
772
+ operator: { ... }
773
+ value: { ... }
774
+ params?: { ... }
775
+ } | {
776
+ fact: { ... }
777
+ operator: { ... }
778
+ value: { ... }
779
+ params?: { ... }
780
+ } | {
781
+ all: { ... }
782
+ } | {
783
+ any: { ... }
784
+ } | {
785
+ not: { ... }
786
+ }>
787
+ } | {
788
+ any: Array<{
789
+ fact: { ... }
790
+ operator: { ... }
791
+ value: { ... }
792
+ params?: { ... }
793
+ } | {
794
+ fact: { ... }
795
+ operator: { ... }
796
+ value: { ... }
797
+ params?: { ... }
798
+ } | {
799
+ fact: { ... }
800
+ operator: { ... }
801
+ value: { ... }
802
+ params?: { ... }
803
+ } | {
804
+ fact: { ... }
805
+ operator: { ... }
806
+ value: { ... }
807
+ params?: { ... }
808
+ } | {
809
+ all: { ... }
810
+ } | {
811
+ any: { ... }
812
+ } | {
813
+ not: { ... }
814
+ }>
815
+ } | {
816
+ not: {
817
+ fact: { ... }
818
+ operator: { ... }
819
+ value: { ... }
820
+ params?: { ... }
821
+ } | {
822
+ fact: { ... }
823
+ operator: { ... }
824
+ value: { ... }
825
+ params?: { ... }
826
+ } | {
827
+ fact: { ... }
828
+ operator: { ... }
829
+ value: { ... }
830
+ params?: { ... }
831
+ } | {
832
+ fact: { ... }
833
+ operator: { ... }
834
+ value: { ... }
835
+ params?: { ... }
836
+ } | {
837
+ all: { ... }
838
+ } | {
839
+ any: { ... }
840
+ } | {
841
+ not: { ... }
842
+ }
843
+ }
844
+ }
845
+ ```
846
+
847
+ ### `NumericRuleType`
848
+
849
+ Validation rule for numeric values, supporting range and digit count constraints.
850
+
851
+ ```ts
852
+ type NumericRuleType = {
853
+ type: "numeric"
854
+ conditions: {
855
+ all: Array<{
856
+ fact: { ... }
857
+ operator: { ... }
858
+ value: { ... }
859
+ params?: { ... }
860
+ } | {
861
+ fact: { ... }
862
+ operator: { ... }
863
+ value: { ... }
864
+ params?: { ... }
865
+ } | {
866
+ fact: { ... }
867
+ operator: { ... }
868
+ value: { ... }
869
+ params?: { ... }
870
+ } | {
871
+ fact: { ... }
872
+ operator: { ... }
873
+ value: { ... }
874
+ params?: { ... }
875
+ } | {
876
+ all: { ... }
877
+ } | {
878
+ any: { ... }
879
+ } | {
880
+ not: { ... }
881
+ }>
882
+ } | {
883
+ any: Array<{
884
+ fact: { ... }
885
+ operator: { ... }
886
+ value: { ... }
887
+ params?: { ... }
888
+ } | {
889
+ fact: { ... }
890
+ operator: { ... }
891
+ value: { ... }
892
+ params?: { ... }
893
+ } | {
894
+ fact: { ... }
895
+ operator: { ... }
896
+ value: { ... }
897
+ params?: { ... }
898
+ } | {
899
+ fact: { ... }
900
+ operator: { ... }
901
+ value: { ... }
902
+ params?: { ... }
903
+ } | {
904
+ all: { ... }
905
+ } | {
906
+ any: { ... }
907
+ } | {
908
+ not: { ... }
909
+ }>
910
+ } | {
911
+ not: {
912
+ fact: { ... }
913
+ operator: { ... }
914
+ value: { ... }
915
+ params?: { ... }
916
+ } | {
917
+ fact: { ... }
918
+ operator: { ... }
919
+ value: { ... }
920
+ params?: { ... }
921
+ } | {
922
+ fact: { ... }
923
+ operator: { ... }
924
+ value: { ... }
925
+ params?: { ... }
926
+ } | {
927
+ fact: { ... }
928
+ operator: { ... }
929
+ value: { ... }
930
+ params?: { ... }
931
+ } | {
932
+ all: { ... }
933
+ } | {
934
+ any: { ... }
935
+ } | {
936
+ not: { ... }
937
+ }
938
+ }
939
+ }
940
+ ```
941
+
942
+ ### `RegexCondition`
943
+
944
+ Condition definition for a regex-based validation rule (2 levels deep)
945
+
946
+ ```ts
947
+ type RegexCondition = {
948
+ all: Array<{
949
+ fact: "inputValue"
950
+ operator: "regexMatch"
951
+ value: string
952
+ params?: {
953
+ errorMessage?: { ... }
954
+ }
955
+ } | {
956
+ all: Array<{
957
+ fact: { ... }
958
+ operator: { ... }
959
+ value: { ... }
960
+ params?: { ... }
961
+ }>
962
+ } | {
963
+ any: Array<{
964
+ fact: { ... }
965
+ operator: { ... }
966
+ value: { ... }
967
+ params?: { ... }
968
+ }>
969
+ } | {
970
+ not: {
971
+ fact: { ... }
972
+ operator: { ... }
973
+ value: { ... }
974
+ params?: { ... }
975
+ }
976
+ }>
977
+ } | {
978
+ any: Array<{
979
+ fact: "inputValue"
980
+ operator: "regexMatch"
981
+ value: string
982
+ params?: {
983
+ errorMessage?: { ... }
984
+ }
985
+ } | {
986
+ all: Array<{
987
+ fact: { ... }
988
+ operator: { ... }
989
+ value: { ... }
990
+ params?: { ... }
991
+ }>
992
+ } | {
993
+ any: Array<{
994
+ fact: { ... }
995
+ operator: { ... }
996
+ value: { ... }
997
+ params?: { ... }
998
+ }>
999
+ } | {
1000
+ not: {
1001
+ fact: { ... }
1002
+ operator: { ... }
1003
+ value: { ... }
1004
+ params?: { ... }
1005
+ }
1006
+ }>
1007
+ } | {
1008
+ not: {
1009
+ fact: "inputValue"
1010
+ operator: "regexMatch"
1011
+ value: string
1012
+ params?: {
1013
+ errorMessage?: { ... }
1014
+ }
1015
+ } | {
1016
+ all: Array<{
1017
+ fact: { ... }
1018
+ operator: { ... }
1019
+ value: { ... }
1020
+ params?: { ... }
1021
+ }>
1022
+ } | {
1023
+ any: Array<{
1024
+ fact: { ... }
1025
+ operator: { ... }
1026
+ value: { ... }
1027
+ params?: { ... }
1028
+ }>
1029
+ } | {
1030
+ not: {
1031
+ fact: { ... }
1032
+ operator: { ... }
1033
+ value: { ... }
1034
+ params?: { ... }
1035
+ }
1036
+ }
1037
+ }
1038
+ ```
1039
+
1040
+ ### `RegexNestedCondition`
1041
+
1042
+ Nested condition with logical operators (level 2 only)
1043
+
1044
+ ```ts
1045
+ type RegexNestedCondition = {
1046
+ all: Array<{
1047
+ fact: "inputValue"
1048
+ operator: "regexMatch"
1049
+ value: string
1050
+ params?: {
1051
+ errorMessage?: { ... }
1052
+ }
1053
+ }>
1054
+ } | {
1055
+ any: Array<{
1056
+ fact: "inputValue"
1057
+ operator: "regexMatch"
1058
+ value: string
1059
+ params?: {
1060
+ errorMessage?: { ... }
1061
+ }
1062
+ }>
1063
+ } | {
1064
+ not: {
1065
+ fact: "inputValue"
1066
+ operator: "regexMatch"
1067
+ value: string
1068
+ params?: {
1069
+ errorMessage?: { ... }
1070
+ }
1071
+ }
1072
+ }
1073
+ ```
1074
+
1075
+ ### `RegexFactCondition`
1076
+
1077
+ Fact-based condition for regex validation
1078
+
1079
+ ```ts
1080
+ type RegexFactCondition = {
1081
+ fact: "inputValue"
1082
+ operator: "regexMatch"
1083
+ value: string
1084
+ params?: {
1085
+ errorMessage?: string
1086
+ }
1087
+ }
1088
+ ```
1089
+
1090
+ ### `PatternCondition`
1091
+
1092
+ Condition definition for a pattern-based validation rule (2 levels deep)
1093
+
1094
+ ```ts
1095
+ type PatternCondition = {
1096
+ all: Array<{
1097
+ fact: "total-length"
1098
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1099
+ value: number
1100
+ params?: {
1101
+ errorMessage?: { ... }
1102
+ start?: { ... }
1103
+ end?: { ... }
1104
+ }
1105
+ } | {
1106
+ fact: "static-check" | "total-length"
1107
+ operator: "exactlyNDigits"
1108
+ value: number
1109
+ params?: {
1110
+ errorMessage?: { ... }
1111
+ start?: { ... }
1112
+ end?: { ... }
1113
+ }
1114
+ } | {
1115
+ fact: "static-check"
1116
+ operator: "in" | "notIn" | "contains" | "doesNotContain"
1117
+ value: string[]
1118
+ params?: {
1119
+ errorMessage?: { ... }
1120
+ start?: { ... }
1121
+ end?: { ... }
1122
+ }
1123
+ } | {
1124
+ fact: "static-check"
1125
+ operator: "equal" | "notEqual"
1126
+ value: string
1127
+ params?: {
1128
+ errorMessage?: { ... }
1129
+ start?: { ... }
1130
+ end?: { ... }
1131
+ }
1132
+ } | {
1133
+ all: Array<{
1134
+ fact: { ... }
1135
+ operator: { ... }
1136
+ value: { ... }
1137
+ params?: { ... }
1138
+ } | {
1139
+ fact: { ... }
1140
+ operator: { ... }
1141
+ value: { ... }
1142
+ params?: { ... }
1143
+ } | {
1144
+ fact: { ... }
1145
+ operator: { ... }
1146
+ value: { ... }
1147
+ params?: { ... }
1148
+ } | {
1149
+ fact: { ... }
1150
+ operator: { ... }
1151
+ value: { ... }
1152
+ params?: { ... }
1153
+ }>
1154
+ } | {
1155
+ any: Array<{
1156
+ fact: { ... }
1157
+ operator: { ... }
1158
+ value: { ... }
1159
+ params?: { ... }
1160
+ } | {
1161
+ fact: { ... }
1162
+ operator: { ... }
1163
+ value: { ... }
1164
+ params?: { ... }
1165
+ } | {
1166
+ fact: { ... }
1167
+ operator: { ... }
1168
+ value: { ... }
1169
+ params?: { ... }
1170
+ } | {
1171
+ fact: { ... }
1172
+ operator: { ... }
1173
+ value: { ... }
1174
+ params?: { ... }
1175
+ }>
1176
+ } | {
1177
+ not: {
1178
+ fact: { ... }
1179
+ operator: { ... }
1180
+ value: { ... }
1181
+ params?: { ... }
1182
+ } | {
1183
+ fact: { ... }
1184
+ operator: { ... }
1185
+ value: { ... }
1186
+ params?: { ... }
1187
+ } | {
1188
+ fact: { ... }
1189
+ operator: { ... }
1190
+ value: { ... }
1191
+ params?: { ... }
1192
+ } | {
1193
+ fact: { ... }
1194
+ operator: { ... }
1195
+ // ...
1196
+ }
1197
+ ```
1198
+
1199
+ ### `PatternNestedCondition`
1200
+
1201
+ Nested condition with logical operators (level 2 only)
1202
+
1203
+ ```ts
1204
+ type PatternNestedCondition = {
1205
+ all: Array<{
1206
+ fact: "total-length"
1207
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1208
+ value: number
1209
+ params?: {
1210
+ errorMessage?: { ... }
1211
+ start?: { ... }
1212
+ end?: { ... }
1213
+ }
1214
+ } | {
1215
+ fact: "static-check" | "total-length"
1216
+ operator: "exactlyNDigits"
1217
+ value: number
1218
+ params?: {
1219
+ errorMessage?: { ... }
1220
+ start?: { ... }
1221
+ end?: { ... }
1222
+ }
1223
+ } | {
1224
+ fact: "static-check"
1225
+ operator: "in" | "notIn" | "contains" | "doesNotContain"
1226
+ value: string[]
1227
+ params?: {
1228
+ errorMessage?: { ... }
1229
+ start?: { ... }
1230
+ end?: { ... }
1231
+ }
1232
+ } | {
1233
+ fact: "static-check"
1234
+ operator: "equal" | "notEqual"
1235
+ value: string
1236
+ params?: {
1237
+ errorMessage?: { ... }
1238
+ start?: { ... }
1239
+ end?: { ... }
1240
+ }
1241
+ }>
1242
+ } | {
1243
+ any: Array<{
1244
+ fact: "total-length"
1245
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1246
+ value: number
1247
+ params?: {
1248
+ errorMessage?: { ... }
1249
+ start?: { ... }
1250
+ end?: { ... }
1251
+ }
1252
+ } | {
1253
+ fact: "static-check" | "total-length"
1254
+ operator: "exactlyNDigits"
1255
+ value: number
1256
+ params?: {
1257
+ errorMessage?: { ... }
1258
+ start?: { ... }
1259
+ end?: { ... }
1260
+ }
1261
+ } | {
1262
+ fact: "static-check"
1263
+ operator: "in" | "notIn" | "contains" | "doesNotContain"
1264
+ value: string[]
1265
+ params?: {
1266
+ errorMessage?: { ... }
1267
+ start?: { ... }
1268
+ end?: { ... }
1269
+ }
1270
+ } | {
1271
+ fact: "static-check"
1272
+ operator: "equal" | "notEqual"
1273
+ value: string
1274
+ params?: {
1275
+ errorMessage?: { ... }
1276
+ start?: { ... }
1277
+ end?: { ... }
1278
+ }
1279
+ }>
1280
+ } | {
1281
+ not: {
1282
+ fact: "total-length"
1283
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1284
+ value: number
1285
+ params?: {
1286
+ errorMessage?: { ... }
1287
+ start?: { ... }
1288
+ end?: { ... }
1289
+ }
1290
+ } | {
1291
+ fact: "static-check" | "total-length"
1292
+ operator: "exactlyNDigits"
1293
+ value: number
1294
+ params?: {
1295
+ errorMessage?: { ... }
1296
+ start?: { ... }
1297
+ end?: { ... }
1298
+ }
1299
+ } | {
1300
+ fact: "static-check"
1301
+ operator: "in" | "notIn" | "contains" | "doesNotContain"
1302
+ value: string[]
1303
+ params?: {
1304
+ // ...
1305
+ }
1306
+ ```
1307
+
1308
+ ### `PatternFactCondition`
1309
+
1310
+ Fact-based condition for pattern validation
1311
+
1312
+ ```ts
1313
+ type PatternFactCondition = {
1314
+ fact: "total-length"
1315
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1316
+ value: number
1317
+ params?: {
1318
+ errorMessage?: string
1319
+ start?: number
1320
+ end?: number
1321
+ }
1322
+ } | {
1323
+ fact: "static-check" | "total-length"
1324
+ operator: "exactlyNDigits"
1325
+ value: number
1326
+ params?: {
1327
+ errorMessage?: string
1328
+ start?: number
1329
+ end?: number
1330
+ }
1331
+ } | {
1332
+ fact: "static-check"
1333
+ operator: "in" | "notIn" | "contains" | "doesNotContain"
1334
+ value: string[]
1335
+ params?: {
1336
+ errorMessage?: string
1337
+ start?: number
1338
+ end?: number
1339
+ }
1340
+ } | {
1341
+ fact: "static-check"
1342
+ operator: "equal" | "notEqual"
1343
+ value: string
1344
+ params?: {
1345
+ errorMessage?: string
1346
+ start?: number
1347
+ end?: number
1348
+ }
1349
+ }
1350
+ ```
1351
+
1352
+ ### `NumericCondition`
1353
+
1354
+ Condition definition for a numeric-based validation rule (2 levels deep)
1355
+
1356
+ ```ts
1357
+ type NumericCondition = {
1358
+ all: Array<{
1359
+ fact: "numeric-value" | "total-length"
1360
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1361
+ value: number
1362
+ params?: {
1363
+ errorMessage?: { ... }
1364
+ }
1365
+ } | {
1366
+ fact: "integer-digits-count"
1367
+ operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"
1368
+ value: number
1369
+ params?: {
1370
+ errorMessage?: { ... }
1371
+ allowLeadingZeroes?: { ... }
1372
+ }
1373
+ } | {
1374
+ fact: "decimal-digits-count"
1375
+ operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"
1376
+ value: number
1377
+ params?: {
1378
+ errorMessage?: { ... }
1379
+ }
1380
+ } | {
1381
+ fact: "has-leading-zeroes"
1382
+ operator: "equal" | "notAllowed"
1383
+ value: boolean
1384
+ params?: {
1385
+ errorMessage?: { ... }
1386
+ }
1387
+ } | {
1388
+ all: Array<{
1389
+ fact: { ... }
1390
+ operator: { ... }
1391
+ value: { ... }
1392
+ params?: { ... }
1393
+ } | {
1394
+ fact: { ... }
1395
+ operator: { ... }
1396
+ value: { ... }
1397
+ params?: { ... }
1398
+ } | {
1399
+ fact: { ... }
1400
+ operator: { ... }
1401
+ value: { ... }
1402
+ params?: { ... }
1403
+ } | {
1404
+ fact: { ... }
1405
+ operator: { ... }
1406
+ value: { ... }
1407
+ params?: { ... }
1408
+ }>
1409
+ } | {
1410
+ any: Array<{
1411
+ fact: { ... }
1412
+ operator: { ... }
1413
+ value: { ... }
1414
+ params?: { ... }
1415
+ } | {
1416
+ fact: { ... }
1417
+ operator: { ... }
1418
+ value: { ... }
1419
+ params?: { ... }
1420
+ } | {
1421
+ fact: { ... }
1422
+ operator: { ... }
1423
+ value: { ... }
1424
+ params?: { ... }
1425
+ } | {
1426
+ fact: { ... }
1427
+ operator: { ... }
1428
+ value: { ... }
1429
+ params?: { ... }
1430
+ }>
1431
+ } | {
1432
+ not: {
1433
+ fact: { ... }
1434
+ operator: { ... }
1435
+ value: { ... }
1436
+ params?: { ... }
1437
+ } | {
1438
+ fact: { ... }
1439
+ operator: { ... }
1440
+ value: { ... }
1441
+ params?: { ... }
1442
+ } | {
1443
+ fact: { ... }
1444
+ operator: { ... }
1445
+ value: { ... }
1446
+ params?: { ... }
1447
+ } | {
1448
+ fact: { ... }
1449
+ operator: { ... }
1450
+ value: { ... }
1451
+ params?: { ... }
1452
+ }
1453
+ }>
1454
+ } | {
1455
+ any: Array<{
1456
+ fact: "numeric-value" | "total-length"
1457
+ // ...
1458
+ }
1459
+ ```
1460
+
1461
+ ### `NumericNestedCondition`
1462
+
1463
+ Nested condition with logical operators (level 2 only)
1464
+
1465
+ ```ts
1466
+ type NumericNestedCondition = {
1467
+ all: Array<{
1468
+ fact: "numeric-value" | "total-length"
1469
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1470
+ value: number
1471
+ params?: {
1472
+ errorMessage?: { ... }
1473
+ }
1474
+ } | {
1475
+ fact: "integer-digits-count"
1476
+ operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"
1477
+ value: number
1478
+ params?: {
1479
+ errorMessage?: { ... }
1480
+ allowLeadingZeroes?: { ... }
1481
+ }
1482
+ } | {
1483
+ fact: "decimal-digits-count"
1484
+ operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"
1485
+ value: number
1486
+ params?: {
1487
+ errorMessage?: { ... }
1488
+ }
1489
+ } | {
1490
+ fact: "has-leading-zeroes"
1491
+ operator: "equal" | "notAllowed"
1492
+ value: boolean
1493
+ params?: {
1494
+ errorMessage?: { ... }
1495
+ }
1496
+ }>
1497
+ } | {
1498
+ any: Array<{
1499
+ fact: "numeric-value" | "total-length"
1500
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1501
+ value: number
1502
+ params?: {
1503
+ errorMessage?: { ... }
1504
+ }
1505
+ } | {
1506
+ fact: "integer-digits-count"
1507
+ operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"
1508
+ value: number
1509
+ params?: {
1510
+ errorMessage?: { ... }
1511
+ allowLeadingZeroes?: { ... }
1512
+ }
1513
+ } | {
1514
+ fact: "decimal-digits-count"
1515
+ operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"
1516
+ value: number
1517
+ params?: {
1518
+ errorMessage?: { ... }
1519
+ }
1520
+ } | {
1521
+ fact: "has-leading-zeroes"
1522
+ operator: "equal" | "notAllowed"
1523
+ value: boolean
1524
+ params?: {
1525
+ errorMessage?: { ... }
1526
+ }
1527
+ }>
1528
+ } | {
1529
+ not: {
1530
+ fact: "numeric-value" | "total-length"
1531
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1532
+ value: number
1533
+ params?: {
1534
+ errorMessage?: { ... }
1535
+ }
1536
+ } | {
1537
+ fact: "integer-digits-count"
1538
+ operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"
1539
+ value: number
1540
+ params?: {
1541
+ errorMessage?: { ... }
1542
+ allowLeadingZeroes?: { ... }
1543
+ }
1544
+ } | {
1545
+ fact: "decimal-digits-count"
1546
+ operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"
1547
+ value: number
1548
+ params?: {
1549
+ errorMessage?: { ... }
1550
+ }
1551
+ } | {
1552
+ fact: "has-leading-zeroes"
1553
+ operator: "equal" | "notAllowed"
1554
+ value: boolean
1555
+ params?: {
1556
+ errorMessage?: { ... }
1557
+ }
1558
+ }
1559
+ }
1560
+ ```
1561
+
1562
+ ### `NumericFactCondition`
1563
+
1564
+ Fact-based condition for numeric validation
1565
+
1566
+ ```ts
1567
+ type NumericFactCondition = {
1568
+ fact: "numeric-value" | "total-length"
1569
+ operator: "equal" | "notEqual" | "lessThan" | "lessThanInclusive" | "greaterThan" | "greaterThanInclusive"
1570
+ value: number
1571
+ params?: {
1572
+ errorMessage?: string
1573
+ }
1574
+ } | {
1575
+ fact: "integer-digits-count"
1576
+ operator: "equal" | "exactlyNDigits" | "minIntegerDigits" | "maxIntegerDigits"
1577
+ value: number
1578
+ params?: {
1579
+ errorMessage?: string
1580
+ allowLeadingZeroes?: boolean
1581
+ }
1582
+ } | {
1583
+ fact: "decimal-digits-count"
1584
+ operator: "equal" | "minDecimalDigits" | "maxDecimalDigits"
1585
+ value: number
1586
+ params?: {
1587
+ errorMessage?: string
1588
+ }
1589
+ } | {
1590
+ fact: "has-leading-zeroes"
1591
+ operator: "equal" | "notAllowed"
1592
+ value: boolean
1593
+ params?: {
1594
+ errorMessage?: string
1595
+ }
1596
+ }
1597
+ ```