@openrouter/sdk 0.0.1-beta.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REACT_QUERY.md +3 -12
- package/README.md +52 -396
- package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +2 -2
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +2 -2
- package/esm/funcs/apiKeysDelete.d.ts +1 -1
- package/esm/funcs/apiKeysDelete.js +2 -2
- package/esm/funcs/apiKeysGet.d.ts +1 -1
- package/esm/funcs/apiKeysGet.js +2 -2
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -2
- package/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +2 -2
- package/esm/funcs/apiKeysUpdate.d.ts +1 -1
- package/esm/funcs/apiKeysUpdate.js +2 -2
- package/esm/funcs/betaResponsesSend.d.ts +9 -1
- package/esm/funcs/betaResponsesSend.js +38 -14
- package/esm/funcs/chatSend.d.ts +7 -0
- package/esm/funcs/chatSend.js +1 -7
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -1
- package/esm/funcs/creditsCreateCoinbaseCharge.js +15 -5
- package/esm/funcs/creditsGetCredits.d.ts +1 -1
- package/esm/funcs/creditsGetCredits.js +2 -2
- package/esm/funcs/endpointsList.d.ts +1 -1
- package/esm/funcs/endpointsList.js +2 -2
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +6 -2
- package/esm/funcs/generationsGetGeneration.d.ts +1 -1
- package/esm/funcs/generationsGetGeneration.js +13 -2
- package/esm/funcs/modelsCount.d.ts +3 -2
- package/esm/funcs/modelsCount.js +7 -3
- package/esm/funcs/modelsList.d.ts +3 -1
- package/esm/funcs/modelsList.js +8 -7
- package/esm/funcs/modelsListForUser.d.ts +3 -1
- package/esm/funcs/modelsListForUser.js +7 -3
- package/esm/funcs/oAuthCreateAuthCode.d.ts +18 -0
- package/esm/funcs/oAuthCreateAuthCode.js +82 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +2 -2
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.d.ts +18 -0
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +82 -0
- package/esm/funcs/parametersGetParameters.d.ts +1 -1
- package/esm/funcs/parametersGetParameters.js +2 -2
- package/esm/funcs/providersList.d.ts +1 -1
- package/esm/funcs/providersList.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/event-streams.d.ts +1 -1
- package/esm/models/badgatewayresponseerrordata.d.ts +40 -0
- package/esm/models/badgatewayresponseerrordata.js +35 -0
- package/esm/models/badrequestresponseerrordata.d.ts +40 -0
- package/esm/models/badrequestresponseerrordata.js +35 -0
- package/esm/models/chatgenerationparams.d.ts +12 -12
- package/esm/models/chatgenerationparams.js +16 -16
- package/esm/models/chatgenerationtokenusage.d.ts +2 -2
- package/esm/models/chatgenerationtokenusage.js +2 -4
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -15
- package/esm/models/chatmessagetokenlogprob.js +16 -15
- package/esm/models/chatstreamingresponsechunk.d.ts +15 -15
- package/esm/models/chatstreamingresponsechunk.js +15 -15
- package/esm/models/completioncreateparams.d.ts +2 -2
- package/esm/models/completioncreateparams.js +2 -2
- package/esm/models/createchargerequest.d.ts +31 -2
- package/esm/models/createchargerequest.js +47 -2
- package/esm/models/defaultparameters.d.ts +36 -0
- package/esm/models/defaultparameters.js +46 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.js +35 -0
- package/esm/models/endpointstatus.d.ts +26 -0
- package/esm/models/endpointstatus.js +36 -0
- package/esm/models/errors/badgatewayresponseerror.d.ts +52 -0
- package/esm/models/errors/badgatewayresponseerror.js +63 -0
- package/esm/models/errors/badrequestresponseerror.d.ts +52 -0
- package/esm/models/errors/badrequestresponseerror.js +63 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +63 -0
- package/esm/models/errors/forbiddenresponseerror.d.ts +52 -0
- package/esm/models/errors/forbiddenresponseerror.js +63 -0
- package/esm/models/errors/index.d.ts +14 -2
- package/esm/models/errors/index.js +14 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +52 -0
- package/esm/models/errors/internalserverresponseerror.js +63 -0
- package/esm/models/errors/notfoundresponseerror.d.ts +52 -0
- package/esm/models/errors/{errorresponse.js → notfoundresponseerror.js} +16 -17
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +52 -0
- package/esm/models/errors/payloadtoolargeresponseerror.js +63 -0
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +52 -0
- package/esm/models/errors/paymentrequiredresponseerror.js +63 -0
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +52 -0
- package/esm/models/errors/provideroverloadedresponseerror.js +63 -0
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/requesttimeoutresponseerror.js +63 -0
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +52 -0
- package/esm/models/errors/serviceunavailableresponseerror.js +63 -0
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +52 -0
- package/esm/models/errors/toomanyrequestsresponseerror.js +63 -0
- package/esm/models/errors/unauthorizedresponseerror.d.ts +52 -0
- package/esm/models/errors/unauthorizedresponseerror.js +63 -0
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +52 -0
- package/esm/models/errors/unprocessableentityresponseerror.js +63 -0
- package/esm/models/filecitation.d.ts +58 -0
- package/esm/models/filecitation.js +65 -0
- package/esm/models/filepath.d.ts +56 -0
- package/esm/models/filepath.js +64 -0
- package/esm/models/forbiddenresponseerrordata.d.ts +40 -0
- package/esm/models/forbiddenresponseerrordata.js +35 -0
- package/esm/models/index.d.ts +67 -23
- package/esm/models/index.js +67 -23
- package/esm/models/inputmodality.d.ts +25 -0
- package/esm/models/inputmodality.js +35 -0
- package/esm/models/instructtype.d.ts +48 -0
- package/esm/models/instructtype.js +55 -0
- package/esm/models/internalserverresponseerrordata.d.ts +40 -0
- package/esm/models/internalserverresponseerrordata.js +35 -0
- package/esm/models/listendpointsresponse.d.ts +126 -2
- package/esm/models/listendpointsresponse.js +115 -2
- package/esm/models/model.d.ts +101 -0
- package/esm/models/model.js +82 -0
- package/esm/models/modelarchitecture.d.ts +104 -0
- package/esm/models/modelarchitecture.js +107 -0
- package/esm/models/modelgroup.d.ts +45 -0
- package/esm/models/modelgroup.js +53 -0
- package/esm/models/modelscountresponse.d.ts +40 -2
- package/esm/models/modelscountresponse.js +31 -2
- package/esm/models/modelslistresponse.d.ts +10 -2
- package/esm/models/modelslistresponse.js +7 -2
- package/esm/models/notfoundresponseerrordata.d.ts +40 -0
- package/esm/models/notfoundresponseerrordata.js +35 -0
- package/esm/models/openairesponsesannotation.d.ts +28 -0
- package/esm/models/openairesponsesannotation.js +38 -0
- package/esm/models/openairesponsesincludable.d.ts +25 -0
- package/esm/models/openairesponsesincludable.js +35 -0
- package/esm/models/openairesponsesincompletedetails.d.ts +49 -0
- package/esm/models/openairesponsesincompletedetails.js +58 -0
- package/esm/models/openairesponsesinputunion.d.ts +588 -0
- package/esm/models/openairesponsesinputunion.js +686 -0
- package/esm/models/openairesponsesprompt.d.ts +83 -0
- package/esm/models/openairesponsesprompt.js +97 -0
- package/esm/models/openairesponsesreasoningconfig.d.ts +33 -0
- package/esm/models/openairesponsesreasoningconfig.js +35 -0
- package/esm/models/openairesponsesreasoningeffort.d.ts +24 -0
- package/esm/models/openairesponsesreasoningeffort.js +34 -0
- package/esm/models/openairesponsesrefusalcontent.d.ts +54 -0
- package/esm/models/openairesponsesrefusalcontent.js +51 -0
- package/esm/models/openairesponsesresponsestatus.d.ts +26 -0
- package/esm/models/openairesponsesresponsestatus.js +36 -0
- package/esm/models/openairesponsesservicetier.d.ts +25 -0
- package/esm/models/openairesponsesservicetier.js +35 -0
- package/esm/models/openairesponsestoolchoiceunion.d.ts +231 -0
- package/esm/models/openairesponsestoolchoiceunion.js +233 -0
- package/esm/models/openairesponsestruncation.d.ts +22 -0
- package/esm/models/openairesponsestruncation.js +32 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +75 -19
- package/esm/models/openresponseseasyinputmessage.js +105 -16
- package/esm/models/openresponseserrorevent.d.ts +63 -0
- package/esm/models/openresponseserrorevent.js +66 -0
- package/esm/models/openresponsesimagegencallcompleted.d.ts +61 -0
- package/esm/models/openresponsesimagegencallcompleted.js +68 -0
- package/esm/models/openresponsesimagegencallgenerating.d.ts +61 -0
- package/esm/models/openresponsesimagegencallgenerating.js +68 -0
- package/esm/models/openresponsesimagegencallinprogress.d.ts +61 -0
- package/esm/models/openresponsesimagegencallinprogress.js +68 -0
- package/esm/models/openresponsesimagegencallpartialimage.d.ts +65 -0
- package/esm/models/openresponsesimagegencallpartialimage.js +76 -0
- package/esm/models/openresponsesinput.d.ts +36 -5
- package/esm/models/openresponsesinput.js +82 -5
- package/esm/models/openresponsesinputmessageitem.d.ts +52 -8
- package/esm/models/openresponsesinputmessageitem.js +68 -5
- package/esm/models/openresponseslogprobs.d.ts +3 -32
- package/esm/models/openresponseslogprobs.js +3 -29
- package/esm/models/openresponsesnonstreamingresponse.d.ts +93 -123
- package/esm/models/openresponsesnonstreamingresponse.js +111 -145
- package/esm/models/openresponsesreasoning.d.ts +89 -0
- package/esm/models/openresponsesreasoning.js +93 -0
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -23
- package/esm/models/openresponsesreasoningconfig.js +3 -33
- package/esm/models/openresponsesreasoningdeltaevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningdeltaevent.js +74 -0
- package/esm/models/openresponsesreasoningdoneevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningdoneevent.js +74 -0
- package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +66 -0
- package/esm/models/openresponsesreasoningsummarypartaddedevent.js +75 -0
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +74 -0
- package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningsummarytextdoneevent.js +74 -0
- package/esm/models/openresponsesrequest.d.ts +736 -2
- package/esm/models/openresponsesrequest.js +789 -2
- package/esm/models/openresponsesresponsetext.d.ts +59 -0
- package/esm/models/openresponsesresponsetext.js +64 -0
- package/esm/models/openresponsesstreamevent.d.ts +25 -612
- package/esm/models/openresponsesstreamevent.js +51 -742
- package/esm/models/openresponsestoplogprobs.d.ts +34 -0
- package/esm/models/openresponsestoplogprobs.js +33 -0
- package/esm/models/{responsesusage.d.ts → openresponsesusage.d.ts} +14 -14
- package/esm/models/{responsesusage.js → openresponsesusage.js} +14 -14
- package/esm/models/operations/createauthkeyscode.d.ts +145 -0
- package/esm/models/operations/createauthkeyscode.js +146 -0
- package/esm/models/operations/createresponses.d.ts +58 -0
- package/esm/models/operations/createresponses.js +80 -0
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +104 -0
- package/esm/models/operations/exchangeauthcodeforapikey.js +111 -0
- package/esm/models/operations/getmodels.d.ts +0 -26
- package/esm/models/operations/getmodels.js +0 -38
- package/esm/models/operations/getparameters.d.ts +1 -0
- package/esm/models/operations/getparameters.js +1 -0
- package/esm/models/operations/index.d.ts +3 -2
- package/esm/models/operations/index.js +3 -2
- package/esm/models/operations/listendpointszdr.d.ts +3 -24
- package/esm/models/operations/listendpointszdr.js +2 -29
- package/esm/models/operations/listmodelsuser.d.ts +0 -22
- package/esm/models/operations/listmodelsuser.js +0 -28
- package/esm/models/operations/listproviders.d.ts +0 -36
- package/esm/models/operations/listproviders.js +0 -28
- package/esm/models/operations/sendchatcompletionrequest.d.ts +1 -1
- package/esm/models/operations/sendchatcompletionrequest.js +2 -1
- package/esm/models/outputitemimagegenerationcall.d.ts +59 -0
- package/esm/models/outputitemimagegenerationcall.js +56 -0
- package/esm/models/outputmessage.d.ts +192 -0
- package/esm/models/outputmessage.js +202 -0
- package/esm/models/outputmodality.d.ts +23 -0
- package/esm/models/outputmodality.js +33 -0
- package/esm/models/parameter.d.ts +43 -0
- package/esm/models/parameter.js +54 -0
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +40 -0
- package/esm/models/payloadtoolargeresponseerrordata.js +35 -0
- package/esm/models/paymentrequiredresponseerrordata.d.ts +40 -0
- package/esm/models/paymentrequiredresponseerrordata.js +35 -0
- package/esm/models/perrequestlimits.d.ts +40 -0
- package/esm/models/perrequestlimits.js +44 -0
- package/esm/models/providername.d.ts +106 -0
- package/esm/models/providername.js +116 -0
- package/esm/models/provideroverloadedresponseerrordata.d.ts +40 -0
- package/esm/models/provideroverloadedresponseerrordata.js +35 -0
- package/esm/models/publicendpoint.d.ts +140 -2
- package/esm/models/publicendpoint.js +156 -2
- package/esm/models/publicpricing.d.ts +87 -0
- package/esm/models/publicpricing.js +73 -0
- package/esm/models/quantization.d.ts +29 -0
- package/esm/models/quantization.js +39 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/requesttimeoutresponseerrordata.js +35 -0
- package/esm/models/responseformattextconfig.d.ts +31 -0
- package/esm/models/responseformattextconfig.js +38 -0
- package/esm/models/responseinputfile.d.ts +63 -0
- package/esm/models/responseinputfile.js +70 -0
- package/esm/models/responseinputimage.d.ts +79 -0
- package/esm/models/responseinputimage.js +90 -0
- package/esm/models/responseinputtext.d.ts +57 -0
- package/esm/models/responseinputtext.js +51 -0
- package/esm/models/responseoutputtext.d.ts +57 -0
- package/esm/models/responseoutputtext.js +54 -0
- package/esm/models/responseserrorfield.d.ts +25 -10
- package/esm/models/responseserrorfield.js +29 -14
- package/esm/models/responsesformatjsonobject.d.ts +55 -0
- package/esm/models/responsesformatjsonobject.js +49 -0
- package/esm/models/responsesformattext.d.ts +55 -0
- package/esm/models/responsesformattext.js +49 -0
- package/esm/models/responsesformattextjsonschemaconfig.d.ts +67 -0
- package/esm/models/responsesformattextjsonschemaconfig.js +57 -0
- package/esm/models/responsesoutputitemfunctioncall.d.ts +89 -0
- package/esm/models/responsesoutputitemfunctioncall.js +93 -0
- package/esm/models/responsesoutputitemreasoning.d.ts +92 -0
- package/esm/models/responsesoutputitemreasoning.js +93 -0
- package/esm/models/responsesoutputmessage.d.ts +45 -42
- package/esm/models/responsesoutputmessage.js +76 -65
- package/esm/models/responsetextconfig.d.ts +59 -0
- package/esm/models/responsetextconfig.js +62 -0
- package/esm/models/serviceunavailableresponseerrordata.d.ts +40 -0
- package/esm/models/serviceunavailableresponseerrordata.js +35 -0
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +40 -0
- package/esm/models/toomanyrequestsresponseerrordata.js +35 -0
- package/esm/models/topproviderinfo.d.ts +45 -0
- package/esm/models/topproviderinfo.js +48 -0
- package/esm/models/unauthorizedresponseerrordata.d.ts +40 -0
- package/esm/models/unauthorizedresponseerrordata.js +35 -0
- package/esm/models/unprocessableentityresponseerrordata.d.ts +40 -0
- package/esm/models/unprocessableentityresponseerrordata.js +35 -0
- package/esm/models/urlcitation.d.ts +60 -0
- package/esm/models/urlcitation.js +69 -0
- package/esm/react-query/betaResponsesSend.d.ts +1 -1
- package/esm/react-query/index.d.ts +2 -0
- package/esm/react-query/index.js +2 -0
- package/esm/react-query/modelsCount.d.ts +2 -2
- package/esm/react-query/modelsList.d.ts +2 -7
- package/esm/react-query/modelsList.js +0 -2
- package/esm/react-query/modelsListForUser.d.ts +2 -1
- package/esm/react-query/oAuthCreateAuthCode.d.ts +23 -0
- package/esm/react-query/oAuthCreateAuthCode.js +42 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +23 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +42 -0
- package/esm/sdk/chat.d.ts +7 -0
- package/esm/sdk/chat.js +0 -6
- package/esm/sdk/models.d.ts +4 -3
- package/esm/sdk/oauth.d.ts +46 -0
- package/esm/sdk/oauth.js +67 -0
- package/esm/sdk/responses.d.ts +8 -1
- package/esm/sdk/responses.js +0 -6
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +3 -1
- package/vitest.config.ts +26 -0
- package/.devcontainer/README.md +0 -35
- package/esm/models/errorresponse.d.ts +0 -155
- package/esm/models/errorresponse.js +0 -167
- package/esm/models/errors/errorresponse.d.ts +0 -46
- package/esm/models/errors/listproviders.d.ts +0 -49
- package/esm/models/errors/listproviders.js +0 -51
- package/esm/models/filecitationannotation.d.ts +0 -58
- package/esm/models/filecitationannotation.js +0 -64
- package/esm/models/filepathannotation.d.ts +0 -56
- package/esm/models/filepathannotation.js +0 -62
- package/esm/models/openresponsesformatjsonobject.d.ts +0 -55
- package/esm/models/openresponsesformatjsonobject.js +0 -49
- package/esm/models/openresponsesformatjsonschema.d.ts +0 -67
- package/esm/models/openresponsesformatjsonschema.js +0 -57
- package/esm/models/openresponsesformattext.d.ts +0 -55
- package/esm/models/openresponsesformattext.js +0 -49
- package/esm/models/openresponsesformattextconfig.d.ts +0 -31
- package/esm/models/openresponsesformattextconfig.js +0 -38
- package/esm/models/openresponsesinputcontent.d.ts +0 -43
- package/esm/models/openresponsesinputcontent.js +0 -50
- package/esm/models/openresponsesinputfile.d.ts +0 -63
- package/esm/models/openresponsesinputfile.js +0 -70
- package/esm/models/openresponsesinputimage.d.ts +0 -79
- package/esm/models/openresponsesinputimage.js +0 -90
- package/esm/models/openresponsesinputitem.d.ts +0 -39
- package/esm/models/openresponsesinputitem.js +0 -62
- package/esm/models/openresponsesinputtext.d.ts +0 -57
- package/esm/models/openresponsesinputtext.js +0 -51
- package/esm/models/openresponsesoutputtext.d.ts +0 -80
- package/esm/models/openresponsesoutputtext.js +0 -93
- package/esm/models/openresponsesprompt.d.ts +0 -39
- package/esm/models/openresponsesprompt.js +0 -34
- package/esm/models/openresponsesrefusalcontent.d.ts +0 -54
- package/esm/models/openresponsesrefusalcontent.js +0 -51
- package/esm/models/openresponsestextconfig.d.ts +0 -59
- package/esm/models/openresponsestextconfig.js +0 -63
- package/esm/models/openresponsestoolchoice.d.ts +0 -148
- package/esm/models/openresponsestoolchoice.js +0 -139
- package/esm/models/openresponsestoolunion.d.ts +0 -95
- package/esm/models/openresponsestoolunion.js +0 -94
- package/esm/models/operations/createapialpharesponses.d.ts +0 -58
- package/esm/models/operations/createapialpharesponses.js +0 -83
- package/esm/models/operations/listmodelscount.d.ts +0 -26
- package/esm/models/operations/listmodelscount.js +0 -34
- package/esm/models/outputtextcontent.d.ts +0 -80
- package/esm/models/outputtextcontent.js +0 -93
- package/esm/models/refusalcontent.d.ts +0 -54
- package/esm/models/refusalcontent.js +0 -51
- package/esm/models/toolchoicetypes.d.ts +0 -164
- package/esm/models/toolchoicetypes.js +0 -167
- package/esm/models/urlcitationannotation.d.ts +0 -60
- package/esm/models/urlcitationannotation.js +0 -68
- package/examples/README.md +0 -31
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* The method used to generate the code challenge
|
|
7
|
+
*/
|
|
8
|
+
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod: {
|
|
9
|
+
readonly S256: "S256";
|
|
10
|
+
readonly Plain: "plain";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The method used to generate the code challenge
|
|
14
|
+
*/
|
|
15
|
+
export type ExchangeAuthCodeForAPIKeyCodeChallengeMethod = OpenEnum<typeof ExchangeAuthCodeForAPIKeyCodeChallengeMethod>;
|
|
16
|
+
export type ExchangeAuthCodeForAPIKeyRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The authorization code received from the OAuth redirect
|
|
19
|
+
*/
|
|
20
|
+
code: string;
|
|
21
|
+
/**
|
|
22
|
+
* The code verifier if code_challenge was used in the authorization request
|
|
23
|
+
*/
|
|
24
|
+
codeVerifier?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The method used to generate the code challenge
|
|
27
|
+
*/
|
|
28
|
+
codeChallengeMethod?: ExchangeAuthCodeForAPIKeyCodeChallengeMethod | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Successfully exchanged code for an API key
|
|
32
|
+
*/
|
|
33
|
+
export type ExchangeAuthCodeForAPIKeyResponse = {
|
|
34
|
+
/**
|
|
35
|
+
* The API key to use for OpenRouter requests
|
|
36
|
+
*/
|
|
37
|
+
key: string;
|
|
38
|
+
/**
|
|
39
|
+
* User ID associated with the API key
|
|
40
|
+
*/
|
|
41
|
+
userId: string | null;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, unknown>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, ExchangeAuthCodeForAPIKeyCodeChallengeMethod>;
|
|
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 declare namespace ExchangeAuthCodeForAPIKeyCodeChallengeMethod$ {
|
|
52
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema` instead. */
|
|
53
|
+
const inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, unknown, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, unknown>>;
|
|
54
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema` instead. */
|
|
55
|
+
const outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, ExchangeAuthCodeForAPIKeyCodeChallengeMethod, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyCodeChallengeMethod, ExchangeAuthCodeForAPIKeyCodeChallengeMethod>>;
|
|
56
|
+
}
|
|
57
|
+
/** @internal */
|
|
58
|
+
export declare const ExchangeAuthCodeForAPIKeyRequest$inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyRequest, unknown>;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export type ExchangeAuthCodeForAPIKeyRequest$Outbound = {
|
|
61
|
+
code: string;
|
|
62
|
+
code_verifier?: string | undefined;
|
|
63
|
+
code_challenge_method?: string | null | undefined;
|
|
64
|
+
};
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const ExchangeAuthCodeForAPIKeyRequest$outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyRequest$Outbound, ExchangeAuthCodeForAPIKeyRequest>;
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
|
+
*/
|
|
71
|
+
export declare namespace ExchangeAuthCodeForAPIKeyRequest$ {
|
|
72
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$inboundSchema` instead. */
|
|
73
|
+
const inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyRequest, unknown, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyRequest, unknown>>;
|
|
74
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$outboundSchema` instead. */
|
|
75
|
+
const outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyRequest$Outbound, ExchangeAuthCodeForAPIKeyRequest, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyRequest$Outbound, ExchangeAuthCodeForAPIKeyRequest>>;
|
|
76
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$Outbound` instead. */
|
|
77
|
+
type Outbound = ExchangeAuthCodeForAPIKeyRequest$Outbound;
|
|
78
|
+
}
|
|
79
|
+
export declare function exchangeAuthCodeForAPIKeyRequestToJSON(exchangeAuthCodeForAPIKeyRequest: ExchangeAuthCodeForAPIKeyRequest): string;
|
|
80
|
+
export declare function exchangeAuthCodeForAPIKeyRequestFromJSON(jsonString: string): SafeParseResult<ExchangeAuthCodeForAPIKeyRequest, SDKValidationError>;
|
|
81
|
+
/** @internal */
|
|
82
|
+
export declare const ExchangeAuthCodeForAPIKeyResponse$inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyResponse, unknown>;
|
|
83
|
+
/** @internal */
|
|
84
|
+
export type ExchangeAuthCodeForAPIKeyResponse$Outbound = {
|
|
85
|
+
key: string;
|
|
86
|
+
user_id: string | null;
|
|
87
|
+
};
|
|
88
|
+
/** @internal */
|
|
89
|
+
export declare const ExchangeAuthCodeForAPIKeyResponse$outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyResponse$Outbound, ExchangeAuthCodeForAPIKeyResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
93
|
+
*/
|
|
94
|
+
export declare namespace ExchangeAuthCodeForAPIKeyResponse$ {
|
|
95
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$inboundSchema` instead. */
|
|
96
|
+
const inboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyResponse, unknown, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyResponse, unknown>>;
|
|
97
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$outboundSchema` instead. */
|
|
98
|
+
const outboundSchema: z.ZodType<ExchangeAuthCodeForAPIKeyResponse$Outbound, ExchangeAuthCodeForAPIKeyResponse, z.core.$ZodTypeInternals<ExchangeAuthCodeForAPIKeyResponse$Outbound, ExchangeAuthCodeForAPIKeyResponse>>;
|
|
99
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$Outbound` instead. */
|
|
100
|
+
type Outbound = ExchangeAuthCodeForAPIKeyResponse$Outbound;
|
|
101
|
+
}
|
|
102
|
+
export declare function exchangeAuthCodeForAPIKeyResponseToJSON(exchangeAuthCodeForAPIKeyResponse: ExchangeAuthCodeForAPIKeyResponse): string;
|
|
103
|
+
export declare function exchangeAuthCodeForAPIKeyResponseFromJSON(jsonString: string): SafeParseResult<ExchangeAuthCodeForAPIKeyResponse, SDKValidationError>;
|
|
104
|
+
//# sourceMappingURL=exchangeauthcodeforapikey.d.ts.map
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
/**
|
|
9
|
+
* The method used to generate the code challenge
|
|
10
|
+
*/
|
|
11
|
+
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod = {
|
|
12
|
+
S256: "S256",
|
|
13
|
+
Plain: "plain",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema = z
|
|
17
|
+
.union([
|
|
18
|
+
z.enum(ExchangeAuthCodeForAPIKeyCodeChallengeMethod),
|
|
19
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
20
|
+
]);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema = z.union([
|
|
23
|
+
z.enum(ExchangeAuthCodeForAPIKeyCodeChallengeMethod),
|
|
24
|
+
z.string().and(z.custom()),
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
+
*/
|
|
30
|
+
export var ExchangeAuthCodeForAPIKeyCodeChallengeMethod$;
|
|
31
|
+
(function (ExchangeAuthCodeForAPIKeyCodeChallengeMethod$) {
|
|
32
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema` instead. */
|
|
33
|
+
ExchangeAuthCodeForAPIKeyCodeChallengeMethod$.inboundSchema = ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema;
|
|
34
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema` instead. */
|
|
35
|
+
ExchangeAuthCodeForAPIKeyCodeChallengeMethod$.outboundSchema = ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema;
|
|
36
|
+
})(ExchangeAuthCodeForAPIKeyCodeChallengeMethod$ || (ExchangeAuthCodeForAPIKeyCodeChallengeMethod$ = {}));
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ExchangeAuthCodeForAPIKeyRequest$inboundSchema = z.object({
|
|
39
|
+
code: z.string(),
|
|
40
|
+
code_verifier: z.string().optional(),
|
|
41
|
+
code_challenge_method: z.nullable(ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema).optional(),
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
"code_verifier": "codeVerifier",
|
|
45
|
+
"code_challenge_method": "codeChallengeMethod",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema = z.object({
|
|
50
|
+
code: z.string(),
|
|
51
|
+
codeVerifier: z.string().optional(),
|
|
52
|
+
codeChallengeMethod: z.nullable(ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema).optional(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
codeVerifier: "code_verifier",
|
|
56
|
+
codeChallengeMethod: "code_challenge_method",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
|
+
*/
|
|
63
|
+
export var ExchangeAuthCodeForAPIKeyRequest$;
|
|
64
|
+
(function (ExchangeAuthCodeForAPIKeyRequest$) {
|
|
65
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$inboundSchema` instead. */
|
|
66
|
+
ExchangeAuthCodeForAPIKeyRequest$.inboundSchema = ExchangeAuthCodeForAPIKeyRequest$inboundSchema;
|
|
67
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$outboundSchema` instead. */
|
|
68
|
+
ExchangeAuthCodeForAPIKeyRequest$.outboundSchema = ExchangeAuthCodeForAPIKeyRequest$outboundSchema;
|
|
69
|
+
})(ExchangeAuthCodeForAPIKeyRequest$ || (ExchangeAuthCodeForAPIKeyRequest$ = {}));
|
|
70
|
+
export function exchangeAuthCodeForAPIKeyRequestToJSON(exchangeAuthCodeForAPIKeyRequest) {
|
|
71
|
+
return JSON.stringify(ExchangeAuthCodeForAPIKeyRequest$outboundSchema.parse(exchangeAuthCodeForAPIKeyRequest));
|
|
72
|
+
}
|
|
73
|
+
export function exchangeAuthCodeForAPIKeyRequestFromJSON(jsonString) {
|
|
74
|
+
return safeParse(jsonString, (x) => ExchangeAuthCodeForAPIKeyRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExchangeAuthCodeForAPIKeyRequest' from JSON`);
|
|
75
|
+
}
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const ExchangeAuthCodeForAPIKeyResponse$inboundSchema = z.object({
|
|
78
|
+
key: z.string(),
|
|
79
|
+
user_id: z.nullable(z.string()),
|
|
80
|
+
}).transform((v) => {
|
|
81
|
+
return remap$(v, {
|
|
82
|
+
"user_id": "userId",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const ExchangeAuthCodeForAPIKeyResponse$outboundSchema = z.object({
|
|
87
|
+
key: z.string(),
|
|
88
|
+
userId: z.nullable(z.string()),
|
|
89
|
+
}).transform((v) => {
|
|
90
|
+
return remap$(v, {
|
|
91
|
+
userId: "user_id",
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
/**
|
|
95
|
+
* @internal
|
|
96
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
97
|
+
*/
|
|
98
|
+
export var ExchangeAuthCodeForAPIKeyResponse$;
|
|
99
|
+
(function (ExchangeAuthCodeForAPIKeyResponse$) {
|
|
100
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$inboundSchema` instead. */
|
|
101
|
+
ExchangeAuthCodeForAPIKeyResponse$.inboundSchema = ExchangeAuthCodeForAPIKeyResponse$inboundSchema;
|
|
102
|
+
/** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$outboundSchema` instead. */
|
|
103
|
+
ExchangeAuthCodeForAPIKeyResponse$.outboundSchema = ExchangeAuthCodeForAPIKeyResponse$outboundSchema;
|
|
104
|
+
})(ExchangeAuthCodeForAPIKeyResponse$ || (ExchangeAuthCodeForAPIKeyResponse$ = {}));
|
|
105
|
+
export function exchangeAuthCodeForAPIKeyResponseToJSON(exchangeAuthCodeForAPIKeyResponse) {
|
|
106
|
+
return JSON.stringify(ExchangeAuthCodeForAPIKeyResponse$outboundSchema.parse(exchangeAuthCodeForAPIKeyResponse));
|
|
107
|
+
}
|
|
108
|
+
export function exchangeAuthCodeForAPIKeyResponseFromJSON(jsonString) {
|
|
109
|
+
return safeParse(jsonString, (x) => ExchangeAuthCodeForAPIKeyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ExchangeAuthCodeForAPIKeyResponse' from JSON`);
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=exchangeauthcodeforapikey.js.map
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import * as models from "../index.js";
|
|
5
4
|
export type GetModelsRequest = {
|
|
6
5
|
category?: string | undefined;
|
|
7
6
|
supportedParameters?: string | undefined;
|
|
8
|
-
useRss?: string | undefined;
|
|
9
|
-
useRssChatLinks?: string | undefined;
|
|
10
7
|
};
|
|
11
|
-
export type GetModelsResponse = models.ErrorResponse | models.ModelsListResponse | string;
|
|
12
8
|
/** @internal */
|
|
13
9
|
export declare const GetModelsRequest$inboundSchema: z.ZodType<GetModelsRequest, unknown>;
|
|
14
10
|
/** @internal */
|
|
15
11
|
export type GetModelsRequest$Outbound = {
|
|
16
12
|
category?: string | undefined;
|
|
17
13
|
supported_parameters?: string | undefined;
|
|
18
|
-
use_rss?: string | undefined;
|
|
19
|
-
use_rss_chat_links?: string | undefined;
|
|
20
14
|
};
|
|
21
15
|
/** @internal */
|
|
22
16
|
export declare const GetModelsRequest$outboundSchema: z.ZodType<GetModelsRequest$Outbound, GetModelsRequest>;
|
|
@@ -34,24 +28,4 @@ export declare namespace GetModelsRequest$ {
|
|
|
34
28
|
}
|
|
35
29
|
export declare function getModelsRequestToJSON(getModelsRequest: GetModelsRequest): string;
|
|
36
30
|
export declare function getModelsRequestFromJSON(jsonString: string): SafeParseResult<GetModelsRequest, SDKValidationError>;
|
|
37
|
-
/** @internal */
|
|
38
|
-
export declare const GetModelsResponse$inboundSchema: z.ZodType<GetModelsResponse, unknown>;
|
|
39
|
-
/** @internal */
|
|
40
|
-
export type GetModelsResponse$Outbound = models.ErrorResponse$Outbound | models.ModelsListResponse$Outbound | string;
|
|
41
|
-
/** @internal */
|
|
42
|
-
export declare const GetModelsResponse$outboundSchema: z.ZodType<GetModelsResponse$Outbound, GetModelsResponse>;
|
|
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 GetModelsResponse$ {
|
|
48
|
-
/** @deprecated use `GetModelsResponse$inboundSchema` instead. */
|
|
49
|
-
const inboundSchema: z.ZodType<GetModelsResponse, unknown, z.core.$ZodTypeInternals<GetModelsResponse, unknown>>;
|
|
50
|
-
/** @deprecated use `GetModelsResponse$outboundSchema` instead. */
|
|
51
|
-
const outboundSchema: z.ZodType<GetModelsResponse$Outbound, GetModelsResponse, z.core.$ZodTypeInternals<GetModelsResponse$Outbound, GetModelsResponse>>;
|
|
52
|
-
/** @deprecated use `GetModelsResponse$Outbound` instead. */
|
|
53
|
-
type Outbound = GetModelsResponse$Outbound;
|
|
54
|
-
}
|
|
55
|
-
export declare function getModelsResponseToJSON(getModelsResponse: GetModelsResponse): string;
|
|
56
|
-
export declare function getModelsResponseFromJSON(jsonString: string): SafeParseResult<GetModelsResponse, SDKValidationError>;
|
|
57
31
|
//# sourceMappingURL=getmodels.d.ts.map
|
|
@@ -4,31 +4,22 @@
|
|
|
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 * as models from "../index.js";
|
|
8
7
|
/** @internal */
|
|
9
8
|
export const GetModelsRequest$inboundSchema = z.object({
|
|
10
9
|
category: z.string().optional(),
|
|
11
10
|
supported_parameters: z.string().optional(),
|
|
12
|
-
use_rss: z.string().optional(),
|
|
13
|
-
use_rss_chat_links: z.string().optional(),
|
|
14
11
|
}).transform((v) => {
|
|
15
12
|
return remap$(v, {
|
|
16
13
|
"supported_parameters": "supportedParameters",
|
|
17
|
-
"use_rss": "useRss",
|
|
18
|
-
"use_rss_chat_links": "useRssChatLinks",
|
|
19
14
|
});
|
|
20
15
|
});
|
|
21
16
|
/** @internal */
|
|
22
17
|
export const GetModelsRequest$outboundSchema = z.object({
|
|
23
18
|
category: z.string().optional(),
|
|
24
19
|
supportedParameters: z.string().optional(),
|
|
25
|
-
useRss: z.string().optional(),
|
|
26
|
-
useRssChatLinks: z.string().optional(),
|
|
27
20
|
}).transform((v) => {
|
|
28
21
|
return remap$(v, {
|
|
29
22
|
supportedParameters: "supported_parameters",
|
|
30
|
-
useRss: "use_rss",
|
|
31
|
-
useRssChatLinks: "use_rss_chat_links",
|
|
32
23
|
});
|
|
33
24
|
});
|
|
34
25
|
/**
|
|
@@ -48,33 +39,4 @@ export function getModelsRequestToJSON(getModelsRequest) {
|
|
|
48
39
|
export function getModelsRequestFromJSON(jsonString) {
|
|
49
40
|
return safeParse(jsonString, (x) => GetModelsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetModelsRequest' from JSON`);
|
|
50
41
|
}
|
|
51
|
-
/** @internal */
|
|
52
|
-
export const GetModelsResponse$inboundSchema = z.union([
|
|
53
|
-
models.ErrorResponse$inboundSchema,
|
|
54
|
-
models.ModelsListResponse$inboundSchema,
|
|
55
|
-
z.string(),
|
|
56
|
-
]);
|
|
57
|
-
/** @internal */
|
|
58
|
-
export const GetModelsResponse$outboundSchema = z.union([
|
|
59
|
-
models.ErrorResponse$outboundSchema,
|
|
60
|
-
models.ModelsListResponse$outboundSchema,
|
|
61
|
-
z.string(),
|
|
62
|
-
]);
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
-
*/
|
|
67
|
-
export var GetModelsResponse$;
|
|
68
|
-
(function (GetModelsResponse$) {
|
|
69
|
-
/** @deprecated use `GetModelsResponse$inboundSchema` instead. */
|
|
70
|
-
GetModelsResponse$.inboundSchema = GetModelsResponse$inboundSchema;
|
|
71
|
-
/** @deprecated use `GetModelsResponse$outboundSchema` instead. */
|
|
72
|
-
GetModelsResponse$.outboundSchema = GetModelsResponse$outboundSchema;
|
|
73
|
-
})(GetModelsResponse$ || (GetModelsResponse$ = {}));
|
|
74
|
-
export function getModelsResponseToJSON(getModelsResponse) {
|
|
75
|
-
return JSON.stringify(GetModelsResponse$outboundSchema.parse(getModelsResponse));
|
|
76
|
-
}
|
|
77
|
-
export function getModelsResponseFromJSON(jsonString) {
|
|
78
|
-
return safeParse(jsonString, (x) => GetModelsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetModelsResponse' from JSON`);
|
|
79
|
-
}
|
|
80
42
|
//# sourceMappingURL=getmodels.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./createauthkeyscode.js";
|
|
2
2
|
export * from "./createcoinbasecharge.js";
|
|
3
3
|
export * from "./createkeys.js";
|
|
4
|
+
export * from "./createresponses.js";
|
|
4
5
|
export * from "./deletekeys.js";
|
|
6
|
+
export * from "./exchangeauthcodeforapikey.js";
|
|
5
7
|
export * from "./getcredits.js";
|
|
6
8
|
export * from "./getcurrentkey.js";
|
|
7
9
|
export * from "./getgeneration.js";
|
|
@@ -12,7 +14,6 @@ export * from "./getuseractivity.js";
|
|
|
12
14
|
export * from "./list.js";
|
|
13
15
|
export * from "./listendpoints.js";
|
|
14
16
|
export * from "./listendpointszdr.js";
|
|
15
|
-
export * from "./listmodelscount.js";
|
|
16
17
|
export * from "./listmodelsuser.js";
|
|
17
18
|
export * from "./listproviders.js";
|
|
18
19
|
export * from "./sendchatcompletionrequest.js";
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
|
-
export * from "./
|
|
4
|
+
export * from "./createauthkeyscode.js";
|
|
5
5
|
export * from "./createcoinbasecharge.js";
|
|
6
6
|
export * from "./createkeys.js";
|
|
7
|
+
export * from "./createresponses.js";
|
|
7
8
|
export * from "./deletekeys.js";
|
|
9
|
+
export * from "./exchangeauthcodeforapikey.js";
|
|
8
10
|
export * from "./getcredits.js";
|
|
9
11
|
export * from "./getcurrentkey.js";
|
|
10
12
|
export * from "./getgeneration.js";
|
|
@@ -15,7 +17,6 @@ export * from "./getuseractivity.js";
|
|
|
15
17
|
export * from "./list.js";
|
|
16
18
|
export * from "./listendpoints.js";
|
|
17
19
|
export * from "./listendpointszdr.js";
|
|
18
|
-
export * from "./listmodelscount.js";
|
|
19
20
|
export * from "./listmodelsuser.js";
|
|
20
21
|
export * from "./listproviders.js";
|
|
21
22
|
export * from "./sendchatcompletionrequest.js";
|
|
@@ -5,37 +5,16 @@ import * as models from "../index.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns a list of endpoints
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
8
|
+
export type ListEndpointsZdrResponse = {
|
|
9
9
|
data: Array<models.PublicEndpoint>;
|
|
10
10
|
};
|
|
11
|
-
export type ListEndpointsZdrResponse = ListEndpointsZdrResponseBody | models.ErrorResponse;
|
|
12
11
|
/** @internal */
|
|
13
|
-
export declare const
|
|
12
|
+
export declare const ListEndpointsZdrResponse$inboundSchema: z.ZodType<ListEndpointsZdrResponse, unknown>;
|
|
14
13
|
/** @internal */
|
|
15
|
-
export type
|
|
14
|
+
export type ListEndpointsZdrResponse$Outbound = {
|
|
16
15
|
data: Array<models.PublicEndpoint$Outbound>;
|
|
17
16
|
};
|
|
18
17
|
/** @internal */
|
|
19
|
-
export declare const ListEndpointsZdrResponseBody$outboundSchema: z.ZodType<ListEndpointsZdrResponseBody$Outbound, ListEndpointsZdrResponseBody>;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
-
*/
|
|
24
|
-
export declare namespace ListEndpointsZdrResponseBody$ {
|
|
25
|
-
/** @deprecated use `ListEndpointsZdrResponseBody$inboundSchema` instead. */
|
|
26
|
-
const inboundSchema: z.ZodType<ListEndpointsZdrResponseBody, unknown, z.core.$ZodTypeInternals<ListEndpointsZdrResponseBody, unknown>>;
|
|
27
|
-
/** @deprecated use `ListEndpointsZdrResponseBody$outboundSchema` instead. */
|
|
28
|
-
const outboundSchema: z.ZodType<ListEndpointsZdrResponseBody$Outbound, ListEndpointsZdrResponseBody, z.core.$ZodTypeInternals<ListEndpointsZdrResponseBody$Outbound, ListEndpointsZdrResponseBody>>;
|
|
29
|
-
/** @deprecated use `ListEndpointsZdrResponseBody$Outbound` instead. */
|
|
30
|
-
type Outbound = ListEndpointsZdrResponseBody$Outbound;
|
|
31
|
-
}
|
|
32
|
-
export declare function listEndpointsZdrResponseBodyToJSON(listEndpointsZdrResponseBody: ListEndpointsZdrResponseBody): string;
|
|
33
|
-
export declare function listEndpointsZdrResponseBodyFromJSON(jsonString: string): SafeParseResult<ListEndpointsZdrResponseBody, SDKValidationError>;
|
|
34
|
-
/** @internal */
|
|
35
|
-
export declare const ListEndpointsZdrResponse$inboundSchema: z.ZodType<ListEndpointsZdrResponse, unknown>;
|
|
36
|
-
/** @internal */
|
|
37
|
-
export type ListEndpointsZdrResponse$Outbound = ListEndpointsZdrResponseBody$Outbound | models.ErrorResponse$Outbound;
|
|
38
|
-
/** @internal */
|
|
39
18
|
export declare const ListEndpointsZdrResponse$outboundSchema: z.ZodType<ListEndpointsZdrResponse$Outbound, ListEndpointsZdrResponse>;
|
|
40
19
|
/**
|
|
41
20
|
* @internal
|
|
@@ -5,40 +5,13 @@ import * as z from "zod/v4";
|
|
|
5
5
|
import { safeParse } from "../../lib/schemas.js";
|
|
6
6
|
import * as models from "../index.js";
|
|
7
7
|
/** @internal */
|
|
8
|
-
export const
|
|
8
|
+
export const ListEndpointsZdrResponse$inboundSchema = z.object({
|
|
9
9
|
data: z.array(models.PublicEndpoint$inboundSchema),
|
|
10
10
|
});
|
|
11
11
|
/** @internal */
|
|
12
|
-
export const
|
|
12
|
+
export const ListEndpointsZdrResponse$outboundSchema = z.object({
|
|
13
13
|
data: z.array(models.PublicEndpoint$outboundSchema),
|
|
14
14
|
});
|
|
15
|
-
/**
|
|
16
|
-
* @internal
|
|
17
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
-
*/
|
|
19
|
-
export var ListEndpointsZdrResponseBody$;
|
|
20
|
-
(function (ListEndpointsZdrResponseBody$) {
|
|
21
|
-
/** @deprecated use `ListEndpointsZdrResponseBody$inboundSchema` instead. */
|
|
22
|
-
ListEndpointsZdrResponseBody$.inboundSchema = ListEndpointsZdrResponseBody$inboundSchema;
|
|
23
|
-
/** @deprecated use `ListEndpointsZdrResponseBody$outboundSchema` instead. */
|
|
24
|
-
ListEndpointsZdrResponseBody$.outboundSchema = ListEndpointsZdrResponseBody$outboundSchema;
|
|
25
|
-
})(ListEndpointsZdrResponseBody$ || (ListEndpointsZdrResponseBody$ = {}));
|
|
26
|
-
export function listEndpointsZdrResponseBodyToJSON(listEndpointsZdrResponseBody) {
|
|
27
|
-
return JSON.stringify(ListEndpointsZdrResponseBody$outboundSchema.parse(listEndpointsZdrResponseBody));
|
|
28
|
-
}
|
|
29
|
-
export function listEndpointsZdrResponseBodyFromJSON(jsonString) {
|
|
30
|
-
return safeParse(jsonString, (x) => ListEndpointsZdrResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEndpointsZdrResponseBody' from JSON`);
|
|
31
|
-
}
|
|
32
|
-
/** @internal */
|
|
33
|
-
export const ListEndpointsZdrResponse$inboundSchema = z.union([
|
|
34
|
-
z.lazy(() => ListEndpointsZdrResponseBody$inboundSchema),
|
|
35
|
-
models.ErrorResponse$inboundSchema,
|
|
36
|
-
]);
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const ListEndpointsZdrResponse$outboundSchema = z.union([
|
|
39
|
-
z.lazy(() => ListEndpointsZdrResponseBody$outboundSchema),
|
|
40
|
-
models.ErrorResponse$outboundSchema,
|
|
41
|
-
]);
|
|
42
15
|
/**
|
|
43
16
|
* @internal
|
|
44
17
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import * as models from "../index.js";
|
|
5
4
|
export type ListModelsUserSecurity = {
|
|
6
5
|
bearer: string;
|
|
7
6
|
};
|
|
8
|
-
export type ListModelsUserResponse = models.ErrorResponse | models.ModelsListResponse;
|
|
9
7
|
/** @internal */
|
|
10
8
|
export declare const ListModelsUserSecurity$inboundSchema: z.ZodType<ListModelsUserSecurity, unknown>;
|
|
11
9
|
/** @internal */
|
|
@@ -28,24 +26,4 @@ export declare namespace ListModelsUserSecurity$ {
|
|
|
28
26
|
}
|
|
29
27
|
export declare function listModelsUserSecurityToJSON(listModelsUserSecurity: ListModelsUserSecurity): string;
|
|
30
28
|
export declare function listModelsUserSecurityFromJSON(jsonString: string): SafeParseResult<ListModelsUserSecurity, SDKValidationError>;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const ListModelsUserResponse$inboundSchema: z.ZodType<ListModelsUserResponse, unknown>;
|
|
33
|
-
/** @internal */
|
|
34
|
-
export type ListModelsUserResponse$Outbound = models.ErrorResponse$Outbound | models.ModelsListResponse$Outbound;
|
|
35
|
-
/** @internal */
|
|
36
|
-
export declare const ListModelsUserResponse$outboundSchema: z.ZodType<ListModelsUserResponse$Outbound, ListModelsUserResponse>;
|
|
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 ListModelsUserResponse$ {
|
|
42
|
-
/** @deprecated use `ListModelsUserResponse$inboundSchema` instead. */
|
|
43
|
-
const inboundSchema: z.ZodType<ListModelsUserResponse, unknown, z.core.$ZodTypeInternals<ListModelsUserResponse, unknown>>;
|
|
44
|
-
/** @deprecated use `ListModelsUserResponse$outboundSchema` instead. */
|
|
45
|
-
const outboundSchema: z.ZodType<ListModelsUserResponse$Outbound, ListModelsUserResponse, z.core.$ZodTypeInternals<ListModelsUserResponse$Outbound, ListModelsUserResponse>>;
|
|
46
|
-
/** @deprecated use `ListModelsUserResponse$Outbound` instead. */
|
|
47
|
-
type Outbound = ListModelsUserResponse$Outbound;
|
|
48
|
-
}
|
|
49
|
-
export declare function listModelsUserResponseToJSON(listModelsUserResponse: ListModelsUserResponse): string;
|
|
50
|
-
export declare function listModelsUserResponseFromJSON(jsonString: string): SafeParseResult<ListModelsUserResponse, SDKValidationError>;
|
|
51
29
|
//# sourceMappingURL=listmodelsuser.d.ts.map
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
5
|
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
import * as models from "../index.js";
|
|
7
6
|
/** @internal */
|
|
8
7
|
export const ListModelsUserSecurity$inboundSchema = z.object({
|
|
9
8
|
bearer: z.string(),
|
|
@@ -29,31 +28,4 @@ export function listModelsUserSecurityToJSON(listModelsUserSecurity) {
|
|
|
29
28
|
export function listModelsUserSecurityFromJSON(jsonString) {
|
|
30
29
|
return safeParse(jsonString, (x) => ListModelsUserSecurity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsUserSecurity' from JSON`);
|
|
31
30
|
}
|
|
32
|
-
/** @internal */
|
|
33
|
-
export const ListModelsUserResponse$inboundSchema = z.union([
|
|
34
|
-
models.ErrorResponse$inboundSchema,
|
|
35
|
-
models.ModelsListResponse$inboundSchema,
|
|
36
|
-
]);
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const ListModelsUserResponse$outboundSchema = z.union([
|
|
39
|
-
models.ErrorResponse$outboundSchema,
|
|
40
|
-
models.ModelsListResponse$outboundSchema,
|
|
41
|
-
]);
|
|
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 var ListModelsUserResponse$;
|
|
47
|
-
(function (ListModelsUserResponse$) {
|
|
48
|
-
/** @deprecated use `ListModelsUserResponse$inboundSchema` instead. */
|
|
49
|
-
ListModelsUserResponse$.inboundSchema = ListModelsUserResponse$inboundSchema;
|
|
50
|
-
/** @deprecated use `ListModelsUserResponse$outboundSchema` instead. */
|
|
51
|
-
ListModelsUserResponse$.outboundSchema = ListModelsUserResponse$outboundSchema;
|
|
52
|
-
})(ListModelsUserResponse$ || (ListModelsUserResponse$ = {}));
|
|
53
|
-
export function listModelsUserResponseToJSON(listModelsUserResponse) {
|
|
54
|
-
return JSON.stringify(ListModelsUserResponse$outboundSchema.parse(listModelsUserResponse));
|
|
55
|
-
}
|
|
56
|
-
export function listModelsUserResponseFromJSON(jsonString) {
|
|
57
|
-
return safeParse(jsonString, (x) => ListModelsUserResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListModelsUserResponse' from JSON`);
|
|
58
|
-
}
|
|
59
31
|
//# sourceMappingURL=listmodelsuser.js.map
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Error details
|
|
6
|
-
*/
|
|
7
|
-
export type ErrorT = {
|
|
8
|
-
/**
|
|
9
|
-
* Error code
|
|
10
|
-
*/
|
|
11
|
-
code: number;
|
|
12
|
-
/**
|
|
13
|
-
* Error message
|
|
14
|
-
*/
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
4
|
export type ListProvidersData = {
|
|
18
5
|
/**
|
|
19
6
|
* Display name of the provider
|
|
@@ -43,29 +30,6 @@ export type ListProvidersResponse = {
|
|
|
43
30
|
data: Array<ListProvidersData>;
|
|
44
31
|
};
|
|
45
32
|
/** @internal */
|
|
46
|
-
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, unknown>;
|
|
47
|
-
/** @internal */
|
|
48
|
-
export type ErrorT$Outbound = {
|
|
49
|
-
code: number;
|
|
50
|
-
message: string;
|
|
51
|
-
};
|
|
52
|
-
/** @internal */
|
|
53
|
-
export declare const ErrorT$outboundSchema: z.ZodType<ErrorT$Outbound, ErrorT>;
|
|
54
|
-
/**
|
|
55
|
-
* @internal
|
|
56
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
-
*/
|
|
58
|
-
export declare namespace ErrorT$ {
|
|
59
|
-
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
60
|
-
const inboundSchema: z.ZodType<ErrorT, unknown, z.core.$ZodTypeInternals<ErrorT, unknown>>;
|
|
61
|
-
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
62
|
-
const outboundSchema: z.ZodType<ErrorT$Outbound, ErrorT, z.core.$ZodTypeInternals<ErrorT$Outbound, ErrorT>>;
|
|
63
|
-
/** @deprecated use `ErrorT$Outbound` instead. */
|
|
64
|
-
type Outbound = ErrorT$Outbound;
|
|
65
|
-
}
|
|
66
|
-
export declare function errorToJSON(errorT: ErrorT): string;
|
|
67
|
-
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
|
|
68
|
-
/** @internal */
|
|
69
33
|
export declare const ListProvidersData$inboundSchema: z.ZodType<ListProvidersData, unknown>;
|
|
70
34
|
/** @internal */
|
|
71
35
|
export type ListProvidersData$Outbound = {
|
|
@@ -5,34 +5,6 @@ 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
7
|
/** @internal */
|
|
8
|
-
export const ErrorT$inboundSchema = z.object({
|
|
9
|
-
code: z.number(),
|
|
10
|
-
message: z.string(),
|
|
11
|
-
});
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const ErrorT$outboundSchema = z
|
|
14
|
-
.object({
|
|
15
|
-
code: z.number(),
|
|
16
|
-
message: z.string(),
|
|
17
|
-
});
|
|
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 var ErrorT$;
|
|
23
|
-
(function (ErrorT$) {
|
|
24
|
-
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
25
|
-
ErrorT$.inboundSchema = ErrorT$inboundSchema;
|
|
26
|
-
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
27
|
-
ErrorT$.outboundSchema = ErrorT$outboundSchema;
|
|
28
|
-
})(ErrorT$ || (ErrorT$ = {}));
|
|
29
|
-
export function errorToJSON(errorT) {
|
|
30
|
-
return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
|
|
31
|
-
}
|
|
32
|
-
export function errorFromJSON(jsonString) {
|
|
33
|
-
return safeParse(jsonString, (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
|
|
34
|
-
}
|
|
35
|
-
/** @internal */
|
|
36
8
|
export const ListProvidersData$inboundSchema = z.object({
|
|
37
9
|
name: z.string(),
|
|
38
10
|
slug: z.string(),
|
|
@@ -3,7 +3,7 @@ import { EventStream } from "../../lib/event-streams.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
5
|
import * as models from "../index.js";
|
|
6
|
-
export type SendChatCompletionRequestResponse = models.ChatResponse | EventStream<models.
|
|
6
|
+
export type SendChatCompletionRequestResponse = models.ChatResponse | EventStream<models.ChatStreamingResponseChunkData>;
|
|
7
7
|
/** @internal */
|
|
8
8
|
export declare const SendChatCompletionRequestResponse$inboundSchema: z.ZodType<SendChatCompletionRequestResponse, unknown>;
|
|
9
9
|
/** @internal */
|
|
@@ -14,7 +14,8 @@ export const SendChatCompletionRequestResponse$inboundSchema = z.union([
|
|
|
14
14
|
if (rawEvent.data === "[DONE]")
|
|
15
15
|
return { done: true };
|
|
16
16
|
return {
|
|
17
|
-
value: models.ChatStreamingResponseChunk$inboundSchema.parse(rawEvent)
|
|
17
|
+
value: models.ChatStreamingResponseChunk$inboundSchema.parse(rawEvent)
|
|
18
|
+
?.data,
|
|
18
19
|
};
|
|
19
20
|
});
|
|
20
21
|
}),
|