@btc-embedded/cdk-extensions 0.10.5 → 0.11.0

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 (349) hide show
  1. package/.jsii +3 -4
  2. package/CHANGELOG.md +15 -0
  3. package/lib/constructs/EventPipe.js +1 -1
  4. package/lib/constructs/S3Bucket.js +1 -1
  5. package/lib/constructs/SecureRestApi.js +1 -1
  6. package/lib/constructs/SecureRestApiV2.js +1 -1
  7. package/lib/extensions/ApiGatewayExtension.js +1 -1
  8. package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
  9. package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
  10. package/lib/extensions/CloudMapExtension.js +1 -1
  11. package/lib/extensions/DeactivatableServiceExtension.js +1 -1
  12. package/lib/extensions/DocumentDbAccessExtension.js +1 -1
  13. package/lib/extensions/DomainEventMessagingExtension.js +1 -1
  14. package/lib/extensions/ExtraContainerExtension.js +1 -1
  15. package/lib/extensions/HTTPApiExtension.js +1 -1
  16. package/lib/extensions/LogExtension.js +1 -1
  17. package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
  18. package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
  19. package/lib/extensions/OpenTelemetryExtension.js +1 -1
  20. package/lib/extensions/PostgresDbAccessExtension.js +1 -1
  21. package/lib/extensions/SharedVolumeExtension.js +1 -1
  22. package/lib/extensions/TcpKeepAliveExtension.js +1 -1
  23. package/lib/platform/ApiGateway.js +1 -1
  24. package/lib/platform/ApiGatewayV2.js +2 -2
  25. package/lib/platform/ApplicationLoadBalancer.js +1 -1
  26. package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
  27. package/lib/platform/CognitoUserPool.js +2 -2
  28. package/lib/platform/DefaultUserPoolClients.js +1 -1
  29. package/lib/platform/DocumentDB.js +2 -2
  30. package/lib/platform/PrivateDnsNamespace.js +1 -1
  31. package/lib/platform/ResourceServer.js +1 -1
  32. package/lib/platform/Vpc.js +1 -1
  33. package/lib/utils/BTCLogGroup.js +1 -1
  34. package/lib/utils/StackParameter.js +1 -1
  35. package/lib/utils/configFileParsing.d.ts +17 -9
  36. package/lib/utils/configFileParsing.js +12 -5
  37. package/package.json +5 -6
  38. package/node_modules/zod/LICENSE +0 -21
  39. package/node_modules/zod/README.md +0 -208
  40. package/node_modules/zod/dist/cjs/index.js +0 -22
  41. package/node_modules/zod/dist/cjs/package.json +0 -3
  42. package/node_modules/zod/dist/cjs/v3/ZodError.js +0 -137
  43. package/node_modules/zod/dist/cjs/v3/benchmarks/datetime.js +0 -54
  44. package/node_modules/zod/dist/cjs/v3/benchmarks/discriminatedUnion.js +0 -79
  45. package/node_modules/zod/dist/cjs/v3/benchmarks/index.js +0 -59
  46. package/node_modules/zod/dist/cjs/v3/benchmarks/ipv4.js +0 -54
  47. package/node_modules/zod/dist/cjs/v3/benchmarks/object.js +0 -70
  48. package/node_modules/zod/dist/cjs/v3/benchmarks/primitives.js +0 -159
  49. package/node_modules/zod/dist/cjs/v3/benchmarks/realworld.js +0 -56
  50. package/node_modules/zod/dist/cjs/v3/benchmarks/string.js +0 -55
  51. package/node_modules/zod/dist/cjs/v3/benchmarks/union.js +0 -79
  52. package/node_modules/zod/dist/cjs/v3/errors.js +0 -17
  53. package/node_modules/zod/dist/cjs/v3/external.js +0 -22
  54. package/node_modules/zod/dist/cjs/v3/helpers/enumUtil.js +0 -2
  55. package/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js +0 -9
  56. package/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js +0 -124
  57. package/node_modules/zod/dist/cjs/v3/helpers/partialUtil.js +0 -2
  58. package/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js +0 -2
  59. package/node_modules/zod/dist/cjs/v3/helpers/util.js +0 -137
  60. package/node_modules/zod/dist/cjs/v3/index.js +0 -33
  61. package/node_modules/zod/dist/cjs/v3/locales/en.js +0 -109
  62. package/node_modules/zod/dist/cjs/v3/standard-schema.js +0 -2
  63. package/node_modules/zod/dist/cjs/v3/tests/Mocker.js +0 -57
  64. package/node_modules/zod/dist/cjs/v3/types.js +0 -3773
  65. package/node_modules/zod/dist/cjs/v4/classic/checks.js +0 -32
  66. package/node_modules/zod/dist/cjs/v4/classic/coerce.js +0 -47
  67. package/node_modules/zod/dist/cjs/v4/classic/compat.js +0 -63
  68. package/node_modules/zod/dist/cjs/v4/classic/errors.js +0 -67
  69. package/node_modules/zod/dist/cjs/v4/classic/external.js +0 -69
  70. package/node_modules/zod/dist/cjs/v4/classic/index.js +0 -33
  71. package/node_modules/zod/dist/cjs/v4/classic/iso.js +0 -60
  72. package/node_modules/zod/dist/cjs/v4/classic/parse.js +0 -32
  73. package/node_modules/zod/dist/cjs/v4/classic/schemas.js +0 -1100
  74. package/node_modules/zod/dist/cjs/v4/core/api.js +0 -1021
  75. package/node_modules/zod/dist/cjs/v4/core/checks.js +0 -580
  76. package/node_modules/zod/dist/cjs/v4/core/config.js +0 -10
  77. package/node_modules/zod/dist/cjs/v4/core/core.js +0 -63
  78. package/node_modules/zod/dist/cjs/v4/core/doc.js +0 -39
  79. package/node_modules/zod/dist/cjs/v4/core/errors.js +0 -222
  80. package/node_modules/zod/dist/cjs/v4/core/function.js +0 -102
  81. package/node_modules/zod/dist/cjs/v4/core/index.js +0 -44
  82. package/node_modules/zod/dist/cjs/v4/core/json-schema.js +0 -2
  83. package/node_modules/zod/dist/cjs/v4/core/parse.js +0 -87
  84. package/node_modules/zod/dist/cjs/v4/core/regexes.js +0 -103
  85. package/node_modules/zod/dist/cjs/v4/core/registries.js +0 -47
  86. package/node_modules/zod/dist/cjs/v4/core/schemas.js +0 -1719
  87. package/node_modules/zod/dist/cjs/v4/core/standard-schema.js +0 -2
  88. package/node_modules/zod/dist/cjs/v4/core/to-json-schema.js +0 -833
  89. package/node_modules/zod/dist/cjs/v4/core/util.js +0 -537
  90. package/node_modules/zod/dist/cjs/v4/core/versions.js +0 -8
  91. package/node_modules/zod/dist/cjs/v4/core/zsf.js +0 -172
  92. package/node_modules/zod/dist/cjs/v4/index.js +0 -22
  93. package/node_modules/zod/dist/cjs/v4/locales/ar.js +0 -142
  94. package/node_modules/zod/dist/cjs/v4/locales/az.js +0 -141
  95. package/node_modules/zod/dist/cjs/v4/locales/be.js +0 -190
  96. package/node_modules/zod/dist/cjs/v4/locales/ca.js +0 -144
  97. package/node_modules/zod/dist/cjs/v4/locales/cs.js +0 -161
  98. package/node_modules/zod/dist/cjs/v4/locales/de.js +0 -142
  99. package/node_modules/zod/dist/cjs/v4/locales/en.js +0 -145
  100. package/node_modules/zod/dist/cjs/v4/locales/es.js +0 -143
  101. package/node_modules/zod/dist/cjs/v4/locales/fa.js +0 -148
  102. package/node_modules/zod/dist/cjs/v4/locales/fi.js +0 -148
  103. package/node_modules/zod/dist/cjs/v4/locales/fr-CA.js +0 -143
  104. package/node_modules/zod/dist/cjs/v4/locales/fr.js +0 -142
  105. package/node_modules/zod/dist/cjs/v4/locales/he.js +0 -143
  106. package/node_modules/zod/dist/cjs/v4/locales/hu.js +0 -143
  107. package/node_modules/zod/dist/cjs/v4/locales/id.js +0 -142
  108. package/node_modules/zod/dist/cjs/v4/locales/index.js +0 -82
  109. package/node_modules/zod/dist/cjs/v4/locales/it.js +0 -143
  110. package/node_modules/zod/dist/cjs/v4/locales/ja.js +0 -141
  111. package/node_modules/zod/dist/cjs/v4/locales/kh.js +0 -143
  112. package/node_modules/zod/dist/cjs/v4/locales/ko.js +0 -147
  113. package/node_modules/zod/dist/cjs/v4/locales/mk.js +0 -144
  114. package/node_modules/zod/dist/cjs/v4/locales/ms.js +0 -142
  115. package/node_modules/zod/dist/cjs/v4/locales/nl.js +0 -143
  116. package/node_modules/zod/dist/cjs/v4/locales/no.js +0 -142
  117. package/node_modules/zod/dist/cjs/v4/locales/ota.js +0 -143
  118. package/node_modules/zod/dist/cjs/v4/locales/pl.js +0 -143
  119. package/node_modules/zod/dist/cjs/v4/locales/ps.js +0 -148
  120. package/node_modules/zod/dist/cjs/v4/locales/pt.js +0 -142
  121. package/node_modules/zod/dist/cjs/v4/locales/ru.js +0 -190
  122. package/node_modules/zod/dist/cjs/v4/locales/sl.js +0 -143
  123. package/node_modules/zod/dist/cjs/v4/locales/sv.js +0 -144
  124. package/node_modules/zod/dist/cjs/v4/locales/ta.js +0 -143
  125. package/node_modules/zod/dist/cjs/v4/locales/th.js +0 -143
  126. package/node_modules/zod/dist/cjs/v4/locales/tr.js +0 -143
  127. package/node_modules/zod/dist/cjs/v4/locales/ua.js +0 -143
  128. package/node_modules/zod/dist/cjs/v4/locales/ur.js +0 -143
  129. package/node_modules/zod/dist/cjs/v4/locales/vi.js +0 -142
  130. package/node_modules/zod/dist/cjs/v4/locales/zh-CN.js +0 -142
  131. package/node_modules/zod/dist/cjs/v4/locales/zh-TW.js +0 -143
  132. package/node_modules/zod/dist/cjs/v4/mini/checks.js +0 -34
  133. package/node_modules/zod/dist/cjs/v4/mini/coerce.js +0 -47
  134. package/node_modules/zod/dist/cjs/v4/mini/external.js +0 -61
  135. package/node_modules/zod/dist/cjs/v4/mini/index.js +0 -32
  136. package/node_modules/zod/dist/cjs/v4/mini/iso.js +0 -60
  137. package/node_modules/zod/dist/cjs/v4/mini/parse.js +0 -8
  138. package/node_modules/zod/dist/cjs/v4/mini/schemas.js +0 -831
  139. package/node_modules/zod/dist/esm/index.js +0 -3
  140. package/node_modules/zod/dist/esm/package.json +0 -3
  141. package/node_modules/zod/dist/esm/v3/ZodError.js +0 -132
  142. package/node_modules/zod/dist/esm/v3/benchmarks/datetime.js +0 -49
  143. package/node_modules/zod/dist/esm/v3/benchmarks/discriminatedUnion.js +0 -74
  144. package/node_modules/zod/dist/esm/v3/benchmarks/index.js +0 -54
  145. package/node_modules/zod/dist/esm/v3/benchmarks/ipv4.js +0 -49
  146. package/node_modules/zod/dist/esm/v3/benchmarks/object.js +0 -65
  147. package/node_modules/zod/dist/esm/v3/benchmarks/primitives.js +0 -154
  148. package/node_modules/zod/dist/esm/v3/benchmarks/realworld.js +0 -51
  149. package/node_modules/zod/dist/esm/v3/benchmarks/string.js +0 -50
  150. package/node_modules/zod/dist/esm/v3/benchmarks/union.js +0 -74
  151. package/node_modules/zod/dist/esm/v3/errors.js +0 -9
  152. package/node_modules/zod/dist/esm/v3/external.js +0 -6
  153. package/node_modules/zod/dist/esm/v3/helpers/enumUtil.js +0 -1
  154. package/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +0 -6
  155. package/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +0 -109
  156. package/node_modules/zod/dist/esm/v3/helpers/partialUtil.js +0 -1
  157. package/node_modules/zod/dist/esm/v3/helpers/typeAliases.js +0 -1
  158. package/node_modules/zod/dist/esm/v3/helpers/util.js +0 -133
  159. package/node_modules/zod/dist/esm/v3/index.js +0 -4
  160. package/node_modules/zod/dist/esm/v3/locales/en.js +0 -107
  161. package/node_modules/zod/dist/esm/v3/standard-schema.js +0 -1
  162. package/node_modules/zod/dist/esm/v3/tests/Mocker.js +0 -53
  163. package/node_modules/zod/dist/esm/v3/types.js +0 -3691
  164. package/node_modules/zod/dist/esm/v4/classic/checks.js +0 -1
  165. package/node_modules/zod/dist/esm/v4/classic/coerce.js +0 -17
  166. package/node_modules/zod/dist/esm/v4/classic/compat.js +0 -33
  167. package/node_modules/zod/dist/esm/v4/classic/errors.js +0 -41
  168. package/node_modules/zod/dist/esm/v4/classic/external.js +0 -18
  169. package/node_modules/zod/dist/esm/v4/classic/index.js +0 -4
  170. package/node_modules/zod/dist/esm/v4/classic/iso.js +0 -30
  171. package/node_modules/zod/dist/esm/v4/classic/parse.js +0 -6
  172. package/node_modules/zod/dist/esm/v4/classic/schemas.js +0 -998
  173. package/node_modules/zod/dist/esm/v4/core/api.js +0 -889
  174. package/node_modules/zod/dist/esm/v4/core/checks.js +0 -554
  175. package/node_modules/zod/dist/esm/v4/core/config.js +0 -6
  176. package/node_modules/zod/dist/esm/v4/core/core.js +0 -57
  177. package/node_modules/zod/dist/esm/v4/core/doc.js +0 -35
  178. package/node_modules/zod/dist/esm/v4/core/errors.js +0 -191
  179. package/node_modules/zod/dist/esm/v4/core/function.js +0 -75
  180. package/node_modules/zod/dist/esm/v4/core/index.js +0 -15
  181. package/node_modules/zod/dist/esm/v4/core/json-schema.js +0 -1
  182. package/node_modules/zod/dist/esm/v4/core/parse.js +0 -57
  183. package/node_modules/zod/dist/esm/v4/core/regexes.js +0 -95
  184. package/node_modules/zod/dist/esm/v4/core/registries.js +0 -42
  185. package/node_modules/zod/dist/esm/v4/core/schemas.js +0 -1688
  186. package/node_modules/zod/dist/esm/v4/core/standard-schema.js +0 -1
  187. package/node_modules/zod/dist/esm/v4/core/to-json-schema.js +0 -828
  188. package/node_modules/zod/dist/esm/v4/core/util.js +0 -491
  189. package/node_modules/zod/dist/esm/v4/core/versions.js +0 -5
  190. package/node_modules/zod/dist/esm/v4/core/zsf.js +0 -171
  191. package/node_modules/zod/dist/esm/v4/index.js +0 -3
  192. package/node_modules/zod/dist/esm/v4/locales/ar.js +0 -116
  193. package/node_modules/zod/dist/esm/v4/locales/az.js +0 -115
  194. package/node_modules/zod/dist/esm/v4/locales/be.js +0 -164
  195. package/node_modules/zod/dist/esm/v4/locales/ca.js +0 -118
  196. package/node_modules/zod/dist/esm/v4/locales/cs.js +0 -135
  197. package/node_modules/zod/dist/esm/v4/locales/de.js +0 -116
  198. package/node_modules/zod/dist/esm/v4/locales/en.js +0 -117
  199. package/node_modules/zod/dist/esm/v4/locales/es.js +0 -117
  200. package/node_modules/zod/dist/esm/v4/locales/fa.js +0 -122
  201. package/node_modules/zod/dist/esm/v4/locales/fi.js +0 -122
  202. package/node_modules/zod/dist/esm/v4/locales/fr-CA.js +0 -117
  203. package/node_modules/zod/dist/esm/v4/locales/fr.js +0 -116
  204. package/node_modules/zod/dist/esm/v4/locales/he.js +0 -117
  205. package/node_modules/zod/dist/esm/v4/locales/hu.js +0 -117
  206. package/node_modules/zod/dist/esm/v4/locales/id.js +0 -116
  207. package/node_modules/zod/dist/esm/v4/locales/index.js +0 -38
  208. package/node_modules/zod/dist/esm/v4/locales/it.js +0 -117
  209. package/node_modules/zod/dist/esm/v4/locales/ja.js +0 -115
  210. package/node_modules/zod/dist/esm/v4/locales/kh.js +0 -117
  211. package/node_modules/zod/dist/esm/v4/locales/ko.js +0 -121
  212. package/node_modules/zod/dist/esm/v4/locales/mk.js +0 -118
  213. package/node_modules/zod/dist/esm/v4/locales/ms.js +0 -116
  214. package/node_modules/zod/dist/esm/v4/locales/nl.js +0 -117
  215. package/node_modules/zod/dist/esm/v4/locales/no.js +0 -116
  216. package/node_modules/zod/dist/esm/v4/locales/ota.js +0 -117
  217. package/node_modules/zod/dist/esm/v4/locales/pl.js +0 -117
  218. package/node_modules/zod/dist/esm/v4/locales/ps.js +0 -122
  219. package/node_modules/zod/dist/esm/v4/locales/pt.js +0 -116
  220. package/node_modules/zod/dist/esm/v4/locales/ru.js +0 -164
  221. package/node_modules/zod/dist/esm/v4/locales/sl.js +0 -117
  222. package/node_modules/zod/dist/esm/v4/locales/sv.js +0 -118
  223. package/node_modules/zod/dist/esm/v4/locales/ta.js +0 -117
  224. package/node_modules/zod/dist/esm/v4/locales/th.js +0 -117
  225. package/node_modules/zod/dist/esm/v4/locales/tr.js +0 -115
  226. package/node_modules/zod/dist/esm/v4/locales/ua.js +0 -117
  227. package/node_modules/zod/dist/esm/v4/locales/ur.js +0 -117
  228. package/node_modules/zod/dist/esm/v4/locales/vi.js +0 -116
  229. package/node_modules/zod/dist/esm/v4/locales/zh-CN.js +0 -116
  230. package/node_modules/zod/dist/esm/v4/locales/zh-TW.js +0 -117
  231. package/node_modules/zod/dist/esm/v4/mini/checks.js +0 -1
  232. package/node_modules/zod/dist/esm/v4/mini/coerce.js +0 -17
  233. package/node_modules/zod/dist/esm/v4/mini/external.js +0 -13
  234. package/node_modules/zod/dist/esm/v4/mini/index.js +0 -3
  235. package/node_modules/zod/dist/esm/v4/mini/iso.js +0 -30
  236. package/node_modules/zod/dist/esm/v4/mini/parse.js +0 -1
  237. package/node_modules/zod/dist/esm/v4/mini/schemas.js +0 -725
  238. package/node_modules/zod/dist/types/index.d.ts +0 -3
  239. package/node_modules/zod/dist/types/package.json +0 -3
  240. package/node_modules/zod/dist/types/v3/ZodError.d.ts +0 -164
  241. package/node_modules/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
  242. package/node_modules/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
  243. package/node_modules/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
  244. package/node_modules/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
  245. package/node_modules/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
  246. package/node_modules/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
  247. package/node_modules/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
  248. package/node_modules/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
  249. package/node_modules/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
  250. package/node_modules/zod/dist/types/v3/errors.d.ts +0 -5
  251. package/node_modules/zod/dist/types/v3/external.d.ts +0 -6
  252. package/node_modules/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
  253. package/node_modules/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
  254. package/node_modules/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
  255. package/node_modules/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
  256. package/node_modules/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
  257. package/node_modules/zod/dist/types/v3/helpers/util.d.ts +0 -85
  258. package/node_modules/zod/dist/types/v3/index.d.ts +0 -4
  259. package/node_modules/zod/dist/types/v3/locales/en.d.ts +0 -3
  260. package/node_modules/zod/dist/types/v3/standard-schema.d.ts +0 -102
  261. package/node_modules/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
  262. package/node_modules/zod/dist/types/v3/types.d.ts +0 -1031
  263. package/node_modules/zod/dist/types/v4/classic/checks.d.ts +0 -1
  264. package/node_modules/zod/dist/types/v4/classic/coerce.d.ts +0 -17
  265. package/node_modules/zod/dist/types/v4/classic/compat.d.ts +0 -48
  266. package/node_modules/zod/dist/types/v4/classic/errors.d.ts +0 -30
  267. package/node_modules/zod/dist/types/v4/classic/external.d.ts +0 -13
  268. package/node_modules/zod/dist/types/v4/classic/index.d.ts +0 -4
  269. package/node_modules/zod/dist/types/v4/classic/iso.d.ts +0 -22
  270. package/node_modules/zod/dist/types/v4/classic/parse.d.ts +0 -23
  271. package/node_modules/zod/dist/types/v4/classic/schemas.d.ts +0 -624
  272. package/node_modules/zod/dist/types/v4/core/api.d.ts +0 -281
  273. package/node_modules/zod/dist/types/v4/core/checks.d.ts +0 -277
  274. package/node_modules/zod/dist/types/v4/core/config.d.ts +0 -9
  275. package/node_modules/zod/dist/types/v4/core/core.d.ts +0 -47
  276. package/node_modules/zod/dist/types/v4/core/doc.d.ts +0 -14
  277. package/node_modules/zod/dist/types/v4/core/errors.d.ts +0 -204
  278. package/node_modules/zod/dist/types/v4/core/function.d.ts +0 -52
  279. package/node_modules/zod/dist/types/v4/core/index.d.ts +0 -15
  280. package/node_modules/zod/dist/types/v4/core/json-schema.d.ts +0 -87
  281. package/node_modules/zod/dist/types/v4/core/parse.d.ts +0 -25
  282. package/node_modules/zod/dist/types/v4/core/regexes.d.ts +0 -62
  283. package/node_modules/zod/dist/types/v4/core/registries.d.ts +0 -39
  284. package/node_modules/zod/dist/types/v4/core/schemas.d.ts +0 -1005
  285. package/node_modules/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
  286. package/node_modules/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
  287. package/node_modules/zod/dist/types/v4/core/util.d.ts +0 -183
  288. package/node_modules/zod/dist/types/v4/core/versions.d.ts +0 -5
  289. package/node_modules/zod/dist/types/v4/core/zsf.d.ts +0 -91
  290. package/node_modules/zod/dist/types/v4/index.d.ts +0 -3
  291. package/node_modules/zod/dist/types/v4/locales/ar.d.ts +0 -4
  292. package/node_modules/zod/dist/types/v4/locales/az.d.ts +0 -4
  293. package/node_modules/zod/dist/types/v4/locales/be.d.ts +0 -4
  294. package/node_modules/zod/dist/types/v4/locales/ca.d.ts +0 -4
  295. package/node_modules/zod/dist/types/v4/locales/cs.d.ts +0 -4
  296. package/node_modules/zod/dist/types/v4/locales/de.d.ts +0 -4
  297. package/node_modules/zod/dist/types/v4/locales/en.d.ts +0 -5
  298. package/node_modules/zod/dist/types/v4/locales/es.d.ts +0 -4
  299. package/node_modules/zod/dist/types/v4/locales/fa.d.ts +0 -4
  300. package/node_modules/zod/dist/types/v4/locales/fi.d.ts +0 -4
  301. package/node_modules/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
  302. package/node_modules/zod/dist/types/v4/locales/fr.d.ts +0 -4
  303. package/node_modules/zod/dist/types/v4/locales/he.d.ts +0 -4
  304. package/node_modules/zod/dist/types/v4/locales/hu.d.ts +0 -4
  305. package/node_modules/zod/dist/types/v4/locales/id.d.ts +0 -4
  306. package/node_modules/zod/dist/types/v4/locales/index.d.ts +0 -38
  307. package/node_modules/zod/dist/types/v4/locales/it.d.ts +0 -4
  308. package/node_modules/zod/dist/types/v4/locales/ja.d.ts +0 -4
  309. package/node_modules/zod/dist/types/v4/locales/kh.d.ts +0 -4
  310. package/node_modules/zod/dist/types/v4/locales/ko.d.ts +0 -4
  311. package/node_modules/zod/dist/types/v4/locales/mk.d.ts +0 -4
  312. package/node_modules/zod/dist/types/v4/locales/ms.d.ts +0 -4
  313. package/node_modules/zod/dist/types/v4/locales/nl.d.ts +0 -4
  314. package/node_modules/zod/dist/types/v4/locales/no.d.ts +0 -4
  315. package/node_modules/zod/dist/types/v4/locales/ota.d.ts +0 -4
  316. package/node_modules/zod/dist/types/v4/locales/pl.d.ts +0 -4
  317. package/node_modules/zod/dist/types/v4/locales/ps.d.ts +0 -4
  318. package/node_modules/zod/dist/types/v4/locales/pt.d.ts +0 -4
  319. package/node_modules/zod/dist/types/v4/locales/ru.d.ts +0 -4
  320. package/node_modules/zod/dist/types/v4/locales/sl.d.ts +0 -4
  321. package/node_modules/zod/dist/types/v4/locales/sv.d.ts +0 -4
  322. package/node_modules/zod/dist/types/v4/locales/ta.d.ts +0 -4
  323. package/node_modules/zod/dist/types/v4/locales/th.d.ts +0 -4
  324. package/node_modules/zod/dist/types/v4/locales/tr.d.ts +0 -5
  325. package/node_modules/zod/dist/types/v4/locales/ua.d.ts +0 -4
  326. package/node_modules/zod/dist/types/v4/locales/ur.d.ts +0 -4
  327. package/node_modules/zod/dist/types/v4/locales/vi.d.ts +0 -4
  328. package/node_modules/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
  329. package/node_modules/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
  330. package/node_modules/zod/dist/types/v4/mini/checks.d.ts +0 -1
  331. package/node_modules/zod/dist/types/v4/mini/coerce.d.ts +0 -7
  332. package/node_modules/zod/dist/types/v4/mini/external.d.ts +0 -11
  333. package/node_modules/zod/dist/types/v4/mini/index.d.ts +0 -3
  334. package/node_modules/zod/dist/types/v4/mini/iso.d.ts +0 -22
  335. package/node_modules/zod/dist/types/v4/mini/parse.d.ts +0 -1
  336. package/node_modules/zod/dist/types/v4/mini/schemas.d.ts +0 -351
  337. package/node_modules/zod/package.json +0 -120
  338. package/node_modules/zod/v3/index.d.ts +0 -3
  339. package/node_modules/zod/v3/index.js +0 -1
  340. package/node_modules/zod/v4/core/index.d.ts +0 -1
  341. package/node_modules/zod/v4/core/index.js +0 -1
  342. package/node_modules/zod/v4/index.d.ts +0 -3
  343. package/node_modules/zod/v4/index.js +0 -1
  344. package/node_modules/zod/v4/locales/en.d.ts +0 -2
  345. package/node_modules/zod/v4/locales/en.js +0 -2
  346. package/node_modules/zod/v4/locales/index.d.ts +0 -1
  347. package/node_modules/zod/v4/locales/index.js +0 -1
  348. package/node_modules/zod/v4-mini/index.d.ts +0 -1
  349. package/node_modules/zod/v4-mini/index.js +0 -1
@@ -1,998 +0,0 @@
1
- import * as core from "zod/v4/core";
2
- import { util } from "zod/v4/core";
3
- import * as checks from "./checks.js";
4
- import * as iso from "./iso.js";
5
- import * as parse from "./parse.js";
6
- export const ZodType = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
7
- core.$ZodType.init(inst, def);
8
- inst.def = def;
9
- Object.defineProperty(inst, "_def", { value: def });
10
- // base methods
11
- inst.check = (...checks) => {
12
- return inst.clone({
13
- ...def,
14
- checks: [
15
- ...(def.checks ?? []),
16
- ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
17
- ],
18
- }
19
- // { parent: true }
20
- );
21
- };
22
- inst.clone = (def, params) => core.clone(inst, def, params);
23
- inst.brand = () => inst;
24
- inst.register = ((reg, meta) => {
25
- reg.add(inst, meta);
26
- return inst;
27
- });
28
- // parsing
29
- inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
30
- inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
31
- inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
32
- inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
33
- inst.spa = inst.safeParseAsync;
34
- // refinements
35
- inst.refine = (check, params) => inst.check(refine(check, params));
36
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
37
- inst.overwrite = (fn) => inst.check(checks.overwrite(fn));
38
- // wrappers
39
- inst.optional = () => optional(inst);
40
- inst.nullable = () => nullable(inst);
41
- inst.nullish = () => optional(nullable(inst));
42
- inst.nonoptional = (params) => nonoptional(inst, params);
43
- inst.array = () => array(inst);
44
- inst.or = (arg) => union([inst, arg]);
45
- inst.and = (arg) => intersection(inst, arg);
46
- inst.transform = (tx) => pipe(inst, transform(tx));
47
- inst.default = (def) => _default(inst, def);
48
- inst.prefault = (def) => prefault(inst, def);
49
- // inst.coalesce = (def, params) => coalesce(inst, def, params);
50
- inst.catch = (params) => _catch(inst, params);
51
- inst.pipe = (target) => pipe(inst, target);
52
- inst.readonly = () => readonly(inst);
53
- // meta
54
- inst.describe = (description) => {
55
- const cl = inst.clone();
56
- core.globalRegistry.add(cl, { description });
57
- return cl;
58
- };
59
- Object.defineProperty(inst, "description", {
60
- get() {
61
- return core.globalRegistry.get(inst)?.description;
62
- },
63
- configurable: true,
64
- });
65
- inst.meta = (...args) => {
66
- if (args.length === 0) {
67
- return core.globalRegistry.get(inst);
68
- }
69
- const cl = inst.clone();
70
- core.globalRegistry.add(cl, args[0]);
71
- return cl;
72
- };
73
- // helpers
74
- inst.isOptional = () => inst.safeParse(undefined).success;
75
- inst.isNullable = () => inst.safeParse(null).success;
76
- return inst;
77
- });
78
- /** @internal */
79
- export const _ZodString = /*@__PURE__*/ core.$constructor("_ZodString", (inst, def) => {
80
- core.$ZodString.init(inst, def);
81
- ZodType.init(inst, def);
82
- const bag = inst._zod.bag;
83
- inst.format = bag.format ?? null;
84
- inst.minLength = bag.minimum ?? null;
85
- inst.maxLength = bag.maximum ?? null;
86
- // validations
87
- inst.regex = (...args) => inst.check(checks.regex(...args));
88
- inst.includes = (...args) => inst.check(checks.includes(...args));
89
- inst.startsWith = (...args) => inst.check(checks.startsWith(...args));
90
- inst.endsWith = (...args) => inst.check(checks.endsWith(...args));
91
- inst.min = (...args) => inst.check(checks.minLength(...args));
92
- inst.max = (...args) => inst.check(checks.maxLength(...args));
93
- inst.length = (...args) => inst.check(checks.length(...args));
94
- inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));
95
- inst.lowercase = (params) => inst.check(checks.lowercase(params));
96
- inst.uppercase = (params) => inst.check(checks.uppercase(params));
97
- // transforms
98
- inst.trim = () => inst.check(checks.trim());
99
- inst.normalize = (...args) => inst.check(checks.normalize(...args));
100
- inst.toLowerCase = () => inst.check(checks.toLowerCase());
101
- inst.toUpperCase = () => inst.check(checks.toUpperCase());
102
- });
103
- export const ZodString = /*@__PURE__*/ core.$constructor("ZodString", (inst, def) => {
104
- core.$ZodString.init(inst, def);
105
- _ZodString.init(inst, def);
106
- inst.email = (params) => inst.check(core._email(ZodEmail, params));
107
- inst.url = (params) => inst.check(core._url(ZodURL, params));
108
- inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));
109
- inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));
110
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
111
- inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));
112
- inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));
113
- inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));
114
- inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));
115
- inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));
116
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
117
- inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));
118
- inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));
119
- inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));
120
- inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));
121
- inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));
122
- inst.xid = (params) => inst.check(core._xid(ZodXID, params));
123
- inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));
124
- inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));
125
- inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));
126
- inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));
127
- inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));
128
- inst.e164 = (params) => inst.check(core._e164(ZodE164, params));
129
- // iso
130
- inst.datetime = (params) => inst.check(iso.datetime(params));
131
- inst.date = (params) => inst.check(iso.date(params));
132
- inst.time = (params) => inst.check(iso.time(params));
133
- inst.duration = (params) => inst.check(iso.duration(params));
134
- });
135
- export function string(params) {
136
- return core._string(ZodString, params);
137
- }
138
- export const ZodStringFormat = /*@__PURE__*/ core.$constructor("ZodStringFormat", (inst, def) => {
139
- core.$ZodStringFormat.init(inst, def);
140
- _ZodString.init(inst, def);
141
- });
142
- export const ZodEmail = /*@__PURE__*/ core.$constructor("ZodEmail", (inst, def) => {
143
- // ZodStringFormat.init(inst, def);
144
- core.$ZodEmail.init(inst, def);
145
- ZodStringFormat.init(inst, def);
146
- });
147
- export function email(params) {
148
- return core._email(ZodEmail, params);
149
- }
150
- export const ZodGUID = /*@__PURE__*/ core.$constructor("ZodGUID", (inst, def) => {
151
- // ZodStringFormat.init(inst, def);
152
- core.$ZodGUID.init(inst, def);
153
- ZodStringFormat.init(inst, def);
154
- });
155
- export function guid(params) {
156
- return core._guid(ZodGUID, params);
157
- }
158
- export const ZodUUID = /*@__PURE__*/ core.$constructor("ZodUUID", (inst, def) => {
159
- // ZodStringFormat.init(inst, def);
160
- core.$ZodUUID.init(inst, def);
161
- ZodStringFormat.init(inst, def);
162
- });
163
- export function uuid(params) {
164
- return core._uuid(ZodUUID, params);
165
- }
166
- export function uuidv4(params) {
167
- return core._uuidv4(ZodUUID, params);
168
- }
169
- // ZodUUIDv6
170
- export function uuidv6(params) {
171
- return core._uuidv6(ZodUUID, params);
172
- }
173
- // ZodUUIDv7
174
- export function uuidv7(params) {
175
- return core._uuidv7(ZodUUID, params);
176
- }
177
- export const ZodURL = /*@__PURE__*/ core.$constructor("ZodURL", (inst, def) => {
178
- // ZodStringFormat.init(inst, def);
179
- core.$ZodURL.init(inst, def);
180
- ZodStringFormat.init(inst, def);
181
- });
182
- export function url(params) {
183
- return core._url(ZodURL, params);
184
- }
185
- export const ZodEmoji = /*@__PURE__*/ core.$constructor("ZodEmoji", (inst, def) => {
186
- // ZodStringFormat.init(inst, def);
187
- core.$ZodEmoji.init(inst, def);
188
- ZodStringFormat.init(inst, def);
189
- });
190
- export function emoji(params) {
191
- return core._emoji(ZodEmoji, params);
192
- }
193
- export const ZodNanoID = /*@__PURE__*/ core.$constructor("ZodNanoID", (inst, def) => {
194
- // ZodStringFormat.init(inst, def);
195
- core.$ZodNanoID.init(inst, def);
196
- ZodStringFormat.init(inst, def);
197
- });
198
- export function nanoid(params) {
199
- return core._nanoid(ZodNanoID, params);
200
- }
201
- export const ZodCUID = /*@__PURE__*/ core.$constructor("ZodCUID", (inst, def) => {
202
- // ZodStringFormat.init(inst, def);
203
- core.$ZodCUID.init(inst, def);
204
- ZodStringFormat.init(inst, def);
205
- });
206
- export function cuid(params) {
207
- return core._cuid(ZodCUID, params);
208
- }
209
- export const ZodCUID2 = /*@__PURE__*/ core.$constructor("ZodCUID2", (inst, def) => {
210
- // ZodStringFormat.init(inst, def);
211
- core.$ZodCUID2.init(inst, def);
212
- ZodStringFormat.init(inst, def);
213
- });
214
- export function cuid2(params) {
215
- return core._cuid2(ZodCUID2, params);
216
- }
217
- export const ZodULID = /*@__PURE__*/ core.$constructor("ZodULID", (inst, def) => {
218
- // ZodStringFormat.init(inst, def);
219
- core.$ZodULID.init(inst, def);
220
- ZodStringFormat.init(inst, def);
221
- });
222
- export function ulid(params) {
223
- return core._ulid(ZodULID, params);
224
- }
225
- export const ZodXID = /*@__PURE__*/ core.$constructor("ZodXID", (inst, def) => {
226
- // ZodStringFormat.init(inst, def);
227
- core.$ZodXID.init(inst, def);
228
- ZodStringFormat.init(inst, def);
229
- });
230
- export function xid(params) {
231
- return core._xid(ZodXID, params);
232
- }
233
- export const ZodKSUID = /*@__PURE__*/ core.$constructor("ZodKSUID", (inst, def) => {
234
- // ZodStringFormat.init(inst, def);
235
- core.$ZodKSUID.init(inst, def);
236
- ZodStringFormat.init(inst, def);
237
- });
238
- export function ksuid(params) {
239
- return core._ksuid(ZodKSUID, params);
240
- }
241
- export const ZodIPv4 = /*@__PURE__*/ core.$constructor("ZodIPv4", (inst, def) => {
242
- // ZodStringFormat.init(inst, def);
243
- core.$ZodIPv4.init(inst, def);
244
- ZodStringFormat.init(inst, def);
245
- });
246
- export function ipv4(params) {
247
- return core._ipv4(ZodIPv4, params);
248
- }
249
- export const ZodIPv6 = /*@__PURE__*/ core.$constructor("ZodIPv6", (inst, def) => {
250
- // ZodStringFormat.init(inst, def);
251
- core.$ZodIPv6.init(inst, def);
252
- ZodStringFormat.init(inst, def);
253
- });
254
- export function ipv6(params) {
255
- return core._ipv6(ZodIPv6, params);
256
- }
257
- export const ZodCIDRv4 = /*@__PURE__*/ core.$constructor("ZodCIDRv4", (inst, def) => {
258
- core.$ZodCIDRv4.init(inst, def);
259
- ZodStringFormat.init(inst, def);
260
- });
261
- export function cidrv4(params) {
262
- return core._cidrv4(ZodCIDRv4, params);
263
- }
264
- export const ZodCIDRv6 = /*@__PURE__*/ core.$constructor("ZodCIDRv6", (inst, def) => {
265
- core.$ZodCIDRv6.init(inst, def);
266
- ZodStringFormat.init(inst, def);
267
- });
268
- export function cidrv6(params) {
269
- return core._cidrv6(ZodCIDRv6, params);
270
- }
271
- export const ZodBase64 = /*@__PURE__*/ core.$constructor("ZodBase64", (inst, def) => {
272
- // ZodStringFormat.init(inst, def);
273
- core.$ZodBase64.init(inst, def);
274
- ZodStringFormat.init(inst, def);
275
- });
276
- export function base64(params) {
277
- return core._base64(ZodBase64, params);
278
- }
279
- export const ZodBase64URL = /*@__PURE__*/ core.$constructor("ZodBase64URL", (inst, def) => {
280
- // ZodStringFormat.init(inst, def);
281
- core.$ZodBase64URL.init(inst, def);
282
- ZodStringFormat.init(inst, def);
283
- });
284
- export function base64url(params) {
285
- return core._base64url(ZodBase64URL, params);
286
- }
287
- export const ZodE164 = /*@__PURE__*/ core.$constructor("ZodE164", (inst, def) => {
288
- // ZodStringFormat.init(inst, def);
289
- core.$ZodE164.init(inst, def);
290
- ZodStringFormat.init(inst, def);
291
- });
292
- export function e164(params) {
293
- return core._e164(ZodE164, params);
294
- }
295
- export const ZodJWT = /*@__PURE__*/ core.$constructor("ZodJWT", (inst, def) => {
296
- // ZodStringFormat.init(inst, def);
297
- core.$ZodJWT.init(inst, def);
298
- ZodStringFormat.init(inst, def);
299
- });
300
- export function jwt(params) {
301
- return core._jwt(ZodJWT, params);
302
- }
303
- export const ZodNumber = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def) => {
304
- core.$ZodNumber.init(inst, def);
305
- ZodType.init(inst, def);
306
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
307
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
308
- inst.min = (value, params) => inst.check(checks.gte(value, params));
309
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
310
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
311
- inst.max = (value, params) => inst.check(checks.lte(value, params));
312
- inst.int = (params) => inst.check(int(params));
313
- inst.safe = (params) => inst.check(int(params));
314
- inst.positive = (params) => inst.check(checks.gt(0, params));
315
- inst.nonnegative = (params) => inst.check(checks.gte(0, params));
316
- inst.negative = (params) => inst.check(checks.lt(0, params));
317
- inst.nonpositive = (params) => inst.check(checks.lte(0, params));
318
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
319
- inst.step = (value, params) => inst.check(checks.multipleOf(value, params));
320
- // inst.finite = (params) => inst.check(core.finite(params));
321
- inst.finite = () => inst;
322
- const bag = inst._zod.bag;
323
- inst.minValue =
324
- Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
325
- inst.maxValue =
326
- Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
327
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
328
- inst.isFinite = true;
329
- inst.format = bag.format ?? null;
330
- });
331
- export function number(params) {
332
- return core._number(ZodNumber, params);
333
- }
334
- export const ZodNumberFormat = /*@__PURE__*/ core.$constructor("ZodNumberFormat", (inst, def) => {
335
- core.$ZodNumberFormat.init(inst, def);
336
- ZodNumber.init(inst, def);
337
- });
338
- export function int(params) {
339
- return core._int(ZodNumberFormat, params);
340
- }
341
- export function float32(params) {
342
- return core._float32(ZodNumberFormat, params);
343
- }
344
- export function float64(params) {
345
- return core._float64(ZodNumberFormat, params);
346
- }
347
- export function int32(params) {
348
- return core._int32(ZodNumberFormat, params);
349
- }
350
- export function uint32(params) {
351
- return core._uint32(ZodNumberFormat, params);
352
- }
353
- export const ZodBoolean = /*@__PURE__*/ core.$constructor("ZodBoolean", (inst, def) => {
354
- core.$ZodBoolean.init(inst, def);
355
- ZodType.init(inst, def);
356
- });
357
- export function boolean(params) {
358
- return core._boolean(ZodBoolean, params);
359
- }
360
- export const ZodBigInt = /*@__PURE__*/ core.$constructor("ZodBigInt", (inst, def) => {
361
- core.$ZodBigInt.init(inst, def);
362
- ZodType.init(inst, def);
363
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
364
- inst.min = (value, params) => inst.check(checks.gte(value, params));
365
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
366
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
367
- inst.min = (value, params) => inst.check(checks.gte(value, params));
368
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
369
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
370
- inst.max = (value, params) => inst.check(checks.lte(value, params));
371
- inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));
372
- inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));
373
- inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));
374
- inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));
375
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
376
- const bag = inst._zod.bag;
377
- inst.minValue = bag.minimum ?? null;
378
- inst.maxValue = bag.maximum ?? null;
379
- inst.format = bag.format ?? null;
380
- });
381
- export function bigint(params) {
382
- return core._bigint(ZodBigInt, params);
383
- }
384
- export const ZodBigIntFormat = /*@__PURE__*/ core.$constructor("ZodBigIntFormat", (inst, def) => {
385
- core.$ZodBigIntFormat.init(inst, def);
386
- ZodBigInt.init(inst, def);
387
- });
388
- // int64
389
- export function int64(params) {
390
- return core._int64(ZodBigIntFormat, params);
391
- }
392
- // uint64
393
- export function uint64(params) {
394
- return core._uint64(ZodBigIntFormat, params);
395
- }
396
- export const ZodSymbol = /*@__PURE__*/ core.$constructor("ZodSymbol", (inst, def) => {
397
- core.$ZodSymbol.init(inst, def);
398
- ZodType.init(inst, def);
399
- });
400
- export function symbol(params) {
401
- return core._symbol(ZodSymbol, params);
402
- }
403
- export const ZodUndefined = /*@__PURE__*/ core.$constructor("ZodUndefined", (inst, def) => {
404
- core.$ZodUndefined.init(inst, def);
405
- ZodType.init(inst, def);
406
- });
407
- function _undefined(params) {
408
- return core._undefined(ZodUndefined, params);
409
- }
410
- export { _undefined as undefined };
411
- export const ZodNull = /*@__PURE__*/ core.$constructor("ZodNull", (inst, def) => {
412
- core.$ZodNull.init(inst, def);
413
- ZodType.init(inst, def);
414
- });
415
- function _null(params) {
416
- return core._null(ZodNull, params);
417
- }
418
- export { _null as null };
419
- export const ZodAny = /*@__PURE__*/ core.$constructor("ZodAny", (inst, def) => {
420
- core.$ZodAny.init(inst, def);
421
- ZodType.init(inst, def);
422
- });
423
- export function any() {
424
- return core._any(ZodAny);
425
- }
426
- export const ZodUnknown = /*@__PURE__*/ core.$constructor("ZodUnknown", (inst, def) => {
427
- core.$ZodUnknown.init(inst, def);
428
- ZodType.init(inst, def);
429
- });
430
- export function unknown() {
431
- return core._unknown(ZodUnknown);
432
- }
433
- export const ZodNever = /*@__PURE__*/ core.$constructor("ZodNever", (inst, def) => {
434
- core.$ZodNever.init(inst, def);
435
- ZodType.init(inst, def);
436
- });
437
- export function never(params) {
438
- return core._never(ZodNever, params);
439
- }
440
- export const ZodVoid = /*@__PURE__*/ core.$constructor("ZodVoid", (inst, def) => {
441
- core.$ZodVoid.init(inst, def);
442
- ZodType.init(inst, def);
443
- });
444
- function _void(params) {
445
- return core._void(ZodVoid, params);
446
- }
447
- export { _void as void };
448
- export const ZodDate = /*@__PURE__*/ core.$constructor("ZodDate", (inst, def) => {
449
- core.$ZodDate.init(inst, def);
450
- ZodType.init(inst, def);
451
- inst.min = (value, params) => inst.check(checks.gte(value, params));
452
- inst.max = (value, params) => inst.check(checks.lte(value, params));
453
- const c = inst._zod.bag;
454
- inst.minDate = c.minimum ? new Date(c.minimum) : null;
455
- inst.maxDate = c.maximum ? new Date(c.maximum) : null;
456
- });
457
- export function date(params) {
458
- return core._date(ZodDate, params);
459
- }
460
- export const ZodArray = /*@__PURE__*/ core.$constructor("ZodArray", (inst, def) => {
461
- core.$ZodArray.init(inst, def);
462
- ZodType.init(inst, def);
463
- inst.element = def.element;
464
- inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));
465
- inst.nonempty = (params) => inst.check(checks.minLength(1, params));
466
- inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));
467
- inst.length = (len, params) => inst.check(checks.length(len, params));
468
- inst.unwrap = () => inst.element;
469
- });
470
- export function array(element, params) {
471
- return core._array(ZodArray, element, params);
472
- }
473
- // .keyof
474
- export function keyof(schema) {
475
- const shape = schema._zod.def.shape;
476
- return literal(Object.keys(shape));
477
- }
478
- export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
479
- core.$ZodObject.init(inst, def);
480
- ZodType.init(inst, def);
481
- util.defineLazy(inst, "shape", () => def.shape);
482
- inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
483
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
484
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
485
- // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
486
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
487
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
488
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
489
- inst.extend = (incoming) => {
490
- return util.extend(inst, incoming);
491
- };
492
- inst.merge = (other) => util.merge(inst, other);
493
- inst.pick = (mask) => util.pick(inst, mask);
494
- inst.omit = (mask) => util.omit(inst, mask);
495
- inst.partial = (...args) => util.partial(ZodOptional, inst, args[0]);
496
- inst.required = (...args) => util.required(ZodNonOptional, inst, args[0]);
497
- });
498
- export function object(shape, params) {
499
- const def = {
500
- type: "object",
501
- get shape() {
502
- util.assignProp(this, "shape", { ...shape });
503
- return this.shape;
504
- },
505
- ...util.normalizeParams(params),
506
- };
507
- return new ZodObject(def);
508
- }
509
- // strictObject
510
- export function strictObject(shape, params) {
511
- return new ZodObject({
512
- type: "object",
513
- get shape() {
514
- util.assignProp(this, "shape", { ...shape });
515
- return this.shape;
516
- },
517
- catchall: never(),
518
- ...util.normalizeParams(params),
519
- });
520
- }
521
- // looseObject
522
- export function looseObject(shape, params) {
523
- return new ZodObject({
524
- type: "object",
525
- get shape() {
526
- util.assignProp(this, "shape", { ...shape });
527
- return this.shape;
528
- },
529
- catchall: unknown(),
530
- ...util.normalizeParams(params),
531
- });
532
- }
533
- export const ZodUnion = /*@__PURE__*/ core.$constructor("ZodUnion", (inst, def) => {
534
- core.$ZodUnion.init(inst, def);
535
- ZodType.init(inst, def);
536
- inst.options = def.options;
537
- });
538
- export function union(options, params) {
539
- return new ZodUnion({
540
- type: "union",
541
- options: options,
542
- ...util.normalizeParams(params),
543
- });
544
- }
545
- export const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor("ZodDiscriminatedUnion", (inst, def) => {
546
- ZodUnion.init(inst, def);
547
- core.$ZodDiscriminatedUnion.init(inst, def);
548
- });
549
- export function discriminatedUnion(discriminator, options, params) {
550
- // const [options, params] = args;
551
- return new ZodDiscriminatedUnion({
552
- type: "union",
553
- options,
554
- discriminator,
555
- ...util.normalizeParams(params),
556
- });
557
- }
558
- export const ZodIntersection = /*@__PURE__*/ core.$constructor("ZodIntersection", (inst, def) => {
559
- core.$ZodIntersection.init(inst, def);
560
- ZodType.init(inst, def);
561
- });
562
- export function intersection(left, right) {
563
- return new ZodIntersection({
564
- type: "intersection",
565
- left: left,
566
- right: right,
567
- });
568
- }
569
- export const ZodTuple = /*@__PURE__*/ core.$constructor("ZodTuple", (inst, def) => {
570
- core.$ZodTuple.init(inst, def);
571
- ZodType.init(inst, def);
572
- inst.rest = (rest) => inst.clone({
573
- ...inst._zod.def,
574
- rest: rest,
575
- });
576
- });
577
- export function tuple(items, _paramsOrRest, _params) {
578
- const hasRest = _paramsOrRest instanceof core.$ZodType;
579
- const params = hasRest ? _params : _paramsOrRest;
580
- const rest = hasRest ? _paramsOrRest : null;
581
- return new ZodTuple({
582
- type: "tuple",
583
- items: items,
584
- rest,
585
- ...util.normalizeParams(params),
586
- });
587
- }
588
- export const ZodRecord = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def) => {
589
- core.$ZodRecord.init(inst, def);
590
- ZodType.init(inst, def);
591
- inst.keyType = def.keyType;
592
- inst.valueType = def.valueType;
593
- });
594
- export function record(keyType, valueType, params) {
595
- return new ZodRecord({
596
- type: "record",
597
- keyType,
598
- valueType: valueType,
599
- ...util.normalizeParams(params),
600
- });
601
- }
602
- // type alksjf = core.output<core.$ZodRecordKey>;
603
- export function partialRecord(keyType, valueType, params) {
604
- return new ZodRecord({
605
- type: "record",
606
- keyType: union([keyType, never()]),
607
- valueType: valueType,
608
- ...util.normalizeParams(params),
609
- });
610
- }
611
- export const ZodMap = /*@__PURE__*/ core.$constructor("ZodMap", (inst, def) => {
612
- core.$ZodMap.init(inst, def);
613
- ZodType.init(inst, def);
614
- inst.keyType = def.keyType;
615
- inst.valueType = def.valueType;
616
- });
617
- export function map(keyType, valueType, params) {
618
- return new ZodMap({
619
- type: "map",
620
- keyType: keyType,
621
- valueType: valueType,
622
- ...util.normalizeParams(params),
623
- });
624
- }
625
- export const ZodSet = /*@__PURE__*/ core.$constructor("ZodSet", (inst, def) => {
626
- core.$ZodSet.init(inst, def);
627
- ZodType.init(inst, def);
628
- inst.min = (...args) => inst.check(core._minSize(...args));
629
- inst.nonempty = (params) => inst.check(core._minSize(1, params));
630
- inst.max = (...args) => inst.check(core._maxSize(...args));
631
- inst.size = (...args) => inst.check(core._size(...args));
632
- });
633
- export function set(valueType, params) {
634
- return new ZodSet({
635
- type: "set",
636
- valueType: valueType,
637
- ...util.normalizeParams(params),
638
- });
639
- }
640
- export const ZodEnum = /*@__PURE__*/ core.$constructor("ZodEnum", (inst, def) => {
641
- core.$ZodEnum.init(inst, def);
642
- ZodType.init(inst, def);
643
- inst.enum = def.entries;
644
- inst.options = Object.values(def.entries);
645
- const keys = new Set(Object.keys(def.entries));
646
- inst.extract = (values, params) => {
647
- const newEntries = {};
648
- for (const value of values) {
649
- if (keys.has(value)) {
650
- newEntries[value] = def.entries[value];
651
- }
652
- else
653
- throw new Error(`Key ${value} not found in enum`);
654
- }
655
- return new ZodEnum({
656
- ...def,
657
- checks: [],
658
- ...util.normalizeParams(params),
659
- entries: newEntries,
660
- });
661
- };
662
- inst.exclude = (values, params) => {
663
- const newEntries = { ...def.entries };
664
- for (const value of values) {
665
- if (keys.has(value)) {
666
- delete newEntries[value];
667
- }
668
- else
669
- throw new Error(`Key ${value} not found in enum`);
670
- }
671
- return new ZodEnum({
672
- ...def,
673
- checks: [],
674
- ...util.normalizeParams(params),
675
- entries: newEntries,
676
- });
677
- };
678
- });
679
- function _enum(values, params) {
680
- const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
681
- return new ZodEnum({
682
- type: "enum",
683
- entries,
684
- ...util.normalizeParams(params),
685
- });
686
- }
687
- export { _enum as enum };
688
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
689
- *
690
- * ```ts
691
- * enum Colors { red, green, blue }
692
- * z.enum(Colors);
693
- * ```
694
- */
695
- export function nativeEnum(entries, params) {
696
- return new ZodEnum({
697
- type: "enum",
698
- entries,
699
- ...util.normalizeParams(params),
700
- });
701
- }
702
- export const ZodLiteral = /*@__PURE__*/ core.$constructor("ZodLiteral", (inst, def) => {
703
- core.$ZodLiteral.init(inst, def);
704
- ZodType.init(inst, def);
705
- inst.values = new Set(def.values);
706
- Object.defineProperty(inst, "value", {
707
- get() {
708
- if (def.values.length > 1) {
709
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
710
- }
711
- return def.values[0];
712
- },
713
- });
714
- });
715
- export function literal(value, params) {
716
- return new ZodLiteral({
717
- type: "literal",
718
- values: Array.isArray(value) ? value : [value],
719
- ...util.normalizeParams(params),
720
- });
721
- }
722
- export const ZodFile = /*@__PURE__*/ core.$constructor("ZodFile", (inst, def) => {
723
- core.$ZodFile.init(inst, def);
724
- ZodType.init(inst, def);
725
- inst.min = (size, params) => inst.check(core._minSize(size, params));
726
- inst.max = (size, params) => inst.check(core._maxSize(size, params));
727
- inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));
728
- });
729
- export function file(params) {
730
- return core._file(ZodFile, params);
731
- }
732
- export const ZodTransform = /*@__PURE__*/ core.$constructor("ZodTransform", (inst, def) => {
733
- core.$ZodTransform.init(inst, def);
734
- ZodType.init(inst, def);
735
- inst._zod.parse = (payload, _ctx) => {
736
- payload.addIssue = (issue) => {
737
- if (typeof issue === "string") {
738
- payload.issues.push(util.issue(issue, payload.value, def));
739
- }
740
- else {
741
- // for Zod 3 backwards compatibility
742
- const _issue = issue;
743
- if (_issue.fatal)
744
- _issue.continue = false;
745
- _issue.code ?? (_issue.code = "custom");
746
- _issue.input ?? (_issue.input = payload.value);
747
- _issue.inst ?? (_issue.inst = inst);
748
- _issue.continue ?? (_issue.continue = true);
749
- payload.issues.push(util.issue(_issue));
750
- }
751
- };
752
- const output = def.transform(payload.value, payload);
753
- if (output instanceof Promise) {
754
- return output.then((output) => {
755
- payload.value = output;
756
- return payload;
757
- });
758
- }
759
- payload.value = output;
760
- return payload;
761
- };
762
- });
763
- export function transform(fn) {
764
- return new ZodTransform({
765
- type: "transform",
766
- transform: fn,
767
- });
768
- }
769
- export const ZodOptional = /*@__PURE__*/ core.$constructor("ZodOptional", (inst, def) => {
770
- core.$ZodOptional.init(inst, def);
771
- ZodType.init(inst, def);
772
- inst.unwrap = () => inst._zod.def.innerType;
773
- });
774
- export function optional(innerType) {
775
- return new ZodOptional({
776
- type: "optional",
777
- innerType: innerType,
778
- });
779
- }
780
- export const ZodNullable = /*@__PURE__*/ core.$constructor("ZodNullable", (inst, def) => {
781
- core.$ZodNullable.init(inst, def);
782
- ZodType.init(inst, def);
783
- inst.unwrap = () => inst._zod.def.innerType;
784
- });
785
- export function nullable(innerType) {
786
- return new ZodNullable({
787
- type: "nullable",
788
- innerType: innerType,
789
- });
790
- }
791
- // nullish
792
- export function nullish(innerType) {
793
- return optional(nullable(innerType));
794
- }
795
- export const ZodDefault = /*@__PURE__*/ core.$constructor("ZodDefault", (inst, def) => {
796
- core.$ZodDefault.init(inst, def);
797
- ZodType.init(inst, def);
798
- inst.unwrap = () => inst._zod.def.innerType;
799
- inst.removeDefault = inst.unwrap;
800
- });
801
- export function _default(innerType, defaultValue) {
802
- return new ZodDefault({
803
- type: "default",
804
- innerType: innerType,
805
- get defaultValue() {
806
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
807
- },
808
- });
809
- }
810
- export const ZodPrefault = /*@__PURE__*/ core.$constructor("ZodPrefault", (inst, def) => {
811
- core.$ZodPrefault.init(inst, def);
812
- ZodType.init(inst, def);
813
- inst.unwrap = () => inst._zod.def.innerType;
814
- });
815
- export function prefault(innerType, defaultValue) {
816
- return new ZodPrefault({
817
- type: "prefault",
818
- innerType: innerType,
819
- get defaultValue() {
820
- return typeof defaultValue === "function" ? defaultValue() : defaultValue;
821
- },
822
- });
823
- }
824
- export const ZodNonOptional = /*@__PURE__*/ core.$constructor("ZodNonOptional", (inst, def) => {
825
- core.$ZodNonOptional.init(inst, def);
826
- ZodType.init(inst, def);
827
- inst.unwrap = () => inst._zod.def.innerType;
828
- });
829
- export function nonoptional(innerType, params) {
830
- return new ZodNonOptional({
831
- type: "nonoptional",
832
- innerType: innerType,
833
- ...util.normalizeParams(params),
834
- });
835
- }
836
- export const ZodSuccess = /*@__PURE__*/ core.$constructor("ZodSuccess", (inst, def) => {
837
- core.$ZodSuccess.init(inst, def);
838
- ZodType.init(inst, def);
839
- inst.unwrap = () => inst._zod.def.innerType;
840
- });
841
- export function success(innerType) {
842
- return new ZodSuccess({
843
- type: "success",
844
- innerType: innerType,
845
- });
846
- }
847
- export const ZodCatch = /*@__PURE__*/ core.$constructor("ZodCatch", (inst, def) => {
848
- core.$ZodCatch.init(inst, def);
849
- ZodType.init(inst, def);
850
- inst.unwrap = () => inst._zod.def.innerType;
851
- inst.removeCatch = inst.unwrap;
852
- });
853
- function _catch(innerType, catchValue) {
854
- return new ZodCatch({
855
- type: "catch",
856
- innerType: innerType,
857
- catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue),
858
- });
859
- }
860
- export { _catch as catch };
861
- export const ZodNaN = /*@__PURE__*/ core.$constructor("ZodNaN", (inst, def) => {
862
- core.$ZodNaN.init(inst, def);
863
- ZodType.init(inst, def);
864
- });
865
- export function nan(params) {
866
- return core._nan(ZodNaN, params);
867
- }
868
- export const ZodPipe = /*@__PURE__*/ core.$constructor("ZodPipe", (inst, def) => {
869
- core.$ZodPipe.init(inst, def);
870
- ZodType.init(inst, def);
871
- inst.in = def.in;
872
- inst.out = def.out;
873
- });
874
- export function pipe(in_, out) {
875
- return new ZodPipe({
876
- type: "pipe",
877
- in: in_,
878
- out: out,
879
- // ...util.normalizeParams(params),
880
- });
881
- }
882
- export const ZodReadonly = /*@__PURE__*/ core.$constructor("ZodReadonly", (inst, def) => {
883
- core.$ZodReadonly.init(inst, def);
884
- ZodType.init(inst, def);
885
- });
886
- export function readonly(innerType) {
887
- return new ZodReadonly({
888
- type: "readonly",
889
- innerType: innerType,
890
- });
891
- }
892
- export const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("ZodTemplateLiteral", (inst, def) => {
893
- core.$ZodTemplateLiteral.init(inst, def);
894
- ZodType.init(inst, def);
895
- });
896
- export function templateLiteral(parts, params) {
897
- return new ZodTemplateLiteral({
898
- type: "template_literal",
899
- parts,
900
- ...util.normalizeParams(params),
901
- });
902
- }
903
- export const ZodLazy = /*@__PURE__*/ core.$constructor("ZodLazy", (inst, def) => {
904
- core.$ZodLazy.init(inst, def);
905
- ZodType.init(inst, def);
906
- inst.unwrap = () => inst._zod.def.getter();
907
- });
908
- export function lazy(getter) {
909
- return new ZodLazy({
910
- type: "lazy",
911
- getter: getter,
912
- });
913
- }
914
- export const ZodPromise = /*@__PURE__*/ core.$constructor("ZodPromise", (inst, def) => {
915
- core.$ZodPromise.init(inst, def);
916
- ZodType.init(inst, def);
917
- inst.unwrap = () => inst._zod.def.innerType;
918
- });
919
- export function promise(innerType) {
920
- return new ZodPromise({
921
- type: "promise",
922
- innerType: innerType,
923
- });
924
- }
925
- export const ZodCustom = /*@__PURE__*/ core.$constructor("ZodCustom", (inst, def) => {
926
- core.$ZodCustom.init(inst, def);
927
- ZodType.init(inst, def);
928
- });
929
- // custom checks
930
- export function check(fn, params) {
931
- const ch = new core.$ZodCheck({
932
- check: "custom",
933
- ...util.normalizeParams(params),
934
- });
935
- ch._zod.check = fn;
936
- return ch;
937
- }
938
- export function custom(fn, _params) {
939
- return core._custom(ZodCustom, fn ?? (() => true), _params);
940
- }
941
- export function refine(fn, _params = {}) {
942
- return core._refine(ZodCustom, fn, _params);
943
- }
944
- // superRefine
945
- export function superRefine(fn, params) {
946
- const ch = check((payload) => {
947
- payload.addIssue = (issue) => {
948
- if (typeof issue === "string") {
949
- payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
950
- }
951
- else {
952
- // for Zod 3 backwards compatibility
953
- const _issue = issue;
954
- if (_issue.fatal)
955
- _issue.continue = false;
956
- _issue.code ?? (_issue.code = "custom");
957
- _issue.input ?? (_issue.input = payload.value);
958
- _issue.inst ?? (_issue.inst = ch);
959
- _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
960
- payload.issues.push(util.issue(_issue));
961
- }
962
- };
963
- return fn(payload.value, payload);
964
- }, params);
965
- return ch;
966
- }
967
- function _instanceof(cls, params = {
968
- error: `Input not instance of ${cls.name}`,
969
- }) {
970
- const inst = new ZodCustom({
971
- type: "custom",
972
- check: "custom",
973
- fn: (data) => data instanceof cls,
974
- abort: true,
975
- ...util.normalizeParams(params),
976
- });
977
- inst._zod.bag.Class = cls;
978
- return inst;
979
- }
980
- export { _instanceof as instanceof };
981
- // stringbool
982
- export const stringbool = (...args) => core._stringbool({
983
- Pipe: ZodPipe,
984
- Boolean: ZodBoolean,
985
- String: ZodString,
986
- Transform: ZodTransform,
987
- }, ...args);
988
- export function json(params) {
989
- const jsonSchema = lazy(() => {
990
- return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);
991
- });
992
- return jsonSchema;
993
- }
994
- // preprocess
995
- // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
996
- export function preprocess(fn, schema) {
997
- return pipe(transform(fn), schema);
998
- }