tokentracker-cli 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1112) hide show
  1. package/README.md +3 -0
  2. package/dashboard/dist/app-icon.png +0 -0
  3. package/dashboard/dist/apple-touch-icon.png +0 -0
  4. package/dashboard/dist/assets/DashboardPage-ccDq1oTb.js +12 -0
  5. package/dashboard/dist/assets/LeaderboardPage-BvhBcafd.js +1 -0
  6. package/dashboard/dist/assets/LeaderboardProfilePage-B5Yw_BZM.js +1 -0
  7. package/dashboard/dist/assets/ThemeToggle-CQvh_d2Z.js +1 -0
  8. package/dashboard/dist/assets/leaderboard-columns-COq9DxPJ.js +1 -0
  9. package/dashboard/dist/assets/main-8JBJiGVQ.js +4759 -0
  10. package/dashboard/dist/assets/main-Cwn9_aQV.css +1 -0
  11. package/dashboard/dist/brand-logos/claude-code.svg +3 -0
  12. package/dashboard/dist/brand-logos/codex.svg +3 -0
  13. package/dashboard/dist/brand-logos/cursor.svg +3 -0
  14. package/dashboard/dist/brand-logos/gemini.svg +20 -0
  15. package/dashboard/dist/brand-logos/openclaw.svg +22 -0
  16. package/dashboard/dist/brand-logos/opencode.svg +3 -0
  17. package/dashboard/dist/dashboard-dark.png +0 -0
  18. package/dashboard/dist/favicon-16.png +0 -0
  19. package/dashboard/dist/favicon-32.png +0 -0
  20. package/dashboard/dist/favicon.ico +0 -0
  21. package/dashboard/dist/feed.xml +7 -7
  22. package/dashboard/dist/icon-192.png +0 -0
  23. package/dashboard/dist/icon-512.png +0 -0
  24. package/dashboard/dist/index.html +5 -5
  25. package/dashboard/dist/llms.txt +13 -13
  26. package/dashboard/dist/robots.txt +3 -3
  27. package/dashboard/dist/share.html +2 -2
  28. package/dashboard/dist/sitemap.xml +2 -2
  29. package/package.json +3 -12
  30. package/src/commands/init.js +8 -95
  31. package/src/commands/serve.js +1 -1
  32. package/src/commands/sync.js +106 -153
  33. package/src/lib/activation-check.js +21 -21
  34. package/src/lib/browser-auth.js +1 -1
  35. package/src/lib/doctor.js +0 -13
  36. package/src/lib/gemini-config.js +1 -1
  37. package/src/lib/local-api.js +94 -12
  38. package/src/lib/openclaw-hook.js +8 -8
  39. package/src/lib/openclaw-session-plugin.js +7 -7
  40. package/src/lib/opencode-config.js +1 -1
  41. package/src/lib/opencode-usage-audit.js +1 -1
  42. package/src/lib/rollout.js +9 -15
  43. package/src/lib/runtime-config.js +1 -11
  44. package/dashboard/dist/assets/DashboardPage-DdwohsIv.js +0 -20
  45. package/dashboard/dist/assets/main-BbLvM6ng.js +0 -2044
  46. package/dashboard/dist/assets/main-_qTSxSnU.css +0 -1
  47. package/dashboard/dist/icon.svg +0 -1
  48. package/dashboard/dist/landing-dashboard.jpg +0 -0
  49. package/dashboard/dist/og-image.jpg +0 -0
  50. package/dashboard/dist/share-dashboard.jpg +0 -0
  51. package/dashboard/dist/social-preview.png +0 -0
  52. package/dashboard/dist/wrapped-2025.png +0 -0
  53. package/node_modules/@insforge/sdk/LICENSE +0 -201
  54. package/node_modules/@insforge/sdk/README.md +0 -259
  55. package/node_modules/@insforge/sdk/dist/index.d.mts +0 -854
  56. package/node_modules/@insforge/sdk/dist/index.d.ts +0 -854
  57. package/node_modules/@insforge/sdk/dist/index.js +0 -1823
  58. package/node_modules/@insforge/sdk/dist/index.js.map +0 -1
  59. package/node_modules/@insforge/sdk/dist/index.mjs +0 -1784
  60. package/node_modules/@insforge/sdk/dist/index.mjs.map +0 -1
  61. package/node_modules/@insforge/sdk/package.json +0 -68
  62. package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.d.ts +0 -583
  63. package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.d.ts.map +0 -1
  64. package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.js +0 -111
  65. package/node_modules/@insforge/shared-schemas/dist/ai-api.schema.js.map +0 -1
  66. package/node_modules/@insforge/shared-schemas/dist/ai.schema.d.ts +0 -188
  67. package/node_modules/@insforge/shared-schemas/dist/ai.schema.d.ts.map +0 -1
  68. package/node_modules/@insforge/shared-schemas/dist/ai.schema.js +0 -48
  69. package/node_modules/@insforge/shared-schemas/dist/ai.schema.js.map +0 -1
  70. package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.d.ts +0 -1127
  71. package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.d.ts.map +0 -1
  72. package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.js +0 -277
  73. package/node_modules/@insforge/shared-schemas/dist/auth-api.schema.js.map +0 -1
  74. package/node_modules/@insforge/shared-schemas/dist/auth.schema.d.ts +0 -187
  75. package/node_modules/@insforge/shared-schemas/dist/auth.schema.d.ts.map +0 -1
  76. package/node_modules/@insforge/shared-schemas/dist/auth.schema.js +0 -105
  77. package/node_modules/@insforge/shared-schemas/dist/auth.schema.js.map +0 -1
  78. package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.d.ts +0 -144
  79. package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.d.ts.map +0 -1
  80. package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.js +0 -41
  81. package/node_modules/@insforge/shared-schemas/dist/cloud-events.schema.js.map +0 -1
  82. package/node_modules/@insforge/shared-schemas/dist/database-api.schema.d.ts +0 -1627
  83. package/node_modules/@insforge/shared-schemas/dist/database-api.schema.d.ts.map +0 -1
  84. package/node_modules/@insforge/shared-schemas/dist/database-api.schema.js +0 -209
  85. package/node_modules/@insforge/shared-schemas/dist/database-api.schema.js.map +0 -1
  86. package/node_modules/@insforge/shared-schemas/dist/database.schema.d.ts +0 -263
  87. package/node_modules/@insforge/shared-schemas/dist/database.schema.d.ts.map +0 -1
  88. package/node_modules/@insforge/shared-schemas/dist/database.schema.js +0 -89
  89. package/node_modules/@insforge/shared-schemas/dist/database.schema.js.map +0 -1
  90. package/node_modules/@insforge/shared-schemas/dist/docs.schema.d.ts +0 -4
  91. package/node_modules/@insforge/shared-schemas/dist/docs.schema.d.ts.map +0 -1
  92. package/node_modules/@insforge/shared-schemas/dist/docs.schema.js +0 -22
  93. package/node_modules/@insforge/shared-schemas/dist/docs.schema.js.map +0 -1
  94. package/node_modules/@insforge/shared-schemas/dist/email-api.schema.d.ts +0 -34
  95. package/node_modules/@insforge/shared-schemas/dist/email-api.schema.d.ts.map +0 -1
  96. package/node_modules/@insforge/shared-schemas/dist/email-api.schema.js +0 -24
  97. package/node_modules/@insforge/shared-schemas/dist/email-api.schema.js.map +0 -1
  98. package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.d.ts +0 -39
  99. package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.d.ts.map +0 -1
  100. package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.js +0 -18
  101. package/node_modules/@insforge/shared-schemas/dist/functions-api.schema.js.map +0 -1
  102. package/node_modules/@insforge/shared-schemas/dist/functions.schema.d.ts +0 -34
  103. package/node_modules/@insforge/shared-schemas/dist/functions.schema.d.ts.map +0 -1
  104. package/node_modules/@insforge/shared-schemas/dist/functions.schema.js +0 -14
  105. package/node_modules/@insforge/shared-schemas/dist/functions.schema.js.map +0 -1
  106. package/node_modules/@insforge/shared-schemas/dist/index.d.ts +0 -19
  107. package/node_modules/@insforge/shared-schemas/dist/index.d.ts.map +0 -1
  108. package/node_modules/@insforge/shared-schemas/dist/index.js +0 -19
  109. package/node_modules/@insforge/shared-schemas/dist/index.js.map +0 -1
  110. package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.d.ts +0 -237
  111. package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.d.ts.map +0 -1
  112. package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.js +0 -41
  113. package/node_modules/@insforge/shared-schemas/dist/logs-api.schema.js.map +0 -1
  114. package/node_modules/@insforge/shared-schemas/dist/logs.schema.d.ts +0 -79
  115. package/node_modules/@insforge/shared-schemas/dist/logs.schema.d.ts.map +0 -1
  116. package/node_modules/@insforge/shared-schemas/dist/logs.schema.js +0 -31
  117. package/node_modules/@insforge/shared-schemas/dist/logs.schema.js.map +0 -1
  118. package/node_modules/@insforge/shared-schemas/dist/metadata.schema.d.ts +0 -940
  119. package/node_modules/@insforge/shared-schemas/dist/metadata.schema.d.ts.map +0 -1
  120. package/node_modules/@insforge/shared-schemas/dist/metadata.schema.js +0 -50
  121. package/node_modules/@insforge/shared-schemas/dist/metadata.schema.js.map +0 -1
  122. package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.d.ts +0 -395
  123. package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.d.ts.map +0 -1
  124. package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.js +0 -73
  125. package/node_modules/@insforge/shared-schemas/dist/realtime-api.schema.js.map +0 -1
  126. package/node_modules/@insforge/shared-schemas/dist/realtime.schema.d.ts +0 -269
  127. package/node_modules/@insforge/shared-schemas/dist/realtime.schema.d.ts.map +0 -1
  128. package/node_modules/@insforge/shared-schemas/dist/realtime.schema.js +0 -109
  129. package/node_modules/@insforge/shared-schemas/dist/realtime.schema.js.map +0 -1
  130. package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.d.ts +0 -166
  131. package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.d.ts.map +0 -1
  132. package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.js +0 -49
  133. package/node_modules/@insforge/shared-schemas/dist/storage-api.schema.js.map +0 -1
  134. package/node_modules/@insforge/shared-schemas/dist/storage.schema.d.ts +0 -39
  135. package/node_modules/@insforge/shared-schemas/dist/storage.schema.d.ts.map +0 -1
  136. package/node_modules/@insforge/shared-schemas/dist/storage.schema.js +0 -15
  137. package/node_modules/@insforge/shared-schemas/dist/storage.schema.js.map +0 -1
  138. package/node_modules/@insforge/shared-schemas/package.json +0 -31
  139. package/node_modules/@socket.io/component-emitter/LICENSE +0 -24
  140. package/node_modules/@socket.io/component-emitter/Readme.md +0 -79
  141. package/node_modules/@socket.io/component-emitter/lib/cjs/index.d.ts +0 -179
  142. package/node_modules/@socket.io/component-emitter/lib/cjs/index.js +0 -176
  143. package/node_modules/@socket.io/component-emitter/lib/cjs/package.json +0 -4
  144. package/node_modules/@socket.io/component-emitter/lib/esm/index.d.ts +0 -179
  145. package/node_modules/@socket.io/component-emitter/lib/esm/index.js +0 -169
  146. package/node_modules/@socket.io/component-emitter/lib/esm/package.json +0 -4
  147. package/node_modules/@socket.io/component-emitter/package.json +0 -28
  148. package/node_modules/@supabase/node-fetch/LICENSE.md +0 -22
  149. package/node_modules/@supabase/node-fetch/README.md +0 -633
  150. package/node_modules/@supabase/node-fetch/browser.js +0 -22
  151. package/node_modules/@supabase/node-fetch/lib/index.es.js +0 -1778
  152. package/node_modules/@supabase/node-fetch/lib/index.js +0 -1787
  153. package/node_modules/@supabase/node-fetch/lib/index.mjs +0 -1776
  154. package/node_modules/@supabase/node-fetch/package.json +0 -80
  155. package/node_modules/@supabase/postgrest-js/LICENSE +0 -21
  156. package/node_modules/@supabase/postgrest-js/README.md +0 -56
  157. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.d.ts +0 -71
  158. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.d.ts.map +0 -1
  159. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.js +0 -222
  160. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestBuilder.js.map +0 -1
  161. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.d.ts +0 -74
  162. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.d.ts.map +0 -1
  163. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.js +0 -121
  164. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestClient.js.map +0 -1
  165. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.d.ts +0 -17
  166. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.d.ts.map +0 -1
  167. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.js +0 -18
  168. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestError.js.map +0 -1
  169. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.d.ts +0 -108
  170. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.d.ts.map +0 -1
  171. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.js +0 -381
  172. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestFilterBuilder.js.map +0 -1
  173. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.d.ts +0 -117
  174. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.d.ts.map +0 -1
  175. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.js +0 -251
  176. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestQueryBuilder.js.map +0 -1
  177. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.d.ts +0 -157
  178. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.d.ts.map +0 -1
  179. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.js +0 -226
  180. package/node_modules/@supabase/postgrest-js/dist/cjs/PostgrestTransformBuilder.js.map +0 -1
  181. package/node_modules/@supabase/postgrest-js/dist/cjs/constants.d.ts +0 -4
  182. package/node_modules/@supabase/postgrest-js/dist/cjs/constants.d.ts.map +0 -1
  183. package/node_modules/@supabase/postgrest-js/dist/cjs/constants.js +0 -6
  184. package/node_modules/@supabase/postgrest-js/dist/cjs/constants.js.map +0 -1
  185. package/node_modules/@supabase/postgrest-js/dist/cjs/index.d.ts +0 -19
  186. package/node_modules/@supabase/postgrest-js/dist/cjs/index.d.ts.map +0 -1
  187. package/node_modules/@supabase/postgrest-js/dist/cjs/index.js +0 -28
  188. package/node_modules/@supabase/postgrest-js/dist/cjs/index.js.map +0 -1
  189. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.d.ts +0 -261
  190. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.d.ts.map +0 -1
  191. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.js +0 -5
  192. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/parser.js.map +0 -1
  193. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.d.ts +0 -157
  194. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.d.ts.map +0 -1
  195. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.js +0 -3
  196. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/result.js.map +0 -1
  197. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.d.ts +0 -31
  198. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.d.ts.map +0 -1
  199. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.js +0 -3
  200. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/types.js.map +0 -1
  201. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.d.ts +0 -264
  202. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.d.ts.map +0 -1
  203. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.js +0 -3
  204. package/node_modules/@supabase/postgrest-js/dist/cjs/select-query-parser/utils.js.map +0 -1
  205. package/node_modules/@supabase/postgrest-js/dist/cjs/types.d.ts +0 -106
  206. package/node_modules/@supabase/postgrest-js/dist/cjs/types.d.ts.map +0 -1
  207. package/node_modules/@supabase/postgrest-js/dist/cjs/types.js +0 -3
  208. package/node_modules/@supabase/postgrest-js/dist/cjs/types.js.map +0 -1
  209. package/node_modules/@supabase/postgrest-js/dist/cjs/version.d.ts +0 -2
  210. package/node_modules/@supabase/postgrest-js/dist/cjs/version.d.ts.map +0 -1
  211. package/node_modules/@supabase/postgrest-js/dist/cjs/version.js +0 -5
  212. package/node_modules/@supabase/postgrest-js/dist/cjs/version.js.map +0 -1
  213. package/node_modules/@supabase/postgrest-js/dist/esm/wrapper.mjs +0 -28
  214. package/node_modules/@supabase/postgrest-js/package.json +0 -75
  215. package/node_modules/@supabase/postgrest-js/src/PostgrestBuilder.ts +0 -300
  216. package/node_modules/@supabase/postgrest-js/src/PostgrestClient.ts +0 -192
  217. package/node_modules/@supabase/postgrest-js/src/PostgrestError.ts +0 -18
  218. package/node_modules/@supabase/postgrest-js/src/PostgrestFilterBuilder.ts +0 -604
  219. package/node_modules/@supabase/postgrest-js/src/PostgrestQueryBuilder.ts +0 -437
  220. package/node_modules/@supabase/postgrest-js/src/PostgrestTransformBuilder.ts +0 -368
  221. package/node_modules/@supabase/postgrest-js/src/constants.ts +0 -2
  222. package/node_modules/@supabase/postgrest-js/src/index.ts +0 -35
  223. package/node_modules/@supabase/postgrest-js/src/select-query-parser/parser.ts +0 -469
  224. package/node_modules/@supabase/postgrest-js/src/select-query-parser/result.ts +0 -503
  225. package/node_modules/@supabase/postgrest-js/src/select-query-parser/types.ts +0 -115
  226. package/node_modules/@supabase/postgrest-js/src/select-query-parser/utils.ts +0 -602
  227. package/node_modules/@supabase/postgrest-js/src/types.ts +0 -201
  228. package/node_modules/@supabase/postgrest-js/src/version.ts +0 -1
  229. package/node_modules/debug/LICENSE +0 -20
  230. package/node_modules/debug/README.md +0 -481
  231. package/node_modules/debug/package.json +0 -60
  232. package/node_modules/debug/src/browser.js +0 -271
  233. package/node_modules/debug/src/common.js +0 -274
  234. package/node_modules/debug/src/index.js +0 -10
  235. package/node_modules/debug/src/node.js +0 -263
  236. package/node_modules/engine.io-client/LICENSE +0 -22
  237. package/node_modules/engine.io-client/README.md +0 -331
  238. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.d.ts +0 -3
  239. package/node_modules/engine.io-client/build/cjs/browser-entrypoint.js +0 -4
  240. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.d.ts +0 -1
  241. package/node_modules/engine.io-client/build/cjs/contrib/has-cors.js +0 -14
  242. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.d.ts +0 -15
  243. package/node_modules/engine.io-client/build/cjs/contrib/parseqs.js +0 -38
  244. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.d.ts +0 -1
  245. package/node_modules/engine.io-client/build/cjs/contrib/parseuri.js +0 -67
  246. package/node_modules/engine.io-client/build/cjs/globals.d.ts +0 -4
  247. package/node_modules/engine.io-client/build/cjs/globals.js +0 -26
  248. package/node_modules/engine.io-client/build/cjs/globals.node.d.ts +0 -21
  249. package/node_modules/engine.io-client/build/cjs/globals.node.js +0 -97
  250. package/node_modules/engine.io-client/build/cjs/index.d.ts +0 -15
  251. package/node_modules/engine.io-client/build/cjs/index.js +0 -32
  252. package/node_modules/engine.io-client/build/cjs/package.json +0 -10
  253. package/node_modules/engine.io-client/build/cjs/socket.d.ts +0 -482
  254. package/node_modules/engine.io-client/build/cjs/socket.js +0 -765
  255. package/node_modules/engine.io-client/build/cjs/transport.d.ts +0 -106
  256. package/node_modules/engine.io-client/build/cjs/transport.js +0 -153
  257. package/node_modules/engine.io-client/build/cjs/transports/index.d.ts +0 -8
  258. package/node_modules/engine.io-client/build/cjs/transports/index.js +0 -11
  259. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.d.ts +0 -15
  260. package/node_modules/engine.io-client/build/cjs/transports/polling-fetch.js +0 -60
  261. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.d.ts +0 -108
  262. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.js +0 -285
  263. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.d.ts +0 -11
  264. package/node_modules/engine.io-client/build/cjs/transports/polling-xhr.node.js +0 -44
  265. package/node_modules/engine.io-client/build/cjs/transports/polling.d.ts +0 -52
  266. package/node_modules/engine.io-client/build/cjs/transports/polling.js +0 -165
  267. package/node_modules/engine.io-client/build/cjs/transports/websocket.d.ts +0 -36
  268. package/node_modules/engine.io-client/build/cjs/transports/websocket.js +0 -136
  269. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.d.ts +0 -14
  270. package/node_modules/engine.io-client/build/cjs/transports/websocket.node.js +0 -68
  271. package/node_modules/engine.io-client/build/cjs/transports/webtransport.d.ts +0 -18
  272. package/node_modules/engine.io-client/build/cjs/transports/webtransport.js +0 -94
  273. package/node_modules/engine.io-client/build/cjs/util.d.ts +0 -7
  274. package/node_modules/engine.io-client/build/cjs/util.js +0 -65
  275. package/node_modules/engine.io-client/build/esm/browser-entrypoint.d.ts +0 -3
  276. package/node_modules/engine.io-client/build/esm/browser-entrypoint.js +0 -2
  277. package/node_modules/engine.io-client/build/esm/contrib/has-cors.d.ts +0 -1
  278. package/node_modules/engine.io-client/build/esm/contrib/has-cors.js +0 -11
  279. package/node_modules/engine.io-client/build/esm/contrib/parseqs.d.ts +0 -15
  280. package/node_modules/engine.io-client/build/esm/contrib/parseqs.js +0 -34
  281. package/node_modules/engine.io-client/build/esm/contrib/parseuri.d.ts +0 -1
  282. package/node_modules/engine.io-client/build/esm/contrib/parseuri.js +0 -64
  283. package/node_modules/engine.io-client/build/esm/globals.d.ts +0 -4
  284. package/node_modules/engine.io-client/build/esm/globals.js +0 -22
  285. package/node_modules/engine.io-client/build/esm/globals.node.d.ts +0 -21
  286. package/node_modules/engine.io-client/build/esm/globals.node.js +0 -91
  287. package/node_modules/engine.io-client/build/esm/index.d.ts +0 -15
  288. package/node_modules/engine.io-client/build/esm/index.js +0 -15
  289. package/node_modules/engine.io-client/build/esm/package.json +0 -10
  290. package/node_modules/engine.io-client/build/esm/socket.d.ts +0 -482
  291. package/node_modules/engine.io-client/build/esm/socket.js +0 -727
  292. package/node_modules/engine.io-client/build/esm/transport.d.ts +0 -106
  293. package/node_modules/engine.io-client/build/esm/transport.js +0 -142
  294. package/node_modules/engine.io-client/build/esm/transports/index.d.ts +0 -8
  295. package/node_modules/engine.io-client/build/esm/transports/index.js +0 -8
  296. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.d.ts +0 -15
  297. package/node_modules/engine.io-client/build/esm/transports/polling-fetch.js +0 -56
  298. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.d.ts +0 -108
  299. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +0 -271
  300. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.d.ts +0 -11
  301. package/node_modules/engine.io-client/build/esm/transports/polling-xhr.node.js +0 -17
  302. package/node_modules/engine.io-client/build/esm/transports/polling.d.ts +0 -52
  303. package/node_modules/engine.io-client/build/esm/transports/polling.js +0 -145
  304. package/node_modules/engine.io-client/build/esm/transports/websocket.d.ts +0 -36
  305. package/node_modules/engine.io-client/build/esm/transports/websocket.js +0 -125
  306. package/node_modules/engine.io-client/build/esm/transports/websocket.node.d.ts +0 -14
  307. package/node_modules/engine.io-client/build/esm/transports/websocket.node.js +0 -41
  308. package/node_modules/engine.io-client/build/esm/transports/webtransport.d.ts +0 -18
  309. package/node_modules/engine.io-client/build/esm/transports/webtransport.js +0 -80
  310. package/node_modules/engine.io-client/build/esm/util.d.ts +0 -7
  311. package/node_modules/engine.io-client/build/esm/util.js +0 -59
  312. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.d.ts +0 -3
  313. package/node_modules/engine.io-client/build/esm-debug/browser-entrypoint.js +0 -2
  314. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.d.ts +0 -1
  315. package/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js +0 -11
  316. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.d.ts +0 -15
  317. package/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js +0 -34
  318. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.d.ts +0 -1
  319. package/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js +0 -64
  320. package/node_modules/engine.io-client/build/esm-debug/globals.d.ts +0 -4
  321. package/node_modules/engine.io-client/build/esm-debug/globals.js +0 -22
  322. package/node_modules/engine.io-client/build/esm-debug/globals.node.d.ts +0 -21
  323. package/node_modules/engine.io-client/build/esm-debug/globals.node.js +0 -91
  324. package/node_modules/engine.io-client/build/esm-debug/index.d.ts +0 -15
  325. package/node_modules/engine.io-client/build/esm-debug/index.js +0 -15
  326. package/node_modules/engine.io-client/build/esm-debug/package.json +0 -10
  327. package/node_modules/engine.io-client/build/esm-debug/socket.d.ts +0 -482
  328. package/node_modules/engine.io-client/build/esm-debug/socket.js +0 -756
  329. package/node_modules/engine.io-client/build/esm-debug/transport.d.ts +0 -106
  330. package/node_modules/engine.io-client/build/esm-debug/transport.js +0 -145
  331. package/node_modules/engine.io-client/build/esm-debug/transports/index.d.ts +0 -8
  332. package/node_modules/engine.io-client/build/esm-debug/transports/index.js +0 -8
  333. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.d.ts +0 -15
  334. package/node_modules/engine.io-client/build/esm-debug/transports/polling-fetch.js +0 -56
  335. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.d.ts +0 -108
  336. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js +0 -276
  337. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.d.ts +0 -11
  338. package/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js +0 -17
  339. package/node_modules/engine.io-client/build/esm-debug/transports/polling.d.ts +0 -52
  340. package/node_modules/engine.io-client/build/esm-debug/transports/polling.js +0 -158
  341. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.d.ts +0 -36
  342. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.js +0 -128
  343. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.d.ts +0 -14
  344. package/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js +0 -41
  345. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.d.ts +0 -18
  346. package/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js +0 -87
  347. package/node_modules/engine.io-client/build/esm-debug/util.d.ts +0 -7
  348. package/node_modules/engine.io-client/build/esm-debug/util.js +0 -59
  349. package/node_modules/engine.io-client/dist/engine.io.esm.min.js +0 -7
  350. package/node_modules/engine.io-client/dist/engine.io.esm.min.js.map +0 -1
  351. package/node_modules/engine.io-client/dist/engine.io.js +0 -2968
  352. package/node_modules/engine.io-client/dist/engine.io.js.map +0 -1
  353. package/node_modules/engine.io-client/dist/engine.io.min.js +0 -7
  354. package/node_modules/engine.io-client/dist/engine.io.min.js.map +0 -1
  355. package/node_modules/engine.io-client/package.json +0 -95
  356. package/node_modules/engine.io-parser/LICENSE +0 -22
  357. package/node_modules/engine.io-parser/Readme.md +0 -158
  358. package/node_modules/engine.io-parser/build/cjs/commons.d.ts +0 -14
  359. package/node_modules/engine.io-parser/build/cjs/commons.js +0 -19
  360. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.d.ts +0 -2
  361. package/node_modules/engine.io-parser/build/cjs/contrib/base64-arraybuffer.js +0 -48
  362. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.d.ts +0 -2
  363. package/node_modules/engine.io-parser/build/cjs/decodePacket.browser.js +0 -66
  364. package/node_modules/engine.io-parser/build/cjs/decodePacket.d.ts +0 -2
  365. package/node_modules/engine.io-parser/build/cjs/decodePacket.js +0 -59
  366. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.d.ts +0 -4
  367. package/node_modules/engine.io-parser/build/cjs/encodePacket.browser.js +0 -72
  368. package/node_modules/engine.io-parser/build/cjs/encodePacket.d.ts +0 -3
  369. package/node_modules/engine.io-parser/build/cjs/encodePacket.js +0 -38
  370. package/node_modules/engine.io-parser/build/cjs/index.d.ts +0 -9
  371. package/node_modules/engine.io-parser/build/cjs/index.js +0 -164
  372. package/node_modules/engine.io-parser/build/cjs/package.json +0 -8
  373. package/node_modules/engine.io-parser/build/esm/commons.d.ts +0 -14
  374. package/node_modules/engine.io-parser/build/esm/commons.js +0 -14
  375. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.d.ts +0 -2
  376. package/node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js +0 -43
  377. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.d.ts +0 -2
  378. package/node_modules/engine.io-parser/build/esm/decodePacket.browser.js +0 -62
  379. package/node_modules/engine.io-parser/build/esm/decodePacket.d.ts +0 -2
  380. package/node_modules/engine.io-parser/build/esm/decodePacket.js +0 -55
  381. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.d.ts +0 -4
  382. package/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +0 -68
  383. package/node_modules/engine.io-parser/build/esm/encodePacket.d.ts +0 -3
  384. package/node_modules/engine.io-parser/build/esm/encodePacket.js +0 -33
  385. package/node_modules/engine.io-parser/build/esm/index.d.ts +0 -9
  386. package/node_modules/engine.io-parser/build/esm/index.js +0 -156
  387. package/node_modules/engine.io-parser/build/esm/package.json +0 -8
  388. package/node_modules/engine.io-parser/package.json +0 -46
  389. package/node_modules/ms/index.js +0 -162
  390. package/node_modules/ms/license.md +0 -21
  391. package/node_modules/ms/package.json +0 -38
  392. package/node_modules/ms/readme.md +0 -59
  393. package/node_modules/socket.io-client/LICENSE +0 -21
  394. package/node_modules/socket.io-client/README.md +0 -29
  395. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.d.ts +0 -2
  396. package/node_modules/socket.io-client/build/cjs/browser-entrypoint.js +0 -4
  397. package/node_modules/socket.io-client/build/cjs/contrib/backo2.d.ts +0 -12
  398. package/node_modules/socket.io-client/build/cjs/contrib/backo2.js +0 -69
  399. package/node_modules/socket.io-client/build/cjs/index.d.ts +0 -29
  400. package/node_modules/socket.io-client/build/cjs/index.js +0 -76
  401. package/node_modules/socket.io-client/build/cjs/manager.d.ts +0 -295
  402. package/node_modules/socket.io-client/build/cjs/manager.js +0 -416
  403. package/node_modules/socket.io-client/build/cjs/on.d.ts +0 -2
  404. package/node_modules/socket.io-client/build/cjs/on.js +0 -9
  405. package/node_modules/socket.io-client/build/cjs/socket.d.ts +0 -593
  406. package/node_modules/socket.io-client/build/cjs/socket.js +0 -910
  407. package/node_modules/socket.io-client/build/cjs/url.d.ts +0 -33
  408. package/node_modules/socket.io-client/build/cjs/url.js +0 -69
  409. package/node_modules/socket.io-client/build/esm/browser-entrypoint.d.ts +0 -2
  410. package/node_modules/socket.io-client/build/esm/browser-entrypoint.js +0 -2
  411. package/node_modules/socket.io-client/build/esm/contrib/backo2.d.ts +0 -12
  412. package/node_modules/socket.io-client/build/esm/contrib/backo2.js +0 -66
  413. package/node_modules/socket.io-client/build/esm/index.d.ts +0 -29
  414. package/node_modules/socket.io-client/build/esm/index.js +0 -58
  415. package/node_modules/socket.io-client/build/esm/manager.d.ts +0 -295
  416. package/node_modules/socket.io-client/build/esm/manager.js +0 -367
  417. package/node_modules/socket.io-client/build/esm/on.d.ts +0 -2
  418. package/node_modules/socket.io-client/build/esm/on.js +0 -6
  419. package/node_modules/socket.io-client/build/esm/package.json +0 -5
  420. package/node_modules/socket.io-client/build/esm/socket.d.ts +0 -593
  421. package/node_modules/socket.io-client/build/esm/socket.js +0 -882
  422. package/node_modules/socket.io-client/build/esm/url.d.ts +0 -33
  423. package/node_modules/socket.io-client/build/esm/url.js +0 -59
  424. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.d.ts +0 -2
  425. package/node_modules/socket.io-client/build/esm-debug/browser-entrypoint.js +0 -2
  426. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.d.ts +0 -12
  427. package/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js +0 -66
  428. package/node_modules/socket.io-client/build/esm-debug/index.d.ts +0 -29
  429. package/node_modules/socket.io-client/build/esm-debug/index.js +0 -62
  430. package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +0 -295
  431. package/node_modules/socket.io-client/build/esm-debug/manager.js +0 -386
  432. package/node_modules/socket.io-client/build/esm-debug/on.d.ts +0 -2
  433. package/node_modules/socket.io-client/build/esm-debug/on.js +0 -6
  434. package/node_modules/socket.io-client/build/esm-debug/package.json +0 -5
  435. package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +0 -593
  436. package/node_modules/socket.io-client/build/esm-debug/socket.js +0 -903
  437. package/node_modules/socket.io-client/build/esm-debug/url.d.ts +0 -33
  438. package/node_modules/socket.io-client/build/esm-debug/url.js +0 -63
  439. package/node_modules/socket.io-client/dist/socket.io.esm.min.js +0 -7
  440. package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +0 -1
  441. package/node_modules/socket.io-client/dist/socket.io.js +0 -4908
  442. package/node_modules/socket.io-client/dist/socket.io.js.map +0 -1
  443. package/node_modules/socket.io-client/dist/socket.io.min.js +0 -7
  444. package/node_modules/socket.io-client/dist/socket.io.min.js.map +0 -1
  445. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +0 -7
  446. package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +0 -1
  447. package/node_modules/socket.io-client/package.json +0 -101
  448. package/node_modules/socket.io-parser/LICENSE +0 -20
  449. package/node_modules/socket.io-parser/Readme.md +0 -81
  450. package/node_modules/socket.io-parser/build/cjs/binary.d.ts +0 -20
  451. package/node_modules/socket.io-parser/build/cjs/binary.js +0 -88
  452. package/node_modules/socket.io-parser/build/cjs/index.d.ts +0 -90
  453. package/node_modules/socket.io-parser/build/cjs/index.js +0 -321
  454. package/node_modules/socket.io-parser/build/cjs/is-binary.d.ts +0 -7
  455. package/node_modules/socket.io-parser/build/cjs/is-binary.js +0 -55
  456. package/node_modules/socket.io-parser/build/cjs/package.json +0 -3
  457. package/node_modules/socket.io-parser/build/esm/binary.d.ts +0 -20
  458. package/node_modules/socket.io-parser/build/esm/binary.js +0 -83
  459. package/node_modules/socket.io-parser/build/esm/index.d.ts +0 -90
  460. package/node_modules/socket.io-parser/build/esm/index.js +0 -311
  461. package/node_modules/socket.io-parser/build/esm/is-binary.d.ts +0 -7
  462. package/node_modules/socket.io-parser/build/esm/is-binary.js +0 -50
  463. package/node_modules/socket.io-parser/build/esm/package.json +0 -3
  464. package/node_modules/socket.io-parser/build/esm-debug/binary.d.ts +0 -20
  465. package/node_modules/socket.io-parser/build/esm-debug/binary.js +0 -83
  466. package/node_modules/socket.io-parser/build/esm-debug/index.d.ts +0 -90
  467. package/node_modules/socket.io-parser/build/esm-debug/index.js +0 -316
  468. package/node_modules/socket.io-parser/build/esm-debug/is-binary.d.ts +0 -7
  469. package/node_modules/socket.io-parser/build/esm-debug/is-binary.js +0 -50
  470. package/node_modules/socket.io-parser/build/esm-debug/package.json +0 -3
  471. package/node_modules/socket.io-parser/package.json +0 -58
  472. package/node_modules/tr46/.npmignore +0 -4
  473. package/node_modules/tr46/index.js +0 -193
  474. package/node_modules/tr46/lib/.gitkeep +0 -0
  475. package/node_modules/tr46/lib/mappingTable.json +0 -1
  476. package/node_modules/tr46/package.json +0 -31
  477. package/node_modules/webidl-conversions/LICENSE.md +0 -12
  478. package/node_modules/webidl-conversions/README.md +0 -53
  479. package/node_modules/webidl-conversions/lib/index.js +0 -189
  480. package/node_modules/webidl-conversions/package.json +0 -23
  481. package/node_modules/whatwg-url/LICENSE.txt +0 -21
  482. package/node_modules/whatwg-url/README.md +0 -67
  483. package/node_modules/whatwg-url/lib/URL-impl.js +0 -200
  484. package/node_modules/whatwg-url/lib/URL.js +0 -196
  485. package/node_modules/whatwg-url/lib/public-api.js +0 -11
  486. package/node_modules/whatwg-url/lib/url-state-machine.js +0 -1297
  487. package/node_modules/whatwg-url/lib/utils.js +0 -20
  488. package/node_modules/whatwg-url/package.json +0 -32
  489. package/node_modules/ws/LICENSE +0 -20
  490. package/node_modules/ws/README.md +0 -548
  491. package/node_modules/ws/browser.js +0 -8
  492. package/node_modules/ws/index.js +0 -13
  493. package/node_modules/ws/lib/buffer-util.js +0 -131
  494. package/node_modules/ws/lib/constants.js +0 -12
  495. package/node_modules/ws/lib/event-target.js +0 -292
  496. package/node_modules/ws/lib/extension.js +0 -203
  497. package/node_modules/ws/lib/limiter.js +0 -55
  498. package/node_modules/ws/lib/permessage-deflate.js +0 -514
  499. package/node_modules/ws/lib/receiver.js +0 -704
  500. package/node_modules/ws/lib/sender.js +0 -497
  501. package/node_modules/ws/lib/stream.js +0 -159
  502. package/node_modules/ws/lib/subprotocol.js +0 -62
  503. package/node_modules/ws/lib/validation.js +0 -130
  504. package/node_modules/ws/lib/websocket-server.js +0 -540
  505. package/node_modules/ws/lib/websocket.js +0 -1338
  506. package/node_modules/ws/package.json +0 -69
  507. package/node_modules/ws/wrapper.mjs +0 -8
  508. package/node_modules/xmlhttprequest-ssl/LICENSE +0 -22
  509. package/node_modules/xmlhttprequest-ssl/README.md +0 -67
  510. package/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js +0 -689
  511. package/node_modules/xmlhttprequest-ssl/package.json +0 -40
  512. package/node_modules/zod/LICENSE +0 -21
  513. package/node_modules/zod/README.md +0 -208
  514. package/node_modules/zod/index.cjs +0 -33
  515. package/node_modules/zod/index.d.cts +0 -4
  516. package/node_modules/zod/index.d.ts +0 -4
  517. package/node_modules/zod/index.js +0 -4
  518. package/node_modules/zod/package.json +0 -118
  519. package/node_modules/zod/src/index.ts +0 -4
  520. package/node_modules/zod/src/v3/ZodError.ts +0 -330
  521. package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
  522. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
  523. package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
  524. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
  525. package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
  526. package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
  527. package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
  528. package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
  529. package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
  530. package/node_modules/zod/src/v3/errors.ts +0 -13
  531. package/node_modules/zod/src/v3/external.ts +0 -6
  532. package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
  533. package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
  534. package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
  535. package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
  536. package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
  537. package/node_modules/zod/src/v3/helpers/util.ts +0 -224
  538. package/node_modules/zod/src/v3/index.ts +0 -4
  539. package/node_modules/zod/src/v3/locales/en.ts +0 -124
  540. package/node_modules/zod/src/v3/standard-schema.ts +0 -113
  541. package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
  542. package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
  543. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
  544. package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
  545. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
  546. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
  547. package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
  548. package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
  549. package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
  550. package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
  551. package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
  552. package/node_modules/zod/src/v3/tests/complex.test.ts +0 -56
  553. package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
  554. package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
  555. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
  556. package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
  557. package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
  558. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
  559. package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
  560. package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
  561. package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
  562. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
  563. package/node_modules/zod/src/v3/tests/function.test.ts +0 -257
  564. package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
  565. package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
  566. package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
  567. package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
  568. package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
  569. package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
  570. package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
  571. package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
  572. package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
  573. package/node_modules/zod/src/v3/tests/nan.test.ts +0 -21
  574. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
  575. package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
  576. package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
  577. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
  578. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
  579. package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
  580. package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
  581. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
  582. package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
  583. package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
  584. package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
  585. package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
  586. package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
  587. package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
  588. package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
  589. package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
  590. package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
  591. package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
  592. package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
  593. package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
  594. package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
  595. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
  596. package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
  597. package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
  598. package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
  599. package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
  600. package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
  601. package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
  602. package/node_modules/zod/src/v3/types.ts +0 -5136
  603. package/node_modules/zod/src/v4/classic/checks.ts +0 -30
  604. package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
  605. package/node_modules/zod/src/v4/classic/compat.ts +0 -66
  606. package/node_modules/zod/src/v4/classic/errors.ts +0 -75
  607. package/node_modules/zod/src/v4/classic/external.ts +0 -50
  608. package/node_modules/zod/src/v4/classic/index.ts +0 -5
  609. package/node_modules/zod/src/v4/classic/iso.ts +0 -90
  610. package/node_modules/zod/src/v4/classic/parse.ts +0 -33
  611. package/node_modules/zod/src/v4/classic/schemas.ts +0 -2054
  612. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
  613. package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
  614. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -210
  615. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
  616. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
  617. package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
  618. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
  619. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -63
  620. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -252
  621. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
  622. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
  623. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -352
  624. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
  625. package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -31
  626. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -296
  627. package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -313
  628. package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
  629. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -619
  630. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
  631. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -527
  632. package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
  633. package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -91
  634. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -175
  635. package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -268
  636. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
  637. package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -829
  638. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -34
  639. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -171
  640. package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -108
  641. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
  642. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -92
  643. package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -196
  644. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
  645. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
  646. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -86
  647. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
  648. package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -247
  649. package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -563
  650. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -123
  651. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -147
  652. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -127
  653. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -81
  654. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -37
  655. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -298
  656. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
  657. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
  658. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
  659. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
  660. package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -342
  661. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -356
  662. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -532
  663. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -204
  664. package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -179
  665. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -57
  666. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -109
  667. package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -881
  668. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -66
  669. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -758
  670. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -2314
  671. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -250
  672. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -163
  673. package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -94
  674. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
  675. package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
  676. package/node_modules/zod/src/v4/core/api.ts +0 -1594
  677. package/node_modules/zod/src/v4/core/checks.ts +0 -1283
  678. package/node_modules/zod/src/v4/core/config.ts +0 -15
  679. package/node_modules/zod/src/v4/core/core.ts +0 -134
  680. package/node_modules/zod/src/v4/core/doc.ts +0 -44
  681. package/node_modules/zod/src/v4/core/errors.ts +0 -424
  682. package/node_modules/zod/src/v4/core/function.ts +0 -176
  683. package/node_modules/zod/src/v4/core/index.ts +0 -15
  684. package/node_modules/zod/src/v4/core/json-schema.ts +0 -143
  685. package/node_modules/zod/src/v4/core/parse.ts +0 -94
  686. package/node_modules/zod/src/v4/core/regexes.ts +0 -135
  687. package/node_modules/zod/src/v4/core/registries.ts +0 -96
  688. package/node_modules/zod/src/v4/core/schemas.ts +0 -3842
  689. package/node_modules/zod/src/v4/core/standard-schema.ts +0 -64
  690. package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
  691. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
  692. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
  693. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
  694. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
  695. package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -977
  696. package/node_modules/zod/src/v4/core/util.ts +0 -775
  697. package/node_modules/zod/src/v4/core/versions.ts +0 -5
  698. package/node_modules/zod/src/v4/core/zsf.ts +0 -323
  699. package/node_modules/zod/src/v4/index.ts +0 -4
  700. package/node_modules/zod/src/v4/locales/ar.ts +0 -125
  701. package/node_modules/zod/src/v4/locales/az.ts +0 -121
  702. package/node_modules/zod/src/v4/locales/be.ts +0 -184
  703. package/node_modules/zod/src/v4/locales/ca.ts +0 -127
  704. package/node_modules/zod/src/v4/locales/cs.ts +0 -142
  705. package/node_modules/zod/src/v4/locales/de.ts +0 -124
  706. package/node_modules/zod/src/v4/locales/en.ts +0 -127
  707. package/node_modules/zod/src/v4/locales/eo.ts +0 -125
  708. package/node_modules/zod/src/v4/locales/es.ts +0 -125
  709. package/node_modules/zod/src/v4/locales/fa.ts +0 -134
  710. package/node_modules/zod/src/v4/locales/fi.ts +0 -131
  711. package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -126
  712. package/node_modules/zod/src/v4/locales/fr.ts +0 -124
  713. package/node_modules/zod/src/v4/locales/he.ts +0 -125
  714. package/node_modules/zod/src/v4/locales/hu.ts +0 -126
  715. package/node_modules/zod/src/v4/locales/id.ts +0 -125
  716. package/node_modules/zod/src/v4/locales/index.ts +0 -39
  717. package/node_modules/zod/src/v4/locales/it.ts +0 -125
  718. package/node_modules/zod/src/v4/locales/ja.ts +0 -122
  719. package/node_modules/zod/src/v4/locales/kh.ts +0 -126
  720. package/node_modules/zod/src/v4/locales/ko.ts +0 -131
  721. package/node_modules/zod/src/v4/locales/mk.ts +0 -127
  722. package/node_modules/zod/src/v4/locales/ms.ts +0 -124
  723. package/node_modules/zod/src/v4/locales/nl.ts +0 -126
  724. package/node_modules/zod/src/v4/locales/no.ts +0 -124
  725. package/node_modules/zod/src/v4/locales/ota.ts +0 -125
  726. package/node_modules/zod/src/v4/locales/pl.ts +0 -126
  727. package/node_modules/zod/src/v4/locales/ps.ts +0 -133
  728. package/node_modules/zod/src/v4/locales/pt.ts +0 -123
  729. package/node_modules/zod/src/v4/locales/ru.ts +0 -184
  730. package/node_modules/zod/src/v4/locales/sl.ts +0 -126
  731. package/node_modules/zod/src/v4/locales/sv.ts +0 -127
  732. package/node_modules/zod/src/v4/locales/ta.ts +0 -125
  733. package/node_modules/zod/src/v4/locales/th.ts +0 -126
  734. package/node_modules/zod/src/v4/locales/tr.ts +0 -121
  735. package/node_modules/zod/src/v4/locales/ua.ts +0 -126
  736. package/node_modules/zod/src/v4/locales/ur.ts +0 -126
  737. package/node_modules/zod/src/v4/locales/vi.ts +0 -125
  738. package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -123
  739. package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -125
  740. package/node_modules/zod/src/v4/mini/checks.ts +0 -32
  741. package/node_modules/zod/src/v4/mini/coerce.ts +0 -22
  742. package/node_modules/zod/src/v4/mini/external.ts +0 -40
  743. package/node_modules/zod/src/v4/mini/index.ts +0 -3
  744. package/node_modules/zod/src/v4/mini/iso.ts +0 -62
  745. package/node_modules/zod/src/v4/mini/parse.ts +0 -1
  746. package/node_modules/zod/src/v4/mini/schemas.ts +0 -1579
  747. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
  748. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -51
  749. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
  750. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
  751. package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
  752. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -43
  753. package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -871
  754. package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
  755. package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -185
  756. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
  757. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -275
  758. package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -299
  759. package/node_modules/zod/src/v4-mini/index.ts +0 -1
  760. package/node_modules/zod/v3/ZodError.cjs +0 -138
  761. package/node_modules/zod/v3/ZodError.d.cts +0 -164
  762. package/node_modules/zod/v3/ZodError.d.ts +0 -164
  763. package/node_modules/zod/v3/ZodError.js +0 -133
  764. package/node_modules/zod/v3/errors.cjs +0 -17
  765. package/node_modules/zod/v3/errors.d.cts +0 -5
  766. package/node_modules/zod/v3/errors.d.ts +0 -5
  767. package/node_modules/zod/v3/errors.js +0 -9
  768. package/node_modules/zod/v3/external.cjs +0 -22
  769. package/node_modules/zod/v3/external.d.cts +0 -6
  770. package/node_modules/zod/v3/external.d.ts +0 -6
  771. package/node_modules/zod/v3/external.js +0 -6
  772. package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
  773. package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
  774. package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
  775. package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
  776. package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
  777. package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
  778. package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
  779. package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
  780. package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
  781. package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
  782. package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
  783. package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
  784. package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
  785. package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
  786. package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
  787. package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
  788. package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
  789. package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
  790. package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
  791. package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
  792. package/node_modules/zod/v3/helpers/util.cjs +0 -137
  793. package/node_modules/zod/v3/helpers/util.d.cts +0 -85
  794. package/node_modules/zod/v3/helpers/util.d.ts +0 -85
  795. package/node_modules/zod/v3/helpers/util.js +0 -133
  796. package/node_modules/zod/v3/index.cjs +0 -33
  797. package/node_modules/zod/v3/index.d.cts +0 -4
  798. package/node_modules/zod/v3/index.d.ts +0 -4
  799. package/node_modules/zod/v3/index.js +0 -4
  800. package/node_modules/zod/v3/locales/en.cjs +0 -111
  801. package/node_modules/zod/v3/locales/en.d.cts +0 -3
  802. package/node_modules/zod/v3/locales/en.d.ts +0 -3
  803. package/node_modules/zod/v3/locales/en.js +0 -109
  804. package/node_modules/zod/v3/standard-schema.cjs +0 -2
  805. package/node_modules/zod/v3/standard-schema.d.cts +0 -102
  806. package/node_modules/zod/v3/standard-schema.d.ts +0 -102
  807. package/node_modules/zod/v3/standard-schema.js +0 -1
  808. package/node_modules/zod/v3/types.cjs +0 -3775
  809. package/node_modules/zod/v3/types.d.cts +0 -1031
  810. package/node_modules/zod/v3/types.d.ts +0 -1031
  811. package/node_modules/zod/v3/types.js +0 -3693
  812. package/node_modules/zod/v4/classic/checks.cjs +0 -32
  813. package/node_modules/zod/v4/classic/checks.d.cts +0 -1
  814. package/node_modules/zod/v4/classic/checks.d.ts +0 -1
  815. package/node_modules/zod/v4/classic/checks.js +0 -1
  816. package/node_modules/zod/v4/classic/coerce.cjs +0 -47
  817. package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
  818. package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
  819. package/node_modules/zod/v4/classic/coerce.js +0 -17
  820. package/node_modules/zod/v4/classic/compat.cjs +0 -57
  821. package/node_modules/zod/v4/classic/compat.d.cts +0 -46
  822. package/node_modules/zod/v4/classic/compat.d.ts +0 -46
  823. package/node_modules/zod/v4/classic/compat.js +0 -27
  824. package/node_modules/zod/v4/classic/errors.cjs +0 -67
  825. package/node_modules/zod/v4/classic/errors.d.cts +0 -30
  826. package/node_modules/zod/v4/classic/errors.d.ts +0 -30
  827. package/node_modules/zod/v4/classic/errors.js +0 -41
  828. package/node_modules/zod/v4/classic/external.cjs +0 -70
  829. package/node_modules/zod/v4/classic/external.d.cts +0 -13
  830. package/node_modules/zod/v4/classic/external.d.ts +0 -13
  831. package/node_modules/zod/v4/classic/external.js +0 -18
  832. package/node_modules/zod/v4/classic/index.cjs +0 -33
  833. package/node_modules/zod/v4/classic/index.d.cts +0 -4
  834. package/node_modules/zod/v4/classic/index.d.ts +0 -4
  835. package/node_modules/zod/v4/classic/index.js +0 -4
  836. package/node_modules/zod/v4/classic/iso.cjs +0 -60
  837. package/node_modules/zod/v4/classic/iso.d.cts +0 -22
  838. package/node_modules/zod/v4/classic/iso.d.ts +0 -22
  839. package/node_modules/zod/v4/classic/iso.js +0 -30
  840. package/node_modules/zod/v4/classic/parse.cjs +0 -32
  841. package/node_modules/zod/v4/classic/parse.d.cts +0 -23
  842. package/node_modules/zod/v4/classic/parse.d.ts +0 -23
  843. package/node_modules/zod/v4/classic/parse.js +0 -6
  844. package/node_modules/zod/v4/classic/schemas.cjs +0 -1109
  845. package/node_modules/zod/v4/classic/schemas.d.cts +0 -630
  846. package/node_modules/zod/v4/classic/schemas.d.ts +0 -630
  847. package/node_modules/zod/v4/classic/schemas.js +0 -1006
  848. package/node_modules/zod/v4/core/api.cjs +0 -1039
  849. package/node_modules/zod/v4/core/api.d.cts +0 -284
  850. package/node_modules/zod/v4/core/api.d.ts +0 -284
  851. package/node_modules/zod/v4/core/api.js +0 -906
  852. package/node_modules/zod/v4/core/checks.cjs +0 -591
  853. package/node_modules/zod/v4/core/checks.d.cts +0 -278
  854. package/node_modules/zod/v4/core/checks.d.ts +0 -278
  855. package/node_modules/zod/v4/core/checks.js +0 -565
  856. package/node_modules/zod/v4/core/core.cjs +0 -67
  857. package/node_modules/zod/v4/core/core.d.cts +0 -49
  858. package/node_modules/zod/v4/core/core.d.ts +0 -49
  859. package/node_modules/zod/v4/core/core.js +0 -61
  860. package/node_modules/zod/v4/core/doc.cjs +0 -39
  861. package/node_modules/zod/v4/core/doc.d.cts +0 -14
  862. package/node_modules/zod/v4/core/doc.d.ts +0 -14
  863. package/node_modules/zod/v4/core/doc.js +0 -35
  864. package/node_modules/zod/v4/core/errors.cjs +0 -226
  865. package/node_modules/zod/v4/core/errors.d.cts +0 -208
  866. package/node_modules/zod/v4/core/errors.d.ts +0 -208
  867. package/node_modules/zod/v4/core/errors.js +0 -195
  868. package/node_modules/zod/v4/core/function.cjs +0 -102
  869. package/node_modules/zod/v4/core/function.d.cts +0 -52
  870. package/node_modules/zod/v4/core/function.d.ts +0 -52
  871. package/node_modules/zod/v4/core/function.js +0 -75
  872. package/node_modules/zod/v4/core/index.cjs +0 -44
  873. package/node_modules/zod/v4/core/index.d.cts +0 -15
  874. package/node_modules/zod/v4/core/index.d.ts +0 -15
  875. package/node_modules/zod/v4/core/index.js +0 -15
  876. package/node_modules/zod/v4/core/json-schema.cjs +0 -2
  877. package/node_modules/zod/v4/core/json-schema.d.cts +0 -87
  878. package/node_modules/zod/v4/core/json-schema.d.ts +0 -87
  879. package/node_modules/zod/v4/core/json-schema.js +0 -1
  880. package/node_modules/zod/v4/core/parse.cjs +0 -87
  881. package/node_modules/zod/v4/core/parse.d.cts +0 -25
  882. package/node_modules/zod/v4/core/parse.d.ts +0 -25
  883. package/node_modules/zod/v4/core/parse.js +0 -57
  884. package/node_modules/zod/v4/core/regexes.cjs +0 -103
  885. package/node_modules/zod/v4/core/regexes.d.cts +0 -62
  886. package/node_modules/zod/v4/core/regexes.d.ts +0 -62
  887. package/node_modules/zod/v4/core/regexes.js +0 -95
  888. package/node_modules/zod/v4/core/registries.cjs +0 -56
  889. package/node_modules/zod/v4/core/registries.d.cts +0 -35
  890. package/node_modules/zod/v4/core/registries.d.ts +0 -35
  891. package/node_modules/zod/v4/core/registries.js +0 -51
  892. package/node_modules/zod/v4/core/schemas.cjs +0 -1748
  893. package/node_modules/zod/v4/core/schemas.d.cts +0 -1041
  894. package/node_modules/zod/v4/core/schemas.d.ts +0 -1041
  895. package/node_modules/zod/v4/core/schemas.js +0 -1717
  896. package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
  897. package/node_modules/zod/v4/core/standard-schema.d.cts +0 -55
  898. package/node_modules/zod/v4/core/standard-schema.d.ts +0 -55
  899. package/node_modules/zod/v4/core/standard-schema.js +0 -1
  900. package/node_modules/zod/v4/core/to-json-schema.cjs +0 -854
  901. package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -88
  902. package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -88
  903. package/node_modules/zod/v4/core/to-json-schema.js +0 -849
  904. package/node_modules/zod/v4/core/util.cjs +0 -539
  905. package/node_modules/zod/v4/core/util.d.cts +0 -183
  906. package/node_modules/zod/v4/core/util.d.ts +0 -183
  907. package/node_modules/zod/v4/core/util.js +0 -493
  908. package/node_modules/zod/v4/core/versions.cjs +0 -8
  909. package/node_modules/zod/v4/core/versions.d.cts +0 -5
  910. package/node_modules/zod/v4/core/versions.d.ts +0 -5
  911. package/node_modules/zod/v4/core/versions.js +0 -5
  912. package/node_modules/zod/v4/index.cjs +0 -22
  913. package/node_modules/zod/v4/index.d.cts +0 -3
  914. package/node_modules/zod/v4/index.d.ts +0 -3
  915. package/node_modules/zod/v4/index.js +0 -3
  916. package/node_modules/zod/v4/locales/ar.cjs +0 -142
  917. package/node_modules/zod/v4/locales/ar.d.cts +0 -4
  918. package/node_modules/zod/v4/locales/ar.d.ts +0 -4
  919. package/node_modules/zod/v4/locales/ar.js +0 -116
  920. package/node_modules/zod/v4/locales/az.cjs +0 -141
  921. package/node_modules/zod/v4/locales/az.d.cts +0 -4
  922. package/node_modules/zod/v4/locales/az.d.ts +0 -4
  923. package/node_modules/zod/v4/locales/az.js +0 -115
  924. package/node_modules/zod/v4/locales/be.cjs +0 -190
  925. package/node_modules/zod/v4/locales/be.d.cts +0 -4
  926. package/node_modules/zod/v4/locales/be.d.ts +0 -4
  927. package/node_modules/zod/v4/locales/be.js +0 -164
  928. package/node_modules/zod/v4/locales/ca.cjs +0 -144
  929. package/node_modules/zod/v4/locales/ca.d.cts +0 -4
  930. package/node_modules/zod/v4/locales/ca.d.ts +0 -4
  931. package/node_modules/zod/v4/locales/ca.js +0 -118
  932. package/node_modules/zod/v4/locales/cs.cjs +0 -161
  933. package/node_modules/zod/v4/locales/cs.d.cts +0 -4
  934. package/node_modules/zod/v4/locales/cs.d.ts +0 -4
  935. package/node_modules/zod/v4/locales/cs.js +0 -135
  936. package/node_modules/zod/v4/locales/de.cjs +0 -142
  937. package/node_modules/zod/v4/locales/de.d.cts +0 -4
  938. package/node_modules/zod/v4/locales/de.d.ts +0 -4
  939. package/node_modules/zod/v4/locales/de.js +0 -116
  940. package/node_modules/zod/v4/locales/en.cjs +0 -145
  941. package/node_modules/zod/v4/locales/en.d.cts +0 -5
  942. package/node_modules/zod/v4/locales/en.d.ts +0 -5
  943. package/node_modules/zod/v4/locales/en.js +0 -117
  944. package/node_modules/zod/v4/locales/eo.cjs +0 -144
  945. package/node_modules/zod/v4/locales/eo.d.cts +0 -5
  946. package/node_modules/zod/v4/locales/eo.d.ts +0 -5
  947. package/node_modules/zod/v4/locales/eo.js +0 -116
  948. package/node_modules/zod/v4/locales/es.cjs +0 -143
  949. package/node_modules/zod/v4/locales/es.d.cts +0 -4
  950. package/node_modules/zod/v4/locales/es.d.ts +0 -4
  951. package/node_modules/zod/v4/locales/es.js +0 -117
  952. package/node_modules/zod/v4/locales/fa.cjs +0 -148
  953. package/node_modules/zod/v4/locales/fa.d.cts +0 -4
  954. package/node_modules/zod/v4/locales/fa.d.ts +0 -4
  955. package/node_modules/zod/v4/locales/fa.js +0 -122
  956. package/node_modules/zod/v4/locales/fi.cjs +0 -148
  957. package/node_modules/zod/v4/locales/fi.d.cts +0 -4
  958. package/node_modules/zod/v4/locales/fi.d.ts +0 -4
  959. package/node_modules/zod/v4/locales/fi.js +0 -122
  960. package/node_modules/zod/v4/locales/fr-CA.cjs +0 -143
  961. package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -4
  962. package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
  963. package/node_modules/zod/v4/locales/fr-CA.js +0 -117
  964. package/node_modules/zod/v4/locales/fr.cjs +0 -142
  965. package/node_modules/zod/v4/locales/fr.d.cts +0 -4
  966. package/node_modules/zod/v4/locales/fr.d.ts +0 -4
  967. package/node_modules/zod/v4/locales/fr.js +0 -116
  968. package/node_modules/zod/v4/locales/he.cjs +0 -143
  969. package/node_modules/zod/v4/locales/he.d.cts +0 -4
  970. package/node_modules/zod/v4/locales/he.d.ts +0 -4
  971. package/node_modules/zod/v4/locales/he.js +0 -117
  972. package/node_modules/zod/v4/locales/hu.cjs +0 -143
  973. package/node_modules/zod/v4/locales/hu.d.cts +0 -4
  974. package/node_modules/zod/v4/locales/hu.d.ts +0 -4
  975. package/node_modules/zod/v4/locales/hu.js +0 -117
  976. package/node_modules/zod/v4/locales/id.cjs +0 -142
  977. package/node_modules/zod/v4/locales/id.d.cts +0 -4
  978. package/node_modules/zod/v4/locales/id.d.ts +0 -4
  979. package/node_modules/zod/v4/locales/id.js +0 -116
  980. package/node_modules/zod/v4/locales/index.cjs +0 -84
  981. package/node_modules/zod/v4/locales/index.d.cts +0 -39
  982. package/node_modules/zod/v4/locales/index.d.ts +0 -39
  983. package/node_modules/zod/v4/locales/index.js +0 -39
  984. package/node_modules/zod/v4/locales/it.cjs +0 -143
  985. package/node_modules/zod/v4/locales/it.d.cts +0 -4
  986. package/node_modules/zod/v4/locales/it.d.ts +0 -4
  987. package/node_modules/zod/v4/locales/it.js +0 -117
  988. package/node_modules/zod/v4/locales/ja.cjs +0 -141
  989. package/node_modules/zod/v4/locales/ja.d.cts +0 -4
  990. package/node_modules/zod/v4/locales/ja.d.ts +0 -4
  991. package/node_modules/zod/v4/locales/ja.js +0 -115
  992. package/node_modules/zod/v4/locales/kh.cjs +0 -143
  993. package/node_modules/zod/v4/locales/kh.d.cts +0 -4
  994. package/node_modules/zod/v4/locales/kh.d.ts +0 -4
  995. package/node_modules/zod/v4/locales/kh.js +0 -117
  996. package/node_modules/zod/v4/locales/ko.cjs +0 -147
  997. package/node_modules/zod/v4/locales/ko.d.cts +0 -4
  998. package/node_modules/zod/v4/locales/ko.d.ts +0 -4
  999. package/node_modules/zod/v4/locales/ko.js +0 -121
  1000. package/node_modules/zod/v4/locales/mk.cjs +0 -144
  1001. package/node_modules/zod/v4/locales/mk.d.cts +0 -4
  1002. package/node_modules/zod/v4/locales/mk.d.ts +0 -4
  1003. package/node_modules/zod/v4/locales/mk.js +0 -118
  1004. package/node_modules/zod/v4/locales/ms.cjs +0 -142
  1005. package/node_modules/zod/v4/locales/ms.d.cts +0 -4
  1006. package/node_modules/zod/v4/locales/ms.d.ts +0 -4
  1007. package/node_modules/zod/v4/locales/ms.js +0 -116
  1008. package/node_modules/zod/v4/locales/nl.cjs +0 -143
  1009. package/node_modules/zod/v4/locales/nl.d.cts +0 -4
  1010. package/node_modules/zod/v4/locales/nl.d.ts +0 -4
  1011. package/node_modules/zod/v4/locales/nl.js +0 -117
  1012. package/node_modules/zod/v4/locales/no.cjs +0 -142
  1013. package/node_modules/zod/v4/locales/no.d.cts +0 -4
  1014. package/node_modules/zod/v4/locales/no.d.ts +0 -4
  1015. package/node_modules/zod/v4/locales/no.js +0 -116
  1016. package/node_modules/zod/v4/locales/ota.cjs +0 -143
  1017. package/node_modules/zod/v4/locales/ota.d.cts +0 -4
  1018. package/node_modules/zod/v4/locales/ota.d.ts +0 -4
  1019. package/node_modules/zod/v4/locales/ota.js +0 -117
  1020. package/node_modules/zod/v4/locales/pl.cjs +0 -143
  1021. package/node_modules/zod/v4/locales/pl.d.cts +0 -4
  1022. package/node_modules/zod/v4/locales/pl.d.ts +0 -4
  1023. package/node_modules/zod/v4/locales/pl.js +0 -117
  1024. package/node_modules/zod/v4/locales/ps.cjs +0 -148
  1025. package/node_modules/zod/v4/locales/ps.d.cts +0 -4
  1026. package/node_modules/zod/v4/locales/ps.d.ts +0 -4
  1027. package/node_modules/zod/v4/locales/ps.js +0 -122
  1028. package/node_modules/zod/v4/locales/pt.cjs +0 -142
  1029. package/node_modules/zod/v4/locales/pt.d.cts +0 -4
  1030. package/node_modules/zod/v4/locales/pt.d.ts +0 -4
  1031. package/node_modules/zod/v4/locales/pt.js +0 -116
  1032. package/node_modules/zod/v4/locales/ru.cjs +0 -190
  1033. package/node_modules/zod/v4/locales/ru.d.cts +0 -4
  1034. package/node_modules/zod/v4/locales/ru.d.ts +0 -4
  1035. package/node_modules/zod/v4/locales/ru.js +0 -164
  1036. package/node_modules/zod/v4/locales/sl.cjs +0 -143
  1037. package/node_modules/zod/v4/locales/sl.d.cts +0 -4
  1038. package/node_modules/zod/v4/locales/sl.d.ts +0 -4
  1039. package/node_modules/zod/v4/locales/sl.js +0 -117
  1040. package/node_modules/zod/v4/locales/sv.cjs +0 -144
  1041. package/node_modules/zod/v4/locales/sv.d.cts +0 -4
  1042. package/node_modules/zod/v4/locales/sv.d.ts +0 -4
  1043. package/node_modules/zod/v4/locales/sv.js +0 -118
  1044. package/node_modules/zod/v4/locales/ta.cjs +0 -143
  1045. package/node_modules/zod/v4/locales/ta.d.cts +0 -4
  1046. package/node_modules/zod/v4/locales/ta.d.ts +0 -4
  1047. package/node_modules/zod/v4/locales/ta.js +0 -117
  1048. package/node_modules/zod/v4/locales/th.cjs +0 -143
  1049. package/node_modules/zod/v4/locales/th.d.cts +0 -4
  1050. package/node_modules/zod/v4/locales/th.d.ts +0 -4
  1051. package/node_modules/zod/v4/locales/th.js +0 -117
  1052. package/node_modules/zod/v4/locales/tr.cjs +0 -143
  1053. package/node_modules/zod/v4/locales/tr.d.cts +0 -5
  1054. package/node_modules/zod/v4/locales/tr.d.ts +0 -5
  1055. package/node_modules/zod/v4/locales/tr.js +0 -115
  1056. package/node_modules/zod/v4/locales/ua.cjs +0 -143
  1057. package/node_modules/zod/v4/locales/ua.d.cts +0 -4
  1058. package/node_modules/zod/v4/locales/ua.d.ts +0 -4
  1059. package/node_modules/zod/v4/locales/ua.js +0 -117
  1060. package/node_modules/zod/v4/locales/ur.cjs +0 -143
  1061. package/node_modules/zod/v4/locales/ur.d.cts +0 -4
  1062. package/node_modules/zod/v4/locales/ur.d.ts +0 -4
  1063. package/node_modules/zod/v4/locales/ur.js +0 -117
  1064. package/node_modules/zod/v4/locales/vi.cjs +0 -142
  1065. package/node_modules/zod/v4/locales/vi.d.cts +0 -4
  1066. package/node_modules/zod/v4/locales/vi.d.ts +0 -4
  1067. package/node_modules/zod/v4/locales/vi.js +0 -116
  1068. package/node_modules/zod/v4/locales/zh-CN.cjs +0 -142
  1069. package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -4
  1070. package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
  1071. package/node_modules/zod/v4/locales/zh-CN.js +0 -116
  1072. package/node_modules/zod/v4/locales/zh-TW.cjs +0 -143
  1073. package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -4
  1074. package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
  1075. package/node_modules/zod/v4/locales/zh-TW.js +0 -117
  1076. package/node_modules/zod/v4/mini/checks.cjs +0 -34
  1077. package/node_modules/zod/v4/mini/checks.d.cts +0 -1
  1078. package/node_modules/zod/v4/mini/checks.d.ts +0 -1
  1079. package/node_modules/zod/v4/mini/checks.js +0 -1
  1080. package/node_modules/zod/v4/mini/coerce.cjs +0 -47
  1081. package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
  1082. package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
  1083. package/node_modules/zod/v4/mini/coerce.js +0 -17
  1084. package/node_modules/zod/v4/mini/external.cjs +0 -62
  1085. package/node_modules/zod/v4/mini/external.d.cts +0 -11
  1086. package/node_modules/zod/v4/mini/external.d.ts +0 -11
  1087. package/node_modules/zod/v4/mini/external.js +0 -13
  1088. package/node_modules/zod/v4/mini/index.cjs +0 -32
  1089. package/node_modules/zod/v4/mini/index.d.cts +0 -3
  1090. package/node_modules/zod/v4/mini/index.d.ts +0 -3
  1091. package/node_modules/zod/v4/mini/index.js +0 -3
  1092. package/node_modules/zod/v4/mini/iso.cjs +0 -60
  1093. package/node_modules/zod/v4/mini/iso.d.cts +0 -22
  1094. package/node_modules/zod/v4/mini/iso.d.ts +0 -22
  1095. package/node_modules/zod/v4/mini/iso.js +0 -30
  1096. package/node_modules/zod/v4/mini/parse.cjs +0 -8
  1097. package/node_modules/zod/v4/mini/parse.d.cts +0 -1
  1098. package/node_modules/zod/v4/mini/parse.d.ts +0 -1
  1099. package/node_modules/zod/v4/mini/parse.js +0 -1
  1100. package/node_modules/zod/v4/mini/schemas.cjs +0 -839
  1101. package/node_modules/zod/v4/mini/schemas.d.cts +0 -356
  1102. package/node_modules/zod/v4/mini/schemas.d.ts +0 -356
  1103. package/node_modules/zod/v4/mini/schemas.js +0 -732
  1104. package/node_modules/zod/v4-mini/index.cjs +0 -17
  1105. package/node_modules/zod/v4-mini/index.d.cts +0 -1
  1106. package/node_modules/zod/v4-mini/index.d.ts +0 -1
  1107. package/node_modules/zod/v4-mini/index.js +0 -1
  1108. package/src/lib/insforge-client.js +0 -79
  1109. package/src/lib/insforge.js +0 -29
  1110. package/src/lib/uploader.js +0 -224
  1111. package/src/lib/vibeusage-api.js +0 -243
  1112. package/src/lib/vibeusage-public-repo.js +0 -105
@@ -1,2054 +0,0 @@
1
- import * as core from "../core/index.js";
2
- import { util } from "../core/index.js";
3
-
4
- import * as checks from "./checks.js";
5
- import * as iso from "./iso.js";
6
- import * as parse from "./parse.js";
7
-
8
- ///////////////////////////////////////////
9
- ///////////////////////////////////////////
10
- //////////// ////////////
11
- //////////// ZodType ////////////
12
- //////////// ////////////
13
- ///////////////////////////////////////////
14
- ///////////////////////////////////////////
15
-
16
- export interface RefinementCtx<T = unknown> extends core.ParsePayload<T> {
17
- addIssue(arg: string | core.$ZodRawIssue | Partial<core.$ZodIssueCustom>): void;
18
- }
19
-
20
- export interface ZodType<
21
- out Output = unknown,
22
- out Input = unknown,
23
- out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>,
24
- > extends core.$ZodType<Output, Input, Internals> {
25
- def: Internals["def"];
26
- type: Internals["def"]["type"];
27
-
28
- /** @deprecated Use `.def` instead. */
29
- _def: Internals["def"];
30
- /** @deprecated Use `z.output<typeof schema>` instead. */
31
- _output: Internals["output"];
32
- /** @deprecated Use `z.input<typeof schema>` instead. */
33
- _input: Internals["input"];
34
-
35
- // base methods
36
- check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
37
- clone(def?: Internals["def"], params?: { parent: boolean }): this;
38
- register<R extends core.$ZodRegistry>(
39
- registry: R,
40
- ...meta: this extends R["_schema"]
41
- ? undefined extends R["_meta"]
42
- ? [core.$replace<R["_meta"], this>?]
43
- : [core.$replace<R["_meta"], this>]
44
- : ["Incompatible schema"]
45
- ): this;
46
-
47
- brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : core.$ZodBranded<this, T>;
48
-
49
- // parsing
50
- parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
51
- safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): parse.ZodSafeParseResult<core.output<this>>;
52
- parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
53
- safeParseAsync(
54
- data: unknown,
55
- params?: core.ParseContext<core.$ZodIssue>
56
- ): Promise<parse.ZodSafeParseResult<core.output<this>>>;
57
- spa: (
58
- data: unknown,
59
- params?: core.ParseContext<core.$ZodIssue>
60
- ) => Promise<parse.ZodSafeParseResult<core.output<this>>>;
61
-
62
- // refinements
63
- refine(check: (arg: core.output<this>) => unknown | Promise<unknown>, params?: string | core.$ZodCustomParams): this;
64
- /** @deprecated Use `.check()` instead. */
65
- superRefine(
66
- refinement: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => void | Promise<void>
67
- ): this;
68
- overwrite(fn: (x: core.output<this>) => core.output<this>): this;
69
-
70
- // wrappers
71
- optional(): ZodOptional<this>;
72
- nonoptional(params?: string | core.$ZodNonOptionalParams): ZodNonOptional<this>;
73
- nullable(): ZodNullable<this>;
74
- nullish(): ZodOptional<ZodNullable<this>>;
75
- default(def: core.output<this>): ZodDefault<this>;
76
- default(def: () => util.NoUndefined<core.output<this>>): ZodDefault<this>;
77
- prefault(def: () => core.input<this>): ZodPrefault<this>;
78
- prefault(def: core.input<this>): ZodPrefault<this>;
79
- array(): ZodArray<this>;
80
- or<T extends core.SomeType>(option: T): ZodUnion<[this, T]>;
81
- and<T extends core.SomeType>(incoming: T): ZodIntersection<this, T>;
82
- transform<NewOut>(
83
- transform: (arg: core.output<this>, ctx: RefinementCtx<core.output<this>>) => NewOut | Promise<NewOut>
84
- ): ZodPipe<this, ZodTransform<Awaited<NewOut>, core.output<this>>>;
85
- catch(def: core.output<this>): ZodCatch<this>;
86
- catch(def: (ctx: core.$ZodCatchCtx) => core.output<this>): ZodCatch<this>;
87
- pipe<T extends core.$ZodType<any, core.output<this>>>(
88
- target: T | core.$ZodType<any, core.output<this>>
89
- ): ZodPipe<this, T>;
90
- readonly(): ZodReadonly<this>;
91
-
92
- /** Returns a new instance that has been registered in `z.globalRegistry` with the specified description */
93
- describe(description: string): this;
94
- description?: string;
95
- /** Returns the metadata associated with this instance in `z.globalRegistry` */
96
- meta(): core.$replace<core.GlobalMeta, this> | undefined;
97
- /** Returns a new instance that has been registered in `z.globalRegistry` with the specified metadata */
98
- meta(data: core.$replace<core.GlobalMeta, this>): this;
99
-
100
- // helpers
101
- /** @deprecated Try safe-parsing `undefined` (this is what `isOptional` does internally):
102
- *
103
- * ```ts
104
- * const schema = z.string().optional();
105
- * const isOptional = schema.safeParse(undefined).success; // true
106
- * ```
107
- */
108
- isOptional(): boolean;
109
- /**
110
- * @deprecated Try safe-parsing `null` (this is what `isNullable` does internally):
111
- *
112
- * ```ts
113
- * const schema = z.string().nullable();
114
- * const isNullable = schema.safeParse(null).success; // true
115
- * ```
116
- */
117
- isNullable(): boolean;
118
- }
119
-
120
- export interface _ZodType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals>
121
- extends ZodType<any, any, Internals> {}
122
-
123
- export const ZodType: core.$constructor<ZodType> = /*@__PURE__*/ core.$constructor("ZodType", (inst, def) => {
124
- core.$ZodType.init(inst, def);
125
- inst.def = def;
126
- Object.defineProperty(inst, "_def", { value: def });
127
-
128
- // base methods
129
- inst.check = (...checks) => {
130
- return inst.clone(
131
- {
132
- ...def,
133
- checks: [
134
- ...(def.checks ?? []),
135
- ...checks.map((ch) =>
136
- typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch
137
- ),
138
- ],
139
- }
140
- // { parent: true }
141
- );
142
- };
143
- inst.clone = (def, params) => core.clone(inst, def, params);
144
- inst.brand = () => inst as any;
145
- inst.register = ((reg: any, meta: any) => {
146
- reg.add(inst, meta);
147
- return inst;
148
- }) as any;
149
-
150
- // parsing
151
- inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
152
- inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
153
- inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
154
- inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
155
- inst.spa = inst.safeParseAsync;
156
-
157
- // refinements
158
- inst.refine = (check, params) => inst.check(refine(check, params));
159
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
160
- inst.overwrite = (fn) => inst.check(checks.overwrite(fn));
161
-
162
- // wrappers
163
- inst.optional = () => optional(inst);
164
- inst.nullable = () => nullable(inst);
165
- inst.nullish = () => optional(nullable(inst));
166
- inst.nonoptional = (params) => nonoptional(inst, params);
167
- inst.array = () => array(inst);
168
- inst.or = (arg) => union([inst, arg]);
169
- inst.and = (arg) => intersection(inst, arg);
170
- inst.transform = (tx) => pipe(inst, transform(tx as any)) as never;
171
- inst.default = (def) => _default(inst, def);
172
- inst.prefault = (def) => prefault(inst, def);
173
- // inst.coalesce = (def, params) => coalesce(inst, def, params);
174
- inst.catch = (params) => _catch(inst, params);
175
- inst.pipe = (target) => pipe(inst, target);
176
- inst.readonly = () => readonly(inst);
177
-
178
- // meta
179
- inst.describe = (description) => {
180
- const cl = inst.clone();
181
- core.globalRegistry.add(cl, { description });
182
- return cl;
183
- };
184
- Object.defineProperty(inst, "description", {
185
- get() {
186
- return core.globalRegistry.get(inst)?.description;
187
- },
188
- configurable: true,
189
- });
190
- inst.meta = (...args: any) => {
191
- if (args.length === 0) {
192
- return core.globalRegistry.get(inst);
193
- }
194
- const cl = inst.clone();
195
- core.globalRegistry.add(cl, args[0]);
196
- return cl as any;
197
- };
198
-
199
- // helpers
200
- inst.isOptional = () => inst.safeParse(undefined).success;
201
- inst.isNullable = () => inst.safeParse(null).success;
202
- return inst;
203
- });
204
-
205
- // ZodString
206
- export interface _ZodString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>>
207
- extends _ZodType<T> {
208
- format: string | null;
209
- minLength: number | null;
210
- maxLength: number | null;
211
-
212
- // miscellaneous checks
213
- regex(regex: RegExp, params?: string | core.$ZodCheckRegexParams): this;
214
- includes(value: string, params?: core.$ZodCheckIncludesParams): this;
215
- startsWith(value: string, params?: string | core.$ZodCheckStartsWithParams): this;
216
- endsWith(value: string, params?: string | core.$ZodCheckEndsWithParams): this;
217
- min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
218
- max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
219
- length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
220
- nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
221
- lowercase(params?: string | core.$ZodCheckLowerCaseParams): this;
222
- uppercase(params?: string | core.$ZodCheckUpperCaseParams): this;
223
-
224
- // transforms
225
- trim(): this;
226
- normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): this;
227
- toLowerCase(): this;
228
- toUpperCase(): this;
229
- }
230
-
231
- /** @internal */
232
- export const _ZodString: core.$constructor<_ZodString> = /*@__PURE__*/ core.$constructor("_ZodString", (inst, def) => {
233
- core.$ZodString.init(inst, def);
234
- ZodType.init(inst, def);
235
-
236
- const bag = inst._zod.bag;
237
- inst.format = bag.format ?? null;
238
- inst.minLength = bag.minimum ?? null;
239
- inst.maxLength = bag.maximum ?? null;
240
-
241
- // validations
242
- inst.regex = (...args) => inst.check(checks.regex(...args));
243
- inst.includes = (...args) => inst.check(checks.includes(...args));
244
- inst.startsWith = (...args) => inst.check(checks.startsWith(...args));
245
- inst.endsWith = (...args) => inst.check(checks.endsWith(...args));
246
- inst.min = (...args) => inst.check(checks.minLength(...args));
247
- inst.max = (...args) => inst.check(checks.maxLength(...args));
248
- inst.length = (...args) => inst.check(checks.length(...args));
249
- inst.nonempty = (...args) => inst.check(checks.minLength(1, ...args));
250
- inst.lowercase = (params) => inst.check(checks.lowercase(params));
251
- inst.uppercase = (params) => inst.check(checks.uppercase(params));
252
-
253
- // transforms
254
- inst.trim = () => inst.check(checks.trim());
255
- inst.normalize = (...args) => inst.check(checks.normalize(...args));
256
- inst.toLowerCase = () => inst.check(checks.toLowerCase());
257
- inst.toUpperCase = () => inst.check(checks.toUpperCase());
258
- });
259
-
260
- export interface ZodString extends _ZodString<core.$ZodStringInternals<string>> {
261
- // string format checks
262
-
263
- /** @deprecated Use `z.email()` instead. */
264
- email(params?: string | core.$ZodCheckEmailParams): this;
265
- /** @deprecated Use `z.url()` instead. */
266
- url(params?: string | core.$ZodCheckURLParams): this;
267
- /** @deprecated Use `z.jwt()` instead. */
268
- jwt(params?: string | core.$ZodCheckJWTParams): this;
269
- /** @deprecated Use `z.emoji()` instead. */
270
- emoji(params?: string | core.$ZodCheckEmojiParams): this;
271
- /** @deprecated Use `z.guid()` instead. */
272
- guid(params?: string | core.$ZodCheckGUIDParams): this;
273
- /** @deprecated Use `z.uuid()` instead. */
274
- uuid(params?: string | core.$ZodCheckUUIDParams): this;
275
- /** @deprecated Use `z.uuid()` instead. */
276
- uuidv4(params?: string | core.$ZodCheckUUIDParams): this;
277
- /** @deprecated Use `z.uuid()` instead. */
278
- uuidv6(params?: string | core.$ZodCheckUUIDParams): this;
279
- /** @deprecated Use `z.uuid()` instead. */
280
- uuidv7(params?: string | core.$ZodCheckUUIDParams): this;
281
- /** @deprecated Use `z.nanoid()` instead. */
282
- nanoid(params?: string | core.$ZodCheckNanoIDParams): this;
283
- /** @deprecated Use `z.guid()` instead. */
284
- guid(params?: string | core.$ZodCheckGUIDParams): this;
285
- /** @deprecated Use `z.cuid()` instead. */
286
- cuid(params?: string | core.$ZodCheckCUIDParams): this;
287
- /** @deprecated Use `z.cuid2()` instead. */
288
- cuid2(params?: string | core.$ZodCheckCUID2Params): this;
289
- /** @deprecated Use `z.ulid()` instead. */
290
- ulid(params?: string | core.$ZodCheckULIDParams): this;
291
- /** @deprecated Use `z.base64()` instead. */
292
- base64(params?: string | core.$ZodCheckBase64Params): this;
293
- /** @deprecated Use `z.base64url()` instead. */
294
- base64url(params?: string | core.$ZodCheckBase64URLParams): this;
295
- // /** @deprecated Use `z.jsonString()` instead. */
296
- // jsonString(params?: string | core.$ZodCheckJSONStringParams): this;
297
- /** @deprecated Use `z.xid()` instead. */
298
- xid(params?: string | core.$ZodCheckXIDParams): this;
299
- /** @deprecated Use `z.ksuid()` instead. */
300
- ksuid(params?: string | core.$ZodCheckKSUIDParams): this;
301
- // /** @deprecated Use `z.ipv4()` or `z.ipv6()` instead. */
302
- // ip(params?: string | (core.$ZodCheckIPv4Params & { version?: "v4" | "v6" })): ZodUnion<[this, this]>;
303
- /** @deprecated Use `z.ipv4()` instead. */
304
- ipv4(params?: string | core.$ZodCheckIPv4Params): this;
305
- /** @deprecated Use `z.ipv6()` instead. */
306
- ipv6(params?: string | core.$ZodCheckIPv6Params): this;
307
- /** @deprecated Use `z.cidrv4()` instead. */
308
- cidrv4(params?: string | core.$ZodCheckCIDRv4Params): this;
309
- /** @deprecated Use `z.cidrv6()` instead. */
310
- cidrv6(params?: string | core.$ZodCheckCIDRv6Params): this;
311
- /** @deprecated Use `z.e164()` instead. */
312
- e164(params?: string | core.$ZodCheckE164Params): this;
313
-
314
- // ISO 8601 checks
315
- /** @deprecated Use `z.iso.datetime()` instead. */
316
- datetime(params?: string | core.$ZodCheckISODateTimeParams): this;
317
- /** @deprecated Use `z.iso.date()` instead. */
318
- date(params?: string | core.$ZodCheckISODateParams): this;
319
- /** @deprecated Use `z.iso.time()` instead. */
320
- time(
321
- params?:
322
- | string
323
- // | {
324
- // message?: string | undefined;
325
- // precision?: number | null;
326
- // }
327
- | core.$ZodCheckISOTimeParams
328
- ): this;
329
- /** @deprecated Use `z.iso.duration()` instead. */
330
- duration(params?: string | core.$ZodCheckISODurationParams): this;
331
- }
332
-
333
- export const ZodString: core.$constructor<ZodString> = /*@__PURE__*/ core.$constructor("ZodString", (inst, def) => {
334
- core.$ZodString.init(inst, def);
335
- _ZodString.init(inst, def);
336
-
337
- inst.email = (params) => inst.check(core._email(ZodEmail, params));
338
- inst.url = (params) => inst.check(core._url(ZodURL, params));
339
- inst.jwt = (params) => inst.check(core._jwt(ZodJWT, params));
340
- inst.emoji = (params) => inst.check(core._emoji(ZodEmoji, params));
341
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
342
- inst.uuid = (params) => inst.check(core._uuid(ZodUUID, params));
343
- inst.uuidv4 = (params) => inst.check(core._uuidv4(ZodUUID, params));
344
- inst.uuidv6 = (params) => inst.check(core._uuidv6(ZodUUID, params));
345
- inst.uuidv7 = (params) => inst.check(core._uuidv7(ZodUUID, params));
346
- inst.nanoid = (params) => inst.check(core._nanoid(ZodNanoID, params));
347
- inst.guid = (params) => inst.check(core._guid(ZodGUID, params));
348
- inst.cuid = (params) => inst.check(core._cuid(ZodCUID, params));
349
- inst.cuid2 = (params) => inst.check(core._cuid2(ZodCUID2, params));
350
- inst.ulid = (params) => inst.check(core._ulid(ZodULID, params));
351
- inst.base64 = (params) => inst.check(core._base64(ZodBase64, params));
352
- inst.base64url = (params) => inst.check(core._base64url(ZodBase64URL, params));
353
- inst.xid = (params) => inst.check(core._xid(ZodXID, params));
354
- inst.ksuid = (params) => inst.check(core._ksuid(ZodKSUID, params));
355
- inst.ipv4 = (params) => inst.check(core._ipv4(ZodIPv4, params));
356
- inst.ipv6 = (params) => inst.check(core._ipv6(ZodIPv6, params));
357
- inst.cidrv4 = (params) => inst.check(core._cidrv4(ZodCIDRv4, params));
358
- inst.cidrv6 = (params) => inst.check(core._cidrv6(ZodCIDRv6, params));
359
- inst.e164 = (params) => inst.check(core._e164(ZodE164, params));
360
-
361
- // iso
362
- inst.datetime = (params) => inst.check(iso.datetime(params as any));
363
- inst.date = (params) => inst.check(iso.date(params as any));
364
- inst.time = (params) => inst.check(iso.time(params as any));
365
- inst.duration = (params) => inst.check(iso.duration(params as any));
366
- });
367
-
368
- export function string(params?: string | core.$ZodStringParams): ZodString;
369
- export function string<T extends string>(params?: string | core.$ZodStringParams): core.$ZodType<T, T>;
370
- export function string(params?: string | core.$ZodStringParams): ZodString {
371
- return core._string(ZodString, params) as any;
372
- }
373
-
374
- // ZodStringFormat
375
- export interface ZodStringFormat<Format extends string = string>
376
- extends _ZodString<core.$ZodStringFormatInternals<Format>> {}
377
- export const ZodStringFormat: core.$constructor<ZodStringFormat> = /*@__PURE__*/ core.$constructor(
378
- "ZodStringFormat",
379
- (inst, def) => {
380
- core.$ZodStringFormat.init(inst, def);
381
- _ZodString.init(inst, def);
382
- }
383
- );
384
-
385
- // ZodEmail
386
- export interface ZodEmail extends ZodStringFormat<"email"> {
387
- _zod: core.$ZodEmailInternals;
388
- }
389
- export const ZodEmail: core.$constructor<ZodEmail> = /*@__PURE__*/ core.$constructor("ZodEmail", (inst, def) => {
390
- // ZodStringFormat.init(inst, def);
391
- core.$ZodEmail.init(inst, def);
392
- ZodStringFormat.init(inst, def);
393
- });
394
-
395
- export function email(params?: string | core.$ZodEmailParams): ZodEmail {
396
- return core._email(ZodEmail, params);
397
- }
398
-
399
- // ZodGUID
400
- export interface ZodGUID extends ZodStringFormat<"guid"> {
401
- _zod: core.$ZodGUIDInternals;
402
- }
403
- export const ZodGUID: core.$constructor<ZodGUID> = /*@__PURE__*/ core.$constructor("ZodGUID", (inst, def) => {
404
- // ZodStringFormat.init(inst, def);
405
- core.$ZodGUID.init(inst, def);
406
- ZodStringFormat.init(inst, def);
407
- });
408
-
409
- export function guid(params?: string | core.$ZodGUIDParams): ZodGUID {
410
- return core._guid(ZodGUID, params);
411
- }
412
-
413
- // ZodUUID
414
- export interface ZodUUID extends ZodStringFormat<"uuid"> {
415
- _zod: core.$ZodUUIDInternals;
416
- }
417
- export const ZodUUID: core.$constructor<ZodUUID> = /*@__PURE__*/ core.$constructor("ZodUUID", (inst, def) => {
418
- // ZodStringFormat.init(inst, def);
419
- core.$ZodUUID.init(inst, def);
420
- ZodStringFormat.init(inst, def);
421
- });
422
-
423
- export function uuid(params?: string | core.$ZodUUIDParams): ZodUUID {
424
- return core._uuid(ZodUUID, params);
425
- }
426
-
427
- export function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodUUID {
428
- return core._uuidv4(ZodUUID, params);
429
- }
430
-
431
- // ZodUUIDv6
432
-
433
- export function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodUUID {
434
- return core._uuidv6(ZodUUID, params);
435
- }
436
-
437
- // ZodUUIDv7
438
-
439
- export function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodUUID {
440
- return core._uuidv7(ZodUUID, params);
441
- }
442
-
443
- // ZodURL
444
- export interface ZodURL extends ZodStringFormat<"url"> {
445
- _zod: core.$ZodURLInternals;
446
- }
447
- export const ZodURL: core.$constructor<ZodURL> = /*@__PURE__*/ core.$constructor("ZodURL", (inst, def) => {
448
- // ZodStringFormat.init(inst, def);
449
- core.$ZodURL.init(inst, def);
450
- ZodStringFormat.init(inst, def);
451
- });
452
-
453
- export function url(params?: string | core.$ZodURLParams): ZodURL {
454
- return core._url(ZodURL, params);
455
- }
456
-
457
- // ZodEmoji
458
- export interface ZodEmoji extends ZodStringFormat<"emoji"> {
459
- _zod: core.$ZodEmojiInternals;
460
- }
461
- export const ZodEmoji: core.$constructor<ZodEmoji> = /*@__PURE__*/ core.$constructor("ZodEmoji", (inst, def) => {
462
- // ZodStringFormat.init(inst, def);
463
- core.$ZodEmoji.init(inst, def);
464
- ZodStringFormat.init(inst, def);
465
- });
466
-
467
- export function emoji(params?: string | core.$ZodEmojiParams): ZodEmoji {
468
- return core._emoji(ZodEmoji, params);
469
- }
470
-
471
- // ZodNanoID
472
- export interface ZodNanoID extends ZodStringFormat<"nanoid"> {
473
- _zod: core.$ZodNanoIDInternals;
474
- }
475
- export const ZodNanoID: core.$constructor<ZodNanoID> = /*@__PURE__*/ core.$constructor("ZodNanoID", (inst, def) => {
476
- // ZodStringFormat.init(inst, def);
477
- core.$ZodNanoID.init(inst, def);
478
- ZodStringFormat.init(inst, def);
479
- });
480
-
481
- export function nanoid(params?: string | core.$ZodNanoIDParams): ZodNanoID {
482
- return core._nanoid(ZodNanoID, params);
483
- }
484
-
485
- // ZodCUID
486
- export interface ZodCUID extends ZodStringFormat<"cuid"> {
487
- _zod: core.$ZodCUIDInternals;
488
- }
489
- export const ZodCUID: core.$constructor<ZodCUID> = /*@__PURE__*/ core.$constructor("ZodCUID", (inst, def) => {
490
- // ZodStringFormat.init(inst, def);
491
- core.$ZodCUID.init(inst, def);
492
- ZodStringFormat.init(inst, def);
493
- });
494
-
495
- export function cuid(params?: string | core.$ZodCUIDParams): ZodCUID {
496
- return core._cuid(ZodCUID, params);
497
- }
498
-
499
- // ZodCUID2
500
- export interface ZodCUID2 extends ZodStringFormat<"cuid2"> {
501
- _zod: core.$ZodCUID2Internals;
502
- }
503
- export const ZodCUID2: core.$constructor<ZodCUID2> = /*@__PURE__*/ core.$constructor("ZodCUID2", (inst, def) => {
504
- // ZodStringFormat.init(inst, def);
505
- core.$ZodCUID2.init(inst, def);
506
- ZodStringFormat.init(inst, def);
507
- });
508
-
509
- export function cuid2(params?: string | core.$ZodCUID2Params): ZodCUID2 {
510
- return core._cuid2(ZodCUID2, params);
511
- }
512
-
513
- // ZodULID
514
- export interface ZodULID extends ZodStringFormat<"ulid"> {
515
- _zod: core.$ZodULIDInternals;
516
- }
517
- export const ZodULID: core.$constructor<ZodULID> = /*@__PURE__*/ core.$constructor("ZodULID", (inst, def) => {
518
- // ZodStringFormat.init(inst, def);
519
- core.$ZodULID.init(inst, def);
520
- ZodStringFormat.init(inst, def);
521
- });
522
-
523
- export function ulid(params?: string | core.$ZodULIDParams): ZodULID {
524
- return core._ulid(ZodULID, params);
525
- }
526
-
527
- // ZodXID
528
- export interface ZodXID extends ZodStringFormat<"xid"> {
529
- _zod: core.$ZodXIDInternals;
530
- }
531
- export const ZodXID: core.$constructor<ZodXID> = /*@__PURE__*/ core.$constructor("ZodXID", (inst, def) => {
532
- // ZodStringFormat.init(inst, def);
533
- core.$ZodXID.init(inst, def);
534
- ZodStringFormat.init(inst, def);
535
- });
536
-
537
- export function xid(params?: string | core.$ZodXIDParams): ZodXID {
538
- return core._xid(ZodXID, params);
539
- }
540
-
541
- // ZodKSUID
542
- export interface ZodKSUID extends ZodStringFormat<"ksuid"> {
543
- _zod: core.$ZodKSUIDInternals;
544
- }
545
- export const ZodKSUID: core.$constructor<ZodKSUID> = /*@__PURE__*/ core.$constructor("ZodKSUID", (inst, def) => {
546
- // ZodStringFormat.init(inst, def);
547
- core.$ZodKSUID.init(inst, def);
548
- ZodStringFormat.init(inst, def);
549
- });
550
-
551
- export function ksuid(params?: string | core.$ZodKSUIDParams): ZodKSUID {
552
- return core._ksuid(ZodKSUID, params);
553
- }
554
-
555
- // ZodIP
556
- // export interface ZodIP extends ZodStringFormat<"ip"> {
557
- // _zod: core.$ZodIPInternals;
558
- // }
559
- // export const ZodIP: core.$constructor<ZodIP> = /*@__PURE__*/ core.$constructor("ZodIP", (inst, def) => {
560
- // // ZodStringFormat.init(inst, def);
561
- // core.$ZodIP.init(inst, def);
562
- // ZodStringFormat.init(inst, def);
563
- // });
564
-
565
- // export function ip(params?: string | core.$ZodIPParams): ZodIP {
566
- // return core._ip(ZodIP, params);
567
- // }
568
-
569
- // ZodIPv4
570
- export interface ZodIPv4 extends ZodStringFormat<"ipv4"> {
571
- _zod: core.$ZodIPv4Internals;
572
- }
573
- export const ZodIPv4: core.$constructor<ZodIPv4> = /*@__PURE__*/ core.$constructor("ZodIPv4", (inst, def) => {
574
- // ZodStringFormat.init(inst, def);
575
- core.$ZodIPv4.init(inst, def);
576
- ZodStringFormat.init(inst, def);
577
- });
578
-
579
- export function ipv4(params?: string | core.$ZodIPv4Params): ZodIPv4 {
580
- return core._ipv4(ZodIPv4, params);
581
- }
582
-
583
- // ZodIPv6
584
- export interface ZodIPv6 extends ZodStringFormat<"ipv6"> {
585
- _zod: core.$ZodIPv6Internals;
586
- }
587
- export const ZodIPv6: core.$constructor<ZodIPv6> = /*@__PURE__*/ core.$constructor("ZodIPv6", (inst, def) => {
588
- // ZodStringFormat.init(inst, def);
589
- core.$ZodIPv6.init(inst, def);
590
- ZodStringFormat.init(inst, def);
591
- });
592
- export function ipv6(params?: string | core.$ZodIPv6Params): ZodIPv6 {
593
- return core._ipv6(ZodIPv6, params);
594
- }
595
-
596
- // ZodCIDRv4
597
- export interface ZodCIDRv4 extends ZodStringFormat<"cidrv4"> {
598
- _zod: core.$ZodCIDRv4Internals;
599
- }
600
- export const ZodCIDRv4: core.$constructor<ZodCIDRv4> = /*@__PURE__*/ core.$constructor("ZodCIDRv4", (inst, def) => {
601
- core.$ZodCIDRv4.init(inst, def);
602
- ZodStringFormat.init(inst, def);
603
- });
604
-
605
- export function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodCIDRv4 {
606
- return core._cidrv4(ZodCIDRv4, params);
607
- }
608
-
609
- // ZodCIDRv6
610
- export interface ZodCIDRv6 extends ZodStringFormat<"cidrv6"> {
611
- _zod: core.$ZodCIDRv6Internals;
612
- }
613
- export const ZodCIDRv6: core.$constructor<ZodCIDRv6> = /*@__PURE__*/ core.$constructor("ZodCIDRv6", (inst, def) => {
614
- core.$ZodCIDRv6.init(inst, def);
615
- ZodStringFormat.init(inst, def);
616
- });
617
-
618
- export function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodCIDRv6 {
619
- return core._cidrv6(ZodCIDRv6, params);
620
- }
621
-
622
- // ZodBase64
623
- export interface ZodBase64 extends ZodStringFormat<"base64"> {
624
- _zod: core.$ZodBase64Internals;
625
- }
626
- export const ZodBase64: core.$constructor<ZodBase64> = /*@__PURE__*/ core.$constructor("ZodBase64", (inst, def) => {
627
- // ZodStringFormat.init(inst, def);
628
- core.$ZodBase64.init(inst, def);
629
- ZodStringFormat.init(inst, def);
630
- });
631
- export function base64(params?: string | core.$ZodBase64Params): ZodBase64 {
632
- return core._base64(ZodBase64, params);
633
- }
634
-
635
- // ZodBase64URL
636
- export interface ZodBase64URL extends ZodStringFormat<"base64url"> {
637
- _zod: core.$ZodBase64URLInternals;
638
- }
639
- export const ZodBase64URL: core.$constructor<ZodBase64URL> = /*@__PURE__*/ core.$constructor(
640
- "ZodBase64URL",
641
- (inst, def) => {
642
- // ZodStringFormat.init(inst, def);
643
- core.$ZodBase64URL.init(inst, def);
644
- ZodStringFormat.init(inst, def);
645
- }
646
- );
647
- export function base64url(params?: string | core.$ZodBase64URLParams): ZodBase64URL {
648
- return core._base64url(ZodBase64URL, params);
649
- }
650
-
651
- // ZodE164
652
- export interface ZodE164 extends ZodStringFormat<"e164"> {
653
- _zod: core.$ZodE164Internals;
654
- }
655
- export const ZodE164: core.$constructor<ZodE164> = /*@__PURE__*/ core.$constructor("ZodE164", (inst, def) => {
656
- // ZodStringFormat.init(inst, def);
657
- core.$ZodE164.init(inst, def);
658
- ZodStringFormat.init(inst, def);
659
- });
660
-
661
- export function e164(params?: string | core.$ZodE164Params): ZodE164 {
662
- return core._e164(ZodE164, params);
663
- }
664
-
665
- // ZodJWT
666
- export interface ZodJWT extends ZodStringFormat<"jwt"> {
667
- _zod: core.$ZodJWTInternals;
668
- }
669
- export const ZodJWT: core.$constructor<ZodJWT> = /*@__PURE__*/ core.$constructor("ZodJWT", (inst, def) => {
670
- // ZodStringFormat.init(inst, def);
671
- core.$ZodJWT.init(inst, def);
672
- ZodStringFormat.init(inst, def);
673
- });
674
-
675
- export function jwt(params?: string | core.$ZodJWTParams): ZodJWT {
676
- return core._jwt(ZodJWT, params);
677
- }
678
-
679
- // ZodCustomStringFormat
680
- export interface ZodCustomStringFormat<Format extends string = string>
681
- extends ZodStringFormat<Format>,
682
- core.$ZodCustomStringFormat<Format> {
683
- _zod: core.$ZodCustomStringFormatInternals<Format>;
684
- }
685
- export const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat> = /*@__PURE__*/ core.$constructor(
686
- "ZodCustomStringFormat",
687
- (inst, def) => {
688
- // ZodStringFormat.init(inst, def);
689
- core.$ZodCustomStringFormat.init(inst, def);
690
- ZodStringFormat.init(inst, def);
691
- }
692
- );
693
- export function stringFormat<Format extends string>(
694
- format: Format,
695
- fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp,
696
- _params: string | core.$ZodStringFormatParams = {}
697
- ): ZodCustomStringFormat<Format> {
698
- return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params) as any;
699
- }
700
-
701
- // ZodNumber
702
- export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals>
703
- extends _ZodType<Internals> {
704
- gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
705
- /** Identical to .min() */
706
- gte(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
707
- min(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
708
- lt(value: number, params?: string | core.$ZodCheckLessThanParams): this;
709
- /** Identical to .max() */
710
- lte(value: number, params?: string | core.$ZodCheckLessThanParams): this;
711
- max(value: number, params?: string | core.$ZodCheckLessThanParams): this;
712
- /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
713
- int(params?: string | core.$ZodCheckNumberFormatParams): this;
714
- /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
715
- safe(params?: string | core.$ZodCheckNumberFormatParams): this;
716
- positive(params?: string | core.$ZodCheckGreaterThanParams): this;
717
- nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
718
- negative(params?: string | core.$ZodCheckLessThanParams): this;
719
- nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
720
- multipleOf(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
721
- /** @deprecated Use `.multipleOf()` instead. */
722
- step(value: number, params?: string | core.$ZodCheckMultipleOfParams): this;
723
-
724
- /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
725
- finite(params?: unknown): this;
726
-
727
- minValue: number | null;
728
- maxValue: number | null;
729
- /** @deprecated Check the `format` property instead. */
730
- isInt: boolean;
731
- /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
732
- isFinite: boolean;
733
- format: string | null;
734
- }
735
-
736
- export interface ZodNumber extends _ZodNumber<core.$ZodNumberInternals<number>> {}
737
-
738
- export const ZodNumber: core.$constructor<ZodNumber> = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def) => {
739
- core.$ZodNumber.init(inst, def);
740
- ZodType.init(inst, def);
741
-
742
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
743
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
744
- inst.min = (value, params) => inst.check(checks.gte(value, params));
745
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
746
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
747
- inst.max = (value, params) => inst.check(checks.lte(value, params));
748
- inst.int = (params) => inst.check(int(params));
749
- inst.safe = (params) => inst.check(int(params));
750
- inst.positive = (params) => inst.check(checks.gt(0, params));
751
- inst.nonnegative = (params) => inst.check(checks.gte(0, params));
752
- inst.negative = (params) => inst.check(checks.lt(0, params));
753
- inst.nonpositive = (params) => inst.check(checks.lte(0, params));
754
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
755
- inst.step = (value, params) => inst.check(checks.multipleOf(value, params));
756
-
757
- // inst.finite = (params) => inst.check(core.finite(params));
758
- inst.finite = () => inst;
759
-
760
- const bag = inst._zod.bag;
761
- inst.minValue =
762
- Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
763
- inst.maxValue =
764
- Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
765
- inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
766
- inst.isFinite = true;
767
- inst.format = bag.format ?? null;
768
- });
769
-
770
- export function number(params?: string | core.$ZodNumberParams): ZodNumber {
771
- return core._number(ZodNumber, params) as any;
772
- }
773
-
774
- // ZodNumberFormat
775
- export interface ZodNumberFormat extends ZodNumber {
776
- _zod: core.$ZodNumberFormatInternals;
777
- }
778
- export const ZodNumberFormat: core.$constructor<ZodNumberFormat> = /*@__PURE__*/ core.$constructor(
779
- "ZodNumberFormat",
780
- (inst, def) => {
781
- core.$ZodNumberFormat.init(inst, def);
782
- ZodNumber.init(inst, def);
783
- }
784
- );
785
-
786
- // int
787
- export interface ZodInt extends ZodNumberFormat {}
788
- export function int(params?: string | core.$ZodCheckNumberFormatParams): ZodInt {
789
- return core._int(ZodNumberFormat, params);
790
- }
791
-
792
- // float32
793
- export interface ZodFloat32 extends ZodNumberFormat {}
794
- export function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat32 {
795
- return core._float32(ZodNumberFormat, params);
796
- }
797
-
798
- // float64
799
- export interface ZodFloat64 extends ZodNumberFormat {}
800
- export function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodFloat64 {
801
- return core._float64(ZodNumberFormat, params);
802
- }
803
-
804
- // int32
805
- export interface ZodInt32 extends ZodNumberFormat {}
806
- export function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodInt32 {
807
- return core._int32(ZodNumberFormat, params);
808
- }
809
-
810
- // uint32
811
- export interface ZodUInt32 extends ZodNumberFormat {}
812
- export function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodUInt32 {
813
- return core._uint32(ZodNumberFormat, params);
814
- }
815
-
816
- // boolean
817
- export interface _ZodBoolean<T extends core.$ZodBooleanInternals = core.$ZodBooleanInternals> extends _ZodType<T> {}
818
- export interface ZodBoolean extends _ZodBoolean<core.$ZodBooleanInternals<boolean>> {}
819
- export const ZodBoolean: core.$constructor<ZodBoolean> = /*@__PURE__*/ core.$constructor("ZodBoolean", (inst, def) => {
820
- core.$ZodBoolean.init(inst, def);
821
- ZodType.init(inst, def);
822
- });
823
-
824
- export function boolean(params?: string | core.$ZodBooleanParams): ZodBoolean {
825
- return core._boolean(ZodBoolean, params) as any;
826
- }
827
-
828
- // bigint
829
- export interface _ZodBigInt<T extends core.$ZodBigIntInternals = core.$ZodBigIntInternals> extends _ZodType<T> {
830
- gte(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
831
- /** Alias of `.gte()` */
832
- min(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
833
- gt(value: bigint, params?: string | core.$ZodCheckGreaterThanParams): this;
834
- /** Alias of `.lte()` */
835
- lte(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
836
- max(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
837
- lt(value: bigint, params?: string | core.$ZodCheckLessThanParams): this;
838
- positive(params?: string | core.$ZodCheckGreaterThanParams): this;
839
- negative(params?: string | core.$ZodCheckLessThanParams): this;
840
- nonpositive(params?: string | core.$ZodCheckLessThanParams): this;
841
- nonnegative(params?: string | core.$ZodCheckGreaterThanParams): this;
842
- multipleOf(value: bigint, params?: string | core.$ZodCheckMultipleOfParams): this;
843
-
844
- minValue: bigint | null;
845
- maxValue: bigint | null;
846
- format: string | null;
847
- }
848
-
849
- export interface ZodBigInt extends _ZodBigInt<core.$ZodBigIntInternals<bigint>> {}
850
- export const ZodBigInt: core.$constructor<ZodBigInt> = /*@__PURE__*/ core.$constructor("ZodBigInt", (inst, def) => {
851
- core.$ZodBigInt.init(inst, def);
852
- ZodType.init(inst, def);
853
-
854
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
855
- inst.min = (value, params) => inst.check(checks.gte(value, params));
856
- inst.gt = (value, params) => inst.check(checks.gt(value, params));
857
- inst.gte = (value, params) => inst.check(checks.gte(value, params));
858
- inst.min = (value, params) => inst.check(checks.gte(value, params));
859
- inst.lt = (value, params) => inst.check(checks.lt(value, params));
860
- inst.lte = (value, params) => inst.check(checks.lte(value, params));
861
- inst.max = (value, params) => inst.check(checks.lte(value, params));
862
- inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));
863
- inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));
864
- inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));
865
- inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));
866
- inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
867
-
868
- const bag = inst._zod.bag;
869
- inst.minValue = bag.minimum ?? null;
870
- inst.maxValue = bag.maximum ?? null;
871
- inst.format = bag.format ?? null;
872
- });
873
-
874
- export function bigint(params?: string | core.$ZodBigIntParams): ZodBigInt {
875
- return core._bigint(ZodBigInt, params) as any;
876
- }
877
- // bigint formats
878
-
879
- // ZodBigIntFormat
880
- export interface ZodBigIntFormat extends ZodBigInt {
881
- _zod: core.$ZodBigIntFormatInternals;
882
- }
883
- export const ZodBigIntFormat: core.$constructor<ZodBigIntFormat> = /*@__PURE__*/ core.$constructor(
884
- "ZodBigIntFormat",
885
- (inst, def) => {
886
- core.$ZodBigIntFormat.init(inst, def);
887
- ZodBigInt.init(inst, def);
888
- }
889
- );
890
-
891
- // int64
892
- export function int64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat {
893
- return core._int64(ZodBigIntFormat, params);
894
- }
895
-
896
- // uint64
897
- export function uint64(params?: string | core.$ZodBigIntFormatParams): ZodBigIntFormat {
898
- return core._uint64(ZodBigIntFormat, params);
899
- }
900
-
901
- // symbol
902
- export interface ZodSymbol extends _ZodType<core.$ZodSymbolInternals> {}
903
- export const ZodSymbol: core.$constructor<ZodSymbol> = /*@__PURE__*/ core.$constructor("ZodSymbol", (inst, def) => {
904
- core.$ZodSymbol.init(inst, def);
905
- ZodType.init(inst, def);
906
- });
907
-
908
- export function symbol(params?: string | core.$ZodSymbolParams): ZodSymbol {
909
- return core._symbol(ZodSymbol, params);
910
- }
911
-
912
- // ZodUndefined
913
- export interface ZodUndefined extends _ZodType<core.$ZodUndefinedInternals> {}
914
- export const ZodUndefined: core.$constructor<ZodUndefined> = /*@__PURE__*/ core.$constructor(
915
- "ZodUndefined",
916
- (inst, def) => {
917
- core.$ZodUndefined.init(inst, def);
918
- ZodType.init(inst, def);
919
- }
920
- );
921
-
922
- function _undefined(params?: string | core.$ZodUndefinedParams): ZodUndefined {
923
- return core._undefined(ZodUndefined, params);
924
- }
925
- export { _undefined as undefined };
926
-
927
- // ZodNull
928
- export interface ZodNull extends _ZodType<core.$ZodNullInternals> {}
929
- export const ZodNull: core.$constructor<ZodNull> = /*@__PURE__*/ core.$constructor("ZodNull", (inst, def) => {
930
- core.$ZodNull.init(inst, def);
931
- ZodType.init(inst, def);
932
- });
933
-
934
- function _null(params?: string | core.$ZodNullParams): ZodNull {
935
- return core._null(ZodNull, params);
936
- }
937
- export { _null as null };
938
-
939
- // ZodAny
940
- export interface ZodAny extends _ZodType<core.$ZodAnyInternals> {}
941
- export const ZodAny: core.$constructor<ZodAny> = /*@__PURE__*/ core.$constructor("ZodAny", (inst, def) => {
942
- core.$ZodAny.init(inst, def);
943
- ZodType.init(inst, def);
944
- });
945
-
946
- export function any(): ZodAny {
947
- return core._any(ZodAny);
948
- }
949
-
950
- // ZodUnknown
951
- export interface ZodUnknown extends _ZodType<core.$ZodUnknownInternals> {}
952
- export const ZodUnknown: core.$constructor<ZodUnknown> = /*@__PURE__*/ core.$constructor("ZodUnknown", (inst, def) => {
953
- core.$ZodUnknown.init(inst, def);
954
- ZodType.init(inst, def);
955
- });
956
-
957
- export function unknown(): ZodUnknown {
958
- return core._unknown(ZodUnknown);
959
- }
960
-
961
- // ZodNever
962
- export interface ZodNever extends _ZodType<core.$ZodNeverInternals> {}
963
- export const ZodNever: core.$constructor<ZodNever> = /*@__PURE__*/ core.$constructor("ZodNever", (inst, def) => {
964
- core.$ZodNever.init(inst, def);
965
- ZodType.init(inst, def);
966
- });
967
-
968
- export function never(params?: string | core.$ZodNeverParams): ZodNever {
969
- return core._never(ZodNever, params);
970
- }
971
-
972
- // ZodVoid
973
- export interface ZodVoid extends _ZodType<core.$ZodVoidInternals> {}
974
- export const ZodVoid: core.$constructor<ZodVoid> = /*@__PURE__*/ core.$constructor("ZodVoid", (inst, def) => {
975
- core.$ZodVoid.init(inst, def);
976
- ZodType.init(inst, def);
977
- });
978
-
979
- function _void(params?: string | core.$ZodVoidParams): ZodVoid {
980
- return core._void(ZodVoid, params);
981
- }
982
- export { _void as void };
983
-
984
- // ZodDate
985
- export interface _ZodDate<T extends core.$ZodDateInternals = core.$ZodDateInternals> extends _ZodType<T> {
986
- min(value: number | Date, params?: string | core.$ZodCheckGreaterThanParams): this;
987
- max(value: number | Date, params?: string | core.$ZodCheckLessThanParams): this;
988
-
989
- /** @deprecated Not recommended. */
990
- minDate: Date | null;
991
- /** @deprecated Not recommended. */
992
- maxDate: Date | null;
993
- }
994
-
995
- export interface ZodDate extends _ZodDate<core.$ZodDateInternals<Date>> {}
996
- export const ZodDate: core.$constructor<ZodDate> = /*@__PURE__*/ core.$constructor("ZodDate", (inst, def) => {
997
- core.$ZodDate.init(inst, def);
998
- ZodType.init(inst, def);
999
-
1000
- inst.min = (value, params) => inst.check(checks.gte(value, params));
1001
- inst.max = (value, params) => inst.check(checks.lte(value, params));
1002
-
1003
- const c = inst._zod.bag;
1004
- inst.minDate = c.minimum ? new Date(c.minimum) : null;
1005
- inst.maxDate = c.maximum ? new Date(c.maximum) : null;
1006
- });
1007
-
1008
- export function date(params?: string | core.$ZodDateParams): ZodDate {
1009
- return core._date(ZodDate, params);
1010
- }
1011
-
1012
- // ZodArray
1013
- export interface ZodArray<T extends core.SomeType = core.$ZodType>
1014
- extends _ZodType<core.$ZodArrayInternals<T>>,
1015
- core.$ZodArray<T> {
1016
- element: T;
1017
- min(minLength: number, params?: string | core.$ZodCheckMinLengthParams): this;
1018
- nonempty(params?: string | core.$ZodCheckMinLengthParams): this;
1019
- max(maxLength: number, params?: string | core.$ZodCheckMaxLengthParams): this;
1020
- length(len: number, params?: string | core.$ZodCheckLengthEqualsParams): this;
1021
-
1022
- unwrap(): T;
1023
- }
1024
- export const ZodArray: core.$constructor<ZodArray> = /*@__PURE__*/ core.$constructor("ZodArray", (inst, def) => {
1025
- core.$ZodArray.init(inst, def);
1026
- ZodType.init(inst, def);
1027
-
1028
- inst.element = def.element as any;
1029
- inst.min = (minLength, params) => inst.check(checks.minLength(minLength, params));
1030
- inst.nonempty = (params) => inst.check(checks.minLength(1, params));
1031
- inst.max = (maxLength, params) => inst.check(checks.maxLength(maxLength, params));
1032
- inst.length = (len, params) => inst.check(checks.length(len, params));
1033
-
1034
- inst.unwrap = () => inst.element;
1035
- });
1036
-
1037
- export function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T> {
1038
- return core._array(ZodArray, element as any, params) as any;
1039
- }
1040
-
1041
- // .keyof
1042
- export function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>> {
1043
- const shape = schema._zod.def.shape;
1044
- return literal(Object.keys(shape)) as any;
1045
- }
1046
-
1047
- // ZodObject
1048
-
1049
- export interface ZodObject<
1050
- /** @ts-ignore Cast variance */
1051
- out Shape extends core.$ZodShape = core.$ZodLooseShape,
1052
- out Config extends core.$ZodObjectConfig = core.$strip,
1053
- > extends _ZodType<core.$ZodObjectInternals<Shape, Config>>,
1054
- core.$ZodObject<Shape, Config> {
1055
- shape: Shape;
1056
-
1057
- keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
1058
- /** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
1059
- catchall<T extends core.SomeType>(schema: T): ZodObject<Shape, core.$catchall<T>>;
1060
-
1061
- /** @deprecated Use `z.looseObject()` or `.loose()` instead. */
1062
- passthrough(): ZodObject<Shape, core.$loose>;
1063
- /** Consider `z.looseObject(A.shape)` instead */
1064
- loose(): ZodObject<Shape, core.$loose>;
1065
-
1066
- /** Consider `z.strictObject(A.shape)` instead */
1067
- strict(): ZodObject<Shape, core.$strict>;
1068
-
1069
- /** This is the default behavior. This method call is likely unnecessary. */
1070
- strip(): ZodObject<Shape, core.$strip>;
1071
-
1072
- extend<U extends core.$ZodLooseShape & Partial<Record<keyof Shape, core.SomeType>>>(
1073
- shape: U
1074
- ): ZodObject<util.Extend<Shape, U>, Config>;
1075
-
1076
- /**
1077
- * @deprecated Use spread syntax and the `.shape` property to combine two object schemas:
1078
- *
1079
- * ```ts
1080
- * const A = z.object({ a: z.string() });
1081
- * const B = z.object({ b: z.number() });
1082
- *
1083
- * const C = z.object({
1084
- * ...A.shape,
1085
- * ...B.shape
1086
- * });
1087
- * ```
1088
- */
1089
- merge<U extends ZodObject>(other: U): ZodObject<util.Extend<Shape, U["shape"]>, U["_zod"]["config"]>;
1090
-
1091
- pick<M extends util.Mask<keyof Shape>>(
1092
- mask: M
1093
- ): ZodObject<util.Flatten<Pick<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1094
-
1095
- omit<M extends util.Mask<keyof Shape>>(
1096
- mask: M
1097
- ): ZodObject<util.Flatten<Omit<Shape, Extract<keyof Shape, keyof M>>>, Config>;
1098
-
1099
- partial(): ZodObject<
1100
- {
1101
- [k in keyof Shape]: ZodOptional<Shape[k]>;
1102
- },
1103
- Config
1104
- >;
1105
- partial<M extends util.Mask<keyof Shape>>(
1106
- mask: M
1107
- ): ZodObject<
1108
- {
1109
- [k in keyof Shape]: k extends keyof M
1110
- ? // Shape[k] extends OptionalInSchema
1111
- // ? Shape[k]
1112
- // :
1113
- ZodOptional<Shape[k]>
1114
- : Shape[k];
1115
- },
1116
- Config
1117
- >;
1118
-
1119
- // required
1120
- required(): ZodObject<
1121
- {
1122
- [k in keyof Shape]: ZodNonOptional<Shape[k]>;
1123
- },
1124
- Config
1125
- >;
1126
- required<M extends util.Mask<keyof Shape>>(
1127
- mask: M
1128
- ): ZodObject<
1129
- {
1130
- [k in keyof Shape]: k extends keyof M ? ZodNonOptional<Shape[k]> : Shape[k];
1131
- },
1132
- Config
1133
- >;
1134
- }
1135
-
1136
- export const ZodObject: core.$constructor<ZodObject> = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
1137
- core.$ZodObject.init(inst, def);
1138
- ZodType.init(inst, def);
1139
-
1140
- util.defineLazy(inst, "shape", () => def.shape);
1141
- inst.keyof = () => _enum(Object.keys(inst._zod.def.shape)) as any;
1142
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall as any as core.$ZodType }) as any;
1143
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
1144
- // inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
1145
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
1146
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
1147
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
1148
-
1149
- inst.extend = (incoming: any) => {
1150
- return util.extend(inst, incoming);
1151
- };
1152
- inst.merge = (other) => util.merge(inst, other);
1153
- inst.pick = (mask) => util.pick(inst, mask);
1154
- inst.omit = (mask) => util.omit(inst, mask);
1155
- inst.partial = (...args: any[]) => util.partial(ZodOptional, inst, args[0] as object);
1156
- inst.required = (...args: any[]) => util.required(ZodNonOptional, inst, args[0] as object);
1157
- });
1158
-
1159
- export function object<T extends core.$ZodLooseShape = Partial<Record<never, core.SomeType>>>(
1160
- shape?: T,
1161
- params?: string | core.$ZodObjectParams
1162
- ): ZodObject<util.Writeable<T>, core.$strip> {
1163
- const def: core.$ZodObjectDef = {
1164
- type: "object",
1165
- get shape() {
1166
- util.assignProp(this, "shape", { ...shape });
1167
- return this.shape;
1168
- },
1169
- ...util.normalizeParams(params),
1170
- };
1171
- return new ZodObject(def) as any;
1172
- }
1173
-
1174
- // strictObject
1175
-
1176
- export function strictObject<T extends core.$ZodLooseShape>(
1177
- shape: T,
1178
- params?: string | core.$ZodObjectParams
1179
- ): ZodObject<T, core.$strict> {
1180
- return new ZodObject({
1181
- type: "object",
1182
- get shape() {
1183
- util.assignProp(this, "shape", { ...shape });
1184
- return this.shape;
1185
- },
1186
- catchall: never(),
1187
- ...util.normalizeParams(params),
1188
- }) as any;
1189
- }
1190
-
1191
- // looseObject
1192
-
1193
- export function looseObject<T extends core.$ZodLooseShape>(
1194
- shape: T,
1195
- params?: string | core.$ZodObjectParams
1196
- ): ZodObject<T, core.$loose> {
1197
- return new ZodObject({
1198
- type: "object",
1199
- get shape() {
1200
- util.assignProp(this, "shape", { ...shape });
1201
- return this.shape;
1202
- },
1203
- catchall: unknown(),
1204
- ...util.normalizeParams(params),
1205
- }) as any;
1206
- }
1207
-
1208
- // ZodUnion
1209
- export interface ZodUnion<T extends readonly core.SomeType[] = readonly core.$ZodType[]>
1210
- extends _ZodType<core.$ZodUnionInternals<T>>,
1211
- core.$ZodUnion<T> {
1212
- options: T;
1213
- }
1214
- export const ZodUnion: core.$constructor<ZodUnion> = /*@__PURE__*/ core.$constructor("ZodUnion", (inst, def) => {
1215
- core.$ZodUnion.init(inst, def);
1216
- ZodType.init(inst, def);
1217
- inst.options = def.options;
1218
- });
1219
-
1220
- export function union<const T extends readonly core.SomeType[]>(
1221
- options: T,
1222
- params?: string | core.$ZodUnionParams
1223
- ): ZodUnion<T> {
1224
- return new ZodUnion({
1225
- type: "union",
1226
- options: options as any as core.$ZodType[],
1227
- ...util.normalizeParams(params),
1228
- }) as any;
1229
- }
1230
-
1231
- // ZodDiscriminatedUnion
1232
- export interface ZodDiscriminatedUnion<Options extends readonly core.SomeType[] = readonly core.$ZodType[]>
1233
- extends ZodUnion<Options>,
1234
- core.$ZodDiscriminatedUnion<Options> {
1235
- _zod: core.$ZodDiscriminatedUnionInternals<Options>;
1236
- }
1237
- export const ZodDiscriminatedUnion: core.$constructor<ZodDiscriminatedUnion> = /*@__PURE__*/ core.$constructor(
1238
- "ZodDiscriminatedUnion",
1239
- (inst, def) => {
1240
- ZodUnion.init(inst, def);
1241
- core.$ZodDiscriminatedUnion.init(inst, def);
1242
- }
1243
- );
1244
-
1245
- export function discriminatedUnion<
1246
- Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]],
1247
- >(
1248
- discriminator: string,
1249
- options: Types,
1250
- params?: string | core.$ZodDiscriminatedUnionParams
1251
- ): ZodDiscriminatedUnion<Types> {
1252
- // const [options, params] = args;
1253
- return new ZodDiscriminatedUnion({
1254
- type: "union",
1255
- options,
1256
- discriminator,
1257
- ...util.normalizeParams(params),
1258
- }) as any;
1259
- }
1260
-
1261
- // ZodIntersection
1262
- export interface ZodIntersection<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType>
1263
- extends _ZodType<core.$ZodIntersectionInternals<A, B>>,
1264
- core.$ZodIntersection<A, B> {}
1265
- export const ZodIntersection: core.$constructor<ZodIntersection> = /*@__PURE__*/ core.$constructor(
1266
- "ZodIntersection",
1267
- (inst, def) => {
1268
- core.$ZodIntersection.init(inst, def);
1269
- ZodType.init(inst, def);
1270
- }
1271
- );
1272
-
1273
- export function intersection<T extends core.SomeType, U extends core.SomeType>(
1274
- left: T,
1275
- right: U
1276
- ): ZodIntersection<T, U> {
1277
- return new ZodIntersection({
1278
- type: "intersection",
1279
- left: left as any as core.$ZodType,
1280
- right: right as any as core.$ZodType,
1281
- }) as any;
1282
- }
1283
-
1284
- // ZodTuple
1285
- export interface ZodTuple<
1286
- T extends util.TupleItems = readonly core.$ZodType[],
1287
- Rest extends core.SomeType | null = core.$ZodType | null,
1288
- > extends _ZodType<core.$ZodTupleInternals<T, Rest>>,
1289
- core.$ZodTuple<T, Rest> {
1290
- rest<Rest extends core.SomeType = core.$ZodType>(rest: Rest): ZodTuple<T, Rest>;
1291
- }
1292
- export const ZodTuple: core.$constructor<ZodTuple> = /*@__PURE__*/ core.$constructor("ZodTuple", (inst, def) => {
1293
- core.$ZodTuple.init(inst, def);
1294
- ZodType.init(inst, def);
1295
- inst.rest = (rest) =>
1296
- inst.clone({
1297
- ...inst._zod.def,
1298
- rest: rest as any as core.$ZodType,
1299
- }) as any;
1300
- });
1301
-
1302
- export function tuple<T extends readonly [core.SomeType, ...core.SomeType[]]>(
1303
- items: T,
1304
- params?: string | core.$ZodTupleParams
1305
- ): ZodTuple<T, null>;
1306
- export function tuple<T extends readonly [core.SomeType, ...core.SomeType[]], Rest extends core.SomeType>(
1307
- items: T,
1308
- rest: Rest,
1309
- params?: string | core.$ZodTupleParams
1310
- ): ZodTuple<T, Rest>;
1311
- export function tuple(items: [], params?: string | core.$ZodTupleParams): ZodTuple<[], null>;
1312
- export function tuple(
1313
- items: core.SomeType[],
1314
- _paramsOrRest?: string | core.$ZodTupleParams | core.SomeType,
1315
- _params?: string | core.$ZodTupleParams
1316
- ) {
1317
- const hasRest = _paramsOrRest instanceof core.$ZodType;
1318
- const params = hasRest ? _params : _paramsOrRest;
1319
- const rest = hasRest ? _paramsOrRest : null;
1320
- return new ZodTuple({
1321
- type: "tuple",
1322
- items: items as any as core.$ZodType[],
1323
- rest,
1324
- ...util.normalizeParams(params),
1325
- });
1326
- }
1327
-
1328
- // ZodRecord
1329
- export interface ZodRecord<
1330
- Key extends core.$ZodRecordKey = core.$ZodRecordKey,
1331
- Value extends core.SomeType = core.$ZodType,
1332
- > extends _ZodType<core.$ZodRecordInternals<Key, Value>>,
1333
- core.$ZodRecord<Key, Value> {
1334
- keyType: Key;
1335
- valueType: Value;
1336
- }
1337
- export const ZodRecord: core.$constructor<ZodRecord> = /*@__PURE__*/ core.$constructor("ZodRecord", (inst, def) => {
1338
- core.$ZodRecord.init(inst, def);
1339
- ZodType.init(inst, def);
1340
-
1341
- inst.keyType = def.keyType;
1342
- inst.valueType = def.valueType;
1343
- });
1344
-
1345
- export function record<Key extends core.$ZodRecordKey, Value extends core.SomeType>(
1346
- keyType: Key,
1347
- valueType: Value,
1348
- params?: string | core.$ZodRecordParams
1349
- ): ZodRecord<Key, Value> {
1350
- return new ZodRecord({
1351
- type: "record",
1352
- keyType,
1353
- valueType: valueType as any as core.$ZodType,
1354
- ...util.normalizeParams(params),
1355
- }) as any;
1356
- }
1357
- // type alksjf = core.output<core.$ZodRecordKey>;
1358
- export function partialRecord<Key extends core.$ZodRecordKey, Value extends core.SomeType>(
1359
- keyType: Key,
1360
- valueType: Value,
1361
- params?: string | core.$ZodRecordParams
1362
- ): ZodRecord<Key & core.$partial, Value> {
1363
- return new ZodRecord({
1364
- type: "record",
1365
- keyType: union([keyType, never()]),
1366
- valueType: valueType as any,
1367
- ...util.normalizeParams(params),
1368
- }) as any;
1369
- }
1370
-
1371
- // ZodMap
1372
- export interface ZodMap<Key extends core.SomeType = core.$ZodType, Value extends core.SomeType = core.$ZodType>
1373
- extends _ZodType<core.$ZodMapInternals<Key, Value>>,
1374
- core.$ZodMap<Key, Value> {
1375
- keyType: Key;
1376
- valueType: Value;
1377
- }
1378
- export const ZodMap: core.$constructor<ZodMap> = /*@__PURE__*/ core.$constructor("ZodMap", (inst, def) => {
1379
- core.$ZodMap.init(inst, def);
1380
- ZodType.init(inst, def);
1381
- inst.keyType = def.keyType;
1382
- inst.valueType = def.valueType;
1383
- });
1384
-
1385
- export function map<Key extends core.SomeType, Value extends core.SomeType>(
1386
- keyType: Key,
1387
- valueType: Value,
1388
- params?: string | core.$ZodMapParams
1389
- ): ZodMap<Key, Value> {
1390
- return new ZodMap({
1391
- type: "map",
1392
- keyType: keyType as any as core.$ZodType,
1393
- valueType: valueType as any as core.$ZodType,
1394
- ...util.normalizeParams(params),
1395
- }) as any;
1396
- }
1397
-
1398
- // ZodSet
1399
- export interface ZodSet<T extends core.SomeType = core.$ZodType>
1400
- extends _ZodType<core.$ZodSetInternals<T>>,
1401
- core.$ZodSet<T> {
1402
- min(minSize: number, params?: string | core.$ZodCheckMinSizeParams): this;
1403
- /** */
1404
- nonempty(params?: string | core.$ZodCheckMinSizeParams): this;
1405
- max(maxSize: number, params?: string | core.$ZodCheckMaxSizeParams): this;
1406
- size(size: number, params?: string | core.$ZodCheckSizeEqualsParams): this;
1407
- }
1408
- export const ZodSet: core.$constructor<ZodSet> = /*@__PURE__*/ core.$constructor("ZodSet", (inst, def) => {
1409
- core.$ZodSet.init(inst, def);
1410
- ZodType.init(inst, def);
1411
-
1412
- inst.min = (...args) => inst.check(core._minSize(...args));
1413
- inst.nonempty = (params) => inst.check(core._minSize(1, params));
1414
- inst.max = (...args) => inst.check(core._maxSize(...args));
1415
- inst.size = (...args) => inst.check(core._size(...args));
1416
- });
1417
-
1418
- export function set<Value extends core.SomeType>(
1419
- valueType: Value,
1420
- params?: string | core.$ZodSetParams
1421
- ): ZodSet<Value> {
1422
- return new ZodSet({
1423
- type: "set",
1424
- valueType: valueType as any as core.$ZodType,
1425
- ...util.normalizeParams(params),
1426
- }) as any;
1427
- }
1428
-
1429
- // ZodEnum
1430
- export interface ZodEnum<
1431
- /** @ts-ignore Cast variance */
1432
- out T extends util.EnumLike = util.EnumLike,
1433
- > extends _ZodType<core.$ZodEnumInternals<T>>,
1434
- core.$ZodEnum<T> {
1435
- enum: T;
1436
- options: Array<T[keyof T]>;
1437
-
1438
- extract<const U extends readonly (keyof T)[]>(
1439
- values: U,
1440
- params?: string | core.$ZodEnumParams
1441
- ): ZodEnum<util.Flatten<Pick<T, U[number]>>>;
1442
- exclude<const U extends readonly (keyof T)[]>(
1443
- values: U,
1444
- params?: string | core.$ZodEnumParams
1445
- ): ZodEnum<util.Flatten<Omit<T, U[number]>>>;
1446
- }
1447
- export const ZodEnum: core.$constructor<ZodEnum> = /*@__PURE__*/ core.$constructor("ZodEnum", (inst, def) => {
1448
- core.$ZodEnum.init(inst, def);
1449
- ZodType.init(inst, def);
1450
-
1451
- inst.enum = def.entries;
1452
- inst.options = Object.values(def.entries);
1453
-
1454
- const keys = new Set(Object.keys(def.entries));
1455
-
1456
- inst.extract = (values, params) => {
1457
- const newEntries: Record<string, any> = {};
1458
- for (const value of values) {
1459
- if (keys.has(value)) {
1460
- newEntries[value] = def.entries[value];
1461
- } else throw new Error(`Key ${value} not found in enum`);
1462
- }
1463
- return new ZodEnum({
1464
- ...def,
1465
- checks: [],
1466
- ...util.normalizeParams(params),
1467
- entries: newEntries,
1468
- }) as any;
1469
- };
1470
-
1471
- inst.exclude = (values, params) => {
1472
- const newEntries: Record<string, any> = { ...def.entries };
1473
- for (const value of values) {
1474
- if (keys.has(value)) {
1475
- delete newEntries[value];
1476
- } else throw new Error(`Key ${value} not found in enum`);
1477
- }
1478
- return new ZodEnum({
1479
- ...def,
1480
- checks: [],
1481
- ...util.normalizeParams(params),
1482
- entries: newEntries,
1483
- }) as any;
1484
- };
1485
- });
1486
-
1487
- function _enum<const T extends readonly string[]>(
1488
- values: T,
1489
- params?: string | core.$ZodEnumParams
1490
- ): ZodEnum<util.ToEnum<T[number]>>;
1491
- function _enum<const T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
1492
- function _enum(values: any, params?: string | core.$ZodEnumParams) {
1493
- const entries: any = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
1494
-
1495
- return new ZodEnum({
1496
- type: "enum",
1497
- entries,
1498
- ...util.normalizeParams(params),
1499
- }) as any;
1500
- }
1501
- export { _enum as enum };
1502
-
1503
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
1504
- *
1505
- * ```ts
1506
- * enum Colors { red, green, blue }
1507
- * z.enum(Colors);
1508
- * ```
1509
- */
1510
- export function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T> {
1511
- return new ZodEnum({
1512
- type: "enum",
1513
- entries,
1514
- ...util.normalizeParams(params),
1515
- }) as any as ZodEnum<T>;
1516
- }
1517
-
1518
- // ZodLiteral
1519
- export interface ZodLiteral<T extends util.Literal = util.Literal>
1520
- extends _ZodType<core.$ZodLiteralInternals<T>>,
1521
- core.$ZodLiteral<T> {
1522
- values: Set<T>;
1523
- /** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
1524
- value: T;
1525
- }
1526
- export const ZodLiteral: core.$constructor<ZodLiteral> = /*@__PURE__*/ core.$constructor("ZodLiteral", (inst, def) => {
1527
- core.$ZodLiteral.init(inst, def);
1528
- ZodType.init(inst, def);
1529
- inst.values = new Set(def.values);
1530
- Object.defineProperty(inst, "value", {
1531
- get() {
1532
- if (def.values.length > 1) {
1533
- throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
1534
- }
1535
- return def.values[0];
1536
- },
1537
- });
1538
- });
1539
-
1540
- export function literal<const T extends ReadonlyArray<util.Literal>>(
1541
- value: T,
1542
- params?: string | core.$ZodLiteralParams
1543
- ): ZodLiteral<T[number]>;
1544
- export function literal<const T extends util.Literal>(
1545
- value: T,
1546
- params?: string | core.$ZodLiteralParams
1547
- ): ZodLiteral<T>;
1548
- export function literal(value: any, params: any) {
1549
- return new ZodLiteral({
1550
- type: "literal",
1551
- values: Array.isArray(value) ? value : [value],
1552
- ...util.normalizeParams(params),
1553
- });
1554
- }
1555
-
1556
- // ZodFile
1557
- export interface ZodFile extends _ZodType<core.$ZodFileInternals>, core.$ZodFile {
1558
- min(size: number, params?: string | core.$ZodCheckMinSizeParams): this;
1559
- max(size: number, params?: string | core.$ZodCheckMaxSizeParams): this;
1560
- mime(types: util.MimeTypes | Array<util.MimeTypes>, params?: string | core.$ZodCheckMimeTypeParams): this;
1561
- }
1562
- export const ZodFile: core.$constructor<ZodFile> = /*@__PURE__*/ core.$constructor("ZodFile", (inst, def) => {
1563
- core.$ZodFile.init(inst, def);
1564
- ZodType.init(inst, def);
1565
-
1566
- inst.min = (size, params) => inst.check(core._minSize(size, params));
1567
- inst.max = (size, params) => inst.check(core._maxSize(size, params));
1568
- inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));
1569
- });
1570
-
1571
- export function file(params?: string | core.$ZodFileParams): ZodFile {
1572
- return core._file(ZodFile, params) as any;
1573
- }
1574
-
1575
- // ZodTransform
1576
- export interface ZodTransform<O = unknown, I = unknown>
1577
- extends _ZodType<core.$ZodTransformInternals<O, I>>,
1578
- core.$ZodTransform<O, I> {}
1579
- export const ZodTransform: core.$constructor<ZodTransform> = /*@__PURE__*/ core.$constructor(
1580
- "ZodTransform",
1581
- (inst, def) => {
1582
- core.$ZodTransform.init(inst, def);
1583
- ZodType.init(inst, def);
1584
-
1585
- inst._zod.parse = (payload, _ctx) => {
1586
- (payload as RefinementCtx).addIssue = (issue) => {
1587
- if (typeof issue === "string") {
1588
- payload.issues.push(util.issue(issue, payload.value, def));
1589
- } else {
1590
- // for Zod 3 backwards compatibility
1591
- const _issue = issue as any;
1592
-
1593
- if (_issue.fatal) _issue.continue = false;
1594
- _issue.code ??= "custom";
1595
- _issue.input ??= payload.value;
1596
- _issue.inst ??= inst;
1597
- _issue.continue ??= true;
1598
- payload.issues.push(util.issue(_issue));
1599
- }
1600
- };
1601
-
1602
- const output = def.transform(payload.value, payload);
1603
- if (output instanceof Promise) {
1604
- return output.then((output) => {
1605
- payload.value = output;
1606
- return payload;
1607
- });
1608
- }
1609
- payload.value = output;
1610
- return payload;
1611
- };
1612
- }
1613
- );
1614
-
1615
- export function transform<I = unknown, O = I>(
1616
- fn: (input: I, ctx: core.ParsePayload) => O
1617
- ): ZodTransform<Awaited<O>, I> {
1618
- return new ZodTransform({
1619
- type: "transform",
1620
- transform: fn as any,
1621
- }) as any;
1622
- }
1623
-
1624
- // ZodOptional
1625
- export interface ZodOptional<T extends core.SomeType = core.$ZodType>
1626
- extends _ZodType<core.$ZodOptionalInternals<T>>,
1627
- core.$ZodOptional<T> {
1628
- unwrap(): T;
1629
- }
1630
- export const ZodOptional: core.$constructor<ZodOptional> = /*@__PURE__*/ core.$constructor(
1631
- "ZodOptional",
1632
- (inst, def) => {
1633
- core.$ZodOptional.init(inst, def);
1634
- ZodType.init(inst, def);
1635
-
1636
- inst.unwrap = () => inst._zod.def.innerType;
1637
- }
1638
- );
1639
-
1640
- export function optional<T extends core.SomeType>(innerType: T): ZodOptional<T> {
1641
- return new ZodOptional({
1642
- type: "optional",
1643
- innerType: innerType as any as core.$ZodType,
1644
- }) as any;
1645
- }
1646
-
1647
- // ZodNullable
1648
- export interface ZodNullable<T extends core.SomeType = core.$ZodType>
1649
- extends _ZodType<core.$ZodNullableInternals<T>>,
1650
- core.$ZodNullable<T> {
1651
- unwrap(): T;
1652
- }
1653
- export const ZodNullable: core.$constructor<ZodNullable> = /*@__PURE__*/ core.$constructor(
1654
- "ZodNullable",
1655
- (inst, def) => {
1656
- core.$ZodNullable.init(inst, def);
1657
- ZodType.init(inst, def);
1658
-
1659
- inst.unwrap = () => inst._zod.def.innerType;
1660
- }
1661
- );
1662
-
1663
- export function nullable<T extends core.SomeType>(innerType: T): ZodNullable<T> {
1664
- return new ZodNullable({
1665
- type: "nullable",
1666
- innerType: innerType as any as core.$ZodType,
1667
- }) as any;
1668
- }
1669
-
1670
- // nullish
1671
- export function nullish<T extends core.SomeType>(innerType: T): ZodOptional<ZodNullable<T>> {
1672
- return optional(nullable(innerType));
1673
- }
1674
-
1675
- // ZodDefault
1676
- export interface ZodDefault<T extends core.SomeType = core.$ZodType>
1677
- extends _ZodType<core.$ZodDefaultInternals<T>>,
1678
- core.$ZodDefault<T> {
1679
- unwrap(): T;
1680
- /** @deprecated Use `.unwrap()` instead. */
1681
- removeDefault(): T;
1682
- }
1683
- export const ZodDefault: core.$constructor<ZodDefault> = /*@__PURE__*/ core.$constructor("ZodDefault", (inst, def) => {
1684
- core.$ZodDefault.init(inst, def);
1685
- ZodType.init(inst, def);
1686
-
1687
- inst.unwrap = () => inst._zod.def.innerType;
1688
- inst.removeDefault = inst.unwrap;
1689
- });
1690
-
1691
- export function _default<T extends core.SomeType>(
1692
- innerType: T,
1693
- defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)
1694
- ): ZodDefault<T> {
1695
- return new ZodDefault({
1696
- type: "default",
1697
- innerType: innerType as any as core.$ZodType,
1698
- get defaultValue() {
1699
- return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue;
1700
- },
1701
- }) as any;
1702
- }
1703
-
1704
- // ZodPrefault
1705
- export interface ZodPrefault<T extends core.SomeType = core.$ZodType>
1706
- extends _ZodType<core.$ZodPrefaultInternals<T>>,
1707
- core.$ZodPrefault<T> {
1708
- unwrap(): T;
1709
- }
1710
- export const ZodPrefault: core.$constructor<ZodPrefault> = /*@__PURE__*/ core.$constructor(
1711
- "ZodPrefault",
1712
- (inst, def) => {
1713
- core.$ZodPrefault.init(inst, def);
1714
- ZodType.init(inst, def);
1715
- inst.unwrap = () => inst._zod.def.innerType;
1716
- }
1717
- );
1718
-
1719
- export function prefault<T extends core.SomeType>(
1720
- innerType: T,
1721
- defaultValue: core.input<T> | (() => core.input<T>)
1722
- ): ZodPrefault<T> {
1723
- return new ZodPrefault({
1724
- type: "prefault",
1725
- innerType: innerType as any as core.$ZodType,
1726
- get defaultValue() {
1727
- return typeof defaultValue === "function" ? (defaultValue as Function)() : defaultValue;
1728
- },
1729
- }) as any;
1730
- }
1731
-
1732
- // ZodNonOptional
1733
- export interface ZodNonOptional<T extends core.SomeType = core.$ZodType>
1734
- extends _ZodType<core.$ZodNonOptionalInternals<T>>,
1735
- core.$ZodNonOptional<T> {
1736
- unwrap(): T;
1737
- }
1738
- export const ZodNonOptional: core.$constructor<ZodNonOptional> = /*@__PURE__*/ core.$constructor(
1739
- "ZodNonOptional",
1740
- (inst, def) => {
1741
- core.$ZodNonOptional.init(inst, def);
1742
- ZodType.init(inst, def);
1743
-
1744
- inst.unwrap = () => inst._zod.def.innerType;
1745
- }
1746
- );
1747
-
1748
- export function nonoptional<T extends core.SomeType>(
1749
- innerType: T,
1750
- params?: string | core.$ZodNonOptionalParams
1751
- ): ZodNonOptional<T> {
1752
- return new ZodNonOptional({
1753
- type: "nonoptional",
1754
- innerType: innerType as any as core.$ZodType,
1755
- ...util.normalizeParams(params),
1756
- }) as any;
1757
- }
1758
-
1759
- // ZodSuccess
1760
- export interface ZodSuccess<T extends core.SomeType = core.$ZodType>
1761
- extends _ZodType<core.$ZodSuccessInternals<T>>,
1762
- core.$ZodSuccess<T> {
1763
- unwrap(): T;
1764
- }
1765
- export const ZodSuccess: core.$constructor<ZodSuccess> = /*@__PURE__*/ core.$constructor("ZodSuccess", (inst, def) => {
1766
- core.$ZodSuccess.init(inst, def);
1767
- ZodType.init(inst, def);
1768
-
1769
- inst.unwrap = () => inst._zod.def.innerType;
1770
- });
1771
-
1772
- export function success<T extends core.SomeType>(innerType: T): ZodSuccess<T> {
1773
- return new ZodSuccess({
1774
- type: "success",
1775
- innerType: innerType as any as core.$ZodType,
1776
- }) as any;
1777
- }
1778
-
1779
- // ZodCatch
1780
- export interface ZodCatch<T extends core.SomeType = core.$ZodType>
1781
- extends _ZodType<core.$ZodCatchInternals<T>>,
1782
- core.$ZodCatch<T> {
1783
- unwrap(): T;
1784
- /** @deprecated Use `.unwrap()` instead. */
1785
- removeCatch(): T;
1786
- }
1787
- export const ZodCatch: core.$constructor<ZodCatch> = /*@__PURE__*/ core.$constructor("ZodCatch", (inst, def) => {
1788
- core.$ZodCatch.init(inst, def);
1789
- ZodType.init(inst, def);
1790
-
1791
- inst.unwrap = () => inst._zod.def.innerType;
1792
- inst.removeCatch = inst.unwrap;
1793
- });
1794
-
1795
- function _catch<T extends core.SomeType>(
1796
- innerType: T,
1797
- catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)
1798
- ): ZodCatch<T> {
1799
- return new ZodCatch({
1800
- type: "catch",
1801
- innerType: innerType as any as core.$ZodType,
1802
- catchValue: (typeof catchValue === "function" ? catchValue : () => catchValue) as (
1803
- ctx: core.$ZodCatchCtx
1804
- ) => core.output<T>,
1805
- }) as any;
1806
- }
1807
- export { _catch as catch };
1808
-
1809
- // ZodNaN
1810
- export interface ZodNaN extends _ZodType<core.$ZodNaNInternals>, core.$ZodNaN {}
1811
- export const ZodNaN: core.$constructor<ZodNaN> = /*@__PURE__*/ core.$constructor("ZodNaN", (inst, def) => {
1812
- core.$ZodNaN.init(inst, def);
1813
- ZodType.init(inst, def);
1814
- });
1815
-
1816
- export function nan(params?: string | core.$ZodNaNParams): ZodNaN {
1817
- return core._nan(ZodNaN, params);
1818
- }
1819
-
1820
- // ZodPipe
1821
- export interface ZodPipe<A extends core.SomeType = core.$ZodType, B extends core.SomeType = core.$ZodType>
1822
- extends _ZodType<core.$ZodPipeInternals<A, B>>,
1823
- core.$ZodPipe<A, B> {
1824
- in: A;
1825
- out: B;
1826
- }
1827
- export const ZodPipe: core.$constructor<ZodPipe> = /*@__PURE__*/ core.$constructor("ZodPipe", (inst, def) => {
1828
- core.$ZodPipe.init(inst, def);
1829
- ZodType.init(inst, def);
1830
-
1831
- inst.in = def.in;
1832
- inst.out = def.out;
1833
- });
1834
-
1835
- export function pipe<
1836
- const A extends core.SomeType,
1837
- B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>,
1838
- >(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodPipe<A, B>;
1839
- export function pipe(in_: core.SomeType, out: core.SomeType) {
1840
- return new ZodPipe({
1841
- type: "pipe",
1842
- in: in_ as unknown as core.$ZodType,
1843
- out: out as unknown as core.$ZodType,
1844
- // ...util.normalizeParams(params),
1845
- });
1846
- }
1847
-
1848
- // ZodReadonly
1849
- export interface ZodReadonly<T extends core.SomeType = core.$ZodType>
1850
- extends _ZodType<core.$ZodReadonlyInternals<T>>,
1851
- core.$ZodReadonly<T> {}
1852
- export const ZodReadonly: core.$constructor<ZodReadonly> = /*@__PURE__*/ core.$constructor(
1853
- "ZodReadonly",
1854
- (inst, def) => {
1855
- core.$ZodReadonly.init(inst, def);
1856
- ZodType.init(inst, def);
1857
- }
1858
- );
1859
-
1860
- export function readonly<T extends core.SomeType>(innerType: T): ZodReadonly<T> {
1861
- return new ZodReadonly({
1862
- type: "readonly",
1863
- innerType: innerType as any as core.$ZodType,
1864
- }) as any;
1865
- }
1866
-
1867
- // ZodTemplateLiteral
1868
- export interface ZodTemplateLiteral<Template extends string = string>
1869
- extends _ZodType<core.$ZodTemplateLiteralInternals<Template>>,
1870
- core.$ZodTemplateLiteral<Template> {}
1871
- export const ZodTemplateLiteral: core.$constructor<ZodTemplateLiteral> = /*@__PURE__*/ core.$constructor(
1872
- "ZodTemplateLiteral",
1873
- (inst, def) => {
1874
- core.$ZodTemplateLiteral.init(inst, def);
1875
- ZodType.init(inst, def);
1876
- }
1877
- );
1878
-
1879
- export function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(
1880
- parts: Parts,
1881
- params?: string | core.$ZodTemplateLiteralParams
1882
- ): ZodTemplateLiteral<core.$PartsToTemplateLiteral<Parts>> {
1883
- return new ZodTemplateLiteral({
1884
- type: "template_literal",
1885
- parts,
1886
- ...util.normalizeParams(params),
1887
- }) as any;
1888
- }
1889
-
1890
- // ZodLazy
1891
- export interface ZodLazy<T extends core.SomeType = core.$ZodType>
1892
- extends _ZodType<core.$ZodLazyInternals<T>>,
1893
- core.$ZodLazy<T> {
1894
- unwrap(): T;
1895
- }
1896
- export const ZodLazy: core.$constructor<ZodLazy> = /*@__PURE__*/ core.$constructor("ZodLazy", (inst, def) => {
1897
- core.$ZodLazy.init(inst, def);
1898
- ZodType.init(inst, def);
1899
-
1900
- inst.unwrap = () => inst._zod.def.getter();
1901
- });
1902
-
1903
- export function lazy<T extends core.SomeType>(getter: () => T): ZodLazy<T> {
1904
- return new ZodLazy({
1905
- type: "lazy",
1906
- getter: getter as any,
1907
- }) as any;
1908
- }
1909
-
1910
- // ZodPromise
1911
- export interface ZodPromise<T extends core.SomeType = core.$ZodType>
1912
- extends _ZodType<core.$ZodPromiseInternals<T>>,
1913
- core.$ZodPromise<T> {
1914
- unwrap(): T;
1915
- }
1916
- export const ZodPromise: core.$constructor<ZodPromise> = /*@__PURE__*/ core.$constructor("ZodPromise", (inst, def) => {
1917
- core.$ZodPromise.init(inst, def);
1918
- ZodType.init(inst, def);
1919
-
1920
- inst.unwrap = () => inst._zod.def.innerType;
1921
- });
1922
-
1923
- export function promise<T extends core.SomeType>(innerType: T): ZodPromise<T> {
1924
- return new ZodPromise({
1925
- type: "promise",
1926
- innerType: innerType as any as core.$ZodType,
1927
- }) as any;
1928
- }
1929
-
1930
- // ZodCustom
1931
- export interface ZodCustom<O = unknown, I = unknown>
1932
- extends _ZodType<core.$ZodCustomInternals<O, I>>,
1933
- core.$ZodCustom<O, I> {}
1934
- export const ZodCustom: core.$constructor<ZodCustom> = /*@__PURE__*/ core.$constructor("ZodCustom", (inst, def) => {
1935
- core.$ZodCustom.init(inst, def);
1936
- ZodType.init(inst, def);
1937
- });
1938
-
1939
- // custom checks
1940
- export function check<O = unknown>(fn: core.CheckFn<O>): core.$ZodCheck<O> {
1941
- const ch = new core.$ZodCheck({
1942
- check: "custom",
1943
- // ...util.normalizeParams(params),
1944
- });
1945
-
1946
- ch._zod.check = fn;
1947
- return ch;
1948
- }
1949
-
1950
- export function custom<O>(
1951
- fn?: (data: unknown) => unknown,
1952
- _params?: string | core.$ZodCustomParams | undefined
1953
- ): ZodCustom<O, O> {
1954
- return core._custom(ZodCustom, fn ?? (() => true), _params) as any;
1955
- }
1956
-
1957
- export function refine<T>(
1958
- fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>,
1959
- _params: string | core.$ZodCustomParams = {}
1960
- ): core.$ZodCheck<T> {
1961
- return core._refine(ZodCustom, fn, _params);
1962
- }
1963
-
1964
- // superRefine
1965
- export function superRefine<T>(fn: (arg: T, payload: RefinementCtx<T>) => void | Promise<void>): core.$ZodCheck<T> {
1966
- const ch = check<T>((payload) => {
1967
- (payload as RefinementCtx).addIssue = (issue) => {
1968
- if (typeof issue === "string") {
1969
- payload.issues.push(util.issue(issue, payload.value, ch._zod.def));
1970
- } else {
1971
- // for Zod 3 backwards compatibility
1972
- const _issue: any = issue;
1973
- if (_issue.fatal) _issue.continue = false;
1974
- _issue.code ??= "custom";
1975
- _issue.input ??= payload.value;
1976
- _issue.inst ??= ch;
1977
- _issue.continue ??= !ch._zod.def.abort;
1978
- payload.issues.push(util.issue(_issue));
1979
- }
1980
- };
1981
-
1982
- return fn(payload.value, payload as RefinementCtx<T>);
1983
- });
1984
- return ch;
1985
- }
1986
-
1987
- type ZodInstanceOfParams = core.Params<
1988
- ZodCustom,
1989
- core.$ZodIssueCustom,
1990
- "type" | "check" | "checks" | "fn" | "abort" | "error" | "params" | "path"
1991
- >;
1992
- function _instanceof<T extends typeof util.Class>(
1993
- cls: T,
1994
- params: ZodInstanceOfParams = {
1995
- error: `Input not instance of ${cls.name}`,
1996
- }
1997
- ): ZodCustom<InstanceType<T>, InstanceType<T>> {
1998
- const inst = new ZodCustom({
1999
- type: "custom",
2000
- check: "custom",
2001
- fn: (data) => data instanceof cls,
2002
- abort: true,
2003
- ...(util.normalizeParams(params) as any),
2004
- });
2005
- inst._zod.bag.Class = cls;
2006
- return inst as any;
2007
- }
2008
- export { _instanceof as instanceof };
2009
-
2010
- // stringbool
2011
- export const stringbool: (
2012
- _params?: string | core.$ZodStringBoolParams
2013
- ) => ZodPipe<ZodPipe<ZodString, ZodTransform<boolean, string>>, ZodBoolean> = (...args) =>
2014
- core._stringbool(
2015
- {
2016
- Pipe: ZodPipe,
2017
- Boolean: ZodBoolean,
2018
- String: ZodString,
2019
- Transform: ZodTransform,
2020
- },
2021
- ...args
2022
- ) as any;
2023
-
2024
- // json
2025
- type _ZodJSONSchema = ZodUnion<
2026
- [ZodString, ZodNumber, ZodBoolean, ZodNull, ZodArray<ZodJSONSchema>, ZodRecord<ZodString, ZodJSONSchema>]
2027
- >;
2028
- type _ZodJSONSchemaInternals = _ZodJSONSchema["_zod"];
2029
-
2030
- export interface ZodJSONSchemaInternals extends _ZodJSONSchemaInternals {
2031
- output: util.JSONType;
2032
- input: util.JSONType;
2033
- }
2034
- export interface ZodJSONSchema extends _ZodJSONSchema {
2035
- _zod: ZodJSONSchemaInternals;
2036
- }
2037
-
2038
- export function json(params?: string | core.$ZodCustomParams): ZodJSONSchema {
2039
- const jsonSchema: any = lazy(() => {
2040
- return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);
2041
- });
2042
-
2043
- return jsonSchema;
2044
- }
2045
-
2046
- // preprocess
2047
-
2048
- // /** @deprecated Use `z.pipe()` and `z.transform()` instead. */
2049
- export function preprocess<A, U extends core.SomeType, B = unknown>(
2050
- fn: (arg: B, ctx: RefinementCtx) => A,
2051
- schema: U
2052
- ): ZodPipe<ZodTransform<A, B>, U> {
2053
- return pipe(transform(fn as any), schema as any) as any;
2054
- }