@schema-engine/forms 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/index.js +50 -0
- package/dist/actions/index.js.map +7 -0
- package/dist/actions/plugins/auto-save.plugin.d.ts +39 -0
- package/dist/actions/plugins/auto-save.plugin.js +10 -0
- package/dist/actions/plugins/auto-save.plugin.js.map +7 -0
- package/dist/actions/plugins/form-reset.plugin.d.ts +23 -0
- package/dist/actions/plugins/form-reset.plugin.js +9 -0
- package/dist/actions/plugins/form-reset.plugin.js.map +7 -0
- package/dist/actions/plugins/form-submit.plugin.d.ts +31 -0
- package/dist/actions/plugins/form-submit.plugin.js +9 -0
- package/dist/actions/plugins/form-submit.plugin.js.map +7 -0
- package/dist/actions/plugins/form-submit.registration.d.ts +22 -0
- package/dist/actions/plugins/form-submit.registration.js +8 -0
- package/dist/actions/plugins/form-submit.registration.js.map +7 -0
- package/dist/actions/plugins/gtm.plugin.d.ts +30 -0
- package/dist/actions/plugins/gtm.plugin.js +8 -0
- package/dist/actions/plugins/gtm.plugin.js.map +7 -0
- package/dist/actions/plugins/index.d.ts +16 -0
- package/dist/actions/plugins/index.js +45 -0
- package/dist/actions/plugins/index.js.map +7 -0
- package/dist/actions/plugins/notification.plugin.d.ts +32 -0
- package/dist/actions/plugins/notification.plugin.js +9 -0
- package/dist/actions/plugins/notification.plugin.js.map +7 -0
- package/dist/actions/plugins/notification.registration.d.ts +22 -0
- package/dist/actions/plugins/notification.registration.js +8 -0
- package/dist/actions/plugins/notification.registration.js.map +7 -0
- package/dist/actions/plugins/registrations.d.ts +17 -0
- package/dist/actions/plugins/registrations.js +14 -0
- package/dist/actions/plugins/registrations.js.map +7 -0
- package/dist/actions/triggers.d.ts +42 -0
- package/dist/actions/triggers.js +6 -0
- package/dist/actions/triggers.js.map +7 -0
- package/dist/actions/types.d.ts +16 -0
- package/dist/actions/types.js +1 -0
- package/dist/actions/types.js.map +7 -0
- package/dist/agent-tool/index.d.ts +54 -0
- package/dist/agent-tool/index.js +128 -0
- package/dist/agent-tool/index.js.map +7 -0
- package/dist/browser/action-registrations.d.ts +46 -0
- package/dist/browser/action-registrations.js +19 -0
- package/dist/browser/action-registrations.js.map +7 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/index.js +36 -0
- package/dist/browser/index.js.map +7 -0
- package/dist/browser/tools/auto-save-storage.d.ts +20 -0
- package/dist/browser/tools/auto-save-storage.js +12 -0
- package/dist/browser/tools/auto-save-storage.js.map +7 -0
- package/dist/browser/tools/gdpr-consent.d.ts +32 -0
- package/dist/browser/tools/gdpr-consent.js +11 -0
- package/dist/browser/tools/gdpr-consent.js.map +7 -0
- package/dist/browser/tools/gtm-tracker.d.ts +7 -0
- package/dist/browser/tools/gtm-tracker.js +7 -0
- package/dist/browser/tools/gtm-tracker.js.map +7 -0
- package/dist/builder/form-authoring.d.ts +159 -0
- package/dist/builder/form-authoring.js +1 -0
- package/dist/builder/form-authoring.js.map +7 -0
- package/dist/builder/form-values.d.ts +158 -0
- package/dist/builder/form-values.js +0 -0
- package/dist/builder/form-values.js.map +7 -0
- package/dist/builder/index.d.ts +5 -0
- package/dist/builder/index.js +2 -0
- package/dist/builder/index.js.map +7 -0
- package/dist/builder/types.utils.d.ts +137 -0
- package/dist/builder/types.utils.js +1 -0
- package/dist/builder/types.utils.js.map +7 -0
- package/dist/chunk-237BHPDH.js +88 -0
- package/dist/chunk-237BHPDH.js.map +7 -0
- package/dist/chunk-25PLQDKN.js +45 -0
- package/dist/chunk-25PLQDKN.js.map +7 -0
- package/dist/chunk-2XWISGGM.js +8 -0
- package/dist/chunk-2XWISGGM.js.map +7 -0
- package/dist/chunk-2YKQAVI2.js +8 -0
- package/dist/chunk-2YKQAVI2.js.map +7 -0
- package/dist/chunk-3B7CJOF6.js +18 -0
- package/dist/chunk-3B7CJOF6.js.map +7 -0
- package/dist/chunk-3YLRJVVN.js +17 -0
- package/dist/chunk-3YLRJVVN.js.map +7 -0
- package/dist/chunk-4CUGHU36.js +58 -0
- package/dist/chunk-4CUGHU36.js.map +7 -0
- package/dist/chunk-4FELFUCD.js +0 -0
- package/dist/chunk-4FELFUCD.js.map +7 -0
- package/dist/chunk-4XPLSYTK.js +82 -0
- package/dist/chunk-4XPLSYTK.js.map +7 -0
- package/dist/chunk-5Y6U3MR3.js +54 -0
- package/dist/chunk-5Y6U3MR3.js.map +7 -0
- package/dist/chunk-6BAJHAGL.js +29 -0
- package/dist/chunk-6BAJHAGL.js.map +7 -0
- package/dist/chunk-6EYX257T.js +23 -0
- package/dist/chunk-6EYX257T.js.map +7 -0
- package/dist/chunk-6FUGK5HQ.js +26 -0
- package/dist/chunk-6FUGK5HQ.js.map +7 -0
- package/dist/chunk-6IZYNHZ3.js +118 -0
- package/dist/chunk-6IZYNHZ3.js.map +7 -0
- package/dist/chunk-6NV2JDGI.js +8 -0
- package/dist/chunk-6NV2JDGI.js.map +7 -0
- package/dist/chunk-6R2MBQPL.js +19 -0
- package/dist/chunk-6R2MBQPL.js.map +7 -0
- package/dist/chunk-7EQJUI5N.js +40 -0
- package/dist/chunk-7EQJUI5N.js.map +7 -0
- package/dist/chunk-A5VLMQAK.js +2780 -0
- package/dist/chunk-A5VLMQAK.js.map +7 -0
- package/dist/chunk-AUZ45XPE.js +27 -0
- package/dist/chunk-AUZ45XPE.js.map +7 -0
- package/dist/chunk-BIHEIJG3.js +0 -0
- package/dist/chunk-BIHEIJG3.js.map +7 -0
- package/dist/chunk-BKNWW4PK.js +0 -0
- package/dist/chunk-BKNWW4PK.js.map +7 -0
- package/dist/chunk-BLFLCSG3.js +71 -0
- package/dist/chunk-BLFLCSG3.js.map +7 -0
- package/dist/chunk-BYYGAGNH.js +0 -0
- package/dist/chunk-BYYGAGNH.js.map +7 -0
- package/dist/chunk-CANRZY5A.js +87 -0
- package/dist/chunk-CANRZY5A.js.map +7 -0
- package/dist/chunk-CAZPWBQ4.js +18 -0
- package/dist/chunk-CAZPWBQ4.js.map +7 -0
- package/dist/chunk-CMPOBBRV.js +10 -0
- package/dist/chunk-CMPOBBRV.js.map +7 -0
- package/dist/chunk-CRQWKC67.js +118 -0
- package/dist/chunk-CRQWKC67.js.map +7 -0
- package/dist/chunk-CRVXBWSY.js +70 -0
- package/dist/chunk-CRVXBWSY.js.map +7 -0
- package/dist/chunk-D6ZHV6AT.js +0 -0
- package/dist/chunk-D6ZHV6AT.js.map +7 -0
- package/dist/chunk-DP7SYLLI.js +206 -0
- package/dist/chunk-DP7SYLLI.js.map +7 -0
- package/dist/chunk-DVDKPY2A.js +12 -0
- package/dist/chunk-DVDKPY2A.js.map +7 -0
- package/dist/chunk-E4VONSLO.js +15 -0
- package/dist/chunk-E4VONSLO.js.map +7 -0
- package/dist/chunk-EEYGPPLU.js +185 -0
- package/dist/chunk-EEYGPPLU.js.map +7 -0
- package/dist/chunk-EI5TMJDC.js +56 -0
- package/dist/chunk-EI5TMJDC.js.map +7 -0
- package/dist/chunk-EQ5AIF3T.js +117 -0
- package/dist/chunk-EQ5AIF3T.js.map +7 -0
- package/dist/chunk-EZZHO6DQ.js +26 -0
- package/dist/chunk-EZZHO6DQ.js.map +7 -0
- package/dist/chunk-FUHLRG3M.js +130 -0
- package/dist/chunk-FUHLRG3M.js.map +7 -0
- package/dist/chunk-FVOL3ZOJ.js +101 -0
- package/dist/chunk-FVOL3ZOJ.js.map +7 -0
- package/dist/chunk-G33EUV7N.js +288 -0
- package/dist/chunk-G33EUV7N.js.map +7 -0
- package/dist/chunk-GH34XFCC.js +56 -0
- package/dist/chunk-GH34XFCC.js.map +7 -0
- package/dist/chunk-GKWRJ6H4.js +27 -0
- package/dist/chunk-GKWRJ6H4.js.map +7 -0
- package/dist/chunk-GQHMU3AR.js +907 -0
- package/dist/chunk-GQHMU3AR.js.map +7 -0
- package/dist/chunk-GRZU6F7Q.js +80 -0
- package/dist/chunk-GRZU6F7Q.js.map +7 -0
- package/dist/chunk-GT2LARKT.js +107 -0
- package/dist/chunk-GT2LARKT.js.map +7 -0
- package/dist/chunk-H4ABGAAG.js +60 -0
- package/dist/chunk-H4ABGAAG.js.map +7 -0
- package/dist/chunk-H63UHX42.js +93 -0
- package/dist/chunk-H63UHX42.js.map +7 -0
- package/dist/chunk-HIS4MGIR.js +8 -0
- package/dist/chunk-HIS4MGIR.js.map +7 -0
- package/dist/chunk-HPPFSWIV.js +213 -0
- package/dist/chunk-HPPFSWIV.js.map +7 -0
- package/dist/chunk-J2FC5K4B.js +87 -0
- package/dist/chunk-J2FC5K4B.js.map +7 -0
- package/dist/chunk-J5BSFDVK.js +123 -0
- package/dist/chunk-J5BSFDVK.js.map +7 -0
- package/dist/chunk-J7GSNWXT.js +151 -0
- package/dist/chunk-J7GSNWXT.js.map +7 -0
- package/dist/chunk-JA5ET6MC.js +550 -0
- package/dist/chunk-JA5ET6MC.js.map +7 -0
- package/dist/chunk-K22S7IZR.js +12 -0
- package/dist/chunk-K22S7IZR.js.map +7 -0
- package/dist/chunk-K5TMXCMY.js +139 -0
- package/dist/chunk-K5TMXCMY.js.map +7 -0
- package/dist/chunk-KE53GN4Q.js +246 -0
- package/dist/chunk-KE53GN4Q.js.map +7 -0
- package/dist/chunk-KFQEDSYI.js +24 -0
- package/dist/chunk-KFQEDSYI.js.map +7 -0
- package/dist/chunk-KH6QWB5Y.js +51 -0
- package/dist/chunk-KH6QWB5Y.js.map +7 -0
- package/dist/chunk-KLATKWUA.js +116 -0
- package/dist/chunk-KLATKWUA.js.map +7 -0
- package/dist/chunk-KSKWSUOB.js +17 -0
- package/dist/chunk-KSKWSUOB.js.map +7 -0
- package/dist/chunk-LFWEJXWE.js +68 -0
- package/dist/chunk-LFWEJXWE.js.map +7 -0
- package/dist/chunk-LMWJAD3B.js +24 -0
- package/dist/chunk-LMWJAD3B.js.map +7 -0
- package/dist/chunk-MD23VADH.js +92 -0
- package/dist/chunk-MD23VADH.js.map +7 -0
- package/dist/chunk-MKMJT3XR.js +0 -0
- package/dist/chunk-MKMJT3XR.js.map +7 -0
- package/dist/chunk-NJTLBSTR.js +82 -0
- package/dist/chunk-NJTLBSTR.js.map +7 -0
- package/dist/chunk-NJXKMF67.js +182 -0
- package/dist/chunk-NJXKMF67.js.map +7 -0
- package/dist/chunk-OBQBIOGN.js +16 -0
- package/dist/chunk-OBQBIOGN.js.map +7 -0
- package/dist/chunk-OLYHNFKC.js +82 -0
- package/dist/chunk-OLYHNFKC.js.map +7 -0
- package/dist/chunk-OR2L7EKO.js +33 -0
- package/dist/chunk-OR2L7EKO.js.map +7 -0
- package/dist/chunk-OUF57UZ7.js +28 -0
- package/dist/chunk-OUF57UZ7.js.map +7 -0
- package/dist/chunk-PBMM2N77.js +56 -0
- package/dist/chunk-PBMM2N77.js.map +7 -0
- package/dist/chunk-PCL2KNHC.js +6 -0
- package/dist/chunk-PCL2KNHC.js.map +7 -0
- package/dist/chunk-PH3LWLYN.js +49 -0
- package/dist/chunk-PH3LWLYN.js.map +7 -0
- package/dist/chunk-PHNMDWSK.js +9 -0
- package/dist/chunk-PHNMDWSK.js.map +7 -0
- package/dist/chunk-PN5EH6DM.js +36 -0
- package/dist/chunk-PN5EH6DM.js.map +7 -0
- package/dist/chunk-POCAINUE.js +42 -0
- package/dist/chunk-POCAINUE.js.map +7 -0
- package/dist/chunk-Q5LEK7CI.js +64 -0
- package/dist/chunk-Q5LEK7CI.js.map +7 -0
- package/dist/chunk-QH7VW7IY.js +0 -0
- package/dist/chunk-QH7VW7IY.js.map +7 -0
- package/dist/chunk-QLGM2AZW.js +173 -0
- package/dist/chunk-QLGM2AZW.js.map +7 -0
- package/dist/chunk-QT3EYUL5.js +85 -0
- package/dist/chunk-QT3EYUL5.js.map +7 -0
- package/dist/chunk-QYHOFLRX.js +43 -0
- package/dist/chunk-QYHOFLRX.js.map +7 -0
- package/dist/chunk-R3MBVWVI.js +127 -0
- package/dist/chunk-R3MBVWVI.js.map +7 -0
- package/dist/chunk-R6V3LH7F.js +67 -0
- package/dist/chunk-R6V3LH7F.js.map +7 -0
- package/dist/chunk-RB22U6HI.js +64 -0
- package/dist/chunk-RB22U6HI.js.map +7 -0
- package/dist/chunk-RQRQYYTB.js +34 -0
- package/dist/chunk-RQRQYYTB.js.map +7 -0
- package/dist/chunk-S5D2QE4G.js +53 -0
- package/dist/chunk-S5D2QE4G.js.map +7 -0
- package/dist/chunk-S7I76ISM.js +245 -0
- package/dist/chunk-S7I76ISM.js.map +7 -0
- package/dist/chunk-TBDZOQ2C.js +66 -0
- package/dist/chunk-TBDZOQ2C.js.map +7 -0
- package/dist/chunk-TSKELYW7.js +55 -0
- package/dist/chunk-TSKELYW7.js.map +7 -0
- package/dist/chunk-U3YHTQHR.js +215 -0
- package/dist/chunk-U3YHTQHR.js.map +7 -0
- package/dist/chunk-UGL3KNOT.js +42 -0
- package/dist/chunk-UGL3KNOT.js.map +7 -0
- package/dist/chunk-UN3DARLG.js +35 -0
- package/dist/chunk-UN3DARLG.js.map +7 -0
- package/dist/chunk-V5H7L5PJ.js +587 -0
- package/dist/chunk-V5H7L5PJ.js.map +7 -0
- package/dist/chunk-VGGERKV2.js +7 -0
- package/dist/chunk-VGGERKV2.js.map +7 -0
- package/dist/chunk-VVFXYY65.js +0 -0
- package/dist/chunk-VVFXYY65.js.map +7 -0
- package/dist/chunk-WLDCYUN6.js +161 -0
- package/dist/chunk-WLDCYUN6.js.map +7 -0
- package/dist/chunk-WMDTQS36.js +0 -0
- package/dist/chunk-WMDTQS36.js.map +7 -0
- package/dist/chunk-WUTGZYP4.js +290 -0
- package/dist/chunk-WUTGZYP4.js.map +7 -0
- package/dist/chunk-XKN3WWK3.js +0 -0
- package/dist/chunk-XKN3WWK3.js.map +7 -0
- package/dist/chunk-XQ5VJ4QO.js +62 -0
- package/dist/chunk-XQ5VJ4QO.js.map +7 -0
- package/dist/chunk-XQVKX47O.js +174 -0
- package/dist/chunk-XQVKX47O.js.map +7 -0
- package/dist/chunk-Y5CNB57V.js +22 -0
- package/dist/chunk-Y5CNB57V.js.map +7 -0
- package/dist/chunk-YDGH7DTL.js +18 -0
- package/dist/chunk-YDGH7DTL.js.map +7 -0
- package/dist/chunk-YIFUBPJ3.js +0 -0
- package/dist/chunk-YIFUBPJ3.js.map +7 -0
- package/dist/chunk-YUUDXRBW.js +212 -0
- package/dist/chunk-YUUDXRBW.js.map +7 -0
- package/dist/chunk-Z6DQLJS2.js +23 -0
- package/dist/chunk-Z6DQLJS2.js.map +7 -0
- package/dist/chunk-ZDEZ2FOC.js +81 -0
- package/dist/chunk-ZDEZ2FOC.js.map +7 -0
- package/dist/chunk-ZUYSGCEH.js +65 -0
- package/dist/chunk-ZUYSGCEH.js.map +7 -0
- package/dist/chunk-ZYP3MIH3.js +115 -0
- package/dist/chunk-ZYP3MIH3.js.map +7 -0
- package/dist/constraints/constraint-evaluator.d.ts +57 -0
- package/dist/constraints/constraint-evaluator.js +17 -0
- package/dist/constraints/constraint-evaluator.js.map +7 -0
- package/dist/constraints/index.d.ts +1 -0
- package/dist/constraints/index.js +17 -0
- package/dist/constraints/index.js.map +7 -0
- package/dist/csrf/index.d.ts +43 -0
- package/dist/csrf/index.js +43 -0
- package/dist/csrf/index.js.map +7 -0
- package/dist/engine/build-form-engine.d.ts +27 -0
- package/dist/engine/build-form-engine.js +58 -0
- package/dist/engine/build-form-engine.js.map +7 -0
- package/dist/engine/component-type.d.ts +19 -0
- package/dist/engine/component-type.js +6 -0
- package/dist/engine/component-type.js.map +7 -0
- package/dist/engine/create-form-engine.d.ts +100 -0
- package/dist/engine/create-form-engine.js +59 -0
- package/dist/engine/create-form-engine.js.map +7 -0
- package/dist/engine/form-action-context.d.ts +70 -0
- package/dist/engine/form-action-context.js +10 -0
- package/dist/engine/form-action-context.js.map +7 -0
- package/dist/engine/form-engine.d.ts +236 -0
- package/dist/engine/form-engine.js +61 -0
- package/dist/engine/form-engine.js.map +7 -0
- package/dist/engine/index.d.ts +12 -0
- package/dist/engine/index.js +124 -0
- package/dist/engine/index.js.map +7 -0
- package/dist/engine/schema-artifacts.d.ts +87 -0
- package/dist/engine/schema-artifacts.js +14 -0
- package/dist/engine/schema-artifacts.js.map +7 -0
- package/dist/engine/schema-metadata-catalog.d.ts +41 -0
- package/dist/engine/schema-metadata-catalog.js +6 -0
- package/dist/engine/schema-metadata-catalog.js.map +7 -0
- package/dist/engine/step-machine.d.ts +59 -0
- package/dist/engine/step-machine.js +32 -0
- package/dist/engine/step-machine.js.map +7 -0
- package/dist/engine/submission-schema.d.ts +53 -0
- package/dist/engine/submission-schema.js +22 -0
- package/dist/engine/submission-schema.js.map +7 -0
- package/dist/engine/value-validation.d.ts +237 -0
- package/dist/engine/value-validation.js +39 -0
- package/dist/engine/value-validation.js.map +7 -0
- package/dist/index.d.ts +76 -0
- package/dist/index.js +283 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/authoring-catalog.d.ts +5 -0
- package/dist/lib/authoring-catalog.js +11 -0
- package/dist/lib/authoring-catalog.js.map +7 -0
- package/dist/lib/container-kind-of.d.ts +5 -0
- package/dist/lib/container-kind-of.js +6 -0
- package/dist/lib/container-kind-of.js.map +7 -0
- package/dist/lib/debounce.d.ts +19 -0
- package/dist/lib/debounce.js +6 -0
- package/dist/lib/debounce.js.map +7 -0
- package/dist/lib/deep-readonly.d.ts +12 -0
- package/dist/lib/deep-readonly.js +0 -0
- package/dist/lib/deep-readonly.js.map +7 -0
- package/dist/lib/element-children.d.ts +35 -0
- package/dist/lib/element-children.js +16 -0
- package/dist/lib/element-children.js.map +7 -0
- package/dist/lib/exported-action-envelope.d.ts +11 -0
- package/dist/lib/exported-action-envelope.js +7 -0
- package/dist/lib/exported-action-envelope.js.map +7 -0
- package/dist/lib/exported-rules.d.ts +14 -0
- package/dist/lib/exported-rules.js +6 -0
- package/dist/lib/exported-rules.js.map +7 -0
- package/dist/lib/field-ref.d.ts +13 -0
- package/dist/lib/field-ref.js +6 -0
- package/dist/lib/field-ref.js.map +7 -0
- package/dist/lib/field-scope.d.ts +121 -0
- package/dist/lib/field-scope.js +41 -0
- package/dist/lib/field-scope.js.map +7 -0
- package/dist/lib/form-fetch.d.ts +36 -0
- package/dist/lib/form-fetch.js +10 -0
- package/dist/lib/form-fetch.js.map +7 -0
- package/dist/lib/form-view.d.ts +33 -0
- package/dist/lib/form-view.js +12 -0
- package/dist/lib/form-view.js.map +7 -0
- package/dist/lib/frozen-copy.d.ts +9 -0
- package/dist/lib/frozen-copy.js +7 -0
- package/dist/lib/frozen-copy.js.map +7 -0
- package/dist/lib/is-plain-object.d.ts +2 -0
- package/dist/lib/is-plain-object.js +6 -0
- package/dist/lib/is-plain-object.js.map +7 -0
- package/dist/lib/logger.d.ts +2 -0
- package/dist/lib/logger.js +6 -0
- package/dist/lib/logger.js.map +7 -0
- package/dist/lib/normalized-form-config.d.ts +106 -0
- package/dist/lib/normalized-form-config.js +19 -0
- package/dist/lib/normalized-form-config.js.map +7 -0
- package/dist/lib/omit-paths.d.ts +11 -0
- package/dist/lib/omit-paths.js +7 -0
- package/dist/lib/omit-paths.js.map +7 -0
- package/dist/lib/path-values.d.ts +47 -0
- package/dist/lib/path-values.js +22 -0
- package/dist/lib/path-values.js.map +7 -0
- package/dist/lib/renderer-data-attributes.d.ts +10 -0
- package/dist/lib/renderer-data-attributes.js +6 -0
- package/dist/lib/renderer-data-attributes.js.map +7 -0
- package/dist/lib/reserved-path-keys.d.ts +10 -0
- package/dist/lib/reserved-path-keys.js +10 -0
- package/dist/lib/reserved-path-keys.js.map +7 -0
- package/dist/lib/resolve-appearance.d.ts +48 -0
- package/dist/lib/resolve-appearance.js +10 -0
- package/dist/lib/resolve-appearance.js.map +7 -0
- package/dist/lib/standard-json-schema.d.ts +27 -0
- package/dist/lib/standard-json-schema.js +8 -0
- package/dist/lib/standard-json-schema.js.map +7 -0
- package/dist/lib/standard-schema.d.ts +19 -0
- package/dist/lib/standard-schema.js +8 -0
- package/dist/lib/standard-schema.js.map +7 -0
- package/dist/lib/submission-shape.d.ts +60 -0
- package/dist/lib/submission-shape.js +14 -0
- package/dist/lib/submission-shape.js.map +7 -0
- package/dist/lib/validate-form/grid-checks.d.ts +57 -0
- package/dist/lib/validate-form/grid-checks.js +16 -0
- package/dist/lib/validate-form/grid-checks.js.map +7 -0
- package/dist/lib/validate-form/issues.d.ts +43 -0
- package/dist/lib/validate-form/issues.js +13 -0
- package/dist/lib/validate-form/issues.js.map +7 -0
- package/dist/lib/validate-form/options.d.ts +22 -0
- package/dist/lib/validate-form/options.js +0 -0
- package/dist/lib/validate-form/options.js.map +7 -0
- package/dist/lib/validate-form/parse-elements.d.ts +23 -0
- package/dist/lib/validate-form/parse-elements.js +21 -0
- package/dist/lib/validate-form/parse-elements.js.map +7 -0
- package/dist/lib/validate-form/parse-owner-actions.d.ts +14 -0
- package/dist/lib/validate-form/parse-owner-actions.js +10 -0
- package/dist/lib/validate-form/parse-owner-actions.js.map +7 -0
- package/dist/lib/validate-form/parse-view.d.ts +11 -0
- package/dist/lib/validate-form/parse-view.js +11 -0
- package/dist/lib/validate-form/parse-view.js.map +7 -0
- package/dist/lib/validate-form/schema-issues.d.ts +16 -0
- package/dist/lib/validate-form/schema-issues.js +8 -0
- package/dist/lib/validate-form/schema-issues.js.map +7 -0
- package/dist/lib/validate-form/step-checks.d.ts +18 -0
- package/dist/lib/validate-form/step-checks.js +15 -0
- package/dist/lib/validate-form/step-checks.js.map +7 -0
- package/dist/lib/validate-form/validation-error.d.ts +26 -0
- package/dist/lib/validate-form/validation-error.js +8 -0
- package/dist/lib/validate-form/validation-error.js.map +7 -0
- package/dist/lib/validate-form.d.ts +34 -0
- package/dist/lib/validate-form.js +62 -0
- package/dist/lib/validate-form.js.map +7 -0
- package/dist/lib/zod-json-schema.d.ts +33 -0
- package/dist/lib/zod-json-schema.js +10 -0
- package/dist/lib/zod-json-schema.js.map +7 -0
- package/dist/recipes/built-in-specs.d.ts +1832 -0
- package/dist/recipes/built-in-specs.js +28 -0
- package/dist/recipes/built-in-specs.js.map +7 -0
- package/dist/recipes/built-in.d.ts +2 -0
- package/dist/recipes/built-in.js +49 -0
- package/dist/recipes/built-in.js.map +7 -0
- package/dist/recipes/define-form-recipe.d.ts +10 -0
- package/dist/recipes/define-form-recipe.js +6 -0
- package/dist/recipes/define-form-recipe.js.map +7 -0
- package/dist/recipes/define-recipe-spec.d.ts +13 -0
- package/dist/recipes/define-recipe-spec.js +8 -0
- package/dist/recipes/define-recipe-spec.js.map +7 -0
- package/dist/recipes/index.d.ts +6 -0
- package/dist/recipes/index.js +43 -0
- package/dist/recipes/index.js.map +7 -0
- package/dist/recipes/protocol.d.ts +24 -0
- package/dist/recipes/protocol.js +11 -0
- package/dist/recipes/protocol.js.map +7 -0
- package/dist/recipes/slot-schemas.d.ts +128 -0
- package/dist/recipes/slot-schemas.js +24 -0
- package/dist/recipes/slot-schemas.js.map +7 -0
- package/dist/recipes/types.d.ts +55 -0
- package/dist/recipes/types.js +1 -0
- package/dist/recipes/types.js.map +7 -0
- package/dist/recipes/view-model.d.ts +93 -0
- package/dist/recipes/view-model.js +29 -0
- package/dist/recipes/view-model.js.map +7 -0
- package/dist/registries/index.d.ts +8 -0
- package/dist/registries/index.js +0 -0
- package/dist/registries/index.js.map +7 -0
- package/dist/runtime/create-form-runtime.d.ts +43 -0
- package/dist/runtime/create-form-runtime.js +41 -0
- package/dist/runtime/create-form-runtime.js.map +7 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +44 -0
- package/dist/runtime/index.js.map +7 -0
- package/dist/runtime/submission-lifecycle.d.ts +65 -0
- package/dist/runtime/submission-lifecycle.js +6 -0
- package/dist/runtime/submission-lifecycle.js.map +7 -0
- package/dist/runtime/types.d.ts +172 -0
- package/dist/runtime/types.js +6 -0
- package/dist/runtime/types.js.map +7 -0
- package/dist/schemas/base-field.d.ts +450 -0
- package/dist/schemas/base-field.js +36 -0
- package/dist/schemas/base-field.js.map +7 -0
- package/dist/schemas/field-config.d.ts +36 -0
- package/dist/schemas/field-config.js +1 -0
- package/dist/schemas/field-config.js.map +7 -0
- package/dist/schemas/form-config-shape.d.ts +763 -0
- package/dist/schemas/form-config-shape.js +35 -0
- package/dist/schemas/form-config-shape.js.map +7 -0
- package/dist/schemas/form-config.d.ts +1288 -0
- package/dist/schemas/form-config.js +41 -0
- package/dist/schemas/form-config.js.map +7 -0
- package/dist/schemas/html-attributes.d.ts +12 -0
- package/dist/schemas/html-attributes.js +12 -0
- package/dist/schemas/html-attributes.js.map +7 -0
- package/dist/schemas/index.d.ts +5 -0
- package/dist/schemas/index.js +165 -0
- package/dist/schemas/index.js.map +7 -0
- package/dist/schemas/validation/async/cache.d.ts +39 -0
- package/dist/schemas/validation/async/cache.js +6 -0
- package/dist/schemas/validation/async/cache.js.map +7 -0
- package/dist/schemas/validation/async/handler.d.ts +21 -0
- package/dist/schemas/validation/async/handler.js +11 -0
- package/dist/schemas/validation/async/handler.js.map +7 -0
- package/dist/schemas/validation/async/index.d.ts +8 -0
- package/dist/schemas/validation/async/index.js +14 -0
- package/dist/schemas/validation/async/index.js.map +7 -0
- package/dist/schemas/validation/defaults.d.ts +6 -0
- package/dist/schemas/validation/defaults.js +12 -0
- package/dist/schemas/validation/defaults.js.map +7 -0
- package/dist/schemas/validation/dependencies.d.ts +52 -0
- package/dist/schemas/validation/dependencies.js +17 -0
- package/dist/schemas/validation/dependencies.js.map +7 -0
- package/dist/schemas/validation/empty.d.ts +1 -0
- package/dist/schemas/validation/empty.js +6 -0
- package/dist/schemas/validation/empty.js.map +7 -0
- package/dist/schemas/validation/errors.d.ts +44 -0
- package/dist/schemas/validation/errors.js +12 -0
- package/dist/schemas/validation/errors.js.map +7 -0
- package/dist/schemas/validation/index.d.ts +9 -0
- package/dist/schemas/validation/index.js +130 -0
- package/dist/schemas/validation/index.js.map +7 -0
- package/dist/schemas/validation/presets.d.ts +66 -0
- package/dist/schemas/validation/presets.js +6 -0
- package/dist/schemas/validation/presets.js.map +7 -0
- package/dist/schemas/validation/relations.d.ts +12 -0
- package/dist/schemas/validation/relations.js +8 -0
- package/dist/schemas/validation/relations.js.map +7 -0
- package/dist/schemas/validation/types.d.ts +817 -0
- package/dist/schemas/validation/types.js +64 -0
- package/dist/schemas/validation/types.js.map +7 -0
- package/dist/schemas/validation/utils.d.ts +76 -0
- package/dist/schemas/validation/utils.js +24 -0
- package/dist/schemas/validation/utils.js.map +7 -0
- package/dist/schemas/validation/validation-registry.d.ts +124 -0
- package/dist/schemas/validation/validation-registry.js +27 -0
- package/dist/schemas/validation/validation-registry.js.map +7 -0
- package/dist/server-errors/from-json-api-errors.d.ts +13 -0
- package/dist/server-errors/from-json-api-errors.js +10 -0
- package/dist/server-errors/from-json-api-errors.js.map +7 -0
- package/dist/server-errors/from-problem-details.d.ts +15 -0
- package/dist/server-errors/from-problem-details.js +10 -0
- package/dist/server-errors/from-problem-details.js.map +7 -0
- package/dist/server-errors/index.d.ts +8 -0
- package/dist/server-errors/index.js +17 -0
- package/dist/server-errors/index.js.map +7 -0
- package/dist/server-errors/shared.d.ts +34 -0
- package/dist/server-errors/shared.js +23 -0
- package/dist/server-errors/shared.js.map +7 -0
- package/dist/state-container/create-form-state-container.d.ts +17 -0
- package/dist/state-container/create-form-state-container.js +31 -0
- package/dist/state-container/create-form-state-container.js.map +7 -0
- package/dist/state-container/dirty.d.ts +11 -0
- package/dist/state-container/dirty.js +9 -0
- package/dist/state-container/dirty.js.map +7 -0
- package/dist/state-container/field-array.d.ts +41 -0
- package/dist/state-container/field-array.js +8 -0
- package/dist/state-container/field-array.js.map +7 -0
- package/dist/state-container/hydration.d.ts +21 -0
- package/dist/state-container/hydration.js +11 -0
- package/dist/state-container/hydration.js.map +7 -0
- package/dist/state-container/index.d.ts +16 -0
- package/dist/state-container/index.js +51 -0
- package/dist/state-container/index.js.map +7 -0
- package/dist/state-container/issue-text.d.ts +11 -0
- package/dist/state-container/issue-text.js +6 -0
- package/dist/state-container/issue-text.js.map +7 -0
- package/dist/state-container/row-ids.d.ts +34 -0
- package/dist/state-container/row-ids.js +19 -0
- package/dist/state-container/row-ids.js.map +7 -0
- package/dist/state-container/selectors.d.ts +33 -0
- package/dist/state-container/selectors.js +22 -0
- package/dist/state-container/selectors.js.map +7 -0
- package/dist/state-container/stale-results.d.ts +28 -0
- package/dist/state-container/stale-results.js +9 -0
- package/dist/state-container/stale-results.js.map +7 -0
- package/dist/state-container/state-tree.d.ts +56 -0
- package/dist/state-container/state-tree.js +33 -0
- package/dist/state-container/state-tree.js.map +7 -0
- package/dist/state-container/submission.d.ts +45 -0
- package/dist/state-container/submission.js +26 -0
- package/dist/state-container/submission.js.map +7 -0
- package/dist/state-container/types.d.ts +404 -0
- package/dist/state-container/types.js +6 -0
- package/dist/state-container/types.js.map +7 -0
- package/dist/state-container/value-tree.d.ts +56 -0
- package/dist/state-container/value-tree.js +34 -0
- package/dist/state-container/value-tree.js.map +7 -0
- package/dist/testing/assert.d.ts +92 -0
- package/dist/testing/assert.js +42 -0
- package/dist/testing/assert.js.map +7 -0
- package/dist/testing/form-state-container-conformance.d.ts +63 -0
- package/dist/testing/form-state-container-conformance.js +44 -0
- package/dist/testing/form-state-container-conformance.js.map +7 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.js +36 -0
- package/dist/testing/index.js.map +7 -0
- package/dist/types/actions.d.ts +75 -0
- package/dist/types/actions.js +1 -0
- package/dist/types/actions.js.map +7 -0
- package/dist/types/categories.d.ts +21 -0
- package/dist/types/categories.js +8 -0
- package/dist/types/categories.js.map +7 -0
- package/dist/types/define-element.d.ts +73 -0
- package/dist/types/define-element.js +8 -0
- package/dist/types/define-element.js.map +7 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +17 -0
- package/dist/types/index.js.map +7 -0
- package/dist/types/metadata.d.ts +14 -0
- package/dist/types/metadata.js +1 -0
- package/dist/types/metadata.js.map +7 -0
- package/dist/types/registration.d.ts +142 -0
- package/dist/types/registration.js +1 -0
- package/dist/types/registration.js.map +7 -0
- package/package.json +113 -3
- package/skill/SKILL.md +79 -0
- package/skill/reference/forms-actions.md +51 -0
- package/skill/reference/forms-submission.md +44 -0
- package/skill/reference/forms-validation.md +91 -0
- package/skill/reference/forms.md +180 -0
|
@@ -0,0 +1,817 @@
|
|
|
1
|
+
import type { FormFetch } from '../../lib/form-fetch.js';
|
|
2
|
+
import * as z from 'zod/mini';
|
|
3
|
+
import type { BaseRegistration, RegistrationMetadata } from '@schema-engine/registry';
|
|
4
|
+
import type { DebounceScope } from '../../lib/debounce.js';
|
|
5
|
+
/**
|
|
6
|
+
* What an element's `rules` accepts: the `$type` and the fields every rule has, and whatever else the
|
|
7
|
+
* rule's registration describes.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* Loose, and the only shape of a rule in an element's schema: the validation registry owns the rest.
|
|
11
|
+
* The engine checks each rule against its registration when it validates a form config
|
|
12
|
+
* ({@link ValidationRegistry.check}), so a `$type` nothing registers and options the registration
|
|
13
|
+
* refuses are rejected there, and a registration that replaces a built-in decides that rule's options.
|
|
14
|
+
* The JSON Schema export lists each registered rule with its options instead of this shape.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BaseValidationRuleSchema: z.ZodMiniObject<{
|
|
17
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
18
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
19
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
20
|
+
error: "error";
|
|
21
|
+
warning: "warning";
|
|
22
|
+
}>>;
|
|
23
|
+
$type: z.ZodMiniString<string>;
|
|
24
|
+
}, z.core.$loose>;
|
|
25
|
+
export declare const RequiredRuleSchema: z.ZodMiniObject<{
|
|
26
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
27
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
28
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
29
|
+
error: "error";
|
|
30
|
+
warning: "warning";
|
|
31
|
+
}>>;
|
|
32
|
+
$type: z.ZodMiniLiteral<"required">;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export declare const MinLengthRuleSchema: z.ZodMiniObject<{
|
|
35
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
36
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
38
|
+
error: "error";
|
|
39
|
+
warning: "warning";
|
|
40
|
+
}>>;
|
|
41
|
+
$type: z.ZodMiniLiteral<"minLength">;
|
|
42
|
+
value: z.ZodMiniNumber<number>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const MaxLengthRuleSchema: z.ZodMiniObject<{
|
|
45
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
46
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
47
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
48
|
+
error: "error";
|
|
49
|
+
warning: "warning";
|
|
50
|
+
}>>;
|
|
51
|
+
$type: z.ZodMiniLiteral<"maxLength">;
|
|
52
|
+
value: z.ZodMiniNumber<number>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export declare const EmailRuleSchema: z.ZodMiniObject<{
|
|
55
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
57
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
58
|
+
error: "error";
|
|
59
|
+
warning: "warning";
|
|
60
|
+
}>>;
|
|
61
|
+
$type: z.ZodMiniLiteral<"email">;
|
|
62
|
+
pattern: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export declare const PhoneRuleSchema: z.ZodMiniObject<{
|
|
65
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
66
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
67
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
68
|
+
error: "error";
|
|
69
|
+
warning: "warning";
|
|
70
|
+
}>>;
|
|
71
|
+
$type: z.ZodMiniLiteral<"phone">;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export declare const PatternRuleSchema: z.ZodMiniObject<{
|
|
74
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
75
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
76
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
77
|
+
error: "error";
|
|
78
|
+
warning: "warning";
|
|
79
|
+
}>>;
|
|
80
|
+
$type: z.ZodMiniLiteral<"pattern">;
|
|
81
|
+
value: z.ZodMiniString<string>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
export declare const UrlRuleSchema: z.ZodMiniObject<{
|
|
84
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
85
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
86
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
87
|
+
error: "error";
|
|
88
|
+
warning: "warning";
|
|
89
|
+
}>>;
|
|
90
|
+
$type: z.ZodMiniLiteral<"url">;
|
|
91
|
+
protocol: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
92
|
+
hostname: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export declare const UuidRuleSchema: z.ZodMiniObject<{
|
|
95
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
96
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
97
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
98
|
+
error: "error";
|
|
99
|
+
warning: "warning";
|
|
100
|
+
}>>;
|
|
101
|
+
$type: z.ZodMiniLiteral<"uuid">;
|
|
102
|
+
version: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
103
|
+
v1: "v1";
|
|
104
|
+
v2: "v2";
|
|
105
|
+
v3: "v3";
|
|
106
|
+
v4: "v4";
|
|
107
|
+
v5: "v5";
|
|
108
|
+
}>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export declare const Ipv4RuleSchema: z.ZodMiniObject<{
|
|
111
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
112
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
113
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
114
|
+
error: "error";
|
|
115
|
+
warning: "warning";
|
|
116
|
+
}>>;
|
|
117
|
+
$type: z.ZodMiniLiteral<"ipv4">;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export declare const Ipv6RuleSchema: z.ZodMiniObject<{
|
|
120
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
121
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
122
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
123
|
+
error: "error";
|
|
124
|
+
warning: "warning";
|
|
125
|
+
}>>;
|
|
126
|
+
$type: z.ZodMiniLiteral<"ipv6">;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
export declare const CidrRuleSchema: z.ZodMiniObject<{
|
|
129
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
130
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
131
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
132
|
+
error: "error";
|
|
133
|
+
warning: "warning";
|
|
134
|
+
}>>;
|
|
135
|
+
$type: z.ZodMiniLiteral<"cidr">;
|
|
136
|
+
version: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
137
|
+
v4: "v4";
|
|
138
|
+
v6: "v6";
|
|
139
|
+
}>>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
export declare const JwtRuleSchema: z.ZodMiniObject<{
|
|
142
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
143
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
144
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
145
|
+
error: "error";
|
|
146
|
+
warning: "warning";
|
|
147
|
+
}>>;
|
|
148
|
+
$type: z.ZodMiniLiteral<"jwt">;
|
|
149
|
+
alg: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const HashRuleSchema: z.ZodMiniObject<{
|
|
152
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
153
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
154
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
155
|
+
error: "error";
|
|
156
|
+
warning: "warning";
|
|
157
|
+
}>>;
|
|
158
|
+
$type: z.ZodMiniLiteral<"hash">;
|
|
159
|
+
algorithm: z.ZodMiniEnum<{
|
|
160
|
+
md5: "md5";
|
|
161
|
+
sha1: "sha1";
|
|
162
|
+
sha256: "sha256";
|
|
163
|
+
sha384: "sha384";
|
|
164
|
+
sha512: "sha512";
|
|
165
|
+
}>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
export declare const Base64RuleSchema: z.ZodMiniObject<{
|
|
168
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
169
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
170
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
171
|
+
error: "error";
|
|
172
|
+
warning: "warning";
|
|
173
|
+
}>>;
|
|
174
|
+
$type: z.ZodMiniLiteral<"base64">;
|
|
175
|
+
urlSafe: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
export declare const CuidRuleSchema: z.ZodMiniObject<{
|
|
178
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
179
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
180
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
181
|
+
error: "error";
|
|
182
|
+
warning: "warning";
|
|
183
|
+
}>>;
|
|
184
|
+
$type: z.ZodMiniLiteral<"cuid">;
|
|
185
|
+
}, z.core.$strip>;
|
|
186
|
+
export declare const Cuid2RuleSchema: z.ZodMiniObject<{
|
|
187
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
188
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
189
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
190
|
+
error: "error";
|
|
191
|
+
warning: "warning";
|
|
192
|
+
}>>;
|
|
193
|
+
$type: z.ZodMiniLiteral<"cuid2">;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export declare const UlidRuleSchema: z.ZodMiniObject<{
|
|
196
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
197
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
198
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
199
|
+
error: "error";
|
|
200
|
+
warning: "warning";
|
|
201
|
+
}>>;
|
|
202
|
+
$type: z.ZodMiniLiteral<"ulid">;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export declare const HexRuleSchema: z.ZodMiniObject<{
|
|
205
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
206
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
207
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
208
|
+
error: "error";
|
|
209
|
+
warning: "warning";
|
|
210
|
+
}>>;
|
|
211
|
+
$type: z.ZodMiniLiteral<"hex">;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export declare const MinRuleSchema: z.ZodMiniObject<{
|
|
214
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
215
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
216
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
217
|
+
error: "error";
|
|
218
|
+
warning: "warning";
|
|
219
|
+
}>>;
|
|
220
|
+
$type: z.ZodMiniLiteral<"min">;
|
|
221
|
+
value: z.ZodMiniNumber<number>;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
export declare const MaxRuleSchema: z.ZodMiniObject<{
|
|
224
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
225
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
226
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
227
|
+
error: "error";
|
|
228
|
+
warning: "warning";
|
|
229
|
+
}>>;
|
|
230
|
+
$type: z.ZodMiniLiteral<"max">;
|
|
231
|
+
value: z.ZodMiniNumber<number>;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
export declare const MinItemsRuleSchema: z.ZodMiniObject<{
|
|
234
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
235
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
236
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
237
|
+
error: "error";
|
|
238
|
+
warning: "warning";
|
|
239
|
+
}>>;
|
|
240
|
+
$type: z.ZodMiniLiteral<"minItems">;
|
|
241
|
+
value: z.ZodMiniNumber<number>;
|
|
242
|
+
}, z.core.$strip>;
|
|
243
|
+
export declare const MaxItemsRuleSchema: z.ZodMiniObject<{
|
|
244
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
245
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
246
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
247
|
+
error: "error";
|
|
248
|
+
warning: "warning";
|
|
249
|
+
}>>;
|
|
250
|
+
$type: z.ZodMiniLiteral<"maxItems">;
|
|
251
|
+
value: z.ZodMiniNumber<number>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
export declare const DateTimeRuleSchema: z.ZodMiniObject<{
|
|
254
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
255
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
256
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
257
|
+
error: "error";
|
|
258
|
+
warning: "warning";
|
|
259
|
+
}>>;
|
|
260
|
+
$type: z.ZodMiniLiteral<"datetime">;
|
|
261
|
+
precision: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
262
|
+
offset: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
263
|
+
local: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
export declare const DateRuleSchema: z.ZodMiniObject<{
|
|
266
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
267
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
268
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
269
|
+
error: "error";
|
|
270
|
+
warning: "warning";
|
|
271
|
+
}>>;
|
|
272
|
+
$type: z.ZodMiniLiteral<"date">;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
export declare const TimeRuleSchema: z.ZodMiniObject<{
|
|
275
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
276
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
277
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
278
|
+
error: "error";
|
|
279
|
+
warning: "warning";
|
|
280
|
+
}>>;
|
|
281
|
+
$type: z.ZodMiniLiteral<"time">;
|
|
282
|
+
precision: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export declare const AsyncRuleSchema: z.ZodMiniObject<{
|
|
285
|
+
dependencies: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
286
|
+
debounce: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
287
|
+
cacheTTL: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
288
|
+
disableCache: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
289
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
290
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
291
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
292
|
+
error: "error";
|
|
293
|
+
warning: "warning";
|
|
294
|
+
}>>;
|
|
295
|
+
$type: z.ZodMiniLiteral<"async">;
|
|
296
|
+
url: z.ZodMiniString<string>;
|
|
297
|
+
method: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
298
|
+
POST: "POST";
|
|
299
|
+
PUT: "PUT";
|
|
300
|
+
PATCH: "PATCH";
|
|
301
|
+
DELETE: "DELETE";
|
|
302
|
+
GET: "GET";
|
|
303
|
+
}>>;
|
|
304
|
+
headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
305
|
+
extraPayload: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
306
|
+
expectedResponse: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
307
|
+
valid: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
308
|
+
success: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
309
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
310
|
+
error: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
}, z.core.$strip>;
|
|
313
|
+
/**
|
|
314
|
+
* Named comparisons a {@link RelateRuleSchema} can make over the referenced values.
|
|
315
|
+
*
|
|
316
|
+
* @remarks
|
|
317
|
+
* Ordering assertions read left to right over `fields` (with the declaring
|
|
318
|
+
* field's own value first, unless `includeSelf` is off), so `descending` on
|
|
319
|
+
* `[endDate, startDate]` asserts that the end date is the later one.
|
|
320
|
+
*/
|
|
321
|
+
export declare const RelationAssertSchema: z.ZodMiniEnum<{
|
|
322
|
+
allEqual: "allEqual";
|
|
323
|
+
allDifferent: "allDifferent";
|
|
324
|
+
ascending: "ascending";
|
|
325
|
+
strictlyAscending: "strictlyAscending";
|
|
326
|
+
descending: "descending";
|
|
327
|
+
strictlyDescending: "strictlyDescending";
|
|
328
|
+
atLeastOne: "atLeastOne";
|
|
329
|
+
exactlyOne: "exactlyOne";
|
|
330
|
+
allOrNone: "allOrNone";
|
|
331
|
+
}>;
|
|
332
|
+
export declare const RelateRuleSchema: z.ZodMiniObject<{
|
|
333
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
334
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
335
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
336
|
+
error: "error";
|
|
337
|
+
warning: "warning";
|
|
338
|
+
}>>;
|
|
339
|
+
$type: z.ZodMiniLiteral<"relate">;
|
|
340
|
+
fields: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
341
|
+
assert: z.ZodMiniEnum<{
|
|
342
|
+
allEqual: "allEqual";
|
|
343
|
+
allDifferent: "allDifferent";
|
|
344
|
+
ascending: "ascending";
|
|
345
|
+
strictlyAscending: "strictlyAscending";
|
|
346
|
+
descending: "descending";
|
|
347
|
+
strictlyDescending: "strictlyDescending";
|
|
348
|
+
atLeastOne: "atLeastOne";
|
|
349
|
+
exactlyOne: "exactlyOne";
|
|
350
|
+
allOrNone: "allOrNone";
|
|
351
|
+
}>;
|
|
352
|
+
includeSelf: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
353
|
+
as: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
354
|
+
string: "string";
|
|
355
|
+
number: "number";
|
|
356
|
+
boolean: "boolean";
|
|
357
|
+
date: "date";
|
|
358
|
+
auto: "auto";
|
|
359
|
+
}>>;
|
|
360
|
+
skipWhenIncomplete: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
361
|
+
}, z.core.$strip>;
|
|
362
|
+
export declare const ValidationRuleSchema: z.ZodMiniUnion<readonly [z.ZodMiniObject<{
|
|
363
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
364
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
365
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
366
|
+
error: "error";
|
|
367
|
+
warning: "warning";
|
|
368
|
+
}>>;
|
|
369
|
+
$type: z.ZodMiniLiteral<"required">;
|
|
370
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
371
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
372
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
373
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
374
|
+
error: "error";
|
|
375
|
+
warning: "warning";
|
|
376
|
+
}>>;
|
|
377
|
+
$type: z.ZodMiniLiteral<"minLength">;
|
|
378
|
+
value: z.ZodMiniNumber<number>;
|
|
379
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
380
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
381
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
382
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
383
|
+
error: "error";
|
|
384
|
+
warning: "warning";
|
|
385
|
+
}>>;
|
|
386
|
+
$type: z.ZodMiniLiteral<"maxLength">;
|
|
387
|
+
value: z.ZodMiniNumber<number>;
|
|
388
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
389
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
390
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
391
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
392
|
+
error: "error";
|
|
393
|
+
warning: "warning";
|
|
394
|
+
}>>;
|
|
395
|
+
$type: z.ZodMiniLiteral<"min">;
|
|
396
|
+
value: z.ZodMiniNumber<number>;
|
|
397
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
398
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
399
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
400
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
401
|
+
error: "error";
|
|
402
|
+
warning: "warning";
|
|
403
|
+
}>>;
|
|
404
|
+
$type: z.ZodMiniLiteral<"max">;
|
|
405
|
+
value: z.ZodMiniNumber<number>;
|
|
406
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
407
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
408
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
409
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
410
|
+
error: "error";
|
|
411
|
+
warning: "warning";
|
|
412
|
+
}>>;
|
|
413
|
+
$type: z.ZodMiniLiteral<"minItems">;
|
|
414
|
+
value: z.ZodMiniNumber<number>;
|
|
415
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
416
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
417
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
418
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
419
|
+
error: "error";
|
|
420
|
+
warning: "warning";
|
|
421
|
+
}>>;
|
|
422
|
+
$type: z.ZodMiniLiteral<"maxItems">;
|
|
423
|
+
value: z.ZodMiniNumber<number>;
|
|
424
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
425
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
426
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
427
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
428
|
+
error: "error";
|
|
429
|
+
warning: "warning";
|
|
430
|
+
}>>;
|
|
431
|
+
$type: z.ZodMiniLiteral<"email">;
|
|
432
|
+
pattern: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
433
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
434
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
435
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
436
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
437
|
+
error: "error";
|
|
438
|
+
warning: "warning";
|
|
439
|
+
}>>;
|
|
440
|
+
$type: z.ZodMiniLiteral<"phone">;
|
|
441
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
442
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
443
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
444
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
445
|
+
error: "error";
|
|
446
|
+
warning: "warning";
|
|
447
|
+
}>>;
|
|
448
|
+
$type: z.ZodMiniLiteral<"pattern">;
|
|
449
|
+
value: z.ZodMiniString<string>;
|
|
450
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
451
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
452
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
453
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
454
|
+
error: "error";
|
|
455
|
+
warning: "warning";
|
|
456
|
+
}>>;
|
|
457
|
+
$type: z.ZodMiniLiteral<"url">;
|
|
458
|
+
protocol: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
459
|
+
hostname: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
460
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
461
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
462
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
463
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
464
|
+
error: "error";
|
|
465
|
+
warning: "warning";
|
|
466
|
+
}>>;
|
|
467
|
+
$type: z.ZodMiniLiteral<"uuid">;
|
|
468
|
+
version: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
469
|
+
v1: "v1";
|
|
470
|
+
v2: "v2";
|
|
471
|
+
v3: "v3";
|
|
472
|
+
v4: "v4";
|
|
473
|
+
v5: "v5";
|
|
474
|
+
}>>;
|
|
475
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
476
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
477
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
478
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
479
|
+
error: "error";
|
|
480
|
+
warning: "warning";
|
|
481
|
+
}>>;
|
|
482
|
+
$type: z.ZodMiniLiteral<"datetime">;
|
|
483
|
+
precision: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
484
|
+
offset: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
485
|
+
local: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
486
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
487
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
488
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
489
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
490
|
+
error: "error";
|
|
491
|
+
warning: "warning";
|
|
492
|
+
}>>;
|
|
493
|
+
$type: z.ZodMiniLiteral<"date">;
|
|
494
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
495
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
496
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
497
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
498
|
+
error: "error";
|
|
499
|
+
warning: "warning";
|
|
500
|
+
}>>;
|
|
501
|
+
$type: z.ZodMiniLiteral<"time">;
|
|
502
|
+
precision: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
503
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
504
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
505
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
506
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
507
|
+
error: "error";
|
|
508
|
+
warning: "warning";
|
|
509
|
+
}>>;
|
|
510
|
+
$type: z.ZodMiniLiteral<"ipv4">;
|
|
511
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
512
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
513
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
514
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
515
|
+
error: "error";
|
|
516
|
+
warning: "warning";
|
|
517
|
+
}>>;
|
|
518
|
+
$type: z.ZodMiniLiteral<"ipv6">;
|
|
519
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
520
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
521
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
522
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
523
|
+
error: "error";
|
|
524
|
+
warning: "warning";
|
|
525
|
+
}>>;
|
|
526
|
+
$type: z.ZodMiniLiteral<"cidr">;
|
|
527
|
+
version: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
528
|
+
v4: "v4";
|
|
529
|
+
v6: "v6";
|
|
530
|
+
}>>;
|
|
531
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
532
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
533
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
534
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
535
|
+
error: "error";
|
|
536
|
+
warning: "warning";
|
|
537
|
+
}>>;
|
|
538
|
+
$type: z.ZodMiniLiteral<"jwt">;
|
|
539
|
+
alg: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
540
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
541
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
542
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
543
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
544
|
+
error: "error";
|
|
545
|
+
warning: "warning";
|
|
546
|
+
}>>;
|
|
547
|
+
$type: z.ZodMiniLiteral<"hash">;
|
|
548
|
+
algorithm: z.ZodMiniEnum<{
|
|
549
|
+
md5: "md5";
|
|
550
|
+
sha1: "sha1";
|
|
551
|
+
sha256: "sha256";
|
|
552
|
+
sha384: "sha384";
|
|
553
|
+
sha512: "sha512";
|
|
554
|
+
}>;
|
|
555
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
556
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
557
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
558
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
559
|
+
error: "error";
|
|
560
|
+
warning: "warning";
|
|
561
|
+
}>>;
|
|
562
|
+
$type: z.ZodMiniLiteral<"base64">;
|
|
563
|
+
urlSafe: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
564
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
565
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
566
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
567
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
568
|
+
error: "error";
|
|
569
|
+
warning: "warning";
|
|
570
|
+
}>>;
|
|
571
|
+
$type: z.ZodMiniLiteral<"cuid">;
|
|
572
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
573
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
574
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
575
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
576
|
+
error: "error";
|
|
577
|
+
warning: "warning";
|
|
578
|
+
}>>;
|
|
579
|
+
$type: z.ZodMiniLiteral<"cuid2">;
|
|
580
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
581
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
582
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
583
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
584
|
+
error: "error";
|
|
585
|
+
warning: "warning";
|
|
586
|
+
}>>;
|
|
587
|
+
$type: z.ZodMiniLiteral<"ulid">;
|
|
588
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
589
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
590
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
591
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
592
|
+
error: "error";
|
|
593
|
+
warning: "warning";
|
|
594
|
+
}>>;
|
|
595
|
+
$type: z.ZodMiniLiteral<"hex">;
|
|
596
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
597
|
+
dependencies: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
598
|
+
debounce: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
599
|
+
cacheTTL: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
600
|
+
disableCache: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
601
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
602
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
603
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
604
|
+
error: "error";
|
|
605
|
+
warning: "warning";
|
|
606
|
+
}>>;
|
|
607
|
+
$type: z.ZodMiniLiteral<"async">;
|
|
608
|
+
url: z.ZodMiniString<string>;
|
|
609
|
+
method: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
610
|
+
POST: "POST";
|
|
611
|
+
PUT: "PUT";
|
|
612
|
+
PATCH: "PATCH";
|
|
613
|
+
DELETE: "DELETE";
|
|
614
|
+
GET: "GET";
|
|
615
|
+
}>>;
|
|
616
|
+
headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniString<string>>>;
|
|
617
|
+
extraPayload: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>>;
|
|
618
|
+
expectedResponse: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
619
|
+
valid: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
620
|
+
success: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
621
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
622
|
+
error: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
623
|
+
}, z.core.$strip>>;
|
|
624
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
625
|
+
message: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
626
|
+
id: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
627
|
+
severity: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
628
|
+
error: "error";
|
|
629
|
+
warning: "warning";
|
|
630
|
+
}>>;
|
|
631
|
+
$type: z.ZodMiniLiteral<"relate">;
|
|
632
|
+
fields: z.ZodMiniArray<z.ZodMiniString<string>>;
|
|
633
|
+
assert: z.ZodMiniEnum<{
|
|
634
|
+
allEqual: "allEqual";
|
|
635
|
+
allDifferent: "allDifferent";
|
|
636
|
+
ascending: "ascending";
|
|
637
|
+
strictlyAscending: "strictlyAscending";
|
|
638
|
+
descending: "descending";
|
|
639
|
+
strictlyDescending: "strictlyDescending";
|
|
640
|
+
atLeastOne: "atLeastOne";
|
|
641
|
+
exactlyOne: "exactlyOne";
|
|
642
|
+
allOrNone: "allOrNone";
|
|
643
|
+
}>;
|
|
644
|
+
includeSelf: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
645
|
+
as: z.ZodMiniDefault<z.ZodMiniEnum<{
|
|
646
|
+
string: "string";
|
|
647
|
+
number: "number";
|
|
648
|
+
boolean: "boolean";
|
|
649
|
+
date: "date";
|
|
650
|
+
auto: "auto";
|
|
651
|
+
}>>;
|
|
652
|
+
skipWhenIncomplete: z.ZodMiniDefault<z.ZodMiniBoolean<boolean>>;
|
|
653
|
+
}, z.core.$strip>]>;
|
|
654
|
+
export type BaseValidationRule = z.infer<typeof BaseValidationRuleSchema>;
|
|
655
|
+
export type RequiredRule = z.infer<typeof RequiredRuleSchema>;
|
|
656
|
+
export type MinLengthRule = z.infer<typeof MinLengthRuleSchema>;
|
|
657
|
+
export type MaxLengthRule = z.infer<typeof MaxLengthRuleSchema>;
|
|
658
|
+
export type MinRule = z.infer<typeof MinRuleSchema>;
|
|
659
|
+
export type MaxRule = z.infer<typeof MaxRuleSchema>;
|
|
660
|
+
export type MinItemsRule = z.infer<typeof MinItemsRuleSchema>;
|
|
661
|
+
export type MaxItemsRule = z.infer<typeof MaxItemsRuleSchema>;
|
|
662
|
+
export type EmailRule = z.infer<typeof EmailRuleSchema>;
|
|
663
|
+
export type PhoneRule = z.infer<typeof PhoneRuleSchema>;
|
|
664
|
+
export type PatternRule = z.infer<typeof PatternRuleSchema>;
|
|
665
|
+
export type UrlRule = z.infer<typeof UrlRuleSchema>;
|
|
666
|
+
export type UuidRule = z.infer<typeof UuidRuleSchema>;
|
|
667
|
+
export type DateTimeRule = z.infer<typeof DateTimeRuleSchema>;
|
|
668
|
+
export type DateRule = z.infer<typeof DateRuleSchema>;
|
|
669
|
+
export type TimeRule = z.infer<typeof TimeRuleSchema>;
|
|
670
|
+
export type Ipv4Rule = z.infer<typeof Ipv4RuleSchema>;
|
|
671
|
+
export type Ipv6Rule = z.infer<typeof Ipv6RuleSchema>;
|
|
672
|
+
export type CidrRule = z.infer<typeof CidrRuleSchema>;
|
|
673
|
+
export type JwtRule = z.infer<typeof JwtRuleSchema>;
|
|
674
|
+
export type HashRule = z.infer<typeof HashRuleSchema>;
|
|
675
|
+
export type Base64Rule = z.infer<typeof Base64RuleSchema>;
|
|
676
|
+
export type CuidRule = z.infer<typeof CuidRuleSchema>;
|
|
677
|
+
export type Cuid2Rule = z.infer<typeof Cuid2RuleSchema>;
|
|
678
|
+
export type UlidRule = z.infer<typeof UlidRuleSchema>;
|
|
679
|
+
export type HexRule = z.infer<typeof HexRuleSchema>;
|
|
680
|
+
export type AsyncRule = z.infer<typeof AsyncRuleSchema>;
|
|
681
|
+
export type RelationAssert = z.infer<typeof RelationAssertSchema>;
|
|
682
|
+
export type RelateRule = z.infer<typeof RelateRuleSchema>;
|
|
683
|
+
export type ValidationRule = z.infer<typeof ValidationRuleSchema>;
|
|
684
|
+
/**
|
|
685
|
+
* Everything a validation handler may read beyond the value under test.
|
|
686
|
+
*
|
|
687
|
+
* @remarks
|
|
688
|
+
* `fieldPath` is the field's *rendered* path (`contacts.0.email`), not the
|
|
689
|
+
* authored template, which is what lets a rule address a sibling inside its own
|
|
690
|
+
* array row. Prefer {@link ValidationContext.resolve} over reading
|
|
691
|
+
* {@link ValidationContext.values} directly: it applies that scoping, and it is
|
|
692
|
+
* the same resolution constraints use, so one authored name cannot mean two
|
|
693
|
+
* different fields.
|
|
694
|
+
*/
|
|
695
|
+
export interface ValidationContext {
|
|
696
|
+
/** Nested value tree for the whole form. */
|
|
697
|
+
readonly values: Record<string, unknown>;
|
|
698
|
+
/** Rendered path of the field being validated, e.g. `contacts.0.email`. */
|
|
699
|
+
readonly fieldPath: string;
|
|
700
|
+
/**
|
|
701
|
+
* Reads another field relative to this one: a bare name is a sibling, a
|
|
702
|
+
* dotted name is absolute from the form root.
|
|
703
|
+
*/
|
|
704
|
+
readonly resolve: (fieldRef: string) => unknown;
|
|
705
|
+
/** Debounced work shared by parses that receive this scope. */
|
|
706
|
+
readonly debounceScope: DebounceScope;
|
|
707
|
+
/** Makes the requests of a rule: the engine's `fetch`, with its CSRF policy applied. The registry sets it, and it is the only way to set it. */
|
|
708
|
+
readonly fetch: FormFetch;
|
|
709
|
+
}
|
|
710
|
+
/** What a caller of `createSchema` gives: a {@link ValidationContext} without `fetch`, which the registry supplies. */
|
|
711
|
+
export type ValidationScope = Omit<ValidationContext, 'fetch'>;
|
|
712
|
+
/**
|
|
713
|
+
* Validation rule registration: the shared registration shape plus the handler that builds the rule's schema.
|
|
714
|
+
*
|
|
715
|
+
* @remarks
|
|
716
|
+
* `$type` is the `$type` authors write in a field's `rules`, so a registration with
|
|
717
|
+
* `$type: 'postcode'` handles `{ $type: 'postcode' }`; `schema` describes the rule objects.
|
|
718
|
+
*
|
|
719
|
+
* @template TRule - Specific rule type for type-safe handler
|
|
720
|
+
*/
|
|
721
|
+
export interface ValidationRegistration<TRule extends {
|
|
722
|
+
$type: string;
|
|
723
|
+
} = {
|
|
724
|
+
$type: string;
|
|
725
|
+
} & Record<string, unknown>> extends BaseRegistration<TRule, RegistrationMetadata> {
|
|
726
|
+
$type: TRule['$type'];
|
|
727
|
+
category: 'string' | 'number' | 'array' | 'boolean' | 'date' | 'generic' | 'cross-field';
|
|
728
|
+
/**
|
|
729
|
+
* Validation handler function
|
|
730
|
+
* @param rule - The validation rule configuration (typed to specific rule type)
|
|
731
|
+
* @param context - The form context, for rules that read fields other than the one under test
|
|
732
|
+
* @returns Zod Mini schema for validation
|
|
733
|
+
*/
|
|
734
|
+
handler: (rule: TRule, context: ValidationContext) => z.ZodMiniType;
|
|
735
|
+
/**
|
|
736
|
+
* Field references this rule reads besides the value under test.
|
|
737
|
+
*
|
|
738
|
+
* @remarks
|
|
739
|
+
* Renderers re-validate the declaring field when any of these change. Returned
|
|
740
|
+
* as authored references; the caller resolves them against the field's path,
|
|
741
|
+
* so a rule inside an array row watches that row.
|
|
742
|
+
*/
|
|
743
|
+
dependsOn?: (rule: TRule) => readonly string[];
|
|
744
|
+
/**
|
|
745
|
+
* The options of this rule that a message can be built from, named like the native constraint they match.
|
|
746
|
+
*
|
|
747
|
+
* @remarks
|
|
748
|
+
* They reach every issue the rule reports, and so a snapshot, an action context and a formatter: a
|
|
749
|
+
* registration decides what it shows. `minLength` returns `{ minLength: 8 }`, as the native
|
|
750
|
+
* `ValidityState` constraint is named, and a rule whose options are configuration (`async`'s url and
|
|
751
|
+
* headers, `relate`'s field list) returns nothing. Values must be serializable.
|
|
752
|
+
*/
|
|
753
|
+
params?: (rule: TRule) => Readonly<Record<string, unknown>> | undefined;
|
|
754
|
+
/**
|
|
755
|
+
* The fallback text of an issue this rule reports, given the text its schema reported.
|
|
756
|
+
*
|
|
757
|
+
* @remarks
|
|
758
|
+
* By default the text is the author's own `message` on the rule. Text a registration makes up is the
|
|
759
|
+
* application's language and belongs above the engine, as does the schema library's generic text, so a
|
|
760
|
+
* registration reports a `type` and `params` and never default English. Return `reported` only for text
|
|
761
|
+
* that genuinely comes from outside the engine, such as the message an `async` rule's endpoint answers with.
|
|
762
|
+
*/
|
|
763
|
+
message?: (rule: TRule, reported: string | undefined) => string | undefined;
|
|
764
|
+
/**
|
|
765
|
+
* Field `$type` values that receive this rule when the author omitted it.
|
|
766
|
+
*
|
|
767
|
+
* @remarks Lets an integration attach a rule (for example `phone` on
|
|
768
|
+
* `phone-input`) without putting that field type or its library into the
|
|
769
|
+
* forms package.
|
|
770
|
+
*/
|
|
771
|
+
defaultFor?: readonly string[];
|
|
772
|
+
}
|
|
773
|
+
/**
|
|
774
|
+
* Union of all possible validation registrations based on ValidationRule union.
|
|
775
|
+
* This allows heterogeneous arrays (like defaultValidations) to be typed without 'any'.
|
|
776
|
+
*/
|
|
777
|
+
export type AnyValidationRegistration = (ValidationRule extends infer T ? (T extends ValidationRule ? ValidationRegistration<T> : never) : never) | ValidationRegistration;
|
|
778
|
+
/**
|
|
779
|
+
* A validation registration as `createFormEngine({ validations })`, an element's `validations` and the
|
|
780
|
+
* registry factories accept it.
|
|
781
|
+
*
|
|
782
|
+
* @remarks
|
|
783
|
+
* `handler` and `dependsOn` take `never`, so a registration typed for one rule shape, such as
|
|
784
|
+
* `ValidationRegistration<PostcodeRule>`, is accepted without widening its rule type. `handler` still
|
|
785
|
+
* has to return a Zod Mini schema: a handler that returns anything else does not compile.
|
|
786
|
+
*/
|
|
787
|
+
export type ValidationRegistrationConstraint = {
|
|
788
|
+
readonly $type: string;
|
|
789
|
+
readonly schema: {
|
|
790
|
+
readonly '~standard': {
|
|
791
|
+
readonly validate: (value: unknown) => unknown;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
readonly metadata: {
|
|
795
|
+
readonly name: string;
|
|
796
|
+
};
|
|
797
|
+
readonly category: ValidationRegistration['category'];
|
|
798
|
+
readonly handler: (rule: never, context: ValidationContext) => z.ZodMiniType;
|
|
799
|
+
readonly dependsOn?: (rule: never) => readonly string[];
|
|
800
|
+
readonly params?: (rule: never) => Readonly<Record<string, unknown>> | undefined;
|
|
801
|
+
readonly message?: (rule: never, reported: string | undefined) => string | undefined;
|
|
802
|
+
readonly defaultFor?: readonly string[];
|
|
803
|
+
};
|
|
804
|
+
/**
|
|
805
|
+
* Mapping of validation rule types to their specific rule interfaces.
|
|
806
|
+
*/
|
|
807
|
+
export type ValidationTypeMap = {
|
|
808
|
+
[K in ValidationRule['$type']]: Extract<ValidationRule, {
|
|
809
|
+
$type: K;
|
|
810
|
+
}>;
|
|
811
|
+
};
|
|
812
|
+
/**
|
|
813
|
+
* Mapping of validation rule types to their specific registrations.
|
|
814
|
+
*/
|
|
815
|
+
export type ValidationRegistrationMap = {
|
|
816
|
+
[K in ValidationRule['$type']]: ValidationRegistration<ValidationTypeMap[K]>;
|
|
817
|
+
};
|