@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
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
export type
|
|
4
|
+
export type TopLogprob = {
|
|
5
5
|
token: string;
|
|
6
6
|
logprob: number;
|
|
7
7
|
bytes: Array<number> | null;
|
|
@@ -10,32 +10,32 @@ export type ChatMessageTokenLogprob = {
|
|
|
10
10
|
token: string;
|
|
11
11
|
logprob: number;
|
|
12
12
|
bytes: Array<number> | null;
|
|
13
|
-
topLogprobs: Array<
|
|
13
|
+
topLogprobs: Array<TopLogprob>;
|
|
14
14
|
};
|
|
15
15
|
/** @internal */
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const TopLogprob$inboundSchema: z.ZodType<TopLogprob, unknown>;
|
|
17
17
|
/** @internal */
|
|
18
|
-
export type
|
|
18
|
+
export type TopLogprob$Outbound = {
|
|
19
19
|
token: string;
|
|
20
20
|
logprob: number;
|
|
21
21
|
bytes: Array<number> | null;
|
|
22
22
|
};
|
|
23
23
|
/** @internal */
|
|
24
|
-
export declare const
|
|
24
|
+
export declare const TopLogprob$outboundSchema: z.ZodType<TopLogprob$Outbound, TopLogprob>;
|
|
25
25
|
/**
|
|
26
26
|
* @internal
|
|
27
27
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
28
|
*/
|
|
29
|
-
export declare namespace
|
|
30
|
-
/** @deprecated use `
|
|
31
|
-
const inboundSchema: z.ZodType<
|
|
32
|
-
/** @deprecated use `
|
|
33
|
-
const outboundSchema: z.ZodType<
|
|
34
|
-
/** @deprecated use `
|
|
35
|
-
type Outbound =
|
|
29
|
+
export declare namespace TopLogprob$ {
|
|
30
|
+
/** @deprecated use `TopLogprob$inboundSchema` instead. */
|
|
31
|
+
const inboundSchema: z.ZodType<TopLogprob, unknown, z.core.$ZodTypeInternals<TopLogprob, unknown>>;
|
|
32
|
+
/** @deprecated use `TopLogprob$outboundSchema` instead. */
|
|
33
|
+
const outboundSchema: z.ZodType<TopLogprob$Outbound, TopLogprob, z.core.$ZodTypeInternals<TopLogprob$Outbound, TopLogprob>>;
|
|
34
|
+
/** @deprecated use `TopLogprob$Outbound` instead. */
|
|
35
|
+
type Outbound = TopLogprob$Outbound;
|
|
36
36
|
}
|
|
37
|
-
export declare function
|
|
38
|
-
export declare function
|
|
37
|
+
export declare function topLogprobToJSON(topLogprob: TopLogprob): string;
|
|
38
|
+
export declare function topLogprobFromJSON(jsonString: string): SafeParseResult<TopLogprob, SDKValidationError>;
|
|
39
39
|
/** @internal */
|
|
40
40
|
export declare const ChatMessageTokenLogprob$inboundSchema: z.ZodType<ChatMessageTokenLogprob, unknown>;
|
|
41
41
|
/** @internal */
|
|
@@ -43,7 +43,7 @@ export type ChatMessageTokenLogprob$Outbound = {
|
|
|
43
43
|
token: string;
|
|
44
44
|
logprob: number;
|
|
45
45
|
bytes: Array<number> | null;
|
|
46
|
-
top_logprobs: Array<
|
|
46
|
+
top_logprobs: Array<TopLogprob$Outbound>;
|
|
47
47
|
};
|
|
48
48
|
/** @internal */
|
|
49
49
|
export declare const ChatMessageTokenLogprob$outboundSchema: z.ZodType<ChatMessageTokenLogprob$Outbound, ChatMessageTokenLogprob>;
|
|
@@ -5,13 +5,14 @@ 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
|
|
8
|
+
export const TopLogprob$inboundSchema = z
|
|
9
|
+
.object({
|
|
9
10
|
token: z.string(),
|
|
10
11
|
logprob: z.number(),
|
|
11
12
|
bytes: z.nullable(z.array(z.number())),
|
|
12
13
|
});
|
|
13
14
|
/** @internal */
|
|
14
|
-
export const
|
|
15
|
+
export const TopLogprob$outboundSchema = z.object({
|
|
15
16
|
token: z.string(),
|
|
16
17
|
logprob: z.number(),
|
|
17
18
|
bytes: z.nullable(z.array(z.number())),
|
|
@@ -20,25 +21,25 @@ export const ChatMessageTokenLogprobTopLogprob$outboundSchema = z.object({
|
|
|
20
21
|
* @internal
|
|
21
22
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
23
|
*/
|
|
23
|
-
export var
|
|
24
|
-
(function (
|
|
25
|
-
/** @deprecated use `
|
|
26
|
-
|
|
27
|
-
/** @deprecated use `
|
|
28
|
-
|
|
29
|
-
})(
|
|
30
|
-
export function
|
|
31
|
-
return JSON.stringify(
|
|
24
|
+
export var TopLogprob$;
|
|
25
|
+
(function (TopLogprob$) {
|
|
26
|
+
/** @deprecated use `TopLogprob$inboundSchema` instead. */
|
|
27
|
+
TopLogprob$.inboundSchema = TopLogprob$inboundSchema;
|
|
28
|
+
/** @deprecated use `TopLogprob$outboundSchema` instead. */
|
|
29
|
+
TopLogprob$.outboundSchema = TopLogprob$outboundSchema;
|
|
30
|
+
})(TopLogprob$ || (TopLogprob$ = {}));
|
|
31
|
+
export function topLogprobToJSON(topLogprob) {
|
|
32
|
+
return JSON.stringify(TopLogprob$outboundSchema.parse(topLogprob));
|
|
32
33
|
}
|
|
33
|
-
export function
|
|
34
|
-
return safeParse(jsonString, (x) =>
|
|
34
|
+
export function topLogprobFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => TopLogprob$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TopLogprob' from JSON`);
|
|
35
36
|
}
|
|
36
37
|
/** @internal */
|
|
37
38
|
export const ChatMessageTokenLogprob$inboundSchema = z.object({
|
|
38
39
|
token: z.string(),
|
|
39
40
|
logprob: z.number(),
|
|
40
41
|
bytes: z.nullable(z.array(z.number())),
|
|
41
|
-
top_logprobs: z.array(z.lazy(() =>
|
|
42
|
+
top_logprobs: z.array(z.lazy(() => TopLogprob$inboundSchema)),
|
|
42
43
|
}).transform((v) => {
|
|
43
44
|
return remap$(v, {
|
|
44
45
|
"top_logprobs": "topLogprobs",
|
|
@@ -49,7 +50,7 @@ export const ChatMessageTokenLogprob$outboundSchema = z.object({
|
|
|
49
50
|
token: z.string(),
|
|
50
51
|
logprob: z.number(),
|
|
51
52
|
bytes: z.nullable(z.array(z.number())),
|
|
52
|
-
topLogprobs: z.array(z.lazy(() =>
|
|
53
|
+
topLogprobs: z.array(z.lazy(() => TopLogprob$outboundSchema)),
|
|
53
54
|
}).transform((v) => {
|
|
54
55
|
return remap$(v, {
|
|
55
56
|
topLogprobs: "top_logprobs",
|
|
@@ -7,7 +7,7 @@ export type ChatStreamingResponseChunkError = {
|
|
|
7
7
|
message: string;
|
|
8
8
|
code: number;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type ChatStreamingResponseChunkData = {
|
|
11
11
|
id: string;
|
|
12
12
|
choices: Array<ChatStreamingChoice>;
|
|
13
13
|
created: number;
|
|
@@ -18,7 +18,7 @@ export type Data = {
|
|
|
18
18
|
usage?: ChatGenerationTokenUsage | undefined;
|
|
19
19
|
};
|
|
20
20
|
export type ChatStreamingResponseChunk = {
|
|
21
|
-
data:
|
|
21
|
+
data: ChatStreamingResponseChunkData;
|
|
22
22
|
};
|
|
23
23
|
/** @internal */
|
|
24
24
|
export declare const ChatStreamingResponseChunkError$inboundSchema: z.ZodType<ChatStreamingResponseChunkError, unknown>;
|
|
@@ -44,9 +44,9 @@ export declare namespace ChatStreamingResponseChunkError$ {
|
|
|
44
44
|
export declare function chatStreamingResponseChunkErrorToJSON(chatStreamingResponseChunkError: ChatStreamingResponseChunkError): string;
|
|
45
45
|
export declare function chatStreamingResponseChunkErrorFromJSON(jsonString: string): SafeParseResult<ChatStreamingResponseChunkError, SDKValidationError>;
|
|
46
46
|
/** @internal */
|
|
47
|
-
export declare const
|
|
47
|
+
export declare const ChatStreamingResponseChunkData$inboundSchema: z.ZodType<ChatStreamingResponseChunkData, unknown>;
|
|
48
48
|
/** @internal */
|
|
49
|
-
export type
|
|
49
|
+
export type ChatStreamingResponseChunkData$Outbound = {
|
|
50
50
|
id: string;
|
|
51
51
|
choices: Array<ChatStreamingChoice$Outbound>;
|
|
52
52
|
created: number;
|
|
@@ -57,26 +57,26 @@ export type Data$Outbound = {
|
|
|
57
57
|
usage?: ChatGenerationTokenUsage$Outbound | undefined;
|
|
58
58
|
};
|
|
59
59
|
/** @internal */
|
|
60
|
-
export declare const
|
|
60
|
+
export declare const ChatStreamingResponseChunkData$outboundSchema: z.ZodType<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData>;
|
|
61
61
|
/**
|
|
62
62
|
* @internal
|
|
63
63
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
64
64
|
*/
|
|
65
|
-
export declare namespace
|
|
66
|
-
/** @deprecated use `
|
|
67
|
-
const inboundSchema: z.ZodType<
|
|
68
|
-
/** @deprecated use `
|
|
69
|
-
const outboundSchema: z.ZodType<
|
|
70
|
-
/** @deprecated use `
|
|
71
|
-
type Outbound =
|
|
65
|
+
export declare namespace ChatStreamingResponseChunkData$ {
|
|
66
|
+
/** @deprecated use `ChatStreamingResponseChunkData$inboundSchema` instead. */
|
|
67
|
+
const inboundSchema: z.ZodType<ChatStreamingResponseChunkData, unknown, z.core.$ZodTypeInternals<ChatStreamingResponseChunkData, unknown>>;
|
|
68
|
+
/** @deprecated use `ChatStreamingResponseChunkData$outboundSchema` instead. */
|
|
69
|
+
const outboundSchema: z.ZodType<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData, z.core.$ZodTypeInternals<ChatStreamingResponseChunkData$Outbound, ChatStreamingResponseChunkData>>;
|
|
70
|
+
/** @deprecated use `ChatStreamingResponseChunkData$Outbound` instead. */
|
|
71
|
+
type Outbound = ChatStreamingResponseChunkData$Outbound;
|
|
72
72
|
}
|
|
73
|
-
export declare function
|
|
74
|
-
export declare function
|
|
73
|
+
export declare function chatStreamingResponseChunkDataToJSON(chatStreamingResponseChunkData: ChatStreamingResponseChunkData): string;
|
|
74
|
+
export declare function chatStreamingResponseChunkDataFromJSON(jsonString: string): SafeParseResult<ChatStreamingResponseChunkData, SDKValidationError>;
|
|
75
75
|
/** @internal */
|
|
76
76
|
export declare const ChatStreamingResponseChunk$inboundSchema: z.ZodType<ChatStreamingResponseChunk, unknown>;
|
|
77
77
|
/** @internal */
|
|
78
78
|
export type ChatStreamingResponseChunk$Outbound = {
|
|
79
|
-
data:
|
|
79
|
+
data: ChatStreamingResponseChunkData$Outbound;
|
|
80
80
|
};
|
|
81
81
|
/** @internal */
|
|
82
82
|
export declare const ChatStreamingResponseChunk$outboundSchema: z.ZodType<ChatStreamingResponseChunk$Outbound, ChatStreamingResponseChunk>;
|
|
@@ -34,7 +34,7 @@ export function chatStreamingResponseChunkErrorFromJSON(jsonString) {
|
|
|
34
34
|
return safeParse(jsonString, (x) => ChatStreamingResponseChunkError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingResponseChunkError' from JSON`);
|
|
35
35
|
}
|
|
36
36
|
/** @internal */
|
|
37
|
-
export const
|
|
37
|
+
export const ChatStreamingResponseChunkData$inboundSchema = z.object({
|
|
38
38
|
id: z.string(),
|
|
39
39
|
choices: z.array(ChatStreamingChoice$inboundSchema),
|
|
40
40
|
created: z.number(),
|
|
@@ -49,7 +49,7 @@ export const Data$inboundSchema = z.object({
|
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
51
|
/** @internal */
|
|
52
|
-
export const
|
|
52
|
+
export const ChatStreamingResponseChunkData$outboundSchema = z.object({
|
|
53
53
|
id: z.string(),
|
|
54
54
|
choices: z.array(ChatStreamingChoice$outboundSchema),
|
|
55
55
|
created: z.number(),
|
|
@@ -68,18 +68,18 @@ export const Data$outboundSchema = z.object({
|
|
|
68
68
|
* @internal
|
|
69
69
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
70
70
|
*/
|
|
71
|
-
export var
|
|
72
|
-
(function (
|
|
73
|
-
/** @deprecated use `
|
|
74
|
-
|
|
75
|
-
/** @deprecated use `
|
|
76
|
-
|
|
77
|
-
})(
|
|
78
|
-
export function
|
|
79
|
-
return JSON.stringify(
|
|
71
|
+
export var ChatStreamingResponseChunkData$;
|
|
72
|
+
(function (ChatStreamingResponseChunkData$) {
|
|
73
|
+
/** @deprecated use `ChatStreamingResponseChunkData$inboundSchema` instead. */
|
|
74
|
+
ChatStreamingResponseChunkData$.inboundSchema = ChatStreamingResponseChunkData$inboundSchema;
|
|
75
|
+
/** @deprecated use `ChatStreamingResponseChunkData$outboundSchema` instead. */
|
|
76
|
+
ChatStreamingResponseChunkData$.outboundSchema = ChatStreamingResponseChunkData$outboundSchema;
|
|
77
|
+
})(ChatStreamingResponseChunkData$ || (ChatStreamingResponseChunkData$ = {}));
|
|
78
|
+
export function chatStreamingResponseChunkDataToJSON(chatStreamingResponseChunkData) {
|
|
79
|
+
return JSON.stringify(ChatStreamingResponseChunkData$outboundSchema.parse(chatStreamingResponseChunkData));
|
|
80
80
|
}
|
|
81
|
-
export function
|
|
82
|
-
return safeParse(jsonString, (x) =>
|
|
81
|
+
export function chatStreamingResponseChunkDataFromJSON(jsonString) {
|
|
82
|
+
return safeParse(jsonString, (x) => ChatStreamingResponseChunkData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatStreamingResponseChunkData' from JSON`);
|
|
83
83
|
}
|
|
84
84
|
/** @internal */
|
|
85
85
|
export const ChatStreamingResponseChunk$inboundSchema = z.object({
|
|
@@ -94,11 +94,11 @@ export const ChatStreamingResponseChunk$inboundSchema = z.object({
|
|
|
94
94
|
});
|
|
95
95
|
return z.NEVER;
|
|
96
96
|
}
|
|
97
|
-
}).pipe(z.lazy(() =>
|
|
97
|
+
}).pipe(z.lazy(() => ChatStreamingResponseChunkData$inboundSchema)),
|
|
98
98
|
});
|
|
99
99
|
/** @internal */
|
|
100
100
|
export const ChatStreamingResponseChunk$outboundSchema = z.object({
|
|
101
|
-
data: z.lazy(() =>
|
|
101
|
+
data: z.lazy(() => ChatStreamingResponseChunkData$outboundSchema),
|
|
102
102
|
});
|
|
103
103
|
/**
|
|
104
104
|
* @internal
|
|
@@ -33,7 +33,7 @@ export type CompletionCreateParams = {
|
|
|
33
33
|
presencePenalty?: number | null | undefined;
|
|
34
34
|
seed?: number | null | undefined;
|
|
35
35
|
stop?: string | Array<string> | null | undefined;
|
|
36
|
-
stream?: boolean |
|
|
36
|
+
stream?: boolean | undefined;
|
|
37
37
|
streamOptions?: StreamOptions | null | undefined;
|
|
38
38
|
suffix?: string | null | undefined;
|
|
39
39
|
temperature?: number | null | undefined;
|
|
@@ -210,7 +210,7 @@ export type CompletionCreateParams$Outbound = {
|
|
|
210
210
|
presence_penalty?: number | null | undefined;
|
|
211
211
|
seed?: number | null | undefined;
|
|
212
212
|
stop?: string | Array<string> | null | undefined;
|
|
213
|
-
stream
|
|
213
|
+
stream: boolean;
|
|
214
214
|
stream_options?: StreamOptions$Outbound | null | undefined;
|
|
215
215
|
suffix?: string | null | undefined;
|
|
216
216
|
temperature?: number | null | undefined;
|
|
@@ -220,7 +220,7 @@ export const CompletionCreateParams$inboundSchema = z.object({
|
|
|
220
220
|
presence_penalty: z.nullable(z.number()).optional(),
|
|
221
221
|
seed: z.nullable(z.number().int()).optional(),
|
|
222
222
|
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
223
|
-
stream: z.
|
|
223
|
+
stream: z.boolean().default(false),
|
|
224
224
|
stream_options: z.nullable(z.lazy(() => StreamOptions$inboundSchema))
|
|
225
225
|
.optional(),
|
|
226
226
|
suffix: z.nullable(z.string()).optional(),
|
|
@@ -266,7 +266,7 @@ export const CompletionCreateParams$outboundSchema = z.object({
|
|
|
266
266
|
presencePenalty: z.nullable(z.number()).optional(),
|
|
267
267
|
seed: z.nullable(z.number().int()).optional(),
|
|
268
268
|
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
|
|
269
|
-
stream: z.
|
|
269
|
+
stream: z.boolean().default(false),
|
|
270
270
|
streamOptions: z.nullable(z.lazy(() => StreamOptions$outboundSchema))
|
|
271
271
|
.optional(),
|
|
272
272
|
suffix: z.nullable(z.string()).optional(),
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const ChainId: {
|
|
6
|
+
readonly One: 1;
|
|
7
|
+
readonly OneHundredAndThirtySeven: 137;
|
|
8
|
+
readonly EightThousandFourHundredAndFiftyThree: 8453;
|
|
9
|
+
};
|
|
10
|
+
export type ChainId = OpenEnum<typeof ChainId>;
|
|
4
11
|
/**
|
|
5
12
|
* Create a Coinbase charge for crypto payment
|
|
6
13
|
*/
|
|
7
|
-
export type CreateChargeRequest = {
|
|
14
|
+
export type CreateChargeRequest = {
|
|
15
|
+
amount: number;
|
|
16
|
+
sender: string;
|
|
17
|
+
chainId: ChainId;
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ChainId$inboundSchema: z.ZodType<ChainId, unknown>;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export declare const ChainId$outboundSchema: z.ZodType<ChainId, ChainId>;
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
+
*/
|
|
27
|
+
export declare namespace ChainId$ {
|
|
28
|
+
/** @deprecated use `ChainId$inboundSchema` instead. */
|
|
29
|
+
const inboundSchema: z.ZodType<ChainId, unknown, z.core.$ZodTypeInternals<ChainId, unknown>>;
|
|
30
|
+
/** @deprecated use `ChainId$outboundSchema` instead. */
|
|
31
|
+
const outboundSchema: z.ZodType<ChainId, ChainId, z.core.$ZodTypeInternals<ChainId, ChainId>>;
|
|
32
|
+
}
|
|
8
33
|
/** @internal */
|
|
9
34
|
export declare const CreateChargeRequest$inboundSchema: z.ZodType<CreateChargeRequest, unknown>;
|
|
10
35
|
/** @internal */
|
|
11
|
-
export type CreateChargeRequest$Outbound = {
|
|
36
|
+
export type CreateChargeRequest$Outbound = {
|
|
37
|
+
amount: number;
|
|
38
|
+
sender: string;
|
|
39
|
+
chain_id: number;
|
|
40
|
+
};
|
|
12
41
|
/** @internal */
|
|
13
42
|
export declare const CreateChargeRequest$outboundSchema: z.ZodType<CreateChargeRequest$Outbound, CreateChargeRequest>;
|
|
14
43
|
/**
|
|
@@ -2,11 +2,56 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
5
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
8
|
+
export const ChainId = {
|
|
9
|
+
One: 1,
|
|
10
|
+
OneHundredAndThirtySeven: 137,
|
|
11
|
+
EightThousandFourHundredAndFiftyThree: 8453,
|
|
12
|
+
};
|
|
6
13
|
/** @internal */
|
|
7
|
-
export const
|
|
14
|
+
export const ChainId$inboundSchema = z
|
|
15
|
+
.union([
|
|
16
|
+
z.enum(ChainId),
|
|
17
|
+
z.number().transform(catchUnrecognizedEnum),
|
|
18
|
+
]);
|
|
8
19
|
/** @internal */
|
|
9
|
-
export const
|
|
20
|
+
export const ChainId$outboundSchema = z.union([
|
|
21
|
+
z.enum(ChainId),
|
|
22
|
+
z.number().and(z.custom()),
|
|
23
|
+
]);
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
27
|
+
*/
|
|
28
|
+
export var ChainId$;
|
|
29
|
+
(function (ChainId$) {
|
|
30
|
+
/** @deprecated use `ChainId$inboundSchema` instead. */
|
|
31
|
+
ChainId$.inboundSchema = ChainId$inboundSchema;
|
|
32
|
+
/** @deprecated use `ChainId$outboundSchema` instead. */
|
|
33
|
+
ChainId$.outboundSchema = ChainId$outboundSchema;
|
|
34
|
+
})(ChainId$ || (ChainId$ = {}));
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const CreateChargeRequest$inboundSchema = z.object({
|
|
37
|
+
amount: z.number(),
|
|
38
|
+
sender: z.string(),
|
|
39
|
+
chain_id: ChainId$inboundSchema,
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"chain_id": "chainId",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const CreateChargeRequest$outboundSchema = z.object({
|
|
47
|
+
amount: z.number(),
|
|
48
|
+
sender: z.string(),
|
|
49
|
+
chainId: ChainId$outboundSchema,
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
chainId: "chain_id",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
10
55
|
/**
|
|
11
56
|
* @internal
|
|
12
57
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Default parameters for this model
|
|
6
|
+
*/
|
|
7
|
+
export type DefaultParameters = {
|
|
8
|
+
temperature?: number | null | undefined;
|
|
9
|
+
topP?: number | null | undefined;
|
|
10
|
+
frequencyPenalty?: number | null | undefined;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const DefaultParameters$inboundSchema: z.ZodType<DefaultParameters, unknown>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DefaultParameters$Outbound = {
|
|
16
|
+
temperature?: number | null | undefined;
|
|
17
|
+
top_p?: number | null | undefined;
|
|
18
|
+
frequency_penalty?: number | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const DefaultParameters$outboundSchema: z.ZodType<DefaultParameters$Outbound, DefaultParameters>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace DefaultParameters$ {
|
|
27
|
+
/** @deprecated use `DefaultParameters$inboundSchema` instead. */
|
|
28
|
+
const inboundSchema: z.ZodType<DefaultParameters, unknown, z.core.$ZodTypeInternals<DefaultParameters, unknown>>;
|
|
29
|
+
/** @deprecated use `DefaultParameters$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodType<DefaultParameters$Outbound, DefaultParameters, z.core.$ZodTypeInternals<DefaultParameters$Outbound, DefaultParameters>>;
|
|
31
|
+
/** @deprecated use `DefaultParameters$Outbound` instead. */
|
|
32
|
+
type Outbound = DefaultParameters$Outbound;
|
|
33
|
+
}
|
|
34
|
+
export declare function defaultParametersToJSON(defaultParameters: DefaultParameters): string;
|
|
35
|
+
export declare function defaultParametersFromJSON(jsonString: string): SafeParseResult<DefaultParameters, SDKValidationError>;
|
|
36
|
+
//# sourceMappingURL=defaultparameters.d.ts.map
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
/** @internal */
|
|
8
|
+
export const DefaultParameters$inboundSchema = z.object({
|
|
9
|
+
temperature: z.nullable(z.number()).optional(),
|
|
10
|
+
top_p: z.nullable(z.number()).optional(),
|
|
11
|
+
frequency_penalty: z.nullable(z.number()).optional(),
|
|
12
|
+
}).transform((v) => {
|
|
13
|
+
return remap$(v, {
|
|
14
|
+
"top_p": "topP",
|
|
15
|
+
"frequency_penalty": "frequencyPenalty",
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const DefaultParameters$outboundSchema = z.object({
|
|
20
|
+
temperature: z.nullable(z.number()).optional(),
|
|
21
|
+
topP: z.nullable(z.number()).optional(),
|
|
22
|
+
frequencyPenalty: z.nullable(z.number()).optional(),
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
topP: "top_p",
|
|
26
|
+
frequencyPenalty: "frequency_penalty",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export var DefaultParameters$;
|
|
34
|
+
(function (DefaultParameters$) {
|
|
35
|
+
/** @deprecated use `DefaultParameters$inboundSchema` instead. */
|
|
36
|
+
DefaultParameters$.inboundSchema = DefaultParameters$inboundSchema;
|
|
37
|
+
/** @deprecated use `DefaultParameters$outboundSchema` instead. */
|
|
38
|
+
DefaultParameters$.outboundSchema = DefaultParameters$outboundSchema;
|
|
39
|
+
})(DefaultParameters$ || (DefaultParameters$ = {}));
|
|
40
|
+
export function defaultParametersToJSON(defaultParameters) {
|
|
41
|
+
return JSON.stringify(DefaultParameters$outboundSchema.parse(defaultParameters));
|
|
42
|
+
}
|
|
43
|
+
export function defaultParametersFromJSON(jsonString) {
|
|
44
|
+
return safeParse(jsonString, (x) => DefaultParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DefaultParameters' from JSON`);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=defaultparameters.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Error data for EdgeNetworkTimeoutResponse
|
|
6
|
+
*/
|
|
7
|
+
export type EdgeNetworkTimeoutResponseErrorData = {
|
|
8
|
+
code: number;
|
|
9
|
+
message: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
[k: string]: any | null;
|
|
12
|
+
} | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const EdgeNetworkTimeoutResponseErrorData$inboundSchema: z.ZodType<EdgeNetworkTimeoutResponseErrorData, unknown>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export type EdgeNetworkTimeoutResponseErrorData$Outbound = {
|
|
18
|
+
code: number;
|
|
19
|
+
message: string;
|
|
20
|
+
metadata?: {
|
|
21
|
+
[k: string]: any | null;
|
|
22
|
+
} | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
/** @internal */
|
|
25
|
+
export declare const EdgeNetworkTimeoutResponseErrorData$outboundSchema: z.ZodType<EdgeNetworkTimeoutResponseErrorData$Outbound, EdgeNetworkTimeoutResponseErrorData>;
|
|
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 declare namespace EdgeNetworkTimeoutResponseErrorData$ {
|
|
31
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseErrorData$inboundSchema` instead. */
|
|
32
|
+
const inboundSchema: z.ZodType<EdgeNetworkTimeoutResponseErrorData, unknown, z.core.$ZodTypeInternals<EdgeNetworkTimeoutResponseErrorData, unknown>>;
|
|
33
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseErrorData$outboundSchema` instead. */
|
|
34
|
+
const outboundSchema: z.ZodType<EdgeNetworkTimeoutResponseErrorData$Outbound, EdgeNetworkTimeoutResponseErrorData, z.core.$ZodTypeInternals<EdgeNetworkTimeoutResponseErrorData$Outbound, EdgeNetworkTimeoutResponseErrorData>>;
|
|
35
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseErrorData$Outbound` instead. */
|
|
36
|
+
type Outbound = EdgeNetworkTimeoutResponseErrorData$Outbound;
|
|
37
|
+
}
|
|
38
|
+
export declare function edgeNetworkTimeoutResponseErrorDataToJSON(edgeNetworkTimeoutResponseErrorData: EdgeNetworkTimeoutResponseErrorData): string;
|
|
39
|
+
export declare function edgeNetworkTimeoutResponseErrorDataFromJSON(jsonString: string): SafeParseResult<EdgeNetworkTimeoutResponseErrorData, SDKValidationError>;
|
|
40
|
+
//# sourceMappingURL=edgenetworktimeoutresponseerrordata.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { safeParse } from "../lib/schemas.js";
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const EdgeNetworkTimeoutResponseErrorData$inboundSchema = z.object({
|
|
8
|
+
code: z.number().int(),
|
|
9
|
+
message: z.string(),
|
|
10
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
|
+
});
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const EdgeNetworkTimeoutResponseErrorData$outboundSchema = z.object({
|
|
14
|
+
code: z.number().int(),
|
|
15
|
+
message: z.string(),
|
|
16
|
+
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
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 EdgeNetworkTimeoutResponseErrorData$;
|
|
23
|
+
(function (EdgeNetworkTimeoutResponseErrorData$) {
|
|
24
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseErrorData$inboundSchema` instead. */
|
|
25
|
+
EdgeNetworkTimeoutResponseErrorData$.inboundSchema = EdgeNetworkTimeoutResponseErrorData$inboundSchema;
|
|
26
|
+
/** @deprecated use `EdgeNetworkTimeoutResponseErrorData$outboundSchema` instead. */
|
|
27
|
+
EdgeNetworkTimeoutResponseErrorData$.outboundSchema = EdgeNetworkTimeoutResponseErrorData$outboundSchema;
|
|
28
|
+
})(EdgeNetworkTimeoutResponseErrorData$ || (EdgeNetworkTimeoutResponseErrorData$ = {}));
|
|
29
|
+
export function edgeNetworkTimeoutResponseErrorDataToJSON(edgeNetworkTimeoutResponseErrorData) {
|
|
30
|
+
return JSON.stringify(EdgeNetworkTimeoutResponseErrorData$outboundSchema.parse(edgeNetworkTimeoutResponseErrorData));
|
|
31
|
+
}
|
|
32
|
+
export function edgeNetworkTimeoutResponseErrorDataFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => EdgeNetworkTimeoutResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EdgeNetworkTimeoutResponseErrorData' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=edgenetworktimeoutresponseerrordata.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const EndpointStatus: {
|
|
4
|
+
readonly Zero: 0;
|
|
5
|
+
readonly Minus1: -1;
|
|
6
|
+
readonly Minus2: -2;
|
|
7
|
+
readonly Minus3: -3;
|
|
8
|
+
readonly Minus5: -5;
|
|
9
|
+
readonly Minus10: -10;
|
|
10
|
+
};
|
|
11
|
+
export type EndpointStatus = OpenEnum<typeof EndpointStatus>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const EndpointStatus$inboundSchema: z.ZodType<EndpointStatus, unknown>;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const EndpointStatus$outboundSchema: z.ZodType<EndpointStatus, EndpointStatus>;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
19
|
+
*/
|
|
20
|
+
export declare namespace EndpointStatus$ {
|
|
21
|
+
/** @deprecated use `EndpointStatus$inboundSchema` instead. */
|
|
22
|
+
const inboundSchema: z.ZodType<EndpointStatus, unknown, z.core.$ZodTypeInternals<EndpointStatus, unknown>>;
|
|
23
|
+
/** @deprecated use `EndpointStatus$outboundSchema` instead. */
|
|
24
|
+
const outboundSchema: z.ZodType<EndpointStatus, EndpointStatus, z.core.$ZodTypeInternals<EndpointStatus, EndpointStatus>>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=endpointstatus.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
6
|
+
export const EndpointStatus = {
|
|
7
|
+
Zero: 0,
|
|
8
|
+
Minus1: -1,
|
|
9
|
+
Minus2: -2,
|
|
10
|
+
Minus3: -3,
|
|
11
|
+
Minus5: -5,
|
|
12
|
+
Minus10: -10,
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const EndpointStatus$inboundSchema = z
|
|
16
|
+
.union([
|
|
17
|
+
z.enum(EndpointStatus),
|
|
18
|
+
z.number().transform(catchUnrecognizedEnum),
|
|
19
|
+
]);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const EndpointStatus$outboundSchema = z.union([
|
|
22
|
+
z.enum(EndpointStatus),
|
|
23
|
+
z.number().and(z.custom()),
|
|
24
|
+
]);
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
|
+
*/
|
|
29
|
+
export var EndpointStatus$;
|
|
30
|
+
(function (EndpointStatus$) {
|
|
31
|
+
/** @deprecated use `EndpointStatus$inboundSchema` instead. */
|
|
32
|
+
EndpointStatus$.inboundSchema = EndpointStatus$inboundSchema;
|
|
33
|
+
/** @deprecated use `EndpointStatus$outboundSchema` instead. */
|
|
34
|
+
EndpointStatus$.outboundSchema = EndpointStatus$outboundSchema;
|
|
35
|
+
})(EndpointStatus$ || (EndpointStatus$ = {}));
|
|
36
|
+
//# sourceMappingURL=endpointstatus.js.map
|