@ubundi/openclaw-cortex 1.5.0 → 1.5.2

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 (599) hide show
  1. package/dist/internal/identity/api-key.js +1 -1
  2. package/openclaw.plugin.json +1 -1
  3. package/package.json +1 -4
  4. package/node_modules/zod/LICENSE +0 -21
  5. package/node_modules/zod/README.md +0 -208
  6. package/node_modules/zod/index.cjs +0 -33
  7. package/node_modules/zod/index.d.cts +0 -4
  8. package/node_modules/zod/index.d.ts +0 -4
  9. package/node_modules/zod/index.js +0 -4
  10. package/node_modules/zod/package.json +0 -118
  11. package/node_modules/zod/src/index.ts +0 -4
  12. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  13. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  14. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  15. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  16. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  17. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  18. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  19. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  20. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  21. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  22. package/node_modules/zod/src/v3/errors.ts +0 -13
  23. package/node_modules/zod/src/v3/external.ts +0 -6
  24. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  25. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  26. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  27. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  28. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  29. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  30. package/node_modules/zod/src/v3/index.ts +0 -4
  31. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  32. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  33. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  34. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  35. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  36. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  37. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  38. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  39. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  40. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  41. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  42. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  43. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  44. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
  45. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  46. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  47. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  48. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  49. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  50. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  51. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  52. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  53. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  54. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  55. package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
  56. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  57. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  58. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  59. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  60. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  61. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  62. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  63. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  64. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  65. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
  66. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  67. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  68. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  69. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  70. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  71. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  72. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  73. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  74. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  75. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  76. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  77. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  78. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  79. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  80. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  81. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  82. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  83. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  84. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  85. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  86. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  87. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  88. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  89. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  90. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  91. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  92. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  93. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  94. package/node_modules/zod/src/v3/types.ts +0 -5136
  95. package/node_modules/zod/src/v4/classic/checks.ts +0 -30
  96. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  97. package/node_modules/zod/src/v4/classic/compat.ts +0 -66
  98. package/node_modules/zod/src/v4/classic/errors.ts +0 -75
  99. package/node_modules/zod/src/v4/classic/external.ts +0 -50
  100. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  101. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  102. package/node_modules/zod/src/v4/classic/parse.ts +0 -33
  103. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
  104. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  105. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  106. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  107. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  108. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  109. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  110. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  111. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  112. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
  113. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  114. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  115. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  116. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  117. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  118. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
  119. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
  120. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  121. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
  122. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  123. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
  124. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  125. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
  126. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
  127. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
  128. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  129. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
  130. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  131. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  132. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  133. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  134. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
  135. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  136. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  137. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  138. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
  139. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  140. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
  141. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
  142. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
  143. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
  144. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  145. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
  146. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
  147. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
  148. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  149. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  150. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  151. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  152. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
  153. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
  154. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
  155. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  156. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
  157. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  158. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
  159. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
  160. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
  161. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
  162. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
  163. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
  164. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  165. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
  166. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  167. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  168. package/node_modules/zod/src/v4/core/api.ts +0 -1594
  169. package/node_modules/zod/src/v4/core/checks.ts +0 -1283
  170. package/node_modules/zod/src/v4/core/config.ts +0 -15
  171. package/node_modules/zod/src/v4/core/core.ts +0 -134
  172. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  173. package/node_modules/zod/src/v4/core/errors.ts +0 -424
  174. package/node_modules/zod/src/v4/core/function.ts +0 -176
  175. package/node_modules/zod/src/v4/core/index.ts +0 -15
  176. package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
  177. package/node_modules/zod/src/v4/core/parse.ts +0 -94
  178. package/node_modules/zod/src/v4/core/regexes.ts +0 -135
  179. package/node_modules/zod/src/v4/core/registries.ts +0 -96
  180. package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
  181. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
  182. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  183. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  184. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  185. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  186. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  187. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
  188. package/node_modules/zod/src/v4/core/util.ts +0 -775
  189. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  190. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  191. package/node_modules/zod/src/v4/index.ts +0 -4
  192. package/node_modules/zod/src/v4/locales/ar.ts +0 -125
  193. package/node_modules/zod/src/v4/locales/az.ts +0 -121
  194. package/node_modules/zod/src/v4/locales/be.ts +0 -184
  195. package/node_modules/zod/src/v4/locales/ca.ts +0 -127
  196. package/node_modules/zod/src/v4/locales/cs.ts +0 -142
  197. package/node_modules/zod/src/v4/locales/de.ts +0 -124
  198. package/node_modules/zod/src/v4/locales/en.ts +0 -127
  199. package/node_modules/zod/src/v4/locales/eo.ts +0 -125
  200. package/node_modules/zod/src/v4/locales/es.ts +0 -125
  201. package/node_modules/zod/src/v4/locales/fa.ts +0 -134
  202. package/node_modules/zod/src/v4/locales/fi.ts +0 -131
  203. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  204. package/node_modules/zod/src/v4/locales/fr.ts +0 -124
  205. package/node_modules/zod/src/v4/locales/he.ts +0 -125
  206. package/node_modules/zod/src/v4/locales/hu.ts +0 -126
  207. package/node_modules/zod/src/v4/locales/id.ts +0 -125
  208. package/node_modules/zod/src/v4/locales/index.ts +0 -39
  209. package/node_modules/zod/src/v4/locales/it.ts +0 -125
  210. package/node_modules/zod/src/v4/locales/ja.ts +0 -122
  211. package/node_modules/zod/src/v4/locales/kh.ts +0 -126
  212. package/node_modules/zod/src/v4/locales/ko.ts +0 -131
  213. package/node_modules/zod/src/v4/locales/mk.ts +0 -127
  214. package/node_modules/zod/src/v4/locales/ms.ts +0 -124
  215. package/node_modules/zod/src/v4/locales/nl.ts +0 -126
  216. package/node_modules/zod/src/v4/locales/no.ts +0 -124
  217. package/node_modules/zod/src/v4/locales/ota.ts +0 -125
  218. package/node_modules/zod/src/v4/locales/pl.ts +0 -126
  219. package/node_modules/zod/src/v4/locales/ps.ts +0 -133
  220. package/node_modules/zod/src/v4/locales/pt.ts +0 -123
  221. package/node_modules/zod/src/v4/locales/ru.ts +0 -184
  222. package/node_modules/zod/src/v4/locales/sl.ts +0 -126
  223. package/node_modules/zod/src/v4/locales/sv.ts +0 -127
  224. package/node_modules/zod/src/v4/locales/ta.ts +0 -125
  225. package/node_modules/zod/src/v4/locales/th.ts +0 -126
  226. package/node_modules/zod/src/v4/locales/tr.ts +0 -121
  227. package/node_modules/zod/src/v4/locales/ua.ts +0 -126
  228. package/node_modules/zod/src/v4/locales/ur.ts +0 -126
  229. package/node_modules/zod/src/v4/locales/vi.ts +0 -125
  230. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  231. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  232. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  233. package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
  234. package/node_modules/zod/src/v4/mini/external.ts +0 -40
  235. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  236. package/node_modules/zod/src/v4/mini/iso.ts +0 -62
  237. package/node_modules/zod/src/v4/mini/parse.ts +0 -1
  238. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
  239. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  240. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  241. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  242. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  243. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  244. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  245. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
  246. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  247. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
  248. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  249. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  250. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
  251. package/node_modules/zod/src/v4-mini/index.ts +0 -1
  252. package/node_modules/zod/v3/ZodError.cjs +0 -138
  253. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  254. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  255. package/node_modules/zod/v3/ZodError.js +0 -133
  256. package/node_modules/zod/v3/errors.cjs +0 -17
  257. package/node_modules/zod/v3/errors.d.cts +0 -5
  258. package/node_modules/zod/v3/errors.d.ts +0 -5
  259. package/node_modules/zod/v3/errors.js +0 -9
  260. package/node_modules/zod/v3/external.cjs +0 -22
  261. package/node_modules/zod/v3/external.d.cts +0 -6
  262. package/node_modules/zod/v3/external.d.ts +0 -6
  263. package/node_modules/zod/v3/external.js +0 -6
  264. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  265. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  266. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  267. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  268. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  269. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  270. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  271. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  272. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  273. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  274. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  275. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  276. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  277. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  278. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  279. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  280. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  281. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  282. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  283. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  284. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  285. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  286. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  287. package/node_modules/zod/v3/helpers/util.js +0 -133
  288. package/node_modules/zod/v3/index.cjs +0 -33
  289. package/node_modules/zod/v3/index.d.cts +0 -4
  290. package/node_modules/zod/v3/index.d.ts +0 -4
  291. package/node_modules/zod/v3/index.js +0 -4
  292. package/node_modules/zod/v3/locales/en.cjs +0 -111
  293. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  294. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  295. package/node_modules/zod/v3/locales/en.js +0 -109
  296. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  297. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  298. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  299. package/node_modules/zod/v3/standard-schema.js +0 -1
  300. package/node_modules/zod/v3/types.cjs +0 -3775
  301. package/node_modules/zod/v3/types.d.cts +0 -1031
  302. package/node_modules/zod/v3/types.d.ts +0 -1031
  303. package/node_modules/zod/v3/types.js +0 -3693
  304. package/node_modules/zod/v4/classic/checks.cjs +0 -32
  305. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  306. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  307. package/node_modules/zod/v4/classic/checks.js +0 -1
  308. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  309. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  310. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  311. package/node_modules/zod/v4/classic/coerce.js +0 -17
  312. package/node_modules/zod/v4/classic/compat.cjs +0 -57
  313. package/node_modules/zod/v4/classic/compat.d.cts +0 -46
  314. package/node_modules/zod/v4/classic/compat.d.ts +0 -46
  315. package/node_modules/zod/v4/classic/compat.js +0 -27
  316. package/node_modules/zod/v4/classic/errors.cjs +0 -67
  317. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  318. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  319. package/node_modules/zod/v4/classic/errors.js +0 -41
  320. package/node_modules/zod/v4/classic/external.cjs +0 -70
  321. package/node_modules/zod/v4/classic/external.d.cts +0 -13
  322. package/node_modules/zod/v4/classic/external.d.ts +0 -13
  323. package/node_modules/zod/v4/classic/external.js +0 -18
  324. package/node_modules/zod/v4/classic/index.cjs +0 -33
  325. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  326. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  327. package/node_modules/zod/v4/classic/index.js +0 -4
  328. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  329. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  330. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  331. package/node_modules/zod/v4/classic/iso.js +0 -30
  332. package/node_modules/zod/v4/classic/parse.cjs +0 -32
  333. package/node_modules/zod/v4/classic/parse.d.cts +0 -23
  334. package/node_modules/zod/v4/classic/parse.d.ts +0 -23
  335. package/node_modules/zod/v4/classic/parse.js +0 -6
  336. package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
  337. package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
  338. package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
  339. package/node_modules/zod/v4/classic/schemas.js +0 -1006
  340. package/node_modules/zod/v4/core/api.cjs +0 -1039
  341. package/node_modules/zod/v4/core/api.d.cts +0 -284
  342. package/node_modules/zod/v4/core/api.d.ts +0 -284
  343. package/node_modules/zod/v4/core/api.js +0 -906
  344. package/node_modules/zod/v4/core/checks.cjs +0 -591
  345. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  346. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  347. package/node_modules/zod/v4/core/checks.js +0 -565
  348. package/node_modules/zod/v4/core/core.cjs +0 -67
  349. package/node_modules/zod/v4/core/core.d.cts +0 -49
  350. package/node_modules/zod/v4/core/core.d.ts +0 -49
  351. package/node_modules/zod/v4/core/core.js +0 -61
  352. package/node_modules/zod/v4/core/doc.cjs +0 -39
  353. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  354. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  355. package/node_modules/zod/v4/core/doc.js +0 -35
  356. package/node_modules/zod/v4/core/errors.cjs +0 -226
  357. package/node_modules/zod/v4/core/errors.d.cts +0 -208
  358. package/node_modules/zod/v4/core/errors.d.ts +0 -208
  359. package/node_modules/zod/v4/core/errors.js +0 -195
  360. package/node_modules/zod/v4/core/function.cjs +0 -102
  361. package/node_modules/zod/v4/core/function.d.cts +0 -52
  362. package/node_modules/zod/v4/core/function.d.ts +0 -52
  363. package/node_modules/zod/v4/core/function.js +0 -75
  364. package/node_modules/zod/v4/core/index.cjs +0 -44
  365. package/node_modules/zod/v4/core/index.d.cts +0 -15
  366. package/node_modules/zod/v4/core/index.d.ts +0 -15
  367. package/node_modules/zod/v4/core/index.js +0 -15
  368. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  369. package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
  370. package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
  371. package/node_modules/zod/v4/core/json-schema.js +0 -1
  372. package/node_modules/zod/v4/core/parse.cjs +0 -87
  373. package/node_modules/zod/v4/core/parse.d.cts +0 -25
  374. package/node_modules/zod/v4/core/parse.d.ts +0 -25
  375. package/node_modules/zod/v4/core/parse.js +0 -57
  376. package/node_modules/zod/v4/core/regexes.cjs +0 -103
  377. package/node_modules/zod/v4/core/regexes.d.cts +0 -62
  378. package/node_modules/zod/v4/core/regexes.d.ts +0 -62
  379. package/node_modules/zod/v4/core/regexes.js +0 -95
  380. package/node_modules/zod/v4/core/registries.cjs +0 -56
  381. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  382. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  383. package/node_modules/zod/v4/core/registries.js +0 -51
  384. package/node_modules/zod/v4/core/schemas.cjs +0 -1748
  385. package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
  386. package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
  387. package/node_modules/zod/v4/core/schemas.js +0 -1717
  388. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  389. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
  390. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
  391. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  392. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
  393. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
  394. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
  395. package/node_modules/zod/v4/core/to-json-schema.js +0 -849
  396. package/node_modules/zod/v4/core/util.cjs +0 -539
  397. package/node_modules/zod/v4/core/util.d.cts +0 -183
  398. package/node_modules/zod/v4/core/util.d.ts +0 -183
  399. package/node_modules/zod/v4/core/util.js +0 -493
  400. package/node_modules/zod/v4/core/versions.cjs +0 -8
  401. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  402. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  403. package/node_modules/zod/v4/core/versions.js +0 -5
  404. package/node_modules/zod/v4/index.cjs +0 -22
  405. package/node_modules/zod/v4/index.d.cts +0 -3
  406. package/node_modules/zod/v4/index.d.ts +0 -3
  407. package/node_modules/zod/v4/index.js +0 -3
  408. package/node_modules/zod/v4/locales/ar.cjs +0 -142
  409. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  410. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  411. package/node_modules/zod/v4/locales/ar.js +0 -116
  412. package/node_modules/zod/v4/locales/az.cjs +0 -141
  413. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  414. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  415. package/node_modules/zod/v4/locales/az.js +0 -115
  416. package/node_modules/zod/v4/locales/be.cjs +0 -190
  417. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  418. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  419. package/node_modules/zod/v4/locales/be.js +0 -164
  420. package/node_modules/zod/v4/locales/ca.cjs +0 -144
  421. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  422. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  423. package/node_modules/zod/v4/locales/ca.js +0 -118
  424. package/node_modules/zod/v4/locales/cs.cjs +0 -161
  425. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  426. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  427. package/node_modules/zod/v4/locales/cs.js +0 -135
  428. package/node_modules/zod/v4/locales/de.cjs +0 -142
  429. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  430. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  431. package/node_modules/zod/v4/locales/de.js +0 -116
  432. package/node_modules/zod/v4/locales/en.cjs +0 -145
  433. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  434. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  435. package/node_modules/zod/v4/locales/en.js +0 -117
  436. package/node_modules/zod/v4/locales/eo.cjs +0 -144
  437. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  438. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  439. package/node_modules/zod/v4/locales/eo.js +0 -116
  440. package/node_modules/zod/v4/locales/es.cjs +0 -143
  441. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  442. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  443. package/node_modules/zod/v4/locales/es.js +0 -117
  444. package/node_modules/zod/v4/locales/fa.cjs +0 -148
  445. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  446. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  447. package/node_modules/zod/v4/locales/fa.js +0 -122
  448. package/node_modules/zod/v4/locales/fi.cjs +0 -148
  449. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  450. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  451. package/node_modules/zod/v4/locales/fi.js +0 -122
  452. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
  453. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  454. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  455. package/node_modules/zod/v4/locales/fr-CA.js +0 -117
  456. package/node_modules/zod/v4/locales/fr.cjs +0 -142
  457. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  458. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  459. package/node_modules/zod/v4/locales/fr.js +0 -116
  460. package/node_modules/zod/v4/locales/he.cjs +0 -143
  461. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  462. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  463. package/node_modules/zod/v4/locales/he.js +0 -117
  464. package/node_modules/zod/v4/locales/hu.cjs +0 -143
  465. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  466. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  467. package/node_modules/zod/v4/locales/hu.js +0 -117
  468. package/node_modules/zod/v4/locales/id.cjs +0 -142
  469. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  470. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  471. package/node_modules/zod/v4/locales/id.js +0 -116
  472. package/node_modules/zod/v4/locales/index.cjs +0 -84
  473. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  474. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  475. package/node_modules/zod/v4/locales/index.js +0 -39
  476. package/node_modules/zod/v4/locales/it.cjs +0 -143
  477. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  478. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  479. package/node_modules/zod/v4/locales/it.js +0 -117
  480. package/node_modules/zod/v4/locales/ja.cjs +0 -141
  481. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  482. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  483. package/node_modules/zod/v4/locales/ja.js +0 -115
  484. package/node_modules/zod/v4/locales/kh.cjs +0 -143
  485. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  486. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  487. package/node_modules/zod/v4/locales/kh.js +0 -117
  488. package/node_modules/zod/v4/locales/ko.cjs +0 -147
  489. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  490. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  491. package/node_modules/zod/v4/locales/ko.js +0 -121
  492. package/node_modules/zod/v4/locales/mk.cjs +0 -144
  493. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  494. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  495. package/node_modules/zod/v4/locales/mk.js +0 -118
  496. package/node_modules/zod/v4/locales/ms.cjs +0 -142
  497. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  498. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  499. package/node_modules/zod/v4/locales/ms.js +0 -116
  500. package/node_modules/zod/v4/locales/nl.cjs +0 -143
  501. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  502. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  503. package/node_modules/zod/v4/locales/nl.js +0 -117
  504. package/node_modules/zod/v4/locales/no.cjs +0 -142
  505. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  506. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  507. package/node_modules/zod/v4/locales/no.js +0 -116
  508. package/node_modules/zod/v4/locales/ota.cjs +0 -143
  509. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  510. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  511. package/node_modules/zod/v4/locales/ota.js +0 -117
  512. package/node_modules/zod/v4/locales/pl.cjs +0 -143
  513. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  514. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  515. package/node_modules/zod/v4/locales/pl.js +0 -117
  516. package/node_modules/zod/v4/locales/ps.cjs +0 -148
  517. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  518. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  519. package/node_modules/zod/v4/locales/ps.js +0 -122
  520. package/node_modules/zod/v4/locales/pt.cjs +0 -142
  521. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  522. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  523. package/node_modules/zod/v4/locales/pt.js +0 -116
  524. package/node_modules/zod/v4/locales/ru.cjs +0 -190
  525. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  526. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  527. package/node_modules/zod/v4/locales/ru.js +0 -164
  528. package/node_modules/zod/v4/locales/sl.cjs +0 -143
  529. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  530. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  531. package/node_modules/zod/v4/locales/sl.js +0 -117
  532. package/node_modules/zod/v4/locales/sv.cjs +0 -144
  533. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  534. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  535. package/node_modules/zod/v4/locales/sv.js +0 -118
  536. package/node_modules/zod/v4/locales/ta.cjs +0 -143
  537. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  538. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  539. package/node_modules/zod/v4/locales/ta.js +0 -117
  540. package/node_modules/zod/v4/locales/th.cjs +0 -143
  541. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  542. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  543. package/node_modules/zod/v4/locales/th.js +0 -117
  544. package/node_modules/zod/v4/locales/tr.cjs +0 -143
  545. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  546. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  547. package/node_modules/zod/v4/locales/tr.js +0 -115
  548. package/node_modules/zod/v4/locales/ua.cjs +0 -143
  549. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  550. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  551. package/node_modules/zod/v4/locales/ua.js +0 -117
  552. package/node_modules/zod/v4/locales/ur.cjs +0 -143
  553. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  554. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  555. package/node_modules/zod/v4/locales/ur.js +0 -117
  556. package/node_modules/zod/v4/locales/vi.cjs +0 -142
  557. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  558. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  559. package/node_modules/zod/v4/locales/vi.js +0 -116
  560. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
  561. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  562. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  563. package/node_modules/zod/v4/locales/zh-CN.js +0 -116
  564. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
  565. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  566. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  567. package/node_modules/zod/v4/locales/zh-TW.js +0 -117
  568. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  569. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  570. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  571. package/node_modules/zod/v4/mini/checks.js +0 -1
  572. package/node_modules/zod/v4/mini/coerce.cjs +0 -47
  573. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  574. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  575. package/node_modules/zod/v4/mini/coerce.js +0 -17
  576. package/node_modules/zod/v4/mini/external.cjs +0 -62
  577. package/node_modules/zod/v4/mini/external.d.cts +0 -11
  578. package/node_modules/zod/v4/mini/external.d.ts +0 -11
  579. package/node_modules/zod/v4/mini/external.js +0 -13
  580. package/node_modules/zod/v4/mini/index.cjs +0 -32
  581. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  582. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  583. package/node_modules/zod/v4/mini/index.js +0 -3
  584. package/node_modules/zod/v4/mini/iso.cjs +0 -60
  585. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  586. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  587. package/node_modules/zod/v4/mini/iso.js +0 -30
  588. package/node_modules/zod/v4/mini/parse.cjs +0 -8
  589. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  590. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  591. package/node_modules/zod/v4/mini/parse.js +0 -1
  592. package/node_modules/zod/v4/mini/schemas.cjs +0 -839
  593. package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
  594. package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
  595. package/node_modules/zod/v4/mini/schemas.js +0 -732
  596. package/node_modules/zod/v4-mini/index.cjs +0 -17
  597. package/node_modules/zod/v4-mini/index.d.cts +0 -1
  598. package/node_modules/zod/v4-mini/index.d.ts +0 -1
  599. package/node_modules/zod/v4-mini/index.js +0 -1
@@ -1,1283 +0,0 @@
1
- // import { $ZodType } from "./schemas.js";
2
-
3
- import * as core from "./core.js";
4
- import type * as errors from "./errors.js";
5
- import * as regexes from "./regexes.js";
6
- import type * as schemas from "./schemas.js";
7
- import * as util from "./util.js";
8
-
9
- ////////////////////////////// CHECKS ///////////////////////////////////////
10
-
11
- export interface $ZodCheckDef {
12
- check: string;
13
- error?: errors.$ZodErrorMap<never> | undefined;
14
- /** If true, no later checks will be executed if this check fails. Default `false`. */
15
- abort?: boolean | undefined;
16
- /** If provided, this check will only be executed if the function returns `true`. Defaults to `payload => z.util.isAborted(payload)`. */
17
- when?: ((payload: schemas.ParsePayload) => boolean) | undefined;
18
- }
19
-
20
- export interface $ZodCheckInternals<T> {
21
- def: $ZodCheckDef;
22
- /** The set of issues this check might throw. */
23
- issc?: errors.$ZodIssueBase;
24
- check(payload: schemas.ParsePayload<T>): util.MaybeAsync<void>;
25
- onattach: ((schema: schemas.$ZodType) => void)[];
26
- }
27
-
28
- export interface $ZodCheck<in T = never> {
29
- _zod: $ZodCheckInternals<T>;
30
- }
31
-
32
- export const $ZodCheck: core.$constructor<$ZodCheck<any>> = /*@__PURE__*/ core.$constructor(
33
- "$ZodCheck",
34
- (inst, def) => {
35
- inst._zod ??= {} as any;
36
- inst._zod.def = def;
37
- inst._zod.onattach ??= [];
38
- }
39
- );
40
-
41
- ///////////////////////////////////////
42
- ///// $ZodCheckLessThan /////
43
- ///////////////////////////////////////
44
- export interface $ZodCheckLessThanDef extends $ZodCheckDef {
45
- check: "less_than";
46
- value: util.Numeric;
47
- inclusive: boolean;
48
- }
49
-
50
- export interface $ZodCheckLessThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
51
- def: $ZodCheckLessThanDef;
52
- issc: errors.$ZodIssueTooBig<T>;
53
- }
54
-
55
- const numericOriginMap = {
56
- number: "number",
57
- bigint: "bigint",
58
- object: "date",
59
- } as const;
60
- export interface $ZodCheckLessThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
61
- _zod: $ZodCheckLessThanInternals<T>;
62
- }
63
-
64
- export const $ZodCheckLessThan: core.$constructor<$ZodCheckLessThan> = /*@__PURE__*/ core.$constructor(
65
- "$ZodCheckLessThan",
66
- (inst, def) => {
67
- $ZodCheck.init(inst, def);
68
- const origin = numericOriginMap[typeof def.value as "number" | "bigint" | "object"];
69
-
70
- inst._zod.onattach.push((inst) => {
71
- const bag = inst._zod.bag;
72
- const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
73
- if (def.value < curr) {
74
- if (def.inclusive) bag.maximum = def.value;
75
- else bag.exclusiveMaximum = def.value;
76
- }
77
- });
78
-
79
- inst._zod.check = (payload) => {
80
- if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {
81
- return;
82
- }
83
-
84
- payload.issues.push({
85
- origin,
86
- code: "too_big",
87
- maximum: def.value as number,
88
- input: payload.value,
89
- inclusive: def.inclusive,
90
- inst,
91
- continue: !def.abort,
92
- });
93
- };
94
- }
95
- );
96
-
97
- /////////////////////////////////////
98
- ///// $ZodCheckGreaterThan /////
99
- /////////////////////////////////////
100
- export interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
101
- check: "greater_than";
102
- value: util.Numeric;
103
- inclusive: boolean;
104
- }
105
-
106
- export interface $ZodCheckGreaterThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
107
- def: $ZodCheckGreaterThanDef;
108
- issc: errors.$ZodIssueTooSmall<T>;
109
- }
110
-
111
- export interface $ZodCheckGreaterThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
112
- _zod: $ZodCheckGreaterThanInternals<T>;
113
- }
114
-
115
- export const $ZodCheckGreaterThan: core.$constructor<$ZodCheckGreaterThan> = /*@__PURE__*/ core.$constructor(
116
- "$ZodCheckGreaterThan",
117
- (inst, def) => {
118
- $ZodCheck.init(inst, def);
119
- const origin = numericOriginMap[typeof def.value as "number" | "bigint" | "object"];
120
-
121
- inst._zod.onattach.push((inst) => {
122
- const bag = inst._zod.bag;
123
- const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
124
- if (def.value > curr) {
125
- if (def.inclusive) bag.minimum = def.value;
126
- else bag.exclusiveMinimum = def.value;
127
- }
128
- });
129
-
130
- inst._zod.check = (payload) => {
131
- if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {
132
- return;
133
- }
134
-
135
- payload.issues.push({
136
- origin,
137
- code: "too_small",
138
- minimum: def.value as number,
139
- input: payload.value,
140
- inclusive: def.inclusive,
141
- inst,
142
- continue: !def.abort,
143
- });
144
- };
145
- }
146
- );
147
-
148
- /////////////////////////////////////
149
- ///// $ZodCheckMultipleOf /////
150
- /////////////////////////////////////
151
- // https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034
152
-
153
- export interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
154
- check: "multiple_of";
155
- value: T;
156
- }
157
-
158
- export interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint>
159
- extends $ZodCheckInternals<T> {
160
- def: $ZodCheckMultipleOfDef<T>;
161
- issc: errors.$ZodIssueNotMultipleOf;
162
- }
163
-
164
- export interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
165
- _zod: $ZodCheckMultipleOfInternals<T>;
166
- }
167
-
168
- export const $ZodCheckMultipleOf: core.$constructor<$ZodCheckMultipleOf<number | bigint>> =
169
- /*@__PURE__*/ core.$constructor("$ZodCheckMultipleOf", (inst, def) => {
170
- $ZodCheck.init(inst, def);
171
-
172
- inst._zod.onattach.push((inst) => {
173
- inst._zod.bag.multipleOf ??= def.value;
174
- });
175
-
176
- inst._zod.check = (payload) => {
177
- if (typeof payload.value !== typeof def.value)
178
- throw new Error("Cannot mix number and bigint in multiple_of check.");
179
- const isMultiple =
180
- typeof payload.value === "bigint"
181
- ? payload.value % (def.value as bigint) === BigInt(0)
182
- : util.floatSafeRemainder(payload.value, def.value as number) === 0;
183
-
184
- if (isMultiple) return;
185
- payload.issues.push({
186
- origin: typeof payload.value as "number",
187
- code: "not_multiple_of",
188
- divisor: def.value as number,
189
- input: payload.value,
190
- inst,
191
- continue: !def.abort,
192
- });
193
- };
194
- });
195
-
196
- /////////////////////////////////////
197
- ///// $ZodCheckFinite /////
198
- /////////////////////////////////////
199
- // interface $ZodCheckFiniteDef extends $ZodCheckDef {
200
- // check: "finite";
201
- // }
202
-
203
- // export interface $ZodCheckFinite extends $ZodCheckInternals<number> {
204
- // _def: $ZodCheckFiniteDef;
205
- // _issc:
206
- // | errors.$ZodIssueTooBig<"number", number>
207
- // | errors.$ZodIssueTooSmall<"number", number>;
208
- // }
209
-
210
- // export const $ZodCheckFinite: core.$constructor<$ZodCheckFinite> =
211
- // core.$constructor("$ZodCheckFinite", (inst, def) => {
212
- // $ZodCheck.init(inst, def);
213
-
214
- // inst._zod.onattach = (inst) => {
215
- // inst["_bag"].finite = true;
216
- // };
217
-
218
- // inst._zod.check = (payload) => {
219
- // if (Number.isFinite(payload.value)) return;
220
- // payload.issues.push({
221
- // origin: "number",
222
- // ...(payload.value === Number.POSITIVE_INFINITY
223
- // ? {
224
- // code: "too_big",
225
- // maximum: Number.POSITIVE_INFINITY,
226
- // }
227
- // : {
228
- // code: "too_small",
229
- // minimum: Number.NEGATIVE_INFINITY,
230
- // }),
231
- // // code: payload.value === Number.POSITIVE_INFINITY ? "too_big" : "too_big",
232
- // // maximum: Number.POSITIVE_INFINITY,
233
- // inclusive: false,
234
- // input: payload.value,
235
- // inst,
236
- // });
237
- // };
238
- // });
239
-
240
- ///////////////////////////////////////
241
- ///// $ZodCheckNumberFormat /////
242
- ///////////////////////////////////////
243
-
244
- export type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
245
-
246
- export interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
247
- check: "number_format";
248
- format: $ZodNumberFormats;
249
- // abort?: boolean;
250
- }
251
-
252
- export interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
253
- def: $ZodCheckNumberFormatDef;
254
- issc: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<"number"> | errors.$ZodIssueTooSmall<"number">;
255
- // bag: util.LoosePartial<{
256
- // minimum?: number | undefined;
257
- // }>;
258
- }
259
-
260
- export interface $ZodCheckNumberFormat extends $ZodCheck<number> {
261
- _zod: $ZodCheckNumberFormatInternals;
262
- }
263
-
264
- export const $ZodCheckNumberFormat: core.$constructor<$ZodCheckNumberFormat> = /*@__PURE__*/ core.$constructor(
265
- "$ZodCheckNumberFormat",
266
- (inst, def) => {
267
- $ZodCheck.init(inst, def); // no format checks
268
- def.format = def.format || "float64";
269
-
270
- const isInt = def.format?.includes("int");
271
- const origin = isInt ? "int" : "number";
272
- const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];
273
-
274
- inst._zod.onattach.push((inst) => {
275
- const bag = inst._zod.bag;
276
- bag.format = def.format;
277
- bag.minimum = minimum;
278
- bag.maximum = maximum;
279
- if (isInt) bag.pattern = regexes.integer;
280
- });
281
-
282
- inst._zod.check = (payload) => {
283
- const input = payload.value;
284
-
285
- if (isInt) {
286
- if (!Number.isInteger(input)) {
287
- // invalid_format issue
288
- // payload.issues.push({
289
- // expected: def.format,
290
- // format: def.format,
291
- // code: "invalid_format",
292
- // input,
293
- // inst,
294
- // });
295
- // invalid_type issue
296
- payload.issues.push({
297
- expected: origin,
298
- format: def.format,
299
- code: "invalid_type",
300
- input,
301
- inst,
302
- });
303
-
304
- return;
305
-
306
- // not_multiple_of issue
307
- // payload.issues.push({
308
- // code: "not_multiple_of",
309
- // origin: "number",
310
- // input,
311
- // inst,
312
- // divisor: 1,
313
- // });
314
- }
315
- if (!Number.isSafeInteger(input)) {
316
- if (input > 0) {
317
- // too_big
318
- payload.issues.push({
319
- input,
320
- code: "too_big",
321
- maximum: Number.MAX_SAFE_INTEGER,
322
- note: "Integers must be within the safe integer range.",
323
- inst,
324
- origin,
325
- continue: !def.abort,
326
- });
327
- } else {
328
- // too_small
329
- payload.issues.push({
330
- input,
331
- code: "too_small",
332
- minimum: Number.MIN_SAFE_INTEGER,
333
- note: "Integers must be within the safe integer range.",
334
- inst,
335
- origin,
336
- continue: !def.abort,
337
- });
338
- }
339
-
340
- return;
341
- }
342
- }
343
-
344
- if (input < minimum) {
345
- payload.issues.push({
346
- origin: "number",
347
- input,
348
- code: "too_small",
349
- minimum,
350
- inclusive: true,
351
- inst,
352
- continue: !def.abort,
353
- });
354
- }
355
-
356
- if (input > maximum) {
357
- payload.issues.push({
358
- origin: "number",
359
- input,
360
- code: "too_big",
361
- maximum,
362
- inst,
363
- } as any);
364
- }
365
- };
366
- }
367
- );
368
-
369
- /////////////////////////////////////
370
- ///// $ZodCheckBigIntFormat /////
371
- /////////////////////////////////////
372
-
373
- export type $ZodBigIntFormats = "int64" | "uint64";
374
-
375
- export interface $ZodCheckBigIntFormatDef extends $ZodCheckDef {
376
- check: "bigint_format";
377
- format: $ZodBigIntFormats | undefined;
378
- }
379
-
380
- export interface $ZodCheckBigIntFormatInternals extends $ZodCheckInternals<bigint> {
381
- def: $ZodCheckBigIntFormatDef;
382
- issc: errors.$ZodIssueTooBig<"bigint"> | errors.$ZodIssueTooSmall<"bigint">;
383
- }
384
-
385
- export interface $ZodCheckBigIntFormat extends $ZodCheck<bigint> {
386
- _zod: $ZodCheckBigIntFormatInternals;
387
- }
388
-
389
- export const $ZodCheckBigIntFormat: core.$constructor<$ZodCheckBigIntFormat> = /*@__PURE__*/ core.$constructor(
390
- "$ZodCheckBigIntFormat",
391
- (inst, def) => {
392
- $ZodCheck.init(inst, def); // no format checks
393
-
394
- const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format!];
395
-
396
- inst._zod.onattach.push((inst) => {
397
- const bag = inst._zod.bag;
398
- bag.format = def.format;
399
- bag.minimum = minimum;
400
- bag.maximum = maximum;
401
- });
402
-
403
- inst._zod.check = (payload) => {
404
- const input = payload.value;
405
-
406
- if (input < minimum) {
407
- payload.issues.push({
408
- origin: "bigint",
409
- input,
410
- code: "too_small",
411
- minimum: minimum as any,
412
- inclusive: true,
413
- inst,
414
- continue: !def.abort,
415
- });
416
- }
417
-
418
- if (input > maximum) {
419
- payload.issues.push({
420
- origin: "bigint",
421
- input,
422
- code: "too_big",
423
- maximum,
424
- inst,
425
- } as any);
426
- }
427
- };
428
- }
429
- );
430
-
431
- //////////////////////////////////
432
- ///// $ZodCheckMaxSize /////
433
- //////////////////////////////////
434
- export interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
435
- check: "max_size";
436
- maximum: number;
437
- }
438
-
439
- export interface $ZodCheckMaxSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
440
- def: $ZodCheckMaxSizeDef;
441
- issc: errors.$ZodIssueTooBig<T>;
442
- }
443
-
444
- export interface $ZodCheckMaxSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
445
- _zod: $ZodCheckMaxSizeInternals<T>;
446
- }
447
-
448
- export const $ZodCheckMaxSize: core.$constructor<$ZodCheckMaxSize> = /*@__PURE__*/ core.$constructor(
449
- "$ZodCheckMaxSize",
450
- (inst, def) => {
451
- $ZodCheck.init(inst, def);
452
-
453
- inst._zod.def.when ??= (payload) => {
454
- const val = payload.value;
455
- return !util.nullish(val) && (val as any).size !== undefined;
456
- };
457
-
458
- inst._zod.onattach.push((inst) => {
459
- const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY) as number;
460
- if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
461
- });
462
-
463
- inst._zod.check = (payload) => {
464
- const input = payload.value;
465
- const size = input.size;
466
-
467
- if (size <= def.maximum) return;
468
- payload.issues.push({
469
- origin: util.getSizableOrigin(input),
470
- code: "too_big",
471
- maximum: def.maximum,
472
- input,
473
- inst,
474
- continue: !def.abort,
475
- });
476
- };
477
- }
478
- );
479
-
480
- //////////////////////////////////
481
- ///// $ZodCheckMinSize /////
482
- //////////////////////////////////
483
- export interface $ZodCheckMinSizeDef extends $ZodCheckDef {
484
- check: "min_size";
485
- minimum: number;
486
- }
487
-
488
- export interface $ZodCheckMinSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
489
- def: $ZodCheckMinSizeDef;
490
- issc: errors.$ZodIssueTooSmall<T>;
491
- }
492
-
493
- export interface $ZodCheckMinSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
494
- _zod: $ZodCheckMinSizeInternals<T>;
495
- }
496
-
497
- export const $ZodCheckMinSize: core.$constructor<$ZodCheckMinSize> = /*@__PURE__*/ core.$constructor(
498
- "$ZodCheckMinSize",
499
- (inst, def) => {
500
- $ZodCheck.init(inst, def);
501
-
502
- inst._zod.def.when ??= (payload) => {
503
- const val = payload.value;
504
- return !util.nullish(val) && (val as any).size !== undefined;
505
- };
506
-
507
- inst._zod.onattach.push((inst) => {
508
- const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY) as number;
509
- if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
510
- });
511
-
512
- inst._zod.check = (payload) => {
513
- const input = payload.value;
514
- const size = input.size;
515
-
516
- if (size >= def.minimum) return;
517
- payload.issues.push({
518
- origin: util.getSizableOrigin(input),
519
- code: "too_small",
520
- minimum: def.minimum,
521
- input,
522
- inst,
523
- continue: !def.abort,
524
- });
525
- };
526
- }
527
- );
528
-
529
- /////////////////////////////////////
530
- ///// $ZodCheckSizeEquals /////
531
- /////////////////////////////////////
532
- export interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
533
- check: "size_equals";
534
- size: number;
535
- }
536
-
537
- export interface $ZodCheckSizeEqualsInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
538
- def: $ZodCheckSizeEqualsDef;
539
- issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
540
- }
541
-
542
- export interface $ZodCheckSizeEquals<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
543
- _zod: $ZodCheckSizeEqualsInternals<T>;
544
- }
545
-
546
- export const $ZodCheckSizeEquals: core.$constructor<$ZodCheckSizeEquals> = /*@__PURE__*/ core.$constructor(
547
- "$ZodCheckSizeEquals",
548
- (inst, def) => {
549
- $ZodCheck.init(inst, def);
550
-
551
- inst._zod.def.when ??= (payload) => {
552
- const val = payload.value;
553
- return !util.nullish(val) && (val as any).size !== undefined;
554
- };
555
-
556
- inst._zod.onattach.push((inst) => {
557
- const bag = inst._zod.bag;
558
- bag.minimum = def.size;
559
- bag.maximum = def.size;
560
- bag.size = def.size;
561
- });
562
-
563
- inst._zod.check = (payload) => {
564
- const input = payload.value;
565
- const size = input.size;
566
- if (size === def.size) return;
567
-
568
- const tooBig = size > def.size;
569
- payload.issues.push({
570
- origin: util.getSizableOrigin(input),
571
- ...(tooBig ? { code: "too_big", maximum: def.size } : { code: "too_small", minimum: def.size }),
572
- inclusive: true,
573
- exact: true,
574
- input: payload.value,
575
- inst,
576
- continue: !def.abort,
577
- });
578
- };
579
- }
580
- );
581
-
582
- //////////////////////////////////
583
- ///// $ZodCheckMaxLength /////
584
- //////////////////////////////////
585
-
586
- export interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
587
- check: "max_length";
588
- maximum: number;
589
- }
590
-
591
- export interface $ZodCheckMaxLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
592
- def: $ZodCheckMaxLengthDef;
593
- issc: errors.$ZodIssueTooBig<T>;
594
- }
595
-
596
- export interface $ZodCheckMaxLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
597
- _zod: $ZodCheckMaxLengthInternals<T>;
598
- }
599
-
600
- export const $ZodCheckMaxLength: core.$constructor<$ZodCheckMaxLength> = /*@__PURE__*/ core.$constructor(
601
- "$ZodCheckMaxLength",
602
- (inst, def) => {
603
- $ZodCheck.init(inst, def);
604
-
605
- inst._zod.def.when ??= (payload) => {
606
- const val = payload.value;
607
- return !util.nullish(val) && (val as any).length !== undefined;
608
- };
609
-
610
- inst._zod.onattach.push((inst) => {
611
- const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY) as number;
612
- if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
613
- });
614
-
615
- inst._zod.check = (payload) => {
616
- const input = payload.value;
617
- const length = input.length;
618
-
619
- if (length <= def.maximum) return;
620
- const origin = util.getLengthableOrigin(input);
621
- payload.issues.push({
622
- origin,
623
- code: "too_big",
624
- maximum: def.maximum,
625
- inclusive: true,
626
- input,
627
- inst,
628
- continue: !def.abort,
629
- });
630
- };
631
- }
632
- );
633
-
634
- //////////////////////////////////
635
- ///// $ZodCheckMinLength /////
636
- //////////////////////////////////
637
- export interface $ZodCheckMinLengthDef extends $ZodCheckDef {
638
- check: "min_length";
639
- minimum: number;
640
- }
641
-
642
- export interface $ZodCheckMinLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
643
- def: $ZodCheckMinLengthDef;
644
- issc: errors.$ZodIssueTooSmall<T>;
645
- }
646
-
647
- export interface $ZodCheckMinLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
648
- _zod: $ZodCheckMinLengthInternals<T>;
649
- }
650
-
651
- export const $ZodCheckMinLength: core.$constructor<$ZodCheckMinLength> = /*@__PURE__*/ core.$constructor(
652
- "$ZodCheckMinLength",
653
- (inst, def) => {
654
- $ZodCheck.init(inst, def);
655
-
656
- inst._zod.def.when ??= (payload) => {
657
- const val = payload.value;
658
- return !util.nullish(val) && (val as any).length !== undefined;
659
- };
660
-
661
- inst._zod.onattach.push((inst) => {
662
- const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY) as number;
663
- if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
664
- });
665
-
666
- inst._zod.check = (payload) => {
667
- const input = payload.value;
668
- const length = input.length;
669
-
670
- if (length >= def.minimum) return;
671
- const origin = util.getLengthableOrigin(input);
672
- payload.issues.push({
673
- origin,
674
- code: "too_small",
675
- minimum: def.minimum,
676
- inclusive: true,
677
- input,
678
- inst,
679
- continue: !def.abort,
680
- });
681
- };
682
- }
683
- );
684
-
685
- /////////////////////////////////////
686
- ///// $ZodCheckLengthEquals /////
687
- /////////////////////////////////////
688
- export interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
689
- check: "length_equals";
690
- length: number;
691
- }
692
-
693
- export interface $ZodCheckLengthEqualsInternals<T extends util.HasLength = util.HasLength>
694
- extends $ZodCheckInternals<T> {
695
- def: $ZodCheckLengthEqualsDef;
696
- issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
697
- }
698
-
699
- export interface $ZodCheckLengthEquals<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
700
- _zod: $ZodCheckLengthEqualsInternals<T>;
701
- }
702
-
703
- export const $ZodCheckLengthEquals: core.$constructor<$ZodCheckLengthEquals> = /*@__PURE__*/ core.$constructor(
704
- "$ZodCheckLengthEquals",
705
- (inst, def) => {
706
- $ZodCheck.init(inst, def);
707
-
708
- inst._zod.def.when ??= (payload) => {
709
- const val = payload.value;
710
- return !util.nullish(val) && (val as any).length !== undefined;
711
- };
712
-
713
- inst._zod.onattach.push((inst) => {
714
- const bag = inst._zod.bag;
715
- bag.minimum = def.length;
716
- bag.maximum = def.length;
717
- bag.length = def.length;
718
- });
719
-
720
- inst._zod.check = (payload) => {
721
- const input = payload.value;
722
- const length = input.length;
723
- if (length === def.length) return;
724
- const origin = util.getLengthableOrigin(input);
725
- const tooBig = length > def.length;
726
- payload.issues.push({
727
- origin,
728
- ...(tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length }),
729
- inclusive: true,
730
- exact: true,
731
- input: payload.value,
732
- inst,
733
- continue: !def.abort,
734
- });
735
- };
736
- }
737
- );
738
-
739
- /////////////////////////////////////////////
740
- ///// $ZodCheckStringFormatRegex /////
741
- /////////////////////////////////////////////
742
- export type $ZodStringFormats =
743
- | "email"
744
- | "url"
745
- | "emoji"
746
- | "uuid"
747
- | "guid"
748
- | "nanoid"
749
- | "cuid"
750
- | "cuid2"
751
- | "ulid"
752
- | "xid"
753
- | "ksuid"
754
- | "datetime"
755
- | "date"
756
- | "time"
757
- | "duration"
758
- | "ipv4"
759
- | "ipv6"
760
- | "cidrv4"
761
- | "cidrv6"
762
- | "base64"
763
- | "base64url"
764
- | "json_string"
765
- | "e164"
766
- | "lowercase"
767
- | "uppercase"
768
- | "regex"
769
- | "jwt"
770
- | "starts_with"
771
- | "ends_with"
772
- | "includes";
773
- export interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
774
- check: "string_format";
775
- format: Format;
776
- pattern?: RegExp | undefined;
777
- }
778
-
779
- export interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
780
- def: $ZodCheckStringFormatDef;
781
- issc: errors.$ZodIssueInvalidStringFormat;
782
- }
783
-
784
- export interface $ZodCheckStringFormat extends $ZodCheck<string> {
785
- _zod: $ZodCheckStringFormatInternals;
786
- }
787
-
788
- export const $ZodCheckStringFormat: core.$constructor<$ZodCheckStringFormat> = /*@__PURE__*/ core.$constructor(
789
- "$ZodCheckStringFormat",
790
- (inst, def) => {
791
- $ZodCheck.init(inst, def);
792
-
793
- inst._zod.onattach.push((inst) => {
794
- const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
795
- bag.format = def.format;
796
- if (def.pattern) {
797
- bag.patterns ??= new Set();
798
- bag.patterns.add(def.pattern);
799
- }
800
- });
801
-
802
- if (def.pattern)
803
- inst._zod.check ??= (payload) => {
804
- def.pattern!.lastIndex = 0;
805
- if (def.pattern!.test(payload.value)) return;
806
- payload.issues.push({
807
- origin: "string",
808
- code: "invalid_format",
809
- format: def.format,
810
- input: payload.value,
811
- ...(def.pattern ? { pattern: def.pattern.toString() } : {}),
812
- inst,
813
- continue: !def.abort,
814
- });
815
- };
816
- else inst._zod.check ??= () => {};
817
- }
818
- );
819
-
820
- ////////////////////////////////
821
- ///// $ZodCheckRegex /////
822
- ////////////////////////////////
823
- export interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
824
- format: "regex";
825
- pattern: RegExp;
826
- }
827
-
828
- export interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
829
- def: $ZodCheckRegexDef;
830
- issc: errors.$ZodIssueInvalidStringFormat;
831
- }
832
-
833
- export interface $ZodCheckRegex extends $ZodCheck<string> {
834
- _zod: $ZodCheckRegexInternals;
835
- }
836
-
837
- export const $ZodCheckRegex: core.$constructor<$ZodCheckRegex> = /*@__PURE__*/ core.$constructor(
838
- "$ZodCheckRegex",
839
- (inst, def) => {
840
- $ZodCheckStringFormat.init(inst, def);
841
-
842
- inst._zod.check = (payload) => {
843
- def.pattern.lastIndex = 0;
844
- if (def.pattern.test(payload.value)) return;
845
- payload.issues.push({
846
- origin: "string",
847
- code: "invalid_format",
848
- format: "regex",
849
- input: payload.value,
850
- pattern: def.pattern.toString(),
851
- inst,
852
- continue: !def.abort,
853
- });
854
- };
855
- }
856
- );
857
-
858
- ///////////////////////////////////
859
- ///// $ZodCheckJSONString /////
860
- ///////////////////////////////////
861
- // interface $ZodCheckJSONStringDef extends $ZodCheckStringFormatDef<"json_string"> {
862
- // // check: "string_format";
863
- // // format: "json_string";
864
- // // error?: errors.$ZodErrorMap<errors.$ZodIssueInvalidStringFormat> | undefined;
865
- // }
866
-
867
- // export interface $ZodCheckJSONString extends $ZodCheckStringFormat {
868
- // _def: $ZodCheckJSONStringDef;
869
- // }
870
-
871
- // export const $ZodCheckJSONString: core.$constructor<$ZodCheckJSONString> = /*@__PURE__*/ core.$constructor(
872
- // "$ZodCheckJSONString",
873
- // (inst, def) => {
874
- // $ZodCheck.init(inst, def);
875
-
876
- // inst._zod.check = (payload) => {
877
- // try {
878
- // JSON.parse(payload.value);
879
- // return;
880
- // } catch (_) {
881
- // payload.issues.push({
882
- // origin: "string",
883
- // code: "invalid_format",
884
- // format: def.format,
885
- // input: payload.value,
886
- // inst,
887
- // continue: !def.abort,
888
- // });
889
- // }
890
- // };
891
- // }
892
- // );
893
-
894
- //////////////////////////////////////
895
- ///// $ZodCheckLowerCase /////
896
- //////////////////////////////////////
897
- export interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {}
898
-
899
- export interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
900
- def: $ZodCheckLowerCaseDef;
901
- issc: errors.$ZodIssueInvalidStringFormat;
902
- }
903
-
904
- export interface $ZodCheckLowerCase extends $ZodCheck<string> {
905
- _zod: $ZodCheckLowerCaseInternals;
906
- }
907
-
908
- export const $ZodCheckLowerCase: core.$constructor<$ZodCheckLowerCase> = /*@__PURE__*/ core.$constructor(
909
- "$ZodCheckLowerCase",
910
- (inst, def) => {
911
- def.pattern ??= regexes.lowercase;
912
- $ZodCheckStringFormat.init(inst, def);
913
- }
914
- );
915
-
916
- //////////////////////////////////////
917
- ///// $ZodCheckUpperCase /////
918
- //////////////////////////////////////
919
- export interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {}
920
-
921
- export interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
922
- def: $ZodCheckUpperCaseDef;
923
- issc: errors.$ZodIssueInvalidStringFormat;
924
- }
925
-
926
- export interface $ZodCheckUpperCase extends $ZodCheck<string> {
927
- _zod: $ZodCheckUpperCaseInternals;
928
- }
929
-
930
- export const $ZodCheckUpperCase: core.$constructor<$ZodCheckUpperCase> = /*@__PURE__*/ core.$constructor(
931
- "$ZodCheckUpperCase",
932
- (inst, def) => {
933
- def.pattern ??= regexes.uppercase;
934
- $ZodCheckStringFormat.init(inst, def);
935
- }
936
- );
937
-
938
- ///////////////////////////////////
939
- ///// $ZodCheckIncludes /////
940
- ///////////////////////////////////
941
- export interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
942
- includes: string;
943
- position?: number | undefined;
944
- }
945
-
946
- export interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
947
- def: $ZodCheckIncludesDef;
948
- issc: errors.$ZodIssueInvalidStringFormat;
949
- }
950
-
951
- export interface $ZodCheckIncludes extends $ZodCheck<string> {
952
- _zod: $ZodCheckIncludesInternals;
953
- }
954
-
955
- export const $ZodCheckIncludes: core.$constructor<$ZodCheckIncludes> = /*@__PURE__*/ core.$constructor(
956
- "$ZodCheckIncludes",
957
- (inst, def) => {
958
- $ZodCheck.init(inst, def);
959
-
960
- const escapedRegex = util.escapeRegex(def.includes);
961
- const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
962
- def.pattern = pattern;
963
- inst._zod.onattach.push((inst) => {
964
- const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
965
- bag.patterns ??= new Set();
966
- bag.patterns.add(pattern);
967
- });
968
-
969
- inst._zod.check = (payload) => {
970
- if (payload.value.includes(def.includes, def.position)) return;
971
- payload.issues.push({
972
- origin: "string",
973
- code: "invalid_format",
974
- format: "includes",
975
- includes: def.includes,
976
- input: payload.value,
977
- inst,
978
- continue: !def.abort,
979
- });
980
- };
981
- }
982
- );
983
-
984
- /////////////////////////////////////
985
- ///// $ZodCheckStartsWith /////
986
- /////////////////////////////////////
987
- export interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
988
- prefix: string;
989
- }
990
-
991
- export interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
992
- def: $ZodCheckStartsWithDef;
993
- issc: errors.$ZodIssueInvalidStringFormat;
994
- }
995
-
996
- export interface $ZodCheckStartsWith extends $ZodCheck<string> {
997
- _zod: $ZodCheckStartsWithInternals;
998
- }
999
-
1000
- export const $ZodCheckStartsWith: core.$constructor<$ZodCheckStartsWith> = /*@__PURE__*/ core.$constructor(
1001
- "$ZodCheckStartsWith",
1002
- (inst, def) => {
1003
- $ZodCheck.init(inst, def);
1004
-
1005
- const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);
1006
- def.pattern ??= pattern;
1007
- inst._zod.onattach.push((inst) => {
1008
- const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
1009
- bag.patterns ??= new Set();
1010
- bag.patterns.add(pattern);
1011
- });
1012
-
1013
- inst._zod.check = (payload) => {
1014
- if (payload.value.startsWith(def.prefix)) return;
1015
- payload.issues.push({
1016
- origin: "string",
1017
- code: "invalid_format",
1018
- format: "starts_with",
1019
- prefix: def.prefix,
1020
- input: payload.value,
1021
- inst,
1022
- continue: !def.abort,
1023
- });
1024
- };
1025
- }
1026
- );
1027
-
1028
- //////////////////////////////////
1029
- ///// $ZodCheckEndsWith /////
1030
- //////////////////////////////////
1031
- export interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
1032
- suffix: string;
1033
- }
1034
-
1035
- export interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
1036
- def: $ZodCheckEndsWithDef;
1037
- issc: errors.$ZodIssueInvalidStringFormat;
1038
- }
1039
-
1040
- export interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
1041
- _zod: $ZodCheckEndsWithInternals;
1042
- }
1043
-
1044
- export const $ZodCheckEndsWith: core.$constructor<$ZodCheckEndsWith> = /*@__PURE__*/ core.$constructor(
1045
- "$ZodCheckEndsWith",
1046
- (inst, def) => {
1047
- $ZodCheck.init(inst, def);
1048
-
1049
- const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);
1050
- def.pattern ??= pattern;
1051
- inst._zod.onattach.push((inst) => {
1052
- const bag = inst._zod.bag as schemas.$ZodStringInternals<unknown>["bag"];
1053
- bag.patterns ??= new Set();
1054
- bag.patterns.add(pattern);
1055
- });
1056
-
1057
- inst._zod.check = (payload) => {
1058
- if (payload.value.endsWith(def.suffix)) return;
1059
- payload.issues.push({
1060
- origin: "string",
1061
- code: "invalid_format",
1062
- format: "ends_with",
1063
- suffix: def.suffix,
1064
- input: payload.value,
1065
- inst,
1066
- continue: !def.abort,
1067
- });
1068
- };
1069
- }
1070
- );
1071
-
1072
- ///////////////////////////////////
1073
- ///// $ZodCheckProperty /////
1074
- ///////////////////////////////////
1075
- function handleCheckPropertyResult(
1076
- result: schemas.ParsePayload<unknown>,
1077
- payload: schemas.ParsePayload<unknown>,
1078
- property: string
1079
- ) {
1080
- if (result.issues.length) {
1081
- payload.issues.push(...util.prefixIssues(property, result.issues));
1082
- }
1083
- }
1084
- export interface $ZodCheckPropertyDef extends $ZodCheckDef {
1085
- check: "property";
1086
- property: string;
1087
- schema: schemas.$ZodType;
1088
- }
1089
-
1090
- export interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
1091
- def: $ZodCheckPropertyDef;
1092
- issc: errors.$ZodIssue;
1093
- }
1094
-
1095
- export interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
1096
- _zod: $ZodCheckPropertyInternals<T>;
1097
- }
1098
-
1099
- export const $ZodCheckProperty: core.$constructor<$ZodCheckProperty> = /*@__PURE__*/ core.$constructor(
1100
- "$ZodCheckProperty",
1101
- (inst, def) => {
1102
- $ZodCheck.init(inst, def);
1103
-
1104
- inst._zod.check = (payload) => {
1105
- const result = def.schema._zod.run(
1106
- {
1107
- value: (payload.value as any)[def.property],
1108
- issues: [],
1109
- },
1110
- {}
1111
- );
1112
-
1113
- if (result instanceof Promise) {
1114
- return result.then((result) => handleCheckPropertyResult(result, payload, def.property));
1115
- }
1116
-
1117
- handleCheckPropertyResult(result, payload, def.property);
1118
- return;
1119
- };
1120
- }
1121
- );
1122
-
1123
- ///////////////////////////////////
1124
- ///// $ZodCheckMimeType /////
1125
- ///////////////////////////////////
1126
- export interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
1127
- check: "mime_type";
1128
- mime: util.MimeTypes[];
1129
- }
1130
-
1131
- export interface $ZodCheckMimeTypeInternals<T extends File = File> extends $ZodCheckInternals<T> {
1132
- def: $ZodCheckMimeTypeDef;
1133
- issc: errors.$ZodIssueInvalidValue;
1134
- }
1135
-
1136
- export interface $ZodCheckMimeType<T extends File = File> extends $ZodCheck<T> {
1137
- _zod: $ZodCheckMimeTypeInternals<T>;
1138
- }
1139
-
1140
- export const $ZodCheckMimeType: core.$constructor<$ZodCheckMimeType> = /*@__PURE__*/ core.$constructor(
1141
- "$ZodCheckMimeType",
1142
- (inst, def) => {
1143
- $ZodCheck.init(inst, def);
1144
- const mimeSet = new Set(def.mime);
1145
- inst._zod.onattach.push((inst) => {
1146
- inst._zod.bag.mime = def.mime;
1147
- });
1148
- inst._zod.check = (payload) => {
1149
- if (mimeSet.has(payload.value.type)) return;
1150
- payload.issues.push({
1151
- code: "invalid_value",
1152
- values: def.mime,
1153
- input: payload.value.type,
1154
- inst,
1155
- });
1156
- };
1157
- }
1158
- );
1159
-
1160
- ///////////////////////////////////
1161
- ///// $ZodCheckFileName /////
1162
- ///////////////////////////////////
1163
- // interface $ZodCheckFileNameDef extends $ZodCheckDef {
1164
- // check: "file_name";
1165
- // fileName: string;
1166
- // error?: errors.$ZodErrorMap<errors.$ZodIssueInvalidType> | undefined;
1167
- // }
1168
- // export interface $ZodCheckFileName<T extends File = File>
1169
- // extends $ZodCheckInternals<T> {
1170
- // _def: $ZodCheckFileNameDef;
1171
- // }
1172
-
1173
- // export const $ZodCheckFileName: core.$constructor<$ZodCheckFileName> =
1174
- // core.$constructor("$ZodCheckFileName", (inst, def) => {
1175
- // $ZodCheck.init(inst, def);
1176
-
1177
- // inst._zod.check = (payload) => {
1178
- // if (def.fileName === payload.value.name) return;
1179
- // payload.issues.push({
1180
- // origin: "file",
1181
- // code: "invalid_value",
1182
- // options: [def.fileName],
1183
- // input: payload.value,
1184
- // path: ["name"],
1185
- // inst,
1186
- // });
1187
- // };
1188
- // });
1189
-
1190
- ///////////////////////////////////
1191
- ///// $ZodCheckOverwrite /////
1192
- ///////////////////////////////////
1193
- export interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
1194
- check: "overwrite";
1195
- tx(value: T): T;
1196
- }
1197
-
1198
- export interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
1199
- def: $ZodCheckOverwriteDef<T>;
1200
- issc: never;
1201
- }
1202
-
1203
- export interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
1204
- _zod: $ZodCheckOverwriteInternals<T>;
1205
- }
1206
-
1207
- export const $ZodCheckOverwrite: core.$constructor<$ZodCheckOverwrite> = /*@__PURE__*/ core.$constructor(
1208
- "$ZodCheckOverwrite",
1209
- (inst, def) => {
1210
- $ZodCheck.init(inst, def);
1211
-
1212
- inst._zod.check = (payload) => {
1213
- payload.value = def.tx(payload.value);
1214
- };
1215
- }
1216
- );
1217
-
1218
- // ///////////////////////////////
1219
- // ///// $ZodCheckTrim /////
1220
- // ///////////////////////////////
1221
- // export interface $ZodCheckTrimDef extends $ZodCheckDef {
1222
- // check: "trim";
1223
- // error?: errors.$ZodErrorMap<never> | undefined;
1224
- // }
1225
- // export interface $ZodCheckTrim extends $ZodCheckInternals<string> {
1226
- // _def: $ZodCheckTrimDef;
1227
- // }
1228
-
1229
- // export const $ZodCheckTrim: core.$constructor<$ZodCheckTrim> =
1230
- // core.$constructor("$ZodCheckTrim", (inst, def) => {
1231
- // $ZodCheck.init(inst, def);
1232
-
1233
- // inst._zod.check = (payload) => {
1234
- // payload.value = payload.value.trim();
1235
- // };
1236
- // });
1237
-
1238
- // //////////////////////////////////////
1239
- // ///// $ZodCheckNormalize /////
1240
- // //////////////////////////////////////
1241
- // interface $ZodCheckNormalizeDef extends $ZodCheckDef {
1242
- // check: "normalize";
1243
- // error?: errors.$ZodErrorMap<never> | undefined;
1244
- // }
1245
-
1246
- // export interface $ZodCheckNormalize extends $ZodCheckInternals<string> {
1247
- // _def: $ZodCheckNormalizeDef;
1248
- // }
1249
-
1250
- // export const $ZodCheckNormalize: core.$constructor<$ZodCheckNormalize> =
1251
- // core.$constructor("$ZodCheckNormalize", (inst, def) => {
1252
- // $ZodCheck.init(inst, def);
1253
-
1254
- // inst._zod.check = (payload) => {
1255
- // payload.value = payload.value.normalize();
1256
- // };
1257
- // });
1258
-
1259
- export type $ZodChecks =
1260
- | $ZodCheckLessThan
1261
- | $ZodCheckGreaterThan
1262
- | $ZodCheckMultipleOf
1263
- | $ZodCheckNumberFormat
1264
- | $ZodCheckBigIntFormat
1265
- | $ZodCheckMaxSize
1266
- | $ZodCheckMinSize
1267
- | $ZodCheckSizeEquals
1268
- | $ZodCheckMaxLength
1269
- | $ZodCheckMinLength
1270
- | $ZodCheckLengthEquals
1271
- | $ZodCheckStringFormat
1272
- | $ZodCheckProperty
1273
- | $ZodCheckMimeType
1274
- | $ZodCheckOverwrite;
1275
-
1276
- export type $ZodStringFormatChecks =
1277
- | $ZodCheckRegex
1278
- | $ZodCheckLowerCase
1279
- | $ZodCheckUpperCase
1280
- | $ZodCheckIncludes
1281
- | $ZodCheckStartsWith
1282
- | $ZodCheckEndsWith
1283
- | schemas.$ZodStringFormatTypes; // union of string format schema types