fullstacked 0.12.1-1371 → 0.12.2-1382

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (713) hide show
  1. package/fullstacked_modules/@types/archive/index.d.ts +33 -0
  2. package/fullstacked_modules/@types/connect/index.d.ts +28 -0
  3. package/fullstacked_modules/@types/fetch/index.d.ts +38 -0
  4. package/fullstacked_modules/@types/fs/index.d.ts +73 -0
  5. package/fullstacked_modules/@types/platform/index.d.ts +15 -0
  6. package/fullstacked_modules/{archive/archive.ts → archive.ts} +10 -3
  7. package/fullstacked_modules/{auto_update/index.ts → auto_update.ts} +4 -7
  8. package/fullstacked_modules/build/index.ts +108 -2
  9. package/fullstacked_modules/{connect/index.ts → connect.ts} +7 -7
  10. package/fullstacked_modules/{core_message/core_message.ts → core_message.ts} +7 -1
  11. package/fullstacked_modules/{fetch/index.ts → fetch.ts} +5 -6
  12. package/fullstacked_modules/{fs/fs.ts → fs.ts} +15 -2
  13. package/fullstacked_modules/{git/git.ts → git.ts} +24 -4
  14. package/fullstacked_modules/{packages/packages.ts → packages.ts} +10 -7
  15. package/index.js +2 -8
  16. package/package.json +1 -1
  17. package/fullstacked_modules/@fullstacked/ai-agent/README.md +0 -1
  18. package/fullstacked_modules/@fullstacked/ai-agent/ai-agent.js +0 -192588
  19. package/fullstacked_modules/@fullstacked/ai-agent/index.scss +0 -15
  20. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +0 -111
  21. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +0 -1176
  22. package/fullstacked_modules/@fullstacked/ai-agent/package.json +0 -28
  23. package/fullstacked_modules/@fullstacked/ai-agent/src/conversation.ts +0 -227
  24. package/fullstacked_modules/@fullstacked/ai-agent/src/default.scss +0 -23
  25. package/fullstacked_modules/@fullstacked/ai-agent/src/index.ts +0 -2
  26. package/fullstacked_modules/@fullstacked/ai-agent/src/input.ts +0 -36
  27. package/fullstacked_modules/@fullstacked/ai-agent/src/markdown.ts +0 -50
  28. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/anthropic.ts +0 -50
  29. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/deepseek.ts +0 -50
  30. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/google.ts +0 -44
  31. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/index.ts +0 -39
  32. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/interface.ts +0 -29
  33. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/mistral.ts +0 -51
  34. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +0 -70
  35. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/openai.ts +0 -49
  36. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/xai.ts +0 -47
  37. package/fullstacked_modules/ai/index.d.ts +0 -3
  38. package/fullstacked_modules/ai/index.ts +0 -14
  39. package/fullstacked_modules/ai/tools/fs.ts +0 -70
  40. package/fullstacked_modules/archive/index.d.ts +0 -3
  41. package/fullstacked_modules/archive/index.ts +0 -3
  42. package/fullstacked_modules/bridge/index.d.ts +0 -0
  43. package/fullstacked_modules/build/build.ts +0 -101
  44. package/fullstacked_modules/build/index.d.ts +0 -0
  45. package/fullstacked_modules/components/index.d.ts +0 -0
  46. package/fullstacked_modules/connect/index.d.ts +0 -3
  47. package/fullstacked_modules/core_message/index.d.ts +0 -0
  48. package/fullstacked_modules/core_message/index.ts +0 -3
  49. package/fullstacked_modules/fetch/index.d.ts +0 -3
  50. package/fullstacked_modules/fs/index.d.ts +0 -3
  51. package/fullstacked_modules/fs/index.ts +0 -3
  52. package/fullstacked_modules/git/index.d.ts +0 -0
  53. package/fullstacked_modules/git/index.ts +0 -3
  54. package/fullstacked_modules/packages/index.d.ts +0 -0
  55. package/fullstacked_modules/packages/index.ts +0 -3
  56. package/fullstacked_modules/platform/index.d.ts +0 -3
  57. package/fullstacked_modules/zod/LICENSE +0 -21
  58. package/fullstacked_modules/zod/README.md +0 -208
  59. package/fullstacked_modules/zod/index.cjs +0 -33
  60. package/fullstacked_modules/zod/index.d.cts +0 -4
  61. package/fullstacked_modules/zod/index.d.ts +0 -4
  62. package/fullstacked_modules/zod/index.js +0 -4
  63. package/fullstacked_modules/zod/locales/index.cjs +0 -17
  64. package/fullstacked_modules/zod/locales/index.d.cts +0 -1
  65. package/fullstacked_modules/zod/locales/index.d.ts +0 -1
  66. package/fullstacked_modules/zod/locales/index.js +0 -1
  67. package/fullstacked_modules/zod/locales/package.json +0 -6
  68. package/fullstacked_modules/zod/mini/index.cjs +0 -17
  69. package/fullstacked_modules/zod/mini/index.d.cts +0 -1
  70. package/fullstacked_modules/zod/mini/index.d.ts +0 -1
  71. package/fullstacked_modules/zod/mini/index.js +0 -1
  72. package/fullstacked_modules/zod/mini/package.json +0 -6
  73. package/fullstacked_modules/zod/package.json +0 -135
  74. package/fullstacked_modules/zod/src/index.ts +0 -4
  75. package/fullstacked_modules/zod/src/locales/index.ts +0 -1
  76. package/fullstacked_modules/zod/src/mini/index.ts +0 -1
  77. package/fullstacked_modules/zod/src/v3/ZodError.ts +0 -330
  78. package/fullstacked_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  79. package/fullstacked_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  80. package/fullstacked_modules/zod/src/v3/benchmarks/index.ts +0 -59
  81. package/fullstacked_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  82. package/fullstacked_modules/zod/src/v3/benchmarks/object.ts +0 -69
  83. package/fullstacked_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  84. package/fullstacked_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  85. package/fullstacked_modules/zod/src/v3/benchmarks/string.ts +0 -55
  86. package/fullstacked_modules/zod/src/v3/benchmarks/union.ts +0 -80
  87. package/fullstacked_modules/zod/src/v3/errors.ts +0 -13
  88. package/fullstacked_modules/zod/src/v3/external.ts +0 -6
  89. package/fullstacked_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  90. package/fullstacked_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  91. package/fullstacked_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  92. package/fullstacked_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  93. package/fullstacked_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  94. package/fullstacked_modules/zod/src/v3/helpers/util.ts +0 -224
  95. package/fullstacked_modules/zod/src/v3/index.ts +0 -4
  96. package/fullstacked_modules/zod/src/v3/locales/en.ts +0 -124
  97. package/fullstacked_modules/zod/src/v3/standard-schema.ts +0 -113
  98. package/fullstacked_modules/zod/src/v3/tests/Mocker.ts +0 -54
  99. package/fullstacked_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  100. package/fullstacked_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  101. package/fullstacked_modules/zod/src/v3/tests/array.test.ts +0 -71
  102. package/fullstacked_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  103. package/fullstacked_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  104. package/fullstacked_modules/zod/src/v3/tests/base.test.ts +0 -29
  105. package/fullstacked_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  106. package/fullstacked_modules/zod/src/v3/tests/branded.test.ts +0 -53
  107. package/fullstacked_modules/zod/src/v3/tests/catch.test.ts +0 -220
  108. package/fullstacked_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  109. package/fullstacked_modules/zod/src/v3/tests/complex.test.ts +0 -56
  110. package/fullstacked_modules/zod/src/v3/tests/custom.test.ts +0 -31
  111. package/fullstacked_modules/zod/src/v3/tests/date.test.ts +0 -32
  112. package/fullstacked_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  113. package/fullstacked_modules/zod/src/v3/tests/default.test.ts +0 -112
  114. package/fullstacked_modules/zod/src/v3/tests/description.test.ts +0 -33
  115. package/fullstacked_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  116. package/fullstacked_modules/zod/src/v3/tests/enum.test.ts +0 -80
  117. package/fullstacked_modules/zod/src/v3/tests/error.test.ts +0 -551
  118. package/fullstacked_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  119. package/fullstacked_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  120. package/fullstacked_modules/zod/src/v3/tests/function.test.ts +0 -257
  121. package/fullstacked_modules/zod/src/v3/tests/generics.test.ts +0 -48
  122. package/fullstacked_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  123. package/fullstacked_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  124. package/fullstacked_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  125. package/fullstacked_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  126. package/fullstacked_modules/zod/src/v3/tests/literal.test.ts +0 -36
  127. package/fullstacked_modules/zod/src/v3/tests/map.test.ts +0 -110
  128. package/fullstacked_modules/zod/src/v3/tests/masking.test.ts +0 -4
  129. package/fullstacked_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  130. package/fullstacked_modules/zod/src/v3/tests/nan.test.ts +0 -21
  131. package/fullstacked_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  132. package/fullstacked_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  133. package/fullstacked_modules/zod/src/v3/tests/number.test.ts +0 -176
  134. package/fullstacked_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  135. package/fullstacked_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  136. package/fullstacked_modules/zod/src/v3/tests/object.test.ts +0 -434
  137. package/fullstacked_modules/zod/src/v3/tests/optional.test.ts +0 -42
  138. package/fullstacked_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  139. package/fullstacked_modules/zod/src/v3/tests/parser.test.ts +0 -41
  140. package/fullstacked_modules/zod/src/v3/tests/partials.test.ts +0 -243
  141. package/fullstacked_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  142. package/fullstacked_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  143. package/fullstacked_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  144. package/fullstacked_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  145. package/fullstacked_modules/zod/src/v3/tests/promise.test.ts +0 -90
  146. package/fullstacked_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  147. package/fullstacked_modules/zod/src/v3/tests/record.test.ts +0 -171
  148. package/fullstacked_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  149. package/fullstacked_modules/zod/src/v3/tests/refine.test.ts +0 -313
  150. package/fullstacked_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  151. package/fullstacked_modules/zod/src/v3/tests/set.test.ts +0 -142
  152. package/fullstacked_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  153. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +0 -916
  154. package/fullstacked_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  155. package/fullstacked_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  156. package/fullstacked_modules/zod/src/v3/tests/unions.test.ts +0 -57
  157. package/fullstacked_modules/zod/src/v3/tests/validations.test.ts +0 -133
  158. package/fullstacked_modules/zod/src/v3/tests/void.test.ts +0 -15
  159. package/fullstacked_modules/zod/src/v3/types.ts +0 -5138
  160. package/fullstacked_modules/zod/src/v4/classic/checks.ts +0 -31
  161. package/fullstacked_modules/zod/src/v4/classic/coerce.ts +0 -27
  162. package/fullstacked_modules/zod/src/v4/classic/compat.ts +0 -70
  163. package/fullstacked_modules/zod/src/v4/classic/errors.ts +0 -82
  164. package/fullstacked_modules/zod/src/v4/classic/external.ts +0 -50
  165. package/fullstacked_modules/zod/src/v4/classic/index.ts +0 -5
  166. package/fullstacked_modules/zod/src/v4/classic/iso.ts +0 -90
  167. package/fullstacked_modules/zod/src/v4/classic/parse.ts +0 -82
  168. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +0 -2197
  169. package/fullstacked_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  170. package/fullstacked_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  171. package/fullstacked_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  172. package/fullstacked_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  173. package/fullstacked_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  174. package/fullstacked_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  175. package/fullstacked_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  176. package/fullstacked_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  177. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +0 -276
  178. package/fullstacked_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  179. package/fullstacked_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
  180. package/fullstacked_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
  181. package/fullstacked_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  182. package/fullstacked_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  183. package/fullstacked_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  184. package/fullstacked_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  185. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
  186. package/fullstacked_modules/zod/src/v4/classic/tests/default.test.ts +0 -365
  187. package/fullstacked_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  188. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -661
  189. package/fullstacked_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  190. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -595
  191. package/fullstacked_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  192. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
  193. package/fullstacked_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
  194. package/fullstacked_modules/zod/src/v4/classic/tests/function.test.ts +0 -308
  195. package/fullstacked_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  196. package/fullstacked_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
  197. package/fullstacked_modules/zod/src/v4/classic/tests/index.test.ts +0 -844
  198. package/fullstacked_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  199. package/fullstacked_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  200. package/fullstacked_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  201. package/fullstacked_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  202. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
  203. package/fullstacked_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  204. package/fullstacked_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  205. package/fullstacked_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  206. package/fullstacked_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
  207. package/fullstacked_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  208. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +0 -270
  209. package/fullstacked_modules/zod/src/v4/classic/tests/object.test.ts +0 -609
  210. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +0 -136
  211. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +0 -340
  212. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  213. package/fullstacked_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
  214. package/fullstacked_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
  215. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -282
  216. package/fullstacked_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  217. package/fullstacked_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  218. package/fullstacked_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  219. package/fullstacked_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  220. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +0 -356
  221. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
  222. package/fullstacked_modules/zod/src/v4/classic/tests/refine.test.ts +0 -605
  223. package/fullstacked_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  224. package/fullstacked_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
  225. package/fullstacked_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  226. package/fullstacked_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
  227. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +0 -1080
  228. package/fullstacked_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
  229. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -763
  230. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2622
  231. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +0 -361
  232. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  233. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +0 -181
  234. package/fullstacked_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  235. package/fullstacked_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  236. package/fullstacked_modules/zod/src/v4/core/api.ts +0 -1621
  237. package/fullstacked_modules/zod/src/v4/core/checks.ts +0 -1287
  238. package/fullstacked_modules/zod/src/v4/core/config.ts +0 -15
  239. package/fullstacked_modules/zod/src/v4/core/core.ts +0 -115
  240. package/fullstacked_modules/zod/src/v4/core/doc.ts +0 -44
  241. package/fullstacked_modules/zod/src/v4/core/errors.ts +0 -413
  242. package/fullstacked_modules/zod/src/v4/core/index.ts +0 -14
  243. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +0 -147
  244. package/fullstacked_modules/zod/src/v4/core/parse.ts +0 -195
  245. package/fullstacked_modules/zod/src/v4/core/regexes.ts +0 -177
  246. package/fullstacked_modules/zod/src/v4/core/registries.ts +0 -97
  247. package/fullstacked_modules/zod/src/v4/core/schemas.ts +0 -4317
  248. package/fullstacked_modules/zod/src/v4/core/standard-schema.ts +0 -64
  249. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +0 -18
  250. package/fullstacked_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  251. package/fullstacked_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  252. package/fullstacked_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  253. package/fullstacked_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
  254. package/fullstacked_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  255. package/fullstacked_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  256. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +0 -1044
  257. package/fullstacked_modules/zod/src/v4/core/util.ts +0 -910
  258. package/fullstacked_modules/zod/src/v4/core/versions.ts +0 -5
  259. package/fullstacked_modules/zod/src/v4/core/zsf.ts +0 -323
  260. package/fullstacked_modules/zod/src/v4/index.ts +0 -4
  261. package/fullstacked_modules/zod/src/v4/locales/ar.ts +0 -125
  262. package/fullstacked_modules/zod/src/v4/locales/az.ts +0 -121
  263. package/fullstacked_modules/zod/src/v4/locales/be.ts +0 -184
  264. package/fullstacked_modules/zod/src/v4/locales/bg.ts +0 -136
  265. package/fullstacked_modules/zod/src/v4/locales/ca.ts +0 -127
  266. package/fullstacked_modules/zod/src/v4/locales/cs.ts +0 -142
  267. package/fullstacked_modules/zod/src/v4/locales/da.ts +0 -141
  268. package/fullstacked_modules/zod/src/v4/locales/de.ts +0 -124
  269. package/fullstacked_modules/zod/src/v4/locales/en.ts +0 -127
  270. package/fullstacked_modules/zod/src/v4/locales/eo.ts +0 -125
  271. package/fullstacked_modules/zod/src/v4/locales/es.ts +0 -159
  272. package/fullstacked_modules/zod/src/v4/locales/fa.ts +0 -134
  273. package/fullstacked_modules/zod/src/v4/locales/fi.ts +0 -131
  274. package/fullstacked_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  275. package/fullstacked_modules/zod/src/v4/locales/fr.ts +0 -124
  276. package/fullstacked_modules/zod/src/v4/locales/he.ts +0 -125
  277. package/fullstacked_modules/zod/src/v4/locales/hu.ts +0 -126
  278. package/fullstacked_modules/zod/src/v4/locales/id.ts +0 -125
  279. package/fullstacked_modules/zod/src/v4/locales/index.ts +0 -47
  280. package/fullstacked_modules/zod/src/v4/locales/is.ts +0 -127
  281. package/fullstacked_modules/zod/src/v4/locales/it.ts +0 -125
  282. package/fullstacked_modules/zod/src/v4/locales/ja.ts +0 -122
  283. package/fullstacked_modules/zod/src/v4/locales/ka.ts +0 -138
  284. package/fullstacked_modules/zod/src/v4/locales/kh.ts +0 -7
  285. package/fullstacked_modules/zod/src/v4/locales/km.ts +0 -126
  286. package/fullstacked_modules/zod/src/v4/locales/ko.ts +0 -131
  287. package/fullstacked_modules/zod/src/v4/locales/lt.ts +0 -265
  288. package/fullstacked_modules/zod/src/v4/locales/mk.ts +0 -127
  289. package/fullstacked_modules/zod/src/v4/locales/ms.ts +0 -124
  290. package/fullstacked_modules/zod/src/v4/locales/nl.ts +0 -126
  291. package/fullstacked_modules/zod/src/v4/locales/no.ts +0 -124
  292. package/fullstacked_modules/zod/src/v4/locales/ota.ts +0 -125
  293. package/fullstacked_modules/zod/src/v4/locales/pl.ts +0 -126
  294. package/fullstacked_modules/zod/src/v4/locales/ps.ts +0 -133
  295. package/fullstacked_modules/zod/src/v4/locales/pt.ts +0 -123
  296. package/fullstacked_modules/zod/src/v4/locales/ru.ts +0 -184
  297. package/fullstacked_modules/zod/src/v4/locales/sl.ts +0 -126
  298. package/fullstacked_modules/zod/src/v4/locales/sv.ts +0 -127
  299. package/fullstacked_modules/zod/src/v4/locales/ta.ts +0 -125
  300. package/fullstacked_modules/zod/src/v4/locales/th.ts +0 -126
  301. package/fullstacked_modules/zod/src/v4/locales/tr.ts +0 -121
  302. package/fullstacked_modules/zod/src/v4/locales/ua.ts +0 -7
  303. package/fullstacked_modules/zod/src/v4/locales/uk.ts +0 -126
  304. package/fullstacked_modules/zod/src/v4/locales/ur.ts +0 -126
  305. package/fullstacked_modules/zod/src/v4/locales/vi.ts +0 -125
  306. package/fullstacked_modules/zod/src/v4/locales/yo.ts +0 -131
  307. package/fullstacked_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  308. package/fullstacked_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  309. package/fullstacked_modules/zod/src/v4/mini/checks.ts +0 -32
  310. package/fullstacked_modules/zod/src/v4/mini/coerce.ts +0 -22
  311. package/fullstacked_modules/zod/src/v4/mini/external.ts +0 -40
  312. package/fullstacked_modules/zod/src/v4/mini/index.ts +0 -3
  313. package/fullstacked_modules/zod/src/v4/mini/iso.ts +0 -62
  314. package/fullstacked_modules/zod/src/v4/mini/parse.ts +0 -14
  315. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +0 -1725
  316. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  317. package/fullstacked_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  318. package/fullstacked_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  319. package/fullstacked_modules/zod/src/v4/mini/tests/codec.test.ts +0 -529
  320. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  321. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  322. package/fullstacked_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  323. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +0 -899
  324. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  325. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +0 -200
  326. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  327. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  328. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +0 -315
  329. package/fullstacked_modules/zod/src/v4-mini/index.ts +0 -1
  330. package/fullstacked_modules/zod/v3/ZodError.cjs +0 -138
  331. package/fullstacked_modules/zod/v3/ZodError.d.cts +0 -164
  332. package/fullstacked_modules/zod/v3/ZodError.d.ts +0 -164
  333. package/fullstacked_modules/zod/v3/ZodError.js +0 -133
  334. package/fullstacked_modules/zod/v3/errors.cjs +0 -17
  335. package/fullstacked_modules/zod/v3/errors.d.cts +0 -5
  336. package/fullstacked_modules/zod/v3/errors.d.ts +0 -5
  337. package/fullstacked_modules/zod/v3/errors.js +0 -9
  338. package/fullstacked_modules/zod/v3/external.cjs +0 -22
  339. package/fullstacked_modules/zod/v3/external.d.cts +0 -6
  340. package/fullstacked_modules/zod/v3/external.d.ts +0 -6
  341. package/fullstacked_modules/zod/v3/external.js +0 -6
  342. package/fullstacked_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  343. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  344. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  345. package/fullstacked_modules/zod/v3/helpers/enumUtil.js +0 -1
  346. package/fullstacked_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  347. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  348. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  349. package/fullstacked_modules/zod/v3/helpers/errorUtil.js +0 -6
  350. package/fullstacked_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  351. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  352. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  353. package/fullstacked_modules/zod/v3/helpers/parseUtil.js +0 -109
  354. package/fullstacked_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  355. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  356. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  357. package/fullstacked_modules/zod/v3/helpers/partialUtil.js +0 -1
  358. package/fullstacked_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  359. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  360. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  361. package/fullstacked_modules/zod/v3/helpers/typeAliases.js +0 -1
  362. package/fullstacked_modules/zod/v3/helpers/util.cjs +0 -137
  363. package/fullstacked_modules/zod/v3/helpers/util.d.cts +0 -85
  364. package/fullstacked_modules/zod/v3/helpers/util.d.ts +0 -85
  365. package/fullstacked_modules/zod/v3/helpers/util.js +0 -133
  366. package/fullstacked_modules/zod/v3/index.cjs +0 -33
  367. package/fullstacked_modules/zod/v3/index.d.cts +0 -4
  368. package/fullstacked_modules/zod/v3/index.d.ts +0 -4
  369. package/fullstacked_modules/zod/v3/index.js +0 -4
  370. package/fullstacked_modules/zod/v3/locales/en.cjs +0 -112
  371. package/fullstacked_modules/zod/v3/locales/en.d.cts +0 -3
  372. package/fullstacked_modules/zod/v3/locales/en.d.ts +0 -3
  373. package/fullstacked_modules/zod/v3/locales/en.js +0 -109
  374. package/fullstacked_modules/zod/v3/package.json +0 -6
  375. package/fullstacked_modules/zod/v3/standard-schema.cjs +0 -2
  376. package/fullstacked_modules/zod/v3/standard-schema.d.cts +0 -102
  377. package/fullstacked_modules/zod/v3/standard-schema.d.ts +0 -102
  378. package/fullstacked_modules/zod/v3/standard-schema.js +0 -1
  379. package/fullstacked_modules/zod/v3/types.cjs +0 -3777
  380. package/fullstacked_modules/zod/v3/types.d.cts +0 -1034
  381. package/fullstacked_modules/zod/v3/types.d.ts +0 -1034
  382. package/fullstacked_modules/zod/v3/types.js +0 -3695
  383. package/fullstacked_modules/zod/v4/classic/checks.cjs +0 -32
  384. package/fullstacked_modules/zod/v4/classic/checks.d.cts +0 -1
  385. package/fullstacked_modules/zod/v4/classic/checks.d.ts +0 -1
  386. package/fullstacked_modules/zod/v4/classic/checks.js +0 -1
  387. package/fullstacked_modules/zod/v4/classic/coerce.cjs +0 -47
  388. package/fullstacked_modules/zod/v4/classic/coerce.d.cts +0 -17
  389. package/fullstacked_modules/zod/v4/classic/coerce.d.ts +0 -17
  390. package/fullstacked_modules/zod/v4/classic/coerce.js +0 -17
  391. package/fullstacked_modules/zod/v4/classic/compat.cjs +0 -61
  392. package/fullstacked_modules/zod/v4/classic/compat.d.cts +0 -50
  393. package/fullstacked_modules/zod/v4/classic/compat.d.ts +0 -50
  394. package/fullstacked_modules/zod/v4/classic/compat.js +0 -31
  395. package/fullstacked_modules/zod/v4/classic/errors.cjs +0 -74
  396. package/fullstacked_modules/zod/v4/classic/errors.d.cts +0 -30
  397. package/fullstacked_modules/zod/v4/classic/errors.d.ts +0 -30
  398. package/fullstacked_modules/zod/v4/classic/errors.js +0 -48
  399. package/fullstacked_modules/zod/v4/classic/external.cjs +0 -70
  400. package/fullstacked_modules/zod/v4/classic/external.d.cts +0 -13
  401. package/fullstacked_modules/zod/v4/classic/external.d.ts +0 -13
  402. package/fullstacked_modules/zod/v4/classic/external.js +0 -18
  403. package/fullstacked_modules/zod/v4/classic/index.cjs +0 -33
  404. package/fullstacked_modules/zod/v4/classic/index.d.cts +0 -4
  405. package/fullstacked_modules/zod/v4/classic/index.d.ts +0 -4
  406. package/fullstacked_modules/zod/v4/classic/index.js +0 -4
  407. package/fullstacked_modules/zod/v4/classic/iso.cjs +0 -60
  408. package/fullstacked_modules/zod/v4/classic/iso.d.cts +0 -22
  409. package/fullstacked_modules/zod/v4/classic/iso.d.ts +0 -22
  410. package/fullstacked_modules/zod/v4/classic/iso.js +0 -30
  411. package/fullstacked_modules/zod/v4/classic/package.json +0 -6
  412. package/fullstacked_modules/zod/v4/classic/parse.cjs +0 -41
  413. package/fullstacked_modules/zod/v4/classic/parse.d.cts +0 -31
  414. package/fullstacked_modules/zod/v4/classic/parse.d.ts +0 -31
  415. package/fullstacked_modules/zod/v4/classic/parse.js +0 -15
  416. package/fullstacked_modules/zod/v4/classic/schemas.cjs +0 -1151
  417. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +0 -673
  418. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +0 -673
  419. package/fullstacked_modules/zod/v4/classic/schemas.js +0 -1040
  420. package/fullstacked_modules/zod/v4/core/api.cjs +0 -1060
  421. package/fullstacked_modules/zod/v4/core/api.d.cts +0 -295
  422. package/fullstacked_modules/zod/v4/core/api.d.ts +0 -295
  423. package/fullstacked_modules/zod/v4/core/api.js +0 -925
  424. package/fullstacked_modules/zod/v4/core/checks.cjs +0 -595
  425. package/fullstacked_modules/zod/v4/core/checks.d.cts +0 -278
  426. package/fullstacked_modules/zod/v4/core/checks.d.ts +0 -278
  427. package/fullstacked_modules/zod/v4/core/checks.js +0 -569
  428. package/fullstacked_modules/zod/v4/core/core.cjs +0 -74
  429. package/fullstacked_modules/zod/v4/core/core.d.cts +0 -52
  430. package/fullstacked_modules/zod/v4/core/core.d.ts +0 -52
  431. package/fullstacked_modules/zod/v4/core/core.js +0 -67
  432. package/fullstacked_modules/zod/v4/core/doc.cjs +0 -39
  433. package/fullstacked_modules/zod/v4/core/doc.d.cts +0 -14
  434. package/fullstacked_modules/zod/v4/core/doc.d.ts +0 -14
  435. package/fullstacked_modules/zod/v4/core/doc.js +0 -35
  436. package/fullstacked_modules/zod/v4/core/errors.cjs +0 -213
  437. package/fullstacked_modules/zod/v4/core/errors.d.cts +0 -210
  438. package/fullstacked_modules/zod/v4/core/errors.d.ts +0 -210
  439. package/fullstacked_modules/zod/v4/core/errors.js +0 -182
  440. package/fullstacked_modules/zod/v4/core/index.cjs +0 -43
  441. package/fullstacked_modules/zod/v4/core/index.d.cts +0 -14
  442. package/fullstacked_modules/zod/v4/core/index.d.ts +0 -14
  443. package/fullstacked_modules/zod/v4/core/index.js +0 -14
  444. package/fullstacked_modules/zod/v4/core/json-schema.cjs +0 -2
  445. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +0 -88
  446. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +0 -88
  447. package/fullstacked_modules/zod/v4/core/json-schema.js +0 -1
  448. package/fullstacked_modules/zod/v4/core/package.json +0 -6
  449. package/fullstacked_modules/zod/v4/core/parse.cjs +0 -131
  450. package/fullstacked_modules/zod/v4/core/parse.d.cts +0 -49
  451. package/fullstacked_modules/zod/v4/core/parse.d.ts +0 -49
  452. package/fullstacked_modules/zod/v4/core/parse.js +0 -93
  453. package/fullstacked_modules/zod/v4/core/regexes.cjs +0 -136
  454. package/fullstacked_modules/zod/v4/core/regexes.d.cts +0 -78
  455. package/fullstacked_modules/zod/v4/core/regexes.d.ts +0 -78
  456. package/fullstacked_modules/zod/v4/core/regexes.js +0 -127
  457. package/fullstacked_modules/zod/v4/core/registries.cjs +0 -57
  458. package/fullstacked_modules/zod/v4/core/registries.d.cts +0 -35
  459. package/fullstacked_modules/zod/v4/core/registries.d.ts +0 -35
  460. package/fullstacked_modules/zod/v4/core/registries.js +0 -52
  461. package/fullstacked_modules/zod/v4/core/schemas.cjs +0 -1986
  462. package/fullstacked_modules/zod/v4/core/schemas.d.cts +0 -1113
  463. package/fullstacked_modules/zod/v4/core/schemas.d.ts +0 -1113
  464. package/fullstacked_modules/zod/v4/core/schemas.js +0 -1955
  465. package/fullstacked_modules/zod/v4/core/standard-schema.cjs +0 -2
  466. package/fullstacked_modules/zod/v4/core/standard-schema.d.cts +0 -55
  467. package/fullstacked_modules/zod/v4/core/standard-schema.d.ts +0 -55
  468. package/fullstacked_modules/zod/v4/core/standard-schema.js +0 -1
  469. package/fullstacked_modules/zod/v4/core/to-json-schema.cjs +0 -920
  470. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +0 -90
  471. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +0 -90
  472. package/fullstacked_modules/zod/v4/core/to-json-schema.js +0 -915
  473. package/fullstacked_modules/zod/v4/core/util.cjs +0 -658
  474. package/fullstacked_modules/zod/v4/core/util.d.cts +0 -197
  475. package/fullstacked_modules/zod/v4/core/util.d.ts +0 -197
  476. package/fullstacked_modules/zod/v4/core/util.js +0 -601
  477. package/fullstacked_modules/zod/v4/core/versions.cjs +0 -8
  478. package/fullstacked_modules/zod/v4/core/versions.d.cts +0 -5
  479. package/fullstacked_modules/zod/v4/core/versions.d.ts +0 -5
  480. package/fullstacked_modules/zod/v4/core/versions.js +0 -5
  481. package/fullstacked_modules/zod/v4/index.cjs +0 -22
  482. package/fullstacked_modules/zod/v4/index.d.cts +0 -3
  483. package/fullstacked_modules/zod/v4/index.d.ts +0 -3
  484. package/fullstacked_modules/zod/v4/index.js +0 -3
  485. package/fullstacked_modules/zod/v4/locales/ar.cjs +0 -143
  486. package/fullstacked_modules/zod/v4/locales/ar.d.cts +0 -5
  487. package/fullstacked_modules/zod/v4/locales/ar.d.ts +0 -4
  488. package/fullstacked_modules/zod/v4/locales/ar.js +0 -116
  489. package/fullstacked_modules/zod/v4/locales/az.cjs +0 -142
  490. package/fullstacked_modules/zod/v4/locales/az.d.cts +0 -5
  491. package/fullstacked_modules/zod/v4/locales/az.d.ts +0 -4
  492. package/fullstacked_modules/zod/v4/locales/az.js +0 -115
  493. package/fullstacked_modules/zod/v4/locales/be.cjs +0 -191
  494. package/fullstacked_modules/zod/v4/locales/be.d.cts +0 -5
  495. package/fullstacked_modules/zod/v4/locales/be.d.ts +0 -4
  496. package/fullstacked_modules/zod/v4/locales/be.js +0 -164
  497. package/fullstacked_modules/zod/v4/locales/bg.cjs +0 -156
  498. package/fullstacked_modules/zod/v4/locales/bg.d.cts +0 -5
  499. package/fullstacked_modules/zod/v4/locales/bg.d.ts +0 -5
  500. package/fullstacked_modules/zod/v4/locales/bg.js +0 -128
  501. package/fullstacked_modules/zod/v4/locales/ca.cjs +0 -145
  502. package/fullstacked_modules/zod/v4/locales/ca.d.cts +0 -5
  503. package/fullstacked_modules/zod/v4/locales/ca.d.ts +0 -4
  504. package/fullstacked_modules/zod/v4/locales/ca.js +0 -118
  505. package/fullstacked_modules/zod/v4/locales/cs.cjs +0 -162
  506. package/fullstacked_modules/zod/v4/locales/cs.d.cts +0 -5
  507. package/fullstacked_modules/zod/v4/locales/cs.d.ts +0 -4
  508. package/fullstacked_modules/zod/v4/locales/cs.js +0 -135
  509. package/fullstacked_modules/zod/v4/locales/da.cjs +0 -158
  510. package/fullstacked_modules/zod/v4/locales/da.d.cts +0 -5
  511. package/fullstacked_modules/zod/v4/locales/da.d.ts +0 -4
  512. package/fullstacked_modules/zod/v4/locales/da.js +0 -131
  513. package/fullstacked_modules/zod/v4/locales/de.cjs +0 -143
  514. package/fullstacked_modules/zod/v4/locales/de.d.cts +0 -5
  515. package/fullstacked_modules/zod/v4/locales/de.d.ts +0 -4
  516. package/fullstacked_modules/zod/v4/locales/de.js +0 -116
  517. package/fullstacked_modules/zod/v4/locales/en.cjs +0 -145
  518. package/fullstacked_modules/zod/v4/locales/en.d.cts +0 -5
  519. package/fullstacked_modules/zod/v4/locales/en.d.ts +0 -5
  520. package/fullstacked_modules/zod/v4/locales/en.js +0 -117
  521. package/fullstacked_modules/zod/v4/locales/eo.cjs +0 -144
  522. package/fullstacked_modules/zod/v4/locales/eo.d.cts +0 -5
  523. package/fullstacked_modules/zod/v4/locales/eo.d.ts +0 -5
  524. package/fullstacked_modules/zod/v4/locales/eo.js +0 -116
  525. package/fullstacked_modules/zod/v4/locales/es.cjs +0 -176
  526. package/fullstacked_modules/zod/v4/locales/es.d.cts +0 -5
  527. package/fullstacked_modules/zod/v4/locales/es.d.ts +0 -4
  528. package/fullstacked_modules/zod/v4/locales/es.js +0 -149
  529. package/fullstacked_modules/zod/v4/locales/fa.cjs +0 -149
  530. package/fullstacked_modules/zod/v4/locales/fa.d.cts +0 -5
  531. package/fullstacked_modules/zod/v4/locales/fa.d.ts +0 -4
  532. package/fullstacked_modules/zod/v4/locales/fa.js +0 -122
  533. package/fullstacked_modules/zod/v4/locales/fi.cjs +0 -149
  534. package/fullstacked_modules/zod/v4/locales/fi.d.cts +0 -5
  535. package/fullstacked_modules/zod/v4/locales/fi.d.ts +0 -4
  536. package/fullstacked_modules/zod/v4/locales/fi.js +0 -122
  537. package/fullstacked_modules/zod/v4/locales/fr-CA.cjs +0 -144
  538. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +0 -5
  539. package/fullstacked_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  540. package/fullstacked_modules/zod/v4/locales/fr-CA.js +0 -117
  541. package/fullstacked_modules/zod/v4/locales/fr.cjs +0 -143
  542. package/fullstacked_modules/zod/v4/locales/fr.d.cts +0 -5
  543. package/fullstacked_modules/zod/v4/locales/fr.d.ts +0 -4
  544. package/fullstacked_modules/zod/v4/locales/fr.js +0 -116
  545. package/fullstacked_modules/zod/v4/locales/he.cjs +0 -144
  546. package/fullstacked_modules/zod/v4/locales/he.d.cts +0 -5
  547. package/fullstacked_modules/zod/v4/locales/he.d.ts +0 -4
  548. package/fullstacked_modules/zod/v4/locales/he.js +0 -117
  549. package/fullstacked_modules/zod/v4/locales/hu.cjs +0 -144
  550. package/fullstacked_modules/zod/v4/locales/hu.d.cts +0 -5
  551. package/fullstacked_modules/zod/v4/locales/hu.d.ts +0 -4
  552. package/fullstacked_modules/zod/v4/locales/hu.js +0 -117
  553. package/fullstacked_modules/zod/v4/locales/id.cjs +0 -143
  554. package/fullstacked_modules/zod/v4/locales/id.d.cts +0 -5
  555. package/fullstacked_modules/zod/v4/locales/id.d.ts +0 -4
  556. package/fullstacked_modules/zod/v4/locales/id.js +0 -116
  557. package/fullstacked_modules/zod/v4/locales/index.cjs +0 -100
  558. package/fullstacked_modules/zod/v4/locales/index.d.cts +0 -47
  559. package/fullstacked_modules/zod/v4/locales/index.d.ts +0 -47
  560. package/fullstacked_modules/zod/v4/locales/index.js +0 -47
  561. package/fullstacked_modules/zod/v4/locales/is.cjs +0 -145
  562. package/fullstacked_modules/zod/v4/locales/is.d.cts +0 -5
  563. package/fullstacked_modules/zod/v4/locales/is.d.ts +0 -5
  564. package/fullstacked_modules/zod/v4/locales/is.js +0 -117
  565. package/fullstacked_modules/zod/v4/locales/it.cjs +0 -144
  566. package/fullstacked_modules/zod/v4/locales/it.d.cts +0 -5
  567. package/fullstacked_modules/zod/v4/locales/it.d.ts +0 -4
  568. package/fullstacked_modules/zod/v4/locales/it.js +0 -117
  569. package/fullstacked_modules/zod/v4/locales/ja.cjs +0 -142
  570. package/fullstacked_modules/zod/v4/locales/ja.d.cts +0 -5
  571. package/fullstacked_modules/zod/v4/locales/ja.d.ts +0 -4
  572. package/fullstacked_modules/zod/v4/locales/ja.js +0 -115
  573. package/fullstacked_modules/zod/v4/locales/ka.cjs +0 -153
  574. package/fullstacked_modules/zod/v4/locales/ka.d.cts +0 -5
  575. package/fullstacked_modules/zod/v4/locales/ka.d.ts +0 -5
  576. package/fullstacked_modules/zod/v4/locales/ka.js +0 -125
  577. package/fullstacked_modules/zod/v4/locales/kh.cjs +0 -12
  578. package/fullstacked_modules/zod/v4/locales/kh.d.cts +0 -5
  579. package/fullstacked_modules/zod/v4/locales/kh.d.ts +0 -5
  580. package/fullstacked_modules/zod/v4/locales/kh.js +0 -5
  581. package/fullstacked_modules/zod/v4/locales/km.cjs +0 -144
  582. package/fullstacked_modules/zod/v4/locales/km.d.cts +0 -5
  583. package/fullstacked_modules/zod/v4/locales/km.d.ts +0 -4
  584. package/fullstacked_modules/zod/v4/locales/km.js +0 -117
  585. package/fullstacked_modules/zod/v4/locales/ko.cjs +0 -148
  586. package/fullstacked_modules/zod/v4/locales/ko.d.cts +0 -5
  587. package/fullstacked_modules/zod/v4/locales/ko.d.ts +0 -4
  588. package/fullstacked_modules/zod/v4/locales/ko.js +0 -121
  589. package/fullstacked_modules/zod/v4/locales/lt.cjs +0 -258
  590. package/fullstacked_modules/zod/v4/locales/lt.d.cts +0 -5
  591. package/fullstacked_modules/zod/v4/locales/lt.d.ts +0 -5
  592. package/fullstacked_modules/zod/v4/locales/lt.js +0 -230
  593. package/fullstacked_modules/zod/v4/locales/mk.cjs +0 -145
  594. package/fullstacked_modules/zod/v4/locales/mk.d.cts +0 -5
  595. package/fullstacked_modules/zod/v4/locales/mk.d.ts +0 -4
  596. package/fullstacked_modules/zod/v4/locales/mk.js +0 -118
  597. package/fullstacked_modules/zod/v4/locales/ms.cjs +0 -143
  598. package/fullstacked_modules/zod/v4/locales/ms.d.cts +0 -5
  599. package/fullstacked_modules/zod/v4/locales/ms.d.ts +0 -4
  600. package/fullstacked_modules/zod/v4/locales/ms.js +0 -116
  601. package/fullstacked_modules/zod/v4/locales/nl.cjs +0 -144
  602. package/fullstacked_modules/zod/v4/locales/nl.d.cts +0 -5
  603. package/fullstacked_modules/zod/v4/locales/nl.d.ts +0 -4
  604. package/fullstacked_modules/zod/v4/locales/nl.js +0 -117
  605. package/fullstacked_modules/zod/v4/locales/no.cjs +0 -143
  606. package/fullstacked_modules/zod/v4/locales/no.d.cts +0 -5
  607. package/fullstacked_modules/zod/v4/locales/no.d.ts +0 -4
  608. package/fullstacked_modules/zod/v4/locales/no.js +0 -116
  609. package/fullstacked_modules/zod/v4/locales/ota.cjs +0 -144
  610. package/fullstacked_modules/zod/v4/locales/ota.d.cts +0 -5
  611. package/fullstacked_modules/zod/v4/locales/ota.d.ts +0 -4
  612. package/fullstacked_modules/zod/v4/locales/ota.js +0 -117
  613. package/fullstacked_modules/zod/v4/locales/package.json +0 -6
  614. package/fullstacked_modules/zod/v4/locales/pl.cjs +0 -144
  615. package/fullstacked_modules/zod/v4/locales/pl.d.cts +0 -5
  616. package/fullstacked_modules/zod/v4/locales/pl.d.ts +0 -4
  617. package/fullstacked_modules/zod/v4/locales/pl.js +0 -117
  618. package/fullstacked_modules/zod/v4/locales/ps.cjs +0 -149
  619. package/fullstacked_modules/zod/v4/locales/ps.d.cts +0 -5
  620. package/fullstacked_modules/zod/v4/locales/ps.d.ts +0 -4
  621. package/fullstacked_modules/zod/v4/locales/ps.js +0 -122
  622. package/fullstacked_modules/zod/v4/locales/pt.cjs +0 -143
  623. package/fullstacked_modules/zod/v4/locales/pt.d.cts +0 -5
  624. package/fullstacked_modules/zod/v4/locales/pt.d.ts +0 -4
  625. package/fullstacked_modules/zod/v4/locales/pt.js +0 -116
  626. package/fullstacked_modules/zod/v4/locales/ru.cjs +0 -191
  627. package/fullstacked_modules/zod/v4/locales/ru.d.cts +0 -5
  628. package/fullstacked_modules/zod/v4/locales/ru.d.ts +0 -4
  629. package/fullstacked_modules/zod/v4/locales/ru.js +0 -164
  630. package/fullstacked_modules/zod/v4/locales/sl.cjs +0 -144
  631. package/fullstacked_modules/zod/v4/locales/sl.d.cts +0 -5
  632. package/fullstacked_modules/zod/v4/locales/sl.d.ts +0 -4
  633. package/fullstacked_modules/zod/v4/locales/sl.js +0 -117
  634. package/fullstacked_modules/zod/v4/locales/sv.cjs +0 -145
  635. package/fullstacked_modules/zod/v4/locales/sv.d.cts +0 -5
  636. package/fullstacked_modules/zod/v4/locales/sv.d.ts +0 -4
  637. package/fullstacked_modules/zod/v4/locales/sv.js +0 -118
  638. package/fullstacked_modules/zod/v4/locales/ta.cjs +0 -144
  639. package/fullstacked_modules/zod/v4/locales/ta.d.cts +0 -5
  640. package/fullstacked_modules/zod/v4/locales/ta.d.ts +0 -4
  641. package/fullstacked_modules/zod/v4/locales/ta.js +0 -117
  642. package/fullstacked_modules/zod/v4/locales/th.cjs +0 -144
  643. package/fullstacked_modules/zod/v4/locales/th.d.cts +0 -5
  644. package/fullstacked_modules/zod/v4/locales/th.d.ts +0 -4
  645. package/fullstacked_modules/zod/v4/locales/th.js +0 -117
  646. package/fullstacked_modules/zod/v4/locales/tr.cjs +0 -143
  647. package/fullstacked_modules/zod/v4/locales/tr.d.cts +0 -5
  648. package/fullstacked_modules/zod/v4/locales/tr.d.ts +0 -5
  649. package/fullstacked_modules/zod/v4/locales/tr.js +0 -115
  650. package/fullstacked_modules/zod/v4/locales/ua.cjs +0 -12
  651. package/fullstacked_modules/zod/v4/locales/ua.d.cts +0 -5
  652. package/fullstacked_modules/zod/v4/locales/ua.d.ts +0 -5
  653. package/fullstacked_modules/zod/v4/locales/ua.js +0 -5
  654. package/fullstacked_modules/zod/v4/locales/uk.cjs +0 -144
  655. package/fullstacked_modules/zod/v4/locales/uk.d.cts +0 -5
  656. package/fullstacked_modules/zod/v4/locales/uk.d.ts +0 -4
  657. package/fullstacked_modules/zod/v4/locales/uk.js +0 -117
  658. package/fullstacked_modules/zod/v4/locales/ur.cjs +0 -144
  659. package/fullstacked_modules/zod/v4/locales/ur.d.cts +0 -5
  660. package/fullstacked_modules/zod/v4/locales/ur.d.ts +0 -4
  661. package/fullstacked_modules/zod/v4/locales/ur.js +0 -117
  662. package/fullstacked_modules/zod/v4/locales/vi.cjs +0 -143
  663. package/fullstacked_modules/zod/v4/locales/vi.d.cts +0 -5
  664. package/fullstacked_modules/zod/v4/locales/vi.d.ts +0 -4
  665. package/fullstacked_modules/zod/v4/locales/vi.js +0 -116
  666. package/fullstacked_modules/zod/v4/locales/yo.cjs +0 -142
  667. package/fullstacked_modules/zod/v4/locales/yo.d.cts +0 -5
  668. package/fullstacked_modules/zod/v4/locales/yo.d.ts +0 -4
  669. package/fullstacked_modules/zod/v4/locales/yo.js +0 -115
  670. package/fullstacked_modules/zod/v4/locales/zh-CN.cjs +0 -143
  671. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +0 -5
  672. package/fullstacked_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  673. package/fullstacked_modules/zod/v4/locales/zh-CN.js +0 -116
  674. package/fullstacked_modules/zod/v4/locales/zh-TW.cjs +0 -144
  675. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +0 -5
  676. package/fullstacked_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  677. package/fullstacked_modules/zod/v4/locales/zh-TW.js +0 -117
  678. package/fullstacked_modules/zod/v4/mini/checks.cjs +0 -34
  679. package/fullstacked_modules/zod/v4/mini/checks.d.cts +0 -1
  680. package/fullstacked_modules/zod/v4/mini/checks.d.ts +0 -1
  681. package/fullstacked_modules/zod/v4/mini/checks.js +0 -1
  682. package/fullstacked_modules/zod/v4/mini/coerce.cjs +0 -47
  683. package/fullstacked_modules/zod/v4/mini/coerce.d.cts +0 -7
  684. package/fullstacked_modules/zod/v4/mini/coerce.d.ts +0 -7
  685. package/fullstacked_modules/zod/v4/mini/coerce.js +0 -17
  686. package/fullstacked_modules/zod/v4/mini/external.cjs +0 -62
  687. package/fullstacked_modules/zod/v4/mini/external.d.cts +0 -11
  688. package/fullstacked_modules/zod/v4/mini/external.d.ts +0 -11
  689. package/fullstacked_modules/zod/v4/mini/external.js +0 -13
  690. package/fullstacked_modules/zod/v4/mini/index.cjs +0 -32
  691. package/fullstacked_modules/zod/v4/mini/index.d.cts +0 -3
  692. package/fullstacked_modules/zod/v4/mini/index.d.ts +0 -3
  693. package/fullstacked_modules/zod/v4/mini/index.js +0 -3
  694. package/fullstacked_modules/zod/v4/mini/iso.cjs +0 -60
  695. package/fullstacked_modules/zod/v4/mini/iso.d.cts +0 -22
  696. package/fullstacked_modules/zod/v4/mini/iso.d.ts +0 -22
  697. package/fullstacked_modules/zod/v4/mini/iso.js +0 -30
  698. package/fullstacked_modules/zod/v4/mini/package.json +0 -6
  699. package/fullstacked_modules/zod/v4/mini/parse.cjs +0 -16
  700. package/fullstacked_modules/zod/v4/mini/parse.d.cts +0 -1
  701. package/fullstacked_modules/zod/v4/mini/parse.d.ts +0 -1
  702. package/fullstacked_modules/zod/v4/mini/parse.js +0 -1
  703. package/fullstacked_modules/zod/v4/mini/schemas.cjs +0 -892
  704. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +0 -407
  705. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +0 -407
  706. package/fullstacked_modules/zod/v4/mini/schemas.js +0 -775
  707. package/fullstacked_modules/zod/v4/package.json +0 -6
  708. package/fullstacked_modules/zod/v4-mini/index.cjs +0 -17
  709. package/fullstacked_modules/zod/v4-mini/index.d.cts +0 -1
  710. package/fullstacked_modules/zod/v4-mini/index.d.ts +0 -1
  711. package/fullstacked_modules/zod/v4-mini/index.js +0 -1
  712. package/fullstacked_modules/zod/v4-mini/package.json +0 -6
  713. /package/fullstacked_modules/{platform/index.ts → platform.ts} +0 -0
@@ -1,1621 +0,0 @@
1
- import * as checks from "./checks.js";
2
- import type * as core from "./core.js";
3
- import type * as errors from "./errors.js";
4
- import * as schemas from "./schemas.js";
5
- import * as util from "./util.js";
6
-
7
- export type Params<
8
- T extends schemas.$ZodType | checks.$ZodCheck,
9
- IssueTypes extends errors.$ZodIssueBase,
10
- OmitKeys extends keyof T["_zod"]["def"] = never,
11
- > = util.Flatten<
12
- Partial<
13
- util.EmptyToNever<
14
- Omit<T["_zod"]["def"], OmitKeys> &
15
- ([IssueTypes] extends [never]
16
- ? {} // unknown
17
- : {
18
- error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;
19
- /** @deprecated This parameter is deprecated. Use `error` instead. */
20
- message?: string | undefined; // supported in Zod 3
21
- })
22
- >
23
- >
24
- >;
25
-
26
- export type TypeParams<
27
- T extends schemas.$ZodType = schemas.$ZodType & { _isst: never },
28
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never,
29
- > = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
30
-
31
- // strips types that are not exposed in the public factory
32
- // incl. `error`, `check`
33
- export type CheckParams<
34
- T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },
35
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never,
36
- > = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
37
-
38
- // strips types that are not exposed in the public factory
39
- // incl. `type`, `checks`, `error`, `check`, `format`
40
- export type StringFormatParams<
41
- T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,
42
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never,
43
- > = Params<
44
- T,
45
- NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>,
46
- "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit
47
- >;
48
-
49
- export type CheckStringFormatParams<
50
- T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat,
51
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never,
52
- > = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
53
-
54
- export type CheckTypeParams<
55
- T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck,
56
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never,
57
- > = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
58
-
59
- // String
60
- export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;
61
- export function _string<T extends schemas.$ZodString>(
62
- Class: util.SchemaClass<T>,
63
- params?: string | $ZodStringParams
64
- ): T {
65
- return new Class({
66
- type: "string",
67
- ...util.normalizeParams(params),
68
- });
69
- }
70
-
71
- export function _coercedString<T extends schemas.$ZodString>(
72
- Class: util.SchemaClass<T>,
73
- params?: string | $ZodStringParams
74
- ): T {
75
- return new Class({
76
- type: "string",
77
- coerce: true,
78
- ...util.normalizeParams(params),
79
- });
80
- }
81
-
82
- export type $ZodStringFormatParams = CheckTypeParams<
83
- schemas.$ZodStringFormat,
84
- "format" | "coerce" | "when" | "pattern"
85
- >;
86
- export type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, "format">;
87
- // custom format
88
-
89
- // Email
90
- export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail, "when">;
91
- export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail, "when">;
92
- export function _email<T extends schemas.$ZodEmail>(
93
- Class: util.SchemaClass<T>,
94
- params?: string | $ZodEmailParams | $ZodCheckEmailParams
95
- ): T {
96
- return new Class({
97
- type: "string",
98
- format: "email",
99
- check: "string_format",
100
- abort: false,
101
- ...util.normalizeParams(params),
102
- });
103
- }
104
-
105
- // GUID
106
- export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
107
- export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern" | "when">;
108
- export function _guid<T extends schemas.$ZodGUID>(
109
- Class: util.SchemaClass<T>,
110
- params?: string | $ZodGUIDParams | $ZodCheckGUIDParams
111
- ): T {
112
- return new Class({
113
- type: "string",
114
- format: "guid",
115
- check: "string_format",
116
- abort: false,
117
- ...util.normalizeParams(params),
118
- });
119
- }
120
-
121
- // UUID
122
- export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
123
- export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
124
- export function _uuid<T extends schemas.$ZodUUID>(
125
- Class: util.SchemaClass<T>,
126
- params?: string | $ZodUUIDParams | $ZodCheckUUIDParams
127
- ): T {
128
- return new Class({
129
- type: "string",
130
- format: "uuid",
131
- check: "string_format",
132
- abort: false,
133
- ...util.normalizeParams(params),
134
- });
135
- }
136
-
137
- // UUIDv4
138
- export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
139
- export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
140
- export function _uuidv4<T extends schemas.$ZodUUID>(
141
- Class: util.SchemaClass<T>,
142
- params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params
143
- ): T {
144
- return new Class({
145
- type: "string",
146
- format: "uuid",
147
- check: "string_format",
148
- abort: false,
149
- version: "v4",
150
- ...util.normalizeParams(params),
151
- });
152
- }
153
-
154
- // UUIDv6
155
- export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
156
- export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
157
- export function _uuidv6<T extends schemas.$ZodUUID>(
158
- Class: util.SchemaClass<T>,
159
- params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params
160
- ): T {
161
- return new Class({
162
- type: "string",
163
- format: "uuid",
164
- check: "string_format",
165
- abort: false,
166
- version: "v6",
167
- ...util.normalizeParams(params),
168
- });
169
- }
170
-
171
- // UUIDv7
172
- export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
173
- export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern" | "when">;
174
- export function _uuidv7<T extends schemas.$ZodUUID>(
175
- Class: util.SchemaClass<T>,
176
- params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params
177
- ): T {
178
- return new Class({
179
- type: "string",
180
- format: "uuid",
181
- check: "string_format",
182
- abort: false,
183
- version: "v7",
184
- ...util.normalizeParams(params),
185
- });
186
- }
187
-
188
- // URL
189
- export type $ZodURLParams = StringFormatParams<schemas.$ZodURL, "when">;
190
- export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL, "when">;
191
- export function _url<T extends schemas.$ZodURL>(
192
- Class: util.SchemaClass<T>,
193
- params?: string | $ZodURLParams | $ZodCheckURLParams
194
- ): T {
195
- return new Class({
196
- type: "string",
197
- format: "url",
198
- check: "string_format",
199
- abort: false,
200
- ...util.normalizeParams(params),
201
- });
202
- }
203
-
204
- // Emoji
205
- export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji, "when">;
206
- export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji, "when">;
207
- export function _emoji<T extends schemas.$ZodEmoji>(
208
- Class: util.SchemaClass<T>,
209
- params?: string | $ZodEmojiParams | $ZodCheckEmojiParams
210
- ): T {
211
- return new Class({
212
- type: "string",
213
- format: "emoji",
214
- check: "string_format",
215
- abort: false,
216
- ...util.normalizeParams(params),
217
- });
218
- }
219
-
220
- // NanoID
221
- export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID, "when">;
222
- export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID, "when">;
223
- export function _nanoid<T extends schemas.$ZodNanoID>(
224
- Class: util.SchemaClass<T>,
225
- params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams
226
- ): T {
227
- return new Class({
228
- type: "string",
229
- format: "nanoid",
230
- check: "string_format",
231
- abort: false,
232
- ...util.normalizeParams(params),
233
- });
234
- }
235
-
236
- // CUID
237
- export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID, "when">;
238
- export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID, "when">;
239
- export function _cuid<T extends schemas.$ZodCUID>(
240
- Class: util.SchemaClass<T>,
241
- params?: string | $ZodCUIDParams | $ZodCheckCUIDParams
242
- ): T {
243
- return new Class({
244
- type: "string",
245
- format: "cuid",
246
- check: "string_format",
247
- abort: false,
248
- ...util.normalizeParams(params),
249
- });
250
- }
251
-
252
- // CUID2
253
- export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2, "when">;
254
- export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2, "when">;
255
- export function _cuid2<T extends schemas.$ZodCUID2>(
256
- Class: util.SchemaClass<T>,
257
- params?: string | $ZodCUID2Params | $ZodCheckCUID2Params
258
- ): T {
259
- return new Class({
260
- type: "string",
261
- format: "cuid2",
262
- check: "string_format",
263
- abort: false,
264
- ...util.normalizeParams(params),
265
- });
266
- }
267
-
268
- // ULID
269
- export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID, "when">;
270
- export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID, "when">;
271
- export function _ulid<T extends schemas.$ZodULID>(
272
- Class: util.SchemaClass<T>,
273
- params?: string | $ZodULIDParams | $ZodCheckULIDParams
274
- ): T {
275
- return new Class({
276
- type: "string",
277
- format: "ulid",
278
- check: "string_format",
279
- abort: false,
280
- ...util.normalizeParams(params),
281
- });
282
- }
283
-
284
- // XID
285
- export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID, "when">;
286
- export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID, "when">;
287
- export function _xid<T extends schemas.$ZodXID>(
288
- Class: util.SchemaClass<T>,
289
- params?: string | $ZodXIDParams | $ZodCheckXIDParams
290
- ): T {
291
- return new Class({
292
- type: "string",
293
- format: "xid",
294
- check: "string_format",
295
- abort: false,
296
- ...util.normalizeParams(params),
297
- });
298
- }
299
-
300
- // KSUID
301
- export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID, "when">;
302
- export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID, "when">;
303
- export function _ksuid<T extends schemas.$ZodKSUID>(
304
- Class: util.SchemaClass<T>,
305
- params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams
306
- ): T {
307
- return new Class({
308
- type: "string",
309
- format: "ksuid",
310
- check: "string_format",
311
- abort: false,
312
- ...util.normalizeParams(params),
313
- });
314
- }
315
-
316
- // IPv4
317
- export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
318
- export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when" | "version">;
319
- export function _ipv4<T extends schemas.$ZodIPv4>(
320
- Class: util.SchemaClass<T>,
321
- params?: string | $ZodIPv4Params | $ZodCheckIPv4Params
322
- ): T {
323
- return new Class({
324
- type: "string",
325
- format: "ipv4",
326
- check: "string_format",
327
- abort: false,
328
- ...util.normalizeParams(params),
329
- });
330
- }
331
-
332
- // IPv6
333
- export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
334
- export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when" | "version">;
335
- export function _ipv6<T extends schemas.$ZodIPv6>(
336
- Class: util.SchemaClass<T>,
337
- params?: string | $ZodIPv6Params | $ZodCheckIPv6Params
338
- ): T {
339
- return new Class({
340
- type: "string",
341
- format: "ipv6",
342
- check: "string_format",
343
- abort: false,
344
- ...util.normalizeParams(params),
345
- });
346
- }
347
-
348
- // CIDRv4
349
- export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
350
- export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern" | "when">;
351
- export function _cidrv4<T extends schemas.$ZodCIDRv4>(
352
- Class: util.SchemaClass<T>,
353
- params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params
354
- ): T {
355
- return new Class({
356
- type: "string",
357
- format: "cidrv4",
358
- check: "string_format",
359
- abort: false,
360
- ...util.normalizeParams(params),
361
- });
362
- }
363
-
364
- // CIDRv6
365
- export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
366
- export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern" | "when">;
367
- export function _cidrv6<T extends schemas.$ZodCIDRv6>(
368
- Class: util.SchemaClass<T>,
369
- params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params
370
- ): T {
371
- return new Class({
372
- type: "string",
373
- format: "cidrv6",
374
- check: "string_format",
375
- abort: false,
376
- ...util.normalizeParams(params),
377
- });
378
- }
379
-
380
- // Base64
381
- export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
382
- export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern" | "when">;
383
- export function _base64<T extends schemas.$ZodBase64>(
384
- Class: util.SchemaClass<T>,
385
- params?: string | $ZodBase64Params | $ZodCheckBase64Params
386
- ): T {
387
- return new Class({
388
- type: "string",
389
- format: "base64",
390
- check: "string_format",
391
- abort: false,
392
- ...util.normalizeParams(params),
393
- });
394
- }
395
-
396
- // base64url
397
- export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
398
- export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern" | "when">;
399
- export function _base64url<T extends schemas.$ZodBase64URL>(
400
- Class: util.SchemaClass<T>,
401
- params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams
402
- ): T {
403
- return new Class({
404
- type: "string",
405
- format: "base64url",
406
- check: "string_format",
407
- abort: false,
408
- ...util.normalizeParams(params),
409
- });
410
- }
411
-
412
- // E164
413
- export type $ZodE164Params = StringFormatParams<schemas.$ZodE164, "when">;
414
- export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164, "when">;
415
- export function _e164<T extends schemas.$ZodE164>(
416
- Class: util.SchemaClass<T>,
417
- params?: string | $ZodE164Params | $ZodCheckE164Params
418
- ): T {
419
- return new Class({
420
- type: "string",
421
- format: "e164",
422
- check: "string_format",
423
- abort: false,
424
- ...util.normalizeParams(params),
425
- });
426
- }
427
-
428
- // JWT
429
- export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
430
- export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern" | "when">;
431
- export function _jwt<T extends schemas.$ZodJWT>(
432
- Class: util.SchemaClass<T>,
433
- params?: string | $ZodJWTParams | $ZodCheckJWTParams
434
- ): T {
435
- return new Class({
436
- type: "string",
437
- format: "jwt",
438
- check: "string_format",
439
- abort: false,
440
- ...util.normalizeParams(params),
441
- });
442
- }
443
-
444
- export const TimePrecision = {
445
- Any: null,
446
- Minute: -1,
447
- Second: 0,
448
- Millisecond: 3,
449
- Microsecond: 6,
450
- } as const;
451
- // ISODateTime
452
- export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
453
- export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern" | "when">;
454
- export function _isoDateTime<T extends schemas.$ZodISODateTime>(
455
- Class: util.SchemaClass<T>,
456
- params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams
457
- ): T {
458
- return new Class({
459
- type: "string",
460
- format: "datetime",
461
- check: "string_format",
462
- offset: false,
463
- local: false,
464
- precision: null,
465
- ...util.normalizeParams(params),
466
- });
467
- }
468
-
469
- // ISODate
470
- export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
471
- export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern" | "when">;
472
- export function _isoDate<T extends schemas.$ZodISODate>(
473
- Class: util.SchemaClass<T>,
474
- params?: string | $ZodISODateParams | $ZodCheckISODateParams
475
- ): T {
476
- return new Class({
477
- type: "string",
478
- format: "date",
479
- check: "string_format",
480
- ...util.normalizeParams(params),
481
- });
482
- }
483
-
484
- // ISOTime
485
- export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
486
- export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern" | "when">;
487
- export function _isoTime<T extends schemas.$ZodISOTime>(
488
- Class: util.SchemaClass<T>,
489
- params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams
490
- ): T {
491
- return new Class({
492
- type: "string",
493
- format: "time",
494
- check: "string_format",
495
- precision: null,
496
- ...util.normalizeParams(params),
497
- });
498
- }
499
-
500
- // ISODuration
501
- export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration, "when">;
502
- export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration, "when">;
503
- export function _isoDuration<T extends schemas.$ZodISODuration>(
504
- Class: util.SchemaClass<T>,
505
- params?: string | $ZodISODurationParams | $ZodCheckISODurationParams
506
- ): T {
507
- return new Class({
508
- type: "string",
509
- format: "duration",
510
- check: "string_format",
511
- ...util.normalizeParams(params),
512
- });
513
- }
514
-
515
- // Number
516
- export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce">;
517
- export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;
518
- export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format" | "when">;
519
- export function _number<T extends schemas.$ZodNumber>(
520
- Class: util.SchemaClass<T>,
521
- params?: string | $ZodNumberParams
522
- ): T {
523
- return new Class({
524
- type: "number",
525
- checks: [],
526
- ...util.normalizeParams(params),
527
- });
528
- }
529
-
530
- export function _coercedNumber<T extends schemas.$ZodNumber>(
531
- Class: util.SchemaClass<T>,
532
- params?: string | $ZodNumberParams
533
- ): T {
534
- return new Class({
535
- type: "number",
536
- coerce: true,
537
- checks: [],
538
- ...util.normalizeParams(params),
539
- });
540
- }
541
-
542
- export function _int<T extends schemas.$ZodNumberFormat>(
543
- Class: util.SchemaClass<T>,
544
- params?: string | $ZodCheckNumberFormatParams
545
- ): T {
546
- return new Class({
547
- type: "number",
548
- check: "number_format",
549
- abort: false,
550
- format: "safeint",
551
- ...util.normalizeParams(params),
552
- });
553
- }
554
- export function _float32<T extends schemas.$ZodNumberFormat>(
555
- Class: util.SchemaClass<T>,
556
- params?: string | $ZodCheckNumberFormatParams
557
- ): T {
558
- return new Class({
559
- type: "number",
560
- check: "number_format",
561
- abort: false,
562
- format: "float32",
563
- ...util.normalizeParams(params),
564
- });
565
- }
566
- export function _float64<T extends schemas.$ZodNumberFormat>(
567
- Class: util.SchemaClass<T>,
568
- params?: string | $ZodCheckNumberFormatParams
569
- ): T {
570
- return new Class({
571
- type: "number",
572
- check: "number_format",
573
- abort: false,
574
- format: "float64",
575
- ...util.normalizeParams(params),
576
- });
577
- }
578
- export function _int32<T extends schemas.$ZodNumberFormat>(
579
- Class: util.SchemaClass<T>,
580
- params?: string | $ZodCheckNumberFormatParams
581
- ): T {
582
- return new Class({
583
- type: "number",
584
- check: "number_format",
585
- abort: false,
586
- format: "int32",
587
- ...util.normalizeParams(params),
588
- });
589
- }
590
- export function _uint32<T extends schemas.$ZodNumberFormat>(
591
- Class: util.SchemaClass<T>,
592
- params?: string | $ZodCheckNumberFormatParams
593
- ): T {
594
- return new Class({
595
- type: "number",
596
- check: "number_format",
597
- abort: false,
598
- format: "uint32",
599
- ...util.normalizeParams(params),
600
- });
601
- }
602
-
603
- // Boolean
604
- export type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, "coerce">;
605
- export function _boolean<T extends schemas.$ZodBoolean>(
606
- Class: util.SchemaClass<T>,
607
- params?: string | $ZodBooleanParams
608
- ): T {
609
- return new Class({
610
- type: "boolean",
611
- ...util.normalizeParams(params),
612
- });
613
- }
614
- export function _coercedBoolean<T extends schemas.$ZodBoolean>(
615
- Class: util.SchemaClass<T>,
616
- params?: string | $ZodBooleanParams
617
- ): T {
618
- return new Class({
619
- type: "boolean",
620
- coerce: true,
621
- ...util.normalizeParams(params),
622
- });
623
- }
624
-
625
- // BigInt
626
- export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;
627
- export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;
628
- export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format" | "when">;
629
- export function _bigint<T extends schemas.$ZodBigInt>(
630
- Class: util.SchemaClass<T>,
631
- params?: string | $ZodBigIntParams
632
- ): T {
633
- return new Class({
634
- type: "bigint",
635
- ...util.normalizeParams(params),
636
- });
637
- }
638
- export function _coercedBigint<T extends schemas.$ZodBigInt>(
639
- Class: util.SchemaClass<T>,
640
- params?: string | $ZodBigIntParams
641
- ): T {
642
- return new Class({
643
- type: "bigint",
644
- coerce: true,
645
- ...util.normalizeParams(params),
646
- });
647
- }
648
-
649
- export function _int64<T extends schemas.$ZodBigIntFormat>(
650
- Class: util.SchemaClass<T>,
651
- params?: string | $ZodBigIntFormatParams
652
- ): T {
653
- return new Class({
654
- type: "bigint",
655
- check: "bigint_format",
656
- abort: false,
657
- format: "int64",
658
- ...util.normalizeParams(params),
659
- });
660
- }
661
- export function _uint64<T extends schemas.$ZodBigIntFormat>(
662
- Class: util.SchemaClass<T>,
663
- params?: string | $ZodBigIntFormatParams
664
- ): T {
665
- return new Class({
666
- type: "bigint",
667
- check: "bigint_format",
668
- abort: false,
669
- format: "uint64",
670
- ...util.normalizeParams(params),
671
- });
672
- }
673
-
674
- // Symbol
675
- export type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;
676
- export function _symbol<T extends schemas.$ZodSymbol>(
677
- Class: util.SchemaClass<T>,
678
- params?: string | $ZodSymbolParams
679
- ): T {
680
- return new Class({
681
- type: "symbol",
682
- ...util.normalizeParams(params),
683
- });
684
- }
685
-
686
- // Undefined
687
- export type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;
688
- export function _undefined<T extends schemas.$ZodUndefined>(
689
- Class: util.SchemaClass<T>,
690
- params?: string | $ZodUndefinedParams
691
- ): T {
692
- return new Class({
693
- type: "undefined",
694
- ...util.normalizeParams(params),
695
- });
696
- }
697
-
698
- // Null
699
- export type $ZodNullParams = TypeParams<schemas.$ZodNull>;
700
- export function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T {
701
- return new Class({
702
- type: "null",
703
- ...util.normalizeParams(params),
704
- });
705
- }
706
-
707
- // Any
708
- export type $ZodAnyParams = TypeParams<schemas.$ZodAny>;
709
- export function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T {
710
- return new Class({
711
- type: "any",
712
- });
713
- }
714
-
715
- // Unknown
716
- export type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;
717
- export function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T {
718
- return new Class({
719
- type: "unknown",
720
- });
721
- }
722
-
723
- // Never
724
- export type $ZodNeverParams = TypeParams<schemas.$ZodNever>;
725
- export function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T {
726
- return new Class({
727
- type: "never",
728
- ...util.normalizeParams(params),
729
- });
730
- }
731
-
732
- // Void
733
- export type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;
734
- export function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T {
735
- return new Class({
736
- type: "void",
737
- ...util.normalizeParams(params),
738
- });
739
- }
740
-
741
- // Date
742
- export type $ZodDateParams = TypeParams<schemas.$ZodDate, "coerce">;
743
- export function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T {
744
- return new Class({
745
- type: "date",
746
- ...util.normalizeParams(params),
747
- });
748
- }
749
- export function _coercedDate<T extends schemas.$ZodDate>(
750
- Class: util.SchemaClass<T>,
751
- params?: string | $ZodDateParams
752
- ): T {
753
- return new Class({
754
- type: "date",
755
- coerce: true,
756
- ...util.normalizeParams(params),
757
- });
758
- }
759
-
760
- // NaN
761
- export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;
762
- export function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T {
763
- return new Class({
764
- type: "nan",
765
- ...util.normalizeParams(params),
766
- });
767
- }
768
-
769
- // export type $ZodCheckParams = CheckParams<checks.$ZodCheck, "abort" | "when">;
770
-
771
- export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value" | "when">;
772
- export function _lt(
773
- value: util.Numeric,
774
- params?: string | $ZodCheckLessThanParams
775
- ): checks.$ZodCheckLessThan<util.Numeric> {
776
- return new checks.$ZodCheckLessThan({
777
- check: "less_than",
778
- ...util.normalizeParams(params),
779
- value,
780
- inclusive: false,
781
- });
782
- }
783
-
784
- export function _lte(
785
- value: util.Numeric,
786
- params?: string | $ZodCheckLessThanParams
787
- ): checks.$ZodCheckLessThan<util.Numeric> {
788
- return new checks.$ZodCheckLessThan({
789
- check: "less_than",
790
-
791
- ...util.normalizeParams(params),
792
- value,
793
- inclusive: true,
794
- });
795
- }
796
- export {
797
- /** @deprecated Use `z.lte()` instead. */
798
- _lte as _max,
799
- };
800
-
801
- // ZodCheckGreaterThan
802
- export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
803
- export function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {
804
- return new checks.$ZodCheckGreaterThan({
805
- check: "greater_than",
806
-
807
- ...util.normalizeParams(params),
808
- value,
809
- inclusive: false,
810
- });
811
- }
812
-
813
- export function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {
814
- return new checks.$ZodCheckGreaterThan({
815
- check: "greater_than",
816
- ...util.normalizeParams(params),
817
- value,
818
- inclusive: true,
819
- });
820
- }
821
-
822
- export {
823
- /** @deprecated Use `z.gte()` instead. */
824
- _gte as _min,
825
- };
826
-
827
- export function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {
828
- return _gt(0, params);
829
- }
830
-
831
- // negative
832
- export function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan {
833
- return _lt(0, params);
834
- }
835
-
836
- // nonpositive
837
- export function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan {
838
- return _lte(0, params);
839
- }
840
-
841
- // nonnegative
842
- export function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan {
843
- return _gte(0, params);
844
- }
845
-
846
- export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value" | "when">;
847
- export function _multipleOf(
848
- value: number | bigint,
849
- params?: string | $ZodCheckMultipleOfParams
850
- ): checks.$ZodCheckMultipleOf {
851
- return new checks.$ZodCheckMultipleOf({
852
- check: "multiple_of",
853
- ...util.normalizeParams(params),
854
- value,
855
- });
856
- }
857
-
858
- export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum" | "when">;
859
- export function _maxSize(
860
- maximum: number,
861
- params?: string | $ZodCheckMaxSizeParams
862
- ): checks.$ZodCheckMaxSize<util.HasSize> {
863
- return new checks.$ZodCheckMaxSize({
864
- check: "max_size",
865
- ...util.normalizeParams(params),
866
- maximum,
867
- });
868
- }
869
-
870
- export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum" | "when">;
871
- export function _minSize(
872
- minimum: number,
873
- params?: string | $ZodCheckMinSizeParams
874
- ): checks.$ZodCheckMinSize<util.HasSize> {
875
- return new checks.$ZodCheckMinSize({
876
- check: "min_size",
877
- ...util.normalizeParams(params),
878
- minimum,
879
- });
880
- }
881
-
882
- export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size" | "when">;
883
- export function _size(
884
- size: number,
885
- params?: string | $ZodCheckSizeEqualsParams
886
- ): checks.$ZodCheckSizeEquals<util.HasSize> {
887
- return new checks.$ZodCheckSizeEquals({
888
- check: "size_equals",
889
- ...util.normalizeParams(params),
890
- size,
891
- });
892
- }
893
-
894
- export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum" | "when">;
895
- export function _maxLength(
896
- maximum: number,
897
- params?: string | $ZodCheckMaxLengthParams
898
- ): checks.$ZodCheckMaxLength<util.HasLength> {
899
- const ch = new checks.$ZodCheckMaxLength({
900
- check: "max_length",
901
- ...util.normalizeParams(params),
902
- maximum,
903
- });
904
- return ch;
905
- }
906
-
907
- export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum" | "when">;
908
- export function _minLength(
909
- minimum: number,
910
- params?: string | $ZodCheckMinLengthParams
911
- ): checks.$ZodCheckMinLength<util.HasLength> {
912
- return new checks.$ZodCheckMinLength({
913
- check: "min_length",
914
- ...util.normalizeParams(params),
915
- minimum,
916
- });
917
- }
918
-
919
- export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length" | "when">;
920
- export function _length(
921
- length: number,
922
- params?: string | $ZodCheckLengthEqualsParams
923
- ): checks.$ZodCheckLengthEquals<util.HasLength> {
924
- return new checks.$ZodCheckLengthEquals({
925
- check: "length_equals",
926
- ...util.normalizeParams(params),
927
- length,
928
- });
929
- }
930
-
931
- export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern" | "when">;
932
- export function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex {
933
- return new checks.$ZodCheckRegex({
934
- check: "string_format",
935
- format: "regex",
936
- ...util.normalizeParams(params),
937
- pattern,
938
- });
939
- }
940
-
941
- export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format" | "when">;
942
- export function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase {
943
- return new checks.$ZodCheckLowerCase({
944
- check: "string_format",
945
- format: "lowercase",
946
- ...util.normalizeParams(params),
947
- });
948
- }
949
-
950
- export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format" | "when">;
951
-
952
- export function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase {
953
- return new checks.$ZodCheckUpperCase({
954
- check: "string_format",
955
- format: "uppercase",
956
- ...util.normalizeParams(params),
957
- });
958
- }
959
-
960
- export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
961
- export function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes {
962
- return new checks.$ZodCheckIncludes({
963
- check: "string_format",
964
- format: "includes",
965
- ...util.normalizeParams(params),
966
- includes,
967
- });
968
- }
969
- export type $ZodCheckStartsWithParams = CheckParams<
970
- checks.$ZodCheckStartsWith,
971
- "prefix" | "format" | "when" | "pattern"
972
- >;
973
- export function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith {
974
- return new checks.$ZodCheckStartsWith({
975
- check: "string_format",
976
- format: "starts_with",
977
- ...util.normalizeParams(params),
978
- prefix,
979
- });
980
- }
981
-
982
- export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
983
-
984
- export function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith {
985
- return new checks.$ZodCheckEndsWith({
986
- check: "string_format",
987
- format: "ends_with",
988
- ...util.normalizeParams(params),
989
- suffix,
990
- });
991
- }
992
-
993
- export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema" | "when">;
994
- export function _property<K extends string, T extends schemas.$ZodType>(
995
- property: K,
996
- schema: T,
997
- params?: string | $ZodCheckPropertyParams
998
- ): checks.$ZodCheckProperty<{ [k in K]: core.output<T> }> {
999
- return new checks.$ZodCheckProperty({
1000
- check: "property",
1001
- property,
1002
- schema,
1003
- ...util.normalizeParams(params),
1004
- });
1005
- }
1006
-
1007
- export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime" | "when">;
1008
- export function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType {
1009
- return new checks.$ZodCheckMimeType({
1010
- check: "mime_type",
1011
- mime: types,
1012
- ...util.normalizeParams(params),
1013
- });
1014
- }
1015
-
1016
- export function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T> {
1017
- return new checks.$ZodCheckOverwrite({
1018
- check: "overwrite",
1019
- tx,
1020
- }) as checks.$ZodCheckOverwrite<T>;
1021
- }
1022
- // normalize
1023
- export function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): checks.$ZodCheckOverwrite<string> {
1024
- return _overwrite((input) => input.normalize(form));
1025
- }
1026
-
1027
- // trim
1028
- export function _trim(): checks.$ZodCheckOverwrite<string> {
1029
- return _overwrite((input) => input.trim());
1030
- }
1031
- // toLowerCase
1032
- export function _toLowerCase(): checks.$ZodCheckOverwrite<string> {
1033
- return _overwrite((input) => input.toLowerCase());
1034
- }
1035
- // toUpperCase
1036
- export function _toUpperCase(): checks.$ZodCheckOverwrite<string> {
1037
- return _overwrite((input) => input.toUpperCase());
1038
- }
1039
-
1040
- /////// collections ///////
1041
-
1042
- // Array
1043
- export type $ZodArrayParams = TypeParams<schemas.$ZodArray, "element">;
1044
- export function _array<T extends schemas.$ZodType>(
1045
- Class: util.SchemaClass<schemas.$ZodArray>,
1046
- element: T,
1047
- params?: string | $ZodArrayParams
1048
- ): schemas.$ZodArray<T> {
1049
- return new Class({
1050
- type: "array",
1051
- element,
1052
- // get element() {
1053
- // return element;
1054
- // },
1055
- ...util.normalizeParams(params),
1056
- }) as any;
1057
- }
1058
-
1059
- export type $ZodObjectParams = TypeParams<schemas.$ZodObject, "shape" | "catchall">;
1060
-
1061
- // ZodUnion
1062
- export type $ZodUnionParams = TypeParams<schemas.$ZodUnion, "options">;
1063
- export function _union<const T extends readonly schemas.$ZodObject[]>(
1064
- Class: util.SchemaClass<schemas.$ZodUnion>,
1065
- options: T,
1066
- params?: string | $ZodUnionParams
1067
- ): schemas.$ZodUnion<T> {
1068
- return new Class({
1069
- type: "union",
1070
- options,
1071
- ...util.normalizeParams(params),
1072
- }) as any;
1073
- }
1074
-
1075
- // ZodDiscriminatedUnion
1076
- export interface $ZodTypeDiscriminableInternals extends schemas.$ZodTypeInternals {
1077
- propValues: util.PropValues;
1078
- }
1079
-
1080
- export interface $ZodTypeDiscriminable extends schemas.$ZodType {
1081
- _zod: $ZodTypeDiscriminableInternals;
1082
- }
1083
- export type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, "options" | "discriminator">;
1084
- export function _discriminatedUnion<
1085
- Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]],
1086
- Disc extends string,
1087
- >(
1088
- Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>,
1089
- discriminator: Disc,
1090
- options: Types,
1091
- params?: string | $ZodDiscriminatedUnionParams
1092
- ): schemas.$ZodDiscriminatedUnion<Types, Disc> {
1093
- return new Class({
1094
- type: "union",
1095
- options,
1096
- discriminator,
1097
- ...util.normalizeParams(params),
1098
- }) as any;
1099
- }
1100
-
1101
- // ZodIntersection
1102
- export type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, "left" | "right">;
1103
- export function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(
1104
- Class: util.SchemaClass<schemas.$ZodIntersection>,
1105
- left: T,
1106
- right: U
1107
- ): schemas.$ZodIntersection<T, U> {
1108
- return new Class({
1109
- type: "intersection",
1110
- left,
1111
- right,
1112
- }) as any;
1113
- }
1114
-
1115
- // ZodTuple
1116
- export type $ZodTupleParams = TypeParams<schemas.$ZodTuple, "items" | "rest">;
1117
- export function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(
1118
- Class: util.SchemaClass<schemas.$ZodTuple>,
1119
- items: T,
1120
- params?: string | $ZodTupleParams
1121
- ): schemas.$ZodTuple<T, null>;
1122
- export function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(
1123
- Class: util.SchemaClass<schemas.$ZodTuple>,
1124
- items: T,
1125
- rest: Rest,
1126
- params?: string | $ZodTupleParams
1127
- ): schemas.$ZodTuple<T, Rest>;
1128
- // export function _tuple(
1129
- // Class: util.SchemaClass<schemas.$ZodTuple>,
1130
- // items: [],
1131
- // params?: string | $ZodTupleParams
1132
- // ): schemas.$ZodTuple<[], null>;
1133
- export function _tuple(
1134
- Class: util.SchemaClass<schemas.$ZodTuple>,
1135
- items: schemas.$ZodType[],
1136
- _paramsOrRest?: string | $ZodTupleParams | schemas.$ZodType,
1137
- _params?: string | $ZodTupleParams
1138
- ) {
1139
- const hasRest = _paramsOrRest instanceof schemas.$ZodType;
1140
- const params = hasRest ? _params : _paramsOrRest;
1141
- const rest = hasRest ? _paramsOrRest : null;
1142
- return new Class({
1143
- type: "tuple",
1144
- items,
1145
- rest,
1146
- ...util.normalizeParams(params),
1147
- });
1148
- }
1149
-
1150
- // ZodRecord
1151
- export type $ZodRecordParams = TypeParams<schemas.$ZodRecord, "keyType" | "valueType">;
1152
- export function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(
1153
- Class: util.SchemaClass<schemas.$ZodRecord>,
1154
- keyType: Key,
1155
- valueType: Value,
1156
- params?: string | $ZodRecordParams
1157
- ): schemas.$ZodRecord<Key, Value> {
1158
- return new Class({
1159
- type: "record",
1160
- keyType,
1161
- valueType,
1162
- ...util.normalizeParams(params),
1163
- }) as any;
1164
- }
1165
-
1166
- // ZodMap
1167
- export type $ZodMapParams = TypeParams<schemas.$ZodMap, "keyType" | "valueType">;
1168
- export function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(
1169
- Class: util.SchemaClass<schemas.$ZodMap>,
1170
- keyType: Key,
1171
- valueType: Value,
1172
- params?: string | $ZodMapParams
1173
- ): schemas.$ZodMap<Key, Value> {
1174
- return new Class({
1175
- type: "map",
1176
- keyType,
1177
- valueType,
1178
- ...util.normalizeParams(params),
1179
- }) as any;
1180
- }
1181
-
1182
- // ZodSet
1183
- export type $ZodSetParams = TypeParams<schemas.$ZodSet, "valueType">;
1184
- export function _set<Value extends schemas.$ZodObject>(
1185
- Class: util.SchemaClass<schemas.$ZodSet>,
1186
- valueType: Value,
1187
- params?: string | $ZodSetParams
1188
- ): schemas.$ZodSet<Value> {
1189
- return new Class({
1190
- type: "set",
1191
- valueType,
1192
- ...util.normalizeParams(params),
1193
- }) as any;
1194
- }
1195
-
1196
- // ZodEnum
1197
- export type $ZodEnumParams = TypeParams<schemas.$ZodEnum, "entries">;
1198
- export function _enum<const T extends string[]>(
1199
- Class: util.SchemaClass<schemas.$ZodEnum>,
1200
- values: T,
1201
- params?: string | $ZodEnumParams
1202
- ): schemas.$ZodEnum<util.ToEnum<T[number]>>;
1203
- export function _enum<T extends util.EnumLike>(
1204
- Class: util.SchemaClass<schemas.$ZodEnum>,
1205
- entries: T,
1206
- params?: string | $ZodEnumParams
1207
- ): schemas.$ZodEnum<T>;
1208
- export function _enum(Class: util.SchemaClass<schemas.$ZodEnum>, values: any, params?: string | $ZodEnumParams) {
1209
- const entries: any = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
1210
- // if (Array.isArray(values)) {
1211
- // for (const value of values) {
1212
- // entries[value] = value;
1213
- // }
1214
- // } else {
1215
- // Object.assign(entries, values);
1216
- // }
1217
- // const entries: util.EnumLike = {};
1218
- // for (const val of values) {
1219
- // entries[val] = val;
1220
- // }
1221
-
1222
- return new Class({
1223
- type: "enum",
1224
- entries,
1225
- ...util.normalizeParams(params),
1226
- }) as any;
1227
- }
1228
-
1229
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
1230
- *
1231
- * ```ts
1232
- * enum Colors { red, green, blue }
1233
- * z.enum(Colors);
1234
- * ```
1235
- */
1236
- export function _nativeEnum<T extends util.EnumLike>(
1237
- Class: util.SchemaClass<schemas.$ZodEnum>,
1238
- entries: T,
1239
- params?: string | $ZodEnumParams
1240
- ): schemas.$ZodEnum<T> {
1241
- return new Class({
1242
- type: "enum",
1243
- entries,
1244
- ...util.normalizeParams(params),
1245
- }) as any;
1246
- }
1247
-
1248
- // ZodLiteral
1249
- export type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, "values">;
1250
- export function _literal<const T extends Array<util.Literal>>(
1251
- Class: util.SchemaClass<schemas.$ZodLiteral>,
1252
- value: T,
1253
- params?: string | $ZodLiteralParams
1254
- ): schemas.$ZodLiteral<T[number]>;
1255
- export function _literal<const T extends util.Literal>(
1256
- Class: util.SchemaClass<schemas.$ZodLiteral>,
1257
- value: T,
1258
- params?: string | $ZodLiteralParams
1259
- ): schemas.$ZodLiteral<T>;
1260
- export function _literal(Class: util.SchemaClass<schemas.$ZodLiteral>, value: any, params: any) {
1261
- return new Class({
1262
- type: "literal",
1263
- values: Array.isArray(value) ? value : [value],
1264
- ...util.normalizeParams(params),
1265
- });
1266
- }
1267
-
1268
- // ZodFile
1269
- export type $ZodFileParams = TypeParams<schemas.$ZodFile>;
1270
- export function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile {
1271
- return new Class({
1272
- type: "file",
1273
- ...util.normalizeParams(params),
1274
- });
1275
- }
1276
-
1277
- // ZodTransform
1278
- export type $ZodTransformParams = TypeParams<schemas.$ZodTransform, "transform">;
1279
- export function _transform<I = unknown, O = I>(
1280
- Class: util.SchemaClass<schemas.$ZodTransform>,
1281
- fn: (input: I, ctx?: schemas.ParsePayload) => O
1282
- ): schemas.$ZodTransform<Awaited<O>, I> {
1283
- return new Class({
1284
- type: "transform",
1285
- transform: fn as any,
1286
- }) as any;
1287
- }
1288
-
1289
- // ZodOptional
1290
- export type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, "innerType">;
1291
- export function _optional<T extends schemas.$ZodObject>(
1292
- Class: util.SchemaClass<schemas.$ZodOptional>,
1293
- innerType: T
1294
- ): schemas.$ZodOptional<T> {
1295
- return new Class({
1296
- type: "optional",
1297
- innerType,
1298
- }) as any;
1299
- }
1300
-
1301
- // ZodNullable
1302
- export type $ZodNullableParams = TypeParams<schemas.$ZodNullable, "innerType">;
1303
- export function _nullable<T extends schemas.$ZodObject>(
1304
- Class: util.SchemaClass<schemas.$ZodNullable>,
1305
- innerType: T
1306
- ): schemas.$ZodNullable<T> {
1307
- return new Class({
1308
- type: "nullable",
1309
- innerType,
1310
- }) as any;
1311
- }
1312
-
1313
- // ZodDefault
1314
- export type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, "innerType" | "defaultValue">;
1315
- export function _default<T extends schemas.$ZodObject>(
1316
- Class: util.SchemaClass<schemas.$ZodDefault>,
1317
- innerType: T,
1318
- defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)
1319
- ): schemas.$ZodDefault<T> {
1320
- return new Class({
1321
- type: "default",
1322
- innerType,
1323
- get defaultValue() {
1324
- return typeof defaultValue === "function" ? (defaultValue as Function)() : util.shallowClone(defaultValue);
1325
- },
1326
- }) as any;
1327
- }
1328
-
1329
- // ZodNonOptional
1330
- export type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, "innerType">;
1331
- export function _nonoptional<T extends schemas.$ZodObject>(
1332
- Class: util.SchemaClass<schemas.$ZodNonOptional>,
1333
- innerType: T,
1334
- params?: string | $ZodNonOptionalParams
1335
- ): schemas.$ZodNonOptional<T> {
1336
- return new Class({
1337
- type: "nonoptional",
1338
- innerType,
1339
- ...util.normalizeParams(params),
1340
- }) as any;
1341
- }
1342
-
1343
- // ZodSuccess
1344
- export type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, "innerType">;
1345
- export function _success<T extends schemas.$ZodObject>(
1346
- Class: util.SchemaClass<schemas.$ZodSuccess>,
1347
- innerType: T
1348
- ): schemas.$ZodSuccess<T> {
1349
- return new Class({
1350
- type: "success",
1351
- innerType,
1352
- }) as any;
1353
- }
1354
-
1355
- // ZodCatch
1356
- export type $ZodCatchParams = TypeParams<schemas.$ZodCatch, "innerType" | "catchValue">;
1357
- export function _catch<T extends schemas.$ZodObject>(
1358
- Class: util.SchemaClass<schemas.$ZodCatch>,
1359
- innerType: T,
1360
- catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)
1361
- ): schemas.$ZodCatch<T> {
1362
- return new Class({
1363
- type: "catch",
1364
- innerType,
1365
- catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue) as any,
1366
- }) as any;
1367
- }
1368
-
1369
- // ZodPipe
1370
- export type $ZodPipeParams = TypeParams<schemas.$ZodPipe, "in" | "out">;
1371
- export function _pipe<
1372
- const A extends schemas.$ZodType,
1373
- B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>,
1374
- >(
1375
- Class: util.SchemaClass<schemas.$ZodPipe>,
1376
- in_: A,
1377
- out: B | schemas.$ZodType<unknown, core.output<A>>
1378
- ): schemas.$ZodPipe<A, B> {
1379
- return new Class({
1380
- type: "pipe",
1381
- in: in_,
1382
- out,
1383
- }) as any;
1384
- }
1385
-
1386
- // ZodReadonly
1387
- export type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, "innerType">;
1388
- export function _readonly<T extends schemas.$ZodObject>(
1389
- Class: util.SchemaClass<schemas.$ZodReadonly>,
1390
- innerType: T
1391
- ): schemas.$ZodReadonly<T> {
1392
- return new Class({
1393
- type: "readonly",
1394
- innerType,
1395
- }) as any;
1396
- }
1397
-
1398
- // ZodTemplateLiteral
1399
- export type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, "parts">;
1400
- export function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(
1401
- Class: util.SchemaClass<schemas.$ZodTemplateLiteral>,
1402
- parts: Parts,
1403
- params?: string | $ZodTemplateLiteralParams
1404
- ): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>> {
1405
- return new Class({
1406
- type: "template_literal",
1407
- parts,
1408
- ...util.normalizeParams(params),
1409
- }) as any;
1410
- }
1411
-
1412
- // ZodLazy
1413
- export type $ZodLazyParams = TypeParams<schemas.$ZodLazy, "getter">;
1414
- export function _lazy<T extends schemas.$ZodType>(
1415
- Class: util.SchemaClass<schemas.$ZodLazy>,
1416
- getter: () => T
1417
- ): schemas.$ZodLazy<T> {
1418
- return new Class({
1419
- type: "lazy",
1420
- getter,
1421
- }) as any;
1422
- }
1423
-
1424
- // ZodPromise
1425
- export type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, "innerType">;
1426
- export function _promise<T extends schemas.$ZodObject>(
1427
- Class: util.SchemaClass<schemas.$ZodPromise>,
1428
- innerType: T
1429
- ): schemas.$ZodPromise<T> {
1430
- return new Class({
1431
- type: "promise",
1432
- innerType,
1433
- }) as any;
1434
- }
1435
-
1436
- // ZodCustom
1437
- export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
1438
- export function _custom<O = unknown, I = O>(
1439
- Class: util.SchemaClass<schemas.$ZodCustom>,
1440
- fn: (data: O) => unknown,
1441
- _params: string | $ZodCustomParams | undefined
1442
- ): schemas.$ZodCustom<O, I> {
1443
- const norm = util.normalizeParams(_params);
1444
- norm.abort ??= true; // default to abort:false
1445
- const schema = new Class({
1446
- type: "custom",
1447
- check: "custom",
1448
- fn: fn as any,
1449
- ...norm,
1450
- });
1451
-
1452
- return schema as any;
1453
- }
1454
-
1455
- // same as _custom but defaults to abort:false
1456
- export function _refine<O = unknown, I = O>(
1457
- Class: util.SchemaClass<schemas.$ZodCustom>,
1458
- fn: (data: O) => unknown,
1459
- _params: string | $ZodCustomParams | undefined
1460
- ): schemas.$ZodCustom<O, I> {
1461
- const schema = new Class({
1462
- type: "custom",
1463
- check: "custom",
1464
- fn: fn as any,
1465
- ...util.normalizeParams(_params),
1466
- });
1467
-
1468
- return schema as any;
1469
- }
1470
-
1471
- export type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any
1472
- ? RawIssue<T>
1473
- : never;
1474
- type RawIssue<T extends errors.$ZodIssueBase> = T extends any
1475
- ? util.Flatten<
1476
- util.MakePartial<T, "message" | "path"> & {
1477
- /** The schema or check that originated this issue. */
1478
- readonly inst?: schemas.$ZodType | checks.$ZodCheck;
1479
- /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
1480
- readonly continue?: boolean | undefined;
1481
- } & Record<string, unknown>
1482
- >
1483
- : never;
1484
-
1485
- export interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {
1486
- addIssue(arg: string | $ZodSuperRefineIssue): void;
1487
- }
1488
-
1489
- export function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): checks.$ZodCheck<T> {
1490
- const ch = _check<T>((payload) => {
1491
- (payload as $RefinementCtx).addIssue = (issue) => {
1492
- if (typeof issue === "string") {
1493
- payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
1494
- } else {
1495
- // for Zod 3 backwards compatibility
1496
- const _issue: any = issue;
1497
- if (_issue.fatal) _issue.continue = false;
1498
- _issue.code ??= "custom";
1499
- _issue.input ??= payload.value;
1500
- _issue.inst ??= ch;
1501
- _issue.continue ??= !ch._zod.def.abort; // abort is always undefined, so this is always true...
1502
- payload.issues.push(util.issue(_issue));
1503
- }
1504
- };
1505
-
1506
- return fn(payload.value, payload as $RefinementCtx<T>);
1507
- });
1508
- return ch;
1509
- }
1510
-
1511
- export function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O> {
1512
- const ch = new checks.$ZodCheck({
1513
- check: "custom",
1514
- ...util.normalizeParams(params),
1515
- });
1516
-
1517
- ch._zod.check = fn;
1518
- return ch;
1519
- }
1520
-
1521
- // export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">
1522
-
1523
- ///////// STRINGBOOL /////////
1524
-
1525
- // stringbool
1526
- export interface $ZodStringBoolParams extends TypeParams {
1527
- truthy?: string[];
1528
- falsy?: string[];
1529
- /**
1530
- * Options: `"sensitive"`, `"insensitive"`
1531
- *
1532
- * @default `"insensitive"`
1533
- */
1534
- case?: "sensitive" | "insensitive" | undefined;
1535
- }
1536
-
1537
- export function _stringbool(
1538
- Classes: {
1539
- Codec?: typeof schemas.$ZodCodec;
1540
- Boolean?: typeof schemas.$ZodBoolean;
1541
- String?: typeof schemas.$ZodString;
1542
- },
1543
- _params?: string | $ZodStringBoolParams
1544
- ): schemas.$ZodCodec<schemas.$ZodString, schemas.$ZodBoolean> {
1545
- const params = util.normalizeParams(_params);
1546
-
1547
- let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
1548
- let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
1549
- if (params.case !== "sensitive") {
1550
- truthyArray = truthyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
1551
- falsyArray = falsyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
1552
- }
1553
-
1554
- const truthySet = new Set(truthyArray);
1555
- const falsySet = new Set(falsyArray);
1556
-
1557
- const _Codec = Classes.Codec ?? schemas.$ZodCodec;
1558
- const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;
1559
- const _String = Classes.String ?? schemas.$ZodString;
1560
-
1561
- const stringSchema = new _String({ type: "string", error: params.error });
1562
- const booleanSchema = new _Boolean({ type: "boolean", error: params.error });
1563
-
1564
- const codec = new _Codec({
1565
- type: "pipe",
1566
- in: stringSchema as any,
1567
- out: booleanSchema as any,
1568
- transform: ((input: string, payload: schemas.ParsePayload<string>) => {
1569
- let data: string = input;
1570
- if (params.case !== "sensitive") data = data.toLowerCase();
1571
- if (truthySet.has(data)) {
1572
- return true;
1573
- } else if (falsySet.has(data)) {
1574
- return false;
1575
- } else {
1576
- payload.issues.push({
1577
- code: "invalid_value",
1578
- expected: "stringbool",
1579
- values: [...truthySet, ...falsySet],
1580
- input: payload.value,
1581
- inst: codec,
1582
- continue: false,
1583
- });
1584
- return {} as never;
1585
- }
1586
- }) as any,
1587
- reverseTransform: ((input: boolean, _payload: schemas.ParsePayload<boolean>) => {
1588
- if (input === true) {
1589
- return truthyArray[0] || "true";
1590
- } else {
1591
- return falsyArray[0] || "false";
1592
- }
1593
- }) as any,
1594
- error: params.error,
1595
- }) as any;
1596
-
1597
- return codec;
1598
- }
1599
-
1600
- export function _stringFormat<Format extends string>(
1601
- Class: typeof schemas.$ZodCustomStringFormat,
1602
- format: Format,
1603
- fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp,
1604
- _params: string | $ZodStringFormatParams = {}
1605
- ): schemas.$ZodCustomStringFormat<Format> {
1606
- const params = util.normalizeParams(_params);
1607
- const def: schemas.$ZodCustomStringFormatDef = {
1608
- ...util.normalizeParams(_params),
1609
- check: "string_format",
1610
- type: "string",
1611
- format,
1612
- fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
1613
- ...params,
1614
- };
1615
- if (fnOrRegex instanceof RegExp) {
1616
- def.pattern = fnOrRegex;
1617
- }
1618
-
1619
- const inst = new Class(def);
1620
- return inst as any;
1621
- }