@openrouter/sdk 0.1.1 → 0.1.3

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 (370) hide show
  1. package/esm/funcs/modelsListEmbeddings.d.ts +18 -0
  2. package/esm/funcs/modelsListEmbeddings.js +72 -0
  3. package/esm/lib/config.d.ts +3 -3
  4. package/esm/lib/config.js +3 -3
  5. package/esm/models/activityitem.d.ts +0 -29
  6. package/esm/models/activityitem.js +0 -38
  7. package/esm/models/assistantmessage.d.ts +0 -24
  8. package/esm/models/assistantmessage.js +0 -22
  9. package/esm/models/badgatewayresponseerrordata.d.ts +0 -23
  10. package/esm/models/badgatewayresponseerrordata.js +0 -20
  11. package/esm/models/badrequestresponseerrordata.d.ts +0 -23
  12. package/esm/models/badrequestresponseerrordata.js +0 -20
  13. package/esm/models/chatcompletionfinishreason.d.ts +0 -12
  14. package/esm/models/chatcompletionfinishreason.js +1 -17
  15. package/esm/models/chaterror.d.ts +0 -39
  16. package/esm/models/chaterror.js +0 -40
  17. package/esm/models/chatgenerationparams.d.ts +3 -122
  18. package/esm/models/chatgenerationparams.js +7 -195
  19. package/esm/models/chatgenerationtokenusage.d.ts +5 -70
  20. package/esm/models/chatgenerationtokenusage.js +5 -89
  21. package/esm/models/chatmessagecontentitem.d.ts +5 -12
  22. package/esm/models/chatmessagecontentitem.js +7 -11
  23. package/esm/models/chatmessagecontentitemaudio.d.ts +0 -34
  24. package/esm/models/chatmessagecontentitemaudio.js +0 -33
  25. package/esm/models/chatmessagecontentitemimage.d.ts +0 -34
  26. package/esm/models/chatmessagecontentitemimage.js +0 -33
  27. package/esm/models/chatmessagecontentitemtext.d.ts +0 -12
  28. package/esm/models/chatmessagecontentitemtext.js +0 -11
  29. package/esm/models/chatmessagecontentitemvideo.d.ts +32 -0
  30. package/esm/models/chatmessagecontentitemvideo.js +46 -0
  31. package/esm/models/chatmessagetokenlogprob.d.ts +0 -43
  32. package/esm/models/chatmessagetokenlogprob.js +0 -45
  33. package/esm/models/chatmessagetokenlogprobs.d.ts +1 -21
  34. package/esm/models/chatmessagetokenlogprobs.js +1 -20
  35. package/esm/models/chatmessagetoolcall.d.ts +0 -24
  36. package/esm/models/chatmessagetoolcall.js +0 -22
  37. package/esm/models/chatresponse.d.ts +2 -27
  38. package/esm/models/chatresponse.js +2 -30
  39. package/esm/models/chatresponsechoice.d.ts +2 -24
  40. package/esm/models/chatresponsechoice.js +3 -28
  41. package/esm/models/chatstreamingchoice.d.ts +2 -24
  42. package/esm/models/chatstreamingchoice.js +3 -28
  43. package/esm/models/chatstreamingmessagechunk.d.ts +1 -40
  44. package/esm/models/chatstreamingmessagechunk.js +1 -40
  45. package/esm/models/chatstreamingmessagetoolcall.d.ts +0 -42
  46. package/esm/models/chatstreamingmessagetoolcall.js +0 -41
  47. package/esm/models/chatstreamingresponsechunk.d.ts +2 -67
  48. package/esm/models/chatstreamingresponsechunk.js +2 -69
  49. package/esm/models/chatstreamoptions.d.ts +0 -17
  50. package/esm/models/chatstreamoptions.js +0 -23
  51. package/esm/models/completionchoice.d.ts +1 -35
  52. package/esm/models/completionchoice.js +2 -43
  53. package/esm/models/completioncreateparams.d.ts +0 -122
  54. package/esm/models/completioncreateparams.js +2 -200
  55. package/esm/models/completionlogprobs.d.ts +0 -24
  56. package/esm/models/completionlogprobs.js +0 -27
  57. package/esm/models/completionresponse.d.ts +2 -27
  58. package/esm/models/completionresponse.js +2 -30
  59. package/esm/models/completionusage.d.ts +0 -21
  60. package/esm/models/completionusage.js +0 -26
  61. package/esm/models/createchargerequest.d.ts +0 -29
  62. package/esm/models/createchargerequest.js +0 -43
  63. package/esm/models/defaultparameters.d.ts +0 -21
  64. package/esm/models/defaultparameters.js +0 -25
  65. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +0 -23
  66. package/esm/models/edgenetworktimeoutresponseerrordata.js +0 -20
  67. package/esm/models/endpointstatus.d.ts +0 -12
  68. package/esm/models/endpointstatus.js +1 -17
  69. package/esm/models/errors/badgatewayresponseerror.d.ts +0 -19
  70. package/esm/models/errors/badgatewayresponseerror.js +0 -22
  71. package/esm/models/errors/badrequestresponseerror.d.ts +0 -19
  72. package/esm/models/errors/badrequestresponseerror.js +0 -22
  73. package/esm/models/errors/chaterror.d.ts +0 -18
  74. package/esm/models/errors/chaterror.js +0 -17
  75. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +0 -19
  76. package/esm/models/errors/edgenetworktimeoutresponseerror.js +0 -22
  77. package/esm/models/errors/forbiddenresponseerror.d.ts +0 -19
  78. package/esm/models/errors/forbiddenresponseerror.js +0 -22
  79. package/esm/models/errors/internalserverresponseerror.d.ts +0 -19
  80. package/esm/models/errors/internalserverresponseerror.js +0 -22
  81. package/esm/models/errors/notfoundresponseerror.d.ts +0 -19
  82. package/esm/models/errors/notfoundresponseerror.js +0 -22
  83. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +0 -19
  84. package/esm/models/errors/payloadtoolargeresponseerror.js +0 -22
  85. package/esm/models/errors/paymentrequiredresponseerror.d.ts +0 -19
  86. package/esm/models/errors/paymentrequiredresponseerror.js +0 -22
  87. package/esm/models/errors/provideroverloadedresponseerror.d.ts +0 -19
  88. package/esm/models/errors/provideroverloadedresponseerror.js +0 -22
  89. package/esm/models/errors/requesttimeoutresponseerror.d.ts +0 -19
  90. package/esm/models/errors/requesttimeoutresponseerror.js +0 -22
  91. package/esm/models/errors/serviceunavailableresponseerror.d.ts +0 -19
  92. package/esm/models/errors/serviceunavailableresponseerror.js +0 -22
  93. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +0 -19
  94. package/esm/models/errors/toomanyrequestsresponseerror.js +0 -22
  95. package/esm/models/errors/unauthorizedresponseerror.d.ts +0 -19
  96. package/esm/models/errors/unauthorizedresponseerror.js +0 -22
  97. package/esm/models/errors/unprocessableentityresponseerror.d.ts +0 -19
  98. package/esm/models/errors/unprocessableentityresponseerror.js +0 -22
  99. package/esm/models/filecitation.d.ts +0 -26
  100. package/esm/models/filecitation.js +0 -22
  101. package/esm/models/filepath.d.ts +0 -26
  102. package/esm/models/filepath.js +0 -22
  103. package/esm/models/forbiddenresponseerrordata.d.ts +0 -23
  104. package/esm/models/forbiddenresponseerrordata.js +0 -20
  105. package/esm/models/imagegenerationstatus.d.ts +0 -10
  106. package/esm/models/imagegenerationstatus.js +0 -11
  107. package/esm/models/index.d.ts +2 -1
  108. package/esm/models/index.js +2 -1
  109. package/esm/models/inputmodality.d.ts +0 -12
  110. package/esm/models/inputmodality.js +1 -17
  111. package/esm/models/instructtype.d.ts +0 -12
  112. package/esm/models/instructtype.js +1 -17
  113. package/esm/models/internalserverresponseerrordata.d.ts +0 -23
  114. package/esm/models/internalserverresponseerrordata.js +0 -20
  115. package/esm/models/jsonschemaconfig.d.ts +0 -17
  116. package/esm/models/jsonschemaconfig.js +0 -22
  117. package/esm/models/listendpointsresponse.d.ts +1 -60
  118. package/esm/models/listendpointsresponse.js +5 -73
  119. package/esm/models/message.d.ts +0 -47
  120. package/esm/models/message.js +5 -67
  121. package/esm/models/model.d.ts +5 -36
  122. package/esm/models/model.js +6 -46
  123. package/esm/models/modelarchitecture.d.ts +0 -35
  124. package/esm/models/modelarchitecture.js +4 -49
  125. package/esm/models/modelgroup.d.ts +0 -12
  126. package/esm/models/modelgroup.js +1 -18
  127. package/esm/models/modelscountresponse.d.ts +0 -38
  128. package/esm/models/modelscountresponse.js +0 -36
  129. package/esm/models/modelslistresponse.d.ts +1 -20
  130. package/esm/models/modelslistresponse.js +1 -19
  131. package/esm/models/namedtoolchoice.d.ts +0 -32
  132. package/esm/models/namedtoolchoice.js +0 -38
  133. package/esm/models/notfoundresponseerrordata.d.ts +0 -23
  134. package/esm/models/notfoundresponseerrordata.js +0 -20
  135. package/esm/models/openairesponsesannotation.d.ts +0 -12
  136. package/esm/models/openairesponsesannotation.js +0 -11
  137. package/esm/models/openairesponsesincludable.d.ts +0 -12
  138. package/esm/models/openairesponsesincludable.js +0 -18
  139. package/esm/models/openairesponsesincompletedetails.d.ts +0 -31
  140. package/esm/models/openairesponsesincompletedetails.js +1 -35
  141. package/esm/models/openairesponsesinputunion.d.ts +6 -431
  142. package/esm/models/openairesponsesinputunion.js +7 -463
  143. package/esm/models/openairesponsesprompt.d.ts +0 -24
  144. package/esm/models/openairesponsesprompt.js +0 -22
  145. package/esm/models/openairesponsesreasoningconfig.d.ts +0 -20
  146. package/esm/models/openairesponsesreasoningconfig.js +2 -21
  147. package/esm/models/openairesponsesreasoningeffort.d.ts +0 -10
  148. package/esm/models/openairesponsesreasoningeffort.js +0 -11
  149. package/esm/models/openairesponsesrefusalcontent.d.ts +0 -26
  150. package/esm/models/openairesponsesrefusalcontent.js +0 -22
  151. package/esm/models/openairesponsesresponsestatus.d.ts +0 -12
  152. package/esm/models/openairesponsesresponsestatus.js +1 -17
  153. package/esm/models/openairesponsesservicetier.d.ts +0 -12
  154. package/esm/models/openairesponsesservicetier.js +1 -17
  155. package/esm/models/openairesponsestoolchoiceunion.d.ts +0 -132
  156. package/esm/models/openairesponsestoolchoiceunion.js +0 -110
  157. package/esm/models/openairesponsestruncation.d.ts +0 -12
  158. package/esm/models/openairesponsestruncation.js +1 -17
  159. package/esm/models/openresponseseasyinputmessage.d.ts +0 -142
  160. package/esm/models/openresponseseasyinputmessage.js +9 -198
  161. package/esm/models/openresponseserrorevent.d.ts +0 -39
  162. package/esm/models/openresponseserrorevent.js +0 -39
  163. package/esm/models/openresponsesfunctioncalloutput.d.ts +0 -33
  164. package/esm/models/openresponsesfunctioncalloutput.js +2 -42
  165. package/esm/models/openresponsesfunctiontoolcall.d.ts +0 -33
  166. package/esm/models/openresponsesfunctiontoolcall.js +2 -43
  167. package/esm/models/openresponsesimagegencallcompleted.d.ts +0 -38
  168. package/esm/models/openresponsesimagegencallcompleted.js +0 -40
  169. package/esm/models/openresponsesimagegencallgenerating.d.ts +0 -38
  170. package/esm/models/openresponsesimagegencallgenerating.js +0 -40
  171. package/esm/models/openresponsesimagegencallinprogress.d.ts +0 -38
  172. package/esm/models/openresponsesimagegencallinprogress.js +0 -40
  173. package/esm/models/openresponsesimagegencallpartialimage.d.ts +0 -40
  174. package/esm/models/openresponsesimagegencallpartialimage.js +0 -44
  175. package/esm/models/openresponsesinput.d.ts +0 -32
  176. package/esm/models/openresponsesinput.js +11 -71
  177. package/esm/models/openresponsesinputmessageitem.d.ts +0 -111
  178. package/esm/models/openresponsesinputmessageitem.js +8 -148
  179. package/esm/models/openresponseslogprobs.d.ts +1 -22
  180. package/esm/models/openresponseslogprobs.js +1 -25
  181. package/esm/models/openresponsesnonstreamingresponse.d.ts +13 -138
  182. package/esm/models/openresponsesnonstreamingresponse.js +16 -157
  183. package/esm/models/openresponsesreasoning.d.ts +0 -108
  184. package/esm/models/openresponsesreasoning.js +6 -130
  185. package/esm/models/openresponsesreasoningconfig.d.ts +0 -17
  186. package/esm/models/openresponsesreasoningconfig.js +2 -28
  187. package/esm/models/openresponsesreasoningdeltaevent.d.ts +0 -40
  188. package/esm/models/openresponsesreasoningdeltaevent.js +0 -43
  189. package/esm/models/openresponsesreasoningdoneevent.d.ts +0 -40
  190. package/esm/models/openresponsesreasoningdoneevent.js +0 -43
  191. package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +1 -41
  192. package/esm/models/openresponsesreasoningsummarypartaddedevent.js +1 -44
  193. package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +0 -40
  194. package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +0 -43
  195. package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +0 -40
  196. package/esm/models/openresponsesreasoningsummarytextdoneevent.js +0 -43
  197. package/esm/models/openresponsesrequest.d.ts +0 -348
  198. package/esm/models/openresponsesrequest.js +16 -523
  199. package/esm/models/openresponsesresponsetext.d.ts +0 -29
  200. package/esm/models/openresponsesresponsetext.js +1 -40
  201. package/esm/models/openresponsesstreamevent.d.ts +18 -732
  202. package/esm/models/openresponsesstreamevent.js +18 -808
  203. package/esm/models/openresponsestoplogprobs.d.ts +0 -20
  204. package/esm/models/openresponsestoplogprobs.js +0 -19
  205. package/esm/models/openresponsesusage.d.ts +0 -85
  206. package/esm/models/openresponsesusage.js +0 -105
  207. package/esm/models/openresponseswebsearch20250826tool.d.ts +0 -38
  208. package/esm/models/openresponseswebsearch20250826tool.js +0 -33
  209. package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +0 -26
  210. package/esm/models/openresponseswebsearchpreview20250311tool.js +0 -22
  211. package/esm/models/openresponseswebsearchpreviewtool.d.ts +0 -26
  212. package/esm/models/openresponseswebsearchpreviewtool.js +0 -22
  213. package/esm/models/openresponseswebsearchtool.d.ts +0 -38
  214. package/esm/models/openresponseswebsearchtool.js +0 -33
  215. package/esm/models/operations/createauthkeyscode.d.ts +0 -67
  216. package/esm/models/operations/createauthkeyscode.js +0 -89
  217. package/esm/models/operations/createcoinbasecharge.d.ts +0 -144
  218. package/esm/models/operations/createcoinbasecharge.js +0 -170
  219. package/esm/models/operations/createembeddings.d.ts +0 -322
  220. package/esm/models/operations/createembeddings.js +2 -397
  221. package/esm/models/operations/createkeys.d.ts +0 -83
  222. package/esm/models/operations/createkeys.js +0 -113
  223. package/esm/models/operations/createresponses.d.ts +0 -36
  224. package/esm/models/operations/createresponses.js +0 -37
  225. package/esm/models/operations/deletekeys.d.ts +0 -34
  226. package/esm/models/operations/deletekeys.js +0 -36
  227. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +0 -47
  228. package/esm/models/operations/exchangeauthcodeforapikey.js +0 -66
  229. package/esm/models/operations/getcredits.d.ts +0 -17
  230. package/esm/models/operations/getcredits.js +0 -16
  231. package/esm/models/operations/getcurrentkey.d.ts +0 -74
  232. package/esm/models/operations/getcurrentkey.js +0 -87
  233. package/esm/models/operations/getgeneration.d.ts +0 -101
  234. package/esm/models/operations/getgeneration.js +1 -134
  235. package/esm/models/operations/getkey.d.ts +0 -70
  236. package/esm/models/operations/getkey.js +0 -87
  237. package/esm/models/operations/getmodels.d.ts +0 -17
  238. package/esm/models/operations/getmodels.js +0 -24
  239. package/esm/models/operations/getparameters.d.ts +0 -93
  240. package/esm/models/operations/getparameters.js +0 -112
  241. package/esm/models/operations/getuseractivity.d.ts +0 -34
  242. package/esm/models/operations/getuseractivity.js +0 -36
  243. package/esm/models/operations/list.d.ts +0 -70
  244. package/esm/models/operations/list.js +0 -93
  245. package/esm/models/operations/listendpoints.d.ts +0 -34
  246. package/esm/models/operations/listendpoints.js +0 -37
  247. package/esm/models/operations/listendpointszdr.d.ts +0 -19
  248. package/esm/models/operations/listendpointszdr.js +0 -18
  249. package/esm/models/operations/listmodelsuser.d.ts +0 -17
  250. package/esm/models/operations/listmodelsuser.js +0 -19
  251. package/esm/models/operations/listproviders.d.ts +0 -42
  252. package/esm/models/operations/listproviders.js +0 -46
  253. package/esm/models/operations/sendchatcompletionrequest.d.ts +0 -17
  254. package/esm/models/operations/sendchatcompletionrequest.js +0 -16
  255. package/esm/models/operations/updatekeys.d.ts +0 -97
  256. package/esm/models/operations/updatekeys.js +0 -136
  257. package/esm/models/outputitemimagegenerationcall.d.ts +0 -38
  258. package/esm/models/outputitemimagegenerationcall.js +1 -35
  259. package/esm/models/outputmessage.d.ts +2 -139
  260. package/esm/models/outputmessage.js +2 -135
  261. package/esm/models/outputmodality.d.ts +0 -12
  262. package/esm/models/outputmodality.js +1 -17
  263. package/esm/models/parameter.d.ts +0 -12
  264. package/esm/models/parameter.js +1 -18
  265. package/esm/models/payloadtoolargeresponseerrordata.d.ts +0 -23
  266. package/esm/models/payloadtoolargeresponseerrordata.js +0 -20
  267. package/esm/models/paymentrequiredresponseerrordata.d.ts +0 -23
  268. package/esm/models/paymentrequiredresponseerrordata.js +0 -20
  269. package/esm/models/perrequestlimits.d.ts +0 -20
  270. package/esm/models/perrequestlimits.js +0 -24
  271. package/esm/models/providername.d.ts +0 -10
  272. package/esm/models/providername.js +0 -11
  273. package/esm/models/provideroverloadedresponseerrordata.d.ts +0 -23
  274. package/esm/models/provideroverloadedresponseerrordata.js +0 -20
  275. package/esm/models/publicendpoint.d.ts +0 -73
  276. package/esm/models/publicendpoint.js +4 -100
  277. package/esm/models/publicpricing.d.ts +0 -30
  278. package/esm/models/publicpricing.js +0 -38
  279. package/esm/models/quantization.d.ts +0 -12
  280. package/esm/models/quantization.js +0 -18
  281. package/esm/models/reasoningsummarytext.d.ts +0 -26
  282. package/esm/models/reasoningsummarytext.js +0 -22
  283. package/esm/models/reasoningsummaryverbosity.d.ts +0 -10
  284. package/esm/models/reasoningsummaryverbosity.js +0 -11
  285. package/esm/models/reasoningtextcontent.d.ts +0 -26
  286. package/esm/models/reasoningtextcontent.js +0 -22
  287. package/esm/models/requesttimeoutresponseerrordata.d.ts +0 -23
  288. package/esm/models/requesttimeoutresponseerrordata.js +0 -20
  289. package/esm/models/responseformatjsonschema.d.ts +0 -17
  290. package/esm/models/responseformatjsonschema.js +1 -25
  291. package/esm/models/responseformattextconfig.d.ts +0 -12
  292. package/esm/models/responseformattextconfig.js +0 -11
  293. package/esm/models/responseformattextgrammar.d.ts +0 -17
  294. package/esm/models/responseformattextgrammar.js +0 -20
  295. package/esm/models/responseinputaudio.d.ts +0 -48
  296. package/esm/models/responseinputaudio.js +0 -44
  297. package/esm/models/responseinputfile.d.ts +0 -26
  298. package/esm/models/responseinputfile.js +0 -22
  299. package/esm/models/responseinputimage.d.ts +0 -36
  300. package/esm/models/responseinputimage.js +0 -33
  301. package/esm/models/responseinputtext.d.ts +0 -26
  302. package/esm/models/responseinputtext.js +0 -22
  303. package/esm/models/responseoutputtext.d.ts +0 -26
  304. package/esm/models/responseoutputtext.js +0 -22
  305. package/esm/models/responseserrorfield.d.ts +0 -32
  306. package/esm/models/responseserrorfield.js +1 -36
  307. package/esm/models/responsesformatjsonobject.d.ts +0 -26
  308. package/esm/models/responsesformatjsonobject.js +0 -22
  309. package/esm/models/responsesformattext.d.ts +0 -26
  310. package/esm/models/responsesformattext.js +0 -22
  311. package/esm/models/responsesformattextjsonschemaconfig.d.ts +0 -26
  312. package/esm/models/responsesformattextjsonschemaconfig.js +0 -22
  313. package/esm/models/responsesimagegenerationcall.d.ts +0 -26
  314. package/esm/models/responsesimagegenerationcall.js +0 -22
  315. package/esm/models/responsesoutputitem.d.ts +6 -23
  316. package/esm/models/responsesoutputitem.js +6 -29
  317. package/esm/models/responsesoutputitemfilesearchcall.d.ts +0 -26
  318. package/esm/models/responsesoutputitemfilesearchcall.js +0 -22
  319. package/esm/models/responsesoutputitemfunctioncall.d.ts +0 -80
  320. package/esm/models/responsesoutputitemfunctioncall.js +0 -66
  321. package/esm/models/responsesoutputitemreasoning.d.ts +0 -80
  322. package/esm/models/responsesoutputitemreasoning.js +0 -66
  323. package/esm/models/responsesoutputmessage.d.ts +0 -106
  324. package/esm/models/responsesoutputmessage.js +0 -88
  325. package/esm/models/responsessearchcontextsize.d.ts +0 -10
  326. package/esm/models/responsessearchcontextsize.js +0 -11
  327. package/esm/models/responseswebsearchcalloutput.d.ts +0 -26
  328. package/esm/models/responseswebsearchcalloutput.js +0 -22
  329. package/esm/models/responseswebsearchuserlocation.d.ts +0 -26
  330. package/esm/models/responseswebsearchuserlocation.js +0 -22
  331. package/esm/models/responsetextconfig.d.ts +1 -33
  332. package/esm/models/responsetextconfig.js +2 -37
  333. package/esm/models/security.d.ts +0 -17
  334. package/esm/models/security.js +0 -19
  335. package/esm/models/serviceunavailableresponseerrordata.d.ts +0 -23
  336. package/esm/models/serviceunavailableresponseerrordata.js +0 -20
  337. package/esm/models/systemmessage.d.ts +0 -32
  338. package/esm/models/systemmessage.js +1 -42
  339. package/esm/models/toolcallstatus.d.ts +0 -10
  340. package/esm/models/toolcallstatus.js +0 -11
  341. package/esm/models/tooldefinitionjson.d.ts +34 -0
  342. package/esm/models/tooldefinitionjson.js +23 -0
  343. package/esm/models/toolresponsemessage.d.ts +0 -32
  344. package/esm/models/toolresponsemessage.js +1 -42
  345. package/esm/models/toomanyrequestsresponseerrordata.d.ts +0 -23
  346. package/esm/models/toomanyrequestsresponseerrordata.js +0 -20
  347. package/esm/models/topproviderinfo.d.ts +0 -21
  348. package/esm/models/topproviderinfo.js +0 -26
  349. package/esm/models/unauthorizedresponseerrordata.d.ts +0 -23
  350. package/esm/models/unauthorizedresponseerrordata.js +0 -20
  351. package/esm/models/unprocessableentityresponseerrordata.d.ts +0 -23
  352. package/esm/models/unprocessableentityresponseerrordata.js +0 -20
  353. package/esm/models/urlcitation.d.ts +0 -26
  354. package/esm/models/urlcitation.js +0 -22
  355. package/esm/models/usermessage.d.ts +0 -32
  356. package/esm/models/usermessage.js +1 -42
  357. package/esm/models/websearchpreviewtooluserlocation.d.ts +0 -26
  358. package/esm/models/websearchpreviewtooluserlocation.js +0 -22
  359. package/esm/models/websearchstatus.d.ts +0 -10
  360. package/esm/models/websearchstatus.js +0 -11
  361. package/esm/react-query/index.d.ts +1 -0
  362. package/esm/react-query/index.js +1 -0
  363. package/esm/react-query/modelsListEmbeddings.d.ts +29 -0
  364. package/esm/react-query/modelsListEmbeddings.js +66 -0
  365. package/esm/sdk/models.d.ts +7 -0
  366. package/esm/sdk/models.js +10 -0
  367. package/jsr.json +1 -1
  368. package/package.json +1 -1
  369. package/esm/models/tool.d.ts +0 -66
  370. package/esm/models/tool.js +0 -65
@@ -3,20 +3,18 @@
3
3
  */
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, } from "../types/enums.js";
8
- import { OpenAIResponsesIncludable$inboundSchema, OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js";
9
- import { OpenAIResponsesPrompt$inboundSchema, OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js";
10
- import { OpenAIResponsesToolChoiceUnion$inboundSchema, OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
11
- import { OpenResponsesInput$inboundSchema, OpenResponsesInput$outboundSchema, } from "./openresponsesinput.js";
12
- import { OpenResponsesReasoningConfig$inboundSchema, OpenResponsesReasoningConfig$outboundSchema, } from "./openresponsesreasoningconfig.js";
13
- import { OpenResponsesResponseText$inboundSchema, OpenResponsesResponseText$outboundSchema, } from "./openresponsesresponsetext.js";
14
- import { OpenResponsesWebSearch20250826Tool$inboundSchema, OpenResponsesWebSearch20250826Tool$outboundSchema, } from "./openresponseswebsearch20250826tool.js";
15
- import { OpenResponsesWebSearchPreview20250311Tool$inboundSchema, OpenResponsesWebSearchPreview20250311Tool$outboundSchema, } from "./openresponseswebsearchpreview20250311tool.js";
16
- import { OpenResponsesWebSearchPreviewTool$inboundSchema, OpenResponsesWebSearchPreviewTool$outboundSchema, } from "./openresponseswebsearchpreviewtool.js";
17
- import { OpenResponsesWebSearchTool$inboundSchema, OpenResponsesWebSearchTool$outboundSchema, } from "./openresponseswebsearchtool.js";
18
- import { ProviderName$inboundSchema, ProviderName$outboundSchema, } from "./providername.js";
19
- import { Quantization$inboundSchema, Quantization$outboundSchema, } from "./quantization.js";
6
+ import { OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js";
7
+ import { OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js";
8
+ import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
9
+ import { OpenResponsesInput$outboundSchema, } from "./openresponsesinput.js";
10
+ import { OpenResponsesReasoningConfig$outboundSchema, } from "./openresponsesreasoningconfig.js";
11
+ import { OpenResponsesResponseText$outboundSchema, } from "./openresponsesresponsetext.js";
12
+ import { OpenResponsesWebSearch20250826Tool$outboundSchema, } from "./openresponseswebsearch20250826tool.js";
13
+ import { OpenResponsesWebSearchPreview20250311Tool$outboundSchema, } from "./openresponseswebsearchpreview20250311tool.js";
14
+ import { OpenResponsesWebSearchPreviewTool$outboundSchema, } from "./openresponseswebsearchpreviewtool.js";
15
+ import { OpenResponsesWebSearchTool$outboundSchema, } from "./openresponseswebsearchtool.js";
16
+ import { ProviderName$outboundSchema } from "./providername.js";
17
+ import { Quantization$outboundSchema } from "./quantization.js";
20
18
  export const OpenResponsesRequestType = {
21
19
  Function: "function",
22
20
  };
@@ -69,28 +67,7 @@ export const IdModeration = {
69
67
  Moderation: "moderation",
70
68
  };
71
69
  /** @internal */
72
- export const OpenResponsesRequestType$inboundSchema = z.enum(OpenResponsesRequestType);
73
- /** @internal */
74
- export const OpenResponsesRequestType$outboundSchema = OpenResponsesRequestType$inboundSchema;
75
- /**
76
- * @internal
77
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
- */
79
- export var OpenResponsesRequestType$;
80
- (function (OpenResponsesRequestType$) {
81
- /** @deprecated use `OpenResponsesRequestType$inboundSchema` instead. */
82
- OpenResponsesRequestType$.inboundSchema = OpenResponsesRequestType$inboundSchema;
83
- /** @deprecated use `OpenResponsesRequestType$outboundSchema` instead. */
84
- OpenResponsesRequestType$.outboundSchema = OpenResponsesRequestType$outboundSchema;
85
- })(OpenResponsesRequestType$ || (OpenResponsesRequestType$ = {}));
86
- /** @internal */
87
- export const OpenResponsesRequestToolFunction$inboundSchema = z.object({
88
- type: OpenResponsesRequestType$inboundSchema,
89
- name: z.string(),
90
- description: z.nullable(z.string()).optional(),
91
- strict: z.nullable(z.boolean()).optional(),
92
- parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))),
93
- });
70
+ export const OpenResponsesRequestType$outboundSchema = z.enum(OpenResponsesRequestType);
94
71
  /** @internal */
95
72
  export const OpenResponsesRequestToolFunction$outboundSchema = z.object({
96
73
  type: OpenResponsesRequestType$outboundSchema,
@@ -99,31 +76,9 @@ export const OpenResponsesRequestToolFunction$outboundSchema = z.object({
99
76
  strict: z.nullable(z.boolean()).optional(),
100
77
  parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))),
101
78
  });
102
- /**
103
- * @internal
104
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
105
- */
106
- export var OpenResponsesRequestToolFunction$;
107
- (function (OpenResponsesRequestToolFunction$) {
108
- /** @deprecated use `OpenResponsesRequestToolFunction$inboundSchema` instead. */
109
- OpenResponsesRequestToolFunction$.inboundSchema = OpenResponsesRequestToolFunction$inboundSchema;
110
- /** @deprecated use `OpenResponsesRequestToolFunction$outboundSchema` instead. */
111
- OpenResponsesRequestToolFunction$.outboundSchema = OpenResponsesRequestToolFunction$outboundSchema;
112
- })(OpenResponsesRequestToolFunction$ || (OpenResponsesRequestToolFunction$ = {}));
113
79
  export function openResponsesRequestToolFunctionToJSON(openResponsesRequestToolFunction) {
114
80
  return JSON.stringify(OpenResponsesRequestToolFunction$outboundSchema.parse(openResponsesRequestToolFunction));
115
81
  }
116
- export function openResponsesRequestToolFunctionFromJSON(jsonString) {
117
- return safeParse(jsonString, (x) => OpenResponsesRequestToolFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesRequestToolFunction' from JSON`);
118
- }
119
- /** @internal */
120
- export const OpenResponsesRequestToolUnion$inboundSchema = z.union([
121
- z.lazy(() => OpenResponsesRequestToolFunction$inboundSchema),
122
- OpenResponsesWebSearchPreviewTool$inboundSchema,
123
- OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
124
- OpenResponsesWebSearchTool$inboundSchema,
125
- OpenResponsesWebSearch20250826Tool$inboundSchema,
126
- ]);
127
82
  /** @internal */
128
83
  export const OpenResponsesRequestToolUnion$outboundSchema = z.union([
129
84
  z.lazy(() => OpenResponsesRequestToolFunction$outboundSchema),
@@ -132,200 +87,53 @@ export const OpenResponsesRequestToolUnion$outboundSchema = z.union([
132
87
  OpenResponsesWebSearchTool$outboundSchema,
133
88
  OpenResponsesWebSearch20250826Tool$outboundSchema,
134
89
  ]);
135
- /**
136
- * @internal
137
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
138
- */
139
- export var OpenResponsesRequestToolUnion$;
140
- (function (OpenResponsesRequestToolUnion$) {
141
- /** @deprecated use `OpenResponsesRequestToolUnion$inboundSchema` instead. */
142
- OpenResponsesRequestToolUnion$.inboundSchema = OpenResponsesRequestToolUnion$inboundSchema;
143
- /** @deprecated use `OpenResponsesRequestToolUnion$outboundSchema` instead. */
144
- OpenResponsesRequestToolUnion$.outboundSchema = OpenResponsesRequestToolUnion$outboundSchema;
145
- })(OpenResponsesRequestToolUnion$ || (OpenResponsesRequestToolUnion$ = {}));
146
90
  export function openResponsesRequestToolUnionToJSON(openResponsesRequestToolUnion) {
147
91
  return JSON.stringify(OpenResponsesRequestToolUnion$outboundSchema.parse(openResponsesRequestToolUnion));
148
92
  }
149
- export function openResponsesRequestToolUnionFromJSON(jsonString) {
150
- return safeParse(jsonString, (x) => OpenResponsesRequestToolUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesRequestToolUnion' from JSON`);
151
- }
152
- /** @internal */
153
- export const ServiceTier$inboundSchema = z
154
- .union([
155
- z.enum(ServiceTier),
156
- z.string().transform(catchUnrecognizedEnum),
157
- ]);
158
93
  /** @internal */
159
94
  export const ServiceTier$outboundSchema = z
160
95
  .union([
161
96
  z.enum(ServiceTier),
162
97
  z.string().and(z.custom()),
163
98
  ]);
164
- /**
165
- * @internal
166
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
167
- */
168
- export var ServiceTier$;
169
- (function (ServiceTier$) {
170
- /** @deprecated use `ServiceTier$inboundSchema` instead. */
171
- ServiceTier$.inboundSchema = ServiceTier$inboundSchema;
172
- /** @deprecated use `ServiceTier$outboundSchema` instead. */
173
- ServiceTier$.outboundSchema = ServiceTier$outboundSchema;
174
- })(ServiceTier$ || (ServiceTier$ = {}));
175
- /** @internal */
176
- export const Truncation$inboundSchema = z
177
- .union([
178
- z.enum(Truncation),
179
- z.string().transform(catchUnrecognizedEnum),
180
- ]);
181
99
  /** @internal */
182
100
  export const Truncation$outboundSchema = z
183
101
  .union([
184
102
  z.enum(Truncation),
185
103
  z.string().and(z.custom()),
186
104
  ]);
187
- /**
188
- * @internal
189
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
190
- */
191
- export var Truncation$;
192
- (function (Truncation$) {
193
- /** @deprecated use `Truncation$inboundSchema` instead. */
194
- Truncation$.inboundSchema = Truncation$inboundSchema;
195
- /** @deprecated use `Truncation$outboundSchema` instead. */
196
- Truncation$.outboundSchema = Truncation$outboundSchema;
197
- })(Truncation$ || (Truncation$ = {}));
198
- /** @internal */
199
- export const DataCollection$inboundSchema = z
200
- .union([
201
- z.enum(DataCollection),
202
- z.string().transform(catchUnrecognizedEnum),
203
- ]);
204
105
  /** @internal */
205
106
  export const DataCollection$outboundSchema = z.union([
206
107
  z.enum(DataCollection),
207
108
  z.string().and(z.custom()),
208
109
  ]);
209
- /**
210
- * @internal
211
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
212
- */
213
- export var DataCollection$;
214
- (function (DataCollection$) {
215
- /** @deprecated use `DataCollection$inboundSchema` instead. */
216
- DataCollection$.inboundSchema = DataCollection$inboundSchema;
217
- /** @deprecated use `DataCollection$outboundSchema` instead. */
218
- DataCollection$.outboundSchema = DataCollection$outboundSchema;
219
- })(DataCollection$ || (DataCollection$ = {}));
220
- /** @internal */
221
- export const Order$inboundSchema = z.union([
222
- ProviderName$inboundSchema,
223
- z.string(),
224
- ]);
225
110
  /** @internal */
226
111
  export const Order$outboundSchema = z.union([
227
112
  ProviderName$outboundSchema,
228
113
  z.string(),
229
114
  ]);
230
- /**
231
- * @internal
232
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
233
- */
234
- export var Order$;
235
- (function (Order$) {
236
- /** @deprecated use `Order$inboundSchema` instead. */
237
- Order$.inboundSchema = Order$inboundSchema;
238
- /** @deprecated use `Order$outboundSchema` instead. */
239
- Order$.outboundSchema = Order$outboundSchema;
240
- })(Order$ || (Order$ = {}));
241
115
  export function orderToJSON(order) {
242
116
  return JSON.stringify(Order$outboundSchema.parse(order));
243
117
  }
244
- export function orderFromJSON(jsonString) {
245
- return safeParse(jsonString, (x) => Order$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Order' from JSON`);
246
- }
247
- /** @internal */
248
- export const Only$inboundSchema = z.union([
249
- ProviderName$inboundSchema,
250
- z.string(),
251
- ]);
252
118
  /** @internal */
253
119
  export const Only$outboundSchema = z.union([
254
120
  ProviderName$outboundSchema,
255
121
  z.string(),
256
122
  ]);
257
- /**
258
- * @internal
259
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
260
- */
261
- export var Only$;
262
- (function (Only$) {
263
- /** @deprecated use `Only$inboundSchema` instead. */
264
- Only$.inboundSchema = Only$inboundSchema;
265
- /** @deprecated use `Only$outboundSchema` instead. */
266
- Only$.outboundSchema = Only$outboundSchema;
267
- })(Only$ || (Only$ = {}));
268
123
  export function onlyToJSON(only) {
269
124
  return JSON.stringify(Only$outboundSchema.parse(only));
270
125
  }
271
- export function onlyFromJSON(jsonString) {
272
- return safeParse(jsonString, (x) => Only$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Only' from JSON`);
273
- }
274
- /** @internal */
275
- export const Ignore$inboundSchema = z.union([
276
- ProviderName$inboundSchema,
277
- z.string(),
278
- ]);
279
126
  /** @internal */
280
127
  export const Ignore$outboundSchema = z
281
128
  .union([ProviderName$outboundSchema, z.string()]);
282
- /**
283
- * @internal
284
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
285
- */
286
- export var Ignore$;
287
- (function (Ignore$) {
288
- /** @deprecated use `Ignore$inboundSchema` instead. */
289
- Ignore$.inboundSchema = Ignore$inboundSchema;
290
- /** @deprecated use `Ignore$outboundSchema` instead. */
291
- Ignore$.outboundSchema = Ignore$outboundSchema;
292
- })(Ignore$ || (Ignore$ = {}));
293
129
  export function ignoreToJSON(ignore) {
294
130
  return JSON.stringify(Ignore$outboundSchema.parse(ignore));
295
131
  }
296
- export function ignoreFromJSON(jsonString) {
297
- return safeParse(jsonString, (x) => Ignore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ignore' from JSON`);
298
- }
299
- /** @internal */
300
- export const Sort$inboundSchema = z
301
- .union([
302
- z.enum(Sort),
303
- z.string().transform(catchUnrecognizedEnum),
304
- ]);
305
132
  /** @internal */
306
133
  export const Sort$outboundSchema = z.union([
307
134
  z.enum(Sort),
308
135
  z.string().and(z.custom()),
309
136
  ]);
310
- /**
311
- * @internal
312
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
313
- */
314
- export var Sort$;
315
- (function (Sort$) {
316
- /** @deprecated use `Sort$inboundSchema` instead. */
317
- Sort$.inboundSchema = Sort$inboundSchema;
318
- /** @deprecated use `Sort$outboundSchema` instead. */
319
- Sort$.outboundSchema = Sort$outboundSchema;
320
- })(Sort$ || (Sort$ = {}));
321
- /** @internal */
322
- export const MaxPrice$inboundSchema = z.object({
323
- prompt: z.any().optional(),
324
- completion: z.any().optional(),
325
- image: z.any().optional(),
326
- audio: z.any().optional(),
327
- request: z.any().optional(),
328
- });
329
137
  /** @internal */
330
138
  export const MaxPrice$outboundSchema = z
331
139
  .object({
@@ -335,69 +143,14 @@ export const MaxPrice$outboundSchema = z
335
143
  audio: z.any().optional(),
336
144
  request: z.any().optional(),
337
145
  });
338
- /**
339
- * @internal
340
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
341
- */
342
- export var MaxPrice$;
343
- (function (MaxPrice$) {
344
- /** @deprecated use `MaxPrice$inboundSchema` instead. */
345
- MaxPrice$.inboundSchema = MaxPrice$inboundSchema;
346
- /** @deprecated use `MaxPrice$outboundSchema` instead. */
347
- MaxPrice$.outboundSchema = MaxPrice$outboundSchema;
348
- })(MaxPrice$ || (MaxPrice$ = {}));
349
146
  export function maxPriceToJSON(maxPrice) {
350
147
  return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice));
351
148
  }
352
- export function maxPriceFromJSON(jsonString) {
353
- return safeParse(jsonString, (x) => MaxPrice$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MaxPrice' from JSON`);
354
- }
355
- /** @internal */
356
- export const Experimental$inboundSchema = z
357
- .object({});
358
149
  /** @internal */
359
150
  export const Experimental$outboundSchema = z.object({});
360
- /**
361
- * @internal
362
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
363
- */
364
- export var Experimental$;
365
- (function (Experimental$) {
366
- /** @deprecated use `Experimental$inboundSchema` instead. */
367
- Experimental$.inboundSchema = Experimental$inboundSchema;
368
- /** @deprecated use `Experimental$outboundSchema` instead. */
369
- Experimental$.outboundSchema = Experimental$outboundSchema;
370
- })(Experimental$ || (Experimental$ = {}));
371
151
  export function experimentalToJSON(experimental) {
372
152
  return JSON.stringify(Experimental$outboundSchema.parse(experimental));
373
153
  }
374
- export function experimentalFromJSON(jsonString) {
375
- return safeParse(jsonString, (x) => Experimental$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Experimental' from JSON`);
376
- }
377
- /** @internal */
378
- export const Provider$inboundSchema = z.object({
379
- allow_fallbacks: z.nullable(z.boolean()).optional(),
380
- require_parameters: z.nullable(z.boolean()).optional(),
381
- data_collection: z.nullable(DataCollection$inboundSchema).optional(),
382
- zdr: z.nullable(z.boolean()).optional(),
383
- order: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()])))
384
- .optional(),
385
- only: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()])))
386
- .optional(),
387
- ignore: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()])))
388
- .optional(),
389
- quantizations: z.nullable(z.array(Quantization$inboundSchema)).optional(),
390
- sort: z.nullable(Sort$inboundSchema).optional(),
391
- max_price: z.lazy(() => MaxPrice$inboundSchema).optional(),
392
- experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(),
393
- }).transform((v) => {
394
- return remap$(v, {
395
- "allow_fallbacks": "allowFallbacks",
396
- "require_parameters": "requireParameters",
397
- "data_collection": "dataCollection",
398
- "max_price": "maxPrice",
399
- });
400
- });
401
154
  /** @internal */
402
155
  export const Provider$outboundSchema = z
403
156
  .object({
@@ -421,97 +174,25 @@ export const Provider$outboundSchema = z
421
174
  maxPrice: "max_price",
422
175
  });
423
176
  });
424
- /**
425
- * @internal
426
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
427
- */
428
- export var Provider$;
429
- (function (Provider$) {
430
- /** @deprecated use `Provider$inboundSchema` instead. */
431
- Provider$.inboundSchema = Provider$inboundSchema;
432
- /** @deprecated use `Provider$outboundSchema` instead. */
433
- Provider$.outboundSchema = Provider$outboundSchema;
434
- })(Provider$ || (Provider$ = {}));
435
177
  export function providerToJSON(provider) {
436
178
  return JSON.stringify(Provider$outboundSchema.parse(provider));
437
179
  }
438
- export function providerFromJSON(jsonString) {
439
- return safeParse(jsonString, (x) => Provider$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Provider' from JSON`);
440
- }
441
180
  /** @internal */
442
- export const IdFileParser$inboundSchema = z
181
+ export const IdFileParser$outboundSchema = z
443
182
  .enum(IdFileParser);
444
183
  /** @internal */
445
- export const IdFileParser$outboundSchema = IdFileParser$inboundSchema;
446
- /**
447
- * @internal
448
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
449
- */
450
- export var IdFileParser$;
451
- (function (IdFileParser$) {
452
- /** @deprecated use `IdFileParser$inboundSchema` instead. */
453
- IdFileParser$.inboundSchema = IdFileParser$inboundSchema;
454
- /** @deprecated use `IdFileParser$outboundSchema` instead. */
455
- IdFileParser$.outboundSchema = IdFileParser$outboundSchema;
456
- })(IdFileParser$ || (IdFileParser$ = {}));
457
- /** @internal */
458
- export const PdfEngine$inboundSchema = z
459
- .union([
460
- z.enum(PdfEngine),
461
- z.string().transform(catchUnrecognizedEnum),
462
- ]);
463
- /** @internal */
464
184
  export const PdfEngine$outboundSchema = z
465
185
  .union([
466
186
  z.enum(PdfEngine),
467
187
  z.string().and(z.custom()),
468
188
  ]);
469
- /**
470
- * @internal
471
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
472
- */
473
- export var PdfEngine$;
474
- (function (PdfEngine$) {
475
- /** @deprecated use `PdfEngine$inboundSchema` instead. */
476
- PdfEngine$.inboundSchema = PdfEngine$inboundSchema;
477
- /** @deprecated use `PdfEngine$outboundSchema` instead. */
478
- PdfEngine$.outboundSchema = PdfEngine$outboundSchema;
479
- })(PdfEngine$ || (PdfEngine$ = {}));
480
- /** @internal */
481
- export const Pdf$inboundSchema = z.object({
482
- engine: PdfEngine$inboundSchema.optional(),
483
- });
484
189
  /** @internal */
485
190
  export const Pdf$outboundSchema = z.object({
486
191
  engine: PdfEngine$outboundSchema.optional(),
487
192
  });
488
- /**
489
- * @internal
490
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
491
- */
492
- export var Pdf$;
493
- (function (Pdf$) {
494
- /** @deprecated use `Pdf$inboundSchema` instead. */
495
- Pdf$.inboundSchema = Pdf$inboundSchema;
496
- /** @deprecated use `Pdf$outboundSchema` instead. */
497
- Pdf$.outboundSchema = Pdf$outboundSchema;
498
- })(Pdf$ || (Pdf$ = {}));
499
193
  export function pdfToJSON(pdf) {
500
194
  return JSON.stringify(Pdf$outboundSchema.parse(pdf));
501
195
  }
502
- export function pdfFromJSON(jsonString) {
503
- return safeParse(jsonString, (x) => Pdf$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pdf' from JSON`);
504
- }
505
- /** @internal */
506
- export const PluginFileParser$inboundSchema = z.object({
507
- id: IdFileParser$inboundSchema,
508
- max_files: z.number().optional(),
509
- pdf: z.lazy(() => Pdf$inboundSchema).optional(),
510
- }).transform((v) => {
511
- return remap$(v, {
512
- "max_files": "maxFiles",
513
- });
514
- });
515
196
  /** @internal */
516
197
  export const PluginFileParser$outboundSchema = z.object({
517
198
  id: IdFileParser$outboundSchema,
@@ -522,72 +203,16 @@ export const PluginFileParser$outboundSchema = z.object({
522
203
  maxFiles: "max_files",
523
204
  });
524
205
  });
525
- /**
526
- * @internal
527
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
528
- */
529
- export var PluginFileParser$;
530
- (function (PluginFileParser$) {
531
- /** @deprecated use `PluginFileParser$inboundSchema` instead. */
532
- PluginFileParser$.inboundSchema = PluginFileParser$inboundSchema;
533
- /** @deprecated use `PluginFileParser$outboundSchema` instead. */
534
- PluginFileParser$.outboundSchema = PluginFileParser$outboundSchema;
535
- })(PluginFileParser$ || (PluginFileParser$ = {}));
536
206
  export function pluginFileParserToJSON(pluginFileParser) {
537
207
  return JSON.stringify(PluginFileParser$outboundSchema.parse(pluginFileParser));
538
208
  }
539
- export function pluginFileParserFromJSON(jsonString) {
540
- return safeParse(jsonString, (x) => PluginFileParser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginFileParser' from JSON`);
541
- }
542
- /** @internal */
543
- export const IdWeb$inboundSchema = z.enum(IdWeb);
544
- /** @internal */
545
- export const IdWeb$outboundSchema = IdWeb$inboundSchema;
546
- /**
547
- * @internal
548
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
549
- */
550
- export var IdWeb$;
551
- (function (IdWeb$) {
552
- /** @deprecated use `IdWeb$inboundSchema` instead. */
553
- IdWeb$.inboundSchema = IdWeb$inboundSchema;
554
- /** @deprecated use `IdWeb$outboundSchema` instead. */
555
- IdWeb$.outboundSchema = IdWeb$outboundSchema;
556
- })(IdWeb$ || (IdWeb$ = {}));
557
209
  /** @internal */
558
- export const Engine$inboundSchema = z
559
- .union([
560
- z.enum(Engine),
561
- z.string().transform(catchUnrecognizedEnum),
562
- ]);
210
+ export const IdWeb$outboundSchema = z.enum(IdWeb);
563
211
  /** @internal */
564
212
  export const Engine$outboundSchema = z.union([
565
213
  z.enum(Engine),
566
214
  z.string().and(z.custom()),
567
215
  ]);
568
- /**
569
- * @internal
570
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
571
- */
572
- export var Engine$;
573
- (function (Engine$) {
574
- /** @deprecated use `Engine$inboundSchema` instead. */
575
- Engine$.inboundSchema = Engine$inboundSchema;
576
- /** @deprecated use `Engine$outboundSchema` instead. */
577
- Engine$.outboundSchema = Engine$outboundSchema;
578
- })(Engine$ || (Engine$ = {}));
579
- /** @internal */
580
- export const PluginWeb$inboundSchema = z.object({
581
- id: IdWeb$inboundSchema,
582
- max_results: z.number().optional(),
583
- search_prompt: z.string().optional(),
584
- engine: Engine$inboundSchema.optional(),
585
- }).transform((v) => {
586
- return remap$(v, {
587
- "max_results": "maxResults",
588
- "search_prompt": "searchPrompt",
589
- });
590
- });
591
216
  /** @internal */
592
217
  export const PluginWeb$outboundSchema = z.object({
593
218
  id: IdWeb$outboundSchema,
@@ -600,70 +225,19 @@ export const PluginWeb$outboundSchema = z.object({
600
225
  searchPrompt: "search_prompt",
601
226
  });
602
227
  });
603
- /**
604
- * @internal
605
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
606
- */
607
- export var PluginWeb$;
608
- (function (PluginWeb$) {
609
- /** @deprecated use `PluginWeb$inboundSchema` instead. */
610
- PluginWeb$.inboundSchema = PluginWeb$inboundSchema;
611
- /** @deprecated use `PluginWeb$outboundSchema` instead. */
612
- PluginWeb$.outboundSchema = PluginWeb$outboundSchema;
613
- })(PluginWeb$ || (PluginWeb$ = {}));
614
228
  export function pluginWebToJSON(pluginWeb) {
615
229
  return JSON.stringify(PluginWeb$outboundSchema.parse(pluginWeb));
616
230
  }
617
- export function pluginWebFromJSON(jsonString) {
618
- return safeParse(jsonString, (x) => PluginWeb$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginWeb' from JSON`);
619
- }
620
231
  /** @internal */
621
- export const IdModeration$inboundSchema = z
232
+ export const IdModeration$outboundSchema = z
622
233
  .enum(IdModeration);
623
234
  /** @internal */
624
- export const IdModeration$outboundSchema = IdModeration$inboundSchema;
625
- /**
626
- * @internal
627
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
628
- */
629
- export var IdModeration$;
630
- (function (IdModeration$) {
631
- /** @deprecated use `IdModeration$inboundSchema` instead. */
632
- IdModeration$.inboundSchema = IdModeration$inboundSchema;
633
- /** @deprecated use `IdModeration$outboundSchema` instead. */
634
- IdModeration$.outboundSchema = IdModeration$outboundSchema;
635
- })(IdModeration$ || (IdModeration$ = {}));
636
- /** @internal */
637
- export const PluginModeration$inboundSchema = z.object({
638
- id: IdModeration$inboundSchema,
639
- });
640
- /** @internal */
641
235
  export const PluginModeration$outboundSchema = z.object({
642
236
  id: IdModeration$outboundSchema,
643
237
  });
644
- /**
645
- * @internal
646
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
647
- */
648
- export var PluginModeration$;
649
- (function (PluginModeration$) {
650
- /** @deprecated use `PluginModeration$inboundSchema` instead. */
651
- PluginModeration$.inboundSchema = PluginModeration$inboundSchema;
652
- /** @deprecated use `PluginModeration$outboundSchema` instead. */
653
- PluginModeration$.outboundSchema = PluginModeration$outboundSchema;
654
- })(PluginModeration$ || (PluginModeration$ = {}));
655
238
  export function pluginModerationToJSON(pluginModeration) {
656
239
  return JSON.stringify(PluginModeration$outboundSchema.parse(pluginModeration));
657
240
  }
658
- export function pluginModerationFromJSON(jsonString) {
659
- return safeParse(jsonString, (x) => PluginModeration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PluginModeration' from JSON`);
660
- }
661
- /** @internal */
662
- export const Plugin$inboundSchema = z.union([
663
- z.lazy(() => PluginModeration$inboundSchema),
664
- z.lazy(() => PluginWeb$inboundSchema),
665
- z.lazy(() => PluginFileParser$inboundSchema),
666
- ]);
667
241
  /** @internal */
668
242
  export const Plugin$outboundSchema = z
669
243
  .union([
@@ -671,76 +245,9 @@ export const Plugin$outboundSchema = z
671
245
  z.lazy(() => PluginWeb$outboundSchema),
672
246
  z.lazy(() => PluginFileParser$outboundSchema),
673
247
  ]);
674
- /**
675
- * @internal
676
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
677
- */
678
- export var Plugin$;
679
- (function (Plugin$) {
680
- /** @deprecated use `Plugin$inboundSchema` instead. */
681
- Plugin$.inboundSchema = Plugin$inboundSchema;
682
- /** @deprecated use `Plugin$outboundSchema` instead. */
683
- Plugin$.outboundSchema = Plugin$outboundSchema;
684
- })(Plugin$ || (Plugin$ = {}));
685
248
  export function pluginToJSON(plugin) {
686
249
  return JSON.stringify(Plugin$outboundSchema.parse(plugin));
687
250
  }
688
- export function pluginFromJSON(jsonString) {
689
- return safeParse(jsonString, (x) => Plugin$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Plugin' from JSON`);
690
- }
691
- /** @internal */
692
- export const OpenResponsesRequest$inboundSchema = z.object({
693
- input: OpenResponsesInput$inboundSchema.optional(),
694
- instructions: z.nullable(z.string()).optional(),
695
- metadata: z.nullable(z.record(z.string(), z.string())).optional(),
696
- tools: z.array(z.union([
697
- z.lazy(() => OpenResponsesRequestToolFunction$inboundSchema),
698
- OpenResponsesWebSearchPreviewTool$inboundSchema,
699
- OpenResponsesWebSearchPreview20250311Tool$inboundSchema,
700
- OpenResponsesWebSearchTool$inboundSchema,
701
- OpenResponsesWebSearch20250826Tool$inboundSchema,
702
- ])).optional(),
703
- tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema.optional(),
704
- parallel_tool_calls: z.nullable(z.boolean()).optional(),
705
- model: z.string().optional(),
706
- models: z.array(z.string()).optional(),
707
- text: OpenResponsesResponseText$inboundSchema.optional(),
708
- reasoning: z.nullable(OpenResponsesReasoningConfig$inboundSchema).optional(),
709
- max_output_tokens: z.nullable(z.number()).optional(),
710
- temperature: z.nullable(z.number()).optional(),
711
- top_p: z.nullable(z.number()).optional(),
712
- top_k: z.number().optional(),
713
- prompt_cache_key: z.nullable(z.string()).optional(),
714
- previous_response_id: z.nullable(z.string()).optional(),
715
- prompt: z.nullable(OpenAIResponsesPrompt$inboundSchema).optional(),
716
- include: z.nullable(z.array(OpenAIResponsesIncludable$inboundSchema))
717
- .optional(),
718
- background: z.nullable(z.boolean()).optional(),
719
- safety_identifier: z.nullable(z.string()).optional(),
720
- store: z.nullable(z.boolean()).optional(),
721
- service_tier: z.nullable(ServiceTier$inboundSchema).optional(),
722
- truncation: z.nullable(Truncation$inboundSchema).optional(),
723
- stream: z.boolean().default(false),
724
- provider: z.nullable(z.lazy(() => Provider$inboundSchema)).optional(),
725
- plugins: z.array(z.union([
726
- z.lazy(() => PluginModeration$inboundSchema),
727
- z.lazy(() => PluginWeb$inboundSchema),
728
- z.lazy(() => PluginFileParser$inboundSchema),
729
- ])).optional(),
730
- user: z.string().optional(),
731
- }).transform((v) => {
732
- return remap$(v, {
733
- "tool_choice": "toolChoice",
734
- "parallel_tool_calls": "parallelToolCalls",
735
- "max_output_tokens": "maxOutputTokens",
736
- "top_p": "topP",
737
- "top_k": "topK",
738
- "prompt_cache_key": "promptCacheKey",
739
- "previous_response_id": "previousResponseId",
740
- "safety_identifier": "safetyIdentifier",
741
- "service_tier": "serviceTier",
742
- });
743
- });
744
251
  /** @internal */
745
252
  export const OpenResponsesRequest$outboundSchema = z.object({
746
253
  input: OpenResponsesInput$outboundSchema.optional(),
@@ -794,21 +301,7 @@ export const OpenResponsesRequest$outboundSchema = z.object({
794
301
  serviceTier: "service_tier",
795
302
  });
796
303
  });
797
- /**
798
- * @internal
799
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
800
- */
801
- export var OpenResponsesRequest$;
802
- (function (OpenResponsesRequest$) {
803
- /** @deprecated use `OpenResponsesRequest$inboundSchema` instead. */
804
- OpenResponsesRequest$.inboundSchema = OpenResponsesRequest$inboundSchema;
805
- /** @deprecated use `OpenResponsesRequest$outboundSchema` instead. */
806
- OpenResponsesRequest$.outboundSchema = OpenResponsesRequest$outboundSchema;
807
- })(OpenResponsesRequest$ || (OpenResponsesRequest$ = {}));
808
304
  export function openResponsesRequestToJSON(openResponsesRequest) {
809
305
  return JSON.stringify(OpenResponsesRequest$outboundSchema.parse(openResponsesRequest));
810
306
  }
811
- export function openResponsesRequestFromJSON(jsonString) {
812
- return safeParse(jsonString, (x) => OpenResponsesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesRequest' from JSON`);
813
- }
814
307
  //# sourceMappingURL=openresponsesrequest.js.map