fullstacked 0.12.0-1173 → 0.12.0-1184

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 (500) hide show
  1. package/fullstacked_modules/@fullstacked/ai-agent/README.md +1 -0
  2. package/fullstacked_modules/@fullstacked/ai-agent/chat.json +1 -0
  3. package/fullstacked_modules/@fullstacked/ai-agent/index.scss +15 -0
  4. package/fullstacked_modules/@fullstacked/ai-agent/index.ts +92 -0
  5. package/fullstacked_modules/@fullstacked/ai-agent/lock.json +726 -0
  6. package/fullstacked_modules/@fullstacked/ai-agent/package.json +15 -0
  7. package/fullstacked_modules/@fullstacked/ai-agent/src/conversation.ts +169 -0
  8. package/fullstacked_modules/@fullstacked/ai-agent/src/default.scss +23 -0
  9. package/fullstacked_modules/@fullstacked/ai-agent/src/index.ts +3 -0
  10. package/fullstacked_modules/@fullstacked/ai-agent/src/input.ts +36 -0
  11. package/fullstacked_modules/@fullstacked/ai-agent/src/markdown.ts +46 -0
  12. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/interface.ts +6 -0
  13. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/ollama.ts +42 -0
  14. package/fullstacked_modules/@fullstacked/ai-agent/src/providers/openai.ts +33 -0
  15. package/fullstacked_modules/@fullstacked/ai-agent/story.txt +7 -0
  16. package/fullstacked_modules/ai/index.d.ts +2 -0
  17. package/fullstacked_modules/ai/index.js +88268 -0
  18. package/fullstacked_modules/ai/index.ts +14 -0
  19. package/fullstacked_modules/ai/package.json +5 -0
  20. package/fullstacked_modules/ai/tools/fs.ts +60 -0
  21. package/{lib → fullstacked_modules}/archive/archive.ts +140 -140
  22. package/fullstacked_modules/archive/index.d.ts +2 -0
  23. package/{lib → fullstacked_modules}/archive/index.ts +4 -4
  24. package/{lib → fullstacked_modules}/base64.ts +144 -144
  25. package/fullstacked_modules/bridge/index.ts +120 -0
  26. package/{lib → fullstacked_modules}/bridge/platform/android.ts +18 -18
  27. package/{lib → fullstacked_modules}/bridge/platform/apple.ts +46 -46
  28. package/{lib → fullstacked_modules}/bridge/platform/electron.ts +14 -14
  29. package/{lib → fullstacked_modules}/bridge/platform/linux-gtk.ts +48 -48
  30. package/{lib → fullstacked_modules}/bridge/platform/linux-qt.ts +68 -68
  31. package/{lib → fullstacked_modules}/bridge/platform/node.ts +32 -32
  32. package/{lib → fullstacked_modules}/bridge/platform/wasm.ts +17 -17
  33. package/{lib → fullstacked_modules}/bridge/platform/windows.ts +49 -49
  34. package/{lib → fullstacked_modules}/bridge/serialization.ts +153 -153
  35. package/{lib → fullstacked_modules}/components/snackbar.ts +60 -60
  36. package/fullstacked_modules/config/config.ts +33 -0
  37. package/fullstacked_modules/config/index.ts +3 -0
  38. package/fullstacked_modules/connect/index.d.ts +2 -0
  39. package/{lib → fullstacked_modules}/connect/index.ts +125 -125
  40. package/{lib → fullstacked_modules}/core_message/core_message.ts +57 -76
  41. package/{lib → fullstacked_modules}/core_message/index.ts +3 -3
  42. package/fullstacked_modules/core_open.ts +9 -0
  43. package/fullstacked_modules/esbuild/esbuild.ts +101 -0
  44. package/fullstacked_modules/esbuild/index.ts +3 -0
  45. package/fullstacked_modules/esbuild/sass.ts +103 -0
  46. package/fullstacked_modules/fetch/index.d.ts +2 -0
  47. package/{lib → fullstacked_modules}/fetch/index.ts +332 -318
  48. package/{lib → fullstacked_modules}/fs/fs.ts +157 -157
  49. package/fullstacked_modules/fs/index.d.ts +2 -0
  50. package/{lib → fullstacked_modules}/fs/index.ts +3 -3
  51. package/fullstacked_modules/git/git.ts +238 -0
  52. package/fullstacked_modules/git/index.ts +3 -0
  53. package/fullstacked_modules/packages/index.ts +3 -0
  54. package/fullstacked_modules/packages/packages.ts +143 -0
  55. package/fullstacked_modules/platform/index.d.ts +2 -0
  56. package/{lib → fullstacked_modules}/platform/index.ts +14 -14
  57. package/fullstacked_modules/zod/LICENSE +21 -0
  58. package/fullstacked_modules/zod/README.md +208 -0
  59. package/fullstacked_modules/zod/index.d.cts +4 -0
  60. package/fullstacked_modules/zod/index.d.ts +4 -0
  61. package/fullstacked_modules/zod/locales/index.d.cts +1 -0
  62. package/fullstacked_modules/zod/locales/index.d.ts +1 -0
  63. package/fullstacked_modules/zod/mini/index.d.cts +1 -0
  64. package/fullstacked_modules/zod/mini/index.d.ts +1 -0
  65. package/fullstacked_modules/zod/package.json +134 -0
  66. package/fullstacked_modules/zod/src/index.ts +4 -0
  67. package/fullstacked_modules/zod/src/locales/index.ts +1 -0
  68. package/fullstacked_modules/zod/src/mini/index.ts +1 -0
  69. package/fullstacked_modules/zod/src/v3/ZodError.ts +330 -0
  70. package/fullstacked_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  71. package/fullstacked_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  72. package/fullstacked_modules/zod/src/v3/benchmarks/index.ts +59 -0
  73. package/fullstacked_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  74. package/fullstacked_modules/zod/src/v3/benchmarks/object.ts +69 -0
  75. package/fullstacked_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  76. package/fullstacked_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  77. package/fullstacked_modules/zod/src/v3/benchmarks/string.ts +55 -0
  78. package/fullstacked_modules/zod/src/v3/benchmarks/union.ts +80 -0
  79. package/fullstacked_modules/zod/src/v3/errors.ts +13 -0
  80. package/fullstacked_modules/zod/src/v3/external.ts +6 -0
  81. package/fullstacked_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  82. package/fullstacked_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  83. package/fullstacked_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  84. package/fullstacked_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  85. package/fullstacked_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  86. package/fullstacked_modules/zod/src/v3/helpers/util.ts +224 -0
  87. package/fullstacked_modules/zod/src/v3/index.ts +4 -0
  88. package/fullstacked_modules/zod/src/v3/locales/en.ts +124 -0
  89. package/fullstacked_modules/zod/src/v3/standard-schema.ts +113 -0
  90. package/fullstacked_modules/zod/src/v3/tests/Mocker.ts +54 -0
  91. package/fullstacked_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  92. package/fullstacked_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  93. package/fullstacked_modules/zod/src/v3/tests/array.test.ts +71 -0
  94. package/fullstacked_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  95. package/fullstacked_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  96. package/fullstacked_modules/zod/src/v3/tests/base.test.ts +29 -0
  97. package/fullstacked_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  98. package/fullstacked_modules/zod/src/v3/tests/branded.test.ts +53 -0
  99. package/fullstacked_modules/zod/src/v3/tests/catch.test.ts +220 -0
  100. package/fullstacked_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  101. package/fullstacked_modules/zod/src/v3/tests/complex.test.ts +56 -0
  102. package/fullstacked_modules/zod/src/v3/tests/custom.test.ts +31 -0
  103. package/fullstacked_modules/zod/src/v3/tests/date.test.ts +32 -0
  104. package/fullstacked_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  105. package/fullstacked_modules/zod/src/v3/tests/default.test.ts +112 -0
  106. package/fullstacked_modules/zod/src/v3/tests/description.test.ts +33 -0
  107. package/fullstacked_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  108. package/fullstacked_modules/zod/src/v3/tests/enum.test.ts +80 -0
  109. package/fullstacked_modules/zod/src/v3/tests/error.test.ts +551 -0
  110. package/fullstacked_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  111. package/fullstacked_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  112. package/fullstacked_modules/zod/src/v3/tests/function.test.ts +257 -0
  113. package/fullstacked_modules/zod/src/v3/tests/generics.test.ts +48 -0
  114. package/fullstacked_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  115. package/fullstacked_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  116. package/fullstacked_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  117. package/fullstacked_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  118. package/fullstacked_modules/zod/src/v3/tests/literal.test.ts +36 -0
  119. package/fullstacked_modules/zod/src/v3/tests/map.test.ts +110 -0
  120. package/fullstacked_modules/zod/src/v3/tests/masking.test.ts +4 -0
  121. package/fullstacked_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  122. package/fullstacked_modules/zod/src/v3/tests/nan.test.ts +21 -0
  123. package/fullstacked_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  124. package/fullstacked_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  125. package/fullstacked_modules/zod/src/v3/tests/number.test.ts +176 -0
  126. package/fullstacked_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  127. package/fullstacked_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  128. package/fullstacked_modules/zod/src/v3/tests/object.test.ts +434 -0
  129. package/fullstacked_modules/zod/src/v3/tests/optional.test.ts +42 -0
  130. package/fullstacked_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  131. package/fullstacked_modules/zod/src/v3/tests/parser.test.ts +41 -0
  132. package/fullstacked_modules/zod/src/v3/tests/partials.test.ts +243 -0
  133. package/fullstacked_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  134. package/fullstacked_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  135. package/fullstacked_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  136. package/fullstacked_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  137. package/fullstacked_modules/zod/src/v3/tests/promise.test.ts +90 -0
  138. package/fullstacked_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  139. package/fullstacked_modules/zod/src/v3/tests/record.test.ts +171 -0
  140. package/fullstacked_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  141. package/fullstacked_modules/zod/src/v3/tests/refine.test.ts +313 -0
  142. package/fullstacked_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  143. package/fullstacked_modules/zod/src/v3/tests/set.test.ts +142 -0
  144. package/fullstacked_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  145. package/fullstacked_modules/zod/src/v3/tests/string.test.ts +916 -0
  146. package/fullstacked_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  147. package/fullstacked_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  148. package/fullstacked_modules/zod/src/v3/tests/unions.test.ts +57 -0
  149. package/fullstacked_modules/zod/src/v3/tests/validations.test.ts +133 -0
  150. package/fullstacked_modules/zod/src/v3/tests/void.test.ts +15 -0
  151. package/fullstacked_modules/zod/src/v3/types.ts +5138 -0
  152. package/fullstacked_modules/zod/src/v4/classic/checks.ts +31 -0
  153. package/fullstacked_modules/zod/src/v4/classic/coerce.ts +27 -0
  154. package/fullstacked_modules/zod/src/v4/classic/compat.ts +70 -0
  155. package/fullstacked_modules/zod/src/v4/classic/errors.ts +82 -0
  156. package/fullstacked_modules/zod/src/v4/classic/external.ts +50 -0
  157. package/fullstacked_modules/zod/src/v4/classic/index.ts +5 -0
  158. package/fullstacked_modules/zod/src/v4/classic/iso.ts +90 -0
  159. package/fullstacked_modules/zod/src/v4/classic/parse.ts +33 -0
  160. package/fullstacked_modules/zod/src/v4/classic/schemas.ts +2031 -0
  161. package/fullstacked_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  162. package/fullstacked_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  163. package/fullstacked_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  164. package/fullstacked_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  165. package/fullstacked_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  166. package/fullstacked_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  167. package/fullstacked_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  168. package/fullstacked_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  169. package/fullstacked_modules/zod/src/v4/classic/tests/catch.test.ts +251 -0
  170. package/fullstacked_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  171. package/fullstacked_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  172. package/fullstacked_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  173. package/fullstacked_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  174. package/fullstacked_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  175. package/fullstacked_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
  176. package/fullstacked_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  177. package/fullstacked_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  178. package/fullstacked_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +661 -0
  179. package/fullstacked_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  180. package/fullstacked_modules/zod/src/v4/classic/tests/error-utils.test.ts +595 -0
  181. package/fullstacked_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  182. package/fullstacked_modules/zod/src/v4/classic/tests/file.test.ts +94 -0
  183. package/fullstacked_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  184. package/fullstacked_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  185. package/fullstacked_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  186. package/fullstacked_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  187. package/fullstacked_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  188. package/fullstacked_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  189. package/fullstacked_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  190. package/fullstacked_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  191. package/fullstacked_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
  192. package/fullstacked_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  193. package/fullstacked_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  194. package/fullstacked_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  195. package/fullstacked_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  196. package/fullstacked_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  197. package/fullstacked_modules/zod/src/v4/classic/tests/number.test.ts +270 -0
  198. package/fullstacked_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  199. package/fullstacked_modules/zod/src/v4/classic/tests/optional.test.ts +136 -0
  200. package/fullstacked_modules/zod/src/v4/classic/tests/partial.test.ts +340 -0
  201. package/fullstacked_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  202. package/fullstacked_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  203. package/fullstacked_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  204. package/fullstacked_modules/zod/src/v4/classic/tests/preprocess.test.ts +287 -0
  205. package/fullstacked_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  206. package/fullstacked_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  207. package/fullstacked_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  208. package/fullstacked_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  209. package/fullstacked_modules/zod/src/v4/classic/tests/record.test.ts +356 -0
  210. package/fullstacked_modules/zod/src/v4/classic/tests/recursive-types.test.ts +477 -0
  211. package/fullstacked_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  212. package/fullstacked_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  213. package/fullstacked_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  214. package/fullstacked_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  215. package/fullstacked_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  216. package/fullstacked_modules/zod/src/v4/classic/tests/string.test.ts +996 -0
  217. package/fullstacked_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  218. package/fullstacked_modules/zod/src/v4/classic/tests/template-literal.test.ts +761 -0
  219. package/fullstacked_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2341 -0
  220. package/fullstacked_modules/zod/src/v4/classic/tests/transform.test.ts +354 -0
  221. package/fullstacked_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  222. package/fullstacked_modules/zod/src/v4/classic/tests/union.test.ts +181 -0
  223. package/fullstacked_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  224. package/fullstacked_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  225. package/fullstacked_modules/zod/src/v4/core/api.ts +1628 -0
  226. package/fullstacked_modules/zod/src/v4/core/checks.ts +1285 -0
  227. package/fullstacked_modules/zod/src/v4/core/config.ts +15 -0
  228. package/fullstacked_modules/zod/src/v4/core/core.ts +134 -0
  229. package/fullstacked_modules/zod/src/v4/core/doc.ts +44 -0
  230. package/fullstacked_modules/zod/src/v4/core/errors.ts +423 -0
  231. package/fullstacked_modules/zod/src/v4/core/function.ts +176 -0
  232. package/fullstacked_modules/zod/src/v4/core/index.ts +15 -0
  233. package/fullstacked_modules/zod/src/v4/core/json-schema.ts +146 -0
  234. package/fullstacked_modules/zod/src/v4/core/parse.ts +94 -0
  235. package/fullstacked_modules/zod/src/v4/core/regexes.ts +138 -0
  236. package/fullstacked_modules/zod/src/v4/core/registries.ts +97 -0
  237. package/fullstacked_modules/zod/src/v4/core/schemas.ts +3900 -0
  238. package/fullstacked_modules/zod/src/v4/core/standard-schema.ts +64 -0
  239. package/fullstacked_modules/zod/src/v4/core/tests/extend.test.ts +18 -0
  240. package/fullstacked_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  241. package/fullstacked_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  242. package/fullstacked_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  243. package/fullstacked_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  244. package/fullstacked_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  245. package/fullstacked_modules/zod/src/v4/core/to-json-schema.ts +1004 -0
  246. package/fullstacked_modules/zod/src/v4/core/util.ts +827 -0
  247. package/fullstacked_modules/zod/src/v4/core/versions.ts +5 -0
  248. package/fullstacked_modules/zod/src/v4/core/zsf.ts +323 -0
  249. package/fullstacked_modules/zod/src/v4/index.ts +4 -0
  250. package/fullstacked_modules/zod/src/v4/locales/ar.ts +125 -0
  251. package/fullstacked_modules/zod/src/v4/locales/az.ts +121 -0
  252. package/fullstacked_modules/zod/src/v4/locales/be.ts +184 -0
  253. package/fullstacked_modules/zod/src/v4/locales/bg.ts +136 -0
  254. package/fullstacked_modules/zod/src/v4/locales/ca.ts +127 -0
  255. package/fullstacked_modules/zod/src/v4/locales/cs.ts +142 -0
  256. package/fullstacked_modules/zod/src/v4/locales/da.ts +141 -0
  257. package/fullstacked_modules/zod/src/v4/locales/de.ts +124 -0
  258. package/fullstacked_modules/zod/src/v4/locales/en.ts +127 -0
  259. package/fullstacked_modules/zod/src/v4/locales/eo.ts +125 -0
  260. package/fullstacked_modules/zod/src/v4/locales/es.ts +125 -0
  261. package/fullstacked_modules/zod/src/v4/locales/fa.ts +134 -0
  262. package/fullstacked_modules/zod/src/v4/locales/fi.ts +131 -0
  263. package/fullstacked_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  264. package/fullstacked_modules/zod/src/v4/locales/fr.ts +124 -0
  265. package/fullstacked_modules/zod/src/v4/locales/he.ts +125 -0
  266. package/fullstacked_modules/zod/src/v4/locales/hu.ts +126 -0
  267. package/fullstacked_modules/zod/src/v4/locales/id.ts +125 -0
  268. package/fullstacked_modules/zod/src/v4/locales/index.ts +42 -0
  269. package/fullstacked_modules/zod/src/v4/locales/is.ts +127 -0
  270. package/fullstacked_modules/zod/src/v4/locales/it.ts +125 -0
  271. package/fullstacked_modules/zod/src/v4/locales/ja.ts +122 -0
  272. package/fullstacked_modules/zod/src/v4/locales/kh.ts +126 -0
  273. package/fullstacked_modules/zod/src/v4/locales/ko.ts +131 -0
  274. package/fullstacked_modules/zod/src/v4/locales/mk.ts +127 -0
  275. package/fullstacked_modules/zod/src/v4/locales/ms.ts +124 -0
  276. package/fullstacked_modules/zod/src/v4/locales/nl.ts +126 -0
  277. package/fullstacked_modules/zod/src/v4/locales/no.ts +124 -0
  278. package/fullstacked_modules/zod/src/v4/locales/ota.ts +125 -0
  279. package/fullstacked_modules/zod/src/v4/locales/pl.ts +126 -0
  280. package/fullstacked_modules/zod/src/v4/locales/ps.ts +133 -0
  281. package/fullstacked_modules/zod/src/v4/locales/pt.ts +123 -0
  282. package/fullstacked_modules/zod/src/v4/locales/ru.ts +184 -0
  283. package/fullstacked_modules/zod/src/v4/locales/sl.ts +126 -0
  284. package/fullstacked_modules/zod/src/v4/locales/sv.ts +127 -0
  285. package/fullstacked_modules/zod/src/v4/locales/ta.ts +125 -0
  286. package/fullstacked_modules/zod/src/v4/locales/th.ts +126 -0
  287. package/fullstacked_modules/zod/src/v4/locales/tr.ts +121 -0
  288. package/fullstacked_modules/zod/src/v4/locales/ua.ts +126 -0
  289. package/fullstacked_modules/zod/src/v4/locales/ur.ts +126 -0
  290. package/fullstacked_modules/zod/src/v4/locales/vi.ts +125 -0
  291. package/fullstacked_modules/zod/src/v4/locales/yo.ts +131 -0
  292. package/fullstacked_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  293. package/fullstacked_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  294. package/fullstacked_modules/zod/src/v4/mini/checks.ts +32 -0
  295. package/fullstacked_modules/zod/src/v4/mini/coerce.ts +22 -0
  296. package/fullstacked_modules/zod/src/v4/mini/external.ts +40 -0
  297. package/fullstacked_modules/zod/src/v4/mini/index.ts +3 -0
  298. package/fullstacked_modules/zod/src/v4/mini/iso.ts +62 -0
  299. package/fullstacked_modules/zod/src/v4/mini/parse.ts +1 -0
  300. package/fullstacked_modules/zod/src/v4/mini/schemas.ts +1592 -0
  301. package/fullstacked_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  302. package/fullstacked_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  303. package/fullstacked_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  304. package/fullstacked_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  305. package/fullstacked_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  306. package/fullstacked_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  307. package/fullstacked_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  308. package/fullstacked_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  309. package/fullstacked_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  310. package/fullstacked_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  311. package/fullstacked_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  312. package/fullstacked_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  313. package/fullstacked_modules/zod/src/v4-mini/index.ts +1 -0
  314. package/fullstacked_modules/zod/v3/ZodError.d.cts +164 -0
  315. package/fullstacked_modules/zod/v3/ZodError.d.ts +164 -0
  316. package/fullstacked_modules/zod/v3/errors.d.cts +5 -0
  317. package/fullstacked_modules/zod/v3/errors.d.ts +5 -0
  318. package/fullstacked_modules/zod/v3/external.d.cts +6 -0
  319. package/fullstacked_modules/zod/v3/external.d.ts +6 -0
  320. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  321. package/fullstacked_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  322. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  323. package/fullstacked_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  324. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  325. package/fullstacked_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  326. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  327. package/fullstacked_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  328. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  329. package/fullstacked_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  330. package/fullstacked_modules/zod/v3/helpers/util.d.cts +85 -0
  331. package/fullstacked_modules/zod/v3/helpers/util.d.ts +85 -0
  332. package/fullstacked_modules/zod/v3/index.d.cts +4 -0
  333. package/fullstacked_modules/zod/v3/index.d.ts +4 -0
  334. package/fullstacked_modules/zod/v3/locales/en.d.cts +3 -0
  335. package/fullstacked_modules/zod/v3/locales/en.d.ts +3 -0
  336. package/fullstacked_modules/zod/v3/standard-schema.d.cts +102 -0
  337. package/fullstacked_modules/zod/v3/standard-schema.d.ts +102 -0
  338. package/fullstacked_modules/zod/v3/types.d.cts +1034 -0
  339. package/fullstacked_modules/zod/v3/types.d.ts +1034 -0
  340. package/fullstacked_modules/zod/v4/classic/checks.d.cts +1 -0
  341. package/fullstacked_modules/zod/v4/classic/checks.d.ts +1 -0
  342. package/fullstacked_modules/zod/v4/classic/coerce.d.cts +17 -0
  343. package/fullstacked_modules/zod/v4/classic/coerce.d.ts +17 -0
  344. package/fullstacked_modules/zod/v4/classic/compat.d.cts +50 -0
  345. package/fullstacked_modules/zod/v4/classic/compat.d.ts +50 -0
  346. package/fullstacked_modules/zod/v4/classic/errors.d.cts +30 -0
  347. package/fullstacked_modules/zod/v4/classic/errors.d.ts +30 -0
  348. package/fullstacked_modules/zod/v4/classic/external.d.cts +13 -0
  349. package/fullstacked_modules/zod/v4/classic/external.d.ts +13 -0
  350. package/fullstacked_modules/zod/v4/classic/index.d.cts +4 -0
  351. package/fullstacked_modules/zod/v4/classic/index.d.ts +4 -0
  352. package/fullstacked_modules/zod/v4/classic/iso.d.cts +22 -0
  353. package/fullstacked_modules/zod/v4/classic/iso.d.ts +22 -0
  354. package/fullstacked_modules/zod/v4/classic/parse.d.cts +23 -0
  355. package/fullstacked_modules/zod/v4/classic/parse.d.ts +23 -0
  356. package/fullstacked_modules/zod/v4/classic/schemas.d.cts +619 -0
  357. package/fullstacked_modules/zod/v4/classic/schemas.d.ts +619 -0
  358. package/fullstacked_modules/zod/v4/core/api.d.cts +296 -0
  359. package/fullstacked_modules/zod/v4/core/api.d.ts +296 -0
  360. package/fullstacked_modules/zod/v4/core/checks.d.cts +278 -0
  361. package/fullstacked_modules/zod/v4/core/checks.d.ts +278 -0
  362. package/fullstacked_modules/zod/v4/core/core.d.cts +49 -0
  363. package/fullstacked_modules/zod/v4/core/core.d.ts +49 -0
  364. package/fullstacked_modules/zod/v4/core/doc.d.cts +14 -0
  365. package/fullstacked_modules/zod/v4/core/doc.d.ts +14 -0
  366. package/fullstacked_modules/zod/v4/core/errors.d.cts +210 -0
  367. package/fullstacked_modules/zod/v4/core/errors.d.ts +210 -0
  368. package/fullstacked_modules/zod/v4/core/function.d.cts +52 -0
  369. package/fullstacked_modules/zod/v4/core/function.d.ts +52 -0
  370. package/fullstacked_modules/zod/v4/core/index.d.cts +15 -0
  371. package/fullstacked_modules/zod/v4/core/index.d.ts +15 -0
  372. package/fullstacked_modules/zod/v4/core/json-schema.d.cts +87 -0
  373. package/fullstacked_modules/zod/v4/core/json-schema.d.ts +87 -0
  374. package/fullstacked_modules/zod/v4/core/parse.d.cts +25 -0
  375. package/fullstacked_modules/zod/v4/core/parse.d.ts +25 -0
  376. package/fullstacked_modules/zod/v4/core/regexes.d.cts +62 -0
  377. package/fullstacked_modules/zod/v4/core/regexes.d.ts +62 -0
  378. package/fullstacked_modules/zod/v4/core/registries.d.cts +35 -0
  379. package/fullstacked_modules/zod/v4/core/registries.d.ts +35 -0
  380. package/fullstacked_modules/zod/v4/core/schemas.d.cts +1055 -0
  381. package/fullstacked_modules/zod/v4/core/schemas.d.ts +1055 -0
  382. package/fullstacked_modules/zod/v4/core/standard-schema.d.cts +55 -0
  383. package/fullstacked_modules/zod/v4/core/standard-schema.d.ts +55 -0
  384. package/fullstacked_modules/zod/v4/core/to-json-schema.d.cts +89 -0
  385. package/fullstacked_modules/zod/v4/core/to-json-schema.d.ts +89 -0
  386. package/fullstacked_modules/zod/v4/core/util.d.cts +185 -0
  387. package/fullstacked_modules/zod/v4/core/util.d.ts +185 -0
  388. package/fullstacked_modules/zod/v4/core/versions.d.cts +5 -0
  389. package/fullstacked_modules/zod/v4/core/versions.d.ts +5 -0
  390. package/fullstacked_modules/zod/v4/index.d.cts +3 -0
  391. package/fullstacked_modules/zod/v4/index.d.ts +3 -0
  392. package/fullstacked_modules/zod/v4/locales/ar.d.cts +5 -0
  393. package/fullstacked_modules/zod/v4/locales/ar.d.ts +4 -0
  394. package/fullstacked_modules/zod/v4/locales/az.d.cts +5 -0
  395. package/fullstacked_modules/zod/v4/locales/az.d.ts +4 -0
  396. package/fullstacked_modules/zod/v4/locales/be.d.cts +5 -0
  397. package/fullstacked_modules/zod/v4/locales/be.d.ts +4 -0
  398. package/fullstacked_modules/zod/v4/locales/bg.d.cts +5 -0
  399. package/fullstacked_modules/zod/v4/locales/bg.d.ts +5 -0
  400. package/fullstacked_modules/zod/v4/locales/ca.d.cts +5 -0
  401. package/fullstacked_modules/zod/v4/locales/ca.d.ts +4 -0
  402. package/fullstacked_modules/zod/v4/locales/cs.d.cts +5 -0
  403. package/fullstacked_modules/zod/v4/locales/cs.d.ts +4 -0
  404. package/fullstacked_modules/zod/v4/locales/da.d.cts +5 -0
  405. package/fullstacked_modules/zod/v4/locales/da.d.ts +4 -0
  406. package/fullstacked_modules/zod/v4/locales/de.d.cts +5 -0
  407. package/fullstacked_modules/zod/v4/locales/de.d.ts +4 -0
  408. package/fullstacked_modules/zod/v4/locales/en.d.cts +5 -0
  409. package/fullstacked_modules/zod/v4/locales/en.d.ts +5 -0
  410. package/fullstacked_modules/zod/v4/locales/eo.d.cts +5 -0
  411. package/fullstacked_modules/zod/v4/locales/eo.d.ts +5 -0
  412. package/fullstacked_modules/zod/v4/locales/es.d.cts +5 -0
  413. package/fullstacked_modules/zod/v4/locales/es.d.ts +4 -0
  414. package/fullstacked_modules/zod/v4/locales/fa.d.cts +5 -0
  415. package/fullstacked_modules/zod/v4/locales/fa.d.ts +4 -0
  416. package/fullstacked_modules/zod/v4/locales/fi.d.cts +5 -0
  417. package/fullstacked_modules/zod/v4/locales/fi.d.ts +4 -0
  418. package/fullstacked_modules/zod/v4/locales/fr-CA.d.cts +5 -0
  419. package/fullstacked_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  420. package/fullstacked_modules/zod/v4/locales/fr.d.cts +5 -0
  421. package/fullstacked_modules/zod/v4/locales/fr.d.ts +4 -0
  422. package/fullstacked_modules/zod/v4/locales/he.d.cts +5 -0
  423. package/fullstacked_modules/zod/v4/locales/he.d.ts +4 -0
  424. package/fullstacked_modules/zod/v4/locales/hu.d.cts +5 -0
  425. package/fullstacked_modules/zod/v4/locales/hu.d.ts +4 -0
  426. package/fullstacked_modules/zod/v4/locales/id.d.cts +5 -0
  427. package/fullstacked_modules/zod/v4/locales/id.d.ts +4 -0
  428. package/fullstacked_modules/zod/v4/locales/index.d.cts +42 -0
  429. package/fullstacked_modules/zod/v4/locales/index.d.ts +42 -0
  430. package/fullstacked_modules/zod/v4/locales/is.d.cts +5 -0
  431. package/fullstacked_modules/zod/v4/locales/is.d.ts +5 -0
  432. package/fullstacked_modules/zod/v4/locales/it.d.cts +5 -0
  433. package/fullstacked_modules/zod/v4/locales/it.d.ts +4 -0
  434. package/fullstacked_modules/zod/v4/locales/ja.d.cts +5 -0
  435. package/fullstacked_modules/zod/v4/locales/ja.d.ts +4 -0
  436. package/fullstacked_modules/zod/v4/locales/kh.d.cts +5 -0
  437. package/fullstacked_modules/zod/v4/locales/kh.d.ts +4 -0
  438. package/fullstacked_modules/zod/v4/locales/ko.d.cts +5 -0
  439. package/fullstacked_modules/zod/v4/locales/ko.d.ts +4 -0
  440. package/fullstacked_modules/zod/v4/locales/mk.d.cts +5 -0
  441. package/fullstacked_modules/zod/v4/locales/mk.d.ts +4 -0
  442. package/fullstacked_modules/zod/v4/locales/ms.d.cts +5 -0
  443. package/fullstacked_modules/zod/v4/locales/ms.d.ts +4 -0
  444. package/fullstacked_modules/zod/v4/locales/nl.d.cts +5 -0
  445. package/fullstacked_modules/zod/v4/locales/nl.d.ts +4 -0
  446. package/fullstacked_modules/zod/v4/locales/no.d.cts +5 -0
  447. package/fullstacked_modules/zod/v4/locales/no.d.ts +4 -0
  448. package/fullstacked_modules/zod/v4/locales/ota.d.cts +5 -0
  449. package/fullstacked_modules/zod/v4/locales/ota.d.ts +4 -0
  450. package/fullstacked_modules/zod/v4/locales/pl.d.cts +5 -0
  451. package/fullstacked_modules/zod/v4/locales/pl.d.ts +4 -0
  452. package/fullstacked_modules/zod/v4/locales/ps.d.cts +5 -0
  453. package/fullstacked_modules/zod/v4/locales/ps.d.ts +4 -0
  454. package/fullstacked_modules/zod/v4/locales/pt.d.cts +5 -0
  455. package/fullstacked_modules/zod/v4/locales/pt.d.ts +4 -0
  456. package/fullstacked_modules/zod/v4/locales/ru.d.cts +5 -0
  457. package/fullstacked_modules/zod/v4/locales/ru.d.ts +4 -0
  458. package/fullstacked_modules/zod/v4/locales/sl.d.cts +5 -0
  459. package/fullstacked_modules/zod/v4/locales/sl.d.ts +4 -0
  460. package/fullstacked_modules/zod/v4/locales/sv.d.cts +5 -0
  461. package/fullstacked_modules/zod/v4/locales/sv.d.ts +4 -0
  462. package/fullstacked_modules/zod/v4/locales/ta.d.cts +5 -0
  463. package/fullstacked_modules/zod/v4/locales/ta.d.ts +4 -0
  464. package/fullstacked_modules/zod/v4/locales/th.d.cts +5 -0
  465. package/fullstacked_modules/zod/v4/locales/th.d.ts +4 -0
  466. package/fullstacked_modules/zod/v4/locales/tr.d.cts +5 -0
  467. package/fullstacked_modules/zod/v4/locales/tr.d.ts +5 -0
  468. package/fullstacked_modules/zod/v4/locales/ua.d.cts +5 -0
  469. package/fullstacked_modules/zod/v4/locales/ua.d.ts +4 -0
  470. package/fullstacked_modules/zod/v4/locales/ur.d.cts +5 -0
  471. package/fullstacked_modules/zod/v4/locales/ur.d.ts +4 -0
  472. package/fullstacked_modules/zod/v4/locales/vi.d.cts +5 -0
  473. package/fullstacked_modules/zod/v4/locales/vi.d.ts +4 -0
  474. package/fullstacked_modules/zod/v4/locales/yo.d.cts +5 -0
  475. package/fullstacked_modules/zod/v4/locales/yo.d.ts +4 -0
  476. package/fullstacked_modules/zod/v4/locales/zh-CN.d.cts +5 -0
  477. package/fullstacked_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  478. package/fullstacked_modules/zod/v4/locales/zh-TW.d.cts +5 -0
  479. package/fullstacked_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  480. package/fullstacked_modules/zod/v4/mini/checks.d.cts +1 -0
  481. package/fullstacked_modules/zod/v4/mini/checks.d.ts +1 -0
  482. package/fullstacked_modules/zod/v4/mini/coerce.d.cts +7 -0
  483. package/fullstacked_modules/zod/v4/mini/coerce.d.ts +7 -0
  484. package/fullstacked_modules/zod/v4/mini/external.d.cts +11 -0
  485. package/fullstacked_modules/zod/v4/mini/external.d.ts +11 -0
  486. package/fullstacked_modules/zod/v4/mini/index.d.cts +3 -0
  487. package/fullstacked_modules/zod/v4/mini/index.d.ts +3 -0
  488. package/fullstacked_modules/zod/v4/mini/iso.d.cts +22 -0
  489. package/fullstacked_modules/zod/v4/mini/iso.d.ts +22 -0
  490. package/fullstacked_modules/zod/v4/mini/parse.d.cts +1 -0
  491. package/fullstacked_modules/zod/v4/mini/parse.d.ts +1 -0
  492. package/fullstacked_modules/zod/v4/mini/schemas.d.cts +358 -0
  493. package/fullstacked_modules/zod/v4/mini/schemas.d.ts +358 -0
  494. package/fullstacked_modules/zod/v4-mini/index.d.cts +1 -0
  495. package/fullstacked_modules/zod/v4-mini/index.d.ts +1 -0
  496. package/index.js +17 -12
  497. package/package.json +1 -1
  498. package/lib/bridge/index.ts +0 -53
  499. package/lib/fullstacked.d.ts +0 -208
  500. /package/{lib → fullstacked_modules}/components/snackbar.css +0 -0
@@ -0,0 +1,1628 @@
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">;
318
+ export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern" | "when">;
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">;
334
+ export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern" | "when">;
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<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]]>(
1085
+ Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>,
1086
+ discriminator: string,
1087
+ options: Types,
1088
+ params?: string | $ZodDiscriminatedUnionParams
1089
+ ): schemas.$ZodDiscriminatedUnion<Types> {
1090
+ return new Class({
1091
+ type: "union",
1092
+ options,
1093
+ discriminator,
1094
+ ...util.normalizeParams(params),
1095
+ }) as any;
1096
+ }
1097
+
1098
+ // ZodIntersection
1099
+ export type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, "left" | "right">;
1100
+ export function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(
1101
+ Class: util.SchemaClass<schemas.$ZodIntersection>,
1102
+ left: T,
1103
+ right: U
1104
+ ): schemas.$ZodIntersection<T, U> {
1105
+ return new Class({
1106
+ type: "intersection",
1107
+ left,
1108
+ right,
1109
+ }) as any;
1110
+ }
1111
+
1112
+ // ZodTuple
1113
+ export type $ZodTupleParams = TypeParams<schemas.$ZodTuple, "items" | "rest">;
1114
+ export function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(
1115
+ Class: util.SchemaClass<schemas.$ZodTuple>,
1116
+ items: T,
1117
+ params?: string | $ZodTupleParams
1118
+ ): schemas.$ZodTuple<T, null>;
1119
+ export function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(
1120
+ Class: util.SchemaClass<schemas.$ZodTuple>,
1121
+ items: T,
1122
+ rest: Rest,
1123
+ params?: string | $ZodTupleParams
1124
+ ): schemas.$ZodTuple<T, Rest>;
1125
+ // export function _tuple(
1126
+ // Class: util.SchemaClass<schemas.$ZodTuple>,
1127
+ // items: [],
1128
+ // params?: string | $ZodTupleParams
1129
+ // ): schemas.$ZodTuple<[], null>;
1130
+ export function _tuple(
1131
+ Class: util.SchemaClass<schemas.$ZodTuple>,
1132
+ items: schemas.$ZodType[],
1133
+ _paramsOrRest?: string | $ZodTupleParams | schemas.$ZodType,
1134
+ _params?: string | $ZodTupleParams
1135
+ ) {
1136
+ const hasRest = _paramsOrRest instanceof schemas.$ZodType;
1137
+ const params = hasRest ? _params : _paramsOrRest;
1138
+ const rest = hasRest ? _paramsOrRest : null;
1139
+ return new Class({
1140
+ type: "tuple",
1141
+ items,
1142
+ rest,
1143
+ ...util.normalizeParams(params),
1144
+ });
1145
+ }
1146
+
1147
+ // ZodRecord
1148
+ export type $ZodRecordParams = TypeParams<schemas.$ZodRecord, "keyType" | "valueType">;
1149
+ export function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(
1150
+ Class: util.SchemaClass<schemas.$ZodRecord>,
1151
+ keyType: Key,
1152
+ valueType: Value,
1153
+ params?: string | $ZodRecordParams
1154
+ ): schemas.$ZodRecord<Key, Value> {
1155
+ return new Class({
1156
+ type: "record",
1157
+ keyType,
1158
+ valueType,
1159
+ ...util.normalizeParams(params),
1160
+ }) as any;
1161
+ }
1162
+
1163
+ // ZodMap
1164
+ export type $ZodMapParams = TypeParams<schemas.$ZodMap, "keyType" | "valueType">;
1165
+ export function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(
1166
+ Class: util.SchemaClass<schemas.$ZodMap>,
1167
+ keyType: Key,
1168
+ valueType: Value,
1169
+ params?: string | $ZodMapParams
1170
+ ): schemas.$ZodMap<Key, Value> {
1171
+ return new Class({
1172
+ type: "map",
1173
+ keyType,
1174
+ valueType,
1175
+ ...util.normalizeParams(params),
1176
+ }) as any;
1177
+ }
1178
+
1179
+ // ZodSet
1180
+ export type $ZodSetParams = TypeParams<schemas.$ZodSet, "valueType">;
1181
+ export function _set<Value extends schemas.$ZodObject>(
1182
+ Class: util.SchemaClass<schemas.$ZodSet>,
1183
+ valueType: Value,
1184
+ params?: string | $ZodSetParams
1185
+ ): schemas.$ZodSet<Value> {
1186
+ return new Class({
1187
+ type: "set",
1188
+ valueType,
1189
+ ...util.normalizeParams(params),
1190
+ }) as any;
1191
+ }
1192
+
1193
+ // ZodEnum
1194
+ export type $ZodEnumParams = TypeParams<schemas.$ZodEnum, "entries">;
1195
+ export function _enum<const T extends string[]>(
1196
+ Class: util.SchemaClass<schemas.$ZodEnum>,
1197
+ values: T,
1198
+ params?: string | $ZodEnumParams
1199
+ ): schemas.$ZodEnum<util.ToEnum<T[number]>>;
1200
+ export function _enum<T extends util.EnumLike>(
1201
+ Class: util.SchemaClass<schemas.$ZodEnum>,
1202
+ entries: T,
1203
+ params?: string | $ZodEnumParams
1204
+ ): schemas.$ZodEnum<T>;
1205
+ export function _enum(Class: util.SchemaClass<schemas.$ZodEnum>, values: any, params?: string | $ZodEnumParams) {
1206
+ const entries: any = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
1207
+ // if (Array.isArray(values)) {
1208
+ // for (const value of values) {
1209
+ // entries[value] = value;
1210
+ // }
1211
+ // } else {
1212
+ // Object.assign(entries, values);
1213
+ // }
1214
+ // const entries: util.EnumLike = {};
1215
+ // for (const val of values) {
1216
+ // entries[val] = val;
1217
+ // }
1218
+
1219
+ return new Class({
1220
+ type: "enum",
1221
+ entries,
1222
+ ...util.normalizeParams(params),
1223
+ }) as any;
1224
+ }
1225
+
1226
+ /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
1227
+ *
1228
+ * ```ts
1229
+ * enum Colors { red, green, blue }
1230
+ * z.enum(Colors);
1231
+ * ```
1232
+ */
1233
+ export function _nativeEnum<T extends util.EnumLike>(
1234
+ Class: util.SchemaClass<schemas.$ZodEnum>,
1235
+ entries: T,
1236
+ params?: string | $ZodEnumParams
1237
+ ): schemas.$ZodEnum<T> {
1238
+ return new Class({
1239
+ type: "enum",
1240
+ entries,
1241
+ ...util.normalizeParams(params),
1242
+ }) as any;
1243
+ }
1244
+
1245
+ // ZodLiteral
1246
+ export type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, "values">;
1247
+ export function _literal<const T extends Array<util.Literal>>(
1248
+ Class: util.SchemaClass<schemas.$ZodLiteral>,
1249
+ value: T,
1250
+ params?: string | $ZodLiteralParams
1251
+ ): schemas.$ZodLiteral<T[number]>;
1252
+ export function _literal<const T extends util.Literal>(
1253
+ Class: util.SchemaClass<schemas.$ZodLiteral>,
1254
+ value: T,
1255
+ params?: string | $ZodLiteralParams
1256
+ ): schemas.$ZodLiteral<T>;
1257
+ export function _literal(Class: util.SchemaClass<schemas.$ZodLiteral>, value: any, params: any) {
1258
+ return new Class({
1259
+ type: "literal",
1260
+ values: Array.isArray(value) ? value : [value],
1261
+ ...util.normalizeParams(params),
1262
+ });
1263
+ }
1264
+
1265
+ // ZodFile
1266
+ export type $ZodFileParams = TypeParams<schemas.$ZodFile>;
1267
+ export function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile {
1268
+ return new Class({
1269
+ type: "file",
1270
+ ...util.normalizeParams(params),
1271
+ });
1272
+ }
1273
+
1274
+ // ZodTransform
1275
+ export type $ZodTransformParams = TypeParams<schemas.$ZodTransform, "transform">;
1276
+ export function _transform<I = unknown, O = I>(
1277
+ Class: util.SchemaClass<schemas.$ZodTransform>,
1278
+ fn: (input: I, ctx?: schemas.ParsePayload) => O
1279
+ ): schemas.$ZodTransform<Awaited<O>, I> {
1280
+ return new Class({
1281
+ type: "transform",
1282
+ transform: fn as any,
1283
+ }) as any;
1284
+ }
1285
+
1286
+ // ZodOptional
1287
+ export type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, "innerType">;
1288
+ export function _optional<T extends schemas.$ZodObject>(
1289
+ Class: util.SchemaClass<schemas.$ZodOptional>,
1290
+ innerType: T
1291
+ ): schemas.$ZodOptional<T> {
1292
+ return new Class({
1293
+ type: "optional",
1294
+ innerType,
1295
+ }) as any;
1296
+ }
1297
+
1298
+ // ZodNullable
1299
+ export type $ZodNullableParams = TypeParams<schemas.$ZodNullable, "innerType">;
1300
+ export function _nullable<T extends schemas.$ZodObject>(
1301
+ Class: util.SchemaClass<schemas.$ZodNullable>,
1302
+ innerType: T
1303
+ ): schemas.$ZodNullable<T> {
1304
+ return new Class({
1305
+ type: "nullable",
1306
+ innerType,
1307
+ }) as any;
1308
+ }
1309
+
1310
+ // ZodDefault
1311
+ export type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, "innerType" | "defaultValue">;
1312
+ export function _default<T extends schemas.$ZodObject>(
1313
+ Class: util.SchemaClass<schemas.$ZodDefault>,
1314
+ innerType: T,
1315
+ defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)
1316
+ ): schemas.$ZodDefault<T> {
1317
+ return new Class({
1318
+ type: "default",
1319
+ innerType,
1320
+ get defaultValue() {
1321
+ return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue;
1322
+ },
1323
+ }) as any;
1324
+ }
1325
+
1326
+ // ZodNonOptional
1327
+ export type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, "innerType">;
1328
+ export function _nonoptional<T extends schemas.$ZodObject>(
1329
+ Class: util.SchemaClass<schemas.$ZodNonOptional>,
1330
+ innerType: T,
1331
+ params?: string | $ZodNonOptionalParams
1332
+ ): schemas.$ZodNonOptional<T> {
1333
+ return new Class({
1334
+ type: "nonoptional",
1335
+ innerType,
1336
+ ...util.normalizeParams(params),
1337
+ }) as any;
1338
+ }
1339
+
1340
+ // ZodSuccess
1341
+ export type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, "innerType">;
1342
+ export function _success<T extends schemas.$ZodObject>(
1343
+ Class: util.SchemaClass<schemas.$ZodSuccess>,
1344
+ innerType: T
1345
+ ): schemas.$ZodSuccess<T> {
1346
+ return new Class({
1347
+ type: "success",
1348
+ innerType,
1349
+ }) as any;
1350
+ }
1351
+
1352
+ // ZodCatch
1353
+ export type $ZodCatchParams = TypeParams<schemas.$ZodCatch, "innerType" | "catchValue">;
1354
+ export function _catch<T extends schemas.$ZodObject>(
1355
+ Class: util.SchemaClass<schemas.$ZodCatch>,
1356
+ innerType: T,
1357
+ catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)
1358
+ ): schemas.$ZodCatch<T> {
1359
+ return new Class({
1360
+ type: "catch",
1361
+ innerType,
1362
+ catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue) as any,
1363
+ }) as any;
1364
+ }
1365
+
1366
+ // ZodPipe
1367
+ export type $ZodPipeParams = TypeParams<schemas.$ZodPipe, "in" | "out">;
1368
+ export function _pipe<
1369
+ const A extends schemas.$ZodType,
1370
+ B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>,
1371
+ >(
1372
+ Class: util.SchemaClass<schemas.$ZodPipe>,
1373
+ in_: A,
1374
+ out: B | schemas.$ZodType<unknown, core.output<A>>
1375
+ ): schemas.$ZodPipe<A, B> {
1376
+ return new Class({
1377
+ type: "pipe",
1378
+ in: in_,
1379
+ out,
1380
+ }) as any;
1381
+ }
1382
+
1383
+ // ZodReadonly
1384
+ export type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, "innerType">;
1385
+ export function _readonly<T extends schemas.$ZodObject>(
1386
+ Class: util.SchemaClass<schemas.$ZodReadonly>,
1387
+ innerType: T
1388
+ ): schemas.$ZodReadonly<T> {
1389
+ return new Class({
1390
+ type: "readonly",
1391
+ innerType,
1392
+ }) as any;
1393
+ }
1394
+
1395
+ // ZodTemplateLiteral
1396
+ export type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, "parts">;
1397
+ export function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(
1398
+ Class: util.SchemaClass<schemas.$ZodTemplateLiteral>,
1399
+ parts: Parts,
1400
+ params?: string | $ZodTemplateLiteralParams
1401
+ ): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>> {
1402
+ return new Class({
1403
+ type: "template_literal",
1404
+ parts,
1405
+ ...util.normalizeParams(params),
1406
+ }) as any;
1407
+ }
1408
+
1409
+ // ZodLazy
1410
+ export type $ZodLazyParams = TypeParams<schemas.$ZodLazy, "getter">;
1411
+ export function _lazy<T extends schemas.$ZodType>(
1412
+ Class: util.SchemaClass<schemas.$ZodLazy>,
1413
+ getter: () => T
1414
+ ): schemas.$ZodLazy<T> {
1415
+ return new Class({
1416
+ type: "lazy",
1417
+ getter,
1418
+ }) as any;
1419
+ }
1420
+
1421
+ // ZodPromise
1422
+ export type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, "innerType">;
1423
+ export function _promise<T extends schemas.$ZodObject>(
1424
+ Class: util.SchemaClass<schemas.$ZodPromise>,
1425
+ innerType: T
1426
+ ): schemas.$ZodPromise<T> {
1427
+ return new Class({
1428
+ type: "promise",
1429
+ innerType,
1430
+ }) as any;
1431
+ }
1432
+
1433
+ // ZodCustom
1434
+ export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
1435
+ export function _custom<O = unknown, I = O>(
1436
+ Class: util.SchemaClass<schemas.$ZodCustom>,
1437
+ fn: (data: O) => unknown,
1438
+ _params: string | $ZodCustomParams | undefined
1439
+ ): schemas.$ZodCustom<O, I> {
1440
+ const norm = util.normalizeParams(_params);
1441
+ norm.abort ??= true; // default to abort:false
1442
+ const schema = new Class({
1443
+ type: "custom",
1444
+ check: "custom",
1445
+ fn: fn as any,
1446
+ ...norm,
1447
+ });
1448
+
1449
+ return schema as any;
1450
+ }
1451
+
1452
+ // same as _custom but defaults to abort:false
1453
+ export function _refine<O = unknown, I = O>(
1454
+ Class: util.SchemaClass<schemas.$ZodCustom>,
1455
+ fn: (data: O) => unknown,
1456
+ _params: string | $ZodCustomParams | undefined
1457
+ ): schemas.$ZodCustom<O, I> {
1458
+ const schema = new Class({
1459
+ type: "custom",
1460
+ check: "custom",
1461
+ fn: fn as any,
1462
+ ...util.normalizeParams(_params),
1463
+ });
1464
+
1465
+ return schema as any;
1466
+ }
1467
+
1468
+ export type $ZodSuperRefineIssue<T extends errors.$ZodIssueBase = errors.$ZodIssue> = T extends any
1469
+ ? RawIssue<T>
1470
+ : never;
1471
+ type RawIssue<T extends errors.$ZodIssueBase> = T extends any
1472
+ ? util.Flatten<
1473
+ util.MakePartial<T, "message" | "path"> & {
1474
+ /** The schema or check that originated this issue. */
1475
+ readonly inst?: schemas.$ZodType | checks.$ZodCheck;
1476
+ /** If `true`, Zod will continue executing checks/refinements after this issue. */
1477
+ readonly continue?: boolean | undefined;
1478
+ } & Record<string, unknown>
1479
+ >
1480
+ : never;
1481
+
1482
+ export interface $RefinementCtx<T = unknown> extends schemas.ParsePayload<T> {
1483
+ addIssue(arg: string | $ZodSuperRefineIssue): void;
1484
+ }
1485
+
1486
+ export function _superRefine<T>(fn: (arg: T, payload: $RefinementCtx<T>) => void | Promise<void>): checks.$ZodCheck<T> {
1487
+ const ch = _check<T>((payload) => {
1488
+ (payload as $RefinementCtx).addIssue = (issue) => {
1489
+ if (typeof issue === "string") {
1490
+ payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
1491
+ } else {
1492
+ // for Zod 3 backwards compatibility
1493
+ const _issue: any = issue;
1494
+ if (_issue.fatal) _issue.continue = false;
1495
+ _issue.code ??= "custom";
1496
+ _issue.input ??= payload.value;
1497
+ _issue.inst ??= ch;
1498
+ _issue.continue ??= !ch._zod.def.abort;
1499
+ payload.issues.push(util.issue(_issue));
1500
+ }
1501
+ };
1502
+
1503
+ return fn(payload.value, payload as $RefinementCtx<T>);
1504
+ });
1505
+ return ch;
1506
+ }
1507
+
1508
+ export function _check<O = unknown>(fn: schemas.CheckFn<O>, params?: string | $ZodCustomParams): checks.$ZodCheck<O> {
1509
+ const ch = new checks.$ZodCheck({
1510
+ check: "custom",
1511
+ ...util.normalizeParams(params),
1512
+ });
1513
+
1514
+ ch._zod.check = fn;
1515
+ return ch;
1516
+ }
1517
+
1518
+ // export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">
1519
+
1520
+ ///////// STRINGBOOL /////////
1521
+
1522
+ // stringbool
1523
+ export interface $ZodStringBoolParams extends TypeParams {
1524
+ truthy?: string[];
1525
+ falsy?: string[];
1526
+ /**
1527
+ * Options: `"sensitive"`, `"insensitive"`
1528
+ *
1529
+ * @default `"insensitive"`
1530
+ */
1531
+ case?: "sensitive" | "insensitive" | undefined;
1532
+ }
1533
+
1534
+ export function _stringbool(
1535
+ Classes: {
1536
+ Pipe?: typeof schemas.$ZodPipe;
1537
+ Boolean?: typeof schemas.$ZodBoolean;
1538
+ Transform?: typeof schemas.$ZodTransform;
1539
+ String?: typeof schemas.$ZodString;
1540
+ },
1541
+ _params?: string | $ZodStringBoolParams
1542
+ ): schemas.$ZodPipe<
1543
+ schemas.$ZodPipe<schemas.$ZodString, schemas.$ZodTransform<boolean, string>>,
1544
+ schemas.$ZodBoolean<boolean>
1545
+ > {
1546
+ const params = util.normalizeParams(_params);
1547
+
1548
+ let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
1549
+ let falsyArray = params.falsy ?? ["false", "0", "no", "off", "n", "disabled"];
1550
+ if (params.case !== "sensitive") {
1551
+ truthyArray = truthyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
1552
+ falsyArray = falsyArray.map((v) => (typeof v === "string" ? v.toLowerCase() : v));
1553
+ }
1554
+
1555
+ const truthySet = new Set(truthyArray);
1556
+ const falsySet = new Set(falsyArray);
1557
+
1558
+ const _Pipe = Classes.Pipe ?? schemas.$ZodPipe;
1559
+ const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;
1560
+ const _String = Classes.String ?? schemas.$ZodString;
1561
+ const _Transform = Classes.Transform ?? schemas.$ZodTransform;
1562
+
1563
+ const tx = new _Transform({
1564
+ type: "transform",
1565
+ transform: (input, payload: schemas.ParsePayload<unknown>) => {
1566
+ let data: string = input as string;
1567
+ if (params.case !== "sensitive") data = data.toLowerCase();
1568
+ if (truthySet.has(data)) {
1569
+ return true;
1570
+ } else if (falsySet.has(data)) {
1571
+ return false;
1572
+ } else {
1573
+ payload.issues.push({
1574
+ code: "invalid_value",
1575
+ expected: "stringbool",
1576
+ values: [...truthySet, ...falsySet],
1577
+ input: payload.value,
1578
+ inst: tx,
1579
+ continue: false,
1580
+ });
1581
+ return {} as never;
1582
+ }
1583
+ },
1584
+ error: params.error,
1585
+ });
1586
+ // params.error;
1587
+
1588
+ const innerPipe = new _Pipe({
1589
+ type: "pipe",
1590
+ in: new _String({ type: "string", error: params.error }),
1591
+ out: tx,
1592
+ error: params.error,
1593
+ });
1594
+
1595
+ const outerPipe = new _Pipe({
1596
+ type: "pipe",
1597
+ in: innerPipe,
1598
+ out: new _Boolean({
1599
+ type: "boolean",
1600
+ error: params.error,
1601
+ }),
1602
+ error: params.error,
1603
+ });
1604
+ return outerPipe as any;
1605
+ }
1606
+
1607
+ export function _stringFormat<Format extends string>(
1608
+ Class: typeof schemas.$ZodCustomStringFormat,
1609
+ format: Format,
1610
+ fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp,
1611
+ _params: string | $ZodStringFormatParams = {}
1612
+ ): schemas.$ZodCustomStringFormat<Format> {
1613
+ const params = util.normalizeParams(_params);
1614
+ const def: schemas.$ZodCustomStringFormatDef = {
1615
+ ...util.normalizeParams(_params),
1616
+ check: "string_format",
1617
+ type: "string",
1618
+ format,
1619
+ fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
1620
+ ...params,
1621
+ };
1622
+ if (fnOrRegex instanceof RegExp) {
1623
+ def.pattern = fnOrRegex;
1624
+ }
1625
+
1626
+ const inst = new Class(def);
1627
+ return inst as any;
1628
+ }