aws-runtime-bridge 1.9.71 → 1.9.72

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 (990) hide show
  1. package/dist/routes/terminal.d.ts.map +1 -1
  2. package/dist/routes/terminal.js +41 -3
  3. package/dist/services/auto-register.d.ts +13 -0
  4. package/dist/services/auto-register.d.ts.map +1 -1
  5. package/dist/services/auto-register.js +36 -1
  6. package/dist/services/session-output.d.ts.map +1 -1
  7. package/dist/services/session-output.js +18 -3
  8. package/dist/services/tunnel-client.js +4 -0
  9. package/node_modules/zod/mini/index.cjs +17 -0
  10. package/node_modules/zod/mini/index.d.cts +1 -0
  11. package/node_modules/zod/mini/index.d.ts +1 -0
  12. package/node_modules/zod/mini/index.js +1 -0
  13. package/node_modules/zod/package.json +135 -0
  14. package/node_modules/zod/src/mini/index.ts +1 -0
  15. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  16. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  17. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  18. package/node_modules/zod/src/v4/classic/checks.ts +31 -0
  19. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  20. package/node_modules/zod/src/v4/classic/schemas.ts +2197 -0
  21. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  22. package/node_modules/zod/src/v4/classic/tests/codec.test.ts +562 -0
  23. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  24. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  25. package/node_modules/zod/src/v4/classic/tests/function.test.ts +308 -0
  26. package/node_modules/zod/src/v4/classic/tests/index.test.ts +844 -0
  27. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  28. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  29. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  30. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  31. package/node_modules/zod/src/v4/classic/tests/object.test.ts +609 -0
  32. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +136 -0
  33. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +340 -0
  34. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  35. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  36. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  37. package/node_modules/zod/src/v4/classic/tests/record.test.ts +356 -0
  38. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +582 -0
  39. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +605 -0
  40. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  41. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  42. package/node_modules/zod/src/v4/classic/tests/string.test.ts +1080 -0
  43. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +763 -0
  44. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2622 -0
  45. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  46. package/node_modules/zod/src/v4/classic/tests/union.test.ts +181 -0
  47. package/node_modules/zod/src/v4/core/api.ts +1621 -0
  48. package/node_modules/zod/src/v4/core/checks.ts +1287 -0
  49. package/node_modules/zod/src/v4/core/core.ts +115 -0
  50. package/node_modules/zod/src/v4/core/errors.ts +413 -0
  51. package/node_modules/zod/src/v4/core/index.ts +14 -0
  52. package/node_modules/zod/src/v4/core/regexes.ts +177 -0
  53. package/node_modules/zod/src/v4/core/registries.ts +97 -0
  54. package/node_modules/zod/src/v4/core/schemas.ts +4317 -0
  55. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  56. package/node_modules/zod/src/v4/core/tests/extend.test.ts +18 -0
  57. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  58. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  59. package/node_modules/zod/src/v4/core/to-json-schema.ts +1044 -0
  60. package/node_modules/zod/src/v4/core/util.ts +910 -0
  61. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  62. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  63. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  64. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  65. package/node_modules/zod/src/v4/locales/bg.ts +136 -0
  66. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  67. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  68. package/node_modules/zod/src/v4/locales/da.ts +141 -0
  69. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  70. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  71. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  72. package/node_modules/zod/src/v4/locales/es.ts +159 -0
  73. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  74. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  75. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  76. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  77. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  78. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  79. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  80. package/node_modules/zod/src/v4/locales/index.ts +47 -0
  81. package/node_modules/zod/src/v4/locales/is.ts +127 -0
  82. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  83. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  84. package/node_modules/zod/src/v4/locales/ka.ts +138 -0
  85. package/node_modules/zod/src/v4/locales/km.ts +126 -0
  86. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  87. package/node_modules/zod/src/v4/locales/lt.ts +265 -0
  88. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  89. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  90. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  91. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  92. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  93. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  94. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  95. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  96. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  97. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  98. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  99. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  100. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  101. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  102. package/node_modules/zod/src/v4/locales/uk.ts +126 -0
  103. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  104. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  105. package/node_modules/zod/src/v4/locales/yo.ts +131 -0
  106. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  107. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  108. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  109. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  110. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  111. package/node_modules/zod/src/v4/mini/schemas.ts +1725 -0
  112. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  113. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  114. package/node_modules/zod/src/v4/mini/tests/index.test.ts +899 -0
  115. package/node_modules/zod/src/v4/mini/tests/object.test.ts +200 -0
  116. package/node_modules/zod/src/v4/mini/tests/string.test.ts +315 -0
  117. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  118. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  119. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  120. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  121. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  122. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  123. package/node_modules/zod/v4/classic/checks.js +1 -0
  124. package/node_modules/zod/v4/classic/external.cjs +70 -0
  125. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  126. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  127. package/node_modules/zod/v4/classic/external.js +18 -0
  128. package/node_modules/zod/v4/classic/schemas.cjs +1151 -0
  129. package/node_modules/zod/v4/classic/schemas.d.cts +673 -0
  130. package/node_modules/zod/v4/classic/schemas.d.ts +673 -0
  131. package/node_modules/zod/v4/classic/schemas.js +1040 -0
  132. package/node_modules/zod/v4/core/api.cjs +1060 -0
  133. package/node_modules/zod/v4/core/api.d.cts +295 -0
  134. package/node_modules/zod/v4/core/api.d.ts +295 -0
  135. package/node_modules/zod/v4/core/api.js +925 -0
  136. package/node_modules/zod/v4/core/checks.cjs +595 -0
  137. package/node_modules/zod/v4/core/checks.js +569 -0
  138. package/node_modules/zod/v4/core/core.cjs +74 -0
  139. package/node_modules/zod/v4/core/core.d.cts +52 -0
  140. package/node_modules/zod/v4/core/core.d.ts +52 -0
  141. package/node_modules/zod/v4/core/core.js +67 -0
  142. package/node_modules/zod/v4/core/errors.d.cts +210 -0
  143. package/node_modules/zod/v4/core/errors.d.ts +210 -0
  144. package/node_modules/zod/v4/core/index.cjs +43 -0
  145. package/node_modules/zod/v4/core/index.d.cts +14 -0
  146. package/node_modules/zod/v4/core/index.d.ts +14 -0
  147. package/node_modules/zod/v4/core/index.js +14 -0
  148. package/node_modules/zod/v4/core/regexes.cjs +136 -0
  149. package/node_modules/zod/v4/core/regexes.d.cts +78 -0
  150. package/node_modules/zod/v4/core/regexes.d.ts +78 -0
  151. package/node_modules/zod/v4/core/regexes.js +127 -0
  152. package/node_modules/zod/v4/core/registries.cjs +57 -0
  153. package/node_modules/zod/v4/core/registries.js +52 -0
  154. package/node_modules/zod/v4/core/schemas.cjs +1986 -0
  155. package/node_modules/zod/v4/core/schemas.d.cts +1113 -0
  156. package/node_modules/zod/v4/core/schemas.d.ts +1113 -0
  157. package/node_modules/zod/v4/core/schemas.js +1955 -0
  158. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  159. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  160. package/node_modules/zod/v4/core/to-json-schema.cjs +920 -0
  161. package/node_modules/zod/v4/core/to-json-schema.d.cts +90 -0
  162. package/node_modules/zod/v4/core/to-json-schema.d.ts +90 -0
  163. package/node_modules/zod/v4/core/to-json-schema.js +915 -0
  164. package/node_modules/zod/v4/core/util.cjs +658 -0
  165. package/node_modules/zod/v4/core/util.d.cts +197 -0
  166. package/node_modules/zod/v4/core/util.d.ts +197 -0
  167. package/node_modules/zod/v4/core/util.js +601 -0
  168. package/node_modules/zod/v4/core/versions.cjs +8 -0
  169. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  170. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  171. package/node_modules/zod/v4/core/versions.js +5 -0
  172. package/node_modules/zod/v4/locales/ar.cjs +143 -0
  173. package/node_modules/zod/v4/locales/ar.js +116 -0
  174. package/node_modules/zod/v4/locales/az.cjs +142 -0
  175. package/node_modules/zod/v4/locales/az.js +115 -0
  176. package/node_modules/zod/v4/locales/be.cjs +191 -0
  177. package/node_modules/zod/v4/locales/be.js +164 -0
  178. package/node_modules/zod/v4/locales/bg.cjs +156 -0
  179. package/node_modules/zod/v4/locales/bg.d.cts +5 -0
  180. package/node_modules/zod/v4/locales/bg.d.ts +5 -0
  181. package/node_modules/zod/v4/locales/bg.js +128 -0
  182. package/node_modules/zod/v4/locales/ca.cjs +145 -0
  183. package/node_modules/zod/v4/locales/ca.js +118 -0
  184. package/node_modules/zod/v4/locales/cs.cjs +162 -0
  185. package/node_modules/zod/v4/locales/cs.js +135 -0
  186. package/node_modules/zod/v4/locales/da.cjs +158 -0
  187. package/node_modules/zod/v4/locales/da.js +131 -0
  188. package/node_modules/zod/v4/locales/de.cjs +143 -0
  189. package/node_modules/zod/v4/locales/de.js +116 -0
  190. package/node_modules/zod/v4/locales/en.cjs +145 -0
  191. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  192. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  193. package/node_modules/zod/v4/locales/en.js +117 -0
  194. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  195. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  196. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  197. package/node_modules/zod/v4/locales/eo.js +116 -0
  198. package/node_modules/zod/v4/locales/es.cjs +176 -0
  199. package/node_modules/zod/v4/locales/es.js +149 -0
  200. package/node_modules/zod/v4/locales/fa.cjs +149 -0
  201. package/node_modules/zod/v4/locales/fa.js +122 -0
  202. package/node_modules/zod/v4/locales/fi.cjs +149 -0
  203. package/node_modules/zod/v4/locales/fi.js +122 -0
  204. package/node_modules/zod/v4/locales/fr-CA.cjs +144 -0
  205. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  206. package/node_modules/zod/v4/locales/fr.cjs +143 -0
  207. package/node_modules/zod/v4/locales/fr.js +116 -0
  208. package/node_modules/zod/v4/locales/he.cjs +144 -0
  209. package/node_modules/zod/v4/locales/he.js +117 -0
  210. package/node_modules/zod/v4/locales/hu.cjs +144 -0
  211. package/node_modules/zod/v4/locales/hu.js +117 -0
  212. package/node_modules/zod/v4/locales/id.cjs +143 -0
  213. package/node_modules/zod/v4/locales/id.js +116 -0
  214. package/node_modules/zod/v4/locales/index.cjs +100 -0
  215. package/node_modules/zod/v4/locales/index.d.cts +47 -0
  216. package/node_modules/zod/v4/locales/index.d.ts +47 -0
  217. package/node_modules/zod/v4/locales/index.js +47 -0
  218. package/node_modules/zod/v4/locales/is.cjs +145 -0
  219. package/node_modules/zod/v4/locales/is.d.cts +5 -0
  220. package/node_modules/zod/v4/locales/is.d.ts +5 -0
  221. package/node_modules/zod/v4/locales/is.js +117 -0
  222. package/node_modules/zod/v4/locales/it.cjs +144 -0
  223. package/node_modules/zod/v4/locales/it.js +117 -0
  224. package/node_modules/zod/v4/locales/ja.cjs +142 -0
  225. package/node_modules/zod/v4/locales/ja.js +115 -0
  226. package/node_modules/zod/v4/locales/ka.cjs +153 -0
  227. package/node_modules/zod/v4/locales/ka.d.cts +5 -0
  228. package/node_modules/zod/v4/locales/ka.d.ts +5 -0
  229. package/node_modules/zod/v4/locales/ka.js +125 -0
  230. package/node_modules/zod/v4/locales/km.cjs +144 -0
  231. package/node_modules/zod/v4/locales/km.js +117 -0
  232. package/node_modules/zod/v4/locales/ko.cjs +148 -0
  233. package/node_modules/zod/v4/locales/ko.js +121 -0
  234. package/node_modules/zod/v4/locales/lt.cjs +258 -0
  235. package/node_modules/zod/v4/locales/lt.d.cts +5 -0
  236. package/node_modules/zod/v4/locales/lt.d.ts +5 -0
  237. package/node_modules/zod/v4/locales/lt.js +230 -0
  238. package/node_modules/zod/v4/locales/mk.cjs +145 -0
  239. package/node_modules/zod/v4/locales/mk.js +118 -0
  240. package/node_modules/zod/v4/locales/ms.cjs +143 -0
  241. package/node_modules/zod/v4/locales/ms.js +116 -0
  242. package/node_modules/zod/v4/locales/nl.cjs +144 -0
  243. package/node_modules/zod/v4/locales/nl.js +117 -0
  244. package/node_modules/zod/v4/locales/no.cjs +143 -0
  245. package/node_modules/zod/v4/locales/no.js +116 -0
  246. package/node_modules/zod/v4/locales/ota.cjs +144 -0
  247. package/node_modules/zod/v4/locales/ota.js +117 -0
  248. package/node_modules/zod/v4/locales/pl.cjs +144 -0
  249. package/node_modules/zod/v4/locales/pl.js +117 -0
  250. package/node_modules/zod/v4/locales/ps.cjs +149 -0
  251. package/node_modules/zod/v4/locales/ps.js +122 -0
  252. package/node_modules/zod/v4/locales/pt.cjs +143 -0
  253. package/node_modules/zod/v4/locales/pt.js +116 -0
  254. package/node_modules/zod/v4/locales/ru.cjs +191 -0
  255. package/node_modules/zod/v4/locales/ru.js +164 -0
  256. package/node_modules/zod/v4/locales/sl.cjs +144 -0
  257. package/node_modules/zod/v4/locales/sl.js +117 -0
  258. package/node_modules/zod/v4/locales/sv.cjs +145 -0
  259. package/node_modules/zod/v4/locales/sv.js +118 -0
  260. package/node_modules/zod/v4/locales/ta.cjs +144 -0
  261. package/node_modules/zod/v4/locales/ta.js +117 -0
  262. package/node_modules/zod/v4/locales/th.cjs +144 -0
  263. package/node_modules/zod/v4/locales/th.js +117 -0
  264. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  265. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  266. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  267. package/node_modules/zod/v4/locales/tr.js +115 -0
  268. package/node_modules/zod/v4/locales/uk.cjs +144 -0
  269. package/node_modules/zod/v4/locales/uk.js +117 -0
  270. package/node_modules/zod/v4/locales/ur.cjs +144 -0
  271. package/node_modules/zod/v4/locales/ur.js +117 -0
  272. package/node_modules/zod/v4/locales/vi.cjs +143 -0
  273. package/node_modules/zod/v4/locales/vi.js +116 -0
  274. package/node_modules/zod/v4/locales/yo.cjs +142 -0
  275. package/node_modules/zod/v4/locales/yo.js +115 -0
  276. package/node_modules/zod/v4/locales/zh-CN.cjs +143 -0
  277. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  278. package/node_modules/zod/v4/locales/zh-TW.cjs +144 -0
  279. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  280. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  281. package/node_modules/zod/v4/mini/coerce.js +17 -0
  282. package/node_modules/zod/v4/mini/external.cjs +62 -0
  283. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  284. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  285. package/node_modules/zod/v4/mini/external.js +13 -0
  286. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  287. package/node_modules/zod/v4/mini/iso.js +30 -0
  288. package/node_modules/zod/v4/mini/schemas.cjs +892 -0
  289. package/node_modules/zod/v4/mini/schemas.d.cts +407 -0
  290. package/node_modules/zod/v4/mini/schemas.d.ts +407 -0
  291. package/node_modules/zod/v4/mini/schemas.js +775 -0
  292. package/node_modules/zod/v4-mini/index.cjs +17 -0
  293. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  294. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  295. package/node_modules/zod/v4-mini/index.js +1 -0
  296. package/package.json +3 -1
  297. package/package/cc-switch-sdk/node_modules/zod/mini/index.cjs +0 -32
  298. package/package/cc-switch-sdk/node_modules/zod/mini/index.d.cts +0 -3
  299. package/package/cc-switch-sdk/node_modules/zod/mini/index.d.ts +0 -3
  300. package/package/cc-switch-sdk/node_modules/zod/mini/index.js +0 -3
  301. package/package/cc-switch-sdk/node_modules/zod/package.json +0 -135
  302. package/package/cc-switch-sdk/node_modules/zod/src/mini/index.ts +0 -3
  303. package/package/cc-switch-sdk/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
  304. package/package/cc-switch-sdk/node_modules/zod/src/v3/tests/function.test.ts +0 -261
  305. package/package/cc-switch-sdk/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
  306. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/checks.ts +0 -32
  307. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/external.ts +0 -51
  308. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -643
  309. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/schemas.ts +0 -2409
  310. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
  311. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
  312. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -562
  313. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
  314. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
  315. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
  316. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
  317. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -734
  318. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
  319. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
  320. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
  321. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
  322. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
  323. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
  324. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -640
  325. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -223
  326. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -427
  327. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
  328. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  329. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  330. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -632
  331. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -582
  332. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -570
  333. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
  334. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
  335. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1175
  336. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
  337. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
  338. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2990
  339. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -183
  340. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -219
  341. package/package/cc-switch-sdk/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
  342. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/api.ts +0 -1798
  343. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/checks.ts +0 -1293
  344. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/core.ts +0 -138
  345. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/errors.ts +0 -448
  346. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/index.ts +0 -16
  347. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
  348. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -667
  349. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/regexes.ts +0 -183
  350. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/registries.ts +0 -105
  351. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/schemas.ts +0 -4538
  352. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
  353. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
  354. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  355. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
  356. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
  357. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  358. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -83
  359. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -67
  360. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
  361. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/to-json-schema.ts +0 -613
  362. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/util.ts +0 -966
  363. package/package/cc-switch-sdk/node_modules/zod/src/v4/core/versions.ts +0 -5
  364. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ar.ts +0 -115
  365. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/az.ts +0 -111
  366. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/be.ts +0 -176
  367. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/bg.ts +0 -128
  368. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ca.ts +0 -116
  369. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/cs.ts +0 -118
  370. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/da.ts +0 -123
  371. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/de.ts +0 -116
  372. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/en.ts +0 -119
  373. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/eo.ts +0 -118
  374. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/es.ts +0 -141
  375. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/fa.ts +0 -126
  376. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/fi.ts +0 -121
  377. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
  378. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/fr.ts +0 -116
  379. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/he.ts +0 -246
  380. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/hu.ts +0 -117
  381. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/hy.ts +0 -164
  382. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/id.ts +0 -115
  383. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/index.ts +0 -49
  384. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/is.ts +0 -119
  385. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/it.ts +0 -116
  386. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ja.ts +0 -114
  387. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ka.ts +0 -123
  388. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/km.ts +0 -119
  389. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ko.ts +0 -121
  390. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/lt.ts +0 -239
  391. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/mk.ts +0 -118
  392. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ms.ts +0 -115
  393. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/nl.ts +0 -121
  394. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/no.ts +0 -116
  395. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ota.ts +0 -117
  396. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/pl.ts +0 -118
  397. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ps.ts +0 -126
  398. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/pt.ts +0 -116
  399. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ru.ts +0 -176
  400. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/sl.ts +0 -118
  401. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/sv.ts +0 -119
  402. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ta.ts +0 -118
  403. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/th.ts +0 -119
  404. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/tr.ts +0 -111
  405. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/uk.ts +0 -117
  406. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/ur.ts +0 -119
  407. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/uz.ts +0 -116
  408. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/vi.ts +0 -117
  409. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/yo.ts +0 -124
  410. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
  411. package/package/cc-switch-sdk/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
  412. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/coerce.ts +0 -27
  413. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/external.ts +0 -40
  414. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/iso.ts +0 -66
  415. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/schemas.ts +0 -1916
  416. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
  417. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
  418. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
  419. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -963
  420. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
  421. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
  422. package/package/cc-switch-sdk/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -347
  423. package/package/cc-switch-sdk/node_modules/zod/src/v4-mini/index.ts +0 -3
  424. package/package/cc-switch-sdk/node_modules/zod/v3/ZodError.d.cts +0 -164
  425. package/package/cc-switch-sdk/node_modules/zod/v3/ZodError.d.ts +0 -164
  426. package/package/cc-switch-sdk/node_modules/zod/v4/classic/checks.cjs +0 -33
  427. package/package/cc-switch-sdk/node_modules/zod/v4/classic/checks.d.cts +0 -1
  428. package/package/cc-switch-sdk/node_modules/zod/v4/classic/checks.d.ts +0 -1
  429. package/package/cc-switch-sdk/node_modules/zod/v4/classic/checks.js +0 -1
  430. package/package/cc-switch-sdk/node_modules/zod/v4/classic/external.cjs +0 -73
  431. package/package/cc-switch-sdk/node_modules/zod/v4/classic/external.d.cts +0 -15
  432. package/package/cc-switch-sdk/node_modules/zod/v4/classic/external.d.ts +0 -15
  433. package/package/cc-switch-sdk/node_modules/zod/v4/classic/external.js +0 -20
  434. package/package/cc-switch-sdk/node_modules/zod/v4/classic/from-json-schema.cjs +0 -610
  435. package/package/cc-switch-sdk/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
  436. package/package/cc-switch-sdk/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
  437. package/package/cc-switch-sdk/node_modules/zod/v4/classic/from-json-schema.js +0 -584
  438. package/package/cc-switch-sdk/node_modules/zod/v4/classic/schemas.cjs +0 -1272
  439. package/package/cc-switch-sdk/node_modules/zod/v4/classic/schemas.d.cts +0 -739
  440. package/package/cc-switch-sdk/node_modules/zod/v4/classic/schemas.d.ts +0 -739
  441. package/package/cc-switch-sdk/node_modules/zod/v4/classic/schemas.js +0 -1157
  442. package/package/cc-switch-sdk/node_modules/zod/v4/core/api.cjs +0 -1222
  443. package/package/cc-switch-sdk/node_modules/zod/v4/core/api.d.cts +0 -304
  444. package/package/cc-switch-sdk/node_modules/zod/v4/core/api.d.ts +0 -304
  445. package/package/cc-switch-sdk/node_modules/zod/v4/core/api.js +0 -1082
  446. package/package/cc-switch-sdk/node_modules/zod/v4/core/checks.cjs +0 -601
  447. package/package/cc-switch-sdk/node_modules/zod/v4/core/checks.js +0 -575
  448. package/package/cc-switch-sdk/node_modules/zod/v4/core/core.cjs +0 -83
  449. package/package/cc-switch-sdk/node_modules/zod/v4/core/core.d.cts +0 -70
  450. package/package/cc-switch-sdk/node_modules/zod/v4/core/core.d.ts +0 -70
  451. package/package/cc-switch-sdk/node_modules/zod/v4/core/core.js +0 -76
  452. package/package/cc-switch-sdk/node_modules/zod/v4/core/errors.d.cts +0 -220
  453. package/package/cc-switch-sdk/node_modules/zod/v4/core/errors.d.ts +0 -220
  454. package/package/cc-switch-sdk/node_modules/zod/v4/core/index.cjs +0 -47
  455. package/package/cc-switch-sdk/node_modules/zod/v4/core/index.d.cts +0 -16
  456. package/package/cc-switch-sdk/node_modules/zod/v4/core/index.d.ts +0 -16
  457. package/package/cc-switch-sdk/node_modules/zod/v4/core/index.js +0 -16
  458. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
  459. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
  460. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
  461. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-generator.js +0 -95
  462. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-processors.cjs +0 -648
  463. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
  464. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
  465. package/package/cc-switch-sdk/node_modules/zod/v4/core/json-schema-processors.js +0 -605
  466. package/package/cc-switch-sdk/node_modules/zod/v4/core/regexes.cjs +0 -166
  467. package/package/cc-switch-sdk/node_modules/zod/v4/core/regexes.d.cts +0 -79
  468. package/package/cc-switch-sdk/node_modules/zod/v4/core/regexes.d.ts +0 -79
  469. package/package/cc-switch-sdk/node_modules/zod/v4/core/regexes.js +0 -133
  470. package/package/cc-switch-sdk/node_modules/zod/v4/core/registries.cjs +0 -56
  471. package/package/cc-switch-sdk/node_modules/zod/v4/core/registries.js +0 -51
  472. package/package/cc-switch-sdk/node_modules/zod/v4/core/schemas.cjs +0 -2124
  473. package/package/cc-switch-sdk/node_modules/zod/v4/core/schemas.d.cts +0 -1146
  474. package/package/cc-switch-sdk/node_modules/zod/v4/core/schemas.d.ts +0 -1146
  475. package/package/cc-switch-sdk/node_modules/zod/v4/core/schemas.js +0 -2093
  476. package/package/cc-switch-sdk/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
  477. package/package/cc-switch-sdk/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
  478. package/package/cc-switch-sdk/node_modules/zod/v4/core/to-json-schema.cjs +0 -446
  479. package/package/cc-switch-sdk/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
  480. package/package/cc-switch-sdk/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
  481. package/package/cc-switch-sdk/node_modules/zod/v4/core/to-json-schema.js +0 -437
  482. package/package/cc-switch-sdk/node_modules/zod/v4/core/util.cjs +0 -710
  483. package/package/cc-switch-sdk/node_modules/zod/v4/core/util.d.cts +0 -199
  484. package/package/cc-switch-sdk/node_modules/zod/v4/core/util.d.ts +0 -199
  485. package/package/cc-switch-sdk/node_modules/zod/v4/core/util.js +0 -651
  486. package/package/cc-switch-sdk/node_modules/zod/v4/core/versions.cjs +0 -8
  487. package/package/cc-switch-sdk/node_modules/zod/v4/core/versions.d.cts +0 -5
  488. package/package/cc-switch-sdk/node_modules/zod/v4/core/versions.d.ts +0 -5
  489. package/package/cc-switch-sdk/node_modules/zod/v4/core/versions.js +0 -5
  490. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ar.cjs +0 -133
  491. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ar.js +0 -106
  492. package/package/cc-switch-sdk/node_modules/zod/v4/locales/az.cjs +0 -132
  493. package/package/cc-switch-sdk/node_modules/zod/v4/locales/az.js +0 -105
  494. package/package/cc-switch-sdk/node_modules/zod/v4/locales/be.cjs +0 -183
  495. package/package/cc-switch-sdk/node_modules/zod/v4/locales/be.js +0 -156
  496. package/package/cc-switch-sdk/node_modules/zod/v4/locales/bg.cjs +0 -147
  497. package/package/cc-switch-sdk/node_modules/zod/v4/locales/bg.d.cts +0 -5
  498. package/package/cc-switch-sdk/node_modules/zod/v4/locales/bg.d.ts +0 -4
  499. package/package/cc-switch-sdk/node_modules/zod/v4/locales/bg.js +0 -120
  500. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ca.cjs +0 -134
  501. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ca.js +0 -107
  502. package/package/cc-switch-sdk/node_modules/zod/v4/locales/cs.cjs +0 -138
  503. package/package/cc-switch-sdk/node_modules/zod/v4/locales/cs.js +0 -111
  504. package/package/cc-switch-sdk/node_modules/zod/v4/locales/da.cjs +0 -142
  505. package/package/cc-switch-sdk/node_modules/zod/v4/locales/da.js +0 -115
  506. package/package/cc-switch-sdk/node_modules/zod/v4/locales/de.cjs +0 -135
  507. package/package/cc-switch-sdk/node_modules/zod/v4/locales/de.js +0 -108
  508. package/package/cc-switch-sdk/node_modules/zod/v4/locales/en.cjs +0 -136
  509. package/package/cc-switch-sdk/node_modules/zod/v4/locales/en.d.cts +0 -5
  510. package/package/cc-switch-sdk/node_modules/zod/v4/locales/en.d.ts +0 -4
  511. package/package/cc-switch-sdk/node_modules/zod/v4/locales/en.js +0 -109
  512. package/package/cc-switch-sdk/node_modules/zod/v4/locales/eo.cjs +0 -136
  513. package/package/cc-switch-sdk/node_modules/zod/v4/locales/eo.d.cts +0 -5
  514. package/package/cc-switch-sdk/node_modules/zod/v4/locales/eo.d.ts +0 -4
  515. package/package/cc-switch-sdk/node_modules/zod/v4/locales/eo.js +0 -109
  516. package/package/cc-switch-sdk/node_modules/zod/v4/locales/es.cjs +0 -159
  517. package/package/cc-switch-sdk/node_modules/zod/v4/locales/es.js +0 -132
  518. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fa.cjs +0 -141
  519. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fa.js +0 -114
  520. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fi.cjs +0 -139
  521. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fi.js +0 -112
  522. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
  523. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fr-CA.js +0 -107
  524. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fr.cjs +0 -135
  525. package/package/cc-switch-sdk/node_modules/zod/v4/locales/fr.js +0 -108
  526. package/package/cc-switch-sdk/node_modules/zod/v4/locales/he.cjs +0 -241
  527. package/package/cc-switch-sdk/node_modules/zod/v4/locales/he.js +0 -214
  528. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hu.cjs +0 -135
  529. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hu.js +0 -108
  530. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hy.cjs +0 -174
  531. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hy.d.cts +0 -5
  532. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hy.d.ts +0 -4
  533. package/package/cc-switch-sdk/node_modules/zod/v4/locales/hy.js +0 -147
  534. package/package/cc-switch-sdk/node_modules/zod/v4/locales/id.cjs +0 -133
  535. package/package/cc-switch-sdk/node_modules/zod/v4/locales/id.js +0 -106
  536. package/package/cc-switch-sdk/node_modules/zod/v4/locales/index.cjs +0 -104
  537. package/package/cc-switch-sdk/node_modules/zod/v4/locales/index.d.cts +0 -49
  538. package/package/cc-switch-sdk/node_modules/zod/v4/locales/index.d.ts +0 -49
  539. package/package/cc-switch-sdk/node_modules/zod/v4/locales/index.js +0 -49
  540. package/package/cc-switch-sdk/node_modules/zod/v4/locales/is.cjs +0 -136
  541. package/package/cc-switch-sdk/node_modules/zod/v4/locales/is.d.cts +0 -5
  542. package/package/cc-switch-sdk/node_modules/zod/v4/locales/is.d.ts +0 -4
  543. package/package/cc-switch-sdk/node_modules/zod/v4/locales/is.js +0 -109
  544. package/package/cc-switch-sdk/node_modules/zod/v4/locales/it.cjs +0 -135
  545. package/package/cc-switch-sdk/node_modules/zod/v4/locales/it.js +0 -108
  546. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ja.cjs +0 -134
  547. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ja.js +0 -107
  548. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ka.cjs +0 -139
  549. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ka.d.cts +0 -5
  550. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ka.d.ts +0 -4
  551. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ka.js +0 -112
  552. package/package/cc-switch-sdk/node_modules/zod/v4/locales/km.cjs +0 -137
  553. package/package/cc-switch-sdk/node_modules/zod/v4/locales/km.js +0 -110
  554. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ko.cjs +0 -138
  555. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ko.js +0 -111
  556. package/package/cc-switch-sdk/node_modules/zod/v4/locales/lt.cjs +0 -230
  557. package/package/cc-switch-sdk/node_modules/zod/v4/locales/lt.d.cts +0 -5
  558. package/package/cc-switch-sdk/node_modules/zod/v4/locales/lt.d.ts +0 -4
  559. package/package/cc-switch-sdk/node_modules/zod/v4/locales/lt.js +0 -203
  560. package/package/cc-switch-sdk/node_modules/zod/v4/locales/mk.cjs +0 -136
  561. package/package/cc-switch-sdk/node_modules/zod/v4/locales/mk.js +0 -109
  562. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ms.cjs +0 -134
  563. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ms.js +0 -107
  564. package/package/cc-switch-sdk/node_modules/zod/v4/locales/nl.cjs +0 -137
  565. package/package/cc-switch-sdk/node_modules/zod/v4/locales/nl.js +0 -110
  566. package/package/cc-switch-sdk/node_modules/zod/v4/locales/no.cjs +0 -135
  567. package/package/cc-switch-sdk/node_modules/zod/v4/locales/no.js +0 -108
  568. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ota.cjs +0 -136
  569. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ota.js +0 -109
  570. package/package/cc-switch-sdk/node_modules/zod/v4/locales/pl.cjs +0 -136
  571. package/package/cc-switch-sdk/node_modules/zod/v4/locales/pl.js +0 -109
  572. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ps.cjs +0 -141
  573. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ps.js +0 -114
  574. package/package/cc-switch-sdk/node_modules/zod/v4/locales/pt.cjs +0 -135
  575. package/package/cc-switch-sdk/node_modules/zod/v4/locales/pt.js +0 -108
  576. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ru.cjs +0 -183
  577. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ru.js +0 -156
  578. package/package/cc-switch-sdk/node_modules/zod/v4/locales/sl.cjs +0 -136
  579. package/package/cc-switch-sdk/node_modules/zod/v4/locales/sl.js +0 -109
  580. package/package/cc-switch-sdk/node_modules/zod/v4/locales/sv.cjs +0 -137
  581. package/package/cc-switch-sdk/node_modules/zod/v4/locales/sv.js +0 -110
  582. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ta.cjs +0 -137
  583. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ta.js +0 -110
  584. package/package/cc-switch-sdk/node_modules/zod/v4/locales/th.cjs +0 -137
  585. package/package/cc-switch-sdk/node_modules/zod/v4/locales/th.js +0 -110
  586. package/package/cc-switch-sdk/node_modules/zod/v4/locales/tr.cjs +0 -132
  587. package/package/cc-switch-sdk/node_modules/zod/v4/locales/tr.d.cts +0 -5
  588. package/package/cc-switch-sdk/node_modules/zod/v4/locales/tr.d.ts +0 -4
  589. package/package/cc-switch-sdk/node_modules/zod/v4/locales/tr.js +0 -105
  590. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uk.cjs +0 -135
  591. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uk.js +0 -108
  592. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ur.cjs +0 -137
  593. package/package/cc-switch-sdk/node_modules/zod/v4/locales/ur.js +0 -110
  594. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uz.cjs +0 -136
  595. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uz.d.cts +0 -5
  596. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uz.d.ts +0 -4
  597. package/package/cc-switch-sdk/node_modules/zod/v4/locales/uz.js +0 -109
  598. package/package/cc-switch-sdk/node_modules/zod/v4/locales/vi.cjs +0 -135
  599. package/package/cc-switch-sdk/node_modules/zod/v4/locales/vi.js +0 -108
  600. package/package/cc-switch-sdk/node_modules/zod/v4/locales/yo.cjs +0 -134
  601. package/package/cc-switch-sdk/node_modules/zod/v4/locales/yo.js +0 -107
  602. package/package/cc-switch-sdk/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
  603. package/package/cc-switch-sdk/node_modules/zod/v4/locales/zh-CN.js +0 -109
  604. package/package/cc-switch-sdk/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
  605. package/package/cc-switch-sdk/node_modules/zod/v4/locales/zh-TW.js +0 -107
  606. package/package/cc-switch-sdk/node_modules/zod/v4/mini/coerce.cjs +0 -52
  607. package/package/cc-switch-sdk/node_modules/zod/v4/mini/coerce.js +0 -22
  608. package/package/cc-switch-sdk/node_modules/zod/v4/mini/external.cjs +0 -63
  609. package/package/cc-switch-sdk/node_modules/zod/v4/mini/external.d.cts +0 -12
  610. package/package/cc-switch-sdk/node_modules/zod/v4/mini/external.d.ts +0 -12
  611. package/package/cc-switch-sdk/node_modules/zod/v4/mini/external.js +0 -14
  612. package/package/cc-switch-sdk/node_modules/zod/v4/mini/iso.cjs +0 -64
  613. package/package/cc-switch-sdk/node_modules/zod/v4/mini/iso.js +0 -34
  614. package/package/cc-switch-sdk/node_modules/zod/v4/mini/schemas.cjs +0 -1046
  615. package/package/cc-switch-sdk/node_modules/zod/v4/mini/schemas.d.cts +0 -427
  616. package/package/cc-switch-sdk/node_modules/zod/v4/mini/schemas.d.ts +0 -427
  617. package/package/cc-switch-sdk/node_modules/zod/v4/mini/schemas.js +0 -925
  618. package/package/cc-switch-sdk/node_modules/zod/v4-mini/index.cjs +0 -32
  619. package/package/cc-switch-sdk/node_modules/zod/v4-mini/index.d.cts +0 -3
  620. package/package/cc-switch-sdk/node_modules/zod/v4-mini/index.d.ts +0 -3
  621. package/package/cc-switch-sdk/node_modules/zod/v4-mini/index.js +0 -3
  622. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/LICENSE +0 -0
  623. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/README.md +0 -0
  624. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/index.cjs +0 -0
  625. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/index.d.cts +0 -0
  626. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/index.d.ts +0 -0
  627. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/index.js +0 -0
  628. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/locales/index.cjs +0 -0
  629. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/locales/index.d.cts +0 -0
  630. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/locales/index.d.ts +0 -0
  631. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/locales/index.js +0 -0
  632. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/locales/package.json +0 -0
  633. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/mini/package.json +0 -0
  634. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/index.ts +0 -0
  635. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/locales/index.ts +0 -0
  636. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/ZodError.ts +0 -0
  637. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/datetime.ts +0 -0
  638. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -0
  639. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/index.ts +0 -0
  640. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/ipv4.ts +0 -0
  641. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/object.ts +0 -0
  642. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/primitives.ts +0 -0
  643. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/realworld.ts +0 -0
  644. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/string.ts +0 -0
  645. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/benchmarks/union.ts +0 -0
  646. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/errors.ts +0 -0
  647. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/external.ts +0 -0
  648. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/enumUtil.ts +0 -0
  649. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/errorUtil.ts +0 -0
  650. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/parseUtil.ts +0 -0
  651. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/partialUtil.ts +0 -0
  652. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/typeAliases.ts +0 -0
  653. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/helpers/util.ts +0 -0
  654. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/index.ts +0 -0
  655. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/locales/en.ts +0 -0
  656. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/standard-schema.ts +0 -0
  657. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/Mocker.ts +0 -0
  658. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/all-errors.test.ts +0 -0
  659. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/anyunknown.test.ts +0 -0
  660. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/array.test.ts +0 -0
  661. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/async-parsing.test.ts +0 -0
  662. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/async-refinements.test.ts +0 -0
  663. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/base.test.ts +0 -0
  664. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/bigint.test.ts +0 -0
  665. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/branded.test.ts +0 -0
  666. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/catch.test.ts +0 -0
  667. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/coerce.test.ts +0 -0
  668. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/custom.test.ts +0 -0
  669. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/date.test.ts +0 -0
  670. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/deepmasking.test.ts +0 -0
  671. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/default.test.ts +0 -0
  672. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/description.test.ts +0 -0
  673. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/discriminated-unions.test.ts +0 -0
  674. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/enum.test.ts +0 -0
  675. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/error.test.ts +0 -0
  676. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/firstparty.test.ts +0 -0
  677. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -0
  678. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/generics.test.ts +0 -0
  679. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/instanceof.test.ts +0 -0
  680. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/intersection.test.ts +0 -0
  681. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/language-server.source.ts +0 -0
  682. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/language-server.test.ts +0 -0
  683. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/literal.test.ts +0 -0
  684. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/map.test.ts +0 -0
  685. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/masking.test.ts +0 -0
  686. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/mocker.test.ts +0 -0
  687. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/nativeEnum.test.ts +0 -0
  688. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/nullable.test.ts +0 -0
  689. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/number.test.ts +0 -0
  690. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/object-augmentation.test.ts +0 -0
  691. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/object-in-es5-env.test.ts +0 -0
  692. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/object.test.ts +0 -0
  693. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/optional.test.ts +0 -0
  694. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/parseUtil.test.ts +0 -0
  695. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/parser.test.ts +0 -0
  696. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/partials.test.ts +0 -0
  697. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/pickomit.test.ts +0 -0
  698. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/pipeline.test.ts +0 -0
  699. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/preprocess.test.ts +0 -0
  700. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/primitive.test.ts +0 -0
  701. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/promise.test.ts +0 -0
  702. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/readonly.test.ts +0 -0
  703. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/record.test.ts +0 -0
  704. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/recursive.test.ts +0 -0
  705. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/refine.test.ts +0 -0
  706. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/safeparse.test.ts +0 -0
  707. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/set.test.ts +0 -0
  708. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/standard-schema.test.ts +0 -0
  709. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/string.test.ts +0 -0
  710. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/transformer.test.ts +0 -0
  711. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/tuple.test.ts +0 -0
  712. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/unions.test.ts +0 -0
  713. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/validations.test.ts +0 -0
  714. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/tests/void.test.ts +0 -0
  715. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v3/types.ts +0 -0
  716. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/coerce.ts +0 -0
  717. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/compat.ts +0 -0
  718. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/errors.ts +0 -0
  719. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/index.ts +0 -0
  720. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/iso.ts +0 -0
  721. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/parse.ts +0 -0
  722. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/anyunknown.test.ts +0 -0
  723. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/array.test.ts +0 -0
  724. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/assignability.test.ts +0 -0
  725. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/async-parsing.test.ts +0 -0
  726. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/async-refinements.test.ts +0 -0
  727. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/base.test.ts +0 -0
  728. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/bigint.test.ts +0 -0
  729. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/catch.test.ts +0 -0
  730. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/coalesce.test.ts +0 -0
  731. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/codec-examples.test.ts +0 -0
  732. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/coerce.test.ts +0 -0
  733. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/custom.test.ts +0 -0
  734. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/datetime.test.ts +0 -0
  735. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/default.test.ts +0 -0
  736. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/description.test.ts +0 -0
  737. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -0
  738. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/enum.test.ts +0 -0
  739. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/error-utils.test.ts +0 -0
  740. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/error.test.ts +0 -0
  741. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/file.test.ts +0 -0
  742. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/firstparty.test.ts +0 -0
  743. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/generics.test.ts +0 -0
  744. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/hash.test.ts +0 -0
  745. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/lazy.test.ts +0 -0
  746. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/literal.test.ts +0 -0
  747. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/nan.test.ts +0 -0
  748. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/nested-refine.test.ts +0 -0
  749. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/nonoptional.test.ts +0 -0
  750. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/nullable.test.ts +0 -0
  751. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/number.test.ts +0 -0
  752. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/pipe.test.ts +0 -0
  753. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/prefault.test.ts +0 -0
  754. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/preprocess.test.ts +0 -0
  755. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/primitive.test.ts +0 -0
  756. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/prototypes.test.ts +0 -0
  757. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/set.test.ts +0 -0
  758. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/string-formats.test.ts +0 -0
  759. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/stringbool.test.ts +0 -0
  760. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/transform.test.ts +0 -0
  761. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/validations.test.ts +0 -0
  762. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/classic/tests/void.test.ts +0 -0
  763. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/config.ts +0 -0
  764. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/doc.ts +0 -0
  765. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/json-schema.ts +0 -0
  766. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/parse.ts +0 -0
  767. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/tests/index.test.ts +0 -0
  768. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/tests/locales/be.test.ts +0 -0
  769. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/tests/locales/es.test.ts +0 -0
  770. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/tests/locales/ru.test.ts +0 -0
  771. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/core/zsf.ts +0 -0
  772. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/index.ts +0 -0
  773. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/locales/kh.ts +0 -0
  774. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/locales/ua.ts +0 -0
  775. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/checks.ts +0 -0
  776. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/index.ts +0 -0
  777. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/parse.ts +0 -0
  778. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/assignability.test.ts +0 -0
  779. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/checks.test.ts +0 -0
  780. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/codec.test.ts +0 -0
  781. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/computed.test.ts +0 -0
  782. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/error.test.ts +0 -0
  783. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/number.test.ts +0 -0
  784. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/prototypes.test.ts +0 -0
  785. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/src/v4/mini/tests/recursive-types.test.ts +0 -0
  786. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/ZodError.cjs +0 -0
  787. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/ZodError.js +0 -0
  788. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/errors.cjs +0 -0
  789. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/errors.d.cts +0 -0
  790. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/errors.d.ts +0 -0
  791. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/errors.js +0 -0
  792. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/external.cjs +0 -0
  793. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/external.d.cts +0 -0
  794. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/external.d.ts +0 -0
  795. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/external.js +0 -0
  796. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/enumUtil.cjs +0 -0
  797. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/enumUtil.d.cts +0 -0
  798. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/enumUtil.d.ts +0 -0
  799. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/enumUtil.js +0 -0
  800. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/errorUtil.cjs +0 -0
  801. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/errorUtil.d.cts +0 -0
  802. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/errorUtil.d.ts +0 -0
  803. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/errorUtil.js +0 -0
  804. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/parseUtil.cjs +0 -0
  805. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/parseUtil.d.cts +0 -0
  806. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/parseUtil.d.ts +0 -0
  807. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/parseUtil.js +0 -0
  808. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/partialUtil.cjs +0 -0
  809. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/partialUtil.d.cts +0 -0
  810. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/partialUtil.d.ts +0 -0
  811. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/partialUtil.js +0 -0
  812. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/typeAliases.cjs +0 -0
  813. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/typeAliases.d.cts +0 -0
  814. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/typeAliases.d.ts +0 -0
  815. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/typeAliases.js +0 -0
  816. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/util.cjs +0 -0
  817. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/util.d.cts +0 -0
  818. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/util.d.ts +0 -0
  819. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/helpers/util.js +0 -0
  820. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/index.cjs +0 -0
  821. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/index.d.cts +0 -0
  822. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/index.d.ts +0 -0
  823. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/index.js +0 -0
  824. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/locales/en.cjs +0 -0
  825. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/locales/en.d.cts +0 -0
  826. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/locales/en.d.ts +0 -0
  827. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/locales/en.js +0 -0
  828. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/package.json +0 -0
  829. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/standard-schema.cjs +0 -0
  830. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/standard-schema.d.cts +0 -0
  831. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/standard-schema.d.ts +0 -0
  832. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/standard-schema.js +0 -0
  833. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/types.cjs +0 -0
  834. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/types.d.cts +0 -0
  835. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/types.d.ts +0 -0
  836. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v3/types.js +0 -0
  837. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/coerce.cjs +0 -0
  838. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/coerce.d.cts +0 -0
  839. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/coerce.d.ts +0 -0
  840. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/coerce.js +0 -0
  841. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/compat.cjs +0 -0
  842. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/compat.d.cts +0 -0
  843. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/compat.d.ts +0 -0
  844. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/compat.js +0 -0
  845. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/errors.cjs +0 -0
  846. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/errors.d.cts +0 -0
  847. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/errors.d.ts +0 -0
  848. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/errors.js +0 -0
  849. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/index.cjs +0 -0
  850. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/index.d.cts +0 -0
  851. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/index.d.ts +0 -0
  852. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/index.js +0 -0
  853. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/iso.cjs +0 -0
  854. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/iso.d.cts +0 -0
  855. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/iso.d.ts +0 -0
  856. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/iso.js +0 -0
  857. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/package.json +0 -0
  858. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/parse.cjs +0 -0
  859. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/parse.d.cts +0 -0
  860. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/parse.d.ts +0 -0
  861. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/classic/parse.js +0 -0
  862. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/checks.d.cts +0 -0
  863. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/checks.d.ts +0 -0
  864. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/doc.cjs +0 -0
  865. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/doc.d.cts +0 -0
  866. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/doc.d.ts +0 -0
  867. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/doc.js +0 -0
  868. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/errors.cjs +0 -0
  869. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/errors.js +0 -0
  870. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/json-schema.cjs +0 -0
  871. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/json-schema.d.cts +0 -0
  872. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/json-schema.d.ts +0 -0
  873. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/json-schema.js +0 -0
  874. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/package.json +0 -0
  875. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/parse.cjs +0 -0
  876. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/parse.d.cts +0 -0
  877. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/parse.d.ts +0 -0
  878. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/parse.js +0 -0
  879. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/registries.d.cts +0 -0
  880. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/registries.d.ts +0 -0
  881. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/standard-schema.cjs +0 -0
  882. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/core/standard-schema.js +0 -0
  883. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/index.cjs +0 -0
  884. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/index.d.cts +0 -0
  885. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/index.d.ts +0 -0
  886. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/index.js +0 -0
  887. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ar.d.cts +0 -0
  888. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ar.d.ts +0 -0
  889. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/az.d.cts +0 -0
  890. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/az.d.ts +0 -0
  891. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/be.d.cts +0 -0
  892. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/be.d.ts +0 -0
  893. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ca.d.cts +0 -0
  894. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ca.d.ts +0 -0
  895. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/cs.d.cts +0 -0
  896. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/cs.d.ts +0 -0
  897. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/da.d.cts +0 -0
  898. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/da.d.ts +0 -0
  899. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/de.d.cts +0 -0
  900. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/de.d.ts +0 -0
  901. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/es.d.cts +0 -0
  902. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/es.d.ts +0 -0
  903. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fa.d.cts +0 -0
  904. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fa.d.ts +0 -0
  905. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fi.d.cts +0 -0
  906. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fi.d.ts +0 -0
  907. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fr-CA.d.cts +0 -0
  908. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fr-CA.d.ts +0 -0
  909. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fr.d.cts +0 -0
  910. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/fr.d.ts +0 -0
  911. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/he.d.cts +0 -0
  912. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/he.d.ts +0 -0
  913. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/hu.d.cts +0 -0
  914. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/hu.d.ts +0 -0
  915. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/id.d.cts +0 -0
  916. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/id.d.ts +0 -0
  917. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/it.d.cts +0 -0
  918. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/it.d.ts +0 -0
  919. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ja.d.cts +0 -0
  920. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ja.d.ts +0 -0
  921. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/kh.cjs +0 -0
  922. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/kh.d.cts +0 -0
  923. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/kh.d.ts +0 -0
  924. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/kh.js +0 -0
  925. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/km.d.cts +0 -0
  926. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/km.d.ts +0 -0
  927. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ko.d.cts +0 -0
  928. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ko.d.ts +0 -0
  929. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/mk.d.cts +0 -0
  930. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/mk.d.ts +0 -0
  931. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ms.d.cts +0 -0
  932. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ms.d.ts +0 -0
  933. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/nl.d.cts +0 -0
  934. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/nl.d.ts +0 -0
  935. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/no.d.cts +0 -0
  936. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/no.d.ts +0 -0
  937. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ota.d.cts +0 -0
  938. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ota.d.ts +0 -0
  939. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/package.json +0 -0
  940. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/pl.d.cts +0 -0
  941. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/pl.d.ts +0 -0
  942. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ps.d.cts +0 -0
  943. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ps.d.ts +0 -0
  944. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/pt.d.cts +0 -0
  945. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/pt.d.ts +0 -0
  946. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ru.d.cts +0 -0
  947. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ru.d.ts +0 -0
  948. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/sl.d.cts +0 -0
  949. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/sl.d.ts +0 -0
  950. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/sv.d.cts +0 -0
  951. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/sv.d.ts +0 -0
  952. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ta.d.cts +0 -0
  953. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ta.d.ts +0 -0
  954. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/th.d.cts +0 -0
  955. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/th.d.ts +0 -0
  956. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ua.cjs +0 -0
  957. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ua.d.cts +0 -0
  958. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ua.d.ts +0 -0
  959. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ua.js +0 -0
  960. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/uk.d.cts +0 -0
  961. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/uk.d.ts +0 -0
  962. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ur.d.cts +0 -0
  963. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/ur.d.ts +0 -0
  964. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/vi.d.cts +0 -0
  965. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/vi.d.ts +0 -0
  966. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/yo.d.cts +0 -0
  967. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/yo.d.ts +0 -0
  968. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/zh-CN.d.cts +0 -0
  969. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/zh-CN.d.ts +0 -0
  970. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/zh-TW.d.cts +0 -0
  971. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/locales/zh-TW.d.ts +0 -0
  972. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/checks.cjs +0 -0
  973. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/checks.d.cts +0 -0
  974. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/checks.d.ts +0 -0
  975. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/checks.js +0 -0
  976. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/coerce.d.cts +0 -0
  977. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/coerce.d.ts +0 -0
  978. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/index.cjs +0 -0
  979. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/index.d.cts +0 -0
  980. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/index.d.ts +0 -0
  981. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/index.js +0 -0
  982. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/iso.d.cts +0 -0
  983. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/iso.d.ts +0 -0
  984. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/package.json +0 -0
  985. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/parse.cjs +0 -0
  986. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/parse.d.cts +0 -0
  987. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/parse.d.ts +0 -0
  988. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/mini/parse.js +0 -0
  989. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4/package.json +0 -0
  990. /package/{package/cc-switch-sdk/node_modules → node_modules}/zod/v4-mini/package.json +0 -0
@@ -0,0 +1,2622 @@
1
+ import { Validator } from "@seriousme/openapi-schema-validator";
2
+ import { describe, expect, test } from "vitest";
3
+ import * as z from "zod/v4";
4
+ // import * as zCore from "zod/v4/core";
5
+
6
+ const openAPI30Validator = new Validator();
7
+ /** @see https://github.com/colinhacks/zod/issues/5147 */
8
+ const validateOpenAPI30Schema = async (zodJSONSchema: Record<string, unknown>): Promise<true> => {
9
+ const res = await openAPI30Validator.validate({
10
+ openapi: "3.0.0",
11
+ info: {
12
+ title: "SampleApi",
13
+ description: "Sample backend service",
14
+ version: "1.0.0",
15
+ },
16
+ components: { schemas: { test: zodJSONSchema } },
17
+ paths: {},
18
+ });
19
+
20
+ if (!res.valid) {
21
+ // `console.error` should make `vitest` trow an unhandled error
22
+ // printing the validation messages in consoles
23
+ console.error(
24
+ `OpenAPI schema is not valid against ${openAPI30Validator.version}`,
25
+ JSON.stringify(res.errors, null, 2)
26
+ );
27
+ }
28
+
29
+ return true;
30
+ };
31
+
32
+ describe("toJSONSchema", () => {
33
+ test("primitive types", () => {
34
+ expect(z.toJSONSchema(z.string())).toMatchInlineSnapshot(`
35
+ {
36
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
37
+ "type": "string",
38
+ }
39
+ `);
40
+ expect(z.toJSONSchema(z.number())).toMatchInlineSnapshot(`
41
+ {
42
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
43
+ "type": "number",
44
+ }
45
+ `);
46
+ expect(z.toJSONSchema(z.boolean())).toMatchInlineSnapshot(`
47
+ {
48
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
49
+ "type": "boolean",
50
+ }
51
+ `);
52
+ expect(z.toJSONSchema(z.null())).toMatchInlineSnapshot(`
53
+ {
54
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
55
+ "type": "null",
56
+ }
57
+ `);
58
+ expect(z.toJSONSchema(z.undefined(), { unrepresentable: "any" })).toMatchInlineSnapshot(`
59
+ {
60
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
61
+ }
62
+ `);
63
+ expect(z.toJSONSchema(z.any())).toMatchInlineSnapshot(`
64
+ {
65
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
66
+ }
67
+ `);
68
+ expect(z.toJSONSchema(z.unknown())).toMatchInlineSnapshot(`
69
+ {
70
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
71
+ }
72
+ `);
73
+ expect(z.toJSONSchema(z.never())).toMatchInlineSnapshot(`
74
+ {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "not": {},
77
+ }
78
+ `);
79
+ expect(z.toJSONSchema(z.email())).toMatchInlineSnapshot(`
80
+ {
81
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
82
+ "format": "email",
83
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
84
+ "type": "string",
85
+ }
86
+ `);
87
+ expect(z.toJSONSchema(z.iso.datetime())).toMatchInlineSnapshot(`
88
+ {
89
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
90
+ "format": "date-time",
91
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
92
+ "type": "string",
93
+ }
94
+ `);
95
+ expect(z.toJSONSchema(z.iso.date())).toMatchInlineSnapshot(`
96
+ {
97
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
98
+ "format": "date",
99
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
100
+ "type": "string",
101
+ }
102
+ `);
103
+ expect(z.toJSONSchema(z.iso.time())).toMatchInlineSnapshot(`
104
+ {
105
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
106
+ "format": "time",
107
+ "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$",
108
+ "type": "string",
109
+ }
110
+ `);
111
+ expect(z.toJSONSchema(z.iso.duration())).toMatchInlineSnapshot(`
112
+ {
113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
114
+ "format": "duration",
115
+ "pattern": "^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$",
116
+ "type": "string",
117
+ }
118
+ `);
119
+ expect(z.toJSONSchema(z.ipv4())).toMatchInlineSnapshot(`
120
+ {
121
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
122
+ "format": "ipv4",
123
+ "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$",
124
+ "type": "string",
125
+ }
126
+ `);
127
+ expect(z.toJSONSchema(z.ipv6())).toMatchInlineSnapshot(`
128
+ {
129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
130
+ "format": "ipv6",
131
+ "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$",
132
+ "type": "string",
133
+ }
134
+ `);
135
+ expect(z.toJSONSchema(z.uuid())).toMatchInlineSnapshot(`
136
+ {
137
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
138
+ "format": "uuid",
139
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
140
+ "type": "string",
141
+ }
142
+ `);
143
+ expect(z.toJSONSchema(z.guid())).toMatchInlineSnapshot(`
144
+ {
145
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
146
+ "format": "uuid",
147
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
148
+ "type": "string",
149
+ }
150
+ `);
151
+ expect(z.toJSONSchema(z.url())).toMatchInlineSnapshot(`
152
+ {
153
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
154
+ "format": "uri",
155
+ "type": "string",
156
+ }
157
+ `);
158
+ expect(z.toJSONSchema(z.base64())).toMatchInlineSnapshot(`
159
+ {
160
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
161
+ "contentEncoding": "base64",
162
+ "format": "base64",
163
+ "pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
164
+ "type": "string",
165
+ }
166
+ `);
167
+ expect(z.toJSONSchema(z.cuid())).toMatchInlineSnapshot(`
168
+ {
169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
170
+ "format": "cuid",
171
+ "pattern": "^[cC][^\\s-]{8,}$",
172
+ "type": "string",
173
+ }
174
+ `);
175
+ // expect(z.toJSONSchema(z.regex(/asdf/))).toMatchInlineSnapshot();
176
+ expect(z.toJSONSchema(z.emoji())).toMatchInlineSnapshot(`
177
+ {
178
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
179
+ "format": "emoji",
180
+ "pattern": "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
181
+ "type": "string",
182
+ }
183
+ `);
184
+ expect(z.toJSONSchema(z.nanoid())).toMatchInlineSnapshot(`
185
+ {
186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
187
+ "format": "nanoid",
188
+ "pattern": "^[a-zA-Z0-9_-]{21}$",
189
+ "type": "string",
190
+ }
191
+ `);
192
+ expect(z.toJSONSchema(z.cuid2())).toMatchInlineSnapshot(`
193
+ {
194
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
195
+ "format": "cuid2",
196
+ "pattern": "^[0-9a-z]+$",
197
+ "type": "string",
198
+ }
199
+ `);
200
+ expect(z.toJSONSchema(z.ulid())).toMatchInlineSnapshot(`
201
+ {
202
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
203
+ "format": "ulid",
204
+ "pattern": "^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$",
205
+ "type": "string",
206
+ }
207
+ `);
208
+ // expect(z.toJSONSchema(z.cidr())).toMatchInlineSnapshot();
209
+ expect(z.toJSONSchema(z.number())).toMatchInlineSnapshot(`
210
+ {
211
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
212
+ "type": "number",
213
+ }
214
+ `);
215
+ expect(z.toJSONSchema(z.int())).toMatchInlineSnapshot(`
216
+ {
217
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
218
+ "maximum": 9007199254740991,
219
+ "minimum": -9007199254740991,
220
+ "type": "integer",
221
+ }
222
+ `);
223
+ expect(z.toJSONSchema(z.int32())).toMatchInlineSnapshot(`
224
+ {
225
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
226
+ "maximum": 2147483647,
227
+ "minimum": -2147483648,
228
+ "type": "integer",
229
+ }
230
+ `);
231
+ expect(z.toJSONSchema(z.float32())).toMatchInlineSnapshot(`
232
+ {
233
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
234
+ "maximum": 3.4028234663852886e+38,
235
+ "minimum": -3.4028234663852886e+38,
236
+ "type": "number",
237
+ }
238
+ `);
239
+ expect(z.toJSONSchema(z.float64())).toMatchInlineSnapshot(`
240
+ {
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "maximum": 1.7976931348623157e+308,
243
+ "minimum": -1.7976931348623157e+308,
244
+ "type": "number",
245
+ }
246
+ `);
247
+ expect(z.toJSONSchema(z.jwt())).toMatchInlineSnapshot(`
248
+ {
249
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
250
+ "format": "jwt",
251
+ "type": "string",
252
+ }
253
+ `);
254
+ });
255
+
256
+ test("unsupported schema types", () => {
257
+ expect(() => z.toJSONSchema(z.bigint())).toThrow("BigInt cannot be represented in JSON Schema");
258
+ expect(() => z.toJSONSchema(z.int64())).toThrow("BigInt cannot be represented in JSON Schema");
259
+ expect(() => z.toJSONSchema(z.symbol())).toThrow("Symbols cannot be represented in JSON Schema");
260
+ expect(() => z.toJSONSchema(z.void())).toThrow("Void cannot be represented in JSON Schema");
261
+ expect(() => z.toJSONSchema(z.undefined())).toThrow("Undefined cannot be represented in JSON Schema");
262
+ expect(() => z.toJSONSchema(z.date())).toThrow("Date cannot be represented in JSON Schema");
263
+ expect(() => z.toJSONSchema(z.map(z.string(), z.number()))).toThrow("Map cannot be represented in JSON Schema");
264
+ expect(() => z.toJSONSchema(z.set(z.string()))).toThrow("Set cannot be represented in JSON Schema");
265
+ expect(() => z.toJSONSchema(z.custom(() => true))).toThrow("Custom types cannot be represented in JSON Schema");
266
+
267
+ // Transform
268
+ const transformSchema = z.string().transform((val) => Number.parseInt(val));
269
+ expect(() => z.toJSONSchema(transformSchema)).toThrow("Transforms cannot be represented in JSON Schema");
270
+
271
+ // Static catch values
272
+ const staticCatchSchema = z.string().catch(() => "sup");
273
+ expect(z.toJSONSchema(staticCatchSchema)).toMatchInlineSnapshot(`
274
+ {
275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
276
+ "default": "sup",
277
+ "type": "string",
278
+ }
279
+ `);
280
+
281
+ // Dynamic catch values
282
+ const dynamicCatchSchema = z.string().catch((ctx) => `${ctx.issues.length}`);
283
+ expect(() => z.toJSONSchema(dynamicCatchSchema)).toThrow("Dynamic catch values are not supported in JSON Schema");
284
+ });
285
+
286
+ test("string formats", () => {
287
+ expect(z.toJSONSchema(z.string().email())).toMatchInlineSnapshot(`
288
+ {
289
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
290
+ "format": "email",
291
+ "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$",
292
+ "type": "string",
293
+ }
294
+ `);
295
+ expect(z.toJSONSchema(z.string().uuid())).toMatchInlineSnapshot(`
296
+ {
297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
298
+ "format": "uuid",
299
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
300
+ "type": "string",
301
+ }
302
+ `);
303
+ expect(z.toJSONSchema(z.iso.datetime())).toMatchInlineSnapshot(`
304
+ {
305
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
306
+ "format": "date-time",
307
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
308
+ "type": "string",
309
+ }
310
+ `);
311
+
312
+ expect(z.toJSONSchema(z.iso.date())).toMatchInlineSnapshot(`
313
+ {
314
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
315
+ "format": "date",
316
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
317
+ "type": "string",
318
+ }
319
+ `);
320
+ expect(z.toJSONSchema(z.iso.time())).toMatchInlineSnapshot(`
321
+ {
322
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
323
+ "format": "time",
324
+ "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$",
325
+ "type": "string",
326
+ }
327
+ `);
328
+ expect(z.toJSONSchema(z.iso.duration())).toMatchInlineSnapshot(`
329
+ {
330
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
331
+ "format": "duration",
332
+ "pattern": "^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$",
333
+ "type": "string",
334
+ }
335
+ `);
336
+ // expect(z.toJSONSchema(z.string().ip())).toMatchInlineSnapshot(`
337
+ // {
338
+ // "pattern": /\\(\\^\\(\\?:\\(\\?:25\\[0-5\\]\\|2\\[0-4\\]\\[0-9\\]\\|1\\[0-9\\]\\[0-9\\]\\|\\[1-9\\]\\[0-9\\]\\|\\[0-9\\]\\)\\\\\\.\\)\\{3\\}\\(\\?:25\\[0-5\\]\\|2\\[0-4\\]\\[0-9\\]\\|1\\[0-9\\]\\[0-9\\]\\|\\[1-9\\]\\[0-9\\]\\|\\[0-9\\]\\)\\$\\)\\|\\(\\^\\(\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{7\\}\\|::\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,6\\}\\|\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{1\\}:\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,5\\}\\|\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{2\\}:\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,4\\}\\|\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{3\\}:\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,3\\}\\|\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{4\\}:\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,2\\}\\|\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{5\\}:\\(\\[a-fA-F0-9\\]\\{1,4\\}:\\)\\{0,1\\}\\)\\(\\[a-fA-F0-9\\]\\{1,4\\}\\|\\(\\(\\(25\\[0-5\\]\\)\\|\\(2\\[0-4\\]\\[0-9\\]\\)\\|\\(1\\[0-9\\]\\{2\\}\\)\\|\\(\\[0-9\\]\\{1,2\\}\\)\\)\\\\\\.\\)\\{3\\}\\(\\(25\\[0-5\\]\\)\\|\\(2\\[0-4\\]\\[0-9\\]\\)\\|\\(1\\[0-9\\]\\{2\\}\\)\\|\\(\\[0-9\\]\\{1,2\\}\\)\\)\\)\\$\\)/,
339
+ // "type": "string",
340
+ // }
341
+ // `);
342
+ expect(z.toJSONSchema(z.ipv4())).toMatchInlineSnapshot(`
343
+ {
344
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
345
+ "format": "ipv4",
346
+ "pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$",
347
+ "type": "string",
348
+ }
349
+ `);
350
+
351
+ expect(z.toJSONSchema(z.ipv6())).toMatchInlineSnapshot(`
352
+ {
353
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
354
+ "format": "ipv6",
355
+ "pattern": "^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$",
356
+ "type": "string",
357
+ }
358
+ `);
359
+
360
+ expect(z.toJSONSchema(z.base64())).toMatchInlineSnapshot(`
361
+ {
362
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
363
+ "contentEncoding": "base64",
364
+ "format": "base64",
365
+ "pattern": "^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$",
366
+ "type": "string",
367
+ }
368
+ `);
369
+ expect(z.toJSONSchema(z.url())).toMatchInlineSnapshot(`
370
+ {
371
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
372
+ "format": "uri",
373
+ "type": "string",
374
+ }
375
+ `);
376
+ expect(z.toJSONSchema(z.guid())).toMatchInlineSnapshot(`
377
+ {
378
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
379
+ "format": "uuid",
380
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$",
381
+ "type": "string",
382
+ }
383
+ `);
384
+ expect(z.toJSONSchema(z.string().regex(/asdf/))).toMatchInlineSnapshot(`
385
+ {
386
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
387
+ "pattern": "asdf",
388
+ "type": "string",
389
+ }
390
+ `);
391
+ });
392
+
393
+ test("string patterns", () => {
394
+ expect(
395
+ z.toJSONSchema(
396
+ z
397
+ .string()
398
+ .startsWith("hello")
399
+ .includes("cruel")
400
+ .includes("dark", { position: 10 })
401
+ .endsWith("world")
402
+ .regex(/stuff/)
403
+ )
404
+ ).toMatchInlineSnapshot(`
405
+ {
406
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
407
+ "allOf": [
408
+ {
409
+ "pattern": "^hello.*",
410
+ },
411
+ {
412
+ "pattern": "cruel",
413
+ },
414
+ {
415
+ "pattern": "^.{10}dark",
416
+ },
417
+ {
418
+ "pattern": ".*world$",
419
+ },
420
+ {
421
+ "pattern": "stuff",
422
+ },
423
+ ],
424
+ "type": "string",
425
+ }
426
+ `);
427
+
428
+ expect(
429
+ z.toJSONSchema(
430
+ z
431
+ .string()
432
+ .startsWith("hello")
433
+ .includes("cruel")
434
+ .includes("dark", { position: 10 })
435
+ .endsWith("world")
436
+ .regex(/stuff/),
437
+ {
438
+ target: "draft-7",
439
+ }
440
+ )
441
+ ).toMatchInlineSnapshot(`
442
+ {
443
+ "$schema": "http://json-schema.org/draft-07/schema#",
444
+ "allOf": [
445
+ {
446
+ "pattern": "^hello.*",
447
+ "type": "string",
448
+ },
449
+ {
450
+ "pattern": "cruel",
451
+ "type": "string",
452
+ },
453
+ {
454
+ "pattern": "^.{10}dark",
455
+ "type": "string",
456
+ },
457
+ {
458
+ "pattern": ".*world$",
459
+ "type": "string",
460
+ },
461
+ {
462
+ "pattern": "stuff",
463
+ "type": "string",
464
+ },
465
+ ],
466
+ "type": "string",
467
+ }
468
+ `);
469
+ });
470
+
471
+ test("number constraints", () => {
472
+ expect(z.toJSONSchema(z.number().min(5).max(10))).toMatchInlineSnapshot(
473
+ `
474
+ {
475
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
476
+ "maximum": 10,
477
+ "minimum": 5,
478
+ "type": "number",
479
+ }
480
+ `
481
+ );
482
+
483
+ expect(z.toJSONSchema(z.number().gt(5).gt(10))).toMatchInlineSnapshot(`
484
+ {
485
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
486
+ "exclusiveMinimum": 10,
487
+ "type": "number",
488
+ }
489
+ `);
490
+
491
+ expect(z.toJSONSchema(z.number().gt(5).gte(10))).toMatchInlineSnapshot(`
492
+ {
493
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
494
+ "minimum": 10,
495
+ "type": "number",
496
+ }
497
+ `);
498
+
499
+ expect(z.toJSONSchema(z.number().lt(5).lt(3))).toMatchInlineSnapshot(`
500
+ {
501
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
502
+ "exclusiveMaximum": 3,
503
+ "type": "number",
504
+ }
505
+ `);
506
+
507
+ expect(z.toJSONSchema(z.number().lt(5).lt(3).lte(2))).toMatchInlineSnapshot(`
508
+ {
509
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
510
+ "maximum": 2,
511
+ "type": "number",
512
+ }
513
+ `);
514
+
515
+ expect(z.toJSONSchema(z.number().lt(5).lte(3))).toMatchInlineSnapshot(`
516
+ {
517
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
518
+ "maximum": 3,
519
+ "type": "number",
520
+ }
521
+ `);
522
+
523
+ expect(z.toJSONSchema(z.number().gt(5).lt(10))).toMatchInlineSnapshot(`
524
+ {
525
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
526
+ "exclusiveMaximum": 10,
527
+ "exclusiveMinimum": 5,
528
+ "type": "number",
529
+ }
530
+ `);
531
+ expect(z.toJSONSchema(z.number().gte(5).lte(10))).toMatchInlineSnapshot(`
532
+ {
533
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
534
+ "maximum": 10,
535
+ "minimum": 5,
536
+ "type": "number",
537
+ }
538
+ `);
539
+ expect(z.toJSONSchema(z.number().positive())).toMatchInlineSnapshot(`
540
+ {
541
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
542
+ "exclusiveMinimum": 0,
543
+ "type": "number",
544
+ }
545
+ `);
546
+ expect(z.toJSONSchema(z.number().negative())).toMatchInlineSnapshot(`
547
+ {
548
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
549
+ "exclusiveMaximum": 0,
550
+ "type": "number",
551
+ }
552
+ `);
553
+ expect(z.toJSONSchema(z.number().nonpositive())).toMatchInlineSnapshot(`
554
+ {
555
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
556
+ "maximum": 0,
557
+ "type": "number",
558
+ }
559
+ `);
560
+ expect(z.toJSONSchema(z.number().nonnegative())).toMatchInlineSnapshot(`
561
+ {
562
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
563
+ "minimum": 0,
564
+ "type": "number",
565
+ }
566
+ `);
567
+ });
568
+
569
+ test("number constraints draft-4", () => {
570
+ expect(z.toJSONSchema(z.number().gt(5).lt(10), { target: "draft-4" })).toMatchInlineSnapshot(`
571
+ {
572
+ "$schema": "http://json-schema.org/draft-04/schema#",
573
+ "exclusiveMaximum": true,
574
+ "exclusiveMinimum": true,
575
+ "maximum": 10,
576
+ "minimum": 5,
577
+ "type": "number",
578
+ }
579
+ `);
580
+ });
581
+
582
+ test("nullable openapi-3.0", () => {
583
+ const schema = z.string().nullable();
584
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
585
+ validateOpenAPI30Schema(jsonSchema);
586
+ expect(jsonSchema).toMatchInlineSnapshot(`
587
+ {
588
+ "nullable": true,
589
+ "type": "string",
590
+ }
591
+ `);
592
+ });
593
+
594
+ test("union with null openapi-3.0", () => {
595
+ const schema = z.union([z.string(), z.null()]);
596
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
597
+ validateOpenAPI30Schema(jsonSchema);
598
+ expect(jsonSchema).toMatchInlineSnapshot(`
599
+ {
600
+ "anyOf": [
601
+ {
602
+ "type": "string",
603
+ },
604
+ {
605
+ "enum": [
606
+ null,
607
+ ],
608
+ "nullable": true,
609
+ "type": "string",
610
+ },
611
+ ],
612
+ }
613
+ `);
614
+ });
615
+
616
+ test("number with exclusive min-max openapi-3.0", () => {
617
+ const schema = z.number().lt(100).gt(1);
618
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
619
+ validateOpenAPI30Schema(jsonSchema);
620
+ expect(jsonSchema).toMatchInlineSnapshot(`
621
+ {
622
+ "exclusiveMaximum": true,
623
+ "exclusiveMinimum": true,
624
+ "maximum": 100,
625
+ "minimum": 1,
626
+ "type": "number",
627
+ }
628
+ `);
629
+ });
630
+
631
+ test("arrays", () => {
632
+ expect(z.toJSONSchema(z.array(z.string()))).toMatchInlineSnapshot(`
633
+ {
634
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
635
+ "items": {
636
+ "type": "string",
637
+ },
638
+ "type": "array",
639
+ }
640
+ `);
641
+ });
642
+
643
+ test("unions", () => {
644
+ const schema = z.union([z.string(), z.number()]);
645
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
646
+ {
647
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
648
+ "anyOf": [
649
+ {
650
+ "type": "string",
651
+ },
652
+ {
653
+ "type": "number",
654
+ },
655
+ ],
656
+ }
657
+ `);
658
+ });
659
+
660
+ test("intersections", () => {
661
+ const schema = z.intersection(z.object({ name: z.string() }), z.object({ age: z.number() }));
662
+
663
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
664
+ {
665
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
666
+ "allOf": [
667
+ {
668
+ "additionalProperties": false,
669
+ "properties": {
670
+ "name": {
671
+ "type": "string",
672
+ },
673
+ },
674
+ "required": [
675
+ "name",
676
+ ],
677
+ "type": "object",
678
+ },
679
+ {
680
+ "additionalProperties": false,
681
+ "properties": {
682
+ "age": {
683
+ "type": "number",
684
+ },
685
+ },
686
+ "required": [
687
+ "age",
688
+ ],
689
+ "type": "object",
690
+ },
691
+ ],
692
+ }
693
+ `);
694
+ });
695
+
696
+ test("record", () => {
697
+ const schema = z.record(z.string(), z.boolean());
698
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
699
+ {
700
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
701
+ "additionalProperties": {
702
+ "type": "boolean",
703
+ },
704
+ "propertyNames": {
705
+ "type": "string",
706
+ },
707
+ "type": "object",
708
+ }
709
+ `);
710
+ });
711
+
712
+ test("record openapi-3.0", () => {
713
+ const schema = z.record(z.string(), z.boolean());
714
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
715
+ validateOpenAPI30Schema(jsonSchema);
716
+ expect(jsonSchema).toMatchInlineSnapshot(`
717
+ {
718
+ "additionalProperties": {
719
+ "type": "boolean",
720
+ },
721
+ "type": "object",
722
+ }
723
+ `);
724
+ });
725
+
726
+ test("tuple", () => {
727
+ const schema = z.tuple([z.string(), z.number()]);
728
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
729
+ {
730
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
731
+ "prefixItems": [
732
+ {
733
+ "type": "string",
734
+ },
735
+ {
736
+ "type": "number",
737
+ },
738
+ ],
739
+ "type": "array",
740
+ }
741
+ `);
742
+ });
743
+
744
+ test("tuple with rest", () => {
745
+ const schema = z.tuple([z.string(), z.number()]).rest(z.boolean());
746
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
747
+ {
748
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
749
+ "items": {
750
+ "type": "boolean",
751
+ },
752
+ "prefixItems": [
753
+ {
754
+ "type": "string",
755
+ },
756
+ {
757
+ "type": "number",
758
+ },
759
+ ],
760
+ "type": "array",
761
+ }
762
+ `);
763
+ });
764
+
765
+ test("tuple openapi-3.0", () => {
766
+ const schema = z.tuple([z.string(), z.number()]);
767
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
768
+ validateOpenAPI30Schema(jsonSchema);
769
+ expect(jsonSchema).toMatchInlineSnapshot(`
770
+ {
771
+ "items": {
772
+ "anyOf": [
773
+ {
774
+ "type": "string",
775
+ },
776
+ {
777
+ "type": "number",
778
+ },
779
+ ],
780
+ },
781
+ "maxItems": 2,
782
+ "minItems": 2,
783
+ "type": "array",
784
+ }
785
+ `);
786
+ });
787
+
788
+ test("tuple with rest openapi-3.0", () => {
789
+ const schema = z.tuple([z.string(), z.number()]).rest(z.boolean());
790
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
791
+ validateOpenAPI30Schema(jsonSchema);
792
+ expect(jsonSchema).toMatchInlineSnapshot(`
793
+ {
794
+ "items": {
795
+ "anyOf": [
796
+ {
797
+ "type": "string",
798
+ },
799
+ {
800
+ "type": "number",
801
+ },
802
+ {
803
+ "type": "boolean",
804
+ },
805
+ ],
806
+ },
807
+ "minItems": 3,
808
+ "type": "array",
809
+ }
810
+ `);
811
+ });
812
+
813
+ test("tuple with null openapi-3.0", () => {
814
+ const schema = z.tuple([z.string(), z.number(), z.null()]);
815
+ const jsonSchema = z.toJSONSchema(schema, { target: "openapi-3.0" });
816
+ validateOpenAPI30Schema(jsonSchema);
817
+ expect(jsonSchema).toMatchInlineSnapshot(`
818
+ {
819
+ "items": {
820
+ "anyOf": [
821
+ {
822
+ "type": "string",
823
+ },
824
+ {
825
+ "type": "number",
826
+ },
827
+ {
828
+ "enum": [
829
+ null,
830
+ ],
831
+ "nullable": true,
832
+ "type": "string",
833
+ },
834
+ ],
835
+ },
836
+ "maxItems": 3,
837
+ "minItems": 3,
838
+ "type": "array",
839
+ }
840
+ `);
841
+ });
842
+
843
+ test("tuple draft-7", () => {
844
+ const schema = z.tuple([z.string(), z.number()]);
845
+ expect(z.toJSONSchema(schema, { target: "draft-7", io: "input" })).toMatchInlineSnapshot(`
846
+ {
847
+ "$schema": "http://json-schema.org/draft-07/schema#",
848
+ "items": [
849
+ {
850
+ "type": "string",
851
+ },
852
+ {
853
+ "type": "number",
854
+ },
855
+ ],
856
+ "type": "array",
857
+ }
858
+ `);
859
+ });
860
+
861
+ test("tuple with rest draft-7", () => {
862
+ const schema = z.tuple([z.string(), z.number()]).rest(z.boolean());
863
+ expect(z.toJSONSchema(schema, { target: "draft-7", io: "input" })).toMatchInlineSnapshot(`
864
+ {
865
+ "$schema": "http://json-schema.org/draft-07/schema#",
866
+ "additionalItems": {
867
+ "type": "boolean",
868
+ },
869
+ "items": [
870
+ {
871
+ "type": "string",
872
+ },
873
+ {
874
+ "type": "number",
875
+ },
876
+ ],
877
+ "type": "array",
878
+ }
879
+ `);
880
+ });
881
+
882
+ test("tuple with rest draft-7 - issue #5151 regression test", () => {
883
+ // This test addresses issue #5151: tuple with rest elements and ids
884
+ // in draft-7 had incorrect internal path handling affecting complex scenarios
885
+ const primarySchema = z.string().meta({ id: "primary" });
886
+ const restSchema = z.number().meta({ id: "rest" });
887
+ const testSchema = z.tuple([primarySchema], restSchema);
888
+
889
+ // Test both final output structure AND internal path handling
890
+ const capturedPaths: string[] = [];
891
+ const result = z.toJSONSchema(testSchema, {
892
+ target: "draft-7",
893
+ override: (ctx) => capturedPaths.push(ctx.path.join("/")),
894
+ });
895
+
896
+ // Verify correct draft-7 structure with metadata extraction
897
+ expect(result).toMatchInlineSnapshot(`
898
+ {
899
+ "$schema": "http://json-schema.org/draft-07/schema#",
900
+ "additionalItems": {
901
+ "$ref": "#/definitions/rest",
902
+ },
903
+ "definitions": {
904
+ "primary": {
905
+ "id": "primary",
906
+ "type": "string",
907
+ },
908
+ "rest": {
909
+ "id": "rest",
910
+ "type": "number",
911
+ },
912
+ },
913
+ "items": [
914
+ {
915
+ "$ref": "#/definitions/primary",
916
+ },
917
+ ],
918
+ "type": "array",
919
+ }
920
+ `);
921
+
922
+ // Verify internal paths are correct (this was the actual bug)
923
+ expect(capturedPaths).toContain("items/0"); // prefix items should use "items" path
924
+ expect(capturedPaths).toContain("additionalItems"); // rest should use "additionalItems" path
925
+ expect(capturedPaths).not.toContain("prefixItems/0"); // should not use draft-2020-12 paths
926
+
927
+ // Structural validations
928
+ expect(Array.isArray(result.items)).toBe(true);
929
+ expect(result.additionalItems).toBeDefined();
930
+ });
931
+
932
+ test("promise", () => {
933
+ const schema = z.promise(z.string());
934
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
935
+ {
936
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
937
+ "type": "string",
938
+ }
939
+ `);
940
+ });
941
+
942
+ test("lazy", () => {
943
+ const schema = z.lazy(() => z.string());
944
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
945
+ {
946
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
947
+ "type": "string",
948
+ }
949
+ `);
950
+ });
951
+
952
+ // enum
953
+ test("enum", () => {
954
+ const a = z.enum(["a", "b", "c"]);
955
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
956
+ {
957
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
958
+ "enum": [
959
+ "a",
960
+ "b",
961
+ "c",
962
+ ],
963
+ "type": "string",
964
+ }
965
+ `);
966
+
967
+ enum B {
968
+ A = 0,
969
+ B = 1,
970
+ C = 2,
971
+ }
972
+
973
+ const b = z.enum(B);
974
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
975
+ {
976
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
977
+ "enum": [
978
+ 0,
979
+ 1,
980
+ 2,
981
+ ],
982
+ "type": "number",
983
+ }
984
+ `);
985
+ });
986
+
987
+ // literal
988
+ test("literal", () => {
989
+ const a = z.literal("hello");
990
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
991
+ {
992
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
993
+ "const": "hello",
994
+ "type": "string",
995
+ }
996
+ `);
997
+
998
+ const b = z.literal(7);
999
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
1000
+ {
1001
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1002
+ "const": 7,
1003
+ "type": "number",
1004
+ }
1005
+ `);
1006
+
1007
+ const c = z.literal(["hello", undefined, null, 5, BigInt(1324)]);
1008
+ expect(() => z.toJSONSchema(c)).toThrow();
1009
+
1010
+ const d = z.literal(["hello", null, 5]);
1011
+ expect(z.toJSONSchema(d)).toMatchInlineSnapshot(`
1012
+ {
1013
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1014
+ "enum": [
1015
+ "hello",
1016
+ null,
1017
+ 5,
1018
+ ],
1019
+ }
1020
+ `);
1021
+
1022
+ const e = z.literal(["hello", "zod", "v4"]);
1023
+ expect(z.toJSONSchema(e)).toMatchInlineSnapshot(`
1024
+ {
1025
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1026
+ "enum": [
1027
+ "hello",
1028
+ "zod",
1029
+ "v4",
1030
+ ],
1031
+ "type": "string",
1032
+ }
1033
+ `);
1034
+ });
1035
+
1036
+ test("literal draft-4", () => {
1037
+ const a = z.literal("hello");
1038
+ expect(z.toJSONSchema(a, { target: "draft-4" })).toMatchInlineSnapshot(`
1039
+ {
1040
+ "$schema": "http://json-schema.org/draft-04/schema#",
1041
+ "enum": [
1042
+ "hello",
1043
+ ],
1044
+ "type": "string",
1045
+ }
1046
+ `);
1047
+ });
1048
+
1049
+ // pipe
1050
+ test("pipe", () => {
1051
+ const schema = z
1052
+ .string()
1053
+ .transform((val) => Number.parseInt(val))
1054
+ .pipe(z.number());
1055
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
1056
+ {
1057
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1058
+ "type": "number",
1059
+ }
1060
+ `);
1061
+ });
1062
+
1063
+ test("simple objects", () => {
1064
+ const schema = z.object({
1065
+ name: z.string(),
1066
+ age: z.number(),
1067
+ });
1068
+
1069
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(
1070
+ `
1071
+ {
1072
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1073
+ "additionalProperties": false,
1074
+ "properties": {
1075
+ "age": {
1076
+ "type": "number",
1077
+ },
1078
+ "name": {
1079
+ "type": "string",
1080
+ },
1081
+ },
1082
+ "required": [
1083
+ "name",
1084
+ "age",
1085
+ ],
1086
+ "type": "object",
1087
+ }
1088
+ `
1089
+ );
1090
+ });
1091
+
1092
+ test("additionalproperties in z.object", () => {
1093
+ const a = z.object({
1094
+ name: z.string(),
1095
+ });
1096
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
1097
+ {
1098
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1099
+ "additionalProperties": false,
1100
+ "properties": {
1101
+ "name": {
1102
+ "type": "string",
1103
+ },
1104
+ },
1105
+ "required": [
1106
+ "name",
1107
+ ],
1108
+ "type": "object",
1109
+ }
1110
+ `);
1111
+ expect(z.toJSONSchema(a, { io: "input" })).toMatchInlineSnapshot(`
1112
+ {
1113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1114
+ "properties": {
1115
+ "name": {
1116
+ "type": "string",
1117
+ },
1118
+ },
1119
+ "required": [
1120
+ "name",
1121
+ ],
1122
+ "type": "object",
1123
+ }
1124
+ `);
1125
+ expect(
1126
+ z.toJSONSchema(a, {
1127
+ io: "input",
1128
+ override(ctx) {
1129
+ const def = ctx.zodSchema._zod.def;
1130
+ if (def.type === "object" && !def.catchall) {
1131
+ (ctx.jsonSchema as z.core.JSONSchema.ObjectSchema).additionalProperties = false;
1132
+ }
1133
+ },
1134
+ })
1135
+ ).toMatchInlineSnapshot(`
1136
+ {
1137
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1138
+ "additionalProperties": false,
1139
+ "properties": {
1140
+ "name": {
1141
+ "type": "string",
1142
+ },
1143
+ },
1144
+ "required": [
1145
+ "name",
1146
+ ],
1147
+ "type": "object",
1148
+ }
1149
+ `);
1150
+ });
1151
+
1152
+ test("catchall objects", () => {
1153
+ const a = z.strictObject({
1154
+ name: z.string(),
1155
+ age: z.number(),
1156
+ });
1157
+
1158
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
1159
+ {
1160
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1161
+ "additionalProperties": false,
1162
+ "properties": {
1163
+ "age": {
1164
+ "type": "number",
1165
+ },
1166
+ "name": {
1167
+ "type": "string",
1168
+ },
1169
+ },
1170
+ "required": [
1171
+ "name",
1172
+ "age",
1173
+ ],
1174
+ "type": "object",
1175
+ }
1176
+ `);
1177
+
1178
+ const b = z
1179
+ .object({
1180
+ name: z.string(),
1181
+ })
1182
+ .catchall(z.string());
1183
+
1184
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
1185
+ {
1186
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1187
+ "additionalProperties": {
1188
+ "type": "string",
1189
+ },
1190
+ "properties": {
1191
+ "name": {
1192
+ "type": "string",
1193
+ },
1194
+ },
1195
+ "required": [
1196
+ "name",
1197
+ ],
1198
+ "type": "object",
1199
+ }
1200
+ `);
1201
+
1202
+ const c = z.looseObject({
1203
+ name: z.string(),
1204
+ });
1205
+
1206
+ expect(z.toJSONSchema(c)).toMatchInlineSnapshot(`
1207
+ {
1208
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1209
+ "additionalProperties": {},
1210
+ "properties": {
1211
+ "name": {
1212
+ "type": "string",
1213
+ },
1214
+ },
1215
+ "required": [
1216
+ "name",
1217
+ ],
1218
+ "type": "object",
1219
+ }
1220
+ `);
1221
+ });
1222
+
1223
+ test("optional fields - object", () => {
1224
+ const schema = z.object({
1225
+ required: z.string(),
1226
+ optional: z.string().optional(),
1227
+ nonoptional: z.string().optional().nonoptional(),
1228
+ });
1229
+
1230
+ const result = z.toJSONSchema(schema);
1231
+
1232
+ expect(result).toMatchInlineSnapshot(`
1233
+ {
1234
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1235
+ "additionalProperties": false,
1236
+ "properties": {
1237
+ "nonoptional": {
1238
+ "type": "string",
1239
+ },
1240
+ "optional": {
1241
+ "type": "string",
1242
+ },
1243
+ "required": {
1244
+ "type": "string",
1245
+ },
1246
+ },
1247
+ "required": [
1248
+ "required",
1249
+ "nonoptional",
1250
+ ],
1251
+ "type": "object",
1252
+ }
1253
+ `);
1254
+ });
1255
+
1256
+ test("recursive object", () => {
1257
+ interface Category {
1258
+ name: string;
1259
+ subcategories: Category[];
1260
+ }
1261
+
1262
+ const categorySchema: z.ZodType<Category> = z.object({
1263
+ name: z.string(),
1264
+ subcategories: z.array(z.lazy(() => categorySchema)),
1265
+ });
1266
+
1267
+ const result = z.toJSONSchema(categorySchema);
1268
+ expect(result).toMatchInlineSnapshot(`
1269
+ {
1270
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1271
+ "additionalProperties": false,
1272
+ "properties": {
1273
+ "name": {
1274
+ "type": "string",
1275
+ },
1276
+ "subcategories": {
1277
+ "items": {
1278
+ "$ref": "#",
1279
+ },
1280
+ "type": "array",
1281
+ },
1282
+ },
1283
+ "required": [
1284
+ "name",
1285
+ "subcategories",
1286
+ ],
1287
+ "type": "object",
1288
+ }
1289
+ `);
1290
+ });
1291
+
1292
+ test("simple interface", () => {
1293
+ const userSchema = z.object({
1294
+ name: z.string(),
1295
+ age: z.number().optional(),
1296
+ });
1297
+
1298
+ const result = z.toJSONSchema(userSchema);
1299
+ expect(result).toMatchInlineSnapshot(`
1300
+ {
1301
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1302
+ "additionalProperties": false,
1303
+ "properties": {
1304
+ "age": {
1305
+ "type": "number",
1306
+ },
1307
+ "name": {
1308
+ "type": "string",
1309
+ },
1310
+ },
1311
+ "required": [
1312
+ "name",
1313
+ ],
1314
+ "type": "object",
1315
+ }
1316
+ `);
1317
+ });
1318
+
1319
+ test("catchall interface", () => {
1320
+ const a = z.strictObject({
1321
+ name: z.string(),
1322
+ age: z.number(),
1323
+ });
1324
+
1325
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
1326
+ {
1327
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1328
+ "additionalProperties": false,
1329
+ "properties": {
1330
+ "age": {
1331
+ "type": "number",
1332
+ },
1333
+ "name": {
1334
+ "type": "string",
1335
+ },
1336
+ },
1337
+ "required": [
1338
+ "name",
1339
+ "age",
1340
+ ],
1341
+ "type": "object",
1342
+ }
1343
+ `);
1344
+
1345
+ const b = z
1346
+ .object({
1347
+ name: z.string(),
1348
+ })
1349
+ .catchall(z.string());
1350
+
1351
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
1352
+ {
1353
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1354
+ "additionalProperties": {
1355
+ "type": "string",
1356
+ },
1357
+ "properties": {
1358
+ "name": {
1359
+ "type": "string",
1360
+ },
1361
+ },
1362
+ "required": [
1363
+ "name",
1364
+ ],
1365
+ "type": "object",
1366
+ }
1367
+ `);
1368
+
1369
+ const c = z.looseObject({
1370
+ name: z.string(),
1371
+ });
1372
+
1373
+ expect(z.toJSONSchema(c)).toMatchInlineSnapshot(`
1374
+ {
1375
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1376
+ "additionalProperties": {},
1377
+ "properties": {
1378
+ "name": {
1379
+ "type": "string",
1380
+ },
1381
+ },
1382
+ "required": [
1383
+ "name",
1384
+ ],
1385
+ "type": "object",
1386
+ }
1387
+ `);
1388
+ });
1389
+
1390
+ test("recursive interface schemas", () => {
1391
+ const TreeNodeSchema = z.object({
1392
+ id: z.string(),
1393
+ get children() {
1394
+ return TreeNodeSchema;
1395
+ },
1396
+ });
1397
+
1398
+ const result = z.toJSONSchema(TreeNodeSchema);
1399
+
1400
+ // Should have definitions for recursive schema
1401
+ expect(JSON.stringify(result, null, 2)).toMatchInlineSnapshot(
1402
+ `
1403
+ "{
1404
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1405
+ "type": "object",
1406
+ "properties": {
1407
+ "id": {
1408
+ "type": "string"
1409
+ },
1410
+ "children": {
1411
+ "$ref": "#"
1412
+ }
1413
+ },
1414
+ "required": [
1415
+ "id",
1416
+ "children"
1417
+ ],
1418
+ "additionalProperties": false
1419
+ }"
1420
+ `
1421
+ );
1422
+ });
1423
+
1424
+ test("mutually recursive interface schemas", () => {
1425
+ const FolderSchema = z.object({
1426
+ name: z.string(),
1427
+ get files() {
1428
+ return z.array(FileSchema);
1429
+ },
1430
+ });
1431
+
1432
+ const FileSchema = z.object({
1433
+ name: z.string(),
1434
+ get parent() {
1435
+ return FolderSchema;
1436
+ },
1437
+ });
1438
+
1439
+ const result = z.toJSONSchema(FolderSchema);
1440
+
1441
+ // Should have definitions for both schemas
1442
+ expect(JSON.stringify(result, null, 2)).toMatchInlineSnapshot(
1443
+ `
1444
+ "{
1445
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1446
+ "type": "object",
1447
+ "properties": {
1448
+ "name": {
1449
+ "type": "string"
1450
+ },
1451
+ "files": {
1452
+ "type": "array",
1453
+ "items": {
1454
+ "type": "object",
1455
+ "properties": {
1456
+ "name": {
1457
+ "type": "string"
1458
+ },
1459
+ "parent": {
1460
+ "$ref": "#"
1461
+ }
1462
+ },
1463
+ "required": [
1464
+ "name",
1465
+ "parent"
1466
+ ],
1467
+ "additionalProperties": false
1468
+ }
1469
+ }
1470
+ },
1471
+ "required": [
1472
+ "name",
1473
+ "files"
1474
+ ],
1475
+ "additionalProperties": false
1476
+ }"
1477
+ `
1478
+ );
1479
+ });
1480
+ });
1481
+
1482
+ test("override", () => {
1483
+ const schema = z.z.toJSONSchema(z.string(), {
1484
+ override: (ctx) => {
1485
+ ctx.zodSchema;
1486
+ ctx.jsonSchema;
1487
+ ctx.jsonSchema.whatever = "sup";
1488
+ },
1489
+ });
1490
+ expect(schema).toMatchInlineSnapshot(`
1491
+ {
1492
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1493
+ "type": "string",
1494
+ "whatever": "sup",
1495
+ }
1496
+ `);
1497
+ });
1498
+
1499
+ test("override: do not run on references", () => {
1500
+ let overrideCount = 0;
1501
+ const schema = z
1502
+ .union([z.string().date(), z.string().datetime(), z.string().datetime({ local: true })])
1503
+ .meta({ a: true })
1504
+ .transform((str) => new Date(str))
1505
+ .meta({ b: true })
1506
+ .pipe(z.date())
1507
+ .meta({ c: true })
1508
+ .brand("dateIn");
1509
+ z.z.toJSONSchema(schema, {
1510
+ unrepresentable: "any",
1511
+ io: "input",
1512
+ override(_) {
1513
+ overrideCount++;
1514
+ },
1515
+ });
1516
+
1517
+ expect(overrideCount).toBe(6);
1518
+ });
1519
+
1520
+ test("override with refs", () => {
1521
+ const a = z.string().optional();
1522
+ const result = z.z.toJSONSchema(a, {
1523
+ override(ctx) {
1524
+ if (ctx.zodSchema._zod.def.type === "string") {
1525
+ ctx.jsonSchema.type = "STRING" as "string";
1526
+ }
1527
+ },
1528
+ });
1529
+
1530
+ expect(result).toMatchInlineSnapshot(`
1531
+ {
1532
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1533
+ "type": "STRING",
1534
+ }
1535
+ `);
1536
+ });
1537
+
1538
+ test("override execution order", () => {
1539
+ const schema = z.union([z.string(), z.number()]);
1540
+ let unionSchema!: any;
1541
+ z.z.toJSONSchema(schema, {
1542
+ override(ctx) {
1543
+ if (ctx.zodSchema._zod.def.type === "union") {
1544
+ unionSchema = ctx.jsonSchema;
1545
+ }
1546
+ },
1547
+ });
1548
+
1549
+ expect(unionSchema).toMatchInlineSnapshot(`
1550
+ {
1551
+ "anyOf": [
1552
+ {
1553
+ "type": "string",
1554
+ },
1555
+ {
1556
+ "type": "number",
1557
+ },
1558
+ ],
1559
+ }
1560
+ `);
1561
+ });
1562
+
1563
+ test("override with path", () => {
1564
+ const userSchema = z.object({
1565
+ name: z.string(),
1566
+ age: z.number(),
1567
+ });
1568
+
1569
+ const capturedPaths: (string | number)[][] = [];
1570
+
1571
+ z.toJSONSchema(userSchema, {
1572
+ override(ctx) {
1573
+ capturedPaths.push(ctx.path);
1574
+ },
1575
+ });
1576
+
1577
+ expect(capturedPaths).toMatchInlineSnapshot(`
1578
+ [
1579
+ [
1580
+ "properties",
1581
+ "age",
1582
+ ],
1583
+ [
1584
+ "properties",
1585
+ "name",
1586
+ ],
1587
+ [],
1588
+ ]
1589
+ `);
1590
+ });
1591
+
1592
+ test("pipe", () => {
1593
+ const mySchema = z
1594
+ .string()
1595
+ .transform((val) => val.length)
1596
+ .pipe(z.number());
1597
+ // ZodPipe
1598
+
1599
+ const a = z.z.toJSONSchema(mySchema);
1600
+ expect(a).toMatchInlineSnapshot(`
1601
+ {
1602
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1603
+ "type": "number",
1604
+ }
1605
+ `);
1606
+ // => { type: "number" }
1607
+
1608
+ const b = z.z.toJSONSchema(mySchema, { io: "input" });
1609
+ expect(b).toMatchInlineSnapshot(`
1610
+ {
1611
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1612
+ "type": "string",
1613
+ }
1614
+ `);
1615
+ // => { type: "string" }
1616
+ });
1617
+
1618
+ test("passthrough schemas", () => {
1619
+ const Internal = z.object({
1620
+ num: z.number(),
1621
+ str: z.string(),
1622
+ });
1623
+ //.meta({ id: "Internal" });
1624
+
1625
+ const External = z.object({
1626
+ a: Internal,
1627
+ b: Internal.optional(),
1628
+ c: z.lazy(() => Internal),
1629
+ d: z.promise(Internal),
1630
+ e: z.pipe(Internal, Internal),
1631
+ });
1632
+
1633
+ const result = z.z.toJSONSchema(External, {
1634
+ reused: "ref",
1635
+ });
1636
+ expect(result).toMatchInlineSnapshot(`
1637
+ {
1638
+ "$defs": {
1639
+ "__schema0": {
1640
+ "additionalProperties": false,
1641
+ "properties": {
1642
+ "num": {
1643
+ "type": "number",
1644
+ },
1645
+ "str": {
1646
+ "type": "string",
1647
+ },
1648
+ },
1649
+ "required": [
1650
+ "num",
1651
+ "str",
1652
+ ],
1653
+ "type": "object",
1654
+ },
1655
+ },
1656
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1657
+ "additionalProperties": false,
1658
+ "properties": {
1659
+ "a": {
1660
+ "$ref": "#/$defs/__schema0",
1661
+ },
1662
+ "b": {
1663
+ "$ref": "#/$defs/__schema0",
1664
+ },
1665
+ "c": {
1666
+ "$ref": "#/$defs/__schema0",
1667
+ },
1668
+ "d": {
1669
+ "$ref": "#/$defs/__schema0",
1670
+ },
1671
+ "e": {
1672
+ "$ref": "#/$defs/__schema0",
1673
+ },
1674
+ },
1675
+ "required": [
1676
+ "a",
1677
+ "c",
1678
+ "d",
1679
+ "e",
1680
+ ],
1681
+ "type": "object",
1682
+ }
1683
+ `);
1684
+ });
1685
+
1686
+ test("extract schemas with id", () => {
1687
+ const name = z.string().meta({ id: "name" });
1688
+ const result = z.z.toJSONSchema(
1689
+ z.object({
1690
+ first_name: name,
1691
+ last_name: name.nullable(),
1692
+ middle_name: name.optional(),
1693
+ age: z.number().meta({ id: "age" }),
1694
+ })
1695
+ );
1696
+ expect(result).toMatchInlineSnapshot(`
1697
+ {
1698
+ "$defs": {
1699
+ "age": {
1700
+ "id": "age",
1701
+ "type": "number",
1702
+ },
1703
+ "name": {
1704
+ "id": "name",
1705
+ "type": "string",
1706
+ },
1707
+ },
1708
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1709
+ "additionalProperties": false,
1710
+ "properties": {
1711
+ "age": {
1712
+ "$ref": "#/$defs/age",
1713
+ },
1714
+ "first_name": {
1715
+ "$ref": "#/$defs/name",
1716
+ },
1717
+ "last_name": {
1718
+ "anyOf": [
1719
+ {
1720
+ "$ref": "#/$defs/name",
1721
+ },
1722
+ {
1723
+ "type": "null",
1724
+ },
1725
+ ],
1726
+ },
1727
+ "middle_name": {
1728
+ "$ref": "#/$defs/name",
1729
+ },
1730
+ },
1731
+ "required": [
1732
+ "first_name",
1733
+ "last_name",
1734
+ "age",
1735
+ ],
1736
+ "type": "object",
1737
+ }
1738
+ `);
1739
+ });
1740
+
1741
+ test("unrepresentable literal values are ignored", () => {
1742
+ const a = z.z.toJSONSchema(z.literal(["hello", null, 5, BigInt(1324), undefined]), { unrepresentable: "any" });
1743
+ expect(a).toMatchInlineSnapshot(`
1744
+ {
1745
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1746
+ "enum": [
1747
+ "hello",
1748
+ null,
1749
+ 5,
1750
+ 1324,
1751
+ ],
1752
+ }
1753
+ `);
1754
+
1755
+ const b = z.z.toJSONSchema(z.literal([undefined, null, 5, BigInt(1324)]), {
1756
+ unrepresentable: "any",
1757
+ });
1758
+ expect(b).toMatchInlineSnapshot(`
1759
+ {
1760
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1761
+ "enum": [
1762
+ null,
1763
+ 5,
1764
+ 1324,
1765
+ ],
1766
+ }
1767
+ `);
1768
+
1769
+ const c = z.z.toJSONSchema(z.literal([undefined]), {
1770
+ unrepresentable: "any",
1771
+ });
1772
+ expect(c).toMatchInlineSnapshot(`
1773
+ {
1774
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1775
+ }
1776
+ `);
1777
+ });
1778
+
1779
+ test("describe with id", () => {
1780
+ const jobId = z.string().meta({ id: "jobId" });
1781
+
1782
+ const a = z.z.toJSONSchema(
1783
+ z.object({
1784
+ current: jobId.describe("Current job"),
1785
+ previous: jobId.describe("Previous job"),
1786
+ })
1787
+ );
1788
+ expect(a).toMatchInlineSnapshot(`
1789
+ {
1790
+ "$defs": {
1791
+ "jobId": {
1792
+ "id": "jobId",
1793
+ "type": "string",
1794
+ },
1795
+ },
1796
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1797
+ "additionalProperties": false,
1798
+ "properties": {
1799
+ "current": {
1800
+ "$ref": "#/$defs/jobId",
1801
+ "description": "Current job",
1802
+ },
1803
+ "previous": {
1804
+ "$ref": "#/$defs/jobId",
1805
+ "description": "Previous job",
1806
+ },
1807
+ },
1808
+ "required": [
1809
+ "current",
1810
+ "previous",
1811
+ ],
1812
+ "type": "object",
1813
+ }
1814
+ `);
1815
+ });
1816
+
1817
+ test("overwrite id", () => {
1818
+ const jobId = z.string().meta({ id: "aaa" });
1819
+
1820
+ const a = z.z.toJSONSchema(
1821
+ z.object({
1822
+ current: jobId,
1823
+ previous: jobId.meta({ id: "bbb" }),
1824
+ })
1825
+ );
1826
+ expect(a).toMatchInlineSnapshot(`
1827
+ {
1828
+ "$defs": {
1829
+ "aaa": {
1830
+ "id": "aaa",
1831
+ "type": "string",
1832
+ },
1833
+ "bbb": {
1834
+ "$ref": "#/$defs/aaa",
1835
+ "id": "bbb",
1836
+ },
1837
+ },
1838
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1839
+ "additionalProperties": false,
1840
+ "properties": {
1841
+ "current": {
1842
+ "$ref": "#/$defs/aaa",
1843
+ },
1844
+ "previous": {
1845
+ "$ref": "#/$defs/bbb",
1846
+ },
1847
+ },
1848
+ "required": [
1849
+ "current",
1850
+ "previous",
1851
+ ],
1852
+ "type": "object",
1853
+ }
1854
+ `);
1855
+
1856
+ const b = z.z.toJSONSchema(
1857
+ z.object({
1858
+ current: jobId,
1859
+ previous: jobId.meta({ id: "ccc" }),
1860
+ }),
1861
+ {
1862
+ reused: "ref",
1863
+ }
1864
+ );
1865
+ expect(b).toMatchInlineSnapshot(`
1866
+ {
1867
+ "$defs": {
1868
+ "aaa": {
1869
+ "id": "aaa",
1870
+ "type": "string",
1871
+ },
1872
+ "ccc": {
1873
+ "$ref": "#/$defs/aaa",
1874
+ "id": "ccc",
1875
+ },
1876
+ },
1877
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1878
+ "additionalProperties": false,
1879
+ "properties": {
1880
+ "current": {
1881
+ "$ref": "#/$defs/aaa",
1882
+ },
1883
+ "previous": {
1884
+ "$ref": "#/$defs/ccc",
1885
+ },
1886
+ },
1887
+ "required": [
1888
+ "current",
1889
+ "previous",
1890
+ ],
1891
+ "type": "object",
1892
+ }
1893
+ `);
1894
+ });
1895
+
1896
+ test("overwrite descriptions", () => {
1897
+ const field = z.string().describe("a").describe("b").describe("c");
1898
+
1899
+ const a = z.z.toJSONSchema(
1900
+ z.object({
1901
+ d: field.describe("d"),
1902
+ e: field.describe("e"),
1903
+ })
1904
+ );
1905
+ expect(a).toMatchInlineSnapshot(`
1906
+ {
1907
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1908
+ "additionalProperties": false,
1909
+ "properties": {
1910
+ "d": {
1911
+ "description": "d",
1912
+ "type": "string",
1913
+ },
1914
+ "e": {
1915
+ "description": "e",
1916
+ "type": "string",
1917
+ },
1918
+ },
1919
+ "required": [
1920
+ "d",
1921
+ "e",
1922
+ ],
1923
+ "type": "object",
1924
+ }
1925
+ `);
1926
+
1927
+ const b = z.z.toJSONSchema(
1928
+ z.object({
1929
+ d: field.describe("d"),
1930
+ e: field.describe("e"),
1931
+ }),
1932
+ {
1933
+ reused: "ref",
1934
+ }
1935
+ );
1936
+ expect(b).toMatchInlineSnapshot(`
1937
+ {
1938
+ "$defs": {
1939
+ "__schema0": {
1940
+ "description": "c",
1941
+ "type": "string",
1942
+ },
1943
+ },
1944
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1945
+ "additionalProperties": false,
1946
+ "properties": {
1947
+ "d": {
1948
+ "$ref": "#/$defs/__schema0",
1949
+ "description": "d",
1950
+ },
1951
+ "e": {
1952
+ "$ref": "#/$defs/__schema0",
1953
+ "description": "e",
1954
+ },
1955
+ },
1956
+ "required": [
1957
+ "d",
1958
+ "e",
1959
+ ],
1960
+ "type": "object",
1961
+ }
1962
+ `);
1963
+ });
1964
+
1965
+ test("top-level readonly", () => {
1966
+ const A = z
1967
+ .object({
1968
+ name: z.string(),
1969
+ get b() {
1970
+ return B;
1971
+ },
1972
+ })
1973
+ .readonly()
1974
+ .meta({ id: "A" });
1975
+ // z.globalRegistry.add(A, { id: "A" });
1976
+ // .meta({ id: "A" });
1977
+
1978
+ const B = z
1979
+ .object({
1980
+ name: z.string(),
1981
+ get a() {
1982
+ return A;
1983
+ },
1984
+ })
1985
+ .readonly()
1986
+ .meta({ id: "B" });
1987
+ // z.globalRegistry.add(B, { id: "B" });
1988
+ // .meta({ id: "B" });
1989
+
1990
+ const result = z.z.toJSONSchema(A);
1991
+ expect(result).toMatchInlineSnapshot(`
1992
+ {
1993
+ "$defs": {
1994
+ "B": {
1995
+ "additionalProperties": false,
1996
+ "id": "B",
1997
+ "properties": {
1998
+ "a": {
1999
+ "$ref": "#",
2000
+ },
2001
+ "name": {
2002
+ "type": "string",
2003
+ },
2004
+ },
2005
+ "readOnly": true,
2006
+ "required": [
2007
+ "name",
2008
+ "a",
2009
+ ],
2010
+ "type": "object",
2011
+ },
2012
+ },
2013
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2014
+ "additionalProperties": false,
2015
+ "id": "A",
2016
+ "properties": {
2017
+ "b": {
2018
+ "$ref": "#/$defs/B",
2019
+ },
2020
+ "name": {
2021
+ "type": "string",
2022
+ },
2023
+ },
2024
+ "readOnly": true,
2025
+ "required": [
2026
+ "name",
2027
+ "b",
2028
+ ],
2029
+ "type": "object",
2030
+ }
2031
+ `);
2032
+ });
2033
+
2034
+ test("basic registry", () => {
2035
+ const myRegistry = z.registry<{ id: string }>();
2036
+ const User = z.object({
2037
+ name: z.string(),
2038
+ get posts() {
2039
+ return z.array(Post);
2040
+ },
2041
+ });
2042
+
2043
+ const Post = z.object({
2044
+ title: z.string(),
2045
+ content: z.string(),
2046
+ get author() {
2047
+ return User;
2048
+ },
2049
+ });
2050
+
2051
+ myRegistry.add(User, { id: "User" });
2052
+ myRegistry.add(Post, { id: "Post" });
2053
+
2054
+ const result = z.z.toJSONSchema(myRegistry, {
2055
+ uri: (id) => `https://example.com/${id}.json`,
2056
+ });
2057
+ expect(result).toMatchInlineSnapshot(`
2058
+ {
2059
+ "schemas": {
2060
+ "Post": {
2061
+ "$id": "https://example.com/Post.json",
2062
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2063
+ "additionalProperties": false,
2064
+ "properties": {
2065
+ "author": {
2066
+ "$ref": "https://example.com/User.json",
2067
+ },
2068
+ "content": {
2069
+ "type": "string",
2070
+ },
2071
+ "title": {
2072
+ "type": "string",
2073
+ },
2074
+ },
2075
+ "required": [
2076
+ "title",
2077
+ "content",
2078
+ "author",
2079
+ ],
2080
+ "type": "object",
2081
+ },
2082
+ "User": {
2083
+ "$id": "https://example.com/User.json",
2084
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2085
+ "additionalProperties": false,
2086
+ "properties": {
2087
+ "name": {
2088
+ "type": "string",
2089
+ },
2090
+ "posts": {
2091
+ "items": {
2092
+ "$ref": "https://example.com/Post.json",
2093
+ },
2094
+ "type": "array",
2095
+ },
2096
+ },
2097
+ "required": [
2098
+ "name",
2099
+ "posts",
2100
+ ],
2101
+ "type": "object",
2102
+ },
2103
+ },
2104
+ }
2105
+ `);
2106
+ });
2107
+
2108
+ test("_ref", () => {
2109
+ // const a = z.promise(z.string().describe("a"));
2110
+ const a = z.z.toJSONSchema(z.promise(z.string().describe("a")));
2111
+ expect(a).toMatchInlineSnapshot(`
2112
+ {
2113
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2114
+ "description": "a",
2115
+ "type": "string",
2116
+ }
2117
+ `);
2118
+
2119
+ const b = z.z.toJSONSchema(z.lazy(() => z.string().describe("a")));
2120
+ expect(b).toMatchInlineSnapshot(`
2121
+ {
2122
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2123
+ "description": "a",
2124
+ "type": "string",
2125
+ }
2126
+ `);
2127
+
2128
+ const c = z.z.toJSONSchema(z.optional(z.string().describe("a")));
2129
+ expect(c).toMatchInlineSnapshot(`
2130
+ {
2131
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2132
+ "description": "a",
2133
+ "type": "string",
2134
+ }
2135
+ `);
2136
+ });
2137
+
2138
+ test("defaults/prefaults", () => {
2139
+ const a = z
2140
+ .string()
2141
+ .transform((val) => val.length)
2142
+ .pipe(z.number());
2143
+ const b = a.prefault("hello");
2144
+ const c = a.default(1234);
2145
+
2146
+ // a
2147
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
2148
+ {
2149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2150
+ "type": "number",
2151
+ }
2152
+ `);
2153
+ expect(z.toJSONSchema(a, { io: "input" })).toMatchInlineSnapshot(`
2154
+ {
2155
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2156
+ "type": "string",
2157
+ }
2158
+ `);
2159
+
2160
+ // b
2161
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
2162
+ {
2163
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2164
+ "type": "number",
2165
+ }
2166
+ `);
2167
+ expect(z.toJSONSchema(b, { io: "input" })).toMatchInlineSnapshot(`
2168
+ {
2169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2170
+ "default": "hello",
2171
+ "type": "string",
2172
+ }
2173
+ `);
2174
+ // c
2175
+ expect(z.toJSONSchema(c)).toMatchInlineSnapshot(`
2176
+ {
2177
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2178
+ "default": 1234,
2179
+ "type": "number",
2180
+ }
2181
+ `);
2182
+ expect(z.toJSONSchema(c, { io: "input" })).toMatchInlineSnapshot(`
2183
+ {
2184
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2185
+ "type": "string",
2186
+ }
2187
+ `);
2188
+ });
2189
+
2190
+ test("input type", () => {
2191
+ const schema = z.object({
2192
+ a: z.string(),
2193
+ b: z.string().optional(),
2194
+ c: z.string().default("hello"),
2195
+ d: z.string().nullable(),
2196
+ e: z.string().prefault("hello"),
2197
+ f: z.string().catch("hello"),
2198
+ g: z.never(),
2199
+ h: z.union([z.string(), z.number().default(2)]),
2200
+ i: z.union([z.string(), z.string().optional()]),
2201
+ });
2202
+ expect(z.toJSONSchema(schema, { io: "input" })).toMatchInlineSnapshot(`
2203
+ {
2204
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2205
+ "properties": {
2206
+ "a": {
2207
+ "type": "string",
2208
+ },
2209
+ "b": {
2210
+ "type": "string",
2211
+ },
2212
+ "c": {
2213
+ "default": "hello",
2214
+ "type": "string",
2215
+ },
2216
+ "d": {
2217
+ "anyOf": [
2218
+ {
2219
+ "type": "string",
2220
+ },
2221
+ {
2222
+ "type": "null",
2223
+ },
2224
+ ],
2225
+ },
2226
+ "e": {
2227
+ "default": "hello",
2228
+ "type": "string",
2229
+ },
2230
+ "f": {
2231
+ "default": "hello",
2232
+ "type": "string",
2233
+ },
2234
+ "g": {
2235
+ "not": {},
2236
+ },
2237
+ "h": {
2238
+ "anyOf": [
2239
+ {
2240
+ "type": "string",
2241
+ },
2242
+ {
2243
+ "default": 2,
2244
+ "type": "number",
2245
+ },
2246
+ ],
2247
+ },
2248
+ "i": {
2249
+ "anyOf": [
2250
+ {
2251
+ "type": "string",
2252
+ },
2253
+ {
2254
+ "type": "string",
2255
+ },
2256
+ ],
2257
+ },
2258
+ },
2259
+ "required": [
2260
+ "a",
2261
+ "d",
2262
+ "f",
2263
+ "g",
2264
+ ],
2265
+ "type": "object",
2266
+ }
2267
+ `);
2268
+ expect(z.toJSONSchema(schema, { io: "output" })).toMatchInlineSnapshot(`
2269
+ {
2270
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2271
+ "additionalProperties": false,
2272
+ "properties": {
2273
+ "a": {
2274
+ "type": "string",
2275
+ },
2276
+ "b": {
2277
+ "type": "string",
2278
+ },
2279
+ "c": {
2280
+ "default": "hello",
2281
+ "type": "string",
2282
+ },
2283
+ "d": {
2284
+ "anyOf": [
2285
+ {
2286
+ "type": "string",
2287
+ },
2288
+ {
2289
+ "type": "null",
2290
+ },
2291
+ ],
2292
+ },
2293
+ "e": {
2294
+ "type": "string",
2295
+ },
2296
+ "f": {
2297
+ "default": "hello",
2298
+ "type": "string",
2299
+ },
2300
+ "g": {
2301
+ "not": {},
2302
+ },
2303
+ "h": {
2304
+ "anyOf": [
2305
+ {
2306
+ "type": "string",
2307
+ },
2308
+ {
2309
+ "default": 2,
2310
+ "type": "number",
2311
+ },
2312
+ ],
2313
+ },
2314
+ "i": {
2315
+ "anyOf": [
2316
+ {
2317
+ "type": "string",
2318
+ },
2319
+ {
2320
+ "type": "string",
2321
+ },
2322
+ ],
2323
+ },
2324
+ },
2325
+ "required": [
2326
+ "a",
2327
+ "c",
2328
+ "d",
2329
+ "e",
2330
+ "f",
2331
+ "g",
2332
+ "h",
2333
+ ],
2334
+ "type": "object",
2335
+ }
2336
+ `);
2337
+ });
2338
+
2339
+ test("examples on pipe", () => {
2340
+ const schema = z
2341
+ .string()
2342
+ .meta({ examples: ["test"] })
2343
+ .transform(Number)
2344
+ // .pipe(z.transform(Number).meta({ examples: [4] }))
2345
+ .meta({ examples: [4] });
2346
+
2347
+ const i = z.z.toJSONSchema(schema, { io: "input", unrepresentable: "any" });
2348
+ expect(i).toMatchInlineSnapshot(`
2349
+ {
2350
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2351
+ "examples": [
2352
+ "test",
2353
+ ],
2354
+ "type": "string",
2355
+ }
2356
+ `);
2357
+ const o = z.z.toJSONSchema(schema, { io: "output", unrepresentable: "any" });
2358
+ expect(o).toMatchInlineSnapshot(`
2359
+ {
2360
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2361
+ "examples": [
2362
+ 4,
2363
+ ],
2364
+ }
2365
+ `);
2366
+ });
2367
+
2368
+ // test("number checks", () => {
2369
+ // expect(z.z.toJSONSchema(z.number().int())).toMatchInlineSnapshot(`
2370
+ // {
2371
+ // "maximum": 9007199254740991,
2372
+ // "minimum": -9007199254740991,
2373
+ // "type": "integer",
2374
+ // }
2375
+ // `);
2376
+ // expect(z.z.toJSONSchema(z.int())).toMatchInlineSnapshot(`
2377
+ // {
2378
+ // "maximum": 9007199254740991,
2379
+ // "minimum": -9007199254740991,
2380
+ // "type": "integer",
2381
+ // }
2382
+ // `);
2383
+ // expect(z.z.toJSONSchema(z.int().positive())).toMatchInlineSnapshot(`
2384
+ // {
2385
+ // "exclusiveMinimum": 0,
2386
+ // "maximum": 9007199254740991,
2387
+ // "minimum": -9007199254740991,
2388
+ // "type": "integer",
2389
+ // }
2390
+ // `);
2391
+ // expect(z.z.toJSONSchema(z.int().nonnegative())).toMatchInlineSnapshot(`
2392
+ // {
2393
+ // "maximum": 9007199254740991,
2394
+ // "minimum": 0,
2395
+ // "type": "integer",
2396
+ // }
2397
+ // `);
2398
+ // expect(z.z.toJSONSchema(z.int().gt(0))).toMatchInlineSnapshot(`
2399
+ // {
2400
+ // "exclusiveMinimum": 0,
2401
+ // "maximum": 9007199254740991,
2402
+ // "minimum": -9007199254740991,
2403
+ // "type": "integer",
2404
+ // }
2405
+ // `);
2406
+ // expect(z.z.toJSONSchema(z.int().gte(0))).toMatchInlineSnapshot(`
2407
+ // {
2408
+ // "maximum": 9007199254740991,
2409
+ // "minimum": 0,
2410
+ // "type": "integer",
2411
+ // }
2412
+ // `);
2413
+
2414
+ // });
2415
+
2416
+ test("use output type for preprocess", () => {
2417
+ const a = z.preprocess((val) => String(val), z.string());
2418
+
2419
+ expect(z.toJSONSchema(a, { io: "input" })).toMatchInlineSnapshot(`
2420
+ {
2421
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2422
+ "type": "string",
2423
+ }
2424
+ `);
2425
+ });
2426
+
2427
+ // test("isTransforming", () => {
2428
+ // const tx = z.core.isTransforming;
2429
+ // expect(tx(z.string())).toEqual(false);
2430
+ // expect(tx(z.string().transform((val) => val))).toEqual(true);
2431
+ // expect(tx(z.string().pipe(z.string()))).toEqual(false);
2432
+ // expect(
2433
+ // tx(
2434
+ // z
2435
+ // .string()
2436
+ // .transform((val) => val)
2437
+ // .pipe(z.string())
2438
+ // )
2439
+ // ).toEqual(true);
2440
+
2441
+ // const a = z.transform((val) => val);
2442
+ // expect(tx(z.transform((val) => val))).toEqual(true);
2443
+ // expect(tx(a.optional())).toEqual(true);
2444
+
2445
+ // const b = z.string().optional();
2446
+ // expect(tx(b)).toEqual(false);
2447
+
2448
+ // const c = z.string().prefault("hello");
2449
+ // expect(tx(c)).toEqual(false);
2450
+
2451
+ // const d = z.string().default("hello");
2452
+ // expect(tx(d)).toEqual(false);
2453
+ // });
2454
+
2455
+ test("flatten simple intersections", () => {
2456
+ const FirstSchema = z.object({
2457
+ testNum: z.number(),
2458
+ });
2459
+
2460
+ const SecondSchema = z.object({
2461
+ testStr: z.string(),
2462
+ });
2463
+
2464
+ const ThirdSchema = z.object({
2465
+ testBool: z.boolean(),
2466
+ });
2467
+
2468
+ const HelloSchema = FirstSchema.and(SecondSchema).and(ThirdSchema).describe("123");
2469
+
2470
+ // Zod 3
2471
+ // console.log(JSON.stringify(zodToJsonSchema(HelloSchema), null, 2));
2472
+
2473
+ // Zod 4
2474
+ const result = z.toJSONSchema(HelloSchema, { target: "draft-7" });
2475
+ expect(result).toMatchInlineSnapshot(`
2476
+ {
2477
+ "$schema": "http://json-schema.org/draft-07/schema#",
2478
+ "allOf": [
2479
+ {
2480
+ "additionalProperties": false,
2481
+ "properties": {
2482
+ "testNum": {
2483
+ "type": "number",
2484
+ },
2485
+ },
2486
+ "required": [
2487
+ "testNum",
2488
+ ],
2489
+ "type": "object",
2490
+ },
2491
+ {
2492
+ "additionalProperties": false,
2493
+ "properties": {
2494
+ "testStr": {
2495
+ "type": "string",
2496
+ },
2497
+ },
2498
+ "required": [
2499
+ "testStr",
2500
+ ],
2501
+ "type": "object",
2502
+ },
2503
+ {
2504
+ "additionalProperties": false,
2505
+ "properties": {
2506
+ "testBool": {
2507
+ "type": "boolean",
2508
+ },
2509
+ },
2510
+ "required": [
2511
+ "testBool",
2512
+ ],
2513
+ "type": "object",
2514
+ },
2515
+ ],
2516
+ "description": "123",
2517
+ }
2518
+ `);
2519
+ });
2520
+
2521
+ test("z.file()", () => {
2522
+ const a = z.file();
2523
+ expect(z.toJSONSchema(a)).toMatchInlineSnapshot(`
2524
+ {
2525
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2526
+ "contentEncoding": "binary",
2527
+ "format": "binary",
2528
+ "type": "string",
2529
+ }
2530
+ `);
2531
+
2532
+ const b = z.file().mime("image/png").min(1000).max(10000);
2533
+ expect(z.toJSONSchema(b)).toMatchInlineSnapshot(`
2534
+ {
2535
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2536
+ "contentEncoding": "binary",
2537
+ "contentMediaType": "image/png",
2538
+ "format": "binary",
2539
+ "maxLength": 10000,
2540
+ "minLength": 1000,
2541
+ "type": "string",
2542
+ }
2543
+ `);
2544
+
2545
+ const c = z.file().mime(["image/png", "image/jpg"]).min(1000).max(10000);
2546
+ expect(z.toJSONSchema(c)).toMatchInlineSnapshot(`
2547
+ {
2548
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2549
+ "anyOf": [
2550
+ {
2551
+ "contentEncoding": "binary",
2552
+ "contentMediaType": "image/png",
2553
+ "format": "binary",
2554
+ "maxLength": 10000,
2555
+ "minLength": 1000,
2556
+ "type": "string",
2557
+ },
2558
+ {
2559
+ "contentEncoding": "binary",
2560
+ "contentMediaType": "image/jpg",
2561
+ "format": "binary",
2562
+ "maxLength": 10000,
2563
+ "minLength": 1000,
2564
+ "type": "string",
2565
+ },
2566
+ ],
2567
+ }
2568
+ `);
2569
+ });
2570
+
2571
+ test("custom toJSONSchema", () => {
2572
+ const schema = z.instanceof(Date);
2573
+ schema._zod.toJSONSchema = () => ({
2574
+ type: "string",
2575
+ format: "date-time",
2576
+ });
2577
+
2578
+ expect(z.toJSONSchema(schema)).toMatchInlineSnapshot(`
2579
+ {
2580
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2581
+ "format": "date-time",
2582
+ "type": "string",
2583
+ }
2584
+ `);
2585
+ });
2586
+
2587
+ test("cycle detection - root", () => {
2588
+ const schema = z.object({
2589
+ name: z.string(),
2590
+ get subcategories() {
2591
+ return z.array(schema);
2592
+ },
2593
+ });
2594
+
2595
+ expect(() => z.toJSONSchema(schema, { cycles: "throw" })).toThrowErrorMatchingInlineSnapshot(`
2596
+ [Error: Cycle detected: #/properties/subcategories/items/<root>
2597
+
2598
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.]
2599
+ `);
2600
+ });
2601
+
2602
+ test("cycle detection - mutual recursion", () => {
2603
+ const A = z.object({
2604
+ name: z.string(),
2605
+ get subcategories() {
2606
+ return z.array(B);
2607
+ },
2608
+ });
2609
+
2610
+ const B = z.object({
2611
+ name: z.string(),
2612
+ get subcategories() {
2613
+ return z.array(A);
2614
+ },
2615
+ });
2616
+
2617
+ expect(() => z.toJSONSchema(A, { cycles: "throw" })).toThrowErrorMatchingInlineSnapshot(`
2618
+ [Error: Cycle detected: #/properties/subcategories/items/properties/subcategories/items/<root>
2619
+
2620
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.]
2621
+ `);
2622
+ });