zod 3.26.0-canary.20250619T152955 → 3.26.0-canary.20250702T074442
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/README.md +2 -2
- package/{dist/cjs/v3/index.js → index.cjs} +2 -2
- package/index.d.cts +4 -0
- package/index.d.ts +4 -0
- package/index.js +4 -0
- package/package.json +63 -80
- package/{dist/cjs/v3/ZodError.js → v3/ZodError.cjs} +4 -3
- package/v3/ZodError.d.cts +164 -0
- package/{dist/esm/v3 → v3}/ZodError.js +3 -2
- package/{dist/cjs/v3/errors.js → v3/errors.cjs} +1 -1
- package/v3/errors.d.cts +5 -0
- package/{dist/cjs/v3/external.js → v3/external.cjs} +6 -6
- package/v3/external.d.cts +6 -0
- package/v3/helpers/enumUtil.d.ts +8 -0
- package/v3/helpers/errorUtil.d.ts +9 -0
- package/{dist/cjs/v3/helpers/parseUtil.js → v3/helpers/parseUtil.cjs} +2 -2
- package/v3/helpers/parseUtil.d.cts +78 -0
- package/v3/helpers/partialUtil.d.cts +8 -0
- package/v3/helpers/typeAliases.d.ts +2 -0
- package/v3/helpers/util.d.ts +85 -0
- package/{dist/cjs/v4/classic/index.js → v3/index.cjs} +2 -2
- package/v3/index.d.cts +4 -0
- package/v3/index.d.ts +3 -2
- package/v3/index.js +4 -1
- package/{dist/cjs/v3/locales/en.js → v3/locales/en.cjs} +2 -2
- package/v3/locales/en.d.cts +3 -0
- package/v3/standard-schema.d.ts +102 -0
- package/{dist/cjs/v3/types.js → v3/types.cjs} +7 -5
- package/v3/types.d.cts +1031 -0
- package/{dist/esm/v3 → v3}/types.js +2 -0
- package/{dist/cjs/v4/classic/checks.js → v4/classic/checks.cjs} +29 -29
- package/v4/classic/checks.d.cts +1 -0
- package/{dist/types/v4 → v4}/classic/checks.d.ts +1 -1
- package/{dist/esm/v4 → v4}/classic/checks.js +1 -1
- package/{dist/cjs/v4/classic/coerce.js → v4/classic/coerce.cjs} +2 -2
- package/v4/classic/coerce.d.cts +17 -0
- package/{dist/types/v4 → v4}/classic/coerce.d.ts +1 -1
- package/{dist/esm/v4 → v4}/classic/coerce.js +1 -1
- package/{dist/cjs/v4/classic/compat.js → v4/classic/compat.cjs} +4 -4
- package/v4/classic/compat.d.cts +48 -0
- package/{dist/types/v4 → v4}/classic/compat.d.ts +3 -3
- package/{dist/esm/v4 → v4}/classic/compat.js +2 -2
- package/{dist/cjs/v4/classic/errors.js → v4/classic/errors.cjs} +3 -3
- package/v4/classic/errors.d.cts +30 -0
- package/{dist/types/v4 → v4}/classic/errors.d.ts +3 -3
- package/{dist/esm/v4 → v4}/classic/errors.js +2 -2
- package/{dist/cjs/v4/classic/external.js → v4/classic/external.cjs} +29 -29
- package/v4/classic/external.d.cts +13 -0
- package/{dist/types/v4 → v4}/classic/external.d.ts +3 -3
- package/{dist/esm/v4 → v4}/classic/external.js +4 -4
- package/v4/classic/index.cjs +33 -0
- package/v4/classic/index.d.cts +4 -0
- package/{dist/cjs/v4/classic/iso.js → v4/classic/iso.cjs} +2 -2
- package/v4/classic/iso.d.cts +22 -0
- package/{dist/types/v4 → v4}/classic/iso.d.ts +1 -1
- package/{dist/esm/v4 → v4}/classic/iso.js +1 -1
- package/{dist/cjs/v4/classic/parse.js → v4/classic/parse.cjs} +2 -2
- package/v4/classic/parse.d.cts +23 -0
- package/{dist/types/v4 → v4}/classic/parse.d.ts +1 -1
- package/{dist/esm/v4 → v4}/classic/parse.js +1 -1
- package/{dist/cjs/v4/classic/schemas.js → v4/classic/schemas.cjs} +38 -38
- package/v4/classic/schemas.d.cts +629 -0
- package/{dist/types/v4 → v4}/classic/schemas.d.ts +2 -2
- package/{dist/esm/v4 → v4}/classic/schemas.js +2 -2
- package/{dist/cjs/v4/core/api.js → v4/core/api.cjs} +3 -3
- package/v4/core/api.d.cts +284 -0
- package/{dist/cjs/v4/core/checks.js → v4/core/checks.cjs} +3 -3
- package/v4/core/checks.d.cts +277 -0
- package/v4/core/core.d.cts +47 -0
- package/v4/core/doc.d.ts +14 -0
- package/{dist/cjs/v4/core/errors.js → v4/core/errors.cjs} +2 -2
- package/v4/core/errors.d.cts +204 -0
- package/{dist/cjs/v4/core/function.js → v4/core/function.cjs} +4 -4
- package/v4/core/function.d.cts +52 -0
- package/{dist/cjs/v4/core/index.js → v4/core/index.cjs} +15 -15
- package/v4/core/index.d.cts +15 -0
- package/v4/core/index.d.ts +15 -1
- package/v4/core/index.js +15 -1
- package/v4/core/json-schema.d.ts +87 -0
- package/{dist/cjs/v4/core/parse.js → v4/core/parse.cjs} +3 -3
- package/v4/core/parse.d.cts +25 -0
- package/v4/core/regexes.d.ts +62 -0
- package/v4/core/registries.d.cts +34 -0
- package/{dist/cjs/v4/core/schemas.js → v4/core/schemas.cjs} +10 -10
- package/v4/core/schemas.d.cts +1015 -0
- package/{dist/esm/v4 → v4}/core/schemas.js +2 -2
- package/v4/core/standard-schema.d.ts +55 -0
- package/{dist/cjs/v4/core/to-json-schema.js → v4/core/to-json-schema.cjs} +2 -2
- package/v4/core/to-json-schema.d.cts +84 -0
- package/{dist/cjs/v4/core/util.js → v4/core/util.cjs} +1 -4
- package/v4/core/util.d.cts +183 -0
- package/{dist/esm/v4 → v4}/core/util.js +1 -4
- package/v4/core/versions.d.ts +5 -0
- package/{dist/cjs/index.js → v4/index.cjs} +2 -2
- package/v4/index.d.cts +3 -0
- package/v4/index.d.ts +3 -3
- package/v4/index.js +3 -1
- package/{dist/cjs/v4/locales/ar.js → v4/locales/ar.cjs} +1 -1
- package/v4/locales/ar.d.cts +4 -0
- package/{dist/cjs/v4/locales/az.js → v4/locales/az.cjs} +1 -1
- package/v4/locales/az.d.cts +4 -0
- package/{dist/cjs/v4/locales/be.js → v4/locales/be.cjs} +1 -1
- package/v4/locales/be.d.cts +4 -0
- package/{dist/cjs/v4/locales/ca.js → v4/locales/ca.cjs} +1 -1
- package/v4/locales/ca.d.cts +4 -0
- package/{dist/cjs/v4/locales/cs.js → v4/locales/cs.cjs} +1 -1
- package/v4/locales/cs.d.cts +4 -0
- package/{dist/cjs/v4/locales/de.js → v4/locales/de.cjs} +1 -1
- package/v4/locales/de.d.cts +4 -0
- package/{dist/cjs/v4/locales/en.js → v4/locales/en.cjs} +1 -1
- package/{dist/types/v4/locales/en.d.ts → v4/locales/en.d.cts} +1 -1
- package/v4/locales/en.d.ts +5 -2
- package/v4/locales/en.js +117 -2
- package/{dist/cjs/v4/locales/es.js → v4/locales/es.cjs} +1 -1
- package/v4/locales/es.d.cts +4 -0
- package/{dist/cjs/v4/locales/fa.js → v4/locales/fa.cjs} +1 -1
- package/v4/locales/fa.d.cts +4 -0
- package/{dist/cjs/v4/locales/fi.js → v4/locales/fi.cjs} +1 -1
- package/v4/locales/fi.d.cts +4 -0
- package/{dist/cjs/v4/locales/fr-CA.js → v4/locales/fr-CA.cjs} +1 -1
- package/v4/locales/fr-CA.d.cts +4 -0
- package/{dist/cjs/v4/locales/fr.js → v4/locales/fr.cjs} +1 -1
- package/v4/locales/fr.d.cts +4 -0
- package/{dist/cjs/v4/locales/he.js → v4/locales/he.cjs} +1 -1
- package/v4/locales/he.d.cts +4 -0
- package/{dist/cjs/v4/locales/hu.js → v4/locales/hu.cjs} +1 -1
- package/v4/locales/hu.d.cts +4 -0
- package/{dist/cjs/v4/locales/id.js → v4/locales/id.cjs} +1 -1
- package/v4/locales/id.d.cts +4 -0
- package/{dist/cjs/v4/locales/index.js → v4/locales/index.cjs} +38 -38
- package/v4/locales/index.d.cts +38 -0
- package/v4/locales/index.d.ts +38 -1
- package/v4/locales/index.js +38 -1
- package/{dist/cjs/v4/locales/it.js → v4/locales/it.cjs} +1 -1
- package/v4/locales/it.d.cts +4 -0
- package/{dist/cjs/v4/locales/ja.js → v4/locales/ja.cjs} +1 -1
- package/v4/locales/ja.d.cts +4 -0
- package/{dist/cjs/v4/locales/kh.js → v4/locales/kh.cjs} +1 -1
- package/v4/locales/kh.d.cts +4 -0
- package/{dist/cjs/v4/locales/ko.js → v4/locales/ko.cjs} +1 -1
- package/v4/locales/ko.d.cts +4 -0
- package/{dist/cjs/v4/locales/mk.js → v4/locales/mk.cjs} +1 -1
- package/v4/locales/mk.d.cts +4 -0
- package/{dist/cjs/v4/locales/ms.js → v4/locales/ms.cjs} +1 -1
- package/v4/locales/ms.d.cts +4 -0
- package/{dist/cjs/v4/locales/nl.js → v4/locales/nl.cjs} +1 -1
- package/v4/locales/nl.d.cts +4 -0
- package/{dist/cjs/v4/locales/no.js → v4/locales/no.cjs} +1 -1
- package/v4/locales/no.d.cts +4 -0
- package/{dist/cjs/v4/locales/ota.js → v4/locales/ota.cjs} +1 -1
- package/v4/locales/ota.d.cts +4 -0
- package/{dist/cjs/v4/locales/pl.js → v4/locales/pl.cjs} +1 -1
- package/v4/locales/pl.d.cts +4 -0
- package/{dist/cjs/v4/locales/ps.js → v4/locales/ps.cjs} +1 -1
- package/v4/locales/ps.d.cts +4 -0
- package/{dist/cjs/v4/locales/pt.js → v4/locales/pt.cjs} +1 -1
- package/v4/locales/pt.d.cts +4 -0
- package/{dist/cjs/v4/locales/ru.js → v4/locales/ru.cjs} +1 -1
- package/v4/locales/ru.d.cts +4 -0
- package/{dist/cjs/v4/locales/sl.js → v4/locales/sl.cjs} +1 -1
- package/v4/locales/sl.d.cts +4 -0
- package/{dist/cjs/v4/locales/sv.js → v4/locales/sv.cjs} +1 -1
- package/v4/locales/sv.d.cts +4 -0
- package/{dist/cjs/v4/locales/ta.js → v4/locales/ta.cjs} +1 -1
- package/v4/locales/ta.d.cts +4 -0
- package/{dist/cjs/v4/locales/th.js → v4/locales/th.cjs} +1 -1
- package/v4/locales/th.d.cts +4 -0
- package/{dist/cjs/v4/locales/tr.js → v4/locales/tr.cjs} +1 -1
- package/v4/locales/tr.d.cts +5 -0
- package/{dist/cjs/v4/locales/ua.js → v4/locales/ua.cjs} +1 -1
- package/v4/locales/ua.d.cts +4 -0
- package/{dist/cjs/v4/locales/ur.js → v4/locales/ur.cjs} +1 -1
- package/v4/locales/ur.d.cts +4 -0
- package/{dist/cjs/v4/locales/vi.js → v4/locales/vi.cjs} +1 -1
- package/v4/locales/vi.d.cts +4 -0
- package/{dist/cjs/v4/locales/zh-CN.js → v4/locales/zh-CN.cjs} +1 -1
- package/v4/locales/zh-CN.d.cts +4 -0
- package/{dist/cjs/v4/locales/zh-TW.js → v4/locales/zh-TW.cjs} +1 -1
- package/v4/locales/zh-TW.d.cts +4 -0
- package/{dist/cjs/v4/mini/checks.js → v4/mini/checks.cjs} +31 -31
- package/v4/mini/checks.d.cts +1 -0
- package/{dist/types/v4 → v4}/mini/checks.d.ts +1 -1
- package/{dist/esm/v4 → v4}/mini/checks.js +1 -1
- package/{dist/cjs/v4/mini/coerce.js → v4/mini/coerce.cjs} +2 -2
- package/v4/mini/coerce.d.cts +7 -0
- package/{dist/types/v4 → v4}/mini/coerce.d.ts +1 -1
- package/{dist/esm/v4 → v4}/mini/coerce.js +1 -1
- package/{dist/cjs/v4/mini/external.js → v4/mini/external.cjs} +24 -24
- package/v4/mini/external.d.cts +11 -0
- package/{dist/types/v4 → v4}/mini/external.d.ts +3 -3
- package/{dist/esm/v4 → v4}/mini/external.js +2 -2
- package/{dist/cjs/v4/mini/index.js → v4/mini/index.cjs} +2 -2
- package/v4/mini/index.d.cts +3 -0
- package/{dist/cjs/v4/mini/iso.js → v4/mini/iso.cjs} +2 -2
- package/v4/mini/iso.d.cts +22 -0
- package/{dist/types/v4 → v4}/mini/iso.d.ts +1 -1
- package/{dist/esm/v4 → v4}/mini/iso.js +1 -1
- package/{dist/cjs/v4/mini/parse.js → v4/mini/parse.cjs} +5 -5
- package/v4/mini/parse.d.cts +1 -0
- package/v4/mini/parse.d.ts +1 -0
- package/v4/mini/parse.js +1 -0
- package/{dist/cjs/v4/mini/schemas.js → v4/mini/schemas.cjs} +30 -30
- package/v4/mini/schemas.d.cts +356 -0
- package/{dist/types/v4 → v4}/mini/schemas.d.ts +2 -2
- package/{dist/esm/v4 → v4}/mini/schemas.js +2 -2
- package/{dist/cjs/v4/index.js → v4-mini/index.cjs} +1 -6
- package/v4-mini/index.d.cts +1 -0
- package/v4-mini/index.d.ts +1 -1
- package/v4-mini/index.js +1 -1
- package/dist/cjs/package.json +0 -3
- package/dist/cjs/v3/benchmarks/datetime.js +0 -54
- package/dist/cjs/v3/benchmarks/discriminatedUnion.js +0 -79
- package/dist/cjs/v3/benchmarks/index.js +0 -59
- package/dist/cjs/v3/benchmarks/ipv4.js +0 -54
- package/dist/cjs/v3/benchmarks/object.js +0 -70
- package/dist/cjs/v3/benchmarks/primitives.js +0 -159
- package/dist/cjs/v3/benchmarks/realworld.js +0 -56
- package/dist/cjs/v3/benchmarks/string.js +0 -55
- package/dist/cjs/v3/benchmarks/union.js +0 -79
- package/dist/cjs/v3/tests/Mocker.js +0 -57
- package/dist/cjs/v4/core/config.js +0 -10
- package/dist/cjs/v4/core/zsf.js +0 -172
- package/dist/esm/index.js +0 -3
- package/dist/esm/package.json +0 -3
- package/dist/esm/v3/benchmarks/datetime.js +0 -49
- package/dist/esm/v3/benchmarks/discriminatedUnion.js +0 -74
- package/dist/esm/v3/benchmarks/index.js +0 -54
- package/dist/esm/v3/benchmarks/ipv4.js +0 -49
- package/dist/esm/v3/benchmarks/object.js +0 -65
- package/dist/esm/v3/benchmarks/primitives.js +0 -154
- package/dist/esm/v3/benchmarks/realworld.js +0 -51
- package/dist/esm/v3/benchmarks/string.js +0 -50
- package/dist/esm/v3/benchmarks/union.js +0 -74
- package/dist/esm/v3/index.js +0 -4
- package/dist/esm/v3/tests/Mocker.js +0 -53
- package/dist/esm/v4/core/config.js +0 -6
- package/dist/esm/v4/core/index.js +0 -15
- package/dist/esm/v4/core/zsf.js +0 -171
- package/dist/esm/v4/index.js +0 -3
- package/dist/esm/v4/locales/en.js +0 -117
- package/dist/esm/v4/locales/index.js +0 -38
- package/dist/esm/v4/mini/parse.js +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/package.json +0 -3
- package/dist/types/v3/benchmarks/datetime.d.ts +0 -5
- package/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
- package/dist/types/v3/benchmarks/index.d.ts +0 -1
- package/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
- package/dist/types/v3/benchmarks/object.d.ts +0 -5
- package/dist/types/v3/benchmarks/primitives.d.ts +0 -5
- package/dist/types/v3/benchmarks/realworld.d.ts +0 -5
- package/dist/types/v3/benchmarks/string.d.ts +0 -5
- package/dist/types/v3/benchmarks/union.d.ts +0 -5
- package/dist/types/v3/index.d.ts +0 -4
- package/dist/types/v3/tests/Mocker.d.ts +0 -17
- package/dist/types/v4/core/config.d.ts +0 -9
- package/dist/types/v4/core/index.d.ts +0 -15
- package/dist/types/v4/core/zsf.d.ts +0 -91
- package/dist/types/v4/index.d.ts +0 -3
- package/dist/types/v4/locales/index.d.ts +0 -38
- package/dist/types/v4/mini/parse.d.ts +0 -1
- /package/{dist/types/v3 → v3}/ZodError.d.ts +0 -0
- /package/{dist/types/v3 → v3}/errors.d.ts +0 -0
- /package/{dist/esm/v3 → v3}/errors.js +0 -0
- /package/{dist/types/v3 → v3}/external.d.ts +0 -0
- /package/{dist/esm/v3 → v3}/external.js +0 -0
- /package/{dist/cjs/v3/helpers/enumUtil.js → v3/helpers/enumUtil.cjs} +0 -0
- /package/{dist/types/v3/helpers/enumUtil.d.ts → v3/helpers/enumUtil.d.cts} +0 -0
- /package/{dist/esm/v3 → v3}/helpers/enumUtil.js +0 -0
- /package/{dist/cjs/v3/helpers/errorUtil.js → v3/helpers/errorUtil.cjs} +0 -0
- /package/{dist/types/v3/helpers/errorUtil.d.ts → v3/helpers/errorUtil.d.cts} +0 -0
- /package/{dist/esm/v3 → v3}/helpers/errorUtil.js +0 -0
- /package/{dist/types/v3 → v3}/helpers/parseUtil.d.ts +0 -0
- /package/{dist/esm/v3 → v3}/helpers/parseUtil.js +0 -0
- /package/{dist/cjs/v3/helpers/partialUtil.js → v3/helpers/partialUtil.cjs} +0 -0
- /package/{dist/types/v3 → v3}/helpers/partialUtil.d.ts +0 -0
- /package/{dist/esm/v3 → v3}/helpers/partialUtil.js +0 -0
- /package/{dist/cjs/v3/helpers/typeAliases.js → v3/helpers/typeAliases.cjs} +0 -0
- /package/{dist/types/v3/helpers/typeAliases.d.ts → v3/helpers/typeAliases.d.cts} +0 -0
- /package/{dist/esm/v3 → v3}/helpers/typeAliases.js +0 -0
- /package/{dist/cjs/v3/helpers/util.js → v3/helpers/util.cjs} +0 -0
- /package/{dist/types/v3/helpers/util.d.ts → v3/helpers/util.d.cts} +0 -0
- /package/{dist/esm/v3 → v3}/helpers/util.js +0 -0
- /package/{dist/types/v3 → v3}/locales/en.d.ts +0 -0
- /package/{dist/esm/v3 → v3}/locales/en.js +0 -0
- /package/{dist/cjs/v3/standard-schema.js → v3/standard-schema.cjs} +0 -0
- /package/{dist/types/v3/standard-schema.d.ts → v3/standard-schema.d.cts} +0 -0
- /package/{dist/esm/v3 → v3}/standard-schema.js +0 -0
- /package/{dist/types/v3 → v3}/types.d.ts +0 -0
- /package/{dist/types/v4 → v4}/classic/index.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/classic/index.js +0 -0
- /package/{dist/types/v4 → v4}/core/api.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/api.js +0 -0
- /package/{dist/types/v4 → v4}/core/checks.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/checks.js +0 -0
- /package/{dist/cjs/v4/core/core.js → v4/core/core.cjs} +0 -0
- /package/{dist/types/v4 → v4}/core/core.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/core.js +0 -0
- /package/{dist/cjs/v4/core/doc.js → v4/core/doc.cjs} +0 -0
- /package/{dist/types/v4/core/doc.d.ts → v4/core/doc.d.cts} +0 -0
- /package/{dist/esm/v4 → v4}/core/doc.js +0 -0
- /package/{dist/types/v4 → v4}/core/errors.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/errors.js +0 -0
- /package/{dist/types/v4 → v4}/core/function.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/function.js +0 -0
- /package/{dist/cjs/v4/core/json-schema.js → v4/core/json-schema.cjs} +0 -0
- /package/{dist/types/v4/core/json-schema.d.ts → v4/core/json-schema.d.cts} +0 -0
- /package/{dist/esm/v4 → v4}/core/json-schema.js +0 -0
- /package/{dist/types/v4 → v4}/core/parse.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/parse.js +0 -0
- /package/{dist/cjs/v4/core/regexes.js → v4/core/regexes.cjs} +0 -0
- /package/{dist/types/v4/core/regexes.d.ts → v4/core/regexes.d.cts} +0 -0
- /package/{dist/esm/v4 → v4}/core/regexes.js +0 -0
- /package/{dist/cjs/v4/core/registries.js → v4/core/registries.cjs} +0 -0
- /package/{dist/types/v4 → v4}/core/registries.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/registries.js +0 -0
- /package/{dist/types/v4 → v4}/core/schemas.d.ts +0 -0
- /package/{dist/cjs/v4/core/standard-schema.js → v4/core/standard-schema.cjs} +0 -0
- /package/{dist/types/v4/core/standard-schema.d.ts → v4/core/standard-schema.d.cts} +0 -0
- /package/{dist/esm/v4 → v4}/core/standard-schema.js +0 -0
- /package/{dist/types/v4 → v4}/core/to-json-schema.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/core/to-json-schema.js +0 -0
- /package/{dist/types/v4 → v4}/core/util.d.ts +0 -0
- /package/{dist/cjs/v4/core/versions.js → v4/core/versions.cjs} +0 -0
- /package/{dist/types/v4/core/versions.d.ts → v4/core/versions.d.cts} +0 -0
- /package/{dist/esm/v4 → v4}/core/versions.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ar.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ar.js +0 -0
- /package/{dist/types/v4 → v4}/locales/az.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/az.js +0 -0
- /package/{dist/types/v4 → v4}/locales/be.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/be.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ca.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ca.js +0 -0
- /package/{dist/types/v4 → v4}/locales/cs.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/cs.js +0 -0
- /package/{dist/types/v4 → v4}/locales/de.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/de.js +0 -0
- /package/{dist/types/v4 → v4}/locales/es.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/es.js +0 -0
- /package/{dist/types/v4 → v4}/locales/fa.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/fa.js +0 -0
- /package/{dist/types/v4 → v4}/locales/fi.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/fi.js +0 -0
- /package/{dist/types/v4 → v4}/locales/fr-CA.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/fr-CA.js +0 -0
- /package/{dist/types/v4 → v4}/locales/fr.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/fr.js +0 -0
- /package/{dist/types/v4 → v4}/locales/he.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/he.js +0 -0
- /package/{dist/types/v4 → v4}/locales/hu.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/hu.js +0 -0
- /package/{dist/types/v4 → v4}/locales/id.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/id.js +0 -0
- /package/{dist/types/v4 → v4}/locales/it.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/it.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ja.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ja.js +0 -0
- /package/{dist/types/v4 → v4}/locales/kh.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/kh.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ko.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ko.js +0 -0
- /package/{dist/types/v4 → v4}/locales/mk.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/mk.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ms.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ms.js +0 -0
- /package/{dist/types/v4 → v4}/locales/nl.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/nl.js +0 -0
- /package/{dist/types/v4 → v4}/locales/no.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/no.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ota.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ota.js +0 -0
- /package/{dist/types/v4 → v4}/locales/pl.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/pl.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ps.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ps.js +0 -0
- /package/{dist/types/v4 → v4}/locales/pt.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/pt.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ru.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ru.js +0 -0
- /package/{dist/types/v4 → v4}/locales/sl.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/sl.js +0 -0
- /package/{dist/types/v4 → v4}/locales/sv.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/sv.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ta.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ta.js +0 -0
- /package/{dist/types/v4 → v4}/locales/th.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/th.js +0 -0
- /package/{dist/types/v4 → v4}/locales/tr.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/tr.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ua.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ua.js +0 -0
- /package/{dist/types/v4 → v4}/locales/ur.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/ur.js +0 -0
- /package/{dist/types/v4 → v4}/locales/vi.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/vi.js +0 -0
- /package/{dist/types/v4 → v4}/locales/zh-CN.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/zh-CN.js +0 -0
- /package/{dist/types/v4 → v4}/locales/zh-TW.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/locales/zh-TW.js +0 -0
- /package/{dist/types/v4 → v4}/mini/index.d.ts +0 -0
- /package/{dist/esm/v4 → v4}/mini/index.js +0 -0
|
@@ -111,9 +111,9 @@ exports.custom = custom;
|
|
|
111
111
|
exports.refine = refine;
|
|
112
112
|
exports.instanceof = _instanceof;
|
|
113
113
|
exports.json = json;
|
|
114
|
-
const core = __importStar(require("
|
|
115
|
-
const
|
|
116
|
-
const parse = __importStar(require("./parse.
|
|
114
|
+
const core = __importStar(require("../core/index.cjs"));
|
|
115
|
+
const index_js_1 = require("../core/index.cjs");
|
|
116
|
+
const parse = __importStar(require("./parse.cjs"));
|
|
117
117
|
exports.ZodMiniType = core.$constructor("ZodMiniType", (inst, def) => {
|
|
118
118
|
if (!inst._zod)
|
|
119
119
|
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
@@ -424,7 +424,7 @@ function array(element, params) {
|
|
|
424
424
|
return new exports.ZodMiniArray({
|
|
425
425
|
type: "array",
|
|
426
426
|
element: element,
|
|
427
|
-
...
|
|
427
|
+
...index_js_1.util.normalizeParams(params),
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
430
|
// .keyof
|
|
@@ -435,16 +435,16 @@ function keyof(schema) {
|
|
|
435
435
|
exports.ZodMiniObject = core.$constructor("ZodMiniObject", (inst, def) => {
|
|
436
436
|
core.$ZodObject.init(inst, def);
|
|
437
437
|
exports.ZodMiniType.init(inst, def);
|
|
438
|
-
|
|
438
|
+
index_js_1.util.defineLazy(inst, "shape", () => def.shape);
|
|
439
439
|
});
|
|
440
440
|
function object(shape, params) {
|
|
441
441
|
const def = {
|
|
442
442
|
type: "object",
|
|
443
443
|
get shape() {
|
|
444
|
-
|
|
444
|
+
index_js_1.util.assignProp(this, "shape", { ...shape });
|
|
445
445
|
return this.shape;
|
|
446
446
|
},
|
|
447
|
-
...
|
|
447
|
+
...index_js_1.util.normalizeParams(params),
|
|
448
448
|
};
|
|
449
449
|
return new exports.ZodMiniObject(def);
|
|
450
450
|
}
|
|
@@ -454,11 +454,11 @@ function strictObject(shape, params) {
|
|
|
454
454
|
type: "object",
|
|
455
455
|
// shape: shape as core.$ZodLooseShape,
|
|
456
456
|
get shape() {
|
|
457
|
-
|
|
457
|
+
index_js_1.util.assignProp(this, "shape", { ...shape });
|
|
458
458
|
return this.shape;
|
|
459
459
|
},
|
|
460
460
|
catchall: never(),
|
|
461
|
-
...
|
|
461
|
+
...index_js_1.util.normalizeParams(params),
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
// looseObject
|
|
@@ -467,35 +467,35 @@ function looseObject(shape, params) {
|
|
|
467
467
|
type: "object",
|
|
468
468
|
// shape: shape as core.$ZodLooseShape,
|
|
469
469
|
get shape() {
|
|
470
|
-
|
|
470
|
+
index_js_1.util.assignProp(this, "shape", { ...shape });
|
|
471
471
|
return this.shape;
|
|
472
472
|
},
|
|
473
473
|
// get optional() {
|
|
474
474
|
// return util.optionalKeys(shape);
|
|
475
475
|
// },
|
|
476
476
|
catchall: unknown(),
|
|
477
|
-
...
|
|
477
|
+
...index_js_1.util.normalizeParams(params),
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
// object methods
|
|
481
481
|
function extend(schema, shape) {
|
|
482
|
-
return
|
|
482
|
+
return index_js_1.util.extend(schema, shape);
|
|
483
483
|
}
|
|
484
484
|
function merge(schema, shape) {
|
|
485
|
-
return
|
|
485
|
+
return index_js_1.util.extend(schema, shape);
|
|
486
486
|
}
|
|
487
487
|
function pick(schema, mask) {
|
|
488
|
-
return
|
|
488
|
+
return index_js_1.util.pick(schema, mask);
|
|
489
489
|
}
|
|
490
490
|
// .omit
|
|
491
491
|
function omit(schema, mask) {
|
|
492
|
-
return
|
|
492
|
+
return index_js_1.util.omit(schema, mask);
|
|
493
493
|
}
|
|
494
494
|
function partial(schema, mask) {
|
|
495
|
-
return
|
|
495
|
+
return index_js_1.util.partial(exports.ZodMiniOptional, schema, mask);
|
|
496
496
|
}
|
|
497
497
|
function required(schema, mask) {
|
|
498
|
-
return
|
|
498
|
+
return index_js_1.util.required(exports.ZodMiniNonOptional, schema, mask);
|
|
499
499
|
}
|
|
500
500
|
function catchall(inst, catchall) {
|
|
501
501
|
return inst.clone({ ...inst._zod.def, catchall: catchall });
|
|
@@ -508,7 +508,7 @@ function union(options, params) {
|
|
|
508
508
|
return new exports.ZodMiniUnion({
|
|
509
509
|
type: "union",
|
|
510
510
|
options: options,
|
|
511
|
-
...
|
|
511
|
+
...index_js_1.util.normalizeParams(params),
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
514
|
exports.ZodMiniDiscriminatedUnion = core.$constructor("ZodMiniDiscriminatedUnion", (inst, def) => {
|
|
@@ -520,7 +520,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
520
520
|
type: "union",
|
|
521
521
|
options,
|
|
522
522
|
discriminator,
|
|
523
|
-
...
|
|
523
|
+
...index_js_1.util.normalizeParams(params),
|
|
524
524
|
});
|
|
525
525
|
}
|
|
526
526
|
exports.ZodMiniIntersection = core.$constructor("ZodMiniIntersection", (inst, def) => {
|
|
@@ -546,7 +546,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
546
546
|
type: "tuple",
|
|
547
547
|
items: items,
|
|
548
548
|
rest,
|
|
549
|
-
...
|
|
549
|
+
...index_js_1.util.normalizeParams(params),
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
552
|
exports.ZodMiniRecord = core.$constructor("ZodMiniRecord", (inst, def) => {
|
|
@@ -558,7 +558,7 @@ function record(keyType, valueType, params) {
|
|
|
558
558
|
type: "record",
|
|
559
559
|
keyType,
|
|
560
560
|
valueType: valueType,
|
|
561
|
-
...
|
|
561
|
+
...index_js_1.util.normalizeParams(params),
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
function partialRecord(keyType, valueType, params) {
|
|
@@ -566,7 +566,7 @@ function partialRecord(keyType, valueType, params) {
|
|
|
566
566
|
type: "record",
|
|
567
567
|
keyType: union([keyType, never()]),
|
|
568
568
|
valueType: valueType,
|
|
569
|
-
...
|
|
569
|
+
...index_js_1.util.normalizeParams(params),
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
572
|
exports.ZodMiniMap = core.$constructor("ZodMiniMap", (inst, def) => {
|
|
@@ -578,7 +578,7 @@ function map(keyType, valueType, params) {
|
|
|
578
578
|
type: "map",
|
|
579
579
|
keyType: keyType,
|
|
580
580
|
valueType: valueType,
|
|
581
|
-
...
|
|
581
|
+
...index_js_1.util.normalizeParams(params),
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
584
|
exports.ZodMiniSet = core.$constructor("ZodMiniSet", (inst, def) => {
|
|
@@ -589,7 +589,7 @@ function set(valueType, params) {
|
|
|
589
589
|
return new exports.ZodMiniSet({
|
|
590
590
|
type: "set",
|
|
591
591
|
valueType: valueType,
|
|
592
|
-
...
|
|
592
|
+
...index_js_1.util.normalizeParams(params),
|
|
593
593
|
});
|
|
594
594
|
}
|
|
595
595
|
exports.ZodMiniEnum = core.$constructor("ZodMiniEnum", (inst, def) => {
|
|
@@ -601,7 +601,7 @@ function _enum(values, params) {
|
|
|
601
601
|
return new exports.ZodMiniEnum({
|
|
602
602
|
type: "enum",
|
|
603
603
|
entries,
|
|
604
|
-
...
|
|
604
|
+
...index_js_1.util.normalizeParams(params),
|
|
605
605
|
});
|
|
606
606
|
}
|
|
607
607
|
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
|
@@ -615,7 +615,7 @@ function nativeEnum(entries, params) {
|
|
|
615
615
|
return new exports.ZodMiniEnum({
|
|
616
616
|
type: "enum",
|
|
617
617
|
entries,
|
|
618
|
-
...
|
|
618
|
+
...index_js_1.util.normalizeParams(params),
|
|
619
619
|
});
|
|
620
620
|
}
|
|
621
621
|
exports.ZodMiniLiteral = core.$constructor("ZodMiniLiteral", (inst, def) => {
|
|
@@ -626,7 +626,7 @@ function literal(value, params) {
|
|
|
626
626
|
return new exports.ZodMiniLiteral({
|
|
627
627
|
type: "literal",
|
|
628
628
|
values: Array.isArray(value) ? value : [value],
|
|
629
|
-
...
|
|
629
|
+
...index_js_1.util.normalizeParams(params),
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
632
|
exports.ZodMiniFile = core.$constructor("ZodMiniFile", (inst, def) => {
|
|
@@ -704,7 +704,7 @@ function nonoptional(innerType, params) {
|
|
|
704
704
|
return new exports.ZodMiniNonOptional({
|
|
705
705
|
type: "nonoptional",
|
|
706
706
|
innerType: innerType,
|
|
707
|
-
...
|
|
707
|
+
...index_js_1.util.normalizeParams(params),
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
710
|
exports.ZodMiniSuccess = core.$constructor("ZodMiniSuccess", (inst, def) => {
|
|
@@ -764,7 +764,7 @@ function templateLiteral(parts, params) {
|
|
|
764
764
|
return new exports.ZodMiniTemplateLiteral({
|
|
765
765
|
type: "template_literal",
|
|
766
766
|
parts,
|
|
767
|
-
...
|
|
767
|
+
...index_js_1.util.normalizeParams(params),
|
|
768
768
|
});
|
|
769
769
|
}
|
|
770
770
|
exports.ZodMiniLazy = core.$constructor("ZodMiniLazy", (inst, def) => {
|
|
@@ -798,7 +798,7 @@ exports.ZodMiniCustom = core.$constructor("ZodMiniCustom", (inst, def) => {
|
|
|
798
798
|
function check(fn, params) {
|
|
799
799
|
const ch = new core.$ZodCheck({
|
|
800
800
|
check: "custom",
|
|
801
|
-
...
|
|
801
|
+
...index_js_1.util.normalizeParams(params),
|
|
802
802
|
});
|
|
803
803
|
ch._zod.check = fn;
|
|
804
804
|
return ch;
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import * as core from "../core/index.cjs";
|
|
2
|
+
import { util } from "../core/index.cjs";
|
|
3
|
+
type SomeType = core.SomeType;
|
|
4
|
+
export interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
|
|
5
|
+
check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
|
|
6
|
+
clone(def?: Internals["def"], params?: {
|
|
7
|
+
parent: boolean;
|
|
8
|
+
}): this;
|
|
9
|
+
register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [core.$replace<R["_meta"], this>?] : [core.$replace<R["_meta"], this>] : ["Incompatible schema"]): this;
|
|
10
|
+
brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : this & Record<"_zod", Record<"output", core.output<this> & core.$brand<T>>>;
|
|
11
|
+
def: Internals["def"];
|
|
12
|
+
parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
|
|
13
|
+
safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): util.SafeParseResult<core.output<this>>;
|
|
14
|
+
parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
|
|
15
|
+
safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<util.SafeParseResult<core.output<this>>>;
|
|
16
|
+
}
|
|
17
|
+
interface _ZodMiniType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals> extends ZodMiniType<any, any, Internals> {
|
|
18
|
+
}
|
|
19
|
+
export declare const ZodMiniType: core.$constructor<ZodMiniType>;
|
|
20
|
+
export interface _ZodMiniString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>> extends _ZodMiniType<T>, core.$ZodString<T["input"]> {
|
|
21
|
+
_zod: T;
|
|
22
|
+
}
|
|
23
|
+
export interface ZodMiniString<Input = unknown> extends _ZodMiniString<core.$ZodStringInternals<Input>>, core.$ZodString<Input> {
|
|
24
|
+
}
|
|
25
|
+
export declare const ZodMiniString: core.$constructor<ZodMiniString>;
|
|
26
|
+
export declare function string(params?: string | core.$ZodStringParams): ZodMiniString<string>;
|
|
27
|
+
export interface ZodMiniStringFormat<Format extends string = string> extends _ZodMiniString<core.$ZodStringFormatInternals<Format>>, core.$ZodStringFormat<Format> {
|
|
28
|
+
}
|
|
29
|
+
export declare const ZodMiniStringFormat: core.$constructor<ZodMiniStringFormat>;
|
|
30
|
+
export interface ZodMiniEmail extends _ZodMiniString<core.$ZodEmailInternals> {
|
|
31
|
+
}
|
|
32
|
+
export declare const ZodMiniEmail: core.$constructor<ZodMiniEmail>;
|
|
33
|
+
export declare function email(params?: string | core.$ZodEmailParams): ZodMiniEmail;
|
|
34
|
+
export interface ZodMiniGUID extends _ZodMiniString<core.$ZodGUIDInternals> {
|
|
35
|
+
}
|
|
36
|
+
export declare const ZodMiniGUID: core.$constructor<ZodMiniGUID>;
|
|
37
|
+
export declare function guid(params?: string | core.$ZodGUIDParams): ZodMiniGUID;
|
|
38
|
+
export interface ZodMiniUUID extends _ZodMiniString<core.$ZodUUIDInternals> {
|
|
39
|
+
}
|
|
40
|
+
export declare const ZodMiniUUID: core.$constructor<ZodMiniUUID>;
|
|
41
|
+
export declare function uuid(params?: string | core.$ZodUUIDParams): ZodMiniUUID;
|
|
42
|
+
export declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodMiniUUID;
|
|
43
|
+
export declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodMiniUUID;
|
|
44
|
+
export declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodMiniUUID;
|
|
45
|
+
export interface ZodMiniURL extends _ZodMiniString<core.$ZodURLInternals> {
|
|
46
|
+
}
|
|
47
|
+
export declare const ZodMiniURL: core.$constructor<ZodMiniURL>;
|
|
48
|
+
export declare function url(params?: string | core.$ZodURLParams): ZodMiniURL;
|
|
49
|
+
export interface ZodMiniEmoji extends _ZodMiniString<core.$ZodEmojiInternals> {
|
|
50
|
+
}
|
|
51
|
+
export declare const ZodMiniEmoji: core.$constructor<ZodMiniEmoji>;
|
|
52
|
+
export declare function emoji(params?: string | core.$ZodEmojiParams): ZodMiniEmoji;
|
|
53
|
+
export interface ZodMiniNanoID extends _ZodMiniString<core.$ZodNanoIDInternals> {
|
|
54
|
+
}
|
|
55
|
+
export declare const ZodMiniNanoID: core.$constructor<ZodMiniNanoID>;
|
|
56
|
+
export declare function nanoid(params?: string | core.$ZodNanoIDParams): ZodMiniNanoID;
|
|
57
|
+
export interface ZodMiniCUID extends _ZodMiniString<core.$ZodCUIDInternals> {
|
|
58
|
+
}
|
|
59
|
+
export declare const ZodMiniCUID: core.$constructor<ZodMiniCUID>;
|
|
60
|
+
export declare function cuid(params?: string | core.$ZodCUIDParams): ZodMiniCUID;
|
|
61
|
+
export interface ZodMiniCUID2 extends _ZodMiniString<core.$ZodCUID2Internals> {
|
|
62
|
+
}
|
|
63
|
+
export declare const ZodMiniCUID2: core.$constructor<ZodMiniCUID2>;
|
|
64
|
+
export declare function cuid2(params?: string | core.$ZodCUID2Params): ZodMiniCUID2;
|
|
65
|
+
export interface ZodMiniULID extends _ZodMiniString<core.$ZodULIDInternals> {
|
|
66
|
+
}
|
|
67
|
+
export declare const ZodMiniULID: core.$constructor<ZodMiniULID>;
|
|
68
|
+
export declare function ulid(params?: string | core.$ZodULIDParams): ZodMiniULID;
|
|
69
|
+
export interface ZodMiniXID extends _ZodMiniString<core.$ZodXIDInternals> {
|
|
70
|
+
}
|
|
71
|
+
export declare const ZodMiniXID: core.$constructor<ZodMiniXID>;
|
|
72
|
+
export declare function xid(params?: string | core.$ZodXIDParams): ZodMiniXID;
|
|
73
|
+
export interface ZodMiniKSUID extends _ZodMiniString<core.$ZodKSUIDInternals> {
|
|
74
|
+
}
|
|
75
|
+
export declare const ZodMiniKSUID: core.$constructor<ZodMiniKSUID>;
|
|
76
|
+
export declare function ksuid(params?: string | core.$ZodKSUIDParams): ZodMiniKSUID;
|
|
77
|
+
export interface ZodMiniIPv4 extends _ZodMiniString<core.$ZodIPv4Internals> {
|
|
78
|
+
}
|
|
79
|
+
export declare const ZodMiniIPv4: core.$constructor<ZodMiniIPv4>;
|
|
80
|
+
export declare function ipv4(params?: string | core.$ZodIPv4Params): ZodMiniIPv4;
|
|
81
|
+
export interface ZodMiniIPv6 extends _ZodMiniString<core.$ZodIPv6Internals> {
|
|
82
|
+
}
|
|
83
|
+
export declare const ZodMiniIPv6: core.$constructor<ZodMiniIPv6>;
|
|
84
|
+
export declare function ipv6(params?: string | core.$ZodIPv6Params): ZodMiniIPv6;
|
|
85
|
+
export interface ZodMiniCIDRv4 extends _ZodMiniString<core.$ZodCIDRv4Internals> {
|
|
86
|
+
}
|
|
87
|
+
export declare const ZodMiniCIDRv4: core.$constructor<ZodMiniCIDRv4>;
|
|
88
|
+
export declare function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodMiniCIDRv4;
|
|
89
|
+
export interface ZodMiniCIDRv6 extends _ZodMiniString<core.$ZodCIDRv6Internals> {
|
|
90
|
+
}
|
|
91
|
+
export declare const ZodMiniCIDRv6: core.$constructor<ZodMiniCIDRv6>;
|
|
92
|
+
export declare function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodMiniCIDRv6;
|
|
93
|
+
export interface ZodMiniBase64 extends _ZodMiniString<core.$ZodBase64Internals> {
|
|
94
|
+
}
|
|
95
|
+
export declare const ZodMiniBase64: core.$constructor<ZodMiniBase64>;
|
|
96
|
+
export declare function base64(params?: string | core.$ZodBase64Params): ZodMiniBase64;
|
|
97
|
+
export interface ZodMiniBase64URL extends _ZodMiniString<core.$ZodBase64URLInternals> {
|
|
98
|
+
}
|
|
99
|
+
export declare const ZodMiniBase64URL: core.$constructor<ZodMiniBase64URL>;
|
|
100
|
+
export declare function base64url(params?: string | core.$ZodBase64URLParams): ZodMiniBase64URL;
|
|
101
|
+
export interface ZodMiniE164 extends _ZodMiniString<core.$ZodE164Internals> {
|
|
102
|
+
}
|
|
103
|
+
export declare const ZodMiniE164: core.$constructor<ZodMiniE164>;
|
|
104
|
+
export declare function e164(params?: string | core.$ZodE164Params): ZodMiniE164;
|
|
105
|
+
export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
|
|
106
|
+
}
|
|
107
|
+
export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
|
|
108
|
+
export declare function jwt(params?: string | core.$ZodJWTParams): ZodMiniJWT;
|
|
109
|
+
export interface ZodMiniCustomStringFormat<Format extends string = string> extends ZodMiniStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
|
|
110
|
+
_zod: core.$ZodCustomStringFormatInternals<Format>;
|
|
111
|
+
}
|
|
112
|
+
export declare const ZodMiniCustomStringFormat: core.$constructor<ZodMiniCustomStringFormat>;
|
|
113
|
+
export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodMiniCustomStringFormat<Format>;
|
|
114
|
+
interface _ZodMiniNumber<T extends core.$ZodNumberInternals<unknown> = core.$ZodNumberInternals<unknown>> extends _ZodMiniType<T>, core.$ZodNumber<T["input"]> {
|
|
115
|
+
_zod: T;
|
|
116
|
+
}
|
|
117
|
+
export interface ZodMiniNumber<Input = unknown> extends _ZodMiniNumber<core.$ZodNumberInternals<Input>>, core.$ZodNumber<Input> {
|
|
118
|
+
}
|
|
119
|
+
export declare const ZodMiniNumber: core.$constructor<ZodMiniNumber>;
|
|
120
|
+
export declare function number(params?: string | core.$ZodNumberParams): ZodMiniNumber<number>;
|
|
121
|
+
export interface ZodMiniNumberFormat extends _ZodMiniNumber<core.$ZodNumberFormatInternals>, core.$ZodNumberFormat {
|
|
122
|
+
}
|
|
123
|
+
export declare const ZodMiniNumberFormat: core.$constructor<ZodMiniNumberFormat>;
|
|
124
|
+
export declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
|
|
125
|
+
export declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
|
|
126
|
+
export declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
|
|
127
|
+
export declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
|
|
128
|
+
export declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
|
|
129
|
+
export interface ZodMiniBoolean<T = unknown> extends _ZodMiniType<core.$ZodBooleanInternals<T>> {
|
|
130
|
+
}
|
|
131
|
+
export declare const ZodMiniBoolean: core.$constructor<ZodMiniBoolean>;
|
|
132
|
+
export declare function boolean(params?: string | core.$ZodBooleanParams): ZodMiniBoolean<boolean>;
|
|
133
|
+
export interface ZodMiniBigInt<T = unknown> extends _ZodMiniType<core.$ZodBigIntInternals<T>>, core.$ZodBigInt<T> {
|
|
134
|
+
}
|
|
135
|
+
export declare const ZodMiniBigInt: core.$constructor<ZodMiniBigInt>;
|
|
136
|
+
export declare function bigint(params?: string | core.$ZodBigIntParams): ZodMiniBigInt<bigint>;
|
|
137
|
+
export interface ZodMiniBigIntFormat extends _ZodMiniType<core.$ZodBigIntFormatInternals> {
|
|
138
|
+
}
|
|
139
|
+
export declare const ZodMiniBigIntFormat: core.$constructor<ZodMiniBigIntFormat>;
|
|
140
|
+
export declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
|
|
141
|
+
export declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
|
|
142
|
+
export interface ZodMiniSymbol extends _ZodMiniType<core.$ZodSymbolInternals> {
|
|
143
|
+
}
|
|
144
|
+
export declare const ZodMiniSymbol: core.$constructor<ZodMiniSymbol>;
|
|
145
|
+
export declare function symbol(params?: string | core.$ZodSymbolParams): ZodMiniSymbol;
|
|
146
|
+
export interface ZodMiniUndefined extends _ZodMiniType<core.$ZodUndefinedInternals> {
|
|
147
|
+
}
|
|
148
|
+
export declare const ZodMiniUndefined: core.$constructor<ZodMiniUndefined>;
|
|
149
|
+
declare function _undefined(params?: string | core.$ZodUndefinedParams): ZodMiniUndefined;
|
|
150
|
+
export { _undefined as undefined };
|
|
151
|
+
export interface ZodMiniNull extends _ZodMiniType<core.$ZodNullInternals> {
|
|
152
|
+
}
|
|
153
|
+
export declare const ZodMiniNull: core.$constructor<ZodMiniNull>;
|
|
154
|
+
declare function _null(params?: string | core.$ZodNullParams): ZodMiniNull;
|
|
155
|
+
export { _null as null };
|
|
156
|
+
export interface ZodMiniAny extends _ZodMiniType<core.$ZodAnyInternals> {
|
|
157
|
+
}
|
|
158
|
+
export declare const ZodMiniAny: core.$constructor<ZodMiniAny>;
|
|
159
|
+
export declare function any(): ZodMiniAny;
|
|
160
|
+
export interface ZodMiniUnknown extends _ZodMiniType<core.$ZodUnknownInternals> {
|
|
161
|
+
}
|
|
162
|
+
export declare const ZodMiniUnknown: core.$constructor<ZodMiniUnknown>;
|
|
163
|
+
export declare function unknown(): ZodMiniUnknown;
|
|
164
|
+
export interface ZodMiniNever extends _ZodMiniType<core.$ZodNeverInternals> {
|
|
165
|
+
}
|
|
166
|
+
export declare const ZodMiniNever: core.$constructor<ZodMiniNever>;
|
|
167
|
+
export declare function never(params?: string | core.$ZodNeverParams): ZodMiniNever;
|
|
168
|
+
export interface ZodMiniVoid extends _ZodMiniType<core.$ZodVoidInternals> {
|
|
169
|
+
}
|
|
170
|
+
export declare const ZodMiniVoid: core.$constructor<ZodMiniVoid>;
|
|
171
|
+
declare function _void(params?: string | core.$ZodVoidParams): ZodMiniVoid;
|
|
172
|
+
export { _void as void };
|
|
173
|
+
export interface ZodMiniDate<T = unknown> extends _ZodMiniType<core.$ZodDateInternals<T>> {
|
|
174
|
+
}
|
|
175
|
+
export declare const ZodMiniDate: core.$constructor<ZodMiniDate>;
|
|
176
|
+
export declare function date(params?: string | core.$ZodDateParams): ZodMiniDate<Date>;
|
|
177
|
+
export interface ZodMiniArray<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodArrayInternals<T>>, core.$ZodArray<T> {
|
|
178
|
+
}
|
|
179
|
+
export declare const ZodMiniArray: core.$constructor<ZodMiniArray>;
|
|
180
|
+
export declare function array<T extends SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodMiniArray<T>;
|
|
181
|
+
export declare function keyof<T extends ZodMiniObject>(schema: T): ZodMiniLiteral<Exclude<keyof T["shape"], symbol>>;
|
|
182
|
+
export interface ZodMiniObject<
|
|
183
|
+
/** @ts-ignore Cast variance */
|
|
184
|
+
out Shape extends core.$ZodShape = core.$ZodShape, out Config extends core.$ZodObjectConfig = core.$strip> extends ZodMiniType<any, any, core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
|
|
185
|
+
shape: Shape;
|
|
186
|
+
}
|
|
187
|
+
export declare const ZodMiniObject: core.$constructor<ZodMiniObject>;
|
|
188
|
+
export declare function object<T extends core.$ZodLooseShape = Record<never, SomeType>>(shape?: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strip>;
|
|
189
|
+
export declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strict>;
|
|
190
|
+
export declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$loose>;
|
|
191
|
+
export declare function extend<T extends ZodMiniObject, U extends core.$ZodLooseShape>(schema: T, shape: U): ZodMiniObject<util.Extend<T["shape"], U>, T["_zod"]["config"]>;
|
|
192
|
+
/** @deprecated Identical to `z.extend(A, B)` */
|
|
193
|
+
export declare function merge<T extends ZodMiniObject, U extends ZodMiniObject>(a: T, b: U): ZodMiniObject<util.Extend<T["shape"], U["shape"]>, T["_zod"]["config"]>;
|
|
194
|
+
export declare function pick<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Pick<T["shape"], keyof T["shape"] & keyof M>>, T["_zod"]["config"]>;
|
|
195
|
+
export declare function omit<T extends ZodMiniObject, const M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Omit<T["shape"], keyof M>>, T["_zod"]["config"]>;
|
|
196
|
+
export declare function partial<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
|
|
197
|
+
[k in keyof T["shape"]]: ZodMiniOptional<T["shape"][k]>;
|
|
198
|
+
}, T["_zod"]["config"]>;
|
|
199
|
+
export declare function partial<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<{
|
|
200
|
+
[k in keyof T["shape"]]: k extends keyof M ? ZodMiniOptional<T["shape"][k]> : T["shape"][k];
|
|
201
|
+
}, T["_zod"]["config"]>;
|
|
202
|
+
export type RequiredInterfaceShape<Shape extends core.$ZodLooseShape, Keys extends PropertyKey = keyof Shape> = util.Identity<{
|
|
203
|
+
[k in keyof Shape as k extends Keys ? k : never]: ZodMiniNonOptional<Shape[k]>;
|
|
204
|
+
} & {
|
|
205
|
+
[k in keyof Shape as k extends Keys ? never : k]: Shape[k];
|
|
206
|
+
}>;
|
|
207
|
+
export declare function required<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
|
|
208
|
+
[k in keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
|
|
209
|
+
}, T["_zod"]["config"]>;
|
|
210
|
+
export declare function required<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Extend<T["shape"], {
|
|
211
|
+
[k in keyof M & keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
|
|
212
|
+
}>, T["_zod"]["config"]>;
|
|
213
|
+
export declare function catchall<T extends ZodMiniObject, U extends SomeType>(inst: T, catchall: U): ZodMiniObject<T["shape"], core.$catchall<U>>;
|
|
214
|
+
export interface ZodMiniUnion<T extends readonly SomeType[] = readonly core.$ZodType[]> extends _ZodMiniType<core.$ZodUnionInternals<T>> {
|
|
215
|
+
}
|
|
216
|
+
export declare const ZodMiniUnion: core.$constructor<ZodMiniUnion>;
|
|
217
|
+
export declare function union<const T extends readonly SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodMiniUnion<T>;
|
|
218
|
+
export interface ZodMiniDiscriminatedUnion<Options extends readonly SomeType[] = readonly core.$ZodType[]> extends ZodMiniUnion<Options> {
|
|
219
|
+
_zod: core.$ZodDiscriminatedUnionInternals<Options>;
|
|
220
|
+
}
|
|
221
|
+
export declare const ZodMiniDiscriminatedUnion: core.$constructor<ZodMiniDiscriminatedUnion>;
|
|
222
|
+
export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodMiniDiscriminatedUnion<Types>;
|
|
223
|
+
export interface ZodMiniIntersection<A extends SomeType = core.$ZodType, B extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodIntersectionInternals<A, B>> {
|
|
224
|
+
}
|
|
225
|
+
export declare const ZodMiniIntersection: core.$constructor<ZodMiniIntersection>;
|
|
226
|
+
export declare function intersection<T extends SomeType, U extends SomeType>(left: T, right: U): ZodMiniIntersection<T, U>;
|
|
227
|
+
export interface ZodMiniTuple<T extends util.TupleItems = readonly core.$ZodType[], Rest extends SomeType | null = core.$ZodType | null> extends _ZodMiniType<core.$ZodTupleInternals<T, Rest>> {
|
|
228
|
+
}
|
|
229
|
+
export declare const ZodMiniTuple: core.$constructor<ZodMiniTuple>;
|
|
230
|
+
export declare function tuple<const T extends readonly [SomeType, ...SomeType[]]>(items: T, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, null>;
|
|
231
|
+
export declare function tuple<const T extends readonly [SomeType, ...SomeType[]], Rest extends SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, Rest>;
|
|
232
|
+
export declare function tuple(items: [], params?: string | core.$ZodTupleParams): ZodMiniTuple<[], null>;
|
|
233
|
+
export interface ZodMiniRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodRecordInternals<Key, Value>> {
|
|
234
|
+
}
|
|
235
|
+
export declare const ZodMiniRecord: core.$constructor<ZodMiniRecord>;
|
|
236
|
+
export declare function record<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<Key, Value>;
|
|
237
|
+
export declare function partialRecord<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<ZodMiniUnion<[Key, ZodMiniNever]>, Value>;
|
|
238
|
+
export interface ZodMiniMap<Key extends SomeType = core.$ZodType, Value extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodMapInternals<Key, Value>> {
|
|
239
|
+
}
|
|
240
|
+
export declare const ZodMiniMap: core.$constructor<ZodMiniMap>;
|
|
241
|
+
export declare function map<Key extends SomeType, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMiniMap<Key, Value>;
|
|
242
|
+
export interface ZodMiniSet<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodSetInternals<T>> {
|
|
243
|
+
}
|
|
244
|
+
export declare const ZodMiniSet: core.$constructor<ZodMiniSet>;
|
|
245
|
+
export declare function set<Value extends SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodMiniSet<Value>;
|
|
246
|
+
export interface ZodMiniEnum<T extends util.EnumLike = util.EnumLike> extends _ZodMiniType<core.$ZodEnumInternals<T>> {
|
|
247
|
+
}
|
|
248
|
+
export declare const ZodMiniEnum: core.$constructor<ZodMiniEnum>;
|
|
249
|
+
declare function _enum<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<util.ToEnum<T[number]>>;
|
|
250
|
+
declare function _enum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
|
|
251
|
+
export { _enum as enum };
|
|
252
|
+
/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
|
|
253
|
+
*
|
|
254
|
+
* ```ts
|
|
255
|
+
* enum Colors { red, green, blue }
|
|
256
|
+
* z.enum(Colors);
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
|
|
260
|
+
export interface ZodMiniLiteral<T extends util.Literal = util.Literal> extends _ZodMiniType<core.$ZodLiteralInternals<T>> {
|
|
261
|
+
}
|
|
262
|
+
export declare const ZodMiniLiteral: core.$constructor<ZodMiniLiteral>;
|
|
263
|
+
export declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T[number]>;
|
|
264
|
+
export declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T>;
|
|
265
|
+
export interface ZodMiniFile extends _ZodMiniType<core.$ZodFileInternals> {
|
|
266
|
+
}
|
|
267
|
+
export declare const ZodMiniFile: core.$constructor<ZodMiniFile>;
|
|
268
|
+
export declare function file(params?: string | core.$ZodFileParams): ZodMiniFile;
|
|
269
|
+
export interface ZodMiniTransform<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodTransformInternals<O, I>> {
|
|
270
|
+
}
|
|
271
|
+
export declare const ZodMiniTransform: core.$constructor<ZodMiniTransform>;
|
|
272
|
+
export declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodMiniTransform<Awaited<O>, I>;
|
|
273
|
+
export interface ZodMiniOptional<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodOptionalInternals<T>>, core.$ZodOptional<T> {
|
|
274
|
+
}
|
|
275
|
+
export declare const ZodMiniOptional: core.$constructor<ZodMiniOptional>;
|
|
276
|
+
export declare function optional<T extends SomeType>(innerType: T): ZodMiniOptional<T>;
|
|
277
|
+
export interface ZodMiniNullable<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodNullableInternals<T>> {
|
|
278
|
+
}
|
|
279
|
+
export declare const ZodMiniNullable: core.$constructor<ZodMiniNullable>;
|
|
280
|
+
export declare function nullable<T extends SomeType>(innerType: T): ZodMiniNullable<T>;
|
|
281
|
+
export declare function nullish<T extends SomeType>(innerType: T): ZodMiniOptional<ZodMiniNullable<T>>;
|
|
282
|
+
export interface ZodMiniDefault<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodDefaultInternals<T>> {
|
|
283
|
+
}
|
|
284
|
+
export declare const ZodMiniDefault: core.$constructor<ZodMiniDefault>;
|
|
285
|
+
export declare function _default<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodMiniDefault<T>;
|
|
286
|
+
export interface ZodMiniPrefault<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPrefaultInternals<T>> {
|
|
287
|
+
}
|
|
288
|
+
export declare const ZodMiniPrefault: core.$constructor<ZodMiniPrefault>;
|
|
289
|
+
export declare function prefault<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.input<T>> | (() => util.NoUndefined<core.input<T>>)): ZodMiniPrefault<T>;
|
|
290
|
+
export interface ZodMiniNonOptional<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodNonOptionalInternals<T>> {
|
|
291
|
+
}
|
|
292
|
+
export declare const ZodMiniNonOptional: core.$constructor<ZodMiniNonOptional>;
|
|
293
|
+
export declare function nonoptional<T extends SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodMiniNonOptional<T>;
|
|
294
|
+
export interface ZodMiniSuccess<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodSuccessInternals<T>> {
|
|
295
|
+
}
|
|
296
|
+
export declare const ZodMiniSuccess: core.$constructor<ZodMiniSuccess>;
|
|
297
|
+
export declare function success<T extends SomeType>(innerType: T): ZodMiniSuccess<T>;
|
|
298
|
+
export interface ZodMiniCatch<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodCatchInternals<T>> {
|
|
299
|
+
}
|
|
300
|
+
export declare const ZodMiniCatch: core.$constructor<ZodMiniCatch>;
|
|
301
|
+
declare function _catch<T extends SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodMiniCatch<T>;
|
|
302
|
+
export { _catch as catch };
|
|
303
|
+
export interface ZodMiniNaN extends _ZodMiniType<core.$ZodNaNInternals> {
|
|
304
|
+
}
|
|
305
|
+
export declare const ZodMiniNaN: core.$constructor<ZodMiniNaN>;
|
|
306
|
+
export declare function nan(params?: string | core.$ZodNaNParams): ZodMiniNaN;
|
|
307
|
+
export interface ZodMiniPipe<A extends SomeType = core.$ZodType, B extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPipeInternals<A, B>> {
|
|
308
|
+
}
|
|
309
|
+
export declare const ZodMiniPipe: core.$constructor<ZodMiniPipe>;
|
|
310
|
+
export declare function pipe<const A extends SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodMiniPipe<A, B>;
|
|
311
|
+
export interface ZodMiniReadonly<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodReadonlyInternals<T>> {
|
|
312
|
+
}
|
|
313
|
+
export declare const ZodMiniReadonly: core.$constructor<ZodMiniReadonly>;
|
|
314
|
+
export declare function readonly<T extends SomeType>(innerType: T): ZodMiniReadonly<T>;
|
|
315
|
+
export interface ZodMiniTemplateLiteral<Template extends string = string> extends _ZodMiniType<core.$ZodTemplateLiteralInternals<Template>> {
|
|
316
|
+
}
|
|
317
|
+
export declare const ZodMiniTemplateLiteral: core.$constructor<ZodMiniTemplateLiteral>;
|
|
318
|
+
export declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodMiniTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
|
|
319
|
+
export interface ZodMiniLazy<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodLazyInternals<T>> {
|
|
320
|
+
}
|
|
321
|
+
export declare const ZodMiniLazy: core.$constructor<ZodMiniLazy>;
|
|
322
|
+
declare function _lazy<T extends SomeType>(getter: () => T): ZodMiniLazy<T>;
|
|
323
|
+
export { _lazy as lazy };
|
|
324
|
+
export interface ZodMiniPromise<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPromiseInternals<T>> {
|
|
325
|
+
}
|
|
326
|
+
export declare const ZodMiniPromise: core.$constructor<ZodMiniPromise>;
|
|
327
|
+
export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromise<T>;
|
|
328
|
+
export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
|
|
329
|
+
}
|
|
330
|
+
export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
|
|
331
|
+
export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
|
|
332
|
+
export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
|
|
333
|
+
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
|
334
|
+
declare abstract class Class {
|
|
335
|
+
constructor(..._args: any[]);
|
|
336
|
+
}
|
|
337
|
+
declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>, InstanceType<T>>;
|
|
338
|
+
export { _instanceof as instanceof };
|
|
339
|
+
export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniPipe<ZodMiniPipe<ZodMiniString, ZodMiniTransform<boolean, string>>, ZodMiniBoolean>;
|
|
340
|
+
type _ZodMiniJSONSchema = ZodMiniUnion<[
|
|
341
|
+
ZodMiniString,
|
|
342
|
+
ZodMiniNumber,
|
|
343
|
+
ZodMiniBoolean,
|
|
344
|
+
ZodMiniNull,
|
|
345
|
+
ZodMiniArray<ZodMiniJSONSchema>,
|
|
346
|
+
ZodMiniRecord<ZodMiniString<string>, ZodMiniJSONSchema>
|
|
347
|
+
]>;
|
|
348
|
+
type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
|
|
349
|
+
export interface ZodMiniJSONSchemaInternals extends _ZodMiniJSONSchemaInternals {
|
|
350
|
+
output: util.JSONType;
|
|
351
|
+
input: util.JSONType;
|
|
352
|
+
}
|
|
353
|
+
export interface ZodMiniJSONSchema extends _ZodMiniJSONSchema {
|
|
354
|
+
_zod: ZodMiniJSONSchemaInternals;
|
|
355
|
+
}
|
|
356
|
+
export declare function json(): ZodMiniJSONSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as core from "
|
|
2
|
-
import { util } from "
|
|
1
|
+
import * as core from "../core/index.js";
|
|
2
|
+
import { util } from "../core/index.js";
|
|
3
3
|
type SomeType = core.SomeType;
|
|
4
4
|
export interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
|
|
5
5
|
check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as core from "
|
|
2
|
-
import { util } from "
|
|
1
|
+
import * as core from "../core/index.js";
|
|
2
|
+
import { util } from "../core/index.js";
|
|
3
3
|
import * as parse from "./parse.js";
|
|
4
4
|
export const ZodMiniType = /*@__PURE__*/ core.$constructor("ZodMiniType", (inst, def) => {
|
|
5
5
|
if (!inst._zod)
|
|
@@ -13,10 +13,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
|
|
21
|
-
__exportStar(require("./classic/index.js"), exports);
|
|
22
|
-
exports.default = index_js_1.default;
|
|
17
|
+
__exportStar(require("../v4/mini/index.cjs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../v4/mini/index.cjs";
|
package/v4-mini/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../
|
|
1
|
+
export * from "../v4/mini/index.js";
|
package/v4-mini/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../
|
|
1
|
+
export * from "../v4/mini/index.js";
|
package/dist/cjs/package.json
DELETED