@openrouter/sdk 0.0.1-beta.8 → 0.0.1

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 (355) hide show
  1. package/FUNCTIONS.md +109 -1
  2. package/REACT_QUERY.md +109 -1
  3. package/README.md +52 -396
  4. package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
  5. package/esm/funcs/analyticsGetUserActivity.js +2 -2
  6. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  7. package/esm/funcs/apiKeysCreate.js +2 -2
  8. package/esm/funcs/apiKeysDelete.d.ts +1 -1
  9. package/esm/funcs/apiKeysDelete.js +2 -2
  10. package/esm/funcs/apiKeysGet.d.ts +1 -1
  11. package/esm/funcs/apiKeysGet.js +2 -2
  12. package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
  13. package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -2
  14. package/esm/funcs/apiKeysList.d.ts +1 -1
  15. package/esm/funcs/apiKeysList.js +2 -2
  16. package/esm/funcs/apiKeysUpdate.d.ts +1 -1
  17. package/esm/funcs/apiKeysUpdate.js +2 -2
  18. package/esm/funcs/betaResponsesSend.d.ts +9 -1
  19. package/esm/funcs/betaResponsesSend.js +38 -14
  20. package/esm/funcs/chatSend.d.ts +7 -0
  21. package/esm/funcs/chatSend.js +1 -7
  22. package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -1
  23. package/esm/funcs/creditsCreateCoinbaseCharge.js +15 -5
  24. package/esm/funcs/creditsGetCredits.d.ts +1 -1
  25. package/esm/funcs/creditsGetCredits.js +2 -2
  26. package/esm/funcs/endpointsList.d.ts +1 -1
  27. package/esm/funcs/endpointsList.js +2 -2
  28. package/esm/funcs/endpointsListZdrEndpoints.d.ts +2 -1
  29. package/esm/funcs/endpointsListZdrEndpoints.js +6 -2
  30. package/esm/funcs/generationsGetGeneration.d.ts +1 -1
  31. package/esm/funcs/generationsGetGeneration.js +13 -2
  32. package/esm/funcs/modelsCount.d.ts +3 -2
  33. package/esm/funcs/modelsCount.js +7 -3
  34. package/esm/funcs/modelsList.d.ts +3 -1
  35. package/esm/funcs/modelsList.js +8 -7
  36. package/esm/funcs/modelsListForUser.d.ts +3 -1
  37. package/esm/funcs/modelsListForUser.js +7 -3
  38. package/esm/funcs/oAuthCreateAuthCode.d.ts +18 -0
  39. package/esm/funcs/oAuthCreateAuthCode.js +82 -0
  40. package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +2 -2
  41. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.d.ts +18 -0
  42. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +82 -0
  43. package/esm/funcs/parametersGetParameters.d.ts +1 -1
  44. package/esm/funcs/parametersGetParameters.js +2 -2
  45. package/esm/funcs/providersList.d.ts +1 -1
  46. package/esm/funcs/providersList.js +1 -1
  47. package/esm/lib/config.d.ts +3 -3
  48. package/esm/lib/config.js +3 -3
  49. package/esm/lib/event-streams.d.ts +1 -1
  50. package/esm/models/badgatewayresponseerrordata.d.ts +40 -0
  51. package/esm/models/badgatewayresponseerrordata.js +35 -0
  52. package/esm/models/badrequestresponseerrordata.d.ts +40 -0
  53. package/esm/models/badrequestresponseerrordata.js +35 -0
  54. package/esm/models/chatgenerationparams.d.ts +12 -12
  55. package/esm/models/chatgenerationparams.js +16 -16
  56. package/esm/models/chatgenerationtokenusage.d.ts +2 -2
  57. package/esm/models/chatgenerationtokenusage.js +2 -4
  58. package/esm/models/chatmessagetokenlogprob.d.ts +15 -15
  59. package/esm/models/chatmessagetokenlogprob.js +16 -15
  60. package/esm/models/chatstreamingresponsechunk.d.ts +15 -15
  61. package/esm/models/chatstreamingresponsechunk.js +15 -15
  62. package/esm/models/completioncreateparams.d.ts +2 -2
  63. package/esm/models/completioncreateparams.js +2 -2
  64. package/esm/models/createchargerequest.d.ts +31 -2
  65. package/esm/models/createchargerequest.js +47 -2
  66. package/esm/models/defaultparameters.d.ts +36 -0
  67. package/esm/models/defaultparameters.js +46 -0
  68. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +40 -0
  69. package/esm/models/edgenetworktimeoutresponseerrordata.js +35 -0
  70. package/esm/models/endpointstatus.d.ts +26 -0
  71. package/esm/models/endpointstatus.js +36 -0
  72. package/esm/models/errors/badgatewayresponseerror.d.ts +52 -0
  73. package/esm/models/errors/badgatewayresponseerror.js +63 -0
  74. package/esm/models/errors/badrequestresponseerror.d.ts +52 -0
  75. package/esm/models/errors/badrequestresponseerror.js +63 -0
  76. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +52 -0
  77. package/esm/models/errors/edgenetworktimeoutresponseerror.js +63 -0
  78. package/esm/models/errors/forbiddenresponseerror.d.ts +52 -0
  79. package/esm/models/errors/forbiddenresponseerror.js +63 -0
  80. package/esm/models/errors/index.d.ts +14 -2
  81. package/esm/models/errors/index.js +14 -2
  82. package/esm/models/errors/internalserverresponseerror.d.ts +52 -0
  83. package/esm/models/errors/internalserverresponseerror.js +63 -0
  84. package/esm/models/errors/notfoundresponseerror.d.ts +52 -0
  85. package/esm/models/errors/{errorresponse.js → notfoundresponseerror.js} +16 -17
  86. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +52 -0
  87. package/esm/models/errors/payloadtoolargeresponseerror.js +63 -0
  88. package/esm/models/errors/paymentrequiredresponseerror.d.ts +52 -0
  89. package/esm/models/errors/paymentrequiredresponseerror.js +63 -0
  90. package/esm/models/errors/provideroverloadedresponseerror.d.ts +52 -0
  91. package/esm/models/errors/provideroverloadedresponseerror.js +63 -0
  92. package/esm/models/errors/requesttimeoutresponseerror.d.ts +52 -0
  93. package/esm/models/errors/requesttimeoutresponseerror.js +63 -0
  94. package/esm/models/errors/serviceunavailableresponseerror.d.ts +52 -0
  95. package/esm/models/errors/serviceunavailableresponseerror.js +63 -0
  96. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +52 -0
  97. package/esm/models/errors/toomanyrequestsresponseerror.js +63 -0
  98. package/esm/models/errors/unauthorizedresponseerror.d.ts +52 -0
  99. package/esm/models/errors/unauthorizedresponseerror.js +63 -0
  100. package/esm/models/errors/unprocessableentityresponseerror.d.ts +52 -0
  101. package/esm/models/errors/unprocessableentityresponseerror.js +63 -0
  102. package/esm/models/filecitation.d.ts +58 -0
  103. package/esm/models/filecitation.js +65 -0
  104. package/esm/models/filepath.d.ts +56 -0
  105. package/esm/models/filepath.js +64 -0
  106. package/esm/models/forbiddenresponseerrordata.d.ts +40 -0
  107. package/esm/models/forbiddenresponseerrordata.js +35 -0
  108. package/esm/models/index.d.ts +67 -23
  109. package/esm/models/index.js +67 -23
  110. package/esm/models/inputmodality.d.ts +25 -0
  111. package/esm/models/inputmodality.js +35 -0
  112. package/esm/models/instructtype.d.ts +48 -0
  113. package/esm/models/instructtype.js +55 -0
  114. package/esm/models/internalserverresponseerrordata.d.ts +40 -0
  115. package/esm/models/internalserverresponseerrordata.js +35 -0
  116. package/esm/models/listendpointsresponse.d.ts +126 -2
  117. package/esm/models/listendpointsresponse.js +115 -2
  118. package/esm/models/model.d.ts +101 -0
  119. package/esm/models/model.js +82 -0
  120. package/esm/models/modelarchitecture.d.ts +104 -0
  121. package/esm/models/modelarchitecture.js +107 -0
  122. package/esm/models/modelgroup.d.ts +45 -0
  123. package/esm/models/modelgroup.js +53 -0
  124. package/esm/models/modelscountresponse.d.ts +40 -2
  125. package/esm/models/modelscountresponse.js +31 -2
  126. package/esm/models/modelslistresponse.d.ts +10 -2
  127. package/esm/models/modelslistresponse.js +7 -2
  128. package/esm/models/notfoundresponseerrordata.d.ts +40 -0
  129. package/esm/models/notfoundresponseerrordata.js +35 -0
  130. package/esm/models/openairesponsesannotation.d.ts +28 -0
  131. package/esm/models/openairesponsesannotation.js +38 -0
  132. package/esm/models/openairesponsesincludable.d.ts +25 -0
  133. package/esm/models/openairesponsesincludable.js +35 -0
  134. package/esm/models/openairesponsesincompletedetails.d.ts +49 -0
  135. package/esm/models/openairesponsesincompletedetails.js +58 -0
  136. package/esm/models/openairesponsesinputunion.d.ts +588 -0
  137. package/esm/models/openairesponsesinputunion.js +686 -0
  138. package/esm/models/openairesponsesprompt.d.ts +83 -0
  139. package/esm/models/openairesponsesprompt.js +97 -0
  140. package/esm/models/openairesponsesreasoningconfig.d.ts +33 -0
  141. package/esm/models/openairesponsesreasoningconfig.js +35 -0
  142. package/esm/models/openairesponsesreasoningeffort.d.ts +24 -0
  143. package/esm/models/openairesponsesreasoningeffort.js +34 -0
  144. package/esm/models/openairesponsesrefusalcontent.d.ts +54 -0
  145. package/esm/models/openairesponsesrefusalcontent.js +51 -0
  146. package/esm/models/openairesponsesresponsestatus.d.ts +26 -0
  147. package/esm/models/openairesponsesresponsestatus.js +36 -0
  148. package/esm/models/openairesponsesservicetier.d.ts +25 -0
  149. package/esm/models/openairesponsesservicetier.js +35 -0
  150. package/esm/models/openairesponsestoolchoiceunion.d.ts +231 -0
  151. package/esm/models/openairesponsestoolchoiceunion.js +233 -0
  152. package/esm/models/openairesponsestruncation.d.ts +22 -0
  153. package/esm/models/openairesponsestruncation.js +32 -0
  154. package/esm/models/openresponseseasyinputmessage.d.ts +75 -19
  155. package/esm/models/openresponseseasyinputmessage.js +105 -16
  156. package/esm/models/openresponseserrorevent.d.ts +63 -0
  157. package/esm/models/openresponseserrorevent.js +66 -0
  158. package/esm/models/openresponsesimagegencallcompleted.d.ts +61 -0
  159. package/esm/models/openresponsesimagegencallcompleted.js +68 -0
  160. package/esm/models/openresponsesimagegencallgenerating.d.ts +61 -0
  161. package/esm/models/openresponsesimagegencallgenerating.js +68 -0
  162. package/esm/models/openresponsesimagegencallinprogress.d.ts +61 -0
  163. package/esm/models/openresponsesimagegencallinprogress.js +68 -0
  164. package/esm/models/openresponsesimagegencallpartialimage.d.ts +65 -0
  165. package/esm/models/openresponsesimagegencallpartialimage.js +76 -0
  166. package/esm/models/openresponsesinput.d.ts +36 -5
  167. package/esm/models/openresponsesinput.js +82 -5
  168. package/esm/models/openresponsesinputmessageitem.d.ts +52 -8
  169. package/esm/models/openresponsesinputmessageitem.js +68 -5
  170. package/esm/models/openresponseslogprobs.d.ts +3 -32
  171. package/esm/models/openresponseslogprobs.js +3 -29
  172. package/esm/models/openresponsesnonstreamingresponse.d.ts +93 -123
  173. package/esm/models/openresponsesnonstreamingresponse.js +111 -145
  174. package/esm/models/openresponsesreasoning.d.ts +89 -0
  175. package/esm/models/openresponsesreasoning.js +93 -0
  176. package/esm/models/openresponsesreasoningconfig.d.ts +2 -23
  177. package/esm/models/openresponsesreasoningconfig.js +3 -33
  178. package/esm/models/openresponsesreasoningdeltaevent.d.ts +65 -0
  179. package/esm/models/openresponsesreasoningdeltaevent.js +74 -0
  180. package/esm/models/openresponsesreasoningdoneevent.d.ts +65 -0
  181. package/esm/models/openresponsesreasoningdoneevent.js +74 -0
  182. package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +66 -0
  183. package/esm/models/openresponsesreasoningsummarypartaddedevent.js +75 -0
  184. package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +65 -0
  185. package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +74 -0
  186. package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +65 -0
  187. package/esm/models/openresponsesreasoningsummarytextdoneevent.js +74 -0
  188. package/esm/models/openresponsesrequest.d.ts +736 -2
  189. package/esm/models/openresponsesrequest.js +789 -2
  190. package/esm/models/openresponsesresponsetext.d.ts +59 -0
  191. package/esm/models/openresponsesresponsetext.js +64 -0
  192. package/esm/models/openresponsesstreamevent.d.ts +25 -612
  193. package/esm/models/openresponsesstreamevent.js +51 -742
  194. package/esm/models/openresponsestoplogprobs.d.ts +34 -0
  195. package/esm/models/openresponsestoplogprobs.js +33 -0
  196. package/esm/models/{responsesusage.d.ts → openresponsesusage.d.ts} +14 -14
  197. package/esm/models/{responsesusage.js → openresponsesusage.js} +14 -14
  198. package/esm/models/operations/createauthkeyscode.d.ts +145 -0
  199. package/esm/models/operations/createauthkeyscode.js +146 -0
  200. package/esm/models/operations/createresponses.d.ts +58 -0
  201. package/esm/models/operations/createresponses.js +80 -0
  202. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +104 -0
  203. package/esm/models/operations/exchangeauthcodeforapikey.js +111 -0
  204. package/esm/models/operations/getmodels.d.ts +0 -26
  205. package/esm/models/operations/getmodels.js +0 -38
  206. package/esm/models/operations/getparameters.d.ts +1 -0
  207. package/esm/models/operations/getparameters.js +1 -0
  208. package/esm/models/operations/index.d.ts +3 -2
  209. package/esm/models/operations/index.js +3 -2
  210. package/esm/models/operations/listendpointszdr.d.ts +3 -24
  211. package/esm/models/operations/listendpointszdr.js +2 -29
  212. package/esm/models/operations/listmodelsuser.d.ts +0 -22
  213. package/esm/models/operations/listmodelsuser.js +0 -28
  214. package/esm/models/operations/listproviders.d.ts +0 -36
  215. package/esm/models/operations/listproviders.js +0 -28
  216. package/esm/models/operations/sendchatcompletionrequest.d.ts +1 -1
  217. package/esm/models/operations/sendchatcompletionrequest.js +2 -1
  218. package/esm/models/outputitemimagegenerationcall.d.ts +59 -0
  219. package/esm/models/outputitemimagegenerationcall.js +56 -0
  220. package/esm/models/outputmessage.d.ts +192 -0
  221. package/esm/models/outputmessage.js +202 -0
  222. package/esm/models/outputmodality.d.ts +23 -0
  223. package/esm/models/outputmodality.js +33 -0
  224. package/esm/models/parameter.d.ts +43 -0
  225. package/esm/models/parameter.js +54 -0
  226. package/esm/models/payloadtoolargeresponseerrordata.d.ts +40 -0
  227. package/esm/models/payloadtoolargeresponseerrordata.js +35 -0
  228. package/esm/models/paymentrequiredresponseerrordata.d.ts +40 -0
  229. package/esm/models/paymentrequiredresponseerrordata.js +35 -0
  230. package/esm/models/perrequestlimits.d.ts +40 -0
  231. package/esm/models/perrequestlimits.js +44 -0
  232. package/esm/models/providername.d.ts +106 -0
  233. package/esm/models/providername.js +116 -0
  234. package/esm/models/provideroverloadedresponseerrordata.d.ts +40 -0
  235. package/esm/models/provideroverloadedresponseerrordata.js +35 -0
  236. package/esm/models/publicendpoint.d.ts +140 -2
  237. package/esm/models/publicendpoint.js +156 -2
  238. package/esm/models/publicpricing.d.ts +87 -0
  239. package/esm/models/publicpricing.js +73 -0
  240. package/esm/models/quantization.d.ts +29 -0
  241. package/esm/models/quantization.js +39 -0
  242. package/esm/models/requesttimeoutresponseerrordata.d.ts +40 -0
  243. package/esm/models/requesttimeoutresponseerrordata.js +35 -0
  244. package/esm/models/responseformattextconfig.d.ts +31 -0
  245. package/esm/models/responseformattextconfig.js +38 -0
  246. package/esm/models/responseinputfile.d.ts +63 -0
  247. package/esm/models/responseinputfile.js +70 -0
  248. package/esm/models/responseinputimage.d.ts +79 -0
  249. package/esm/models/responseinputimage.js +90 -0
  250. package/esm/models/responseinputtext.d.ts +57 -0
  251. package/esm/models/responseinputtext.js +51 -0
  252. package/esm/models/responseoutputtext.d.ts +57 -0
  253. package/esm/models/responseoutputtext.js +54 -0
  254. package/esm/models/responseserrorfield.d.ts +25 -10
  255. package/esm/models/responseserrorfield.js +29 -14
  256. package/esm/models/responsesformatjsonobject.d.ts +55 -0
  257. package/esm/models/responsesformatjsonobject.js +49 -0
  258. package/esm/models/responsesformattext.d.ts +55 -0
  259. package/esm/models/responsesformattext.js +49 -0
  260. package/esm/models/responsesformattextjsonschemaconfig.d.ts +67 -0
  261. package/esm/models/responsesformattextjsonschemaconfig.js +57 -0
  262. package/esm/models/responsesoutputitemfunctioncall.d.ts +89 -0
  263. package/esm/models/responsesoutputitemfunctioncall.js +93 -0
  264. package/esm/models/responsesoutputitemreasoning.d.ts +92 -0
  265. package/esm/models/responsesoutputitemreasoning.js +93 -0
  266. package/esm/models/responsesoutputmessage.d.ts +45 -42
  267. package/esm/models/responsesoutputmessage.js +76 -65
  268. package/esm/models/responsetextconfig.d.ts +59 -0
  269. package/esm/models/responsetextconfig.js +62 -0
  270. package/esm/models/serviceunavailableresponseerrordata.d.ts +40 -0
  271. package/esm/models/serviceunavailableresponseerrordata.js +35 -0
  272. package/esm/models/toomanyrequestsresponseerrordata.d.ts +40 -0
  273. package/esm/models/toomanyrequestsresponseerrordata.js +35 -0
  274. package/esm/models/topproviderinfo.d.ts +45 -0
  275. package/esm/models/topproviderinfo.js +48 -0
  276. package/esm/models/unauthorizedresponseerrordata.d.ts +40 -0
  277. package/esm/models/unauthorizedresponseerrordata.js +35 -0
  278. package/esm/models/unprocessableentityresponseerrordata.d.ts +40 -0
  279. package/esm/models/unprocessableentityresponseerrordata.js +35 -0
  280. package/esm/models/urlcitation.d.ts +60 -0
  281. package/esm/models/urlcitation.js +69 -0
  282. package/esm/react-query/betaResponsesSend.d.ts +1 -1
  283. package/esm/react-query/index.d.ts +2 -0
  284. package/esm/react-query/index.js +2 -0
  285. package/esm/react-query/modelsCount.d.ts +2 -2
  286. package/esm/react-query/modelsList.d.ts +2 -7
  287. package/esm/react-query/modelsList.js +0 -2
  288. package/esm/react-query/modelsListForUser.d.ts +2 -1
  289. package/esm/react-query/oAuthCreateAuthCode.d.ts +23 -0
  290. package/esm/react-query/oAuthCreateAuthCode.js +42 -0
  291. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +23 -0
  292. package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +42 -0
  293. package/esm/sdk/chat.d.ts +7 -0
  294. package/esm/sdk/chat.js +0 -6
  295. package/esm/sdk/models.d.ts +4 -3
  296. package/esm/sdk/oauth.d.ts +46 -0
  297. package/esm/sdk/oauth.js +67 -0
  298. package/esm/sdk/responses.d.ts +8 -1
  299. package/esm/sdk/responses.js +0 -6
  300. package/esm/sdk/sdk.d.ts +3 -0
  301. package/esm/sdk/sdk.js +4 -0
  302. package/jsr.json +1 -1
  303. package/package.json +3 -1
  304. package/vitest.config.ts +26 -0
  305. package/esm/models/errorresponse.d.ts +0 -155
  306. package/esm/models/errorresponse.js +0 -167
  307. package/esm/models/errors/errorresponse.d.ts +0 -46
  308. package/esm/models/errors/listproviders.d.ts +0 -49
  309. package/esm/models/errors/listproviders.js +0 -51
  310. package/esm/models/filecitationannotation.d.ts +0 -58
  311. package/esm/models/filecitationannotation.js +0 -64
  312. package/esm/models/filepathannotation.d.ts +0 -56
  313. package/esm/models/filepathannotation.js +0 -62
  314. package/esm/models/openresponsesformatjsonobject.d.ts +0 -55
  315. package/esm/models/openresponsesformatjsonobject.js +0 -49
  316. package/esm/models/openresponsesformatjsonschema.d.ts +0 -67
  317. package/esm/models/openresponsesformatjsonschema.js +0 -57
  318. package/esm/models/openresponsesformattext.d.ts +0 -55
  319. package/esm/models/openresponsesformattext.js +0 -49
  320. package/esm/models/openresponsesformattextconfig.d.ts +0 -31
  321. package/esm/models/openresponsesformattextconfig.js +0 -38
  322. package/esm/models/openresponsesinputcontent.d.ts +0 -43
  323. package/esm/models/openresponsesinputcontent.js +0 -50
  324. package/esm/models/openresponsesinputfile.d.ts +0 -63
  325. package/esm/models/openresponsesinputfile.js +0 -70
  326. package/esm/models/openresponsesinputimage.d.ts +0 -79
  327. package/esm/models/openresponsesinputimage.js +0 -90
  328. package/esm/models/openresponsesinputitem.d.ts +0 -39
  329. package/esm/models/openresponsesinputitem.js +0 -62
  330. package/esm/models/openresponsesinputtext.d.ts +0 -57
  331. package/esm/models/openresponsesinputtext.js +0 -51
  332. package/esm/models/openresponsesoutputtext.d.ts +0 -80
  333. package/esm/models/openresponsesoutputtext.js +0 -93
  334. package/esm/models/openresponsesprompt.d.ts +0 -39
  335. package/esm/models/openresponsesprompt.js +0 -34
  336. package/esm/models/openresponsesrefusalcontent.d.ts +0 -54
  337. package/esm/models/openresponsesrefusalcontent.js +0 -51
  338. package/esm/models/openresponsestextconfig.d.ts +0 -59
  339. package/esm/models/openresponsestextconfig.js +0 -63
  340. package/esm/models/openresponsestoolchoice.d.ts +0 -148
  341. package/esm/models/openresponsestoolchoice.js +0 -139
  342. package/esm/models/openresponsestoolunion.d.ts +0 -95
  343. package/esm/models/openresponsestoolunion.js +0 -94
  344. package/esm/models/operations/createapialpharesponses.d.ts +0 -58
  345. package/esm/models/operations/createapialpharesponses.js +0 -83
  346. package/esm/models/operations/listmodelscount.d.ts +0 -26
  347. package/esm/models/operations/listmodelscount.js +0 -34
  348. package/esm/models/outputtextcontent.d.ts +0 -80
  349. package/esm/models/outputtextcontent.js +0 -93
  350. package/esm/models/refusalcontent.d.ts +0 -54
  351. package/esm/models/refusalcontent.js +0 -51
  352. package/esm/models/toolchoicetypes.d.ts +0 -164
  353. package/esm/models/toolchoicetypes.js +0 -167
  354. package/esm/models/urlcitationannotation.d.ts +0 -60
  355. package/esm/models/urlcitationannotation.js +0 -68
@@ -1,155 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const ErrorResponseCode: {
6
- readonly OneHundred: 100;
7
- readonly OneHundredAndOne: 101;
8
- readonly OneHundredAndTwo: 102;
9
- readonly TwoHundred: 200;
10
- readonly TwoHundredAndOne: 201;
11
- readonly TwoHundredAndTwo: 202;
12
- readonly TwoHundredAndThree: 203;
13
- readonly TwoHundredAndFour: 204;
14
- readonly TwoHundredAndFive: 205;
15
- readonly TwoHundredAndSix: 206;
16
- readonly TwoHundredAndSeven: 207;
17
- readonly TwoHundredAndEight: 208;
18
- readonly ThreeHundred: 300;
19
- readonly ThreeHundredAndOne: 301;
20
- readonly ThreeHundredAndTwo: 302;
21
- readonly ThreeHundredAndThree: 303;
22
- readonly ThreeHundredAndFour: 304;
23
- readonly ThreeHundredAndFive: 305;
24
- readonly ThreeHundredAndSeven: 307;
25
- readonly ThreeHundredAndEight: 308;
26
- readonly FourHundred: 400;
27
- readonly FourHundredAndOne: 401;
28
- readonly FourHundredAndTwo: 402;
29
- readonly FourHundredAndThree: 403;
30
- readonly FourHundredAndFour: 404;
31
- readonly FourHundredAndFive: 405;
32
- readonly FourHundredAndSix: 406;
33
- readonly FourHundredAndSeven: 407;
34
- readonly FourHundredAndEight: 408;
35
- readonly FourHundredAndNine: 409;
36
- readonly FourHundredAndTen: 410;
37
- readonly FourHundredAndEleven: 411;
38
- readonly FourHundredAndTwelve: 412;
39
- readonly FourHundredAndThirteen: 413;
40
- readonly FourHundredAndFourteen: 414;
41
- readonly FourHundredAndFifteen: 415;
42
- readonly FourHundredAndSixteen: 416;
43
- readonly FourHundredAndSeventeen: 417;
44
- readonly FourHundredAndEighteen: 418;
45
- readonly FourHundredAndTwentyTwo: 422;
46
- readonly FourHundredAndTwentyThree: 423;
47
- readonly FourHundredAndTwentyFour: 424;
48
- readonly FourHundredAndTwentyFive: 425;
49
- readonly FourHundredAndTwentySix: 426;
50
- readonly FourHundredAndTwentyEight: 428;
51
- readonly FourHundredAndTwentyNine: 429;
52
- readonly FourHundredAndThirtyOne: 431;
53
- readonly FourHundredAndFiftyOne: 451;
54
- readonly FourHundredAndNinetyEight: 498;
55
- readonly FourHundredAndNinetyNine: 499;
56
- readonly FiveHundred: 500;
57
- readonly FiveHundredAndOne: 501;
58
- readonly FiveHundredAndTwo: 502;
59
- readonly FiveHundredAndThree: 503;
60
- readonly FiveHundredAndFour: 504;
61
- readonly FiveHundredAndFive: 505;
62
- readonly FiveHundredAndSix: 506;
63
- readonly FiveHundredAndSeven: 507;
64
- readonly FiveHundredAndEight: 508;
65
- readonly FiveHundredAndTen: 510;
66
- readonly FiveHundredAndEleven: 511;
67
- readonly FiveHundredAndTwenty: 520;
68
- readonly FiveHundredAndTwentyOne: 521;
69
- readonly FiveHundredAndTwentyTwo: 522;
70
- readonly FiveHundredAndTwentyThree: 523;
71
- readonly FiveHundredAndTwentyFour: 524;
72
- readonly FiveHundredAndTwentyFive: 525;
73
- readonly FiveHundredAndTwentySix: 526;
74
- readonly FiveHundredAndTwentyNine: 529;
75
- readonly FiveHundredAndThirty: 530;
76
- };
77
- export type ErrorResponseCode = OpenEnum<typeof ErrorResponseCode>;
78
- export type ErrorResponseError = {
79
- code: ErrorResponseCode;
80
- message: string;
81
- metadata?: {
82
- [k: string]: any | null;
83
- } | null | undefined;
84
- };
85
- /**
86
- * Error response
87
- */
88
- export type ErrorResponse = {
89
- error: ErrorResponseError;
90
- userId?: string | null | undefined;
91
- };
92
- /** @internal */
93
- export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, unknown>;
94
- /** @internal */
95
- export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode>;
96
- /**
97
- * @internal
98
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
99
- */
100
- export declare namespace ErrorResponseCode$ {
101
- /** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
102
- const inboundSchema: z.ZodType<ErrorResponseCode, unknown, z.core.$ZodTypeInternals<ErrorResponseCode, unknown>>;
103
- /** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
104
- const outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode, z.core.$ZodTypeInternals<ErrorResponseCode, ErrorResponseCode>>;
105
- }
106
- /** @internal */
107
- export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, unknown>;
108
- /** @internal */
109
- export type ErrorResponseError$Outbound = {
110
- code: number;
111
- message: string;
112
- metadata?: {
113
- [k: string]: any | null;
114
- } | null | undefined;
115
- };
116
- /** @internal */
117
- export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError>;
118
- /**
119
- * @internal
120
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
121
- */
122
- export declare namespace ErrorResponseError$ {
123
- /** @deprecated use `ErrorResponseError$inboundSchema` instead. */
124
- const inboundSchema: z.ZodType<ErrorResponseError, unknown, z.core.$ZodTypeInternals<ErrorResponseError, unknown>>;
125
- /** @deprecated use `ErrorResponseError$outboundSchema` instead. */
126
- const outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError, z.core.$ZodTypeInternals<ErrorResponseError$Outbound, ErrorResponseError>>;
127
- /** @deprecated use `ErrorResponseError$Outbound` instead. */
128
- type Outbound = ErrorResponseError$Outbound;
129
- }
130
- export declare function errorResponseErrorToJSON(errorResponseError: ErrorResponseError): string;
131
- export declare function errorResponseErrorFromJSON(jsonString: string): SafeParseResult<ErrorResponseError, SDKValidationError>;
132
- /** @internal */
133
- export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
134
- /** @internal */
135
- export type ErrorResponse$Outbound = {
136
- error: ErrorResponseError$Outbound;
137
- user_id?: string | null | undefined;
138
- };
139
- /** @internal */
140
- export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
141
- /**
142
- * @internal
143
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
144
- */
145
- export declare namespace ErrorResponse$ {
146
- /** @deprecated use `ErrorResponse$inboundSchema` instead. */
147
- const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
148
- /** @deprecated use `ErrorResponse$outboundSchema` instead. */
149
- const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
150
- /** @deprecated use `ErrorResponse$Outbound` instead. */
151
- type Outbound = ErrorResponse$Outbound;
152
- }
153
- export declare function errorResponseToJSON(errorResponse: ErrorResponse): string;
154
- export declare function errorResponseFromJSON(jsonString: string): SafeParseResult<ErrorResponse, SDKValidationError>;
155
- //# sourceMappingURL=errorresponse.d.ts.map
@@ -1,167 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4";
5
- import { remap as remap$ } from "../lib/primitives.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- import { catchUnrecognizedEnum, } from "../types/enums.js";
8
- export const ErrorResponseCode = {
9
- OneHundred: 100,
10
- OneHundredAndOne: 101,
11
- OneHundredAndTwo: 102,
12
- TwoHundred: 200,
13
- TwoHundredAndOne: 201,
14
- TwoHundredAndTwo: 202,
15
- TwoHundredAndThree: 203,
16
- TwoHundredAndFour: 204,
17
- TwoHundredAndFive: 205,
18
- TwoHundredAndSix: 206,
19
- TwoHundredAndSeven: 207,
20
- TwoHundredAndEight: 208,
21
- ThreeHundred: 300,
22
- ThreeHundredAndOne: 301,
23
- ThreeHundredAndTwo: 302,
24
- ThreeHundredAndThree: 303,
25
- ThreeHundredAndFour: 304,
26
- ThreeHundredAndFive: 305,
27
- ThreeHundredAndSeven: 307,
28
- ThreeHundredAndEight: 308,
29
- FourHundred: 400,
30
- FourHundredAndOne: 401,
31
- FourHundredAndTwo: 402,
32
- FourHundredAndThree: 403,
33
- FourHundredAndFour: 404,
34
- FourHundredAndFive: 405,
35
- FourHundredAndSix: 406,
36
- FourHundredAndSeven: 407,
37
- FourHundredAndEight: 408,
38
- FourHundredAndNine: 409,
39
- FourHundredAndTen: 410,
40
- FourHundredAndEleven: 411,
41
- FourHundredAndTwelve: 412,
42
- FourHundredAndThirteen: 413,
43
- FourHundredAndFourteen: 414,
44
- FourHundredAndFifteen: 415,
45
- FourHundredAndSixteen: 416,
46
- FourHundredAndSeventeen: 417,
47
- FourHundredAndEighteen: 418,
48
- FourHundredAndTwentyTwo: 422,
49
- FourHundredAndTwentyThree: 423,
50
- FourHundredAndTwentyFour: 424,
51
- FourHundredAndTwentyFive: 425,
52
- FourHundredAndTwentySix: 426,
53
- FourHundredAndTwentyEight: 428,
54
- FourHundredAndTwentyNine: 429,
55
- FourHundredAndThirtyOne: 431,
56
- FourHundredAndFiftyOne: 451,
57
- FourHundredAndNinetyEight: 498,
58
- FourHundredAndNinetyNine: 499,
59
- FiveHundred: 500,
60
- FiveHundredAndOne: 501,
61
- FiveHundredAndTwo: 502,
62
- FiveHundredAndThree: 503,
63
- FiveHundredAndFour: 504,
64
- FiveHundredAndFive: 505,
65
- FiveHundredAndSix: 506,
66
- FiveHundredAndSeven: 507,
67
- FiveHundredAndEight: 508,
68
- FiveHundredAndTen: 510,
69
- FiveHundredAndEleven: 511,
70
- FiveHundredAndTwenty: 520,
71
- FiveHundredAndTwentyOne: 521,
72
- FiveHundredAndTwentyTwo: 522,
73
- FiveHundredAndTwentyThree: 523,
74
- FiveHundredAndTwentyFour: 524,
75
- FiveHundredAndTwentyFive: 525,
76
- FiveHundredAndTwentySix: 526,
77
- FiveHundredAndTwentyNine: 529,
78
- FiveHundredAndThirty: 530,
79
- };
80
- /** @internal */
81
- export const ErrorResponseCode$inboundSchema = z
82
- .union([
83
- z.enum(ErrorResponseCode),
84
- z.number().transform(catchUnrecognizedEnum),
85
- ]);
86
- /** @internal */
87
- export const ErrorResponseCode$outboundSchema = z.union([
88
- z.enum(ErrorResponseCode),
89
- z.number().and(z.custom()),
90
- ]);
91
- /**
92
- * @internal
93
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
- */
95
- export var ErrorResponseCode$;
96
- (function (ErrorResponseCode$) {
97
- /** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
98
- ErrorResponseCode$.inboundSchema = ErrorResponseCode$inboundSchema;
99
- /** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
100
- ErrorResponseCode$.outboundSchema = ErrorResponseCode$outboundSchema;
101
- })(ErrorResponseCode$ || (ErrorResponseCode$ = {}));
102
- /** @internal */
103
- export const ErrorResponseError$inboundSchema = z.object({
104
- code: ErrorResponseCode$inboundSchema,
105
- message: z.string(),
106
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
107
- });
108
- /** @internal */
109
- export const ErrorResponseError$outboundSchema = z.object({
110
- code: ErrorResponseCode$outboundSchema,
111
- message: z.string(),
112
- metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
113
- });
114
- /**
115
- * @internal
116
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
117
- */
118
- export var ErrorResponseError$;
119
- (function (ErrorResponseError$) {
120
- /** @deprecated use `ErrorResponseError$inboundSchema` instead. */
121
- ErrorResponseError$.inboundSchema = ErrorResponseError$inboundSchema;
122
- /** @deprecated use `ErrorResponseError$outboundSchema` instead. */
123
- ErrorResponseError$.outboundSchema = ErrorResponseError$outboundSchema;
124
- })(ErrorResponseError$ || (ErrorResponseError$ = {}));
125
- export function errorResponseErrorToJSON(errorResponseError) {
126
- return JSON.stringify(ErrorResponseError$outboundSchema.parse(errorResponseError));
127
- }
128
- export function errorResponseErrorFromJSON(jsonString) {
129
- return safeParse(jsonString, (x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponseError' from JSON`);
130
- }
131
- /** @internal */
132
- export const ErrorResponse$inboundSchema = z
133
- .object({
134
- error: z.lazy(() => ErrorResponseError$inboundSchema),
135
- user_id: z.nullable(z.string()).optional(),
136
- }).transform((v) => {
137
- return remap$(v, {
138
- "user_id": "userId",
139
- });
140
- });
141
- /** @internal */
142
- export const ErrorResponse$outboundSchema = z.object({
143
- error: z.lazy(() => ErrorResponseError$outboundSchema),
144
- userId: z.nullable(z.string()).optional(),
145
- }).transform((v) => {
146
- return remap$(v, {
147
- userId: "user_id",
148
- });
149
- });
150
- /**
151
- * @internal
152
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
153
- */
154
- export var ErrorResponse$;
155
- (function (ErrorResponse$) {
156
- /** @deprecated use `ErrorResponse$inboundSchema` instead. */
157
- ErrorResponse$.inboundSchema = ErrorResponse$inboundSchema;
158
- /** @deprecated use `ErrorResponse$outboundSchema` instead. */
159
- ErrorResponse$.outboundSchema = ErrorResponse$outboundSchema;
160
- })(ErrorResponse$ || (ErrorResponse$ = {}));
161
- export function errorResponseToJSON(errorResponse) {
162
- return JSON.stringify(ErrorResponse$outboundSchema.parse(errorResponse));
163
- }
164
- export function errorResponseFromJSON(jsonString) {
165
- return safeParse(jsonString, (x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponse' from JSON`);
166
- }
167
- //# sourceMappingURL=errorresponse.js.map
@@ -1,46 +0,0 @@
1
- import * as z from "zod/v4";
2
- import * as models from "../index.js";
3
- import { OpenRouterError } from "./openroutererror.js";
4
- /**
5
- * Error response
6
- */
7
- export type ErrorResponseData = {
8
- error: models.ErrorResponseError;
9
- userId?: string | null | undefined;
10
- };
11
- /**
12
- * Error response
13
- */
14
- export declare class ErrorResponse extends OpenRouterError {
15
- error: models.ErrorResponseError;
16
- userId?: string | null | undefined;
17
- /** The original data that was passed to this error instance. */
18
- data$: ErrorResponseData;
19
- constructor(err: ErrorResponseData, httpMeta: {
20
- response: Response;
21
- request: Request;
22
- body: string;
23
- });
24
- }
25
- /** @internal */
26
- export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
27
- /** @internal */
28
- export type ErrorResponse$Outbound = {
29
- error: models.ErrorResponseError$Outbound;
30
- user_id?: string | null | undefined;
31
- };
32
- /** @internal */
33
- export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
34
- /**
35
- * @internal
36
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
37
- */
38
- export declare namespace ErrorResponse$ {
39
- /** @deprecated use `ErrorResponse$inboundSchema` instead. */
40
- const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
41
- /** @deprecated use `ErrorResponse$outboundSchema` instead. */
42
- const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
43
- /** @deprecated use `ErrorResponse$Outbound` instead. */
44
- type Outbound = ErrorResponse$Outbound;
45
- }
46
- //# sourceMappingURL=errorresponse.d.ts.map
@@ -1,49 +0,0 @@
1
- import * as z from "zod/v4";
2
- import * as operations from "../operations/index.js";
3
- import { OpenRouterError } from "./openroutererror.js";
4
- /**
5
- * Internal Server Error
6
- */
7
- export type InternalServerErrorData = {
8
- /**
9
- * Error details
10
- */
11
- error: operations.ErrorT;
12
- };
13
- /**
14
- * Internal Server Error
15
- */
16
- export declare class InternalServerError extends OpenRouterError {
17
- /**
18
- * Error details
19
- */
20
- error: operations.ErrorT;
21
- /** The original data that was passed to this error instance. */
22
- data$: InternalServerErrorData;
23
- constructor(err: InternalServerErrorData, httpMeta: {
24
- response: Response;
25
- request: Request;
26
- body: string;
27
- });
28
- }
29
- /** @internal */
30
- export declare const InternalServerError$inboundSchema: z.ZodType<InternalServerError, unknown>;
31
- /** @internal */
32
- export type InternalServerError$Outbound = {
33
- error: operations.ErrorT$Outbound;
34
- };
35
- /** @internal */
36
- export declare const InternalServerError$outboundSchema: z.ZodType<InternalServerError$Outbound, InternalServerError>;
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 declare namespace InternalServerError$ {
42
- /** @deprecated use `InternalServerError$inboundSchema` instead. */
43
- const inboundSchema: z.ZodType<InternalServerError, unknown, z.core.$ZodTypeInternals<InternalServerError, unknown>>;
44
- /** @deprecated use `InternalServerError$outboundSchema` instead. */
45
- const outboundSchema: z.ZodType<InternalServerError$Outbound, InternalServerError, z.core.$ZodTypeInternals<InternalServerError$Outbound, InternalServerError>>;
46
- /** @deprecated use `InternalServerError$Outbound` instead. */
47
- type Outbound = InternalServerError$Outbound;
48
- }
49
- //# sourceMappingURL=listproviders.d.ts.map
@@ -1,51 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4";
5
- import * as operations from "../operations/index.js";
6
- import { OpenRouterError } from "./openroutererror.js";
7
- /**
8
- * Internal Server Error
9
- */
10
- export class InternalServerError extends OpenRouterError {
11
- constructor(err, httpMeta) {
12
- const message = err.error?.message
13
- || `API error occurred: ${JSON.stringify(err)}`;
14
- super(message, httpMeta);
15
- this.data$ = err;
16
- this.error = err.error;
17
- this.name = "InternalServerError";
18
- }
19
- }
20
- /** @internal */
21
- export const InternalServerError$inboundSchema = z.object({
22
- error: z.lazy(() => operations.ErrorT$inboundSchema),
23
- request$: z.custom(x => x instanceof Request),
24
- response$: z.custom(x => x instanceof Response),
25
- body$: z.string(),
26
- })
27
- .transform((v) => {
28
- return new InternalServerError(v, {
29
- request: v.request$,
30
- response: v.response$,
31
- body: v.body$,
32
- });
33
- });
34
- /** @internal */
35
- export const InternalServerError$outboundSchema = z.custom(x => x instanceof InternalServerError)
36
- .transform(v => v.data$)
37
- .pipe(z.object({
38
- error: z.lazy(() => operations.ErrorT$outboundSchema),
39
- }));
40
- /**
41
- * @internal
42
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
- */
44
- export var InternalServerError$;
45
- (function (InternalServerError$) {
46
- /** @deprecated use `InternalServerError$inboundSchema` instead. */
47
- InternalServerError$.inboundSchema = InternalServerError$inboundSchema;
48
- /** @deprecated use `InternalServerError$outboundSchema` instead. */
49
- InternalServerError$.outboundSchema = InternalServerError$outboundSchema;
50
- })(InternalServerError$ || (InternalServerError$ = {}));
51
- //# sourceMappingURL=listproviders.js.map
@@ -1,58 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const FileCitationAnnotationType: {
6
- readonly FileCitation: "file_citation";
7
- };
8
- export type FileCitationAnnotationType = ClosedEnum<typeof FileCitationAnnotationType>;
9
- export type FileCitationAnnotation = {
10
- type: FileCitationAnnotationType;
11
- fileId: string;
12
- filename: string;
13
- index: number;
14
- };
15
- /** @internal */
16
- export declare const FileCitationAnnotationType$inboundSchema: z.ZodEnum<typeof FileCitationAnnotationType>;
17
- /** @internal */
18
- export declare const FileCitationAnnotationType$outboundSchema: z.ZodEnum<typeof FileCitationAnnotationType>;
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 FileCitationAnnotationType$ {
24
- /** @deprecated use `FileCitationAnnotationType$inboundSchema` instead. */
25
- const inboundSchema: z.ZodEnum<{
26
- readonly FileCitation: "file_citation";
27
- }>;
28
- /** @deprecated use `FileCitationAnnotationType$outboundSchema` instead. */
29
- const outboundSchema: z.ZodEnum<{
30
- readonly FileCitation: "file_citation";
31
- }>;
32
- }
33
- /** @internal */
34
- export declare const FileCitationAnnotation$inboundSchema: z.ZodType<FileCitationAnnotation, unknown>;
35
- /** @internal */
36
- export type FileCitationAnnotation$Outbound = {
37
- type: string;
38
- file_id: string;
39
- filename: string;
40
- index: number;
41
- };
42
- /** @internal */
43
- export declare const FileCitationAnnotation$outboundSchema: z.ZodType<FileCitationAnnotation$Outbound, FileCitationAnnotation>;
44
- /**
45
- * @internal
46
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
47
- */
48
- export declare namespace FileCitationAnnotation$ {
49
- /** @deprecated use `FileCitationAnnotation$inboundSchema` instead. */
50
- const inboundSchema: z.ZodType<FileCitationAnnotation, unknown, z.core.$ZodTypeInternals<FileCitationAnnotation, unknown>>;
51
- /** @deprecated use `FileCitationAnnotation$outboundSchema` instead. */
52
- const outboundSchema: z.ZodType<FileCitationAnnotation$Outbound, FileCitationAnnotation, z.core.$ZodTypeInternals<FileCitationAnnotation$Outbound, FileCitationAnnotation>>;
53
- /** @deprecated use `FileCitationAnnotation$Outbound` instead. */
54
- type Outbound = FileCitationAnnotation$Outbound;
55
- }
56
- export declare function fileCitationAnnotationToJSON(fileCitationAnnotation: FileCitationAnnotation): string;
57
- export declare function fileCitationAnnotationFromJSON(jsonString: string): SafeParseResult<FileCitationAnnotation, SDKValidationError>;
58
- //# sourceMappingURL=filecitationannotation.d.ts.map
@@ -1,64 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import * as z from "zod/v4";
5
- import { remap as remap$ } from "../lib/primitives.js";
6
- import { safeParse } from "../lib/schemas.js";
7
- export const FileCitationAnnotationType = {
8
- FileCitation: "file_citation",
9
- };
10
- /** @internal */
11
- export const FileCitationAnnotationType$inboundSchema = z.enum(FileCitationAnnotationType);
12
- /** @internal */
13
- export const FileCitationAnnotationType$outboundSchema = FileCitationAnnotationType$inboundSchema;
14
- /**
15
- * @internal
16
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
17
- */
18
- export var FileCitationAnnotationType$;
19
- (function (FileCitationAnnotationType$) {
20
- /** @deprecated use `FileCitationAnnotationType$inboundSchema` instead. */
21
- FileCitationAnnotationType$.inboundSchema = FileCitationAnnotationType$inboundSchema;
22
- /** @deprecated use `FileCitationAnnotationType$outboundSchema` instead. */
23
- FileCitationAnnotationType$.outboundSchema = FileCitationAnnotationType$outboundSchema;
24
- })(FileCitationAnnotationType$ || (FileCitationAnnotationType$ = {}));
25
- /** @internal */
26
- export const FileCitationAnnotation$inboundSchema = z.object({
27
- type: FileCitationAnnotationType$inboundSchema,
28
- file_id: z.string(),
29
- filename: z.string(),
30
- index: z.number(),
31
- }).transform((v) => {
32
- return remap$(v, {
33
- "file_id": "fileId",
34
- });
35
- });
36
- /** @internal */
37
- export const FileCitationAnnotation$outboundSchema = z.object({
38
- type: FileCitationAnnotationType$outboundSchema,
39
- fileId: z.string(),
40
- filename: z.string(),
41
- index: z.number(),
42
- }).transform((v) => {
43
- return remap$(v, {
44
- fileId: "file_id",
45
- });
46
- });
47
- /**
48
- * @internal
49
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
- */
51
- export var FileCitationAnnotation$;
52
- (function (FileCitationAnnotation$) {
53
- /** @deprecated use `FileCitationAnnotation$inboundSchema` instead. */
54
- FileCitationAnnotation$.inboundSchema = FileCitationAnnotation$inboundSchema;
55
- /** @deprecated use `FileCitationAnnotation$outboundSchema` instead. */
56
- FileCitationAnnotation$.outboundSchema = FileCitationAnnotation$outboundSchema;
57
- })(FileCitationAnnotation$ || (FileCitationAnnotation$ = {}));
58
- export function fileCitationAnnotationToJSON(fileCitationAnnotation) {
59
- return JSON.stringify(FileCitationAnnotation$outboundSchema.parse(fileCitationAnnotation));
60
- }
61
- export function fileCitationAnnotationFromJSON(jsonString) {
62
- return safeParse(jsonString, (x) => FileCitationAnnotation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FileCitationAnnotation' from JSON`);
63
- }
64
- //# sourceMappingURL=filecitationannotation.js.map
@@ -1,56 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { ClosedEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const FilePathAnnotationType: {
6
- readonly FilePath: "file_path";
7
- };
8
- export type FilePathAnnotationType = ClosedEnum<typeof FilePathAnnotationType>;
9
- export type FilePathAnnotation = {
10
- type: FilePathAnnotationType;
11
- fileId: string;
12
- index: number;
13
- };
14
- /** @internal */
15
- export declare const FilePathAnnotationType$inboundSchema: z.ZodEnum<typeof FilePathAnnotationType>;
16
- /** @internal */
17
- export declare const FilePathAnnotationType$outboundSchema: z.ZodEnum<typeof FilePathAnnotationType>;
18
- /**
19
- * @internal
20
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
21
- */
22
- export declare namespace FilePathAnnotationType$ {
23
- /** @deprecated use `FilePathAnnotationType$inboundSchema` instead. */
24
- const inboundSchema: z.ZodEnum<{
25
- readonly FilePath: "file_path";
26
- }>;
27
- /** @deprecated use `FilePathAnnotationType$outboundSchema` instead. */
28
- const outboundSchema: z.ZodEnum<{
29
- readonly FilePath: "file_path";
30
- }>;
31
- }
32
- /** @internal */
33
- export declare const FilePathAnnotation$inboundSchema: z.ZodType<FilePathAnnotation, unknown>;
34
- /** @internal */
35
- export type FilePathAnnotation$Outbound = {
36
- type: string;
37
- file_id: string;
38
- index: number;
39
- };
40
- /** @internal */
41
- export declare const FilePathAnnotation$outboundSchema: z.ZodType<FilePathAnnotation$Outbound, FilePathAnnotation>;
42
- /**
43
- * @internal
44
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
45
- */
46
- export declare namespace FilePathAnnotation$ {
47
- /** @deprecated use `FilePathAnnotation$inboundSchema` instead. */
48
- const inboundSchema: z.ZodType<FilePathAnnotation, unknown, z.core.$ZodTypeInternals<FilePathAnnotation, unknown>>;
49
- /** @deprecated use `FilePathAnnotation$outboundSchema` instead. */
50
- const outboundSchema: z.ZodType<FilePathAnnotation$Outbound, FilePathAnnotation, z.core.$ZodTypeInternals<FilePathAnnotation$Outbound, FilePathAnnotation>>;
51
- /** @deprecated use `FilePathAnnotation$Outbound` instead. */
52
- type Outbound = FilePathAnnotation$Outbound;
53
- }
54
- export declare function filePathAnnotationToJSON(filePathAnnotation: FilePathAnnotation): string;
55
- export declare function filePathAnnotationFromJSON(jsonString: string): SafeParseResult<FilePathAnnotation, SDKValidationError>;
56
- //# sourceMappingURL=filepathannotation.d.ts.map