openai 4.53.2 → 4.55.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 (463) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +2 -2
  3. package/_vendor/partial-json-parser/parser.d.ts +3 -0
  4. package/_vendor/partial-json-parser/parser.d.ts.map +1 -0
  5. package/_vendor/partial-json-parser/parser.js +226 -0
  6. package/_vendor/partial-json-parser/parser.js.map +1 -0
  7. package/_vendor/partial-json-parser/parser.mjs +223 -0
  8. package/_vendor/partial-json-parser/parser.mjs.map +1 -0
  9. package/_vendor/zod-to-json-schema/Options.d.ts +32 -0
  10. package/_vendor/zod-to-json-schema/Options.d.ts.map +1 -0
  11. package/_vendor/zod-to-json-schema/Options.js +36 -0
  12. package/_vendor/zod-to-json-schema/Options.js.map +1 -0
  13. package/_vendor/zod-to-json-schema/Options.mjs +32 -0
  14. package/_vendor/zod-to-json-schema/Options.mjs.map +1 -0
  15. package/_vendor/zod-to-json-schema/Refs.d.ts +15 -0
  16. package/_vendor/zod-to-json-schema/Refs.d.ts.map +1 -0
  17. package/_vendor/zod-to-json-schema/Refs.js +26 -0
  18. package/_vendor/zod-to-json-schema/Refs.js.map +1 -0
  19. package/_vendor/zod-to-json-schema/Refs.mjs +22 -0
  20. package/_vendor/zod-to-json-schema/Refs.mjs.map +1 -0
  21. package/_vendor/zod-to-json-schema/errorMessages.d.ts +12 -0
  22. package/_vendor/zod-to-json-schema/errorMessages.d.ts.map +1 -0
  23. package/_vendor/zod-to-json-schema/errorMessages.js +20 -0
  24. package/_vendor/zod-to-json-schema/errorMessages.js.map +1 -0
  25. package/_vendor/zod-to-json-schema/errorMessages.mjs +15 -0
  26. package/_vendor/zod-to-json-schema/errorMessages.mjs.map +1 -0
  27. package/_vendor/zod-to-json-schema/index.d.ts +38 -0
  28. package/_vendor/zod-to-json-schema/index.d.ts.map +1 -0
  29. package/_vendor/zod-to-json-schema/index.js +54 -0
  30. package/_vendor/zod-to-json-schema/index.js.map +1 -0
  31. package/_vendor/zod-to-json-schema/index.mjs +38 -0
  32. package/_vendor/zod-to-json-schema/index.mjs.map +1 -0
  33. package/_vendor/zod-to-json-schema/parseDef.d.ts +38 -0
  34. package/_vendor/zod-to-json-schema/parseDef.d.ts.map +1 -0
  35. package/_vendor/zod-to-json-schema/parseDef.js +168 -0
  36. package/_vendor/zod-to-json-schema/parseDef.js.map +1 -0
  37. package/_vendor/zod-to-json-schema/parseDef.mjs +164 -0
  38. package/_vendor/zod-to-json-schema/parseDef.mjs.map +1 -0
  39. package/_vendor/zod-to-json-schema/parsers/any.d.ts +3 -0
  40. package/_vendor/zod-to-json-schema/parsers/any.d.ts.map +1 -0
  41. package/_vendor/zod-to-json-schema/parsers/any.js +8 -0
  42. package/_vendor/zod-to-json-schema/parsers/any.js.map +1 -0
  43. package/_vendor/zod-to-json-schema/parsers/any.mjs +4 -0
  44. package/_vendor/zod-to-json-schema/parsers/any.mjs.map +1 -0
  45. package/_vendor/zod-to-json-schema/parsers/array.d.ts +13 -0
  46. package/_vendor/zod-to-json-schema/parsers/array.d.ts.map +1 -0
  47. package/_vendor/zod-to-json-schema/parsers/array.js +30 -0
  48. package/_vendor/zod-to-json-schema/parsers/array.js.map +1 -0
  49. package/_vendor/zod-to-json-schema/parsers/array.mjs +26 -0
  50. package/_vendor/zod-to-json-schema/parsers/array.mjs.map +1 -0
  51. package/_vendor/zod-to-json-schema/parsers/bigint.d.ts +15 -0
  52. package/_vendor/zod-to-json-schema/parsers/bigint.d.ts.map +1 -0
  53. package/_vendor/zod-to-json-schema/parsers/bigint.js +54 -0
  54. package/_vendor/zod-to-json-schema/parsers/bigint.js.map +1 -0
  55. package/_vendor/zod-to-json-schema/parsers/bigint.mjs +50 -0
  56. package/_vendor/zod-to-json-schema/parsers/bigint.mjs.map +1 -0
  57. package/_vendor/zod-to-json-schema/parsers/boolean.d.ts +5 -0
  58. package/_vendor/zod-to-json-schema/parsers/boolean.d.ts.map +1 -0
  59. package/_vendor/zod-to-json-schema/parsers/boolean.js +10 -0
  60. package/_vendor/zod-to-json-schema/parsers/boolean.js.map +1 -0
  61. package/_vendor/zod-to-json-schema/parsers/boolean.mjs +6 -0
  62. package/_vendor/zod-to-json-schema/parsers/boolean.mjs.map +1 -0
  63. package/_vendor/zod-to-json-schema/parsers/branded.d.ts +4 -0
  64. package/_vendor/zod-to-json-schema/parsers/branded.d.ts.map +1 -0
  65. package/_vendor/zod-to-json-schema/parsers/branded.js +9 -0
  66. package/_vendor/zod-to-json-schema/parsers/branded.js.map +1 -0
  67. package/_vendor/zod-to-json-schema/parsers/branded.mjs +5 -0
  68. package/_vendor/zod-to-json-schema/parsers/branded.mjs.map +1 -0
  69. package/_vendor/zod-to-json-schema/parsers/catch.d.ts +4 -0
  70. package/_vendor/zod-to-json-schema/parsers/catch.d.ts.map +1 -0
  71. package/_vendor/zod-to-json-schema/parsers/catch.js +9 -0
  72. package/_vendor/zod-to-json-schema/parsers/catch.js.map +1 -0
  73. package/_vendor/zod-to-json-schema/parsers/catch.mjs +5 -0
  74. package/_vendor/zod-to-json-schema/parsers/catch.mjs.map +1 -0
  75. package/_vendor/zod-to-json-schema/parsers/date.d.ts +16 -0
  76. package/_vendor/zod-to-json-schema/parsers/date.d.ts.map +1 -0
  77. package/_vendor/zod-to-json-schema/parsers/date.js +51 -0
  78. package/_vendor/zod-to-json-schema/parsers/date.js.map +1 -0
  79. package/_vendor/zod-to-json-schema/parsers/date.mjs +47 -0
  80. package/_vendor/zod-to-json-schema/parsers/date.mjs.map +1 -0
  81. package/_vendor/zod-to-json-schema/parsers/default.d.ts +7 -0
  82. package/_vendor/zod-to-json-schema/parsers/default.d.ts.map +1 -0
  83. package/_vendor/zod-to-json-schema/parsers/default.js +12 -0
  84. package/_vendor/zod-to-json-schema/parsers/default.js.map +1 -0
  85. package/_vendor/zod-to-json-schema/parsers/default.mjs +8 -0
  86. package/_vendor/zod-to-json-schema/parsers/default.mjs.map +1 -0
  87. package/_vendor/zod-to-json-schema/parsers/effects.d.ts +5 -0
  88. package/_vendor/zod-to-json-schema/parsers/effects.d.ts.map +1 -0
  89. package/_vendor/zod-to-json-schema/parsers/effects.js +9 -0
  90. package/_vendor/zod-to-json-schema/parsers/effects.js.map +1 -0
  91. package/_vendor/zod-to-json-schema/parsers/effects.mjs +5 -0
  92. package/_vendor/zod-to-json-schema/parsers/effects.mjs.map +1 -0
  93. package/_vendor/zod-to-json-schema/parsers/enum.d.ts +7 -0
  94. package/_vendor/zod-to-json-schema/parsers/enum.d.ts.map +1 -0
  95. package/_vendor/zod-to-json-schema/parsers/enum.js +11 -0
  96. package/_vendor/zod-to-json-schema/parsers/enum.js.map +1 -0
  97. package/_vendor/zod-to-json-schema/parsers/enum.mjs +7 -0
  98. package/_vendor/zod-to-json-schema/parsers/enum.mjs.map +1 -0
  99. package/_vendor/zod-to-json-schema/parsers/intersection.d.ts +9 -0
  100. package/_vendor/zod-to-json-schema/parsers/intersection.d.ts.map +1 -0
  101. package/_vendor/zod-to-json-schema/parsers/intersection.js +54 -0
  102. package/_vendor/zod-to-json-schema/parsers/intersection.js.map +1 -0
  103. package/_vendor/zod-to-json-schema/parsers/intersection.mjs +50 -0
  104. package/_vendor/zod-to-json-schema/parsers/intersection.mjs.map +1 -0
  105. package/_vendor/zod-to-json-schema/parsers/literal.d.ts +10 -0
  106. package/_vendor/zod-to-json-schema/parsers/literal.d.ts.map +1 -0
  107. package/_vendor/zod-to-json-schema/parsers/literal.js +26 -0
  108. package/_vendor/zod-to-json-schema/parsers/literal.js.map +1 -0
  109. package/_vendor/zod-to-json-schema/parsers/literal.mjs +22 -0
  110. package/_vendor/zod-to-json-schema/parsers/literal.mjs.map +1 -0
  111. package/_vendor/zod-to-json-schema/parsers/map.d.ts +16 -0
  112. package/_vendor/zod-to-json-schema/parsers/map.d.ts.map +1 -0
  113. package/_vendor/zod-to-json-schema/parsers/map.js +30 -0
  114. package/_vendor/zod-to-json-schema/parsers/map.js.map +1 -0
  115. package/_vendor/zod-to-json-schema/parsers/map.mjs +26 -0
  116. package/_vendor/zod-to-json-schema/parsers/map.mjs.map +1 -0
  117. package/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts +7 -0
  118. package/_vendor/zod-to-json-schema/parsers/nativeEnum.d.ts.map +1 -0
  119. package/_vendor/zod-to-json-schema/parsers/nativeEnum.js +21 -0
  120. package/_vendor/zod-to-json-schema/parsers/nativeEnum.js.map +1 -0
  121. package/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs +17 -0
  122. package/_vendor/zod-to-json-schema/parsers/nativeEnum.mjs.map +1 -0
  123. package/_vendor/zod-to-json-schema/parsers/never.d.ts +5 -0
  124. package/_vendor/zod-to-json-schema/parsers/never.d.ts.map +1 -0
  125. package/_vendor/zod-to-json-schema/parsers/never.js +10 -0
  126. package/_vendor/zod-to-json-schema/parsers/never.js.map +1 -0
  127. package/_vendor/zod-to-json-schema/parsers/never.mjs +6 -0
  128. package/_vendor/zod-to-json-schema/parsers/never.mjs.map +1 -0
  129. package/_vendor/zod-to-json-schema/parsers/null.d.ts +6 -0
  130. package/_vendor/zod-to-json-schema/parsers/null.d.ts.map +1 -0
  131. package/_vendor/zod-to-json-schema/parsers/null.js +15 -0
  132. package/_vendor/zod-to-json-schema/parsers/null.js.map +1 -0
  133. package/_vendor/zod-to-json-schema/parsers/null.mjs +11 -0
  134. package/_vendor/zod-to-json-schema/parsers/null.mjs.map +1 -0
  135. package/_vendor/zod-to-json-schema/parsers/nullable.d.ts +11 -0
  136. package/_vendor/zod-to-json-schema/parsers/nullable.d.ts.map +1 -0
  137. package/_vendor/zod-to-json-schema/parsers/nullable.js +35 -0
  138. package/_vendor/zod-to-json-schema/parsers/nullable.js.map +1 -0
  139. package/_vendor/zod-to-json-schema/parsers/nullable.mjs +31 -0
  140. package/_vendor/zod-to-json-schema/parsers/nullable.mjs.map +1 -0
  141. package/_vendor/zod-to-json-schema/parsers/number.d.ts +14 -0
  142. package/_vendor/zod-to-json-schema/parsers/number.d.ts.map +1 -0
  143. package/_vendor/zod-to-json-schema/parsers/number.js +57 -0
  144. package/_vendor/zod-to-json-schema/parsers/number.js.map +1 -0
  145. package/_vendor/zod-to-json-schema/parsers/number.mjs +53 -0
  146. package/_vendor/zod-to-json-schema/parsers/number.mjs.map +1 -0
  147. package/_vendor/zod-to-json-schema/parsers/object.d.ts +11 -0
  148. package/_vendor/zod-to-json-schema/parsers/object.d.ts.map +1 -0
  149. package/_vendor/zod-to-json-schema/parsers/object.js +51 -0
  150. package/_vendor/zod-to-json-schema/parsers/object.js.map +1 -0
  151. package/_vendor/zod-to-json-schema/parsers/object.mjs +47 -0
  152. package/_vendor/zod-to-json-schema/parsers/object.mjs.map +1 -0
  153. package/_vendor/zod-to-json-schema/parsers/optional.d.ts +5 -0
  154. package/_vendor/zod-to-json-schema/parsers/optional.d.ts.map +1 -0
  155. package/_vendor/zod-to-json-schema/parsers/optional.js +25 -0
  156. package/_vendor/zod-to-json-schema/parsers/optional.js.map +1 -0
  157. package/_vendor/zod-to-json-schema/parsers/optional.mjs +21 -0
  158. package/_vendor/zod-to-json-schema/parsers/optional.mjs.map +1 -0
  159. package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts +6 -0
  160. package/_vendor/zod-to-json-schema/parsers/pipeline.d.ts.map +1 -0
  161. package/_vendor/zod-to-json-schema/parsers/pipeline.js +25 -0
  162. package/_vendor/zod-to-json-schema/parsers/pipeline.js.map +1 -0
  163. package/_vendor/zod-to-json-schema/parsers/pipeline.mjs +21 -0
  164. package/_vendor/zod-to-json-schema/parsers/pipeline.mjs.map +1 -0
  165. package/_vendor/zod-to-json-schema/parsers/promise.d.ts +5 -0
  166. package/_vendor/zod-to-json-schema/parsers/promise.d.ts.map +1 -0
  167. package/_vendor/zod-to-json-schema/parsers/promise.js +9 -0
  168. package/_vendor/zod-to-json-schema/parsers/promise.js.map +1 -0
  169. package/_vendor/zod-to-json-schema/parsers/promise.mjs +5 -0
  170. package/_vendor/zod-to-json-schema/parsers/promise.mjs.map +1 -0
  171. package/_vendor/zod-to-json-schema/parsers/readonly.d.ts +4 -0
  172. package/_vendor/zod-to-json-schema/parsers/readonly.d.ts.map +1 -0
  173. package/_vendor/zod-to-json-schema/parsers/readonly.js +9 -0
  174. package/_vendor/zod-to-json-schema/parsers/readonly.js.map +1 -0
  175. package/_vendor/zod-to-json-schema/parsers/readonly.mjs +5 -0
  176. package/_vendor/zod-to-json-schema/parsers/readonly.mjs.map +1 -0
  177. package/_vendor/zod-to-json-schema/parsers/record.d.ts +14 -0
  178. package/_vendor/zod-to-json-schema/parsers/record.d.ts.map +1 -0
  179. package/_vendor/zod-to-json-schema/parsers/record.js +50 -0
  180. package/_vendor/zod-to-json-schema/parsers/record.js.map +1 -0
  181. package/_vendor/zod-to-json-schema/parsers/record.mjs +46 -0
  182. package/_vendor/zod-to-json-schema/parsers/record.mjs.map +1 -0
  183. package/_vendor/zod-to-json-schema/parsers/set.d.ts +14 -0
  184. package/_vendor/zod-to-json-schema/parsers/set.d.ts.map +1 -0
  185. package/_vendor/zod-to-json-schema/parsers/set.js +25 -0
  186. package/_vendor/zod-to-json-schema/parsers/set.js.map +1 -0
  187. package/_vendor/zod-to-json-schema/parsers/set.mjs +21 -0
  188. package/_vendor/zod-to-json-schema/parsers/set.mjs.map +1 -0
  189. package/_vendor/zod-to-json-schema/parsers/string.d.ts +70 -0
  190. package/_vendor/zod-to-json-schema/parsers/string.d.ts.map +1 -0
  191. package/_vendor/zod-to-json-schema/parsers/string.js +316 -0
  192. package/_vendor/zod-to-json-schema/parsers/string.js.map +1 -0
  193. package/_vendor/zod-to-json-schema/parsers/string.mjs +312 -0
  194. package/_vendor/zod-to-json-schema/parsers/string.mjs.map +1 -0
  195. package/_vendor/zod-to-json-schema/parsers/tuple.d.ts +14 -0
  196. package/_vendor/zod-to-json-schema/parsers/tuple.d.ts.map +1 -0
  197. package/_vendor/zod-to-json-schema/parsers/tuple.js +37 -0
  198. package/_vendor/zod-to-json-schema/parsers/tuple.js.map +1 -0
  199. package/_vendor/zod-to-json-schema/parsers/tuple.mjs +33 -0
  200. package/_vendor/zod-to-json-schema/parsers/tuple.mjs.map +1 -0
  201. package/_vendor/zod-to-json-schema/parsers/undefined.d.ts +5 -0
  202. package/_vendor/zod-to-json-schema/parsers/undefined.d.ts.map +1 -0
  203. package/_vendor/zod-to-json-schema/parsers/undefined.js +10 -0
  204. package/_vendor/zod-to-json-schema/parsers/undefined.js.map +1 -0
  205. package/_vendor/zod-to-json-schema/parsers/undefined.mjs +6 -0
  206. package/_vendor/zod-to-json-schema/parsers/undefined.mjs.map +1 -0
  207. package/_vendor/zod-to-json-schema/parsers/union.d.ts +24 -0
  208. package/_vendor/zod-to-json-schema/parsers/union.d.ts.map +1 -0
  209. package/_vendor/zod-to-json-schema/parsers/union.js +77 -0
  210. package/_vendor/zod-to-json-schema/parsers/union.js.map +1 -0
  211. package/_vendor/zod-to-json-schema/parsers/union.mjs +73 -0
  212. package/_vendor/zod-to-json-schema/parsers/union.mjs.map +1 -0
  213. package/_vendor/zod-to-json-schema/parsers/unknown.d.ts +3 -0
  214. package/_vendor/zod-to-json-schema/parsers/unknown.d.ts.map +1 -0
  215. package/_vendor/zod-to-json-schema/parsers/unknown.js +8 -0
  216. package/_vendor/zod-to-json-schema/parsers/unknown.js.map +1 -0
  217. package/_vendor/zod-to-json-schema/parsers/unknown.mjs +4 -0
  218. package/_vendor/zod-to-json-schema/parsers/unknown.mjs.map +1 -0
  219. package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts +11 -0
  220. package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts.map +1 -0
  221. package/_vendor/zod-to-json-schema/zodToJsonSchema.js +53 -0
  222. package/_vendor/zod-to-json-schema/zodToJsonSchema.js.map +1 -0
  223. package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +50 -0
  224. package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs.map +1 -0
  225. package/error.d.ts +6 -0
  226. package/error.d.ts.map +1 -1
  227. package/error.js +13 -1
  228. package/error.js.map +1 -1
  229. package/error.mjs +10 -0
  230. package/error.mjs.map +1 -1
  231. package/helpers/zod.d.ts +57 -0
  232. package/helpers/zod.d.ts.map +1 -0
  233. package/helpers/zod.js +79 -0
  234. package/helpers/zod.js.map +1 -0
  235. package/helpers/zod.mjs +74 -0
  236. package/helpers/zod.mjs.map +1 -0
  237. package/index.d.mts +8 -0
  238. package/index.d.ts +8 -0
  239. package/index.d.ts.map +1 -1
  240. package/index.js +1 -0
  241. package/index.js.map +1 -1
  242. package/index.mjs +1 -0
  243. package/index.mjs.map +1 -1
  244. package/lib/AbstractChatCompletionRunner.d.ts +15 -68
  245. package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  246. package/lib/AbstractChatCompletionRunner.js +47 -200
  247. package/lib/AbstractChatCompletionRunner.js.map +1 -1
  248. package/lib/AbstractChatCompletionRunner.mjs +48 -201
  249. package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  250. package/lib/AssistantStream.d.ts +10 -6
  251. package/lib/AssistantStream.d.ts.map +1 -1
  252. package/lib/AssistantStream.js +18 -6
  253. package/lib/AssistantStream.js.map +1 -1
  254. package/lib/AssistantStream.mjs +18 -6
  255. package/lib/AssistantStream.mjs.map +1 -1
  256. package/lib/ChatCompletionRunner.d.ts +8 -6
  257. package/lib/ChatCompletionRunner.d.ts.map +1 -1
  258. package/lib/ChatCompletionRunner.js +4 -4
  259. package/lib/ChatCompletionRunner.js.map +1 -1
  260. package/lib/ChatCompletionRunner.mjs +4 -4
  261. package/lib/ChatCompletionRunner.mjs.map +1 -1
  262. package/lib/ChatCompletionStream.d.ts +71 -12
  263. package/lib/ChatCompletionStream.d.ts.map +1 -1
  264. package/lib/ChatCompletionStream.js +233 -42
  265. package/lib/ChatCompletionStream.js.map +1 -1
  266. package/lib/ChatCompletionStream.mjs +234 -43
  267. package/lib/ChatCompletionStream.mjs.map +1 -1
  268. package/lib/ChatCompletionStreamingRunner.d.ts +8 -6
  269. package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
  270. package/lib/ChatCompletionStreamingRunner.js +9 -7
  271. package/lib/ChatCompletionStreamingRunner.js.map +1 -1
  272. package/lib/ChatCompletionStreamingRunner.mjs +9 -7
  273. package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
  274. package/lib/EventStream.d.ts +63 -0
  275. package/lib/EventStream.d.ts.map +1 -0
  276. package/lib/EventStream.js +200 -0
  277. package/lib/EventStream.js.map +1 -0
  278. package/lib/EventStream.mjs +196 -0
  279. package/lib/EventStream.mjs.map +1 -0
  280. package/lib/RunnableFunction.d.ts +4 -2
  281. package/lib/RunnableFunction.d.ts.map +1 -1
  282. package/lib/RunnableFunction.js.map +1 -1
  283. package/lib/RunnableFunction.mjs.map +1 -1
  284. package/lib/parser.d.ts +37 -0
  285. package/lib/parser.d.ts.map +1 -0
  286. package/lib/parser.js +133 -0
  287. package/lib/parser.js.map +1 -0
  288. package/lib/parser.mjs +121 -0
  289. package/lib/parser.mjs.map +1 -0
  290. package/package.json +10 -2
  291. package/resources/audio/audio.d.ts +4 -0
  292. package/resources/audio/audio.d.ts.map +1 -1
  293. package/resources/audio/audio.js.map +1 -1
  294. package/resources/audio/audio.mjs.map +1 -1
  295. package/resources/audio/index.d.ts +2 -2
  296. package/resources/audio/index.d.ts.map +1 -1
  297. package/resources/audio/index.js.map +1 -1
  298. package/resources/audio/index.mjs.map +1 -1
  299. package/resources/audio/speech.d.ts +3 -1
  300. package/resources/audio/speech.d.ts.map +1 -1
  301. package/resources/audio/speech.js.map +1 -1
  302. package/resources/audio/speech.mjs.map +1 -1
  303. package/resources/audio/transcriptions.d.ts +2 -1
  304. package/resources/audio/transcriptions.d.ts.map +1 -1
  305. package/resources/audio/transcriptions.js.map +1 -1
  306. package/resources/audio/transcriptions.mjs.map +1 -1
  307. package/resources/audio/translations.d.ts +2 -1
  308. package/resources/audio/translations.d.ts.map +1 -1
  309. package/resources/audio/translations.js.map +1 -1
  310. package/resources/audio/translations.mjs.map +1 -1
  311. package/resources/beta/assistants.d.ts +19 -3
  312. package/resources/beta/assistants.d.ts.map +1 -1
  313. package/resources/beta/assistants.js.map +1 -1
  314. package/resources/beta/assistants.mjs.map +1 -1
  315. package/resources/beta/beta.d.ts +0 -1
  316. package/resources/beta/beta.d.ts.map +1 -1
  317. package/resources/beta/beta.js.map +1 -1
  318. package/resources/beta/beta.mjs.map +1 -1
  319. package/resources/beta/chat/completions.d.ts +25 -5
  320. package/resources/beta/chat/completions.d.ts.map +1 -1
  321. package/resources/beta/chat/completions.js +17 -5
  322. package/resources/beta/chat/completions.js.map +1 -1
  323. package/resources/beta/chat/completions.mjs +17 -5
  324. package/resources/beta/chat/completions.mjs.map +1 -1
  325. package/resources/beta/index.d.ts +1 -1
  326. package/resources/beta/index.d.ts.map +1 -1
  327. package/resources/beta/index.js.map +1 -1
  328. package/resources/beta/index.mjs.map +1 -1
  329. package/resources/beta/threads/index.d.ts +2 -2
  330. package/resources/beta/threads/index.d.ts.map +1 -1
  331. package/resources/beta/threads/index.js.map +1 -1
  332. package/resources/beta/threads/index.mjs.map +1 -1
  333. package/resources/beta/threads/messages.d.ts +28 -2
  334. package/resources/beta/threads/messages.d.ts.map +1 -1
  335. package/resources/beta/threads/messages.js.map +1 -1
  336. package/resources/beta/threads/messages.mjs.map +1 -1
  337. package/resources/beta/threads/runs/runs.d.ts +12 -1
  338. package/resources/beta/threads/runs/runs.d.ts.map +1 -1
  339. package/resources/beta/threads/runs/runs.js.map +1 -1
  340. package/resources/beta/threads/runs/runs.mjs.map +1 -1
  341. package/resources/beta/threads/threads.d.ts +22 -8
  342. package/resources/beta/threads/threads.d.ts.map +1 -1
  343. package/resources/beta/threads/threads.js.map +1 -1
  344. package/resources/beta/threads/threads.mjs.map +1 -1
  345. package/resources/beta/vector-stores/files.d.ts +1 -1
  346. package/resources/beta/vector-stores/files.d.ts.map +1 -1
  347. package/resources/chat/chat.d.ts +2 -1
  348. package/resources/chat/chat.d.ts.map +1 -1
  349. package/resources/chat/chat.js.map +1 -1
  350. package/resources/chat/chat.mjs.map +1 -1
  351. package/resources/chat/completions.d.ts +37 -26
  352. package/resources/chat/completions.d.ts.map +1 -1
  353. package/resources/chat/completions.js.map +1 -1
  354. package/resources/chat/completions.mjs.map +1 -1
  355. package/resources/chat/index.d.ts +1 -1
  356. package/resources/chat/index.d.ts.map +1 -1
  357. package/resources/chat/index.js.map +1 -1
  358. package/resources/chat/index.mjs.map +1 -1
  359. package/resources/fine-tuning/jobs/jobs.d.ts +3 -3
  360. package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
  361. package/resources/images.d.ts +5 -3
  362. package/resources/images.d.ts.map +1 -1
  363. package/resources/images.js.map +1 -1
  364. package/resources/images.mjs.map +1 -1
  365. package/resources/index.d.ts +3 -3
  366. package/resources/index.d.ts.map +1 -1
  367. package/resources/index.js.map +1 -1
  368. package/resources/index.mjs +1 -1
  369. package/resources/index.mjs.map +1 -1
  370. package/resources/moderations.d.ts +3 -1
  371. package/resources/moderations.d.ts.map +1 -1
  372. package/resources/moderations.js.map +1 -1
  373. package/resources/moderations.mjs.map +1 -1
  374. package/resources/shared.d.ts +53 -0
  375. package/resources/shared.d.ts.map +1 -1
  376. package/src/_vendor/partial-json-parser/README.md +3 -0
  377. package/src/_vendor/partial-json-parser/parser.ts +264 -0
  378. package/src/_vendor/zod-to-json-schema/Options.ts +73 -0
  379. package/src/_vendor/zod-to-json-schema/Refs.ts +39 -0
  380. package/src/_vendor/zod-to-json-schema/errorMessages.ts +31 -0
  381. package/src/_vendor/zod-to-json-schema/index.ts +37 -0
  382. package/src/_vendor/zod-to-json-schema/parseDef.ts +231 -0
  383. package/src/_vendor/zod-to-json-schema/parsers/any.ts +5 -0
  384. package/src/_vendor/zod-to-json-schema/parsers/array.ts +36 -0
  385. package/src/_vendor/zod-to-json-schema/parsers/bigint.ts +60 -0
  386. package/src/_vendor/zod-to-json-schema/parsers/boolean.ts +9 -0
  387. package/src/_vendor/zod-to-json-schema/parsers/branded.ts +7 -0
  388. package/src/_vendor/zod-to-json-schema/parsers/catch.ts +7 -0
  389. package/src/_vendor/zod-to-json-schema/parsers/date.ts +83 -0
  390. package/src/_vendor/zod-to-json-schema/parsers/default.ts +10 -0
  391. package/src/_vendor/zod-to-json-schema/parsers/effects.ts +7 -0
  392. package/src/_vendor/zod-to-json-schema/parsers/enum.ts +13 -0
  393. package/src/_vendor/zod-to-json-schema/parsers/intersection.ts +64 -0
  394. package/src/_vendor/zod-to-json-schema/parsers/literal.ts +37 -0
  395. package/src/_vendor/zod-to-json-schema/parsers/map.ts +42 -0
  396. package/src/_vendor/zod-to-json-schema/parsers/nativeEnum.ts +27 -0
  397. package/src/_vendor/zod-to-json-schema/parsers/never.ts +9 -0
  398. package/src/_vendor/zod-to-json-schema/parsers/null.ts +16 -0
  399. package/src/_vendor/zod-to-json-schema/parsers/nullable.ts +49 -0
  400. package/src/_vendor/zod-to-json-schema/parsers/number.ts +62 -0
  401. package/src/_vendor/zod-to-json-schema/parsers/object.ts +63 -0
  402. package/src/_vendor/zod-to-json-schema/parsers/optional.ts +25 -0
  403. package/src/_vendor/zod-to-json-schema/parsers/pipeline.ts +28 -0
  404. package/src/_vendor/zod-to-json-schema/parsers/promise.ts +7 -0
  405. package/src/_vendor/zod-to-json-schema/parsers/readonly.ts +7 -0
  406. package/src/_vendor/zod-to-json-schema/parsers/record.ts +73 -0
  407. package/src/_vendor/zod-to-json-schema/parsers/set.ts +36 -0
  408. package/src/_vendor/zod-to-json-schema/parsers/string.ts +400 -0
  409. package/src/_vendor/zod-to-json-schema/parsers/tuple.ts +54 -0
  410. package/src/_vendor/zod-to-json-schema/parsers/undefined.ts +9 -0
  411. package/src/_vendor/zod-to-json-schema/parsers/union.ts +119 -0
  412. package/src/_vendor/zod-to-json-schema/parsers/unknown.ts +5 -0
  413. package/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +91 -0
  414. package/src/error.ts +12 -0
  415. package/src/helpers/zod.ts +102 -0
  416. package/src/index.ts +8 -0
  417. package/src/lib/AbstractChatCompletionRunner.ts +72 -258
  418. package/src/lib/AssistantStream.ts +47 -19
  419. package/src/lib/ChatCompletionRunner.ts +16 -12
  420. package/src/lib/ChatCompletionStream.ts +423 -47
  421. package/src/lib/ChatCompletionStreamingRunner.ts +19 -15
  422. package/src/lib/{AbstractAssistantStreamRunner.ts → EventStream.ts} +37 -138
  423. package/src/lib/RunnableFunction.ts +4 -2
  424. package/src/lib/parser.ts +235 -0
  425. package/src/resources/audio/audio.ts +5 -0
  426. package/src/resources/audio/index.ts +2 -2
  427. package/src/resources/audio/speech.ts +4 -1
  428. package/src/resources/audio/transcriptions.ts +2 -1
  429. package/src/resources/audio/translations.ts +2 -1
  430. package/src/resources/beta/assistants.ts +19 -26
  431. package/src/resources/beta/beta.ts +0 -1
  432. package/src/resources/beta/chat/completions.ts +77 -27
  433. package/src/resources/beta/index.ts +0 -1
  434. package/src/resources/beta/threads/index.ts +2 -1
  435. package/src/resources/beta/threads/messages.ts +41 -2
  436. package/src/resources/beta/threads/runs/runs.ts +12 -25
  437. package/src/resources/beta/threads/threads.ts +26 -32
  438. package/src/resources/beta/vector-stores/files.ts +1 -1
  439. package/src/resources/chat/chat.ts +2 -0
  440. package/src/resources/chat/completions.ts +47 -27
  441. package/src/resources/chat/index.ts +1 -0
  442. package/src/resources/fine-tuning/jobs/jobs.ts +3 -3
  443. package/src/resources/images.ts +6 -3
  444. package/src/resources/index.ts +9 -2
  445. package/src/resources/moderations.ts +4 -1
  446. package/src/resources/shared.ts +62 -0
  447. package/src/version.ts +1 -1
  448. package/version.d.ts +1 -1
  449. package/version.js +1 -1
  450. package/version.mjs +1 -1
  451. package/lib/AbstractAssistantStreamRunner.d.ts +0 -74
  452. package/lib/AbstractAssistantStreamRunner.d.ts.map +0 -1
  453. package/lib/AbstractAssistantStreamRunner.js +0 -246
  454. package/lib/AbstractAssistantStreamRunner.js.map +0 -1
  455. package/lib/AbstractAssistantStreamRunner.mjs +0 -242
  456. package/lib/AbstractAssistantStreamRunner.mjs.map +0 -1
  457. package/lib/ChatCompletionRunFunctions.test.d.ts +0 -2
  458. package/lib/ChatCompletionRunFunctions.test.d.ts.map +0 -1
  459. package/lib/ChatCompletionRunFunctions.test.js +0 -2177
  460. package/lib/ChatCompletionRunFunctions.test.js.map +0 -1
  461. package/lib/ChatCompletionRunFunctions.test.mjs +0 -2172
  462. package/lib/ChatCompletionRunFunctions.test.mjs.map +0 -1
  463. package/src/lib/ChatCompletionRunFunctions.test.ts +0 -2328
@@ -0,0 +1,11 @@
1
+ import { ZodNullableDef } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ import { JsonSchema7NullType } from "./null.js";
5
+ export type JsonSchema7NullableType = {
6
+ anyOf: [JsonSchema7Type, JsonSchema7NullType];
7
+ } | {
8
+ type: [string, 'null'];
9
+ };
10
+ export declare function parseNullableDef(def: ZodNullableDef, refs: Refs): JsonSchema7NullableType | undefined;
11
+ //# sourceMappingURL=nullable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullable.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAG7C,MAAM,MAAM,uBAAuB,GAC/B;IACE,KAAK,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;CAC/C,GACD;IACE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACxB,CAAC;AAEN,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAG,uBAAuB,GAAG,SAAS,CAkCrG"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseNullableDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ const union_1 = require("./union.js");
6
+ function parseNullableDef(def, refs) {
7
+ if (['ZodString', 'ZodNumber', 'ZodBigInt', 'ZodBoolean', 'ZodNull'].includes(def.innerType._def.typeName) &&
8
+ (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
9
+ if (refs.target === 'openApi3') {
10
+ return {
11
+ type: union_1.primitiveMappings[def.innerType._def.typeName],
12
+ nullable: true,
13
+ };
14
+ }
15
+ return {
16
+ type: [union_1.primitiveMappings[def.innerType._def.typeName], 'null'],
17
+ };
18
+ }
19
+ if (refs.target === 'openApi3') {
20
+ const base = (0, parseDef_1.parseDef)(def.innerType._def, {
21
+ ...refs,
22
+ currentPath: [...refs.currentPath],
23
+ });
24
+ if (base && '$ref' in base)
25
+ return { allOf: [base], nullable: true };
26
+ return base && { ...base, nullable: true };
27
+ }
28
+ const base = (0, parseDef_1.parseDef)(def.innerType._def, {
29
+ ...refs,
30
+ currentPath: [...refs.currentPath, 'anyOf', '0'],
31
+ });
32
+ return base && { anyOf: [base, { type: 'null' }] };
33
+ }
34
+ exports.parseNullableDef = parseNullableDef;
35
+ //# sourceMappingURL=nullable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullable.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGxD,sCAA4C;AAU5C,SAAgB,gBAAgB,CAAC,GAAmB,EAAE,IAAU;IAC9D,IACE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAA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"./union.mjs";
3
+ export function parseNullableDef(def, refs) {
4
+ if (['ZodString', 'ZodNumber', 'ZodBigInt', 'ZodBoolean', 'ZodNull'].includes(def.innerType._def.typeName) &&
5
+ (!def.innerType._def.checks || !def.innerType._def.checks.length)) {
6
+ if (refs.target === 'openApi3') {
7
+ return {
8
+ type: primitiveMappings[def.innerType._def.typeName],
9
+ nullable: true,
10
+ };
11
+ }
12
+ return {
13
+ type: [primitiveMappings[def.innerType._def.typeName], 'null'],
14
+ };
15
+ }
16
+ if (refs.target === 'openApi3') {
17
+ const base = parseDef(def.innerType._def, {
18
+ ...refs,
19
+ currentPath: [...refs.currentPath],
20
+ });
21
+ if (base && '$ref' in base)
22
+ return { allOf: [base], nullable: true };
23
+ return base && { ...base, nullable: true };
24
+ }
25
+ const base = parseDef(def.innerType._def, {
26
+ ...refs,
27
+ currentPath: [...refs.currentPath, 'anyOf', '0'],
28
+ });
29
+ return base && { anyOf: [base, { type: 'null' }] };
30
+ }
31
+ //# sourceMappingURL=nullable.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nullable.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/nullable.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;OAG7B,EAAE,iBAAiB,EAAE;AAU5B,MAAM,UAAU,gBAAgB,CAAC,GAAmB,EAAE,IAAU;IAC9D,IACE,CAAC,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC;QACtG,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EACjE;QACA,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;YAC9B,OAAO;gBACL,IAAI,EAAE,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC;gBACtF,QAAQ,EAAE,IAAI;aACR,CAAC;SACV;QAED,OAAO;YACL,IAAI,EAAE,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,QAA0C,CAAC,EAAE,MAAM,CAAC;SACjG,CAAC;KACH;IAED,IAAI,IAAI,CAAC,MAAM,KAAK,UAAU,EAAE;QAC9B,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;YACxC,GAAG,IAAI;YACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC;SACnC,CAAC,CAAC;QAEH,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAS,CAAC;QAE5E,OAAO,IAAI,IAAK,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAU,CAAC;KACrD;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QACxC,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,IAAI,IAAI,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACrD,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ZodNumberDef } from 'zod';
2
+ import { ErrorMessages } from "../errorMessages.js";
3
+ import { Refs } from "../Refs.js";
4
+ export type JsonSchema7NumberType = {
5
+ type: 'number' | 'integer';
6
+ minimum?: number;
7
+ exclusiveMinimum?: number;
8
+ maximum?: number;
9
+ exclusiveMaximum?: number;
10
+ multipleOf?: number;
11
+ errorMessage?: ErrorMessages<JsonSchema7NumberType>;
12
+ };
13
+ export declare function parseNumberDef(def: ZodNumberDef, refs: Refs): JsonSchema7NumberType;
14
+ //# sourceMappingURL=number.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAmB,aAAa,EAA6B,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACrD,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,GAAG,qBAAqB,CA+CnF"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseNumberDef = void 0;
4
+ const errorMessages_1 = require("../errorMessages.js");
5
+ function parseNumberDef(def, refs) {
6
+ const res = {
7
+ type: 'number',
8
+ };
9
+ if (!def.checks)
10
+ return res;
11
+ for (const check of def.checks) {
12
+ switch (check.kind) {
13
+ case 'int':
14
+ res.type = 'integer';
15
+ (0, errorMessages_1.addErrorMessage)(res, 'type', check.message, refs);
16
+ break;
17
+ case 'min':
18
+ if (refs.target === 'jsonSchema7') {
19
+ if (check.inclusive) {
20
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'minimum', check.value, check.message, refs);
21
+ }
22
+ else {
23
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'exclusiveMinimum', check.value, check.message, refs);
24
+ }
25
+ }
26
+ else {
27
+ if (!check.inclusive) {
28
+ res.exclusiveMinimum = true;
29
+ }
30
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'minimum', check.value, check.message, refs);
31
+ }
32
+ break;
33
+ case 'max':
34
+ if (refs.target === 'jsonSchema7') {
35
+ if (check.inclusive) {
36
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'maximum', check.value, check.message, refs);
37
+ }
38
+ else {
39
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'exclusiveMaximum', check.value, check.message, refs);
40
+ }
41
+ }
42
+ else {
43
+ if (!check.inclusive) {
44
+ res.exclusiveMaximum = true;
45
+ }
46
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'maximum', check.value, check.message, refs);
47
+ }
48
+ break;
49
+ case 'multipleOf':
50
+ (0, errorMessages_1.setResponseValueAndErrors)(res, 'multipleOf', check.value, check.message, refs);
51
+ break;
52
+ }
53
+ }
54
+ return res;
55
+ }
56
+ exports.parseNumberDef = parseNumberDef;
57
+ //# sourceMappingURL=number.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/number.ts"],"names":[],"mappings":";;;AACA,uDAA6F;AAa7F,SAAgB,cAAc,CAAC,GAAiB,EAAE,IAAU;IAC1D,MAAM,GAAG,GAA0B;QACjC,IAAI,EAAE,QAAQ;KACf,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,GAAG,CAAC;IAE5B,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE;QAC9B,QAAQ,KAAK,CAAC,IAAI,EAAE;YAClB,KAAK,KAAK;gBACR,GAAG,CAAC,IAAI,GAAG,SAAS,CAAC;gBACrB,IAAA,+BAAe,EAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE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7E;gBACD,MAAM;YACR,KAAK,YAAY;gBACf,IAAA,yCAAyB,EAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/E,MAAM;SACT;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AA/CD,wCA+CC"}
@@ -0,0 +1,53 @@
1
+ import { addErrorMessage, setResponseValueAndErrors } from "../errorMessages.mjs";
2
+ export function parseNumberDef(def, refs) {
3
+ const res = {
4
+ type: 'number',
5
+ };
6
+ if (!def.checks)
7
+ return res;
8
+ for (const check of def.checks) {
9
+ switch (check.kind) {
10
+ case 'int':
11
+ res.type = 'integer';
12
+ addErrorMessage(res, 'type', check.message, refs);
13
+ break;
14
+ case 'min':
15
+ if (refs.target === 'jsonSchema7') {
16
+ if (check.inclusive) {
17
+ setResponseValueAndErrors(res, 'minimum', check.value, check.message, refs);
18
+ }
19
+ else {
20
+ setResponseValueAndErrors(res, 'exclusiveMinimum', check.value, check.message, refs);
21
+ }
22
+ }
23
+ else {
24
+ if (!check.inclusive) {
25
+ res.exclusiveMinimum = true;
26
+ }
27
+ setResponseValueAndErrors(res, 'minimum', check.value, check.message, refs);
28
+ }
29
+ break;
30
+ case 'max':
31
+ if (refs.target === 'jsonSchema7') {
32
+ if (check.inclusive) {
33
+ setResponseValueAndErrors(res, 'maximum', check.value, check.message, refs);
34
+ }
35
+ else {
36
+ setResponseValueAndErrors(res, 'exclusiveMaximum', check.value, check.message, refs);
37
+ }
38
+ }
39
+ else {
40
+ if (!check.inclusive) {
41
+ res.exclusiveMaximum = true;
42
+ }
43
+ setResponseValueAndErrors(res, 'maximum', check.value, check.message, refs);
44
+ }
45
+ break;
46
+ case 'multipleOf':
47
+ setResponseValueAndErrors(res, 'multipleOf', check.value, check.message, refs);
48
+ break;
49
+ }
50
+ }
51
+ return res;
52
+ }
53
+ //# sourceMappingURL=number.mjs.map
@@ -0,0 +1 @@
1
+ {"version":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E;wBACnB,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;qBAC7E;yBAAM;wBACL,yBAAyB,CAAC,GAAG,EAAE,kBAAkB,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;qBACtF;iBACF;qBAAM;oBACL,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;wBACpB,GAAG,CAAC,gBAAgB,GAAG,IAAW,CAAC;qBACpC;oBACD,yBAAyB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;iBAC7E;gBACD,MAAM;YACR,KAAK,YAAY;gBACf,yBAAyB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;gBAC/E,MAAM;SACT;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { ZodObjectDef } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ export type JsonSchema7ObjectType = {
5
+ type: 'object';
6
+ properties: Record<string, JsonSchema7Type>;
7
+ additionalProperties: boolean | JsonSchema7Type;
8
+ required?: string[];
9
+ };
10
+ export declare function parseObjectDef(def: ZodObjectDef, refs: Refs): JsonSchema7ObjectType;
11
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAoB/B,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,oBAAoB,EAAE,OAAO,GAAG,eAAe,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,yBAiC3D"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseObjectDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ function decideAdditionalProperties(def, refs) {
6
+ if (refs.removeAdditionalStrategy === 'strict') {
7
+ return def.catchall._def.typeName === 'ZodNever' ?
8
+ def.unknownKeys !== 'strict'
9
+ : (0, parseDef_1.parseDef)(def.catchall._def, {
10
+ ...refs,
11
+ currentPath: [...refs.currentPath, 'additionalProperties'],
12
+ }) ?? true;
13
+ }
14
+ else {
15
+ return def.catchall._def.typeName === 'ZodNever' ?
16
+ def.unknownKeys === 'passthrough'
17
+ : (0, parseDef_1.parseDef)(def.catchall._def, {
18
+ ...refs,
19
+ currentPath: [...refs.currentPath, 'additionalProperties'],
20
+ }) ?? true;
21
+ }
22
+ }
23
+ function parseObjectDef(def, refs) {
24
+ const result = {
25
+ type: 'object',
26
+ ...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
27
+ if (propDef === undefined || propDef._def === undefined)
28
+ return acc;
29
+ const parsedDef = (0, parseDef_1.parseDef)(propDef._def, {
30
+ ...refs,
31
+ currentPath: [...refs.currentPath, 'properties', propName],
32
+ propertyPath: [...refs.currentPath, 'properties', propName],
33
+ });
34
+ if (parsedDef === undefined)
35
+ return acc;
36
+ return {
37
+ properties: {
38
+ ...acc.properties,
39
+ [propName]: parsedDef,
40
+ },
41
+ required: propDef.isOptional() && !refs.openaiStrictMode ? acc.required : [...acc.required, propName],
42
+ };
43
+ }, { properties: {}, required: [] }),
44
+ additionalProperties: decideAdditionalProperties(def, refs),
45
+ };
46
+ if (!result.required.length)
47
+ delete result.required;
48
+ return result;
49
+ }
50
+ exports.parseObjectDef = parseObjectDef;
51
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGxD,SAAS,0BAA0B,CAAC,GAAiB,EAAE,IAAU;IAC/D,IAAI,IAAI,CAAC,wBAAwB,KAAK,QAAQ,EAAE;QAC9C,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9C,GAAG,CAAC,WAAW,KAAK,QAAQ;YAC9B,CAAC,CAAC,IAAA,mBAAQ,EAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;gBAC1B,GAAG,IAAI;gBACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC;aAC3D,CAAC,IAAI,IAAI,CAAC;KAChB;SAAM;QACL,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9C,GAAG,CAAC,WAAW,KAAK,aAAa;YACnC,CAAC,CAAC,IAAA,mBAAQ,EAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE;gBAC1B,GAAG,IAAI;gBACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,sBAAsB,CAAC;aAC3D,CAAC,IAAI,IAAI,CAAC;KAChB;AACH,CAAC;AASD,SAAgB,cAAc,CAAC,GAAiB,EAAE,IAAU;IAC1D,MAAM,MAAM,GAA0B;QACpC,IAAI,EAAE,QAAQ;QACd,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,MAAM,CACnC,CACE,GAGC,EACD,CAAC,QAAQ,EAAE,OAAO,CAAC,EACnB,EAAE;YACF,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAC;YACpE,MAAM,SAAS,GAAG,IAAA,mBAAQ,EAAC,OAAO,CAAC,IAAI,EAAE;gBACvC,GAAG,IAAI;gBACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC;gBAC1D,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC;aAC5D,CAAC,CAAC;YACH,IAAI,SAAS,KAAK,SAAS;gBAAE,OAAO,GAAG,CAAC;YACxC,OAAO;gBACL,UAAU,EAAE;oBACV,GAAG,GAAG,CAAC,UAAU;oBACjB,CAAC,QAAQ,CAAC,EAAE,SAAS;iBACtB;gBACD,QAAQ,EACN,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC;aAC9F,CAAC;QACJ,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC;QACD,oBAAoB,EAAE,0BAA0B,CAAC,GAAG,EAAE,IAAI,CAAC;KAC5D,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,QAAS,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC;AAjCD,wCAiCC"}
@@ -0,0 +1,47 @@
1
+ import { parseDef } from "../parseDef.mjs";
2
+ function decideAdditionalProperties(def, refs) {
3
+ if (refs.removeAdditionalStrategy === 'strict') {
4
+ return def.catchall._def.typeName === 'ZodNever' ?
5
+ def.unknownKeys !== 'strict'
6
+ : parseDef(def.catchall._def, {
7
+ ...refs,
8
+ currentPath: [...refs.currentPath, 'additionalProperties'],
9
+ }) ?? true;
10
+ }
11
+ else {
12
+ return def.catchall._def.typeName === 'ZodNever' ?
13
+ def.unknownKeys === 'passthrough'
14
+ : parseDef(def.catchall._def, {
15
+ ...refs,
16
+ currentPath: [...refs.currentPath, 'additionalProperties'],
17
+ }) ?? true;
18
+ }
19
+ }
20
+ export function parseObjectDef(def, refs) {
21
+ const result = {
22
+ type: 'object',
23
+ ...Object.entries(def.shape()).reduce((acc, [propName, propDef]) => {
24
+ if (propDef === undefined || propDef._def === undefined)
25
+ return acc;
26
+ const parsedDef = parseDef(propDef._def, {
27
+ ...refs,
28
+ currentPath: [...refs.currentPath, 'properties', propName],
29
+ propertyPath: [...refs.currentPath, 'properties', propName],
30
+ });
31
+ if (parsedDef === undefined)
32
+ return acc;
33
+ return {
34
+ properties: {
35
+ ...acc.properties,
36
+ [propName]: parsedDef,
37
+ },
38
+ required: propDef.isOptional() && !refs.openaiStrictMode ? acc.required : [...acc.required, propName],
39
+ };
40
+ }, { properties: {}, required: [] }),
41
+ additionalProperties: decideAdditionalProperties(def, refs),
42
+ };
43
+ if (!result.required.length)
44
+ delete result.required;
45
+ return result;
46
+ }
47
+ //# sourceMappingURL=object.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/object.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,SAAS,0BAA0B,CAAC,GAAiB,EAAE,IAAU;IAC/D,IAAI,IAAI,CAAC,wBAAwB,KAAK,QAAQ,EAAE;QAC9C,OAAO,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9C,GAAG,CAAC,WAAW,KAAK,QAAQ;YAC9B,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,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OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC;aAC9F,CAAC;QACJ,CAAC,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjC;QACD,oBAAoB,EAAE,0BAA0B,CAAC,GAAG,EAAE,IAAI,CAAC;KAC5D,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,QAAS,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IACrD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ZodOptionalDef } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ export declare const parseOptionalDef: (def: ZodOptionalDef, refs: Refs) => JsonSchema7Type | undefined;
5
+ //# sourceMappingURL=optional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,gBAAgB,QAAS,cAAc,QAAQ,IAAI,KAAG,eAAe,GAAG,SAoBpF,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseOptionalDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ const parseOptionalDef = (def, refs) => {
6
+ if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
7
+ return (0, parseDef_1.parseDef)(def.innerType._def, refs);
8
+ }
9
+ const innerSchema = (0, parseDef_1.parseDef)(def.innerType._def, {
10
+ ...refs,
11
+ currentPath: [...refs.currentPath, 'anyOf', '1'],
12
+ });
13
+ return innerSchema ?
14
+ {
15
+ anyOf: [
16
+ {
17
+ not: {},
18
+ },
19
+ innerSchema,
20
+ ],
21
+ }
22
+ : {};
23
+ };
24
+ exports.parseOptionalDef = parseOptionalDef;
25
+ //# sourceMappingURL=optional.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGjD,MAAM,gBAAgB,GAAG,CAAC,GAAmB,EAAE,IAAU,EAA+B,EAAE;IAC/F,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE;QACjE,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KAC3C;IAED,MAAM,WAAW,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QAC/C,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,CAAC;QAChB;YACE,KAAK,EAAE;gBACL;oBACE,GAAG,EAAE,EAAE;iBACR;gBACD,WAAW;aACZ;SACF;QACH,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC;AApBW,QAAA,gBAAgB,oBAoB3B"}
@@ -0,0 +1,21 @@
1
+ import { parseDef } from "../parseDef.mjs";
2
+ export const parseOptionalDef = (def, refs) => {
3
+ if (refs.currentPath.toString() === refs.propertyPath?.toString()) {
4
+ return parseDef(def.innerType._def, refs);
5
+ }
6
+ const innerSchema = parseDef(def.innerType._def, {
7
+ ...refs,
8
+ currentPath: [...refs.currentPath, 'anyOf', '1'],
9
+ });
10
+ return innerSchema ?
11
+ {
12
+ anyOf: [
13
+ {
14
+ not: {},
15
+ },
16
+ innerSchema,
17
+ ],
18
+ }
19
+ : {};
20
+ };
21
+ //# sourceMappingURL=optional.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"optional.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/optional.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAmB,EAAE,IAAU,EAA+B,EAAE;IAC/F,IAAI,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,YAAY,EAAE,QAAQ,EAAE,EAAE;QACjE,OAAO,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KAC3C;IAED,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE;QAC/C,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,CAAC;QAChB;YACE,KAAK,EAAE;gBACL;oBACE,GAAG,EAAE,EAAE;iBACR;gBACD,WAAW;aACZ;SACF;QACH,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ZodPipelineDef } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ import { JsonSchema7AllOfType } from "./intersection.js";
5
+ export declare const parsePipelineDef: (def: ZodPipelineDef<any, any>, refs: Refs) => JsonSchema7AllOfType | JsonSchema7Type | undefined;
6
+ //# sourceMappingURL=pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,QACtB,eAAe,GAAG,EAAE,GAAG,CAAC,QACvB,IAAI,KACT,oBAAoB,GAAG,eAAe,GAAG,SAmB3C,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parsePipelineDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ const parsePipelineDef = (def, refs) => {
6
+ if (refs.pipeStrategy === 'input') {
7
+ return (0, parseDef_1.parseDef)(def.in._def, refs);
8
+ }
9
+ else if (refs.pipeStrategy === 'output') {
10
+ return (0, parseDef_1.parseDef)(def.out._def, refs);
11
+ }
12
+ const a = (0, parseDef_1.parseDef)(def.in._def, {
13
+ ...refs,
14
+ currentPath: [...refs.currentPath, 'allOf', '0'],
15
+ });
16
+ const b = (0, parseDef_1.parseDef)(def.out._def, {
17
+ ...refs,
18
+ currentPath: [...refs.currentPath, 'allOf', a ? '1' : '0'],
19
+ });
20
+ return {
21
+ allOf: [a, b].filter((x) => x !== undefined),
22
+ };
23
+ };
24
+ exports.parsePipelineDef = parsePipelineDef;
25
+ //# sourceMappingURL=pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAIjD,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,IAAU,EAC0C,EAAE;IACtD,IAAI,IAAI,CAAC,YAAY,KAAK,OAAO,EAAE;QACjC,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACpC;SAAM,IAAI,IAAI,CAAC,YAAY,KAAK,QAAQ,EAAE;QACzC,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACrC;IAED,MAAM,CAAC,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE;QAC9B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,IAAA,mBAAQ,EAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;QAC/B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;KAC3D,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAwB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;KACnE,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,gBAAgB,oBAsB3B"}
@@ -0,0 +1,21 @@
1
+ import { parseDef } from "../parseDef.mjs";
2
+ export const parsePipelineDef = (def, refs) => {
3
+ if (refs.pipeStrategy === 'input') {
4
+ return parseDef(def.in._def, refs);
5
+ }
6
+ else if (refs.pipeStrategy === 'output') {
7
+ return parseDef(def.out._def, refs);
8
+ }
9
+ const a = parseDef(def.in._def, {
10
+ ...refs,
11
+ currentPath: [...refs.currentPath, 'allOf', '0'],
12
+ });
13
+ const b = parseDef(def.out._def, {
14
+ ...refs,
15
+ currentPath: [...refs.currentPath, 'allOf', a ? '1' : '0'],
16
+ });
17
+ return {
18
+ allOf: [a, b].filter((x) => x !== undefined),
19
+ };
20
+ };
21
+ //# sourceMappingURL=pipeline.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/pipeline.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAIpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,GAA6B,EAC7B,IAAU,EAC0C,EAAE;IACtD,IAAI,IAAI,CAAC,YAAY,KAAK,OAAO,EAAE;QACjC,OAAO,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACpC;SAAM,IAAI,IAAI,CAAC,YAAY,KAAK,QAAQ,EAAE;QACzC,OAAO,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;KACrC;IAED,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE;QAC9B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,CAAC;KACjD,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE;QAC/B,GAAG,IAAI;QACP,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;KAC3D,CAAC,CAAC;IAEH,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAwB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC;KACnE,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { ZodPromiseDef } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ export declare function parsePromiseDef(def: ZodPromiseDef, refs: Refs): JsonSchema7Type | undefined;
5
+ //# sourceMappingURL=promise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/promise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,wBAAgB,eAAe,CAAC,GAAG,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,GAAG,eAAe,GAAG,SAAS,CAE3F"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parsePromiseDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ function parsePromiseDef(def, refs) {
6
+ return (0, parseDef_1.parseDef)(def.type._def, refs);
7
+ }
8
+ exports.parsePromiseDef = parsePromiseDef;
9
+ //# sourceMappingURL=promise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/promise.ts"],"names":[],"mappings":";;;AACA,6CAAwD;AAGxD,SAAgB,eAAe,CAAC,GAAkB,EAAE,IAAU;IAC5D,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAFD,0CAEC"}
@@ -0,0 +1,5 @@
1
+ import { parseDef } from "../parseDef.mjs";
2
+ export function parsePromiseDef(def, refs) {
3
+ return parseDef(def.type._def, refs);
4
+ }
5
+ //# sourceMappingURL=promise.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/promise.ts"],"names":[],"mappings":"OACO,EAAmB,QAAQ,EAAE;AAGpC,MAAM,UAAU,eAAe,CAAC,GAAkB,EAAE,IAAU;IAC5D,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ZodReadonlyDef } from 'zod';
2
+ import { Refs } from "../Refs.js";
3
+ export declare const parseReadonlyDef: (def: ZodReadonlyDef<any>, refs: Refs) => import("../parseDef").JsonSchema7Type | undefined;
4
+ //# sourceMappingURL=readonly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readonly.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,eAAO,MAAM,gBAAgB,QAAS,eAAe,GAAG,CAAC,QAAQ,IAAI,sDAEpE,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseReadonlyDef = void 0;
4
+ const parseDef_1 = require("../parseDef.js");
5
+ const parseReadonlyDef = (def, refs) => {
6
+ return (0, parseDef_1.parseDef)(def.innerType._def, refs);
7
+ };
8
+ exports.parseReadonlyDef = parseReadonlyDef;
9
+ //# sourceMappingURL=readonly.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readonly.js","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":";;;AACA,6CAAuC;AAGhC,MAAM,gBAAgB,GAAG,CAAC,GAAwB,EAAE,IAAU,EAAE,EAAE;IACvE,OAAO,IAAA,mBAAQ,EAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
@@ -0,0 +1,5 @@
1
+ import { parseDef } from "../parseDef.mjs";
2
+ export const parseReadonlyDef = (def, refs) => {
3
+ return parseDef(def.innerType._def, refs);
4
+ };
5
+ //# sourceMappingURL=readonly.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readonly.mjs","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/readonly.ts"],"names":[],"mappings":"OACO,EAAE,QAAQ,EAAE;AAGnB,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAwB,EAAE,IAAU,EAAE,EAAE;IACvE,OAAO,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { ZodMapDef, ZodRecordDef, ZodTypeAny } from 'zod';
2
+ import { JsonSchema7Type } from "../parseDef.js";
3
+ import { Refs } from "../Refs.js";
4
+ import { JsonSchema7EnumType } from "./enum.js";
5
+ import { JsonSchema7StringType } from "./string.js";
6
+ type JsonSchema7RecordPropertyNamesType = Omit<JsonSchema7StringType, 'type'> | Omit<JsonSchema7EnumType, 'type'>;
7
+ export type JsonSchema7RecordType = {
8
+ type: 'object';
9
+ additionalProperties: JsonSchema7Type;
10
+ propertyNames?: JsonSchema7RecordPropertyNamesType;
11
+ };
12
+ export declare function parseRecordDef(def: ZodRecordDef<ZodTypeAny, ZodTypeAny> | ZodMapDef, refs: Refs): JsonSchema7RecordType;
13
+ export {};
14
+ //# sourceMappingURL=record.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../src/_vendor/zod-to-json-schema/parsers/record.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjF,OAAO,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAkB,MAAM,UAAU,CAAC;AAEjE,KAAK,kCAAkC,GACnC,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,GACnC,IAAI,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,oBAAoB,EAAE,eAAe,CAAC;IACtC,aAAa,CAAC,EAAE,kCAAkC,CAAC;CACpD,CAAC;AAEF,wBAAgB,cAAc,CAC5B,GAAG,EAAE,YAAY,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,SAAS,EACrD,IAAI,EAAE,IAAI,GACT,qBAAqB,CAoDvB"}