@openrouter/sdk 0.1.2 → 0.1.4

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 +6 -70
  20. package/esm/models/chatgenerationtokenusage.js +7 -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 +5 -356
  198. package/esm/models/openresponsesrequest.js +18 -530
  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 +5 -330
  220. package/esm/models/operations/createembeddings.js +4 -404
  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,16 +3,8 @@
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 { ResponseFormatJSONSchema$inboundSchema, ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js";
8
- import { ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
9
- /** @internal */
10
- export const Prompt$inboundSchema = z.union([
11
- z.string(),
12
- z.array(z.string()),
13
- z.array(z.number()),
14
- z.array(z.array(z.number())),
15
- ]);
6
+ import { ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js";
7
+ import { ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js";
16
8
  /** @internal */
17
9
  export const Prompt$outboundSchema = z
18
10
  .union([
@@ -21,53 +13,14 @@ export const Prompt$outboundSchema = z
21
13
  z.array(z.number()),
22
14
  z.array(z.array(z.number())),
23
15
  ]);
24
- /**
25
- * @internal
26
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27
- */
28
- export var Prompt$;
29
- (function (Prompt$) {
30
- /** @deprecated use `Prompt$inboundSchema` instead. */
31
- Prompt$.inboundSchema = Prompt$inboundSchema;
32
- /** @deprecated use `Prompt$outboundSchema` instead. */
33
- Prompt$.outboundSchema = Prompt$outboundSchema;
34
- })(Prompt$ || (Prompt$ = {}));
35
16
  export function promptToJSON(prompt) {
36
17
  return JSON.stringify(Prompt$outboundSchema.parse(prompt));
37
18
  }
38
- export function promptFromJSON(jsonString) {
39
- return safeParse(jsonString, (x) => Prompt$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Prompt' from JSON`);
40
- }
41
- /** @internal */
42
- export const CompletionCreateParamsStop$inboundSchema = z.union([z.string(), z.array(z.string())]);
43
19
  /** @internal */
44
20
  export const CompletionCreateParamsStop$outboundSchema = z.union([z.string(), z.array(z.string())]);
45
- /**
46
- * @internal
47
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
- */
49
- export var CompletionCreateParamsStop$;
50
- (function (CompletionCreateParamsStop$) {
51
- /** @deprecated use `CompletionCreateParamsStop$inboundSchema` instead. */
52
- CompletionCreateParamsStop$.inboundSchema = CompletionCreateParamsStop$inboundSchema;
53
- /** @deprecated use `CompletionCreateParamsStop$outboundSchema` instead. */
54
- CompletionCreateParamsStop$.outboundSchema = CompletionCreateParamsStop$outboundSchema;
55
- })(CompletionCreateParamsStop$ || (CompletionCreateParamsStop$ = {}));
56
21
  export function completionCreateParamsStopToJSON(completionCreateParamsStop) {
57
22
  return JSON.stringify(CompletionCreateParamsStop$outboundSchema.parse(completionCreateParamsStop));
58
23
  }
59
- export function completionCreateParamsStopFromJSON(jsonString) {
60
- return safeParse(jsonString, (x) => CompletionCreateParamsStop$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsStop' from JSON`);
61
- }
62
- /** @internal */
63
- export const StreamOptions$inboundSchema = z
64
- .object({
65
- include_usage: z.nullable(z.boolean()).optional(),
66
- }).transform((v) => {
67
- return remap$(v, {
68
- "include_usage": "includeUsage",
69
- });
70
- });
71
24
  /** @internal */
72
25
  export const StreamOptions$outboundSchema = z.object({
73
26
  includeUsage: z.nullable(z.boolean()).optional(),
@@ -76,106 +29,30 @@ export const StreamOptions$outboundSchema = z.object({
76
29
  includeUsage: "include_usage",
77
30
  });
78
31
  });
79
- /**
80
- * @internal
81
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
- */
83
- export var StreamOptions$;
84
- (function (StreamOptions$) {
85
- /** @deprecated use `StreamOptions$inboundSchema` instead. */
86
- StreamOptions$.inboundSchema = StreamOptions$inboundSchema;
87
- /** @deprecated use `StreamOptions$outboundSchema` instead. */
88
- StreamOptions$.outboundSchema = StreamOptions$outboundSchema;
89
- })(StreamOptions$ || (StreamOptions$ = {}));
90
32
  export function streamOptionsToJSON(streamOptions) {
91
33
  return JSON.stringify(StreamOptions$outboundSchema.parse(streamOptions));
92
34
  }
93
- export function streamOptionsFromJSON(jsonString) {
94
- return safeParse(jsonString, (x) => StreamOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StreamOptions' from JSON`);
95
- }
96
- /** @internal */
97
- export const CompletionCreateParamsResponseFormatPython$inboundSchema = z.object({
98
- type: z.literal("python"),
99
- });
100
35
  /** @internal */
101
36
  export const CompletionCreateParamsResponseFormatPython$outboundSchema = z.object({
102
37
  type: z.literal("python"),
103
38
  });
104
- /**
105
- * @internal
106
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
107
- */
108
- export var CompletionCreateParamsResponseFormatPython$;
109
- (function (CompletionCreateParamsResponseFormatPython$) {
110
- /** @deprecated use `CompletionCreateParamsResponseFormatPython$inboundSchema` instead. */
111
- CompletionCreateParamsResponseFormatPython$.inboundSchema = CompletionCreateParamsResponseFormatPython$inboundSchema;
112
- /** @deprecated use `CompletionCreateParamsResponseFormatPython$outboundSchema` instead. */
113
- CompletionCreateParamsResponseFormatPython$.outboundSchema = CompletionCreateParamsResponseFormatPython$outboundSchema;
114
- })(CompletionCreateParamsResponseFormatPython$ || (CompletionCreateParamsResponseFormatPython$ = {}));
115
39
  export function completionCreateParamsResponseFormatPythonToJSON(completionCreateParamsResponseFormatPython) {
116
40
  return JSON.stringify(CompletionCreateParamsResponseFormatPython$outboundSchema.parse(completionCreateParamsResponseFormatPython));
117
41
  }
118
- export function completionCreateParamsResponseFormatPythonFromJSON(jsonString) {
119
- return safeParse(jsonString, (x) => CompletionCreateParamsResponseFormatPython$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsResponseFormatPython' from JSON`);
120
- }
121
- /** @internal */
122
- export const CompletionCreateParamsResponseFormatJSONObject$inboundSchema = z.object({
123
- type: z.literal("json_object"),
124
- });
125
42
  /** @internal */
126
43
  export const CompletionCreateParamsResponseFormatJSONObject$outboundSchema = z.object({
127
44
  type: z.literal("json_object"),
128
45
  });
129
- /**
130
- * @internal
131
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
132
- */
133
- export var CompletionCreateParamsResponseFormatJSONObject$;
134
- (function (CompletionCreateParamsResponseFormatJSONObject$) {
135
- /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$inboundSchema` instead. */
136
- CompletionCreateParamsResponseFormatJSONObject$.inboundSchema = CompletionCreateParamsResponseFormatJSONObject$inboundSchema;
137
- /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$outboundSchema` instead. */
138
- CompletionCreateParamsResponseFormatJSONObject$.outboundSchema = CompletionCreateParamsResponseFormatJSONObject$outboundSchema;
139
- })(CompletionCreateParamsResponseFormatJSONObject$ || (CompletionCreateParamsResponseFormatJSONObject$ = {}));
140
46
  export function completionCreateParamsResponseFormatJSONObjectToJSON(completionCreateParamsResponseFormatJSONObject) {
141
47
  return JSON.stringify(CompletionCreateParamsResponseFormatJSONObject$outboundSchema.parse(completionCreateParamsResponseFormatJSONObject));
142
48
  }
143
- export function completionCreateParamsResponseFormatJSONObjectFromJSON(jsonString) {
144
- return safeParse(jsonString, (x) => CompletionCreateParamsResponseFormatJSONObject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsResponseFormatJSONObject' from JSON`);
145
- }
146
- /** @internal */
147
- export const CompletionCreateParamsResponseFormatText$inboundSchema = z.object({
148
- type: z.literal("text"),
149
- });
150
49
  /** @internal */
151
50
  export const CompletionCreateParamsResponseFormatText$outboundSchema = z.object({
152
51
  type: z.literal("text"),
153
52
  });
154
- /**
155
- * @internal
156
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
157
- */
158
- export var CompletionCreateParamsResponseFormatText$;
159
- (function (CompletionCreateParamsResponseFormatText$) {
160
- /** @deprecated use `CompletionCreateParamsResponseFormatText$inboundSchema` instead. */
161
- CompletionCreateParamsResponseFormatText$.inboundSchema = CompletionCreateParamsResponseFormatText$inboundSchema;
162
- /** @deprecated use `CompletionCreateParamsResponseFormatText$outboundSchema` instead. */
163
- CompletionCreateParamsResponseFormatText$.outboundSchema = CompletionCreateParamsResponseFormatText$outboundSchema;
164
- })(CompletionCreateParamsResponseFormatText$ || (CompletionCreateParamsResponseFormatText$ = {}));
165
53
  export function completionCreateParamsResponseFormatTextToJSON(completionCreateParamsResponseFormatText) {
166
54
  return JSON.stringify(CompletionCreateParamsResponseFormatText$outboundSchema.parse(completionCreateParamsResponseFormatText));
167
55
  }
168
- export function completionCreateParamsResponseFormatTextFromJSON(jsonString) {
169
- return safeParse(jsonString, (x) => CompletionCreateParamsResponseFormatText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsResponseFormatText' from JSON`);
170
- }
171
- /** @internal */
172
- export const CompletionCreateParamsResponseFormatUnion$inboundSchema = z.union([
173
- ResponseFormatJSONSchema$inboundSchema,
174
- ResponseFormatTextGrammar$inboundSchema,
175
- z.lazy(() => CompletionCreateParamsResponseFormatText$inboundSchema),
176
- z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$inboundSchema),
177
- z.lazy(() => CompletionCreateParamsResponseFormatPython$inboundSchema),
178
- ]);
179
56
  /** @internal */
180
57
  export const CompletionCreateParamsResponseFormatUnion$outboundSchema = z.union([
181
58
  ResponseFormatJSONSchema$outboundSchema,
@@ -184,70 +61,9 @@ export const CompletionCreateParamsResponseFormatUnion$outboundSchema = z.union(
184
61
  z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$outboundSchema),
185
62
  z.lazy(() => CompletionCreateParamsResponseFormatPython$outboundSchema),
186
63
  ]);
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 CompletionCreateParamsResponseFormatUnion$;
192
- (function (CompletionCreateParamsResponseFormatUnion$) {
193
- /** @deprecated use `CompletionCreateParamsResponseFormatUnion$inboundSchema` instead. */
194
- CompletionCreateParamsResponseFormatUnion$.inboundSchema = CompletionCreateParamsResponseFormatUnion$inboundSchema;
195
- /** @deprecated use `CompletionCreateParamsResponseFormatUnion$outboundSchema` instead. */
196
- CompletionCreateParamsResponseFormatUnion$.outboundSchema = CompletionCreateParamsResponseFormatUnion$outboundSchema;
197
- })(CompletionCreateParamsResponseFormatUnion$ || (CompletionCreateParamsResponseFormatUnion$ = {}));
198
64
  export function completionCreateParamsResponseFormatUnionToJSON(completionCreateParamsResponseFormatUnion) {
199
65
  return JSON.stringify(CompletionCreateParamsResponseFormatUnion$outboundSchema.parse(completionCreateParamsResponseFormatUnion));
200
66
  }
201
- export function completionCreateParamsResponseFormatUnionFromJSON(jsonString) {
202
- return safeParse(jsonString, (x) => CompletionCreateParamsResponseFormatUnion$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParamsResponseFormatUnion' from JSON`);
203
- }
204
- /** @internal */
205
- export const CompletionCreateParams$inboundSchema = z.object({
206
- model: z.string().optional(),
207
- models: z.array(z.string()).optional(),
208
- prompt: z.union([
209
- z.string(),
210
- z.array(z.string()),
211
- z.array(z.number()),
212
- z.array(z.array(z.number())),
213
- ]),
214
- best_of: z.nullable(z.number().int()).optional(),
215
- echo: z.nullable(z.boolean()).optional(),
216
- frequency_penalty: z.nullable(z.number()).optional(),
217
- logit_bias: z.nullable(z.record(z.string(), z.number())).optional(),
218
- logprobs: z.nullable(z.number().int()).optional(),
219
- max_tokens: z.nullable(z.number().int()).optional(),
220
- n: z.nullable(z.number().int()).optional(),
221
- presence_penalty: z.nullable(z.number()).optional(),
222
- seed: z.nullable(z.number().int()).optional(),
223
- stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
224
- stream: z.boolean().default(false),
225
- stream_options: z.nullable(z.lazy(() => StreamOptions$inboundSchema))
226
- .optional(),
227
- suffix: z.nullable(z.string()).optional(),
228
- temperature: z.nullable(z.number()).optional(),
229
- top_p: z.nullable(z.number()).optional(),
230
- user: z.string().optional(),
231
- metadata: z.nullable(z.record(z.string(), z.string())).optional(),
232
- response_format: z.nullable(z.union([
233
- ResponseFormatJSONSchema$inboundSchema,
234
- ResponseFormatTextGrammar$inboundSchema,
235
- z.lazy(() => CompletionCreateParamsResponseFormatText$inboundSchema),
236
- z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$inboundSchema),
237
- z.lazy(() => CompletionCreateParamsResponseFormatPython$inboundSchema),
238
- ])).optional(),
239
- }).transform((v) => {
240
- return remap$(v, {
241
- "best_of": "bestOf",
242
- "frequency_penalty": "frequencyPenalty",
243
- "logit_bias": "logitBias",
244
- "max_tokens": "maxTokens",
245
- "presence_penalty": "presencePenalty",
246
- "stream_options": "streamOptions",
247
- "top_p": "topP",
248
- "response_format": "responseFormat",
249
- });
250
- });
251
67
  /** @internal */
252
68
  export const CompletionCreateParams$outboundSchema = z.object({
253
69
  model: z.string().optional(),
@@ -295,21 +111,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
295
111
  responseFormat: "response_format",
296
112
  });
297
113
  });
298
- /**
299
- * @internal
300
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
301
- */
302
- export var CompletionCreateParams$;
303
- (function (CompletionCreateParams$) {
304
- /** @deprecated use `CompletionCreateParams$inboundSchema` instead. */
305
- CompletionCreateParams$.inboundSchema = CompletionCreateParams$inboundSchema;
306
- /** @deprecated use `CompletionCreateParams$outboundSchema` instead. */
307
- CompletionCreateParams$.outboundSchema = CompletionCreateParams$outboundSchema;
308
- })(CompletionCreateParams$ || (CompletionCreateParams$ = {}));
309
114
  export function completionCreateParamsToJSON(completionCreateParams) {
310
115
  return JSON.stringify(CompletionCreateParams$outboundSchema.parse(completionCreateParams));
311
116
  }
312
- export function completionCreateParamsFromJSON(jsonString) {
313
- return safeParse(jsonString, (x) => CompletionCreateParams$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionCreateParams' from JSON`);
314
- }
315
117
  //# sourceMappingURL=completioncreateparams.js.map
@@ -11,29 +11,5 @@ export type CompletionLogprobs = {
11
11
  };
12
12
  /** @internal */
13
13
  export declare const CompletionLogprobs$inboundSchema: z.ZodType<CompletionLogprobs, unknown>;
14
- /** @internal */
15
- export type CompletionLogprobs$Outbound = {
16
- tokens: Array<string>;
17
- token_logprobs: Array<number>;
18
- top_logprobs: Array<{
19
- [k: string]: number;
20
- }> | null;
21
- text_offset: Array<number>;
22
- };
23
- /** @internal */
24
- export declare const CompletionLogprobs$outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs>;
25
- /**
26
- * @internal
27
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
28
- */
29
- export declare namespace CompletionLogprobs$ {
30
- /** @deprecated use `CompletionLogprobs$inboundSchema` instead. */
31
- const inboundSchema: z.ZodType<CompletionLogprobs, unknown, z.core.$ZodTypeInternals<CompletionLogprobs, unknown>>;
32
- /** @deprecated use `CompletionLogprobs$outboundSchema` instead. */
33
- const outboundSchema: z.ZodType<CompletionLogprobs$Outbound, CompletionLogprobs, z.core.$ZodTypeInternals<CompletionLogprobs$Outbound, CompletionLogprobs>>;
34
- /** @deprecated use `CompletionLogprobs$Outbound` instead. */
35
- type Outbound = CompletionLogprobs$Outbound;
36
- }
37
- export declare function completionLogprobsToJSON(completionLogprobs: CompletionLogprobs): string;
38
14
  export declare function completionLogprobsFromJSON(jsonString: string): SafeParseResult<CompletionLogprobs, SDKValidationError>;
39
15
  //# sourceMappingURL=completionlogprobs.d.ts.map
@@ -17,33 +17,6 @@ export const CompletionLogprobs$inboundSchema = z.object({
17
17
  "text_offset": "textOffset",
18
18
  });
19
19
  });
20
- /** @internal */
21
- export const CompletionLogprobs$outboundSchema = z.object({
22
- tokens: z.array(z.string()),
23
- tokenLogprobs: z.array(z.number()),
24
- topLogprobs: z.nullable(z.array(z.record(z.string(), z.number()))),
25
- textOffset: z.array(z.number()),
26
- }).transform((v) => {
27
- return remap$(v, {
28
- tokenLogprobs: "token_logprobs",
29
- topLogprobs: "top_logprobs",
30
- textOffset: "text_offset",
31
- });
32
- });
33
- /**
34
- * @internal
35
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
36
- */
37
- export var CompletionLogprobs$;
38
- (function (CompletionLogprobs$) {
39
- /** @deprecated use `CompletionLogprobs$inboundSchema` instead. */
40
- CompletionLogprobs$.inboundSchema = CompletionLogprobs$inboundSchema;
41
- /** @deprecated use `CompletionLogprobs$outboundSchema` instead. */
42
- CompletionLogprobs$.outboundSchema = CompletionLogprobs$outboundSchema;
43
- })(CompletionLogprobs$ || (CompletionLogprobs$ = {}));
44
- export function completionLogprobsToJSON(completionLogprobs) {
45
- return JSON.stringify(CompletionLogprobs$outboundSchema.parse(completionLogprobs));
46
- }
47
20
  export function completionLogprobsFromJSON(jsonString) {
48
21
  return safeParse(jsonString, (x) => CompletionLogprobs$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionLogprobs' from JSON`);
49
22
  }
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
- import { CompletionChoice, CompletionChoice$Outbound } from "./completionchoice.js";
4
- import { CompletionUsage, CompletionUsage$Outbound } from "./completionusage.js";
3
+ import { CompletionChoice } from "./completionchoice.js";
4
+ import { CompletionUsage } from "./completionusage.js";
5
5
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
6
6
  export type CompletionResponse = {
7
7
  id: string;
@@ -14,30 +14,5 @@ export type CompletionResponse = {
14
14
  };
15
15
  /** @internal */
16
16
  export declare const CompletionResponse$inboundSchema: z.ZodType<CompletionResponse, unknown>;
17
- /** @internal */
18
- export type CompletionResponse$Outbound = {
19
- id: string;
20
- object: "text_completion";
21
- created: number;
22
- model: string;
23
- system_fingerprint?: string | undefined;
24
- choices: Array<CompletionChoice$Outbound>;
25
- usage?: CompletionUsage$Outbound | undefined;
26
- };
27
- /** @internal */
28
- export declare const CompletionResponse$outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse>;
29
- /**
30
- * @internal
31
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
32
- */
33
- export declare namespace CompletionResponse$ {
34
- /** @deprecated use `CompletionResponse$inboundSchema` instead. */
35
- const inboundSchema: z.ZodType<CompletionResponse, unknown, z.core.$ZodTypeInternals<CompletionResponse, unknown>>;
36
- /** @deprecated use `CompletionResponse$outboundSchema` instead. */
37
- const outboundSchema: z.ZodType<CompletionResponse$Outbound, CompletionResponse, z.core.$ZodTypeInternals<CompletionResponse$Outbound, CompletionResponse>>;
38
- /** @deprecated use `CompletionResponse$Outbound` instead. */
39
- type Outbound = CompletionResponse$Outbound;
40
- }
41
- export declare function completionResponseToJSON(completionResponse: CompletionResponse): string;
42
17
  export declare function completionResponseFromJSON(jsonString: string): SafeParseResult<CompletionResponse, SDKValidationError>;
43
18
  //# sourceMappingURL=completionresponse.d.ts.map
@@ -4,8 +4,8 @@
4
4
  import * as z from "zod/v4";
5
5
  import { remap as remap$ } from "../lib/primitives.js";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { CompletionChoice$inboundSchema, CompletionChoice$outboundSchema, } from "./completionchoice.js";
8
- import { CompletionUsage$inboundSchema, CompletionUsage$outboundSchema, } from "./completionusage.js";
7
+ import { CompletionChoice$inboundSchema, } from "./completionchoice.js";
8
+ import { CompletionUsage$inboundSchema, } from "./completionusage.js";
9
9
  /** @internal */
10
10
  export const CompletionResponse$inboundSchema = z.object({
11
11
  id: z.string(),
@@ -20,34 +20,6 @@ export const CompletionResponse$inboundSchema = z.object({
20
20
  "system_fingerprint": "systemFingerprint",
21
21
  });
22
22
  });
23
- /** @internal */
24
- export const CompletionResponse$outboundSchema = z.object({
25
- id: z.string(),
26
- object: z.literal("text_completion"),
27
- created: z.number(),
28
- model: z.string(),
29
- systemFingerprint: z.string().optional(),
30
- choices: z.array(CompletionChoice$outboundSchema),
31
- usage: CompletionUsage$outboundSchema.optional(),
32
- }).transform((v) => {
33
- return remap$(v, {
34
- systemFingerprint: "system_fingerprint",
35
- });
36
- });
37
- /**
38
- * @internal
39
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
- */
41
- export var CompletionResponse$;
42
- (function (CompletionResponse$) {
43
- /** @deprecated use `CompletionResponse$inboundSchema` instead. */
44
- CompletionResponse$.inboundSchema = CompletionResponse$inboundSchema;
45
- /** @deprecated use `CompletionResponse$outboundSchema` instead. */
46
- CompletionResponse$.outboundSchema = CompletionResponse$outboundSchema;
47
- })(CompletionResponse$ || (CompletionResponse$ = {}));
48
- export function completionResponseToJSON(completionResponse) {
49
- return JSON.stringify(CompletionResponse$outboundSchema.parse(completionResponse));
50
- }
51
23
  export function completionResponseFromJSON(jsonString) {
52
24
  return safeParse(jsonString, (x) => CompletionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionResponse' from JSON`);
53
25
  }
@@ -8,26 +8,5 @@ export type CompletionUsage = {
8
8
  };
9
9
  /** @internal */
10
10
  export declare const CompletionUsage$inboundSchema: z.ZodType<CompletionUsage, unknown>;
11
- /** @internal */
12
- export type CompletionUsage$Outbound = {
13
- prompt_tokens: number;
14
- completion_tokens: number;
15
- total_tokens: number;
16
- };
17
- /** @internal */
18
- export declare const CompletionUsage$outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage>;
19
- /**
20
- * @internal
21
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
22
- */
23
- export declare namespace CompletionUsage$ {
24
- /** @deprecated use `CompletionUsage$inboundSchema` instead. */
25
- const inboundSchema: z.ZodType<CompletionUsage, unknown, z.core.$ZodTypeInternals<CompletionUsage, unknown>>;
26
- /** @deprecated use `CompletionUsage$outboundSchema` instead. */
27
- const outboundSchema: z.ZodType<CompletionUsage$Outbound, CompletionUsage, z.core.$ZodTypeInternals<CompletionUsage$Outbound, CompletionUsage>>;
28
- /** @deprecated use `CompletionUsage$Outbound` instead. */
29
- type Outbound = CompletionUsage$Outbound;
30
- }
31
- export declare function completionUsageToJSON(completionUsage: CompletionUsage): string;
32
11
  export declare function completionUsageFromJSON(jsonString: string): SafeParseResult<CompletionUsage, SDKValidationError>;
33
12
  //# sourceMappingURL=completionusage.d.ts.map
@@ -16,32 +16,6 @@ export const CompletionUsage$inboundSchema = z.object({
16
16
  "total_tokens": "totalTokens",
17
17
  });
18
18
  });
19
- /** @internal */
20
- export const CompletionUsage$outboundSchema = z.object({
21
- promptTokens: z.number(),
22
- completionTokens: z.number(),
23
- totalTokens: z.number(),
24
- }).transform((v) => {
25
- return remap$(v, {
26
- promptTokens: "prompt_tokens",
27
- completionTokens: "completion_tokens",
28
- totalTokens: "total_tokens",
29
- });
30
- });
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export var CompletionUsage$;
36
- (function (CompletionUsage$) {
37
- /** @deprecated use `CompletionUsage$inboundSchema` instead. */
38
- CompletionUsage$.inboundSchema = CompletionUsage$inboundSchema;
39
- /** @deprecated use `CompletionUsage$outboundSchema` instead. */
40
- CompletionUsage$.outboundSchema = CompletionUsage$outboundSchema;
41
- })(CompletionUsage$ || (CompletionUsage$ = {}));
42
- export function completionUsageToJSON(completionUsage) {
43
- return JSON.stringify(CompletionUsage$outboundSchema.parse(completionUsage));
44
- }
45
19
  export function completionUsageFromJSON(jsonString) {
46
20
  return safeParse(jsonString, (x) => CompletionUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CompletionUsage' from JSON`);
47
21
  }
@@ -1,7 +1,5 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
3
  export declare const ChainId: {
6
4
  readonly One: 1;
7
5
  readonly OneHundredAndThirtySeven: 137;
@@ -17,21 +15,7 @@ export type CreateChargeRequest = {
17
15
  chainId: ChainId;
18
16
  };
19
17
  /** @internal */
20
- export declare const ChainId$inboundSchema: z.ZodType<ChainId, unknown>;
21
- /** @internal */
22
18
  export declare const ChainId$outboundSchema: z.ZodType<ChainId, ChainId>;
23
- /**
24
- * @internal
25
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
26
- */
27
- export declare namespace ChainId$ {
28
- /** @deprecated use `ChainId$inboundSchema` instead. */
29
- const inboundSchema: z.ZodType<ChainId, unknown, z.core.$ZodTypeInternals<ChainId, unknown>>;
30
- /** @deprecated use `ChainId$outboundSchema` instead. */
31
- const outboundSchema: z.ZodType<ChainId, ChainId, z.core.$ZodTypeInternals<ChainId, ChainId>>;
32
- }
33
- /** @internal */
34
- export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, unknown>;
35
19
  /** @internal */
36
20
  export type CreateChargeRequest$Outbound = {
37
21
  amount: number;
@@ -40,18 +24,5 @@ export type CreateChargeRequest$Outbound = {
40
24
  };
41
25
  /** @internal */
42
26
  export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest>;
43
- /**
44
- * @internal
45
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
- */
47
- export declare namespace CreateChargeRequest$ {
48
- /** @deprecated use `CreateChargeRequest$inboundSchema` instead. */
49
- const inboundSchema: z.ZodType<CreateChargeRequest, unknown, z.core.$ZodTypeInternals<CreateChargeRequest, unknown>>;
50
- /** @deprecated use `CreateChargeRequest$outboundSchema` instead. */
51
- const outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest, z.core.$ZodTypeInternals<CreateChargeRequest$Outbound, CreateChargeRequest>>;
52
- /** @deprecated use `CreateChargeRequest$Outbound` instead. */
53
- type Outbound = CreateChargeRequest$Outbound;
54
- }
55
27
  export declare function createChargeRequestToJSON(createChargeRequest: CreateChargeRequest): string;
56
- export declare function createChargeRequestFromJSON(jsonString: string): SafeParseResult<CreateChargeRequest, SDKValidationError>;
57
28
  //# sourceMappingURL=createchargerequest.d.ts.map
@@ -3,45 +3,16 @@
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
6
  export const ChainId = {
9
7
  One: 1,
10
8
  OneHundredAndThirtySeven: 137,
11
9
  EightThousandFourHundredAndFiftyThree: 8453,
12
10
  };
13
11
  /** @internal */
14
- export const ChainId$inboundSchema = z
15
- .union([
16
- z.enum(ChainId),
17
- z.number().transform(catchUnrecognizedEnum),
18
- ]);
19
- /** @internal */
20
12
  export const ChainId$outboundSchema = z.union([
21
13
  z.enum(ChainId),
22
14
  z.number().and(z.custom()),
23
15
  ]);
24
- /**
25
- * @internal
26
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27
- */
28
- export var ChainId$;
29
- (function (ChainId$) {
30
- /** @deprecated use `ChainId$inboundSchema` instead. */
31
- ChainId$.inboundSchema = ChainId$inboundSchema;
32
- /** @deprecated use `ChainId$outboundSchema` instead. */
33
- ChainId$.outboundSchema = ChainId$outboundSchema;
34
- })(ChainId$ || (ChainId$ = {}));
35
- /** @internal */
36
- export const CreateChargeRequest$inboundSchema = z.object({
37
- amount: z.number(),
38
- sender: z.string(),
39
- chain_id: ChainId$inboundSchema,
40
- }).transform((v) => {
41
- return remap$(v, {
42
- "chain_id": "chainId",
43
- });
44
- });
45
16
  /** @internal */
46
17
  export const CreateChargeRequest$outboundSchema = z.object({
47
18
  amount: z.number(),
@@ -52,21 +23,7 @@ export const CreateChargeRequest$outboundSchema = z.object({
52
23
  chainId: "chain_id",
53
24
  });
54
25
  });
55
- /**
56
- * @internal
57
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
58
- */
59
- export var CreateChargeRequest$;
60
- (function (CreateChargeRequest$) {
61
- /** @deprecated use `CreateChargeRequest$inboundSchema` instead. */
62
- CreateChargeRequest$.inboundSchema = CreateChargeRequest$inboundSchema;
63
- /** @deprecated use `CreateChargeRequest$outboundSchema` instead. */
64
- CreateChargeRequest$.outboundSchema = CreateChargeRequest$outboundSchema;
65
- })(CreateChargeRequest$ || (CreateChargeRequest$ = {}));
66
26
  export function createChargeRequestToJSON(createChargeRequest) {
67
27
  return JSON.stringify(CreateChargeRequest$outboundSchema.parse(createChargeRequest));
68
28
  }
69
- export function createChargeRequestFromJSON(jsonString) {
70
- return safeParse(jsonString, (x) => CreateChargeRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateChargeRequest' from JSON`);
71
- }
72
29
  //# sourceMappingURL=createchargerequest.js.map
@@ -11,26 +11,5 @@ export type DefaultParameters = {
11
11
  };
12
12
  /** @internal */
13
13
  export declare const DefaultParameters$inboundSchema: z.ZodType<DefaultParameters, unknown>;
14
- /** @internal */
15
- export type DefaultParameters$Outbound = {
16
- temperature?: number | null | undefined;
17
- top_p?: number | null | undefined;
18
- frequency_penalty?: number | null | undefined;
19
- };
20
- /** @internal */
21
- export declare const DefaultParameters$outboundSchema: z.ZodType<DefaultParameters$Outbound, DefaultParameters>;
22
- /**
23
- * @internal
24
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
25
- */
26
- export declare namespace DefaultParameters$ {
27
- /** @deprecated use `DefaultParameters$inboundSchema` instead. */
28
- const inboundSchema: z.ZodType<DefaultParameters, unknown, z.core.$ZodTypeInternals<DefaultParameters, unknown>>;
29
- /** @deprecated use `DefaultParameters$outboundSchema` instead. */
30
- const outboundSchema: z.ZodType<DefaultParameters$Outbound, DefaultParameters, z.core.$ZodTypeInternals<DefaultParameters$Outbound, DefaultParameters>>;
31
- /** @deprecated use `DefaultParameters$Outbound` instead. */
32
- type Outbound = DefaultParameters$Outbound;
33
- }
34
- export declare function defaultParametersToJSON(defaultParameters: DefaultParameters): string;
35
14
  export declare function defaultParametersFromJSON(jsonString: string): SafeParseResult<DefaultParameters, SDKValidationError>;
36
15
  //# sourceMappingURL=defaultparameters.d.ts.map
@@ -15,31 +15,6 @@ export const DefaultParameters$inboundSchema = z.object({
15
15
  "frequency_penalty": "frequencyPenalty",
16
16
  });
17
17
  });
18
- /** @internal */
19
- export const DefaultParameters$outboundSchema = z.object({
20
- temperature: z.nullable(z.number()).optional(),
21
- topP: z.nullable(z.number()).optional(),
22
- frequencyPenalty: z.nullable(z.number()).optional(),
23
- }).transform((v) => {
24
- return remap$(v, {
25
- topP: "top_p",
26
- frequencyPenalty: "frequency_penalty",
27
- });
28
- });
29
- /**
30
- * @internal
31
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
32
- */
33
- export var DefaultParameters$;
34
- (function (DefaultParameters$) {
35
- /** @deprecated use `DefaultParameters$inboundSchema` instead. */
36
- DefaultParameters$.inboundSchema = DefaultParameters$inboundSchema;
37
- /** @deprecated use `DefaultParameters$outboundSchema` instead. */
38
- DefaultParameters$.outboundSchema = DefaultParameters$outboundSchema;
39
- })(DefaultParameters$ || (DefaultParameters$ = {}));
40
- export function defaultParametersToJSON(defaultParameters) {
41
- return JSON.stringify(DefaultParameters$outboundSchema.parse(defaultParameters));
42
- }
43
18
  export function defaultParametersFromJSON(jsonString) {
44
19
  return safeParse(jsonString, (x) => DefaultParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DefaultParameters' from JSON`);
45
20
  }