vanta-auditor-api-sdk 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (386) hide show
  1. package/FUNCTIONS.md +5 -22
  2. package/README.md +39 -58
  3. package/RUNTIMES.md +6 -6
  4. package/bin/mcp-server.js +1188 -1035
  5. package/bin/mcp-server.js.map +84 -73
  6. package/docs/sdks/auditors/README.md +8 -11
  7. package/docs/sdks/audits/README.md +76 -101
  8. package/examples/README.md +31 -0
  9. package/examples/auditsList.example.ts +26 -0
  10. package/examples/package-lock.json +627 -0
  11. package/examples/package.json +18 -0
  12. package/funcs/auditorsCreate.d.ts +3 -2
  13. package/funcs/auditorsCreate.d.ts.map +1 -1
  14. package/funcs/auditorsCreate.js +4 -2
  15. package/funcs/auditorsCreate.js.map +1 -1
  16. package/funcs/auditsCreateCommentForEvidence.d.ts +3 -2
  17. package/funcs/auditsCreateCommentForEvidence.d.ts.map +1 -1
  18. package/funcs/auditsCreateCommentForEvidence.js +4 -2
  19. package/funcs/auditsCreateCommentForEvidence.js.map +1 -1
  20. package/funcs/auditsCreateCustomControl.d.ts +3 -2
  21. package/funcs/auditsCreateCustomControl.d.ts.map +1 -1
  22. package/funcs/auditsCreateCustomControl.js +4 -2
  23. package/funcs/auditsCreateCustomControl.js.map +1 -1
  24. package/funcs/auditsCreateCustomEvidenceRequest.d.ts +3 -2
  25. package/funcs/auditsCreateCustomEvidenceRequest.d.ts.map +1 -1
  26. package/funcs/auditsCreateCustomEvidenceRequest.js +4 -2
  27. package/funcs/auditsCreateCustomEvidenceRequest.js.map +1 -1
  28. package/funcs/auditsGetEvidenceUrls.d.ts +3 -2
  29. package/funcs/auditsGetEvidenceUrls.d.ts.map +1 -1
  30. package/funcs/auditsGetEvidenceUrls.js +4 -2
  31. package/funcs/auditsGetEvidenceUrls.js.map +1 -1
  32. package/funcs/auditsList.d.ts +3 -2
  33. package/funcs/auditsList.d.ts.map +1 -1
  34. package/funcs/auditsList.js +5 -2
  35. package/funcs/auditsList.js.map +1 -1
  36. package/funcs/auditsListComments.d.ts +3 -2
  37. package/funcs/auditsListComments.d.ts.map +1 -1
  38. package/funcs/auditsListComments.js +4 -2
  39. package/funcs/auditsListComments.js.map +1 -1
  40. package/funcs/auditsListControls.d.ts +3 -2
  41. package/funcs/auditsListControls.d.ts.map +1 -1
  42. package/funcs/auditsListControls.js +4 -2
  43. package/funcs/auditsListControls.js.map +1 -1
  44. package/funcs/auditsListEvidence.d.ts +3 -2
  45. package/funcs/auditsListEvidence.d.ts.map +1 -1
  46. package/funcs/auditsListEvidence.js +4 -2
  47. package/funcs/auditsListEvidence.js.map +1 -1
  48. package/funcs/auditsUpdateEvidence.d.ts +3 -2
  49. package/funcs/auditsUpdateEvidence.d.ts.map +1 -1
  50. package/funcs/auditsUpdateEvidence.js +4 -2
  51. package/funcs/auditsUpdateEvidence.js.map +1 -1
  52. package/hooks/types.d.ts +2 -0
  53. package/hooks/types.d.ts.map +1 -1
  54. package/index.d.ts +2 -0
  55. package/index.d.ts.map +1 -1
  56. package/index.js +3 -1
  57. package/index.js.map +1 -1
  58. package/jsr.json +1 -1
  59. package/lib/base64.d.ts +1 -1
  60. package/lib/base64.d.ts.map +1 -1
  61. package/lib/base64.js +1 -1
  62. package/lib/base64.js.map +1 -1
  63. package/lib/config.d.ts +7 -3
  64. package/lib/config.d.ts.map +1 -1
  65. package/lib/config.js +3 -3
  66. package/lib/config.js.map +1 -1
  67. package/lib/encodings.d.ts.map +1 -1
  68. package/lib/env.d.ts +1 -1
  69. package/lib/env.d.ts.map +1 -1
  70. package/lib/env.js +19 -2
  71. package/lib/env.js.map +1 -1
  72. package/lib/files.d.ts +5 -0
  73. package/lib/files.d.ts.map +1 -1
  74. package/lib/files.js +41 -0
  75. package/lib/files.js.map +1 -1
  76. package/lib/matchers.d.ts +3 -10
  77. package/lib/matchers.d.ts.map +1 -1
  78. package/lib/matchers.js +33 -31
  79. package/lib/matchers.js.map +1 -1
  80. package/lib/schemas.d.ts +1 -1
  81. package/lib/schemas.d.ts.map +1 -1
  82. package/lib/schemas.js +2 -2
  83. package/lib/schemas.js.map +1 -1
  84. package/lib/sdks.d.ts +4 -1
  85. package/lib/sdks.d.ts.map +1 -1
  86. package/lib/sdks.js +9 -14
  87. package/lib/sdks.js.map +1 -1
  88. package/lib/security.d.ts +2 -2
  89. package/lib/security.d.ts.map +1 -1
  90. package/lib/security.js.map +1 -1
  91. package/lib/url.js +1 -1
  92. package/lib/url.js.map +1 -1
  93. package/mcp-server/cli/start/command.d.ts.map +1 -1
  94. package/mcp-server/cli/start/command.js +2 -15
  95. package/mcp-server/cli/start/command.js.map +1 -1
  96. package/mcp-server/cli/start/impl.d.ts +0 -2
  97. package/mcp-server/cli/start/impl.d.ts.map +1 -1
  98. package/mcp-server/cli/start/impl.js +2 -4
  99. package/mcp-server/cli/start/impl.js.map +1 -1
  100. package/mcp-server/extensions.d.ts +1 -1
  101. package/mcp-server/extensions.d.ts.map +1 -1
  102. package/mcp-server/mcp-server.js +1 -1
  103. package/mcp-server/prompts.d.ts +1 -1
  104. package/mcp-server/prompts.d.ts.map +1 -1
  105. package/mcp-server/server.js +1 -1
  106. package/mcp-server/shared.d.ts.map +1 -1
  107. package/mcp-server/shared.js +1 -1
  108. package/mcp-server/shared.js.map +1 -1
  109. package/mcp-server/tools.d.ts +1 -1
  110. package/mcp-server/tools.d.ts.map +1 -1
  111. package/models/components/addauditorinput.d.ts +1 -1
  112. package/models/components/addauditorinput.d.ts.map +1 -1
  113. package/models/components/addauditorinput.js +1 -1
  114. package/models/components/addauditorinput.js.map +1 -1
  115. package/models/components/addcommentinput.d.ts +1 -1
  116. package/models/components/addcommentinput.d.ts.map +1 -1
  117. package/models/components/addcommentinput.js +1 -1
  118. package/models/components/addcommentinput.js.map +1 -1
  119. package/models/components/audit.d.ts +6 -3
  120. package/models/components/audit.d.ts.map +1 -1
  121. package/models/components/audit.js +6 -3
  122. package/models/components/audit.js.map +1 -1
  123. package/models/components/auditevidencestate.d.ts +1 -1
  124. package/models/components/auditevidencestate.d.ts.map +1 -1
  125. package/models/components/auditevidencestate.js +1 -1
  126. package/models/components/auditevidencestate.js.map +1 -1
  127. package/models/components/auditevidencetype.d.ts +1 -1
  128. package/models/components/auditevidencetype.d.ts.map +1 -1
  129. package/models/components/auditevidencetype.js +1 -1
  130. package/models/components/auditevidencetype.js.map +1 -1
  131. package/models/components/auditevidenceupdateinput.d.ts +1 -1
  132. package/models/components/auditevidenceupdateinput.d.ts.map +1 -1
  133. package/models/components/auditevidenceupdateinput.js +1 -1
  134. package/models/components/auditevidenceupdateinput.js.map +1 -1
  135. package/models/components/auditfocus.d.ts +28 -0
  136. package/models/components/auditfocus.d.ts.map +1 -0
  137. package/models/components/auditfocus.js +61 -0
  138. package/models/components/auditfocus.js.map +1 -0
  139. package/models/components/auditor.d.ts +1 -1
  140. package/models/components/auditor.d.ts.map +1 -1
  141. package/models/components/auditor.js +1 -1
  142. package/models/components/auditor.js.map +1 -1
  143. package/models/components/auditorcontrol.d.ts +1 -1
  144. package/models/components/auditorcontrol.d.ts.map +1 -1
  145. package/models/components/auditorcontrol.js +1 -1
  146. package/models/components/auditorcontrol.js.map +1 -1
  147. package/models/components/auditorenabledstatetransition.d.ts +1 -1
  148. package/models/components/auditorenabledstatetransition.d.ts.map +1 -1
  149. package/models/components/auditorenabledstatetransition.js +1 -1
  150. package/models/components/auditorenabledstatetransition.js.map +1 -1
  151. package/models/components/comment.d.ts +1 -1
  152. package/models/components/comment.d.ts.map +1 -1
  153. package/models/components/comment.js +1 -1
  154. package/models/components/comment.js.map +1 -1
  155. package/models/components/control.d.ts +1 -1
  156. package/models/components/control.d.ts.map +1 -1
  157. package/models/components/control.js +1 -1
  158. package/models/components/control.js.map +1 -1
  159. package/models/components/controldomain.d.ts +1 -1
  160. package/models/components/controldomain.d.ts.map +1 -1
  161. package/models/components/controldomain.js +1 -1
  162. package/models/components/controldomain.js.map +1 -1
  163. package/models/components/controlsource.d.ts +1 -1
  164. package/models/components/controlsource.d.ts.map +1 -1
  165. package/models/components/controlsource.js +1 -1
  166. package/models/components/controlsource.js.map +1 -1
  167. package/models/components/createcustomcontrolinput.d.ts +1 -1
  168. package/models/components/createcustomcontrolinput.d.ts.map +1 -1
  169. package/models/components/createcustomcontrolinput.js +1 -1
  170. package/models/components/createcustomcontrolinput.js.map +1 -1
  171. package/models/components/createcustomevidencerequestinput.d.ts +1 -1
  172. package/models/components/createcustomevidencerequestinput.d.ts.map +1 -1
  173. package/models/components/createcustomevidencerequestinput.js +1 -1
  174. package/models/components/createcustomevidencerequestinput.js.map +1 -1
  175. package/models/components/customevidencerequest.d.ts +1 -1
  176. package/models/components/customevidencerequest.d.ts.map +1 -1
  177. package/models/components/customevidencerequest.js +1 -1
  178. package/models/components/customevidencerequest.js.map +1 -1
  179. package/models/components/customfield.d.ts +1 -1
  180. package/models/components/customfield.d.ts.map +1 -1
  181. package/models/components/customfield.js +1 -1
  182. package/models/components/customfield.js.map +1 -1
  183. package/models/components/evidence.d.ts +1 -1
  184. package/models/components/evidence.d.ts.map +1 -1
  185. package/models/components/evidence.js +1 -1
  186. package/models/components/evidence.js.map +1 -1
  187. package/models/components/evidencecontrol.d.ts +1 -1
  188. package/models/components/evidencecontrol.d.ts.map +1 -1
  189. package/models/components/evidencecontrol.js +1 -1
  190. package/models/components/evidencecontrol.js.map +1 -1
  191. package/models/components/evidenceurl.d.ts +1 -1
  192. package/models/components/evidenceurl.d.ts.map +1 -1
  193. package/models/components/evidenceurl.js +1 -1
  194. package/models/components/evidenceurl.js.map +1 -1
  195. package/models/components/frameworkid.d.ts +1 -1
  196. package/models/components/frameworkid.d.ts.map +1 -1
  197. package/models/components/frameworkid.js +1 -1
  198. package/models/components/frameworkid.js.map +1 -1
  199. package/models/components/frameworksection.d.ts +1 -1
  200. package/models/components/frameworksection.d.ts.map +1 -1
  201. package/models/components/frameworksection.js +1 -1
  202. package/models/components/frameworksection.js.map +1 -1
  203. package/models/components/index.d.ts +1 -0
  204. package/models/components/index.d.ts.map +1 -1
  205. package/models/components/index.js +1 -0
  206. package/models/components/index.js.map +1 -1
  207. package/models/components/pageinfo.d.ts +1 -1
  208. package/models/components/pageinfo.d.ts.map +1 -1
  209. package/models/components/pageinfo.js +1 -1
  210. package/models/components/pageinfo.js.map +1 -1
  211. package/models/components/paginatedresponseaudit.d.ts +1 -1
  212. package/models/components/paginatedresponseaudit.d.ts.map +1 -1
  213. package/models/components/paginatedresponseaudit.js +1 -1
  214. package/models/components/paginatedresponseaudit.js.map +1 -1
  215. package/models/components/paginatedresponseauditorcontrol.d.ts +1 -1
  216. package/models/components/paginatedresponseauditorcontrol.d.ts.map +1 -1
  217. package/models/components/paginatedresponseauditorcontrol.js +1 -1
  218. package/models/components/paginatedresponseauditorcontrol.js.map +1 -1
  219. package/models/components/paginatedresponsecomment.d.ts +1 -1
  220. package/models/components/paginatedresponsecomment.d.ts.map +1 -1
  221. package/models/components/paginatedresponsecomment.js +1 -1
  222. package/models/components/paginatedresponsecomment.js.map +1 -1
  223. package/models/components/paginatedresponseevidence.d.ts +1 -1
  224. package/models/components/paginatedresponseevidence.d.ts.map +1 -1
  225. package/models/components/paginatedresponseevidence.js +1 -1
  226. package/models/components/paginatedresponseevidence.js.map +1 -1
  227. package/models/components/paginatedresponseevidenceurl.d.ts +1 -1
  228. package/models/components/paginatedresponseevidenceurl.d.ts.map +1 -1
  229. package/models/components/paginatedresponseevidenceurl.js +1 -1
  230. package/models/components/paginatedresponseevidenceurl.js.map +1 -1
  231. package/models/components/recurrenceduration.d.ts +1 -1
  232. package/models/components/recurrenceduration.d.ts.map +1 -1
  233. package/models/components/recurrenceduration.js +1 -1
  234. package/models/components/recurrenceduration.js.map +1 -1
  235. package/models/components/section.d.ts +1 -1
  236. package/models/components/section.d.ts.map +1 -1
  237. package/models/components/section.js +1 -1
  238. package/models/components/section.js.map +1 -1
  239. package/models/components/security.d.ts +1 -1
  240. package/models/components/security.d.ts.map +1 -1
  241. package/models/components/security.js +1 -1
  242. package/models/components/security.js.map +1 -1
  243. package/models/errors/apierror.d.ts +8 -6
  244. package/models/errors/apierror.d.ts.map +1 -1
  245. package/models/errors/apierror.js +23 -10
  246. package/models/errors/apierror.js.map +1 -1
  247. package/models/errors/index.d.ts +2 -0
  248. package/models/errors/index.d.ts.map +1 -1
  249. package/models/errors/index.js +2 -0
  250. package/models/errors/index.js.map +1 -1
  251. package/models/errors/responsevalidationerror.d.ts +26 -0
  252. package/models/errors/responsevalidationerror.d.ts.map +1 -0
  253. package/models/errors/responsevalidationerror.js +66 -0
  254. package/models/errors/responsevalidationerror.js.map +1 -0
  255. package/models/errors/sdkvalidationerror.d.ts +2 -1
  256. package/models/errors/sdkvalidationerror.d.ts.map +1 -1
  257. package/models/errors/sdkvalidationerror.js +15 -1
  258. package/models/errors/sdkvalidationerror.js.map +1 -1
  259. package/models/errors/vantaerror.d.ts +19 -0
  260. package/models/errors/vantaerror.d.ts.map +1 -0
  261. package/models/errors/vantaerror.js +20 -0
  262. package/models/errors/vantaerror.js.map +1 -0
  263. package/models/operations/createcommentforauditevidence.d.ts +1 -1
  264. package/models/operations/createcommentforauditevidence.d.ts.map +1 -1
  265. package/models/operations/createcommentforauditevidence.js +1 -1
  266. package/models/operations/createcommentforauditevidence.js.map +1 -1
  267. package/models/operations/createcustomcontrol.d.ts +1 -1
  268. package/models/operations/createcustomcontrol.d.ts.map +1 -1
  269. package/models/operations/createcustomcontrol.js +1 -1
  270. package/models/operations/createcustomcontrol.js.map +1 -1
  271. package/models/operations/createcustomevidencerequest.d.ts +1 -1
  272. package/models/operations/createcustomevidencerequest.d.ts.map +1 -1
  273. package/models/operations/createcustomevidencerequest.js +1 -1
  274. package/models/operations/createcustomevidencerequest.js.map +1 -1
  275. package/models/operations/listauditcomments.d.ts +1 -1
  276. package/models/operations/listauditcomments.d.ts.map +1 -1
  277. package/models/operations/listauditcomments.js +1 -1
  278. package/models/operations/listauditcomments.js.map +1 -1
  279. package/models/operations/listauditcontrols.d.ts +1 -1
  280. package/models/operations/listauditcontrols.d.ts.map +1 -1
  281. package/models/operations/listauditcontrols.js +1 -1
  282. package/models/operations/listauditcontrols.js.map +1 -1
  283. package/models/operations/listauditevidence.d.ts +1 -1
  284. package/models/operations/listauditevidence.d.ts.map +1 -1
  285. package/models/operations/listauditevidence.js +1 -1
  286. package/models/operations/listauditevidence.js.map +1 -1
  287. package/models/operations/listauditevidenceurls.d.ts +1 -1
  288. package/models/operations/listauditevidenceurls.d.ts.map +1 -1
  289. package/models/operations/listauditevidenceurls.js +1 -1
  290. package/models/operations/listauditevidenceurls.js.map +1 -1
  291. package/models/operations/listaudits.d.ts +6 -1
  292. package/models/operations/listaudits.d.ts.map +1 -1
  293. package/models/operations/listaudits.js +3 -1
  294. package/models/operations/listaudits.js.map +1 -1
  295. package/models/operations/updateauditevidence.d.ts +1 -1
  296. package/models/operations/updateauditevidence.d.ts.map +1 -1
  297. package/models/operations/updateauditevidence.js +1 -1
  298. package/models/operations/updateauditevidence.js.map +1 -1
  299. package/package.json +8 -10
  300. package/src/funcs/auditorsCreate.ts +24 -18
  301. package/src/funcs/auditsCreateCommentForEvidence.ts +24 -18
  302. package/src/funcs/auditsCreateCustomControl.ts +24 -18
  303. package/src/funcs/auditsCreateCustomEvidenceRequest.ts +24 -18
  304. package/src/funcs/auditsGetEvidenceUrls.ts +24 -18
  305. package/src/funcs/auditsList.ts +25 -18
  306. package/src/funcs/auditsListComments.ts +24 -18
  307. package/src/funcs/auditsListControls.ts +24 -18
  308. package/src/funcs/auditsListEvidence.ts +24 -18
  309. package/src/funcs/auditsUpdateEvidence.ts +24 -18
  310. package/src/hooks/types.ts +2 -0
  311. package/src/index.ts +2 -0
  312. package/src/lib/base64.ts +1 -1
  313. package/src/lib/config.ts +7 -3
  314. package/src/lib/env.ts +21 -5
  315. package/src/lib/files.ts +42 -0
  316. package/src/lib/matchers.ts +44 -41
  317. package/src/lib/schemas.ts +1 -1
  318. package/src/lib/sdks.ts +21 -15
  319. package/src/lib/security.ts +6 -3
  320. package/src/lib/url.ts +1 -1
  321. package/src/mcp-server/cli/start/command.ts +2 -16
  322. package/src/mcp-server/cli/start/impl.ts +2 -6
  323. package/src/mcp-server/extensions.ts +1 -1
  324. package/src/mcp-server/mcp-server.ts +1 -1
  325. package/src/mcp-server/prompts.ts +1 -1
  326. package/src/mcp-server/server.ts +1 -1
  327. package/src/mcp-server/shared.ts +1 -2
  328. package/src/mcp-server/tools.ts +1 -1
  329. package/src/models/components/addauditorinput.ts +1 -1
  330. package/src/models/components/addcommentinput.ts +1 -1
  331. package/src/models/components/audit.ts +14 -5
  332. package/src/models/components/auditevidencestate.ts +1 -1
  333. package/src/models/components/auditevidencetype.ts +1 -1
  334. package/src/models/components/auditevidenceupdateinput.ts +1 -1
  335. package/src/models/components/auditfocus.ts +31 -0
  336. package/src/models/components/auditor.ts +1 -1
  337. package/src/models/components/auditorcontrol.ts +1 -1
  338. package/src/models/components/auditorenabledstatetransition.ts +1 -1
  339. package/src/models/components/comment.ts +1 -1
  340. package/src/models/components/control.ts +1 -1
  341. package/src/models/components/controldomain.ts +1 -1
  342. package/src/models/components/controlsource.ts +1 -1
  343. package/src/models/components/createcustomcontrolinput.ts +1 -1
  344. package/src/models/components/createcustomevidencerequestinput.ts +1 -1
  345. package/src/models/components/customevidencerequest.ts +1 -1
  346. package/src/models/components/customfield.ts +1 -1
  347. package/src/models/components/evidence.ts +1 -1
  348. package/src/models/components/evidencecontrol.ts +1 -1
  349. package/src/models/components/evidenceurl.ts +1 -1
  350. package/src/models/components/frameworkid.ts +1 -1
  351. package/src/models/components/frameworksection.ts +1 -1
  352. package/src/models/components/index.ts +1 -0
  353. package/src/models/components/pageinfo.ts +1 -1
  354. package/src/models/components/paginatedresponseaudit.ts +1 -1
  355. package/src/models/components/paginatedresponseauditorcontrol.ts +1 -1
  356. package/src/models/components/paginatedresponsecomment.ts +1 -1
  357. package/src/models/components/paginatedresponseevidence.ts +1 -1
  358. package/src/models/components/paginatedresponseevidenceurl.ts +1 -1
  359. package/src/models/components/recurrenceduration.ts +1 -1
  360. package/src/models/components/section.ts +1 -1
  361. package/src/models/components/security.ts +1 -1
  362. package/src/models/errors/apierror.ts +29 -16
  363. package/src/models/errors/index.ts +2 -0
  364. package/src/models/errors/responsevalidationerror.ts +50 -0
  365. package/src/models/errors/sdkvalidationerror.ts +13 -1
  366. package/src/models/errors/vantaerror.ts +35 -0
  367. package/src/models/operations/createcommentforauditevidence.ts +1 -1
  368. package/src/models/operations/createcustomcontrol.ts +1 -1
  369. package/src/models/operations/createcustomevidencerequest.ts +1 -1
  370. package/src/models/operations/listauditcomments.ts +1 -1
  371. package/src/models/operations/listauditcontrols.ts +1 -1
  372. package/src/models/operations/listauditevidence.ts +1 -1
  373. package/src/models/operations/listauditevidenceurls.ts +1 -1
  374. package/src/models/operations/listaudits.ts +8 -1
  375. package/src/models/operations/updateauditevidence.ts +1 -1
  376. package/src/types/blobs.ts +7 -6
  377. package/src/types/constdatetime.ts +2 -2
  378. package/types/blobs.d.ts +1 -1
  379. package/types/blobs.d.ts.map +1 -1
  380. package/types/blobs.js +1 -1
  381. package/types/blobs.js.map +1 -1
  382. package/types/constdatetime.d.ts +1 -1
  383. package/types/constdatetime.d.ts.map +1 -1
  384. package/types/constdatetime.js +2 -2
  385. package/types/constdatetime.js.map +1 -1
  386. package/docs/sdks/vanta/README.md +0 -7
package/bin/mcp-server.js CHANGED
@@ -29,13 +29,379 @@ var __export = (target, all) => {
29
29
  var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
30
30
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
31
31
 
32
- // node_modules/zod/lib/index.mjs
32
+ // node_modules/zod/v3/helpers/util.js
33
+ var util, objectUtil, ZodParsedType, getParsedType = (data) => {
34
+ const t = typeof data;
35
+ switch (t) {
36
+ case "undefined":
37
+ return ZodParsedType.undefined;
38
+ case "string":
39
+ return ZodParsedType.string;
40
+ case "number":
41
+ return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
42
+ case "boolean":
43
+ return ZodParsedType.boolean;
44
+ case "function":
45
+ return ZodParsedType.function;
46
+ case "bigint":
47
+ return ZodParsedType.bigint;
48
+ case "symbol":
49
+ return ZodParsedType.symbol;
50
+ case "object":
51
+ if (Array.isArray(data)) {
52
+ return ZodParsedType.array;
53
+ }
54
+ if (data === null) {
55
+ return ZodParsedType.null;
56
+ }
57
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
58
+ return ZodParsedType.promise;
59
+ }
60
+ if (typeof Map !== "undefined" && data instanceof Map) {
61
+ return ZodParsedType.map;
62
+ }
63
+ if (typeof Set !== "undefined" && data instanceof Set) {
64
+ return ZodParsedType.set;
65
+ }
66
+ if (typeof Date !== "undefined" && data instanceof Date) {
67
+ return ZodParsedType.date;
68
+ }
69
+ return ZodParsedType.object;
70
+ default:
71
+ return ZodParsedType.unknown;
72
+ }
73
+ };
74
+ var init_util = __esm(() => {
75
+ (function(util2) {
76
+ util2.assertEqual = (_2) => {};
77
+ function assertIs(_arg) {}
78
+ util2.assertIs = assertIs;
79
+ function assertNever(_x) {
80
+ throw new Error;
81
+ }
82
+ util2.assertNever = assertNever;
83
+ util2.arrayToEnum = (items) => {
84
+ const obj = {};
85
+ for (const item of items) {
86
+ obj[item] = item;
87
+ }
88
+ return obj;
89
+ };
90
+ util2.getValidEnumValues = (obj) => {
91
+ const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
92
+ const filtered = {};
93
+ for (const k2 of validKeys) {
94
+ filtered[k2] = obj[k2];
95
+ }
96
+ return util2.objectValues(filtered);
97
+ };
98
+ util2.objectValues = (obj) => {
99
+ return util2.objectKeys(obj).map(function(e) {
100
+ return obj[e];
101
+ });
102
+ };
103
+ util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
104
+ const keys = [];
105
+ for (const key in object) {
106
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
107
+ keys.push(key);
108
+ }
109
+ }
110
+ return keys;
111
+ };
112
+ util2.find = (arr, checker) => {
113
+ for (const item of arr) {
114
+ if (checker(item))
115
+ return item;
116
+ }
117
+ return;
118
+ };
119
+ util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && Number.isFinite(val) && Math.floor(val) === val;
120
+ function joinValues(array, separator = " | ") {
121
+ return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
122
+ }
123
+ util2.joinValues = joinValues;
124
+ util2.jsonStringifyReplacer = (_2, value) => {
125
+ if (typeof value === "bigint") {
126
+ return value.toString();
127
+ }
128
+ return value;
129
+ };
130
+ })(util || (util = {}));
131
+ (function(objectUtil2) {
132
+ objectUtil2.mergeShapes = (first, second) => {
133
+ return {
134
+ ...first,
135
+ ...second
136
+ };
137
+ };
138
+ })(objectUtil || (objectUtil = {}));
139
+ ZodParsedType = util.arrayToEnum([
140
+ "string",
141
+ "nan",
142
+ "number",
143
+ "integer",
144
+ "float",
145
+ "boolean",
146
+ "date",
147
+ "bigint",
148
+ "symbol",
149
+ "function",
150
+ "undefined",
151
+ "null",
152
+ "array",
153
+ "object",
154
+ "unknown",
155
+ "promise",
156
+ "void",
157
+ "never",
158
+ "map",
159
+ "set"
160
+ ]);
161
+ });
162
+
163
+ // node_modules/zod/v3/ZodError.js
164
+ var ZodIssueCode, quotelessJson = (obj) => {
165
+ const json = JSON.stringify(obj, null, 2);
166
+ return json.replace(/"([^"]+)":/g, "$1:");
167
+ }, ZodError;
168
+ var init_ZodError = __esm(() => {
169
+ init_util();
170
+ ZodIssueCode = util.arrayToEnum([
171
+ "invalid_type",
172
+ "invalid_literal",
173
+ "custom",
174
+ "invalid_union",
175
+ "invalid_union_discriminator",
176
+ "invalid_enum_value",
177
+ "unrecognized_keys",
178
+ "invalid_arguments",
179
+ "invalid_return_type",
180
+ "invalid_date",
181
+ "invalid_string",
182
+ "too_small",
183
+ "too_big",
184
+ "invalid_intersection_types",
185
+ "not_multiple_of",
186
+ "not_finite"
187
+ ]);
188
+ ZodError = class ZodError extends Error {
189
+ get errors() {
190
+ return this.issues;
191
+ }
192
+ constructor(issues) {
193
+ super();
194
+ this.issues = [];
195
+ this.addIssue = (sub) => {
196
+ this.issues = [...this.issues, sub];
197
+ };
198
+ this.addIssues = (subs = []) => {
199
+ this.issues = [...this.issues, ...subs];
200
+ };
201
+ const actualProto = new.target.prototype;
202
+ if (Object.setPrototypeOf) {
203
+ Object.setPrototypeOf(this, actualProto);
204
+ } else {
205
+ this.__proto__ = actualProto;
206
+ }
207
+ this.name = "ZodError";
208
+ this.issues = issues;
209
+ }
210
+ format(_mapper) {
211
+ const mapper = _mapper || function(issue) {
212
+ return issue.message;
213
+ };
214
+ const fieldErrors = { _errors: [] };
215
+ const processError = (error) => {
216
+ for (const issue of error.issues) {
217
+ if (issue.code === "invalid_union") {
218
+ issue.unionErrors.map(processError);
219
+ } else if (issue.code === "invalid_return_type") {
220
+ processError(issue.returnTypeError);
221
+ } else if (issue.code === "invalid_arguments") {
222
+ processError(issue.argumentsError);
223
+ } else if (issue.path.length === 0) {
224
+ fieldErrors._errors.push(mapper(issue));
225
+ } else {
226
+ let curr = fieldErrors;
227
+ let i = 0;
228
+ while (i < issue.path.length) {
229
+ const el = issue.path[i];
230
+ const terminal = i === issue.path.length - 1;
231
+ if (!terminal) {
232
+ curr[el] = curr[el] || { _errors: [] };
233
+ } else {
234
+ curr[el] = curr[el] || { _errors: [] };
235
+ curr[el]._errors.push(mapper(issue));
236
+ }
237
+ curr = curr[el];
238
+ i++;
239
+ }
240
+ }
241
+ }
242
+ };
243
+ processError(this);
244
+ return fieldErrors;
245
+ }
246
+ static assert(value) {
247
+ if (!(value instanceof ZodError)) {
248
+ throw new Error(`Not a ZodError: ${value}`);
249
+ }
250
+ }
251
+ toString() {
252
+ return this.message;
253
+ }
254
+ get message() {
255
+ return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
256
+ }
257
+ get isEmpty() {
258
+ return this.issues.length === 0;
259
+ }
260
+ flatten(mapper = (issue) => issue.message) {
261
+ const fieldErrors = {};
262
+ const formErrors = [];
263
+ for (const sub of this.issues) {
264
+ if (sub.path.length > 0) {
265
+ const firstEl = sub.path[0];
266
+ fieldErrors[firstEl] = fieldErrors[firstEl] || [];
267
+ fieldErrors[firstEl].push(mapper(sub));
268
+ } else {
269
+ formErrors.push(mapper(sub));
270
+ }
271
+ }
272
+ return { formErrors, fieldErrors };
273
+ }
274
+ get formErrors() {
275
+ return this.flatten();
276
+ }
277
+ };
278
+ ZodError.create = (issues) => {
279
+ const error = new ZodError(issues);
280
+ return error;
281
+ };
282
+ });
283
+
284
+ // node_modules/zod/v3/locales/en.js
285
+ var errorMap = (issue, _ctx) => {
286
+ let message;
287
+ switch (issue.code) {
288
+ case ZodIssueCode.invalid_type:
289
+ if (issue.received === ZodParsedType.undefined) {
290
+ message = "Required";
291
+ } else {
292
+ message = `Expected ${issue.expected}, received ${issue.received}`;
293
+ }
294
+ break;
295
+ case ZodIssueCode.invalid_literal:
296
+ message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
297
+ break;
298
+ case ZodIssueCode.unrecognized_keys:
299
+ message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
300
+ break;
301
+ case ZodIssueCode.invalid_union:
302
+ message = `Invalid input`;
303
+ break;
304
+ case ZodIssueCode.invalid_union_discriminator:
305
+ message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
306
+ break;
307
+ case ZodIssueCode.invalid_enum_value:
308
+ message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
309
+ break;
310
+ case ZodIssueCode.invalid_arguments:
311
+ message = `Invalid function arguments`;
312
+ break;
313
+ case ZodIssueCode.invalid_return_type:
314
+ message = `Invalid function return type`;
315
+ break;
316
+ case ZodIssueCode.invalid_date:
317
+ message = `Invalid date`;
318
+ break;
319
+ case ZodIssueCode.invalid_string:
320
+ if (typeof issue.validation === "object") {
321
+ if ("includes" in issue.validation) {
322
+ message = `Invalid input: must include "${issue.validation.includes}"`;
323
+ if (typeof issue.validation.position === "number") {
324
+ message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
325
+ }
326
+ } else if ("startsWith" in issue.validation) {
327
+ message = `Invalid input: must start with "${issue.validation.startsWith}"`;
328
+ } else if ("endsWith" in issue.validation) {
329
+ message = `Invalid input: must end with "${issue.validation.endsWith}"`;
330
+ } else {
331
+ util.assertNever(issue.validation);
332
+ }
333
+ } else if (issue.validation !== "regex") {
334
+ message = `Invalid ${issue.validation}`;
335
+ } else {
336
+ message = "Invalid";
337
+ }
338
+ break;
339
+ case ZodIssueCode.too_small:
340
+ if (issue.type === "array")
341
+ message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
342
+ else if (issue.type === "string")
343
+ message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
344
+ else if (issue.type === "number")
345
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
346
+ else if (issue.type === "bigint")
347
+ message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
348
+ else if (issue.type === "date")
349
+ message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
350
+ else
351
+ message = "Invalid input";
352
+ break;
353
+ case ZodIssueCode.too_big:
354
+ if (issue.type === "array")
355
+ message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
356
+ else if (issue.type === "string")
357
+ message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
358
+ else if (issue.type === "number")
359
+ message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
360
+ else if (issue.type === "bigint")
361
+ message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
362
+ else if (issue.type === "date")
363
+ message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
364
+ else
365
+ message = "Invalid input";
366
+ break;
367
+ case ZodIssueCode.custom:
368
+ message = `Invalid input`;
369
+ break;
370
+ case ZodIssueCode.invalid_intersection_types:
371
+ message = `Intersection results could not be merged`;
372
+ break;
373
+ case ZodIssueCode.not_multiple_of:
374
+ message = `Number must be a multiple of ${issue.multipleOf}`;
375
+ break;
376
+ case ZodIssueCode.not_finite:
377
+ message = "Number must be finite";
378
+ break;
379
+ default:
380
+ message = _ctx.defaultError;
381
+ util.assertNever(issue);
382
+ }
383
+ return { message };
384
+ }, en_default;
385
+ var init_en = __esm(() => {
386
+ init_ZodError();
387
+ init_util();
388
+ en_default = errorMap;
389
+ });
390
+
391
+ // node_modules/zod/v3/errors.js
33
392
  function setErrorMap(map) {
34
393
  overrideErrorMap = map;
35
394
  }
36
395
  function getErrorMap() {
37
396
  return overrideErrorMap;
38
397
  }
398
+ var overrideErrorMap;
399
+ var init_errors = __esm(() => {
400
+ init_en();
401
+ overrideErrorMap = en_default;
402
+ });
403
+
404
+ // node_modules/zod/v3/helpers/parseUtil.js
39
405
  function addIssueToContext(ctx, issueData) {
40
406
  const overrideMap = getErrorMap();
41
407
  const issue = makeIssue({
@@ -46,7 +412,7 @@ function addIssueToContext(ctx, issueData) {
46
412
  ctx.common.contextualErrorMap,
47
413
  ctx.schemaErrorMap,
48
414
  overrideMap,
49
- overrideMap === errorMap ? undefined : errorMap
415
+ overrideMap === en_default ? undefined : en_default
50
416
  ].filter((x2) => !!x2)
51
417
  });
52
418
  ctx.common.issues.push(issue);
@@ -106,23 +472,53 @@ class ParseStatus {
106
472
  return { status: status.value, value: finalObject };
107
473
  }
108
474
  }
109
- function __classPrivateFieldGet(receiver, state, kind, f) {
110
- if (kind === "a" && !f)
111
- throw new TypeError("Private accessor was defined without a getter");
112
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
113
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
114
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
115
- }
116
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
117
- if (kind === "m")
118
- throw new TypeError("Private method is not writable");
119
- if (kind === "a" && !f)
120
- throw new TypeError("Private accessor was defined without a setter");
121
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
122
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
123
- return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
124
- }
475
+ var makeIssue = (params) => {
476
+ const { data, path, errorMaps, issueData } = params;
477
+ const fullPath = [...path, ...issueData.path || []];
478
+ const fullIssue = {
479
+ ...issueData,
480
+ path: fullPath
481
+ };
482
+ if (issueData.message !== undefined) {
483
+ return {
484
+ ...issueData,
485
+ path: fullPath,
486
+ message: issueData.message
487
+ };
488
+ }
489
+ let errorMessage = "";
490
+ const maps = errorMaps.filter((m) => !!m).slice().reverse();
491
+ for (const map of maps) {
492
+ errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
493
+ }
494
+ return {
495
+ ...issueData,
496
+ path: fullPath,
497
+ message: errorMessage
498
+ };
499
+ }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x2) => x2.status === "aborted", isDirty = (x2) => x2.status === "dirty", isValid = (x2) => x2.status === "valid", isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
500
+ var init_parseUtil = __esm(() => {
501
+ init_errors();
502
+ init_en();
503
+ EMPTY_PATH = [];
504
+ INVALID = Object.freeze({
505
+ status: "aborted"
506
+ });
507
+ });
508
+
509
+ // node_modules/zod/v3/helpers/typeAliases.js
510
+ var init_typeAliases = () => {};
125
511
 
512
+ // node_modules/zod/v3/helpers/errorUtil.js
513
+ var errorUtil;
514
+ var init_errorUtil = __esm(() => {
515
+ (function(errorUtil2) {
516
+ errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
517
+ errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
518
+ })(errorUtil || (errorUtil = {}));
519
+ });
520
+
521
+ // node_modules/zod/v3/types.js
126
522
  class ParseInputLazyPath {
127
523
  constructor(parent, value, path, key) {
128
524
  this._cachedPath = [];
@@ -133,7 +529,7 @@ class ParseInputLazyPath {
133
529
  }
134
530
  get path() {
135
531
  if (!this._cachedPath.length) {
136
- if (this._key instanceof Array) {
532
+ if (Array.isArray(this._key)) {
137
533
  this._cachedPath.push(...this._path, ...this._key);
138
534
  } else {
139
535
  this._cachedPath.push(...this._path, this._key);
@@ -152,17 +548,16 @@ function processCreateParams(params) {
152
548
  if (errorMap2)
153
549
  return { errorMap: errorMap2, description };
154
550
  const customMap = (iss, ctx) => {
155
- var _a, _b;
156
551
  const { message } = params;
157
552
  if (iss.code === "invalid_enum_value") {
158
- return { message: message !== null && message !== undefined ? message : ctx.defaultError };
553
+ return { message: message ?? ctx.defaultError };
159
554
  }
160
555
  if (typeof ctx.data === "undefined") {
161
- return { message: (_a = message !== null && message !== undefined ? message : required_error) !== null && _a !== undefined ? _a : ctx.defaultError };
556
+ return { message: message ?? required_error ?? ctx.defaultError };
162
557
  }
163
558
  if (iss.code !== "invalid_type")
164
559
  return { message: ctx.defaultError };
165
- return { message: (_b = message !== null && message !== undefined ? message : invalid_type_error) !== null && _b !== undefined ? _b : ctx.defaultError };
560
+ return { message: message ?? invalid_type_error ?? ctx.defaultError };
166
561
  };
167
562
  return { errorMap: customMap, description };
168
563
  }
@@ -215,14 +610,13 @@ class ZodType {
215
610
  throw result.error;
216
611
  }
217
612
  safeParse(data, params) {
218
- var _a;
219
613
  const ctx = {
220
614
  common: {
221
615
  issues: [],
222
- async: (_a = params === null || params === undefined ? undefined : params.async) !== null && _a !== undefined ? _a : false,
223
- contextualErrorMap: params === null || params === undefined ? undefined : params.errorMap
616
+ async: params?.async ?? false,
617
+ contextualErrorMap: params?.errorMap
224
618
  },
225
- path: (params === null || params === undefined ? undefined : params.path) || [],
619
+ path: params?.path || [],
226
620
  schemaErrorMap: this._def.errorMap,
227
621
  parent: null,
228
622
  data,
@@ -232,7 +626,6 @@ class ZodType {
232
626
  return handleResult(ctx, result);
233
627
  }
234
628
  "~validate"(data) {
235
- var _a, _b;
236
629
  const ctx = {
237
630
  common: {
238
631
  issues: [],
@@ -253,7 +646,7 @@ class ZodType {
253
646
  issues: ctx.common.issues
254
647
  };
255
648
  } catch (err) {
256
- if ((_b = (_a = err === null || err === undefined ? undefined : err.message) === null || _a === undefined ? undefined : _a.toLowerCase()) === null || _b === undefined ? undefined : _b.includes("encountered")) {
649
+ if (err?.message?.toLowerCase()?.includes("encountered")) {
257
650
  this["~standard"].async = true;
258
651
  }
259
652
  ctx.common = {
@@ -278,10 +671,10 @@ class ZodType {
278
671
  const ctx = {
279
672
  common: {
280
673
  issues: [],
281
- contextualErrorMap: params === null || params === undefined ? undefined : params.errorMap,
674
+ contextualErrorMap: params?.errorMap,
282
675
  async: true
283
676
  },
284
- path: (params === null || params === undefined ? undefined : params.path) || [],
677
+ path: params?.path || [],
285
678
  schemaErrorMap: this._def.errorMap,
286
679
  parent: null,
287
680
  data,
@@ -453,13 +846,14 @@ class ZodType {
453
846
  }
454
847
  }
455
848
  function timeRegexSource(args) {
456
- let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
849
+ let secondsRegexSource = `[0-5]\\d`;
457
850
  if (args.precision) {
458
- regex = `${regex}\\.\\d{${args.precision}}`;
851
+ secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
459
852
  } else if (args.precision == null) {
460
- regex = `${regex}(\\.\\d+)?`;
853
+ secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
461
854
  }
462
- return regex;
855
+ const secondsQuantifier = args.precision ? "+" : "?";
856
+ return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
463
857
  }
464
858
  function timeRegex(args) {
465
859
  return new RegExp(`^${timeRegexSource(args)}$`);
@@ -487,16 +881,20 @@ function isValidJWT(jwt, alg) {
487
881
  return false;
488
882
  try {
489
883
  const [header] = jwt.split(".");
884
+ if (!header)
885
+ return false;
490
886
  const base64 = header.replace(/-/g, "+").replace(/_/g, "/").padEnd(header.length + (4 - header.length % 4) % 4, "=");
491
887
  const decoded = JSON.parse(atob(base64));
492
888
  if (typeof decoded !== "object" || decoded === null)
493
889
  return false;
494
- if (!decoded.typ || !decoded.alg)
890
+ if ("typ" in decoded && decoded?.typ !== "JWT")
891
+ return false;
892
+ if (!decoded.alg)
495
893
  return false;
496
894
  if (alg && decoded.alg !== alg)
497
895
  return false;
498
896
  return true;
499
- } catch (_a) {
897
+ } catch {
500
898
  return false;
501
899
  }
502
900
  }
@@ -513,9 +911,9 @@ function floatSafeRemainder(val, step) {
513
911
  const valDecCount = (val.toString().split(".")[1] || "").length;
514
912
  const stepDecCount = (step.toString().split(".")[1] || "").length;
515
913
  const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
516
- const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
517
- const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
518
- return valInt % stepInt / Math.pow(10, decCount);
914
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
915
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
916
+ return valInt % stepInt / 10 ** decCount;
519
917
  }
520
918
  function deepPartialify(schema) {
521
919
  if (schema instanceof ZodObject) {
@@ -588,184 +986,34 @@ function createZodEnum(values, params) {
588
986
  ...processCreateParams(params)
589
987
  });
590
988
  }
591
- function custom(check, params = {}, fatal) {
989
+ function cleanParams(params, data) {
990
+ const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
991
+ const p2 = typeof p === "string" ? { message: p } : p;
992
+ return p2;
993
+ }
994
+ function custom(check, _params = {}, fatal) {
592
995
  if (check)
593
996
  return ZodAny.create().superRefine((data, ctx) => {
594
- var _a, _b;
595
- if (!check(data)) {
596
- const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
597
- const _fatal = (_b = (_a = p.fatal) !== null && _a !== undefined ? _a : fatal) !== null && _b !== undefined ? _b : true;
598
- const p2 = typeof p === "string" ? { message: p } : p;
599
- ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
997
+ const r = check(data);
998
+ if (r instanceof Promise) {
999
+ return r.then((r2) => {
1000
+ if (!r2) {
1001
+ const params = cleanParams(_params, data);
1002
+ const _fatal = params.fatal ?? fatal ?? true;
1003
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
1004
+ }
1005
+ });
1006
+ }
1007
+ if (!r) {
1008
+ const params = cleanParams(_params, data);
1009
+ const _fatal = params.fatal ?? fatal ?? true;
1010
+ ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
600
1011
  }
1012
+ return;
601
1013
  });
602
1014
  return ZodAny.create();
603
1015
  }
604
- var util, objectUtil, ZodParsedType, getParsedType = (data) => {
605
- const t = typeof data;
606
- switch (t) {
607
- case "undefined":
608
- return ZodParsedType.undefined;
609
- case "string":
610
- return ZodParsedType.string;
611
- case "number":
612
- return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;
613
- case "boolean":
614
- return ZodParsedType.boolean;
615
- case "function":
616
- return ZodParsedType.function;
617
- case "bigint":
618
- return ZodParsedType.bigint;
619
- case "symbol":
620
- return ZodParsedType.symbol;
621
- case "object":
622
- if (Array.isArray(data)) {
623
- return ZodParsedType.array;
624
- }
625
- if (data === null) {
626
- return ZodParsedType.null;
627
- }
628
- if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
629
- return ZodParsedType.promise;
630
- }
631
- if (typeof Map !== "undefined" && data instanceof Map) {
632
- return ZodParsedType.map;
633
- }
634
- if (typeof Set !== "undefined" && data instanceof Set) {
635
- return ZodParsedType.set;
636
- }
637
- if (typeof Date !== "undefined" && data instanceof Date) {
638
- return ZodParsedType.date;
639
- }
640
- return ZodParsedType.object;
641
- default:
642
- return ZodParsedType.unknown;
643
- }
644
- }, ZodIssueCode, quotelessJson = (obj) => {
645
- const json = JSON.stringify(obj, null, 2);
646
- return json.replace(/"([^"]+)":/g, "$1:");
647
- }, ZodError, errorMap = (issue, _ctx) => {
648
- let message;
649
- switch (issue.code) {
650
- case ZodIssueCode.invalid_type:
651
- if (issue.received === ZodParsedType.undefined) {
652
- message = "Required";
653
- } else {
654
- message = `Expected ${issue.expected}, received ${issue.received}`;
655
- }
656
- break;
657
- case ZodIssueCode.invalid_literal:
658
- message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
659
- break;
660
- case ZodIssueCode.unrecognized_keys:
661
- message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
662
- break;
663
- case ZodIssueCode.invalid_union:
664
- message = `Invalid input`;
665
- break;
666
- case ZodIssueCode.invalid_union_discriminator:
667
- message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
668
- break;
669
- case ZodIssueCode.invalid_enum_value:
670
- message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
671
- break;
672
- case ZodIssueCode.invalid_arguments:
673
- message = `Invalid function arguments`;
674
- break;
675
- case ZodIssueCode.invalid_return_type:
676
- message = `Invalid function return type`;
677
- break;
678
- case ZodIssueCode.invalid_date:
679
- message = `Invalid date`;
680
- break;
681
- case ZodIssueCode.invalid_string:
682
- if (typeof issue.validation === "object") {
683
- if ("includes" in issue.validation) {
684
- message = `Invalid input: must include "${issue.validation.includes}"`;
685
- if (typeof issue.validation.position === "number") {
686
- message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
687
- }
688
- } else if ("startsWith" in issue.validation) {
689
- message = `Invalid input: must start with "${issue.validation.startsWith}"`;
690
- } else if ("endsWith" in issue.validation) {
691
- message = `Invalid input: must end with "${issue.validation.endsWith}"`;
692
- } else {
693
- util.assertNever(issue.validation);
694
- }
695
- } else if (issue.validation !== "regex") {
696
- message = `Invalid ${issue.validation}`;
697
- } else {
698
- message = "Invalid";
699
- }
700
- break;
701
- case ZodIssueCode.too_small:
702
- if (issue.type === "array")
703
- message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
704
- else if (issue.type === "string")
705
- message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
706
- else if (issue.type === "number")
707
- message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
708
- else if (issue.type === "date")
709
- message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
710
- else
711
- message = "Invalid input";
712
- break;
713
- case ZodIssueCode.too_big:
714
- if (issue.type === "array")
715
- message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
716
- else if (issue.type === "string")
717
- message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
718
- else if (issue.type === "number")
719
- message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
720
- else if (issue.type === "bigint")
721
- message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
722
- else if (issue.type === "date")
723
- message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
724
- else
725
- message = "Invalid input";
726
- break;
727
- case ZodIssueCode.custom:
728
- message = `Invalid input`;
729
- break;
730
- case ZodIssueCode.invalid_intersection_types:
731
- message = `Intersection results could not be merged`;
732
- break;
733
- case ZodIssueCode.not_multiple_of:
734
- message = `Number must be a multiple of ${issue.multipleOf}`;
735
- break;
736
- case ZodIssueCode.not_finite:
737
- message = "Number must be finite";
738
- break;
739
- default:
740
- message = _ctx.defaultError;
741
- util.assertNever(issue);
742
- }
743
- return { message };
744
- }, overrideErrorMap, makeIssue = (params) => {
745
- const { data, path, errorMaps, issueData } = params;
746
- const fullPath = [...path, ...issueData.path || []];
747
- const fullIssue = {
748
- ...issueData,
749
- path: fullPath
750
- };
751
- if (issueData.message !== undefined) {
752
- return {
753
- ...issueData,
754
- path: fullPath,
755
- message: issueData.message
756
- };
757
- }
758
- let errorMessage = "";
759
- const maps = errorMaps.filter((m) => !!m).slice().reverse();
760
- for (const map of maps) {
761
- errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
762
- }
763
- return {
764
- ...issueData,
765
- path: fullPath,
766
- message: errorMessage
767
- };
768
- }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x2) => x2.status === "aborted", isDirty = (x2) => x2.status === "dirty", isValid = (x2) => x2.status === "valid", isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise, errorUtil, _ZodEnum_cache, _ZodNativeEnum_cache, handleResult = (ctx, result) => {
1016
+ var handleResult = (ctx, result) => {
769
1017
  if (isValid(result)) {
770
1018
  return { success: true, data: result.value };
771
1019
  } else {
@@ -815,214 +1063,13 @@ var util, objectUtil, ZodParsedType, getParsedType = (data) => {
815
1063
  }
816
1064
  }, ZodDiscriminatedUnion, ZodIntersection, ZodTuple, ZodRecord, ZodMap, ZodSet, ZodFunction, ZodLazy, ZodLiteral, ZodEnum, ZodNativeEnum, ZodPromise, ZodEffects, ZodOptional, ZodNullable, ZodDefault, ZodCatch, ZodNaN, BRAND, ZodBranded, ZodPipeline, ZodReadonly, late, ZodFirstPartyTypeKind, instanceOfType = (cls, params = {
817
1065
  message: `Input not instance of ${cls.name}`
818
- }) => custom((data) => data instanceof cls, params), stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce, NEVER, z2;
819
- var init_lib = __esm(() => {
820
- (function(util2) {
821
- util2.assertEqual = (val) => val;
822
- function assertIs(_arg) {}
823
- util2.assertIs = assertIs;
824
- function assertNever(_x) {
825
- throw new Error;
826
- }
827
- util2.assertNever = assertNever;
828
- util2.arrayToEnum = (items) => {
829
- const obj = {};
830
- for (const item of items) {
831
- obj[item] = item;
832
- }
833
- return obj;
834
- };
835
- util2.getValidEnumValues = (obj) => {
836
- const validKeys = util2.objectKeys(obj).filter((k2) => typeof obj[obj[k2]] !== "number");
837
- const filtered = {};
838
- for (const k2 of validKeys) {
839
- filtered[k2] = obj[k2];
840
- }
841
- return util2.objectValues(filtered);
842
- };
843
- util2.objectValues = (obj) => {
844
- return util2.objectKeys(obj).map(function(e) {
845
- return obj[e];
846
- });
847
- };
848
- util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
849
- const keys = [];
850
- for (const key in object) {
851
- if (Object.prototype.hasOwnProperty.call(object, key)) {
852
- keys.push(key);
853
- }
854
- }
855
- return keys;
856
- };
857
- util2.find = (arr, checker) => {
858
- for (const item of arr) {
859
- if (checker(item))
860
- return item;
861
- }
862
- return;
863
- };
864
- util2.isInteger = typeof Number.isInteger === "function" ? (val) => Number.isInteger(val) : (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
865
- function joinValues(array, separator = " | ") {
866
- return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
867
- }
868
- util2.joinValues = joinValues;
869
- util2.jsonStringifyReplacer = (_2, value) => {
870
- if (typeof value === "bigint") {
871
- return value.toString();
872
- }
873
- return value;
874
- };
875
- })(util || (util = {}));
876
- (function(objectUtil2) {
877
- objectUtil2.mergeShapes = (first, second) => {
878
- return {
879
- ...first,
880
- ...second
881
- };
882
- };
883
- })(objectUtil || (objectUtil = {}));
884
- ZodParsedType = util.arrayToEnum([
885
- "string",
886
- "nan",
887
- "number",
888
- "integer",
889
- "float",
890
- "boolean",
891
- "date",
892
- "bigint",
893
- "symbol",
894
- "function",
895
- "undefined",
896
- "null",
897
- "array",
898
- "object",
899
- "unknown",
900
- "promise",
901
- "void",
902
- "never",
903
- "map",
904
- "set"
905
- ]);
906
- ZodIssueCode = util.arrayToEnum([
907
- "invalid_type",
908
- "invalid_literal",
909
- "custom",
910
- "invalid_union",
911
- "invalid_union_discriminator",
912
- "invalid_enum_value",
913
- "unrecognized_keys",
914
- "invalid_arguments",
915
- "invalid_return_type",
916
- "invalid_date",
917
- "invalid_string",
918
- "too_small",
919
- "too_big",
920
- "invalid_intersection_types",
921
- "not_multiple_of",
922
- "not_finite"
923
- ]);
924
- ZodError = class ZodError extends Error {
925
- get errors() {
926
- return this.issues;
927
- }
928
- constructor(issues) {
929
- super();
930
- this.issues = [];
931
- this.addIssue = (sub) => {
932
- this.issues = [...this.issues, sub];
933
- };
934
- this.addIssues = (subs = []) => {
935
- this.issues = [...this.issues, ...subs];
936
- };
937
- const actualProto = new.target.prototype;
938
- if (Object.setPrototypeOf) {
939
- Object.setPrototypeOf(this, actualProto);
940
- } else {
941
- this.__proto__ = actualProto;
942
- }
943
- this.name = "ZodError";
944
- this.issues = issues;
945
- }
946
- format(_mapper) {
947
- const mapper = _mapper || function(issue) {
948
- return issue.message;
949
- };
950
- const fieldErrors = { _errors: [] };
951
- const processError = (error) => {
952
- for (const issue of error.issues) {
953
- if (issue.code === "invalid_union") {
954
- issue.unionErrors.map(processError);
955
- } else if (issue.code === "invalid_return_type") {
956
- processError(issue.returnTypeError);
957
- } else if (issue.code === "invalid_arguments") {
958
- processError(issue.argumentsError);
959
- } else if (issue.path.length === 0) {
960
- fieldErrors._errors.push(mapper(issue));
961
- } else {
962
- let curr = fieldErrors;
963
- let i = 0;
964
- while (i < issue.path.length) {
965
- const el = issue.path[i];
966
- const terminal = i === issue.path.length - 1;
967
- if (!terminal) {
968
- curr[el] = curr[el] || { _errors: [] };
969
- } else {
970
- curr[el] = curr[el] || { _errors: [] };
971
- curr[el]._errors.push(mapper(issue));
972
- }
973
- curr = curr[el];
974
- i++;
975
- }
976
- }
977
- }
978
- };
979
- processError(this);
980
- return fieldErrors;
981
- }
982
- static assert(value) {
983
- if (!(value instanceof ZodError)) {
984
- throw new Error(`Not a ZodError: ${value}`);
985
- }
986
- }
987
- toString() {
988
- return this.message;
989
- }
990
- get message() {
991
- return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);
992
- }
993
- get isEmpty() {
994
- return this.issues.length === 0;
995
- }
996
- flatten(mapper = (issue) => issue.message) {
997
- const fieldErrors = {};
998
- const formErrors = [];
999
- for (const sub of this.issues) {
1000
- if (sub.path.length > 0) {
1001
- fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
1002
- fieldErrors[sub.path[0]].push(mapper(sub));
1003
- } else {
1004
- formErrors.push(mapper(sub));
1005
- }
1006
- }
1007
- return { formErrors, fieldErrors };
1008
- }
1009
- get formErrors() {
1010
- return this.flatten();
1011
- }
1012
- };
1013
- ZodError.create = (issues) => {
1014
- const error = new ZodError(issues);
1015
- return error;
1016
- };
1017
- overrideErrorMap = errorMap;
1018
- EMPTY_PATH = [];
1019
- INVALID = Object.freeze({
1020
- status: "aborted"
1021
- });
1022
- (function(errorUtil2) {
1023
- errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
1024
- errorUtil2.toString = (message) => typeof message === "string" ? message : message === null || message === undefined ? undefined : message.message;
1025
- })(errorUtil || (errorUtil = {}));
1066
+ }) => custom((data) => data instanceof cls, params), stringType, numberType, nanType, bigIntType, booleanType, dateType, symbolType, undefinedType, nullType, anyType, unknownType, neverType, voidType, arrayType, objectType, strictObjectType, unionType, discriminatedUnionType, intersectionType, tupleType, recordType, mapType, setType, functionType, lazyType, literalType, enumType, nativeEnumType, promiseType, effectsType, optionalType, nullableType, preprocessType, pipelineType, ostring = () => stringType().optional(), onumber = () => numberType().optional(), oboolean = () => booleanType().optional(), coerce, NEVER;
1067
+ var init_types = __esm(() => {
1068
+ init_ZodError();
1069
+ init_errors();
1070
+ init_errorUtil();
1071
+ init_parseUtil();
1072
+ init_util();
1026
1073
  cuidRegex = /^c[^\s-]{8,}$/i;
1027
1074
  cuid2Regex = /^[0-9a-z]+$/;
1028
1075
  ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
@@ -1184,7 +1231,7 @@ var init_lib = __esm(() => {
1184
1231
  } else if (check.kind === "url") {
1185
1232
  try {
1186
1233
  new URL(input.data);
1187
- } catch (_a) {
1234
+ } catch {
1188
1235
  ctx = this._getOrReturnCtx(input, ctx);
1189
1236
  addIssueToContext(ctx, {
1190
1237
  validation: "url",
@@ -1396,7 +1443,6 @@ var init_lib = __esm(() => {
1396
1443
  return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
1397
1444
  }
1398
1445
  datetime(options) {
1399
- var _a, _b;
1400
1446
  if (typeof options === "string") {
1401
1447
  return this._addCheck({
1402
1448
  kind: "datetime",
@@ -1408,10 +1454,10 @@ var init_lib = __esm(() => {
1408
1454
  }
1409
1455
  return this._addCheck({
1410
1456
  kind: "datetime",
1411
- precision: typeof (options === null || options === undefined ? undefined : options.precision) === "undefined" ? null : options === null || options === undefined ? undefined : options.precision,
1412
- offset: (_a = options === null || options === undefined ? undefined : options.offset) !== null && _a !== undefined ? _a : false,
1413
- local: (_b = options === null || options === undefined ? undefined : options.local) !== null && _b !== undefined ? _b : false,
1414
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message)
1457
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1458
+ offset: options?.offset ?? false,
1459
+ local: options?.local ?? false,
1460
+ ...errorUtil.errToObj(options?.message)
1415
1461
  });
1416
1462
  }
1417
1463
  date(message) {
@@ -1427,8 +1473,8 @@ var init_lib = __esm(() => {
1427
1473
  }
1428
1474
  return this._addCheck({
1429
1475
  kind: "time",
1430
- precision: typeof (options === null || options === undefined ? undefined : options.precision) === "undefined" ? null : options === null || options === undefined ? undefined : options.precision,
1431
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message)
1476
+ precision: typeof options?.precision === "undefined" ? null : options?.precision,
1477
+ ...errorUtil.errToObj(options?.message)
1432
1478
  });
1433
1479
  }
1434
1480
  duration(message) {
@@ -1445,8 +1491,8 @@ var init_lib = __esm(() => {
1445
1491
  return this._addCheck({
1446
1492
  kind: "includes",
1447
1493
  value,
1448
- position: options === null || options === undefined ? undefined : options.position,
1449
- ...errorUtil.errToObj(options === null || options === undefined ? undefined : options.message)
1494
+ position: options?.position,
1495
+ ...errorUtil.errToObj(options?.message)
1450
1496
  });
1451
1497
  }
1452
1498
  startsWith(value, message) {
@@ -1575,11 +1621,10 @@ var init_lib = __esm(() => {
1575
1621
  }
1576
1622
  };
1577
1623
  ZodString.create = (params) => {
1578
- var _a;
1579
1624
  return new ZodString({
1580
1625
  checks: [],
1581
1626
  typeName: ZodFirstPartyTypeKind.ZodString,
1582
- coerce: (_a = params === null || params === undefined ? undefined : params.coerce) !== null && _a !== undefined ? _a : false,
1627
+ coerce: params?.coerce ?? false,
1583
1628
  ...processCreateParams(params)
1584
1629
  });
1585
1630
  };
@@ -1791,7 +1836,8 @@ var init_lib = __esm(() => {
1791
1836
  return !!this._def.checks.find((ch) => ch.kind === "int" || ch.kind === "multipleOf" && util.isInteger(ch.value));
1792
1837
  }
1793
1838
  get isFinite() {
1794
- let max = null, min = null;
1839
+ let max = null;
1840
+ let min = null;
1795
1841
  for (const ch of this._def.checks) {
1796
1842
  if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
1797
1843
  return true;
@@ -1810,7 +1856,7 @@ var init_lib = __esm(() => {
1810
1856
  return new ZodNumber({
1811
1857
  checks: [],
1812
1858
  typeName: ZodFirstPartyTypeKind.ZodNumber,
1813
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
1859
+ coerce: params?.coerce || false,
1814
1860
  ...processCreateParams(params)
1815
1861
  });
1816
1862
  };
@@ -1824,7 +1870,7 @@ var init_lib = __esm(() => {
1824
1870
  if (this._def.coerce) {
1825
1871
  try {
1826
1872
  input.data = BigInt(input.data);
1827
- } catch (_a) {
1873
+ } catch {
1828
1874
  return this._getInvalidInput(input);
1829
1875
  }
1830
1876
  }
@@ -1979,11 +2025,10 @@ var init_lib = __esm(() => {
1979
2025
  }
1980
2026
  };
1981
2027
  ZodBigInt.create = (params) => {
1982
- var _a;
1983
2028
  return new ZodBigInt({
1984
2029
  checks: [],
1985
2030
  typeName: ZodFirstPartyTypeKind.ZodBigInt,
1986
- coerce: (_a = params === null || params === undefined ? undefined : params.coerce) !== null && _a !== undefined ? _a : false,
2031
+ coerce: params?.coerce ?? false,
1987
2032
  ...processCreateParams(params)
1988
2033
  });
1989
2034
  };
@@ -2008,7 +2053,7 @@ var init_lib = __esm(() => {
2008
2053
  ZodBoolean.create = (params) => {
2009
2054
  return new ZodBoolean({
2010
2055
  typeName: ZodFirstPartyTypeKind.ZodBoolean,
2011
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
2056
+ coerce: params?.coerce || false,
2012
2057
  ...processCreateParams(params)
2013
2058
  });
2014
2059
  };
@@ -2027,7 +2072,7 @@ var init_lib = __esm(() => {
2027
2072
  });
2028
2073
  return INVALID;
2029
2074
  }
2030
- if (isNaN(input.data.getTime())) {
2075
+ if (Number.isNaN(input.data.getTime())) {
2031
2076
  const ctx2 = this._getOrReturnCtx(input);
2032
2077
  addIssueToContext(ctx2, {
2033
2078
  code: ZodIssueCode.invalid_date
@@ -2116,7 +2161,7 @@ var init_lib = __esm(() => {
2116
2161
  ZodDate.create = (params) => {
2117
2162
  return new ZodDate({
2118
2163
  checks: [],
2119
- coerce: (params === null || params === undefined ? undefined : params.coerce) || false,
2164
+ coerce: params?.coerce || false,
2120
2165
  typeName: ZodFirstPartyTypeKind.ZodDate,
2121
2166
  ...processCreateParams(params)
2122
2167
  });
@@ -2365,7 +2410,8 @@ var init_lib = __esm(() => {
2365
2410
  return this._cached;
2366
2411
  const shape = this._def.shape();
2367
2412
  const keys = util.objectKeys(shape);
2368
- return this._cached = { shape, keys };
2413
+ this._cached = { shape, keys };
2414
+ return this._cached;
2369
2415
  }
2370
2416
  _parse(input) {
2371
2417
  const parsedType = this._getType(input);
@@ -2415,9 +2461,7 @@ var init_lib = __esm(() => {
2415
2461
  });
2416
2462
  status.dirty();
2417
2463
  }
2418
- } else if (unknownKeys === "strip")
2419
- ;
2420
- else {
2464
+ } else if (unknownKeys === "strip") {} else {
2421
2465
  throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);
2422
2466
  }
2423
2467
  } else {
@@ -2461,11 +2505,10 @@ var init_lib = __esm(() => {
2461
2505
  unknownKeys: "strict",
2462
2506
  ...message !== undefined ? {
2463
2507
  errorMap: (issue, ctx) => {
2464
- var _a, _b, _c, _d;
2465
- const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === undefined ? undefined : _b.call(_a, issue, ctx).message) !== null && _c !== undefined ? _c : ctx.defaultError;
2508
+ const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
2466
2509
  if (issue.code === "unrecognized_keys")
2467
2510
  return {
2468
- message: (_d = errorUtil.errToObj(message).message) !== null && _d !== undefined ? _d : defaultError
2511
+ message: errorUtil.errToObj(message).message ?? defaultError
2469
2512
  };
2470
2513
  return {
2471
2514
  message: defaultError
@@ -2518,11 +2561,11 @@ var init_lib = __esm(() => {
2518
2561
  }
2519
2562
  pick(mask) {
2520
2563
  const shape = {};
2521
- util.objectKeys(mask).forEach((key) => {
2564
+ for (const key of util.objectKeys(mask)) {
2522
2565
  if (mask[key] && this.shape[key]) {
2523
2566
  shape[key] = this.shape[key];
2524
2567
  }
2525
- });
2568
+ }
2526
2569
  return new ZodObject({
2527
2570
  ...this._def,
2528
2571
  shape: () => shape
@@ -2530,11 +2573,11 @@ var init_lib = __esm(() => {
2530
2573
  }
2531
2574
  omit(mask) {
2532
2575
  const shape = {};
2533
- util.objectKeys(this.shape).forEach((key) => {
2576
+ for (const key of util.objectKeys(this.shape)) {
2534
2577
  if (!mask[key]) {
2535
2578
  shape[key] = this.shape[key];
2536
2579
  }
2537
- });
2580
+ }
2538
2581
  return new ZodObject({
2539
2582
  ...this._def,
2540
2583
  shape: () => shape
@@ -2545,14 +2588,14 @@ var init_lib = __esm(() => {
2545
2588
  }
2546
2589
  partial(mask) {
2547
2590
  const newShape = {};
2548
- util.objectKeys(this.shape).forEach((key) => {
2591
+ for (const key of util.objectKeys(this.shape)) {
2549
2592
  const fieldSchema = this.shape[key];
2550
2593
  if (mask && !mask[key]) {
2551
2594
  newShape[key] = fieldSchema;
2552
2595
  } else {
2553
2596
  newShape[key] = fieldSchema.optional();
2554
2597
  }
2555
- });
2598
+ }
2556
2599
  return new ZodObject({
2557
2600
  ...this._def,
2558
2601
  shape: () => newShape
@@ -2560,7 +2603,7 @@ var init_lib = __esm(() => {
2560
2603
  }
2561
2604
  required(mask) {
2562
2605
  const newShape = {};
2563
- util.objectKeys(this.shape).forEach((key) => {
2606
+ for (const key of util.objectKeys(this.shape)) {
2564
2607
  if (mask && !mask[key]) {
2565
2608
  newShape[key] = this.shape[key];
2566
2609
  } else {
@@ -2571,7 +2614,7 @@ var init_lib = __esm(() => {
2571
2614
  }
2572
2615
  newShape[key] = newField;
2573
2616
  }
2574
- });
2617
+ }
2575
2618
  return new ZodObject({
2576
2619
  ...this._def,
2577
2620
  shape: () => newShape
@@ -3110,12 +3153,7 @@ var init_lib = __esm(() => {
3110
3153
  return makeIssue({
3111
3154
  data: args,
3112
3155
  path: ctx.path,
3113
- errorMaps: [
3114
- ctx.common.contextualErrorMap,
3115
- ctx.schemaErrorMap,
3116
- getErrorMap(),
3117
- errorMap
3118
- ].filter((x2) => !!x2),
3156
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
3119
3157
  issueData: {
3120
3158
  code: ZodIssueCode.invalid_arguments,
3121
3159
  argumentsError: error
@@ -3126,12 +3164,7 @@ var init_lib = __esm(() => {
3126
3164
  return makeIssue({
3127
3165
  data: returns,
3128
3166
  path: ctx.path,
3129
- errorMaps: [
3130
- ctx.common.contextualErrorMap,
3131
- ctx.schemaErrorMap,
3132
- getErrorMap(),
3133
- errorMap
3134
- ].filter((x2) => !!x2),
3167
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
3135
3168
  issueData: {
3136
3169
  code: ZodIssueCode.invalid_return_type,
3137
3170
  returnTypeError: error
@@ -3248,10 +3281,6 @@ var init_lib = __esm(() => {
3248
3281
  });
3249
3282
  };
3250
3283
  ZodEnum = class ZodEnum extends ZodType {
3251
- constructor() {
3252
- super(...arguments);
3253
- _ZodEnum_cache.set(this, undefined);
3254
- }
3255
3284
  _parse(input) {
3256
3285
  if (typeof input.data !== "string") {
3257
3286
  const ctx = this._getOrReturnCtx(input);
@@ -3263,10 +3292,10 @@ var init_lib = __esm(() => {
3263
3292
  });
3264
3293
  return INVALID;
3265
3294
  }
3266
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f")) {
3267
- __classPrivateFieldSet(this, _ZodEnum_cache, new Set(this._def.values), "f");
3295
+ if (!this._cache) {
3296
+ this._cache = new Set(this._def.values);
3268
3297
  }
3269
- if (!__classPrivateFieldGet(this, _ZodEnum_cache, "f").has(input.data)) {
3298
+ if (!this._cache.has(input.data)) {
3270
3299
  const ctx = this._getOrReturnCtx(input);
3271
3300
  const expectedValues = this._def.values;
3272
3301
  addIssueToContext(ctx, {
@@ -3315,13 +3344,8 @@ var init_lib = __esm(() => {
3315
3344
  });
3316
3345
  }
3317
3346
  };
3318
- _ZodEnum_cache = new WeakMap;
3319
3347
  ZodEnum.create = createZodEnum;
3320
3348
  ZodNativeEnum = class ZodNativeEnum extends ZodType {
3321
- constructor() {
3322
- super(...arguments);
3323
- _ZodNativeEnum_cache.set(this, undefined);
3324
- }
3325
3349
  _parse(input) {
3326
3350
  const nativeEnumValues = util.getValidEnumValues(this._def.values);
3327
3351
  const ctx = this._getOrReturnCtx(input);
@@ -3334,10 +3358,10 @@ var init_lib = __esm(() => {
3334
3358
  });
3335
3359
  return INVALID;
3336
3360
  }
3337
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f")) {
3338
- __classPrivateFieldSet(this, _ZodNativeEnum_cache, new Set(util.getValidEnumValues(this._def.values)), "f");
3361
+ if (!this._cache) {
3362
+ this._cache = new Set(util.getValidEnumValues(this._def.values));
3339
3363
  }
3340
- if (!__classPrivateFieldGet(this, _ZodNativeEnum_cache, "f").has(input.data)) {
3364
+ if (!this._cache.has(input.data)) {
3341
3365
  const expectedValues = util.objectValues(nativeEnumValues);
3342
3366
  addIssueToContext(ctx, {
3343
3367
  received: ctx.data,
@@ -3352,7 +3376,6 @@ var init_lib = __esm(() => {
3352
3376
  return this._def.values;
3353
3377
  }
3354
3378
  };
3355
- _ZodNativeEnum_cache = new WeakMap;
3356
3379
  ZodNativeEnum.create = (values, params) => {
3357
3380
  return new ZodNativeEnum({
3358
3381
  values,
@@ -3493,7 +3516,7 @@ var init_lib = __esm(() => {
3493
3516
  parent: ctx
3494
3517
  });
3495
3518
  if (!isValid(base))
3496
- return base;
3519
+ return INVALID;
3497
3520
  const result = effect.transform(base.value, checkCtx);
3498
3521
  if (result instanceof Promise) {
3499
3522
  throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
@@ -3502,8 +3525,11 @@ var init_lib = __esm(() => {
3502
3525
  } else {
3503
3526
  return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
3504
3527
  if (!isValid(base))
3505
- return base;
3506
- return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));
3528
+ return INVALID;
3529
+ return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
3530
+ status: status.value,
3531
+ value: result
3532
+ }));
3507
3533
  });
3508
3534
  }
3509
3535
  }
@@ -3841,122 +3867,131 @@ var init_lib = __esm(() => {
3841
3867
  date: (arg) => ZodDate.create({ ...arg, coerce: true })
3842
3868
  };
3843
3869
  NEVER = INVALID;
3844
- z2 = /* @__PURE__ */ Object.freeze({
3845
- __proto__: null,
3846
- defaultErrorMap: errorMap,
3847
- setErrorMap,
3848
- getErrorMap,
3849
- makeIssue,
3850
- EMPTY_PATH,
3851
- addIssueToContext,
3852
- ParseStatus,
3853
- INVALID,
3854
- DIRTY,
3855
- OK,
3856
- isAborted,
3857
- isDirty,
3858
- isValid,
3859
- isAsync,
3860
- get util() {
3861
- return util;
3862
- },
3863
- get objectUtil() {
3864
- return objectUtil;
3865
- },
3866
- ZodParsedType,
3867
- getParsedType,
3868
- ZodType,
3869
- datetimeRegex,
3870
- ZodString,
3871
- ZodNumber,
3872
- ZodBigInt,
3873
- ZodBoolean,
3874
- ZodDate,
3875
- ZodSymbol,
3876
- ZodUndefined,
3877
- ZodNull,
3878
- ZodAny,
3879
- ZodUnknown,
3880
- ZodNever,
3881
- ZodVoid,
3882
- ZodArray,
3883
- ZodObject,
3884
- ZodUnion,
3885
- ZodDiscriminatedUnion,
3886
- ZodIntersection,
3887
- ZodTuple,
3888
- ZodRecord,
3889
- ZodMap,
3890
- ZodSet,
3891
- ZodFunction,
3892
- ZodLazy,
3893
- ZodLiteral,
3894
- ZodEnum,
3895
- ZodNativeEnum,
3896
- ZodPromise,
3897
- ZodEffects,
3898
- ZodTransformer: ZodEffects,
3899
- ZodOptional,
3900
- ZodNullable,
3901
- ZodDefault,
3902
- ZodCatch,
3903
- ZodNaN,
3904
- BRAND,
3905
- ZodBranded,
3906
- ZodPipeline,
3907
- ZodReadonly,
3908
- custom,
3909
- Schema: ZodType,
3910
- ZodSchema: ZodType,
3911
- late,
3912
- get ZodFirstPartyTypeKind() {
3913
- return ZodFirstPartyTypeKind;
3914
- },
3915
- coerce,
3916
- any: anyType,
3917
- array: arrayType,
3918
- bigint: bigIntType,
3919
- boolean: booleanType,
3920
- date: dateType,
3921
- discriminatedUnion: discriminatedUnionType,
3922
- effect: effectsType,
3923
- enum: enumType,
3924
- function: functionType,
3925
- instanceof: instanceOfType,
3926
- intersection: intersectionType,
3927
- lazy: lazyType,
3928
- literal: literalType,
3929
- map: mapType,
3930
- nan: nanType,
3931
- nativeEnum: nativeEnumType,
3932
- never: neverType,
3933
- null: nullType,
3934
- nullable: nullableType,
3935
- number: numberType,
3936
- object: objectType,
3937
- oboolean,
3938
- onumber,
3939
- optional: optionalType,
3940
- ostring,
3941
- pipeline: pipelineType,
3942
- preprocess: preprocessType,
3943
- promise: promiseType,
3944
- record: recordType,
3945
- set: setType,
3946
- strictObject: strictObjectType,
3947
- string: stringType,
3948
- symbol: symbolType,
3949
- transformer: effectsType,
3950
- tuple: tupleType,
3951
- undefined: undefinedType,
3952
- union: unionType,
3953
- unknown: unknownType,
3954
- void: voidType,
3955
- NEVER,
3956
- ZodIssueCode,
3957
- quotelessJson,
3958
- ZodError
3959
- });
3870
+ });
3871
+
3872
+ // node_modules/zod/v3/external.js
3873
+ var exports_external = {};
3874
+ __export(exports_external, {
3875
+ void: () => voidType,
3876
+ util: () => util,
3877
+ unknown: () => unknownType,
3878
+ union: () => unionType,
3879
+ undefined: () => undefinedType,
3880
+ tuple: () => tupleType,
3881
+ transformer: () => effectsType,
3882
+ symbol: () => symbolType,
3883
+ string: () => stringType,
3884
+ strictObject: () => strictObjectType,
3885
+ setErrorMap: () => setErrorMap,
3886
+ set: () => setType,
3887
+ record: () => recordType,
3888
+ quotelessJson: () => quotelessJson,
3889
+ promise: () => promiseType,
3890
+ preprocess: () => preprocessType,
3891
+ pipeline: () => pipelineType,
3892
+ ostring: () => ostring,
3893
+ optional: () => optionalType,
3894
+ onumber: () => onumber,
3895
+ oboolean: () => oboolean,
3896
+ objectUtil: () => objectUtil,
3897
+ object: () => objectType,
3898
+ number: () => numberType,
3899
+ nullable: () => nullableType,
3900
+ null: () => nullType,
3901
+ never: () => neverType,
3902
+ nativeEnum: () => nativeEnumType,
3903
+ nan: () => nanType,
3904
+ map: () => mapType,
3905
+ makeIssue: () => makeIssue,
3906
+ literal: () => literalType,
3907
+ lazy: () => lazyType,
3908
+ late: () => late,
3909
+ isValid: () => isValid,
3910
+ isDirty: () => isDirty,
3911
+ isAsync: () => isAsync,
3912
+ isAborted: () => isAborted,
3913
+ intersection: () => intersectionType,
3914
+ instanceof: () => instanceOfType,
3915
+ getParsedType: () => getParsedType,
3916
+ getErrorMap: () => getErrorMap,
3917
+ function: () => functionType,
3918
+ enum: () => enumType,
3919
+ effect: () => effectsType,
3920
+ discriminatedUnion: () => discriminatedUnionType,
3921
+ defaultErrorMap: () => en_default,
3922
+ datetimeRegex: () => datetimeRegex,
3923
+ date: () => dateType,
3924
+ custom: () => custom,
3925
+ coerce: () => coerce,
3926
+ boolean: () => booleanType,
3927
+ bigint: () => bigIntType,
3928
+ array: () => arrayType,
3929
+ any: () => anyType,
3930
+ addIssueToContext: () => addIssueToContext,
3931
+ ZodVoid: () => ZodVoid,
3932
+ ZodUnknown: () => ZodUnknown,
3933
+ ZodUnion: () => ZodUnion,
3934
+ ZodUndefined: () => ZodUndefined,
3935
+ ZodType: () => ZodType,
3936
+ ZodTuple: () => ZodTuple,
3937
+ ZodTransformer: () => ZodEffects,
3938
+ ZodSymbol: () => ZodSymbol,
3939
+ ZodString: () => ZodString,
3940
+ ZodSet: () => ZodSet,
3941
+ ZodSchema: () => ZodType,
3942
+ ZodRecord: () => ZodRecord,
3943
+ ZodReadonly: () => ZodReadonly,
3944
+ ZodPromise: () => ZodPromise,
3945
+ ZodPipeline: () => ZodPipeline,
3946
+ ZodParsedType: () => ZodParsedType,
3947
+ ZodOptional: () => ZodOptional,
3948
+ ZodObject: () => ZodObject,
3949
+ ZodNumber: () => ZodNumber,
3950
+ ZodNullable: () => ZodNullable,
3951
+ ZodNull: () => ZodNull,
3952
+ ZodNever: () => ZodNever,
3953
+ ZodNativeEnum: () => ZodNativeEnum,
3954
+ ZodNaN: () => ZodNaN,
3955
+ ZodMap: () => ZodMap,
3956
+ ZodLiteral: () => ZodLiteral,
3957
+ ZodLazy: () => ZodLazy,
3958
+ ZodIssueCode: () => ZodIssueCode,
3959
+ ZodIntersection: () => ZodIntersection,
3960
+ ZodFunction: () => ZodFunction,
3961
+ ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
3962
+ ZodError: () => ZodError,
3963
+ ZodEnum: () => ZodEnum,
3964
+ ZodEffects: () => ZodEffects,
3965
+ ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
3966
+ ZodDefault: () => ZodDefault,
3967
+ ZodDate: () => ZodDate,
3968
+ ZodCatch: () => ZodCatch,
3969
+ ZodBranded: () => ZodBranded,
3970
+ ZodBoolean: () => ZodBoolean,
3971
+ ZodBigInt: () => ZodBigInt,
3972
+ ZodArray: () => ZodArray,
3973
+ ZodAny: () => ZodAny,
3974
+ Schema: () => ZodType,
3975
+ ParseStatus: () => ParseStatus,
3976
+ OK: () => OK,
3977
+ NEVER: () => NEVER,
3978
+ INVALID: () => INVALID,
3979
+ EMPTY_PATH: () => EMPTY_PATH,
3980
+ DIRTY: () => DIRTY,
3981
+ BRAND: () => BRAND
3982
+ });
3983
+ var init_external = __esm(() => {
3984
+ init_errors();
3985
+ init_parseUtil();
3986
+ init_typeAliases();
3987
+ init_util();
3988
+ init_types();
3989
+ init_ZodError();
3990
+ });
3991
+
3992
+ // node_modules/zod/v3/index.js
3993
+ var init_v3 = __esm(() => {
3994
+ init_external();
3960
3995
  });
3961
3996
 
3962
3997
  // src/mcp-server/console-logger.ts
@@ -4010,45 +4045,51 @@ var init_console_logger = __esm(() => {
4010
4045
  ];
4011
4046
  });
4012
4047
 
4048
+ // node_modules/zod/index.js
4049
+ var init_zod = __esm(() => {
4050
+ init_external();
4051
+ init_external();
4052
+ });
4053
+
4013
4054
  // node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4014
4055
  var LATEST_PROTOCOL_VERSION = "2024-11-05", SUPPORTED_PROTOCOL_VERSIONS, JSONRPC_VERSION = "2.0", ProgressTokenSchema, CursorSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, ResourceReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError;
4015
- var init_types = __esm(() => {
4016
- init_lib();
4056
+ var init_types2 = __esm(() => {
4057
+ init_zod();
4017
4058
  SUPPORTED_PROTOCOL_VERSIONS = [
4018
4059
  LATEST_PROTOCOL_VERSION,
4019
4060
  "2024-10-07"
4020
4061
  ];
4021
- ProgressTokenSchema = z2.union([z2.string(), z2.number().int()]);
4022
- CursorSchema = z2.string();
4023
- BaseRequestParamsSchema = z2.object({
4024
- _meta: z2.optional(z2.object({
4025
- progressToken: z2.optional(ProgressTokenSchema)
4062
+ ProgressTokenSchema = exports_external.union([exports_external.string(), exports_external.number().int()]);
4063
+ CursorSchema = exports_external.string();
4064
+ BaseRequestParamsSchema = exports_external.object({
4065
+ _meta: exports_external.optional(exports_external.object({
4066
+ progressToken: exports_external.optional(ProgressTokenSchema)
4026
4067
  }).passthrough())
4027
4068
  }).passthrough();
4028
- RequestSchema = z2.object({
4029
- method: z2.string(),
4030
- params: z2.optional(BaseRequestParamsSchema)
4069
+ RequestSchema = exports_external.object({
4070
+ method: exports_external.string(),
4071
+ params: exports_external.optional(BaseRequestParamsSchema)
4031
4072
  });
4032
- BaseNotificationParamsSchema = z2.object({
4033
- _meta: z2.optional(z2.object({}).passthrough())
4073
+ BaseNotificationParamsSchema = exports_external.object({
4074
+ _meta: exports_external.optional(exports_external.object({}).passthrough())
4034
4075
  }).passthrough();
4035
- NotificationSchema = z2.object({
4036
- method: z2.string(),
4037
- params: z2.optional(BaseNotificationParamsSchema)
4076
+ NotificationSchema = exports_external.object({
4077
+ method: exports_external.string(),
4078
+ params: exports_external.optional(BaseNotificationParamsSchema)
4038
4079
  });
4039
- ResultSchema = z2.object({
4040
- _meta: z2.optional(z2.object({}).passthrough())
4080
+ ResultSchema = exports_external.object({
4081
+ _meta: exports_external.optional(exports_external.object({}).passthrough())
4041
4082
  }).passthrough();
4042
- RequestIdSchema = z2.union([z2.string(), z2.number().int()]);
4043
- JSONRPCRequestSchema = z2.object({
4044
- jsonrpc: z2.literal(JSONRPC_VERSION),
4083
+ RequestIdSchema = exports_external.union([exports_external.string(), exports_external.number().int()]);
4084
+ JSONRPCRequestSchema = exports_external.object({
4085
+ jsonrpc: exports_external.literal(JSONRPC_VERSION),
4045
4086
  id: RequestIdSchema
4046
4087
  }).merge(RequestSchema).strict();
4047
- JSONRPCNotificationSchema = z2.object({
4048
- jsonrpc: z2.literal(JSONRPC_VERSION)
4088
+ JSONRPCNotificationSchema = exports_external.object({
4089
+ jsonrpc: exports_external.literal(JSONRPC_VERSION)
4049
4090
  }).merge(NotificationSchema).strict();
4050
- JSONRPCResponseSchema = z2.object({
4051
- jsonrpc: z2.literal(JSONRPC_VERSION),
4091
+ JSONRPCResponseSchema = exports_external.object({
4092
+ jsonrpc: exports_external.literal(JSONRPC_VERSION),
4052
4093
  id: RequestIdSchema,
4053
4094
  result: ResultSchema
4054
4095
  }).strict();
@@ -4061,16 +4102,16 @@ var init_types = __esm(() => {
4061
4102
  ErrorCode2[ErrorCode2["InvalidParams"] = -32602] = "InvalidParams";
4062
4103
  ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
4063
4104
  })(ErrorCode || (ErrorCode = {}));
4064
- JSONRPCErrorSchema = z2.object({
4065
- jsonrpc: z2.literal(JSONRPC_VERSION),
4105
+ JSONRPCErrorSchema = exports_external.object({
4106
+ jsonrpc: exports_external.literal(JSONRPC_VERSION),
4066
4107
  id: RequestIdSchema,
4067
- error: z2.object({
4068
- code: z2.number().int(),
4069
- message: z2.string(),
4070
- data: z2.optional(z2.unknown())
4108
+ error: exports_external.object({
4109
+ code: exports_external.number().int(),
4110
+ message: exports_external.string(),
4111
+ data: exports_external.optional(exports_external.unknown())
4071
4112
  })
4072
4113
  }).strict();
4073
- JSONRPCMessageSchema = z2.union([
4114
+ JSONRPCMessageSchema = exports_external.union([
4074
4115
  JSONRPCRequestSchema,
4075
4116
  JSONRPCNotificationSchema,
4076
4117
  JSONRPCResponseSchema,
@@ -4078,184 +4119,184 @@ var init_types = __esm(() => {
4078
4119
  ]);
4079
4120
  EmptyResultSchema = ResultSchema.strict();
4080
4121
  CancelledNotificationSchema = NotificationSchema.extend({
4081
- method: z2.literal("notifications/cancelled"),
4122
+ method: exports_external.literal("notifications/cancelled"),
4082
4123
  params: BaseNotificationParamsSchema.extend({
4083
4124
  requestId: RequestIdSchema,
4084
- reason: z2.string().optional()
4125
+ reason: exports_external.string().optional()
4085
4126
  })
4086
4127
  });
4087
- ImplementationSchema = z2.object({
4088
- name: z2.string(),
4089
- version: z2.string()
4128
+ ImplementationSchema = exports_external.object({
4129
+ name: exports_external.string(),
4130
+ version: exports_external.string()
4090
4131
  }).passthrough();
4091
- ClientCapabilitiesSchema = z2.object({
4092
- experimental: z2.optional(z2.object({}).passthrough()),
4093
- sampling: z2.optional(z2.object({}).passthrough()),
4094
- roots: z2.optional(z2.object({
4095
- listChanged: z2.optional(z2.boolean())
4132
+ ClientCapabilitiesSchema = exports_external.object({
4133
+ experimental: exports_external.optional(exports_external.object({}).passthrough()),
4134
+ sampling: exports_external.optional(exports_external.object({}).passthrough()),
4135
+ roots: exports_external.optional(exports_external.object({
4136
+ listChanged: exports_external.optional(exports_external.boolean())
4096
4137
  }).passthrough())
4097
4138
  }).passthrough();
4098
4139
  InitializeRequestSchema = RequestSchema.extend({
4099
- method: z2.literal("initialize"),
4140
+ method: exports_external.literal("initialize"),
4100
4141
  params: BaseRequestParamsSchema.extend({
4101
- protocolVersion: z2.string(),
4142
+ protocolVersion: exports_external.string(),
4102
4143
  capabilities: ClientCapabilitiesSchema,
4103
4144
  clientInfo: ImplementationSchema
4104
4145
  })
4105
4146
  });
4106
- ServerCapabilitiesSchema = z2.object({
4107
- experimental: z2.optional(z2.object({}).passthrough()),
4108
- logging: z2.optional(z2.object({}).passthrough()),
4109
- completions: z2.optional(z2.object({}).passthrough()),
4110
- prompts: z2.optional(z2.object({
4111
- listChanged: z2.optional(z2.boolean())
4147
+ ServerCapabilitiesSchema = exports_external.object({
4148
+ experimental: exports_external.optional(exports_external.object({}).passthrough()),
4149
+ logging: exports_external.optional(exports_external.object({}).passthrough()),
4150
+ completions: exports_external.optional(exports_external.object({}).passthrough()),
4151
+ prompts: exports_external.optional(exports_external.object({
4152
+ listChanged: exports_external.optional(exports_external.boolean())
4112
4153
  }).passthrough()),
4113
- resources: z2.optional(z2.object({
4114
- subscribe: z2.optional(z2.boolean()),
4115
- listChanged: z2.optional(z2.boolean())
4154
+ resources: exports_external.optional(exports_external.object({
4155
+ subscribe: exports_external.optional(exports_external.boolean()),
4156
+ listChanged: exports_external.optional(exports_external.boolean())
4116
4157
  }).passthrough()),
4117
- tools: z2.optional(z2.object({
4118
- listChanged: z2.optional(z2.boolean())
4158
+ tools: exports_external.optional(exports_external.object({
4159
+ listChanged: exports_external.optional(exports_external.boolean())
4119
4160
  }).passthrough())
4120
4161
  }).passthrough();
4121
4162
  InitializeResultSchema = ResultSchema.extend({
4122
- protocolVersion: z2.string(),
4163
+ protocolVersion: exports_external.string(),
4123
4164
  capabilities: ServerCapabilitiesSchema,
4124
4165
  serverInfo: ImplementationSchema,
4125
- instructions: z2.optional(z2.string())
4166
+ instructions: exports_external.optional(exports_external.string())
4126
4167
  });
4127
4168
  InitializedNotificationSchema = NotificationSchema.extend({
4128
- method: z2.literal("notifications/initialized")
4169
+ method: exports_external.literal("notifications/initialized")
4129
4170
  });
4130
4171
  PingRequestSchema = RequestSchema.extend({
4131
- method: z2.literal("ping")
4172
+ method: exports_external.literal("ping")
4132
4173
  });
4133
- ProgressSchema = z2.object({
4134
- progress: z2.number(),
4135
- total: z2.optional(z2.number())
4174
+ ProgressSchema = exports_external.object({
4175
+ progress: exports_external.number(),
4176
+ total: exports_external.optional(exports_external.number())
4136
4177
  }).passthrough();
4137
4178
  ProgressNotificationSchema = NotificationSchema.extend({
4138
- method: z2.literal("notifications/progress"),
4179
+ method: exports_external.literal("notifications/progress"),
4139
4180
  params: BaseNotificationParamsSchema.merge(ProgressSchema).extend({
4140
4181
  progressToken: ProgressTokenSchema
4141
4182
  })
4142
4183
  });
4143
4184
  PaginatedRequestSchema = RequestSchema.extend({
4144
4185
  params: BaseRequestParamsSchema.extend({
4145
- cursor: z2.optional(CursorSchema)
4186
+ cursor: exports_external.optional(CursorSchema)
4146
4187
  }).optional()
4147
4188
  });
4148
4189
  PaginatedResultSchema = ResultSchema.extend({
4149
- nextCursor: z2.optional(CursorSchema)
4190
+ nextCursor: exports_external.optional(CursorSchema)
4150
4191
  });
4151
- ResourceContentsSchema = z2.object({
4152
- uri: z2.string(),
4153
- mimeType: z2.optional(z2.string())
4192
+ ResourceContentsSchema = exports_external.object({
4193
+ uri: exports_external.string(),
4194
+ mimeType: exports_external.optional(exports_external.string())
4154
4195
  }).passthrough();
4155
4196
  TextResourceContentsSchema = ResourceContentsSchema.extend({
4156
- text: z2.string()
4197
+ text: exports_external.string()
4157
4198
  });
4158
4199
  BlobResourceContentsSchema = ResourceContentsSchema.extend({
4159
- blob: z2.string().base64()
4200
+ blob: exports_external.string().base64()
4160
4201
  });
4161
- ResourceSchema = z2.object({
4162
- uri: z2.string(),
4163
- name: z2.string(),
4164
- description: z2.optional(z2.string()),
4165
- mimeType: z2.optional(z2.string())
4202
+ ResourceSchema = exports_external.object({
4203
+ uri: exports_external.string(),
4204
+ name: exports_external.string(),
4205
+ description: exports_external.optional(exports_external.string()),
4206
+ mimeType: exports_external.optional(exports_external.string())
4166
4207
  }).passthrough();
4167
- ResourceTemplateSchema = z2.object({
4168
- uriTemplate: z2.string(),
4169
- name: z2.string(),
4170
- description: z2.optional(z2.string()),
4171
- mimeType: z2.optional(z2.string())
4208
+ ResourceTemplateSchema = exports_external.object({
4209
+ uriTemplate: exports_external.string(),
4210
+ name: exports_external.string(),
4211
+ description: exports_external.optional(exports_external.string()),
4212
+ mimeType: exports_external.optional(exports_external.string())
4172
4213
  }).passthrough();
4173
4214
  ListResourcesRequestSchema = PaginatedRequestSchema.extend({
4174
- method: z2.literal("resources/list")
4215
+ method: exports_external.literal("resources/list")
4175
4216
  });
4176
4217
  ListResourcesResultSchema = PaginatedResultSchema.extend({
4177
- resources: z2.array(ResourceSchema)
4218
+ resources: exports_external.array(ResourceSchema)
4178
4219
  });
4179
4220
  ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
4180
- method: z2.literal("resources/templates/list")
4221
+ method: exports_external.literal("resources/templates/list")
4181
4222
  });
4182
4223
  ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
4183
- resourceTemplates: z2.array(ResourceTemplateSchema)
4224
+ resourceTemplates: exports_external.array(ResourceTemplateSchema)
4184
4225
  });
4185
4226
  ReadResourceRequestSchema = RequestSchema.extend({
4186
- method: z2.literal("resources/read"),
4227
+ method: exports_external.literal("resources/read"),
4187
4228
  params: BaseRequestParamsSchema.extend({
4188
- uri: z2.string()
4229
+ uri: exports_external.string()
4189
4230
  })
4190
4231
  });
4191
4232
  ReadResourceResultSchema = ResultSchema.extend({
4192
- contents: z2.array(z2.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
4233
+ contents: exports_external.array(exports_external.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
4193
4234
  });
4194
4235
  ResourceListChangedNotificationSchema = NotificationSchema.extend({
4195
- method: z2.literal("notifications/resources/list_changed")
4236
+ method: exports_external.literal("notifications/resources/list_changed")
4196
4237
  });
4197
4238
  SubscribeRequestSchema = RequestSchema.extend({
4198
- method: z2.literal("resources/subscribe"),
4239
+ method: exports_external.literal("resources/subscribe"),
4199
4240
  params: BaseRequestParamsSchema.extend({
4200
- uri: z2.string()
4241
+ uri: exports_external.string()
4201
4242
  })
4202
4243
  });
4203
4244
  UnsubscribeRequestSchema = RequestSchema.extend({
4204
- method: z2.literal("resources/unsubscribe"),
4245
+ method: exports_external.literal("resources/unsubscribe"),
4205
4246
  params: BaseRequestParamsSchema.extend({
4206
- uri: z2.string()
4247
+ uri: exports_external.string()
4207
4248
  })
4208
4249
  });
4209
4250
  ResourceUpdatedNotificationSchema = NotificationSchema.extend({
4210
- method: z2.literal("notifications/resources/updated"),
4251
+ method: exports_external.literal("notifications/resources/updated"),
4211
4252
  params: BaseNotificationParamsSchema.extend({
4212
- uri: z2.string()
4253
+ uri: exports_external.string()
4213
4254
  })
4214
4255
  });
4215
- PromptArgumentSchema = z2.object({
4216
- name: z2.string(),
4217
- description: z2.optional(z2.string()),
4218
- required: z2.optional(z2.boolean())
4256
+ PromptArgumentSchema = exports_external.object({
4257
+ name: exports_external.string(),
4258
+ description: exports_external.optional(exports_external.string()),
4259
+ required: exports_external.optional(exports_external.boolean())
4219
4260
  }).passthrough();
4220
- PromptSchema = z2.object({
4221
- name: z2.string(),
4222
- description: z2.optional(z2.string()),
4223
- arguments: z2.optional(z2.array(PromptArgumentSchema))
4261
+ PromptSchema = exports_external.object({
4262
+ name: exports_external.string(),
4263
+ description: exports_external.optional(exports_external.string()),
4264
+ arguments: exports_external.optional(exports_external.array(PromptArgumentSchema))
4224
4265
  }).passthrough();
4225
4266
  ListPromptsRequestSchema = PaginatedRequestSchema.extend({
4226
- method: z2.literal("prompts/list")
4267
+ method: exports_external.literal("prompts/list")
4227
4268
  });
4228
4269
  ListPromptsResultSchema = PaginatedResultSchema.extend({
4229
- prompts: z2.array(PromptSchema)
4270
+ prompts: exports_external.array(PromptSchema)
4230
4271
  });
4231
4272
  GetPromptRequestSchema = RequestSchema.extend({
4232
- method: z2.literal("prompts/get"),
4273
+ method: exports_external.literal("prompts/get"),
4233
4274
  params: BaseRequestParamsSchema.extend({
4234
- name: z2.string(),
4235
- arguments: z2.optional(z2.record(z2.string()))
4275
+ name: exports_external.string(),
4276
+ arguments: exports_external.optional(exports_external.record(exports_external.string()))
4236
4277
  })
4237
4278
  });
4238
- TextContentSchema = z2.object({
4239
- type: z2.literal("text"),
4240
- text: z2.string()
4279
+ TextContentSchema = exports_external.object({
4280
+ type: exports_external.literal("text"),
4281
+ text: exports_external.string()
4241
4282
  }).passthrough();
4242
- ImageContentSchema = z2.object({
4243
- type: z2.literal("image"),
4244
- data: z2.string().base64(),
4245
- mimeType: z2.string()
4283
+ ImageContentSchema = exports_external.object({
4284
+ type: exports_external.literal("image"),
4285
+ data: exports_external.string().base64(),
4286
+ mimeType: exports_external.string()
4246
4287
  }).passthrough();
4247
- AudioContentSchema = z2.object({
4248
- type: z2.literal("audio"),
4249
- data: z2.string().base64(),
4250
- mimeType: z2.string()
4288
+ AudioContentSchema = exports_external.object({
4289
+ type: exports_external.literal("audio"),
4290
+ data: exports_external.string().base64(),
4291
+ mimeType: exports_external.string()
4251
4292
  }).passthrough();
4252
- EmbeddedResourceSchema = z2.object({
4253
- type: z2.literal("resource"),
4254
- resource: z2.union([TextResourceContentsSchema, BlobResourceContentsSchema])
4293
+ EmbeddedResourceSchema = exports_external.object({
4294
+ type: exports_external.literal("resource"),
4295
+ resource: exports_external.union([TextResourceContentsSchema, BlobResourceContentsSchema])
4255
4296
  }).passthrough();
4256
- PromptMessageSchema = z2.object({
4257
- role: z2.enum(["user", "assistant"]),
4258
- content: z2.union([
4297
+ PromptMessageSchema = exports_external.object({
4298
+ role: exports_external.enum(["user", "assistant"]),
4299
+ content: exports_external.union([
4259
4300
  TextContentSchema,
4260
4301
  ImageContentSchema,
4261
4302
  AudioContentSchema,
@@ -4263,44 +4304,44 @@ var init_types = __esm(() => {
4263
4304
  ])
4264
4305
  }).passthrough();
4265
4306
  GetPromptResultSchema = ResultSchema.extend({
4266
- description: z2.optional(z2.string()),
4267
- messages: z2.array(PromptMessageSchema)
4307
+ description: exports_external.optional(exports_external.string()),
4308
+ messages: exports_external.array(PromptMessageSchema)
4268
4309
  });
4269
4310
  PromptListChangedNotificationSchema = NotificationSchema.extend({
4270
- method: z2.literal("notifications/prompts/list_changed")
4311
+ method: exports_external.literal("notifications/prompts/list_changed")
4271
4312
  });
4272
- ToolSchema = z2.object({
4273
- name: z2.string(),
4274
- description: z2.optional(z2.string()),
4275
- inputSchema: z2.object({
4276
- type: z2.literal("object"),
4277
- properties: z2.optional(z2.object({}).passthrough())
4313
+ ToolSchema = exports_external.object({
4314
+ name: exports_external.string(),
4315
+ description: exports_external.optional(exports_external.string()),
4316
+ inputSchema: exports_external.object({
4317
+ type: exports_external.literal("object"),
4318
+ properties: exports_external.optional(exports_external.object({}).passthrough())
4278
4319
  }).passthrough()
4279
4320
  }).passthrough();
4280
4321
  ListToolsRequestSchema = PaginatedRequestSchema.extend({
4281
- method: z2.literal("tools/list")
4322
+ method: exports_external.literal("tools/list")
4282
4323
  });
4283
4324
  ListToolsResultSchema = PaginatedResultSchema.extend({
4284
- tools: z2.array(ToolSchema)
4325
+ tools: exports_external.array(ToolSchema)
4285
4326
  });
4286
4327
  CallToolResultSchema = ResultSchema.extend({
4287
- content: z2.array(z2.union([TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema])),
4288
- isError: z2.boolean().default(false).optional()
4328
+ content: exports_external.array(exports_external.union([TextContentSchema, ImageContentSchema, AudioContentSchema, EmbeddedResourceSchema])),
4329
+ isError: exports_external.boolean().default(false).optional()
4289
4330
  });
4290
4331
  CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
4291
- toolResult: z2.unknown()
4332
+ toolResult: exports_external.unknown()
4292
4333
  }));
4293
4334
  CallToolRequestSchema = RequestSchema.extend({
4294
- method: z2.literal("tools/call"),
4335
+ method: exports_external.literal("tools/call"),
4295
4336
  params: BaseRequestParamsSchema.extend({
4296
- name: z2.string(),
4297
- arguments: z2.optional(z2.record(z2.unknown()))
4337
+ name: exports_external.string(),
4338
+ arguments: exports_external.optional(exports_external.record(exports_external.unknown()))
4298
4339
  })
4299
4340
  });
4300
4341
  ToolListChangedNotificationSchema = NotificationSchema.extend({
4301
- method: z2.literal("notifications/tools/list_changed")
4342
+ method: exports_external.literal("notifications/tools/list_changed")
4302
4343
  });
4303
- LoggingLevelSchema = z2.enum([
4344
+ LoggingLevelSchema = exports_external.enum([
4304
4345
  "debug",
4305
4346
  "info",
4306
4347
  "notice",
@@ -4311,94 +4352,94 @@ var init_types = __esm(() => {
4311
4352
  "emergency"
4312
4353
  ]);
4313
4354
  SetLevelRequestSchema = RequestSchema.extend({
4314
- method: z2.literal("logging/setLevel"),
4355
+ method: exports_external.literal("logging/setLevel"),
4315
4356
  params: BaseRequestParamsSchema.extend({
4316
4357
  level: LoggingLevelSchema
4317
4358
  })
4318
4359
  });
4319
4360
  LoggingMessageNotificationSchema = NotificationSchema.extend({
4320
- method: z2.literal("notifications/message"),
4361
+ method: exports_external.literal("notifications/message"),
4321
4362
  params: BaseNotificationParamsSchema.extend({
4322
4363
  level: LoggingLevelSchema,
4323
- logger: z2.optional(z2.string()),
4324
- data: z2.unknown()
4364
+ logger: exports_external.optional(exports_external.string()),
4365
+ data: exports_external.unknown()
4325
4366
  })
4326
4367
  });
4327
- ModelHintSchema = z2.object({
4328
- name: z2.string().optional()
4368
+ ModelHintSchema = exports_external.object({
4369
+ name: exports_external.string().optional()
4329
4370
  }).passthrough();
4330
- ModelPreferencesSchema = z2.object({
4331
- hints: z2.optional(z2.array(ModelHintSchema)),
4332
- costPriority: z2.optional(z2.number().min(0).max(1)),
4333
- speedPriority: z2.optional(z2.number().min(0).max(1)),
4334
- intelligencePriority: z2.optional(z2.number().min(0).max(1))
4371
+ ModelPreferencesSchema = exports_external.object({
4372
+ hints: exports_external.optional(exports_external.array(ModelHintSchema)),
4373
+ costPriority: exports_external.optional(exports_external.number().min(0).max(1)),
4374
+ speedPriority: exports_external.optional(exports_external.number().min(0).max(1)),
4375
+ intelligencePriority: exports_external.optional(exports_external.number().min(0).max(1))
4335
4376
  }).passthrough();
4336
- SamplingMessageSchema = z2.object({
4337
- role: z2.enum(["user", "assistant"]),
4338
- content: z2.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
4377
+ SamplingMessageSchema = exports_external.object({
4378
+ role: exports_external.enum(["user", "assistant"]),
4379
+ content: exports_external.union([TextContentSchema, ImageContentSchema, AudioContentSchema])
4339
4380
  }).passthrough();
4340
4381
  CreateMessageRequestSchema = RequestSchema.extend({
4341
- method: z2.literal("sampling/createMessage"),
4382
+ method: exports_external.literal("sampling/createMessage"),
4342
4383
  params: BaseRequestParamsSchema.extend({
4343
- messages: z2.array(SamplingMessageSchema),
4344
- systemPrompt: z2.optional(z2.string()),
4345
- includeContext: z2.optional(z2.enum(["none", "thisServer", "allServers"])),
4346
- temperature: z2.optional(z2.number()),
4347
- maxTokens: z2.number().int(),
4348
- stopSequences: z2.optional(z2.array(z2.string())),
4349
- metadata: z2.optional(z2.object({}).passthrough()),
4350
- modelPreferences: z2.optional(ModelPreferencesSchema)
4384
+ messages: exports_external.array(SamplingMessageSchema),
4385
+ systemPrompt: exports_external.optional(exports_external.string()),
4386
+ includeContext: exports_external.optional(exports_external.enum(["none", "thisServer", "allServers"])),
4387
+ temperature: exports_external.optional(exports_external.number()),
4388
+ maxTokens: exports_external.number().int(),
4389
+ stopSequences: exports_external.optional(exports_external.array(exports_external.string())),
4390
+ metadata: exports_external.optional(exports_external.object({}).passthrough()),
4391
+ modelPreferences: exports_external.optional(ModelPreferencesSchema)
4351
4392
  })
4352
4393
  });
4353
4394
  CreateMessageResultSchema = ResultSchema.extend({
4354
- model: z2.string(),
4355
- stopReason: z2.optional(z2.enum(["endTurn", "stopSequence", "maxTokens"]).or(z2.string())),
4356
- role: z2.enum(["user", "assistant"]),
4357
- content: z2.discriminatedUnion("type", [
4395
+ model: exports_external.string(),
4396
+ stopReason: exports_external.optional(exports_external.enum(["endTurn", "stopSequence", "maxTokens"]).or(exports_external.string())),
4397
+ role: exports_external.enum(["user", "assistant"]),
4398
+ content: exports_external.discriminatedUnion("type", [
4358
4399
  TextContentSchema,
4359
4400
  ImageContentSchema,
4360
4401
  AudioContentSchema
4361
4402
  ])
4362
4403
  });
4363
- ResourceReferenceSchema = z2.object({
4364
- type: z2.literal("ref/resource"),
4365
- uri: z2.string()
4404
+ ResourceReferenceSchema = exports_external.object({
4405
+ type: exports_external.literal("ref/resource"),
4406
+ uri: exports_external.string()
4366
4407
  }).passthrough();
4367
- PromptReferenceSchema = z2.object({
4368
- type: z2.literal("ref/prompt"),
4369
- name: z2.string()
4408
+ PromptReferenceSchema = exports_external.object({
4409
+ type: exports_external.literal("ref/prompt"),
4410
+ name: exports_external.string()
4370
4411
  }).passthrough();
4371
4412
  CompleteRequestSchema = RequestSchema.extend({
4372
- method: z2.literal("completion/complete"),
4413
+ method: exports_external.literal("completion/complete"),
4373
4414
  params: BaseRequestParamsSchema.extend({
4374
- ref: z2.union([PromptReferenceSchema, ResourceReferenceSchema]),
4375
- argument: z2.object({
4376
- name: z2.string(),
4377
- value: z2.string()
4415
+ ref: exports_external.union([PromptReferenceSchema, ResourceReferenceSchema]),
4416
+ argument: exports_external.object({
4417
+ name: exports_external.string(),
4418
+ value: exports_external.string()
4378
4419
  }).passthrough()
4379
4420
  })
4380
4421
  });
4381
4422
  CompleteResultSchema = ResultSchema.extend({
4382
- completion: z2.object({
4383
- values: z2.array(z2.string()).max(100),
4384
- total: z2.optional(z2.number().int()),
4385
- hasMore: z2.optional(z2.boolean())
4423
+ completion: exports_external.object({
4424
+ values: exports_external.array(exports_external.string()).max(100),
4425
+ total: exports_external.optional(exports_external.number().int()),
4426
+ hasMore: exports_external.optional(exports_external.boolean())
4386
4427
  }).passthrough()
4387
4428
  });
4388
- RootSchema = z2.object({
4389
- uri: z2.string().startsWith("file://"),
4390
- name: z2.optional(z2.string())
4429
+ RootSchema = exports_external.object({
4430
+ uri: exports_external.string().startsWith("file://"),
4431
+ name: exports_external.optional(exports_external.string())
4391
4432
  }).passthrough();
4392
4433
  ListRootsRequestSchema = RequestSchema.extend({
4393
- method: z2.literal("roots/list")
4434
+ method: exports_external.literal("roots/list")
4394
4435
  });
4395
4436
  ListRootsResultSchema = ResultSchema.extend({
4396
- roots: z2.array(RootSchema)
4437
+ roots: exports_external.array(RootSchema)
4397
4438
  });
4398
4439
  RootsListChangedNotificationSchema = NotificationSchema.extend({
4399
- method: z2.literal("notifications/roots/list_changed")
4440
+ method: exports_external.literal("notifications/roots/list_changed")
4400
4441
  });
4401
- ClientRequestSchema = z2.union([
4442
+ ClientRequestSchema = exports_external.union([
4402
4443
  PingRequestSchema,
4403
4444
  InitializeRequestSchema,
4404
4445
  CompleteRequestSchema,
@@ -4413,23 +4454,23 @@ var init_types = __esm(() => {
4413
4454
  CallToolRequestSchema,
4414
4455
  ListToolsRequestSchema
4415
4456
  ]);
4416
- ClientNotificationSchema = z2.union([
4457
+ ClientNotificationSchema = exports_external.union([
4417
4458
  CancelledNotificationSchema,
4418
4459
  ProgressNotificationSchema,
4419
4460
  InitializedNotificationSchema,
4420
4461
  RootsListChangedNotificationSchema
4421
4462
  ]);
4422
- ClientResultSchema = z2.union([
4463
+ ClientResultSchema = exports_external.union([
4423
4464
  EmptyResultSchema,
4424
4465
  CreateMessageResultSchema,
4425
4466
  ListRootsResultSchema
4426
4467
  ]);
4427
- ServerRequestSchema = z2.union([
4468
+ ServerRequestSchema = exports_external.union([
4428
4469
  PingRequestSchema,
4429
4470
  CreateMessageRequestSchema,
4430
4471
  ListRootsRequestSchema
4431
4472
  ]);
4432
- ServerNotificationSchema = z2.union([
4473
+ ServerNotificationSchema = exports_external.union([
4433
4474
  CancelledNotificationSchema,
4434
4475
  ProgressNotificationSchema,
4435
4476
  LoggingMessageNotificationSchema,
@@ -4438,7 +4479,7 @@ var init_types = __esm(() => {
4438
4479
  ToolListChangedNotificationSchema,
4439
4480
  PromptListChangedNotificationSchema
4440
4481
  ]);
4441
- ServerResultSchema = z2.union([
4482
+ ServerResultSchema = exports_external.union([
4442
4483
  EmptyResultSchema,
4443
4484
  InitializeResultSchema,
4444
4485
  CompleteResultSchema,
@@ -5053,14 +5094,14 @@ var require_inherits_browser = __commonJS((exports, module) => {
5053
5094
  // node_modules/inherits/inherits.js
5054
5095
  var require_inherits = __commonJS((exports, module) => {
5055
5096
  try {
5056
- util2 = __require("util");
5057
- if (typeof util2.inherits !== "function")
5097
+ util3 = __require("util");
5098
+ if (typeof util3.inherits !== "function")
5058
5099
  throw "";
5059
- module.exports = util2.inherits;
5100
+ module.exports = util3.inherits;
5060
5101
  } catch (e) {
5061
5102
  module.exports = require_inherits_browser();
5062
5103
  }
5063
- var util2;
5104
+ var util3;
5064
5105
  });
5065
5106
 
5066
5107
  // node_modules/toidentifier/index.js
@@ -9194,7 +9235,7 @@ data: ${JSON.stringify(message)}
9194
9235
  }
9195
9236
  var import_raw_body, import_content_type, MAXIMUM_MESSAGE_SIZE = "4mb";
9196
9237
  var init_sse = __esm(() => {
9197
- init_types();
9238
+ init_types2();
9198
9239
  import_raw_body = __toESM(require_raw_body(), 1);
9199
9240
  import_content_type = __toESM(require_content_type(), 1);
9200
9241
  });
@@ -9229,7 +9270,7 @@ function serializeMessage(message) {
9229
9270
  `;
9230
9271
  }
9231
9272
  var init_stdio = __esm(() => {
9232
- init_types();
9273
+ init_types2();
9233
9274
  });
9234
9275
 
9235
9276
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
@@ -9583,7 +9624,7 @@ var require_browser = __commonJS((exports, module) => {
9583
9624
  // node_modules/body-parser/node_modules/debug/src/node.js
9584
9625
  var require_node = __commonJS((exports, module) => {
9585
9626
  var tty = __require("tty");
9586
- var util2 = __require("util");
9627
+ var util3 = __require("util");
9587
9628
  exports = module.exports = require_debug();
9588
9629
  exports.init = init;
9589
9630
  exports.log = log2;
@@ -9612,7 +9653,7 @@ var require_node = __commonJS((exports, module) => {
9612
9653
  }, {});
9613
9654
  var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
9614
9655
  if (fd !== 1 && fd !== 2) {
9615
- util2.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
9656
+ util3.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
9616
9657
  }
9617
9658
  var stream = fd === 1 ? process.stdout : fd === 2 ? process.stderr : createWritableStdioStream(fd);
9618
9659
  function useColors() {
@@ -9620,14 +9661,14 @@ var require_node = __commonJS((exports, module) => {
9620
9661
  }
9621
9662
  exports.formatters.o = function(v2) {
9622
9663
  this.inspectOpts.colors = this.useColors;
9623
- return util2.inspect(v2, this.inspectOpts).split(`
9664
+ return util3.inspect(v2, this.inspectOpts).split(`
9624
9665
  `).map(function(str) {
9625
9666
  return str.trim();
9626
9667
  }).join(" ");
9627
9668
  };
9628
9669
  exports.formatters.O = function(v2) {
9629
9670
  this.inspectOpts.colors = this.useColors;
9630
- return util2.inspect(v2, this.inspectOpts);
9671
+ return util3.inspect(v2, this.inspectOpts);
9631
9672
  };
9632
9673
  function formatArgs(args) {
9633
9674
  var name = this.namespace;
@@ -9644,7 +9685,7 @@ var require_node = __commonJS((exports, module) => {
9644
9685
  }
9645
9686
  }
9646
9687
  function log2() {
9647
- return stream.write(util2.format.apply(util2, arguments) + `
9688
+ return stream.write(util3.format.apply(util3, arguments) + `
9648
9689
  `);
9649
9690
  }
9650
9691
  function save(namespaces) {
@@ -22270,7 +22311,7 @@ var require_mime_types = __commonJS((exports) => {
22270
22311
  }
22271
22312
  return exports.types[extension2] || false;
22272
22313
  }
22273
- function populateMaps(extensions, types) {
22314
+ function populateMaps(extensions, types2) {
22274
22315
  var preference = ["nginx", "apache", undefined, "iana"];
22275
22316
  Object.keys(db).forEach(function forEachMimeType(type) {
22276
22317
  var mime = db[type];
@@ -22281,14 +22322,14 @@ var require_mime_types = __commonJS((exports) => {
22281
22322
  extensions[type] = exts;
22282
22323
  for (var i = 0;i < exts.length; i++) {
22283
22324
  var extension2 = exts[i];
22284
- if (types[extension2]) {
22285
- var from = preference.indexOf(db[types[extension2]].source);
22325
+ if (types2[extension2]) {
22326
+ var from = preference.indexOf(db[types2[extension2]].source);
22286
22327
  var to = preference.indexOf(mime.source);
22287
- if (types[extension2] !== "application/octet-stream" && (from > to || from === to && types[extension2].substr(0, 12) === "application/")) {
22328
+ if (types2[extension2] !== "application/octet-stream" && (from > to || from === to && types2[extension2].substr(0, 12) === "application/")) {
22288
22329
  continue;
22289
22330
  }
22290
22331
  }
22291
- types[extension2] = type;
22332
+ types2[extension2] = type;
22292
22333
  }
22293
22334
  });
22294
22335
  }
@@ -22311,23 +22352,23 @@ var require_type_is = __commonJS((exports, module) => {
22311
22352
  module.exports.match = mimeMatch;
22312
22353
  function typeis(value, types_) {
22313
22354
  var i;
22314
- var types = types_;
22355
+ var types2 = types_;
22315
22356
  var val = tryNormalizeType(value);
22316
22357
  if (!val) {
22317
22358
  return false;
22318
22359
  }
22319
- if (types && !Array.isArray(types)) {
22320
- types = new Array(arguments.length - 1);
22321
- for (i = 0;i < types.length; i++) {
22322
- types[i] = arguments[i + 1];
22360
+ if (types2 && !Array.isArray(types2)) {
22361
+ types2 = new Array(arguments.length - 1);
22362
+ for (i = 0;i < types2.length; i++) {
22363
+ types2[i] = arguments[i + 1];
22323
22364
  }
22324
22365
  }
22325
- if (!types || !types.length) {
22366
+ if (!types2 || !types2.length) {
22326
22367
  return val;
22327
22368
  }
22328
22369
  var type;
22329
- for (i = 0;i < types.length; i++) {
22330
- if (mimeMatch(normalize(type = types[i]), val)) {
22370
+ for (i = 0;i < types2.length; i++) {
22371
+ if (mimeMatch(normalize(type = types2[i]), val)) {
22331
22372
  return type[0] === "+" || type.indexOf("*") !== -1 ? val : type;
22332
22373
  }
22333
22374
  }
@@ -22337,18 +22378,18 @@ var require_type_is = __commonJS((exports, module) => {
22337
22378
  return req.headers["transfer-encoding"] !== undefined || !isNaN(req.headers["content-length"]);
22338
22379
  }
22339
22380
  function typeofrequest(req, types_) {
22340
- var types = types_;
22381
+ var types2 = types_;
22341
22382
  if (!hasbody(req)) {
22342
22383
  return null;
22343
22384
  }
22344
22385
  if (arguments.length > 2) {
22345
- types = new Array(arguments.length - 1);
22346
- for (var i = 0;i < types.length; i++) {
22347
- types[i] = arguments[i + 1];
22386
+ types2 = new Array(arguments.length - 1);
22387
+ for (var i = 0;i < types2.length; i++) {
22388
+ types2[i] = arguments[i + 1];
22348
22389
  }
22349
22390
  }
22350
22391
  var value = req.headers["content-type"];
22351
- return typeis(value, types);
22392
+ return typeis(value, types2);
22352
22393
  }
22353
22394
  function normalize(type) {
22354
22395
  if (typeof type !== "string") {
@@ -25390,7 +25431,7 @@ var require_browser2 = __commonJS((exports, module) => {
25390
25431
  // node_modules/finalhandler/node_modules/debug/src/node.js
25391
25432
  var require_node2 = __commonJS((exports, module) => {
25392
25433
  var tty = __require("tty");
25393
- var util2 = __require("util");
25434
+ var util3 = __require("util");
25394
25435
  exports = module.exports = require_debug2();
25395
25436
  exports.init = init;
25396
25437
  exports.log = log2;
@@ -25419,7 +25460,7 @@ var require_node2 = __commonJS((exports, module) => {
25419
25460
  }, {});
25420
25461
  var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
25421
25462
  if (fd !== 1 && fd !== 2) {
25422
- util2.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
25463
+ util3.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
25423
25464
  }
25424
25465
  var stream = fd === 1 ? process.stdout : fd === 2 ? process.stderr : createWritableStdioStream(fd);
25425
25466
  function useColors() {
@@ -25427,14 +25468,14 @@ var require_node2 = __commonJS((exports, module) => {
25427
25468
  }
25428
25469
  exports.formatters.o = function(v2) {
25429
25470
  this.inspectOpts.colors = this.useColors;
25430
- return util2.inspect(v2, this.inspectOpts).split(`
25471
+ return util3.inspect(v2, this.inspectOpts).split(`
25431
25472
  `).map(function(str) {
25432
25473
  return str.trim();
25433
25474
  }).join(" ");
25434
25475
  };
25435
25476
  exports.formatters.O = function(v2) {
25436
25477
  this.inspectOpts.colors = this.useColors;
25437
- return util2.inspect(v2, this.inspectOpts);
25478
+ return util3.inspect(v2, this.inspectOpts);
25438
25479
  };
25439
25480
  function formatArgs(args) {
25440
25481
  var name = this.namespace;
@@ -25451,7 +25492,7 @@ var require_node2 = __commonJS((exports, module) => {
25451
25492
  }
25452
25493
  }
25453
25494
  function log2() {
25454
- return stream.write(util2.format.apply(util2, arguments) + `
25495
+ return stream.write(util3.format.apply(util3, arguments) + `
25455
25496
  `);
25456
25497
  }
25457
25498
  function save(namespaces) {
@@ -26116,7 +26157,7 @@ var require_browser3 = __commonJS((exports, module) => {
26116
26157
  // node_modules/express/node_modules/debug/src/node.js
26117
26158
  var require_node3 = __commonJS((exports, module) => {
26118
26159
  var tty = __require("tty");
26119
- var util2 = __require("util");
26160
+ var util3 = __require("util");
26120
26161
  exports = module.exports = require_debug3();
26121
26162
  exports.init = init;
26122
26163
  exports.log = log2;
@@ -26145,7 +26186,7 @@ var require_node3 = __commonJS((exports, module) => {
26145
26186
  }, {});
26146
26187
  var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
26147
26188
  if (fd !== 1 && fd !== 2) {
26148
- util2.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
26189
+ util3.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
26149
26190
  }
26150
26191
  var stream = fd === 1 ? process.stdout : fd === 2 ? process.stderr : createWritableStdioStream(fd);
26151
26192
  function useColors() {
@@ -26153,14 +26194,14 @@ var require_node3 = __commonJS((exports, module) => {
26153
26194
  }
26154
26195
  exports.formatters.o = function(v2) {
26155
26196
  this.inspectOpts.colors = this.useColors;
26156
- return util2.inspect(v2, this.inspectOpts).split(`
26197
+ return util3.inspect(v2, this.inspectOpts).split(`
26157
26198
  `).map(function(str) {
26158
26199
  return str.trim();
26159
26200
  }).join(" ");
26160
26201
  };
26161
26202
  exports.formatters.O = function(v2) {
26162
26203
  this.inspectOpts.colors = this.useColors;
26163
- return util2.inspect(v2, this.inspectOpts);
26204
+ return util3.inspect(v2, this.inspectOpts);
26164
26205
  };
26165
26206
  function formatArgs(args) {
26166
26207
  var name = this.namespace;
@@ -26177,7 +26218,7 @@ var require_node3 = __commonJS((exports, module) => {
26177
26218
  }
26178
26219
  }
26179
26220
  function log2() {
26180
- return stream.write(util2.format.apply(util2, arguments) + `
26221
+ return stream.write(util3.format.apply(util3, arguments) + `
26181
26222
  `);
26182
26223
  }
26183
26224
  function save(namespaces) {
@@ -27695,7 +27736,7 @@ var require_browser4 = __commonJS((exports, module) => {
27695
27736
  // node_modules/send/node_modules/debug/src/node.js
27696
27737
  var require_node4 = __commonJS((exports, module) => {
27697
27738
  var tty = __require("tty");
27698
- var util2 = __require("util");
27739
+ var util3 = __require("util");
27699
27740
  exports = module.exports = require_debug4();
27700
27741
  exports.init = init;
27701
27742
  exports.log = log2;
@@ -27724,7 +27765,7 @@ var require_node4 = __commonJS((exports, module) => {
27724
27765
  }, {});
27725
27766
  var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
27726
27767
  if (fd !== 1 && fd !== 2) {
27727
- util2.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
27768
+ util3.deprecate(function() {}, "except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)")();
27728
27769
  }
27729
27770
  var stream = fd === 1 ? process.stdout : fd === 2 ? process.stderr : createWritableStdioStream(fd);
27730
27771
  function useColors() {
@@ -27732,14 +27773,14 @@ var require_node4 = __commonJS((exports, module) => {
27732
27773
  }
27733
27774
  exports.formatters.o = function(v2) {
27734
27775
  this.inspectOpts.colors = this.useColors;
27735
- return util2.inspect(v2, this.inspectOpts).split(`
27776
+ return util3.inspect(v2, this.inspectOpts).split(`
27736
27777
  `).map(function(str) {
27737
27778
  return str.trim();
27738
27779
  }).join(" ");
27739
27780
  };
27740
27781
  exports.formatters.O = function(v2) {
27741
27782
  this.inspectOpts.colors = this.useColors;
27742
- return util2.inspect(v2, this.inspectOpts);
27783
+ return util3.inspect(v2, this.inspectOpts);
27743
27784
  };
27744
27785
  function formatArgs(args) {
27745
27786
  var name = this.namespace;
@@ -27756,7 +27797,7 @@ var require_node4 = __commonJS((exports, module) => {
27756
27797
  }
27757
27798
  }
27758
27799
  function log2() {
27759
- return stream.write(util2.format.apply(util2, arguments) + `
27800
+ return stream.write(util3.format.apply(util3, arguments) + `
27760
27801
  `);
27761
27802
  }
27762
27803
  function save(namespaces) {
@@ -28237,7 +28278,7 @@ var require_send = __commonJS((exports, module) => {
28237
28278
  var path = __require("path");
28238
28279
  var statuses = require_statuses();
28239
28280
  var Stream = __require("stream");
28240
- var util2 = __require("util");
28281
+ var util3 = __require("util");
28241
28282
  var extname = path.extname;
28242
28283
  var join = path.join;
28243
28284
  var normalize = path.normalize;
@@ -28283,7 +28324,7 @@ var require_send = __commonJS((exports, module) => {
28283
28324
  this.from(opts.from);
28284
28325
  }
28285
28326
  }
28286
- util2.inherits(SendStream, Stream);
28327
+ util3.inherits(SendStream, Stream);
28287
28328
  SendStream.prototype.etag = deprecate.function(function etag(val) {
28288
28329
  this._etag = Boolean(val);
28289
28330
  debug("etag %s", this._etag);
@@ -29639,10 +29680,10 @@ var require_utils2 = __commonJS((exports) => {
29639
29680
  exports.normalizeType = function(type) {
29640
29681
  return ~type.indexOf("/") ? acceptParams(type) : { value: mime.lookup(type), params: {} };
29641
29682
  };
29642
- exports.normalizeTypes = function(types) {
29683
+ exports.normalizeTypes = function(types2) {
29643
29684
  var ret = [];
29644
- for (var i = 0;i < types.length; ++i) {
29645
- ret.push(exports.normalizeType(types[i]));
29685
+ for (var i = 0;i < types2.length; ++i) {
29686
+ ret.push(exports.normalizeType(types2[i]));
29646
29687
  }
29647
29688
  return ret;
29648
29689
  };
@@ -30542,23 +30583,23 @@ var require_accepts = __commonJS((exports, module) => {
30542
30583
  this.negotiator = new Negotiator(req);
30543
30584
  }
30544
30585
  Accepts.prototype.type = Accepts.prototype.types = function(types_) {
30545
- var types = types_;
30546
- if (types && !Array.isArray(types)) {
30547
- types = new Array(arguments.length);
30548
- for (var i = 0;i < types.length; i++) {
30549
- types[i] = arguments[i];
30586
+ var types2 = types_;
30587
+ if (types2 && !Array.isArray(types2)) {
30588
+ types2 = new Array(arguments.length);
30589
+ for (var i = 0;i < types2.length; i++) {
30590
+ types2[i] = arguments[i];
30550
30591
  }
30551
30592
  }
30552
- if (!types || types.length === 0) {
30593
+ if (!types2 || types2.length === 0) {
30553
30594
  return this.negotiator.mediaTypes();
30554
30595
  }
30555
30596
  if (!this.headers.accept) {
30556
- return types[0];
30597
+ return types2[0];
30557
30598
  }
30558
- var mimes = types.map(extToMime);
30599
+ var mimes = types2.map(extToMime);
30559
30600
  var accepts = this.negotiator.mediaTypes(mimes.filter(validMime));
30560
30601
  var first = accepts[0];
30561
- return first ? types[mimes.indexOf(first)] : false;
30602
+ return first ? types2[mimes.indexOf(first)] : false;
30562
30603
  };
30563
30604
  Accepts.prototype.encoding = Accepts.prototype.encodings = function(encodings_) {
30564
30605
  var encodings = encodings_;
@@ -30682,9 +30723,9 @@ var require_request = __commonJS((exports, module) => {
30682
30723
  return query[name];
30683
30724
  return defaultValue;
30684
30725
  };
30685
- req.is = function is(types) {
30686
- var arr = types;
30687
- if (!Array.isArray(types)) {
30726
+ req.is = function is(types2) {
30727
+ var arr = types2;
30728
+ if (!Array.isArray(types2)) {
30688
30729
  arr = new Array(arguments.length);
30689
30730
  for (var i = 0;i < arr.length; i++) {
30690
30731
  arr[i] = arguments[i];
@@ -32098,14 +32139,14 @@ function mergeCapabilities(base, additional) {
32098
32139
  }
32099
32140
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 60000;
32100
32141
  var init_protocol = __esm(() => {
32101
- init_types();
32142
+ init_types2();
32102
32143
  });
32103
32144
 
32104
32145
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
32105
32146
  var Server;
32106
32147
  var init_server = __esm(() => {
32107
32148
  init_protocol();
32108
- init_types();
32149
+ init_types2();
32109
32150
  Server = class Server extends Protocol {
32110
32151
  constructor(_serverInfo, options) {
32111
32152
  var _a;
@@ -32361,7 +32402,7 @@ function parseArrayDef(def, refs) {
32361
32402
  return res;
32362
32403
  }
32363
32404
  var init_array = __esm(() => {
32364
- init_lib();
32405
+ init_zod();
32365
32406
  init_parseDef();
32366
32407
  });
32367
32408
 
@@ -32924,7 +32965,7 @@ function parseRecordDef(def, refs) {
32924
32965
  return schema;
32925
32966
  }
32926
32967
  var init_record = __esm(() => {
32927
- init_lib();
32968
+ init_zod();
32928
32969
  init_parseDef();
32929
32970
  init_string();
32930
32971
  init_branded();
@@ -32996,15 +33037,15 @@ function parseUnionDef(def, refs) {
32996
33037
  return asAnyOf(def, refs);
32997
33038
  const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
32998
33039
  if (options.every((x2) => (x2._def.typeName in primitiveMappings) && (!x2._def.checks || !x2._def.checks.length))) {
32999
- const types = options.reduce((types2, x2) => {
33040
+ const types2 = options.reduce((types3, x2) => {
33000
33041
  const type = primitiveMappings[x2._def.typeName];
33001
- return type && !types2.includes(type) ? [...types2, type] : types2;
33042
+ return type && !types3.includes(type) ? [...types3, type] : types3;
33002
33043
  }, []);
33003
33044
  return {
33004
- type: types.length > 1 ? types : types[0]
33045
+ type: types2.length > 1 ? types2 : types2[0]
33005
33046
  };
33006
33047
  } else if (options.every((x2) => x2._def.typeName === "ZodLiteral" && !x2.description)) {
33007
- const types = options.reduce((acc, x2) => {
33048
+ const types2 = options.reduce((acc, x2) => {
33008
33049
  const type = typeof x2._def.value;
33009
33050
  switch (type) {
33010
33051
  case "string":
@@ -33023,8 +33064,8 @@ function parseUnionDef(def, refs) {
33023
33064
  return acc;
33024
33065
  }
33025
33066
  }, []);
33026
- if (types.length === options.length) {
33027
- const uniqueTypes = types.filter((x2, i, a) => a.indexOf(x2) === i);
33067
+ if (types2.length === options.length) {
33068
+ const uniqueTypes = types2.filter((x2, i, a) => a.indexOf(x2) === i);
33028
33069
  return {
33029
33070
  type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
33030
33071
  enum: options.reduce((acc, x2) => {
@@ -33217,7 +33258,7 @@ function safeIsOptional(schema) {
33217
33258
  }
33218
33259
  }
33219
33260
  var init_object = __esm(() => {
33220
- init_lib();
33261
+ init_zod();
33221
33262
  init_parseDef();
33222
33263
  });
33223
33264
 
@@ -33426,7 +33467,7 @@ var selectParser = (def, typeName, refs) => {
33426
33467
  }
33427
33468
  };
33428
33469
  var init_selectParser = __esm(() => {
33429
- init_lib();
33470
+ init_zod();
33430
33471
  init_array();
33431
33472
  init_bigint();
33432
33473
  init_branded();
@@ -33626,7 +33667,7 @@ function processCreateParams2(params) {
33626
33667
  }
33627
33668
  var McpZodTypeKind, Completable;
33628
33669
  var init_completable = __esm(() => {
33629
- init_lib();
33670
+ init_zod();
33630
33671
  (function(McpZodTypeKind2) {
33631
33672
  McpZodTypeKind2["Completable"] = "McpCompletable";
33632
33673
  })(McpZodTypeKind || (McpZodTypeKind = {}));
@@ -33921,7 +33962,7 @@ class McpServer {
33921
33962
  const cb = rest[0];
33922
33963
  this._registeredTools[name] = {
33923
33964
  description,
33924
- inputSchema: paramsSchema === undefined ? undefined : z2.object(paramsSchema),
33965
+ inputSchema: paramsSchema === undefined ? undefined : exports_external.object(paramsSchema),
33925
33966
  callback: cb
33926
33967
  };
33927
33968
  this.setToolRequestHandlers();
@@ -33941,7 +33982,7 @@ class McpServer {
33941
33982
  const cb = rest[0];
33942
33983
  this._registeredPrompts[name] = {
33943
33984
  description,
33944
- argsSchema: argsSchema === undefined ? undefined : z2.object(argsSchema),
33985
+ argsSchema: argsSchema === undefined ? undefined : exports_external.object(argsSchema),
33945
33986
  callback: cb
33946
33987
  };
33947
33988
  this.setPromptRequestHandlers();
@@ -33967,8 +34008,8 @@ var EMPTY_OBJECT_JSON_SCHEMA, EMPTY_COMPLETION_RESULT;
33967
34008
  var init_mcp = __esm(() => {
33968
34009
  init_server();
33969
34010
  init_esm();
33970
- init_lib();
33971
- init_types();
34011
+ init_zod();
34012
+ init_types2();
33972
34013
  init_completable();
33973
34014
  EMPTY_OBJECT_JSON_SCHEMA = {
33974
34015
  type: "object"
@@ -34121,14 +34162,14 @@ function stringToBase64(str) {
34121
34162
  }
34122
34163
  var zodOutbound, zodInbound;
34123
34164
  var init_base64 = __esm(() => {
34124
- init_lib();
34165
+ init_v3();
34125
34166
  zodOutbound = instanceOfType(Uint8Array).or(stringType().transform(stringToBytes));
34126
34167
  zodInbound = instanceOfType(Uint8Array).or(stringType().transform(bytesFromBase64));
34127
34168
  });
34128
34169
 
34129
34170
  // src/lib/url.ts
34130
34171
  function pathToFunc(pathPattern, options) {
34131
- const paramRE = /\{([a-zA-Z0-9_]+?)\}/g;
34172
+ const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
34132
34173
  return function buildURLPath(params = {}) {
34133
34174
  return pathPattern.replace(paramRE, function(_2, placeholder) {
34134
34175
  if (!hasOwn.call(params, placeholder)) {
@@ -34172,9 +34213,9 @@ var init_config = __esm(() => {
34172
34213
  SDK_METADATA = {
34173
34214
  language: "typescript",
34174
34215
  openapiDocVersion: "1.0.0",
34175
- sdkVersion: "0.2.0",
34176
- genVersion: "2.578.0",
34177
- userAgent: "speakeasy-sdk/typescript 0.2.0 2.578.0 1.0.0 vanta-auditor-api-sdk"
34216
+ sdkVersion: "0.4.0",
34217
+ genVersion: "2.737.0",
34218
+ userAgent: "speakeasy-sdk/typescript 0.4.0 2.737.0 1.0.0 vanta-auditor-api-sdk"
34178
34219
  };
34179
34220
  });
34180
34221
 
@@ -34406,16 +34447,28 @@ function dlv(obj, key, def, p, undef) {
34406
34447
  }
34407
34448
 
34408
34449
  // src/lib/env.ts
34450
+ function isDeno() {
34451
+ if ("Deno" in globalThis) {
34452
+ return true;
34453
+ }
34454
+ return false;
34455
+ }
34409
34456
  function env() {
34410
34457
  if (envMemo) {
34411
34458
  return envMemo;
34412
34459
  }
34413
- envMemo = envSchema.parse(dlv(globalThis, "process.env") ?? dlv(globalThis, "Deno.env") ?? {});
34460
+ let envObject = {};
34461
+ if (isDeno()) {
34462
+ envObject = globalThis.Deno?.env?.toObject?.() ?? {};
34463
+ } else {
34464
+ envObject = dlv(globalThis, "process.env") ?? {};
34465
+ }
34466
+ envMemo = envSchema.parse(envObject);
34414
34467
  return envMemo;
34415
34468
  }
34416
34469
  var envSchema, envMemo = undefined;
34417
34470
  var init_env = __esm(() => {
34418
- init_lib();
34471
+ init_v3();
34419
34472
  envSchema = objectType({
34420
34473
  VANTA_BEARER_AUTH: stringType().optional(),
34421
34474
  VANTA_DEBUG: coerce.boolean().optional()
@@ -34739,7 +34792,6 @@ class ClientSDK {
34739
34792
  } else {
34740
34793
  this.#hooks = new SDKHooks;
34741
34794
  }
34742
- this._options = { ...options, hooks: this.#hooks };
34743
34795
  const url = serverURLFromOptions(options);
34744
34796
  if (url) {
34745
34797
  url.pathname = url.pathname.replace(/\/+$/, "") + "/";
@@ -34750,7 +34802,8 @@ class ClientSDK {
34750
34802
  });
34751
34803
  this._baseURL = baseURL;
34752
34804
  this.#httpClient = client;
34753
- this.#logger = options.debugLogger;
34805
+ this._options = { ...options, hooks: this.#hooks };
34806
+ this.#logger = this._options.debugLogger;
34754
34807
  if (!this.#logger && env().VANTA_DEBUG) {
34755
34808
  this.#logger = console;
34756
34809
  }
@@ -34799,26 +34852,22 @@ class ClientSDK {
34799
34852
  }
34800
34853
  cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
34801
34854
  headers.set("cookie", cookie);
34802
- const userHeaders = new Headers(options?.fetchOptions?.headers);
34855
+ const userHeaders = new Headers(options?.headers ?? options?.fetchOptions?.headers);
34803
34856
  for (const [k2, v2] of userHeaders) {
34804
34857
  headers.set(k2, v2);
34805
34858
  }
34806
34859
  if (!isBrowserLike) {
34807
- headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
34860
+ headers.set(conf.uaHeader ?? "user-agent", conf.userAgent ?? SDK_METADATA.userAgent);
34808
34861
  }
34809
- let fetchOptions = options?.fetchOptions;
34862
+ const fetchOptions = {
34863
+ ...options?.fetchOptions,
34864
+ ...options
34865
+ };
34810
34866
  if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
34811
34867
  const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
34812
- if (!fetchOptions) {
34813
- fetchOptions = { signal: timeoutSignal };
34814
- } else {
34815
- fetchOptions.signal = timeoutSignal;
34816
- }
34868
+ fetchOptions.signal = timeoutSignal;
34817
34869
  }
34818
34870
  if (conf.body instanceof ReadableStream) {
34819
- if (!fetchOptions) {
34820
- fetchOptions = {};
34821
- }
34822
34871
  Object.assign(fetchOptions, { duplex: "half" });
34823
34872
  }
34824
34873
  let input;
@@ -35048,7 +35097,7 @@ async function valueToBase64(value) {
35048
35097
  }
35049
35098
  var base64Schema;
35050
35099
  var init_shared = __esm(() => {
35051
- init_lib();
35100
+ init_v3();
35052
35101
  init_base64();
35053
35102
  base64Schema = stringType().base64();
35054
35103
  });
@@ -35157,24 +35206,53 @@ var init_tools = __esm(() => {
35157
35206
  init_shared();
35158
35207
  });
35159
35208
 
35209
+ // src/models/errors/vantaerror.ts
35210
+ var VantaError;
35211
+ var init_vantaerror = __esm(() => {
35212
+ VantaError = class VantaError extends Error {
35213
+ statusCode;
35214
+ body;
35215
+ headers;
35216
+ contentType;
35217
+ rawResponse;
35218
+ constructor(message, httpMeta) {
35219
+ super(message);
35220
+ this.statusCode = httpMeta.response.status;
35221
+ this.body = httpMeta.body;
35222
+ this.headers = httpMeta.response.headers;
35223
+ this.contentType = httpMeta.response.headers.get("content-type") || "";
35224
+ this.rawResponse = httpMeta.response;
35225
+ this.name = "VantaError";
35226
+ }
35227
+ };
35228
+ });
35229
+
35160
35230
  // src/models/errors/apierror.ts
35161
35231
  var APIError;
35162
35232
  var init_apierror = __esm(() => {
35163
- APIError = class APIError extends Error {
35164
- rawResponse;
35165
- body;
35166
- statusCode;
35167
- contentType;
35168
- constructor(message, rawResponse, body = "") {
35169
- const statusCode = rawResponse.status;
35170
- const contentType2 = rawResponse.headers.get("content-type") || "";
35171
- const bodyString = body.length > 0 ? `
35172
- ${body}` : "";
35173
- super(`${message}: Status ${statusCode} Content-Type ${contentType2} Body ${bodyString}`);
35174
- this.rawResponse = rawResponse;
35175
- this.body = body;
35176
- this.statusCode = statusCode;
35177
- this.contentType = contentType2;
35233
+ init_vantaerror();
35234
+ APIError = class APIError extends VantaError {
35235
+ constructor(message, httpMeta) {
35236
+ if (message) {
35237
+ message += `: `;
35238
+ }
35239
+ message += `Status ${httpMeta.response.status}`;
35240
+ const contentType2 = httpMeta.response.headers.get("content-type") || `""`;
35241
+ if (contentType2 !== "application/json") {
35242
+ message += ` Content-Type ${contentType2.includes(" ") ? `"${contentType2}"` : contentType2}`;
35243
+ }
35244
+ const body = httpMeta.body || `""`;
35245
+ message += body.length > 100 ? `
35246
+ ` : ". ";
35247
+ let bodyDisplay = body;
35248
+ if (body.length > 1e4) {
35249
+ const truncated = body.substring(0, 1e4);
35250
+ const remaining = body.length - 1e4;
35251
+ bodyDisplay = `${truncated}...and ${remaining} more chars`;
35252
+ }
35253
+ message += `Body: ${bodyDisplay}`;
35254
+ message = message.trim();
35255
+ super(message, httpMeta);
35178
35256
  this.name = "APIError";
35179
35257
  }
35180
35258
  };
@@ -35234,10 +35312,23 @@ ${pre}${str}`;
35234
35312
  }
35235
35313
  var SDKValidationError;
35236
35314
  var init_sdkvalidationerror = __esm(() => {
35237
- init_lib();
35315
+ init_v3();
35238
35316
  SDKValidationError = class SDKValidationError extends Error {
35239
35317
  rawValue;
35240
35318
  rawMessage;
35319
+ static [Symbol.hasInstance](instance) {
35320
+ if (!(instance instanceof Error))
35321
+ return false;
35322
+ if (!("rawValue" in instance))
35323
+ return false;
35324
+ if (!("rawMessage" in instance))
35325
+ return false;
35326
+ if (!("pretty" in instance))
35327
+ return false;
35328
+ if (typeof instance.pretty !== "function")
35329
+ return false;
35330
+ return true;
35331
+ }
35241
35332
  constructor(message, cause, rawValue) {
35242
35333
  super(`${message}: ${cause}`);
35243
35334
  this.name = "SDKValidationError";
@@ -35256,16 +35347,31 @@ ${formatZodError(this.cause)}`;
35256
35347
  };
35257
35348
  });
35258
35349
 
35259
- // src/lib/schemas.ts
35260
- function safeParse(rawValue, fn, errorMessage) {
35261
- try {
35262
- return OK2(fn(rawValue));
35263
- } catch (err) {
35264
- return ERR(new SDKValidationError(errorMessage, err, rawValue));
35265
- }
35266
- }
35267
- var init_schemas = __esm(() => {
35350
+ // src/models/errors/responsevalidationerror.ts
35351
+ var ResponseValidationError;
35352
+ var init_responsevalidationerror = __esm(() => {
35353
+ init_v3();
35268
35354
  init_sdkvalidationerror();
35355
+ init_vantaerror();
35356
+ ResponseValidationError = class ResponseValidationError extends VantaError {
35357
+ rawValue;
35358
+ rawMessage;
35359
+ constructor(message, extra) {
35360
+ super(message, extra);
35361
+ this.name = "ResponseValidationError";
35362
+ this.cause = extra.cause;
35363
+ this.rawValue = extra.rawValue;
35364
+ this.rawMessage = extra.rawMessage;
35365
+ }
35366
+ pretty() {
35367
+ if (this.cause instanceof ZodError) {
35368
+ return `${this.rawMessage}
35369
+ ${formatZodError(this.cause)}`;
35370
+ } else {
35371
+ return this.toString();
35372
+ }
35373
+ }
35374
+ };
35269
35375
  });
35270
35376
 
35271
35377
  // src/lib/matchers.ts
@@ -35276,7 +35382,7 @@ function fail(codes) {
35276
35382
  return { enc: "fail", codes };
35277
35383
  }
35278
35384
  function match(...matchers) {
35279
- return async function matchFunc(response, options) {
35385
+ return async function matchFunc(response, request, options) {
35280
35386
  let raw;
35281
35387
  let matcher;
35282
35388
  for (const match2 of matchers) {
@@ -35291,16 +35397,21 @@ function match(...matchers) {
35291
35397
  }
35292
35398
  }
35293
35399
  if (!matcher) {
35294
- const responseBody = await response.text();
35295
35400
  return [{
35296
35401
  ok: false,
35297
- error: new APIError("Unexpected API response status or content-type", response, responseBody)
35298
- }, responseBody];
35402
+ error: new APIError("Unexpected Status or Content-Type", {
35403
+ response,
35404
+ request,
35405
+ body: await response.text().catch(() => "")
35406
+ })
35407
+ }, raw];
35299
35408
  }
35300
35409
  const encoding = matcher.enc;
35410
+ let body = "";
35301
35411
  switch (encoding) {
35302
35412
  case "json":
35303
- raw = await response.json();
35413
+ body = await response.text();
35414
+ raw = JSON.parse(body);
35304
35415
  break;
35305
35416
  case "jsonl":
35306
35417
  raw = response.body;
@@ -35312,16 +35423,19 @@ function match(...matchers) {
35312
35423
  raw = response.body;
35313
35424
  break;
35314
35425
  case "text":
35315
- raw = await response.text();
35426
+ body = await response.text();
35427
+ raw = body;
35316
35428
  break;
35317
35429
  case "sse":
35318
35430
  raw = response.body;
35319
35431
  break;
35320
35432
  case "nil":
35321
- raw = await discardResponseBody(response);
35433
+ body = await response.text();
35434
+ raw = undefined;
35322
35435
  break;
35323
35436
  case "fail":
35324
- raw = await response.text();
35437
+ body = await response.text();
35438
+ raw = body;
35325
35439
  break;
35326
35440
  default:
35327
35441
  throw new Error(`Unsupported response type: ${encoding}`);
@@ -35329,7 +35443,7 @@ function match(...matchers) {
35329
35443
  if (matcher.enc === "fail") {
35330
35444
  return [{
35331
35445
  ok: false,
35332
- error: new APIError("API error occurred", response, typeof raw === "string" ? raw : "")
35446
+ error: new APIError("API error occurred", { request, response, body })
35333
35447
  }, raw];
35334
35448
  }
35335
35449
  const resultKey = matcher.key || options?.resultKey;
@@ -35338,7 +35452,10 @@ function match(...matchers) {
35338
35452
  data = {
35339
35453
  ...options?.extraFields,
35340
35454
  ...matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null,
35341
- ...isPlainObject(raw) ? raw : null
35455
+ ...isPlainObject(raw) ? raw : null,
35456
+ request$: request,
35457
+ response$: response,
35458
+ body$: body
35342
35459
  };
35343
35460
  } else if (resultKey) {
35344
35461
  data = {
@@ -35356,11 +35473,11 @@ function match(...matchers) {
35356
35473
  data = raw;
35357
35474
  }
35358
35475
  if ("err" in matcher) {
35359
- const result = safeParse(data, (v2) => matcher.schema.parse(v2), "Response validation failed");
35476
+ const result = safeParseResponse(data, (v2) => matcher.schema.parse(v2), "Response validation failed", { request, response, body });
35360
35477
  return [result.ok ? { ok: false, error: result.value } : result, raw];
35361
35478
  } else {
35362
35479
  return [
35363
- safeParse(data, (v2) => matcher.schema.parse(v2), "Response validation failed"),
35480
+ safeParseResponse(data, (v2) => matcher.schema.parse(v2), "Response validation failed", { request, response, body }),
35364
35481
  raw
35365
35482
  ];
35366
35483
  }
@@ -35373,26 +35490,23 @@ function unpackHeaders(headers) {
35373
35490
  }
35374
35491
  return out;
35375
35492
  }
35376
- async function discardResponseBody(res) {
35377
- const reader = res.body?.getReader();
35378
- if (reader == null) {
35379
- return;
35380
- }
35493
+ function safeParseResponse(rawValue, fn, errorMessage, httpMeta) {
35381
35494
  try {
35382
- let done = false;
35383
- while (!done) {
35384
- const res2 = await reader.read();
35385
- done = res2.done;
35386
- }
35387
- } finally {
35388
- reader.releaseLock();
35495
+ return OK2(fn(rawValue));
35496
+ } catch (err) {
35497
+ return ERR(new ResponseValidationError(errorMessage, {
35498
+ cause: err,
35499
+ rawValue,
35500
+ rawMessage: errorMessage,
35501
+ ...httpMeta
35502
+ }));
35389
35503
  }
35390
35504
  }
35391
35505
  var DEFAULT_CONTENT_TYPES, headerValRE;
35392
35506
  var init_matchers = __esm(() => {
35393
35507
  init_apierror();
35508
+ init_responsevalidationerror();
35394
35509
  init_http();
35395
- init_schemas();
35396
35510
  DEFAULT_CONTENT_TYPES = {
35397
35511
  jsonl: "application/jsonl",
35398
35512
  json: "application/json",
@@ -35433,6 +35547,18 @@ function compactMap(values) {
35433
35547
  }
35434
35548
  var init_primitives = () => {};
35435
35549
 
35550
+ // src/lib/schemas.ts
35551
+ function safeParse(rawValue, fn, errorMessage) {
35552
+ try {
35553
+ return OK2(fn(rawValue));
35554
+ } catch (err) {
35555
+ return ERR(new SDKValidationError(errorMessage, err, rawValue));
35556
+ }
35557
+ }
35558
+ var init_schemas = __esm(() => {
35559
+ init_sdkvalidationerror();
35560
+ });
35561
+
35436
35562
  // src/lib/security.ts
35437
35563
  function resolveSecurity(...options) {
35438
35564
  const state = {
@@ -35562,7 +35688,7 @@ var init_security = __esm(() => {
35562
35688
  // src/models/components/addauditorinput.ts
35563
35689
  var AddAuditorInput$inboundSchema, AddAuditorInput$outboundSchema, AddAuditorInput$;
35564
35690
  var init_addauditorinput = __esm(() => {
35565
- init_lib();
35691
+ init_v3();
35566
35692
  AddAuditorInput$inboundSchema = objectType({
35567
35693
  email: stringType(),
35568
35694
  givenName: stringType(),
@@ -35582,7 +35708,7 @@ var init_addauditorinput = __esm(() => {
35582
35708
  // src/models/components/addcommentinput.ts
35583
35709
  var AddCommentInput$inboundSchema, AddCommentInput$outboundSchema, AddCommentInput$;
35584
35710
  var init_addcommentinput = __esm(() => {
35585
- init_lib();
35711
+ init_v3();
35586
35712
  AddCommentInput$inboundSchema = objectType({
35587
35713
  text: stringType(),
35588
35714
  email: stringType(),
@@ -35599,10 +35725,27 @@ var init_addcommentinput = __esm(() => {
35599
35725
  })(AddCommentInput$ ||= {});
35600
35726
  });
35601
35727
 
35728
+ // src/models/components/auditfocus.ts
35729
+ var AuditFocus, AuditFocus$inboundSchema, AuditFocus$outboundSchema, AuditFocus$;
35730
+ var init_auditfocus = __esm(() => {
35731
+ init_v3();
35732
+ AuditFocus = {
35733
+ External: "EXTERNAL",
35734
+ Internal: "INTERNAL"
35735
+ };
35736
+ AuditFocus$inboundSchema = nativeEnumType(AuditFocus);
35737
+ AuditFocus$outboundSchema = AuditFocus$inboundSchema;
35738
+ ((AuditFocus$) => {
35739
+ AuditFocus$.inboundSchema = AuditFocus$inboundSchema;
35740
+ AuditFocus$.outboundSchema = AuditFocus$outboundSchema;
35741
+ })(AuditFocus$ ||= {});
35742
+ });
35743
+
35602
35744
  // src/models/components/audit.ts
35603
35745
  var Audit$inboundSchema, Audit$outboundSchema, Audit$;
35604
35746
  var init_audit = __esm(() => {
35605
- init_lib();
35747
+ init_v3();
35748
+ init_auditfocus();
35606
35749
  Audit$inboundSchema = objectType({
35607
35750
  id: stringType(),
35608
35751
  customerOrganizationName: stringType(),
@@ -35610,14 +35753,15 @@ var init_audit = __esm(() => {
35610
35753
  customerOrganizationId: stringType(),
35611
35754
  auditStartDate: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
35612
35755
  auditEndDate: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
35613
- earlyAccessStartsDate: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35756
+ earlyAccessStartsAt: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35614
35757
  framework: stringType(),
35615
35758
  allowAuditorEmails: arrayType(stringType()),
35616
35759
  allowAllAuditors: booleanType(),
35617
35760
  deletionDate: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35618
35761
  creationDate: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)),
35619
35762
  modificationDate: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35620
- completionDate: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2)))
35763
+ completionDate: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))),
35764
+ auditFocus: AuditFocus$inboundSchema
35621
35765
  });
35622
35766
  Audit$outboundSchema = objectType({
35623
35767
  id: stringType(),
@@ -35626,14 +35770,15 @@ var init_audit = __esm(() => {
35626
35770
  customerOrganizationId: stringType(),
35627
35771
  auditStartDate: dateType().transform((v2) => v2.toISOString()),
35628
35772
  auditEndDate: dateType().transform((v2) => v2.toISOString()),
35629
- earlyAccessStartsDate: nullableType(dateType().transform((v2) => v2.toISOString())),
35773
+ earlyAccessStartsAt: nullableType(dateType().transform((v2) => v2.toISOString())),
35630
35774
  framework: stringType(),
35631
35775
  allowAuditorEmails: arrayType(stringType()),
35632
35776
  allowAllAuditors: booleanType(),
35633
35777
  deletionDate: nullableType(dateType().transform((v2) => v2.toISOString())),
35634
35778
  creationDate: dateType().transform((v2) => v2.toISOString()),
35635
35779
  modificationDate: nullableType(dateType().transform((v2) => v2.toISOString())),
35636
- completionDate: nullableType(dateType().transform((v2) => v2.toISOString()))
35780
+ completionDate: nullableType(dateType().transform((v2) => v2.toISOString())),
35781
+ auditFocus: AuditFocus$outboundSchema
35637
35782
  });
35638
35783
  ((Audit$) => {
35639
35784
  Audit$.inboundSchema = Audit$inboundSchema;
@@ -35644,7 +35789,7 @@ var init_audit = __esm(() => {
35644
35789
  // src/models/components/auditevidencestate.ts
35645
35790
  var AuditEvidenceState, AuditEvidenceState$inboundSchema, AuditEvidenceState$outboundSchema, AuditEvidenceState$;
35646
35791
  var init_auditevidencestate = __esm(() => {
35647
- init_lib();
35792
+ init_v3();
35648
35793
  AuditEvidenceState = {
35649
35794
  Accepted: "Accepted",
35650
35795
  Flagged: "Flagged",
@@ -35664,7 +35809,7 @@ var init_auditevidencestate = __esm(() => {
35664
35809
  // src/models/components/auditevidencetype.ts
35665
35810
  var AuditEvidenceType, AuditEvidenceType$inboundSchema, AuditEvidenceType$outboundSchema, AuditEvidenceType$;
35666
35811
  var init_auditevidencetype = __esm(() => {
35667
- init_lib();
35812
+ init_v3();
35668
35813
  AuditEvidenceType = {
35669
35814
  EvidenceRequest: "Evidence Request",
35670
35815
  Policy: "Policy",
@@ -35681,7 +35826,7 @@ var init_auditevidencetype = __esm(() => {
35681
35826
  // src/models/components/auditorenabledstatetransition.ts
35682
35827
  var AuditorEnabledStateTransition, AuditorEnabledStateTransition$inboundSchema, AuditorEnabledStateTransition$outboundSchema, AuditorEnabledStateTransition$;
35683
35828
  var init_auditorenabledstatetransition = __esm(() => {
35684
- init_lib();
35829
+ init_v3();
35685
35830
  AuditorEnabledStateTransition = {
35686
35831
  Accept: "ACCEPT",
35687
35832
  MarkApplicable: "MARK_APPLICABLE",
@@ -35700,7 +35845,7 @@ var init_auditorenabledstatetransition = __esm(() => {
35700
35845
  // src/models/components/auditevidenceupdateinput.ts
35701
35846
  var StatusUpdate$inboundSchema, StatusUpdate$outboundSchema, StatusUpdate$, AuditEvidenceUpdateInput$inboundSchema, AuditEvidenceUpdateInput$outboundSchema, AuditEvidenceUpdateInput$;
35702
35847
  var init_auditevidenceupdateinput = __esm(() => {
35703
- init_lib();
35848
+ init_v3();
35704
35849
  init_auditorenabledstatetransition();
35705
35850
  StatusUpdate$inboundSchema = objectType({
35706
35851
  auditorEmail: stringType(),
@@ -35729,7 +35874,7 @@ var init_auditevidenceupdateinput = __esm(() => {
35729
35874
  // src/models/components/auditor.ts
35730
35875
  var Auditor$inboundSchema, Auditor$outboundSchema, Auditor$;
35731
35876
  var init_auditor = __esm(() => {
35732
- init_lib();
35877
+ init_v3();
35733
35878
  Auditor$inboundSchema = objectType({
35734
35879
  id: stringType(),
35735
35880
  organizationId: stringType(),
@@ -35753,7 +35898,7 @@ var init_auditor = __esm(() => {
35753
35898
  // src/models/components/controlsource.ts
35754
35899
  var ControlSource, ControlSource$inboundSchema, ControlSource$outboundSchema, ControlSource$;
35755
35900
  var init_controlsource = __esm(() => {
35756
- init_lib();
35901
+ init_v3();
35757
35902
  ControlSource = {
35758
35903
  Vanta: "Vanta",
35759
35904
  Custom: "Custom"
@@ -35769,7 +35914,7 @@ var init_controlsource = __esm(() => {
35769
35914
  // src/models/components/customfield.ts
35770
35915
  var Value$inboundSchema, Value$outboundSchema, Value$, CustomField$inboundSchema, CustomField$outboundSchema, CustomField$;
35771
35916
  var init_customfield = __esm(() => {
35772
- init_lib();
35917
+ init_v3();
35773
35918
  Value$inboundSchema = unionType([stringType(), arrayType(stringType())]);
35774
35919
  Value$outboundSchema = unionType([stringType(), arrayType(stringType())]);
35775
35920
  ((Value$) => {
@@ -35793,7 +35938,7 @@ var init_customfield = __esm(() => {
35793
35938
  // src/models/components/section.ts
35794
35939
  var Section$inboundSchema, Section$outboundSchema, Section$;
35795
35940
  var init_section = __esm(() => {
35796
- init_lib();
35941
+ init_v3();
35797
35942
  Section$inboundSchema = objectType({
35798
35943
  name: stringType(),
35799
35944
  framework: stringType()
@@ -35811,7 +35956,7 @@ var init_section = __esm(() => {
35811
35956
  // src/models/components/auditorcontrol.ts
35812
35957
  var Owner$inboundSchema, Owner$outboundSchema, Owner$, AuditorControl$inboundSchema, AuditorControl$outboundSchema, AuditorControl$;
35813
35958
  var init_auditorcontrol = __esm(() => {
35814
- init_lib();
35959
+ init_v3();
35815
35960
  init_controlsource();
35816
35961
  init_customfield();
35817
35962
  init_section();
@@ -35864,7 +36009,7 @@ var init_auditorcontrol = __esm(() => {
35864
36009
  // src/models/components/comment.ts
35865
36010
  var Comment$inboundSchema, Comment$outboundSchema, Comment$;
35866
36011
  var init_comment = __esm(() => {
35867
- init_lib();
36012
+ init_v3();
35868
36013
  Comment$inboundSchema = objectType({
35869
36014
  id: stringType(),
35870
36015
  auditEvidenceId: stringType(),
@@ -35892,7 +36037,7 @@ var init_comment = __esm(() => {
35892
36037
  // src/models/components/control.ts
35893
36038
  var ControlOwner$inboundSchema, ControlOwner$outboundSchema, ControlOwner$, Control$inboundSchema, Control$outboundSchema, Control$;
35894
36039
  var init_control = __esm(() => {
35895
- init_lib();
36040
+ init_v3();
35896
36041
  init_controlsource();
35897
36042
  init_customfield();
35898
36043
  ControlOwner$inboundSchema = objectType({
@@ -35940,7 +36085,7 @@ var init_control = __esm(() => {
35940
36085
  // src/models/components/controldomain.ts
35941
36086
  var ControlDomain, ControlDomain$inboundSchema, ControlDomain$outboundSchema, ControlDomain$;
35942
36087
  var init_controldomain = __esm(() => {
35943
- init_lib();
36088
+ init_v3();
35944
36089
  ControlDomain = {
35945
36090
  ARTIFICIALAndAUTONOMOUSTECHNOLOGY: "ARTIFICIAL_&_AUTONOMOUS_TECHNOLOGY",
35946
36091
  AssetManagement: "ASSET_MANAGEMENT",
@@ -35992,7 +36137,7 @@ var init_controldomain = __esm(() => {
35992
36137
  // src/models/components/frameworkid.ts
35993
36138
  var FrameworkId, FrameworkId$inboundSchema, FrameworkId$outboundSchema, FrameworkId$;
35994
36139
  var init_frameworkid = __esm(() => {
35995
- init_lib();
36140
+ init_v3();
35996
36141
  FrameworkId = {
35997
36142
  AuE8: "AU_E_8",
35998
36143
  AwsFtr: "AWS_FTR",
@@ -36041,7 +36186,7 @@ var init_frameworkid = __esm(() => {
36041
36186
  // src/models/components/frameworksection.ts
36042
36187
  var FrameworkSectionFrameworkId$inboundSchema, FrameworkSectionFrameworkId$outboundSchema, FrameworkSectionFrameworkId$, FrameworkSection$inboundSchema, FrameworkSection$outboundSchema, FrameworkSection$;
36043
36188
  var init_frameworksection = __esm(() => {
36044
- init_lib();
36189
+ init_v3();
36045
36190
  init_frameworkid();
36046
36191
  FrameworkSectionFrameworkId$inboundSchema = unionType([FrameworkId$inboundSchema, stringType()]);
36047
36192
  FrameworkSectionFrameworkId$outboundSchema = unionType([FrameworkId$outboundSchema, stringType()]);
@@ -36066,7 +36211,7 @@ var init_frameworksection = __esm(() => {
36066
36211
  // src/models/components/createcustomcontrolinput.ts
36067
36212
  var Role, Role$inboundSchema, Role$outboundSchema, Role$, CreateCustomControlInput$inboundSchema, CreateCustomControlInput$outboundSchema, CreateCustomControlInput$;
36068
36213
  var init_createcustomcontrolinput = __esm(() => {
36069
- init_lib();
36214
+ init_v3();
36070
36215
  init_controldomain();
36071
36216
  init_frameworksection();
36072
36217
  Role = {
@@ -36107,7 +36252,7 @@ var init_createcustomcontrolinput = __esm(() => {
36107
36252
  // src/models/components/recurrenceduration.ts
36108
36253
  var RecurrenceDuration, RecurrenceDuration$inboundSchema, RecurrenceDuration$outboundSchema, RecurrenceDuration$;
36109
36254
  var init_recurrenceduration = __esm(() => {
36110
- init_lib();
36255
+ init_v3();
36111
36256
  RecurrenceDuration = {
36112
36257
  P0D: "P0D",
36113
36258
  P1D: "P1D",
@@ -36128,7 +36273,7 @@ var init_recurrenceduration = __esm(() => {
36128
36273
  // src/models/components/createcustomevidencerequestinput.ts
36129
36274
  var CreateCustomEvidenceRequestInput$inboundSchema, CreateCustomEvidenceRequestInput$outboundSchema, CreateCustomEvidenceRequestInput$;
36130
36275
  var init_createcustomevidencerequestinput = __esm(() => {
36131
- init_lib();
36276
+ init_v3();
36132
36277
  init_recurrenceduration();
36133
36278
  CreateCustomEvidenceRequestInput$inboundSchema = objectType({
36134
36279
  controlIds: arrayType(stringType()),
@@ -36157,7 +36302,7 @@ var init_createcustomevidencerequestinput = __esm(() => {
36157
36302
  // src/models/components/customevidencerequest.ts
36158
36303
  var CustomEvidenceRequest$inboundSchema, CustomEvidenceRequest$outboundSchema, CustomEvidenceRequest$;
36159
36304
  var init_customevidencerequest = __esm(() => {
36160
- init_lib();
36305
+ init_v3();
36161
36306
  init_recurrenceduration();
36162
36307
  CustomEvidenceRequest$inboundSchema = objectType({
36163
36308
  id: stringType(),
@@ -36186,7 +36331,7 @@ var init_customevidencerequest = __esm(() => {
36186
36331
  // src/models/components/evidencecontrol.ts
36187
36332
  var EvidenceControl$inboundSchema, EvidenceControl$outboundSchema, EvidenceControl$;
36188
36333
  var init_evidencecontrol = __esm(() => {
36189
- init_lib();
36334
+ init_v3();
36190
36335
  EvidenceControl$inboundSchema = objectType({
36191
36336
  name: stringType(),
36192
36337
  sectionNames: arrayType(stringType())
@@ -36204,7 +36349,7 @@ var init_evidencecontrol = __esm(() => {
36204
36349
  // src/models/components/evidence.ts
36205
36350
  var Evidence$inboundSchema, Evidence$outboundSchema, Evidence$;
36206
36351
  var init_evidence = __esm(() => {
36207
- init_lib();
36352
+ init_v3();
36208
36353
  init_auditevidencestate();
36209
36354
  init_auditevidencetype();
36210
36355
  init_evidencecontrol();
@@ -36245,7 +36390,7 @@ var init_evidence = __esm(() => {
36245
36390
  // src/models/components/evidenceurl.ts
36246
36391
  var EvidenceUrl$inboundSchema, EvidenceUrl$outboundSchema, EvidenceUrl$;
36247
36392
  var init_evidenceurl = __esm(() => {
36248
- init_lib();
36393
+ init_v3();
36249
36394
  EvidenceUrl$inboundSchema = objectType({
36250
36395
  id: stringType(),
36251
36396
  url: stringType(),
@@ -36267,7 +36412,7 @@ var init_evidenceurl = __esm(() => {
36267
36412
  // src/models/components/pageinfo.ts
36268
36413
  var PageInfo$inboundSchema, PageInfo$outboundSchema, PageInfo$;
36269
36414
  var init_pageinfo = __esm(() => {
36270
- init_lib();
36415
+ init_v3();
36271
36416
  PageInfo$inboundSchema = objectType({
36272
36417
  endCursor: nullableType(stringType()),
36273
36418
  hasNextPage: booleanType(),
@@ -36289,7 +36434,7 @@ var init_pageinfo = __esm(() => {
36289
36434
  // src/models/components/paginatedresponseaudit.ts
36290
36435
  var Results$inboundSchema, Results$outboundSchema, Results$, PaginatedResponseAudit$inboundSchema, PaginatedResponseAudit$outboundSchema, PaginatedResponseAudit$;
36291
36436
  var init_paginatedresponseaudit = __esm(() => {
36292
- init_lib();
36437
+ init_v3();
36293
36438
  init_audit();
36294
36439
  init_pageinfo();
36295
36440
  Results$inboundSchema = objectType({
@@ -36319,7 +36464,7 @@ var init_paginatedresponseaudit = __esm(() => {
36319
36464
  // src/models/components/paginatedresponseauditorcontrol.ts
36320
36465
  var PaginatedResponseAuditorControlResults$inboundSchema, PaginatedResponseAuditorControlResults$outboundSchema, PaginatedResponseAuditorControlResults$, PaginatedResponseAuditorControl$inboundSchema, PaginatedResponseAuditorControl$outboundSchema, PaginatedResponseAuditorControl$;
36321
36466
  var init_paginatedresponseauditorcontrol = __esm(() => {
36322
- init_lib();
36467
+ init_v3();
36323
36468
  init_auditorcontrol();
36324
36469
  init_pageinfo();
36325
36470
  PaginatedResponseAuditorControlResults$inboundSchema = objectType({
@@ -36349,7 +36494,7 @@ var init_paginatedresponseauditorcontrol = __esm(() => {
36349
36494
  // src/models/components/paginatedresponsecomment.ts
36350
36495
  var PaginatedResponseCommentResults$inboundSchema, PaginatedResponseCommentResults$outboundSchema, PaginatedResponseCommentResults$, PaginatedResponseComment$inboundSchema, PaginatedResponseComment$outboundSchema, PaginatedResponseComment$;
36351
36496
  var init_paginatedresponsecomment = __esm(() => {
36352
- init_lib();
36497
+ init_v3();
36353
36498
  init_comment();
36354
36499
  init_pageinfo();
36355
36500
  PaginatedResponseCommentResults$inboundSchema = objectType({
@@ -36379,7 +36524,7 @@ var init_paginatedresponsecomment = __esm(() => {
36379
36524
  // src/models/components/paginatedresponseevidence.ts
36380
36525
  var PaginatedResponseEvidenceResults$inboundSchema, PaginatedResponseEvidenceResults$outboundSchema, PaginatedResponseEvidenceResults$, PaginatedResponseEvidence$inboundSchema, PaginatedResponseEvidence$outboundSchema, PaginatedResponseEvidence$;
36381
36526
  var init_paginatedresponseevidence = __esm(() => {
36382
- init_lib();
36527
+ init_v3();
36383
36528
  init_evidence();
36384
36529
  init_pageinfo();
36385
36530
  PaginatedResponseEvidenceResults$inboundSchema = objectType({
@@ -36409,7 +36554,7 @@ var init_paginatedresponseevidence = __esm(() => {
36409
36554
  // src/models/components/paginatedresponseevidenceurl.ts
36410
36555
  var PaginatedResponseEvidenceUrlResults$inboundSchema, PaginatedResponseEvidenceUrlResults$outboundSchema, PaginatedResponseEvidenceUrlResults$, PaginatedResponseEvidenceUrl$inboundSchema, PaginatedResponseEvidenceUrl$outboundSchema, PaginatedResponseEvidenceUrl$;
36411
36556
  var init_paginatedresponseevidenceurl = __esm(() => {
36412
- init_lib();
36557
+ init_v3();
36413
36558
  init_evidenceurl();
36414
36559
  init_pageinfo();
36415
36560
  PaginatedResponseEvidenceUrlResults$inboundSchema = objectType({
@@ -36439,7 +36584,7 @@ var init_paginatedresponseevidenceurl = __esm(() => {
36439
36584
  // src/models/components/security.ts
36440
36585
  var Security$inboundSchema, Security$outboundSchema, Security$;
36441
36586
  var init_security2 = __esm(() => {
36442
- init_lib();
36587
+ init_v3();
36443
36588
  Security$inboundSchema = objectType({
36444
36589
  bearerAuth: stringType().optional()
36445
36590
  });
@@ -36460,6 +36605,7 @@ var init_components = __esm(() => {
36460
36605
  init_auditevidencestate();
36461
36606
  init_auditevidencetype();
36462
36607
  init_auditevidenceupdateinput();
36608
+ init_auditfocus();
36463
36609
  init_auditor();
36464
36610
  init_auditorcontrol();
36465
36611
  init_auditorenabledstatetransition();
@@ -36533,9 +36679,10 @@ async function $do(client, request, options) {
36533
36679
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
36534
36680
  const requestSecurity = resolveGlobalSecurity(securityInput);
36535
36681
  const context = {
36682
+ options: client._options,
36536
36683
  baseURL: options?.serverURL ?? client._baseURL ?? "",
36537
36684
  operationID: "CreateAuditor",
36538
- oAuth2Scopes: [],
36685
+ oAuth2Scopes: null,
36539
36686
  resolvedSecurity: requestSecurity,
36540
36687
  securitySource: client._options.bearerAuth,
36541
36688
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -36548,6 +36695,7 @@ async function $do(client, request, options) {
36548
36695
  path,
36549
36696
  headers,
36550
36697
  body,
36698
+ userAgent: client._options.userAgent,
36551
36699
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
36552
36700
  }, options);
36553
36701
  if (!requestRes.ok) {
@@ -36564,7 +36712,7 @@ async function $do(client, request, options) {
36564
36712
  return [doResult, { status: "request-error", request: req }];
36565
36713
  }
36566
36714
  const response = doResult.value;
36567
- const [result] = await match(json(200, Auditor$inboundSchema), fail("4XX"), fail("5XX"))(response);
36715
+ const [result] = await match(json(200, Auditor$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
36568
36716
  if (!result.ok) {
36569
36717
  return [result, { status: "complete", request: req, response }];
36570
36718
  }
@@ -36613,7 +36761,7 @@ Create an auditor in Vanta.`,
36613
36761
  // src/models/operations/createcommentforauditevidence.ts
36614
36762
  var CreateCommentForAuditEvidenceRequest$inboundSchema, CreateCommentForAuditEvidenceRequest$outboundSchema, CreateCommentForAuditEvidenceRequest$;
36615
36763
  var init_createcommentforauditevidence = __esm(() => {
36616
- init_lib();
36764
+ init_v3();
36617
36765
  init_primitives();
36618
36766
  init_components();
36619
36767
  CreateCommentForAuditEvidenceRequest$inboundSchema = objectType({
@@ -36643,7 +36791,7 @@ var init_createcommentforauditevidence = __esm(() => {
36643
36791
  // src/models/operations/createcustomcontrol.ts
36644
36792
  var CreateCustomControlRequest$inboundSchema, CreateCustomControlRequest$outboundSchema, CreateCustomControlRequest$;
36645
36793
  var init_createcustomcontrol = __esm(() => {
36646
- init_lib();
36794
+ init_v3();
36647
36795
  init_primitives();
36648
36796
  init_components();
36649
36797
  CreateCustomControlRequest$inboundSchema = objectType({
@@ -36671,7 +36819,7 @@ var init_createcustomcontrol = __esm(() => {
36671
36819
  // src/models/operations/createcustomevidencerequest.ts
36672
36820
  var CreateCustomEvidenceRequestRequest$inboundSchema, CreateCustomEvidenceRequestRequest$outboundSchema, CreateCustomEvidenceRequestRequest$;
36673
36821
  var init_createcustomevidencerequest = __esm(() => {
36674
- init_lib();
36822
+ init_v3();
36675
36823
  init_primitives();
36676
36824
  init_components();
36677
36825
  CreateCustomEvidenceRequestRequest$inboundSchema = objectType({
@@ -36699,7 +36847,7 @@ var init_createcustomevidencerequest = __esm(() => {
36699
36847
  // src/models/operations/listauditcomments.ts
36700
36848
  var ListAuditCommentsRequest$inboundSchema, ListAuditCommentsRequest$outboundSchema, ListAuditCommentsRequest$;
36701
36849
  var init_listauditcomments = __esm(() => {
36702
- init_lib();
36850
+ init_v3();
36703
36851
  ListAuditCommentsRequest$inboundSchema = objectType({
36704
36852
  auditId: stringType(),
36705
36853
  pageSize: numberType().int().default(10),
@@ -36721,7 +36869,7 @@ var init_listauditcomments = __esm(() => {
36721
36869
  // src/models/operations/listauditcontrols.ts
36722
36870
  var ListAuditControlsRequest$inboundSchema, ListAuditControlsRequest$outboundSchema, ListAuditControlsRequest$;
36723
36871
  var init_listauditcontrols = __esm(() => {
36724
- init_lib();
36872
+ init_v3();
36725
36873
  ListAuditControlsRequest$inboundSchema = objectType({
36726
36874
  auditId: stringType(),
36727
36875
  pageSize: numberType().int().default(10),
@@ -36741,7 +36889,7 @@ var init_listauditcontrols = __esm(() => {
36741
36889
  // src/models/operations/listauditevidence.ts
36742
36890
  var ListAuditEvidenceRequest$inboundSchema, ListAuditEvidenceRequest$outboundSchema, ListAuditEvidenceRequest$;
36743
36891
  var init_listauditevidence = __esm(() => {
36744
- init_lib();
36892
+ init_v3();
36745
36893
  ListAuditEvidenceRequest$inboundSchema = objectType({
36746
36894
  auditId: stringType(),
36747
36895
  pageSize: numberType().int().default(10),
@@ -36763,7 +36911,7 @@ var init_listauditevidence = __esm(() => {
36763
36911
  // src/models/operations/listauditevidenceurls.ts
36764
36912
  var ListAuditEvidenceUrlsRequest$inboundSchema, ListAuditEvidenceUrlsRequest$outboundSchema, ListAuditEvidenceUrlsRequest$;
36765
36913
  var init_listauditevidenceurls = __esm(() => {
36766
- init_lib();
36914
+ init_v3();
36767
36915
  ListAuditEvidenceUrlsRequest$inboundSchema = objectType({
36768
36916
  auditId: stringType(),
36769
36917
  auditEvidenceId: stringType(),
@@ -36785,16 +36933,18 @@ var init_listauditevidenceurls = __esm(() => {
36785
36933
  // src/models/operations/listaudits.ts
36786
36934
  var ListAuditsRequest$inboundSchema, ListAuditsRequest$outboundSchema, ListAuditsRequest$;
36787
36935
  var init_listaudits = __esm(() => {
36788
- init_lib();
36936
+ init_v3();
36789
36937
  ListAuditsRequest$inboundSchema = objectType({
36790
36938
  pageSize: numberType().int().default(10),
36791
36939
  pageCursor: stringType().optional(),
36792
- changedSinceDate: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)).optional()
36940
+ changedSinceDate: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)).optional(),
36941
+ isActiveAudit: booleanType().optional()
36793
36942
  });
36794
36943
  ListAuditsRequest$outboundSchema = objectType({
36795
36944
  pageSize: numberType().int().default(10),
36796
36945
  pageCursor: stringType().optional(),
36797
- changedSinceDate: dateType().transform((v2) => v2.toISOString()).optional()
36946
+ changedSinceDate: dateType().transform((v2) => v2.toISOString()).optional(),
36947
+ isActiveAudit: booleanType().optional()
36798
36948
  });
36799
36949
  ((ListAuditsRequest$) => {
36800
36950
  ListAuditsRequest$.inboundSchema = ListAuditsRequest$inboundSchema;
@@ -36805,7 +36955,7 @@ var init_listaudits = __esm(() => {
36805
36955
  // src/models/operations/updateauditevidence.ts
36806
36956
  var UpdateAuditEvidenceRequest$inboundSchema, UpdateAuditEvidenceRequest$outboundSchema, UpdateAuditEvidenceRequest$;
36807
36957
  var init_updateauditevidence = __esm(() => {
36808
- init_lib();
36958
+ init_v3();
36809
36959
  init_primitives();
36810
36960
  init_components();
36811
36961
  UpdateAuditEvidenceRequest$inboundSchema = objectType({
@@ -36875,9 +37025,10 @@ async function $do2(client, request, options) {
36875
37025
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
36876
37026
  const requestSecurity = resolveGlobalSecurity(securityInput);
36877
37027
  const context = {
37028
+ options: client._options,
36878
37029
  baseURL: options?.serverURL ?? client._baseURL ?? "",
36879
37030
  operationID: "CreateCommentForAuditEvidence",
36880
- oAuth2Scopes: [],
37031
+ oAuth2Scopes: null,
36881
37032
  resolvedSecurity: requestSecurity,
36882
37033
  securitySource: client._options.bearerAuth,
36883
37034
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -36890,6 +37041,7 @@ async function $do2(client, request, options) {
36890
37041
  path,
36891
37042
  headers,
36892
37043
  body,
37044
+ userAgent: client._options.userAgent,
36893
37045
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
36894
37046
  }, options);
36895
37047
  if (!requestRes.ok) {
@@ -36906,7 +37058,7 @@ async function $do2(client, request, options) {
36906
37058
  return [doResult, { status: "request-error", request: req }];
36907
37059
  }
36908
37060
  const response = doResult.value;
36909
- const [result] = await match(json(200, Comment$inboundSchema), fail("4XX"), fail("5XX"))(response);
37061
+ const [result] = await match(json(200, Comment$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
36910
37062
  if (!result.ok) {
36911
37063
  return [result, { status: "complete", request: req, response }];
36912
37064
  }
@@ -36981,9 +37133,10 @@ async function $do3(client, request, options) {
36981
37133
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
36982
37134
  const requestSecurity = resolveGlobalSecurity(securityInput);
36983
37135
  const context = {
37136
+ options: client._options,
36984
37137
  baseURL: options?.serverURL ?? client._baseURL ?? "",
36985
37138
  operationID: "CreateCustomControl",
36986
- oAuth2Scopes: [],
37139
+ oAuth2Scopes: null,
36987
37140
  resolvedSecurity: requestSecurity,
36988
37141
  securitySource: client._options.bearerAuth,
36989
37142
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -36996,6 +37149,7 @@ async function $do3(client, request, options) {
36996
37149
  path,
36997
37150
  headers,
36998
37151
  body,
37152
+ userAgent: client._options.userAgent,
36999
37153
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37000
37154
  }, options);
37001
37155
  if (!requestRes.ok) {
@@ -37012,7 +37166,7 @@ async function $do3(client, request, options) {
37012
37166
  return [doResult, { status: "request-error", request: req }];
37013
37167
  }
37014
37168
  const response = doResult.value;
37015
- const [result] = await match(json(201, Control$inboundSchema), fail("4XX"), fail("5XX"))(response);
37169
+ const [result] = await match(json(201, Control$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37016
37170
  if (!result.ok) {
37017
37171
  return [result, { status: "complete", request: req, response }];
37018
37172
  }
@@ -37087,9 +37241,10 @@ async function $do4(client, request, options) {
37087
37241
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37088
37242
  const requestSecurity = resolveGlobalSecurity(securityInput);
37089
37243
  const context = {
37244
+ options: client._options,
37090
37245
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37091
37246
  operationID: "CreateCustomEvidenceRequest",
37092
- oAuth2Scopes: [],
37247
+ oAuth2Scopes: null,
37093
37248
  resolvedSecurity: requestSecurity,
37094
37249
  securitySource: client._options.bearerAuth,
37095
37250
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37102,6 +37257,7 @@ async function $do4(client, request, options) {
37102
37257
  path,
37103
37258
  headers,
37104
37259
  body,
37260
+ userAgent: client._options.userAgent,
37105
37261
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37106
37262
  }, options);
37107
37263
  if (!requestRes.ok) {
@@ -37118,7 +37274,7 @@ async function $do4(client, request, options) {
37118
37274
  return [doResult, { status: "request-error", request: req }];
37119
37275
  }
37120
37276
  const response = doResult.value;
37121
- const [result] = await match(json(200, CustomEvidenceRequest$inboundSchema), fail("4XX"), fail("5XX"))(response);
37277
+ const [result] = await match(json(200, CustomEvidenceRequest$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37122
37278
  if (!result.ok) {
37123
37279
  return [result, { status: "complete", request: req, response }];
37124
37280
  }
@@ -37198,9 +37354,10 @@ async function $do5(client, request, options) {
37198
37354
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37199
37355
  const requestSecurity = resolveGlobalSecurity(securityInput);
37200
37356
  const context = {
37357
+ options: client._options,
37201
37358
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37202
37359
  operationID: "ListAuditEvidenceUrls",
37203
- oAuth2Scopes: [],
37360
+ oAuth2Scopes: null,
37204
37361
  resolvedSecurity: requestSecurity,
37205
37362
  securitySource: client._options.bearerAuth,
37206
37363
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37214,6 +37371,7 @@ async function $do5(client, request, options) {
37214
37371
  headers,
37215
37372
  query,
37216
37373
  body,
37374
+ userAgent: client._options.userAgent,
37217
37375
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37218
37376
  }, options);
37219
37377
  if (!requestRes.ok) {
@@ -37230,7 +37388,7 @@ async function $do5(client, request, options) {
37230
37388
  return [doResult, { status: "request-error", request: req }];
37231
37389
  }
37232
37390
  const response = doResult.value;
37233
- const [result] = await match(json(200, PaginatedResponseEvidenceUrl$inboundSchema), fail("4XX"), fail("5XX"))(response);
37391
+ const [result] = await match(json(200, PaginatedResponseEvidenceUrl$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37234
37392
  if (!result.ok) {
37235
37393
  return [result, { status: "complete", request: req, response }];
37236
37394
  }
@@ -37292,6 +37450,7 @@ async function $do6(client, request, options) {
37292
37450
  const path = pathToFunc("/audits")();
37293
37451
  const query = encodeFormQuery({
37294
37452
  changedSinceDate: payload.changedSinceDate,
37453
+ isActiveAudit: payload.isActiveAudit,
37295
37454
  pageCursor: payload.pageCursor,
37296
37455
  pageSize: payload.pageSize
37297
37456
  });
@@ -37302,9 +37461,10 @@ async function $do6(client, request, options) {
37302
37461
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37303
37462
  const requestSecurity = resolveGlobalSecurity(securityInput);
37304
37463
  const context = {
37464
+ options: client._options,
37305
37465
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37306
37466
  operationID: "ListAudits",
37307
- oAuth2Scopes: [],
37467
+ oAuth2Scopes: null,
37308
37468
  resolvedSecurity: requestSecurity,
37309
37469
  securitySource: client._options.bearerAuth,
37310
37470
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37318,6 +37478,7 @@ async function $do6(client, request, options) {
37318
37478
  headers,
37319
37479
  query,
37320
37480
  body,
37481
+ userAgent: client._options.userAgent,
37321
37482
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37322
37483
  }, options);
37323
37484
  if (!requestRes.ok) {
@@ -37334,7 +37495,7 @@ async function $do6(client, request, options) {
37334
37495
  return [doResult, { status: "request-error", request: req }];
37335
37496
  }
37336
37497
  const response = doResult.value;
37337
- const [result] = await match(json(200, PaginatedResponseAudit$inboundSchema), fail("4XX"), fail("5XX"))(response);
37498
+ const [result] = await match(json(200, PaginatedResponseAudit$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37338
37499
  if (!result.ok) {
37339
37500
  return [result, { status: "complete", request: req, response }];
37340
37501
  }
@@ -37411,9 +37572,10 @@ async function $do7(client, request, options) {
37411
37572
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37412
37573
  const requestSecurity = resolveGlobalSecurity(securityInput);
37413
37574
  const context = {
37575
+ options: client._options,
37414
37576
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37415
37577
  operationID: "ListAuditComments",
37416
- oAuth2Scopes: [],
37578
+ oAuth2Scopes: null,
37417
37579
  resolvedSecurity: requestSecurity,
37418
37580
  securitySource: client._options.bearerAuth,
37419
37581
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37427,6 +37589,7 @@ async function $do7(client, request, options) {
37427
37589
  headers,
37428
37590
  query,
37429
37591
  body,
37592
+ userAgent: client._options.userAgent,
37430
37593
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37431
37594
  }, options);
37432
37595
  if (!requestRes.ok) {
@@ -37443,7 +37606,7 @@ async function $do7(client, request, options) {
37443
37606
  return [doResult, { status: "request-error", request: req }];
37444
37607
  }
37445
37608
  const response = doResult.value;
37446
- const [result] = await match(json(200, PaginatedResponseComment$inboundSchema), fail("4XX"), fail("5XX"))(response);
37609
+ const [result] = await match(json(200, PaginatedResponseComment$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37447
37610
  if (!result.ok) {
37448
37611
  return [result, { status: "complete", request: req, response }];
37449
37612
  }
@@ -37519,9 +37682,10 @@ async function $do8(client, request, options) {
37519
37682
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37520
37683
  const requestSecurity = resolveGlobalSecurity(securityInput);
37521
37684
  const context = {
37685
+ options: client._options,
37522
37686
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37523
37687
  operationID: "ListAuditControls",
37524
- oAuth2Scopes: [],
37688
+ oAuth2Scopes: null,
37525
37689
  resolvedSecurity: requestSecurity,
37526
37690
  securitySource: client._options.bearerAuth,
37527
37691
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37535,6 +37699,7 @@ async function $do8(client, request, options) {
37535
37699
  headers,
37536
37700
  query,
37537
37701
  body,
37702
+ userAgent: client._options.userAgent,
37538
37703
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37539
37704
  }, options);
37540
37705
  if (!requestRes.ok) {
@@ -37551,7 +37716,7 @@ async function $do8(client, request, options) {
37551
37716
  return [doResult, { status: "request-error", request: req }];
37552
37717
  }
37553
37718
  const response = doResult.value;
37554
- const [result] = await match(json(200, PaginatedResponseAuditorControl$inboundSchema), fail("4XX"), fail("5XX"))(response);
37719
+ const [result] = await match(json(200, PaginatedResponseAuditorControl$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37555
37720
  if (!result.ok) {
37556
37721
  return [result, { status: "complete", request: req, response }];
37557
37722
  }
@@ -37628,9 +37793,10 @@ async function $do9(client, request, options) {
37628
37793
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37629
37794
  const requestSecurity = resolveGlobalSecurity(securityInput);
37630
37795
  const context = {
37796
+ options: client._options,
37631
37797
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37632
37798
  operationID: "ListAuditEvidence",
37633
- oAuth2Scopes: [],
37799
+ oAuth2Scopes: null,
37634
37800
  resolvedSecurity: requestSecurity,
37635
37801
  securitySource: client._options.bearerAuth,
37636
37802
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37644,6 +37810,7 @@ async function $do9(client, request, options) {
37644
37810
  headers,
37645
37811
  query,
37646
37812
  body,
37813
+ userAgent: client._options.userAgent,
37647
37814
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37648
37815
  }, options);
37649
37816
  if (!requestRes.ok) {
@@ -37660,7 +37827,7 @@ async function $do9(client, request, options) {
37660
37827
  return [doResult, { status: "request-error", request: req }];
37661
37828
  }
37662
37829
  const response = doResult.value;
37663
- const [result] = await match(json(200, PaginatedResponseEvidence$inboundSchema), fail("4XX"), fail("5XX"))(response);
37830
+ const [result] = await match(json(200, PaginatedResponseEvidence$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37664
37831
  if (!result.ok) {
37665
37832
  return [result, { status: "complete", request: req, response }];
37666
37833
  }
@@ -37739,9 +37906,10 @@ async function $do10(client, request, options) {
37739
37906
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
37740
37907
  const requestSecurity = resolveGlobalSecurity(securityInput);
37741
37908
  const context = {
37909
+ options: client._options,
37742
37910
  baseURL: options?.serverURL ?? client._baseURL ?? "",
37743
37911
  operationID: "UpdateAuditEvidence",
37744
- oAuth2Scopes: [],
37912
+ oAuth2Scopes: null,
37745
37913
  resolvedSecurity: requestSecurity,
37746
37914
  securitySource: client._options.bearerAuth,
37747
37915
  retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
@@ -37754,6 +37922,7 @@ async function $do10(client, request, options) {
37754
37922
  path,
37755
37923
  headers,
37756
37924
  body,
37925
+ userAgent: client._options.userAgent,
37757
37926
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
37758
37927
  }, options);
37759
37928
  if (!requestRes.ok) {
@@ -37770,7 +37939,7 @@ async function $do10(client, request, options) {
37770
37939
  return [doResult, { status: "request-error", request: req }];
37771
37940
  }
37772
37941
  const response = doResult.value;
37773
- const [result] = await match(json(200, Evidence$inboundSchema), fail("4XX"), fail("5XX"))(response);
37942
+ const [result] = await match(json(200, Evidence$inboundSchema), fail("4XX"), fail("5XX"))(response, req);
37774
37943
  if (!result.ok) {
37775
37944
  return [result, { status: "complete", request: req, response }];
37776
37945
  }
@@ -37821,7 +37990,7 @@ Update audit evidence.`,
37821
37990
  function createMCPServer(deps) {
37822
37991
  const server = new McpServer({
37823
37992
  name: "Vanta",
37824
- version: "0.2.0"
37993
+ version: "0.4.0"
37825
37994
  });
37826
37995
  const client = new VantaCore({
37827
37996
  bearerAuth: deps.bearerAuth,
@@ -37890,8 +38059,7 @@ async function startStdio(flags) {
37890
38059
  const server = createMCPServer({
37891
38060
  logger,
37892
38061
  allowedTools: flags.tool,
37893
- scopes: flags.scope,
37894
- ...{ bearerAuth: flags["bearer-auth"] },
38062
+ ...{ bearerAuth: flags["bearer-auth"] ?? "" },
37895
38063
  serverURL: flags["server-url"],
37896
38064
  serverIdx: flags["server-index"]
37897
38065
  });
@@ -37909,8 +38077,7 @@ async function startSSE(flags) {
37909
38077
  const mcpServer = createMCPServer({
37910
38078
  logger,
37911
38079
  allowedTools: flags.tool,
37912
- scopes: flags.scope,
37913
- ...{ bearerAuth: flags["bearer-auth"] },
38080
+ ...{ bearerAuth: flags["bearer-auth"] ?? "" },
37914
38081
  serverURL: flags["server-url"],
37915
38082
  serverIdx: flags["server-index"]
37916
38083
  });
@@ -38941,13 +39108,8 @@ function buildContext(process2) {
38941
39108
  }
38942
39109
 
38943
39110
  // src/mcp-server/cli/start/command.ts
38944
- init_lib();
39111
+ init_v3();
38945
39112
  init_console_logger();
38946
-
38947
- // src/mcp-server/scopes.ts
38948
- var mcpScopes = [];
38949
-
38950
- // src/mcp-server/cli/start/command.ts
38951
39113
  var startCommand = on({
38952
39114
  loader: async () => {
38953
39115
  const { main: main2 } = await Promise.resolve().then(() => (init_impl(), exports_impl));
@@ -38976,15 +39138,6 @@ var startCommand = on({
38976
39138
  return stringType().parse(value);
38977
39139
  }
38978
39140
  },
38979
- ...mcpScopes.length ? {
38980
- scope: {
38981
- kind: "enum",
38982
- brief: "Mount tools/resources that match given scope (repeatable flag)",
38983
- values: mcpScopes,
38984
- variadic: true,
38985
- optional: true
38986
- }
38987
- } : {},
38988
39141
  "bearer-auth": {
38989
39142
  kind: "parsed",
38990
39143
  brief: "Sets the bearerAuth auth field for the API",
@@ -39052,7 +39205,7 @@ var routes = an({
39052
39205
  var app = He(routes, {
39053
39206
  name: "mcp",
39054
39207
  versionInfo: {
39055
- currentVersion: "0.2.0"
39208
+ currentVersion: "0.4.0"
39056
39209
  }
39057
39210
  });
39058
39211
  zt(app, process3.argv.slice(2), buildContext(process3));
@@ -39060,5 +39213,5 @@ export {
39060
39213
  app
39061
39214
  };
39062
39215
 
39063
- //# debugId=0A4FF29061F873AB64756E2164756E21
39216
+ //# debugId=18DCA0712890483364756E2164756E21
39064
39217
  //# sourceMappingURL=mcp-server.js.map