@openrouter/sdk 0.0.0-beta.37 → 0.0.0-beta.39
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/dist/commonjs/funcs/betaResponsesSend.d.ts +2 -2
- package/dist/commonjs/funcs/betaResponsesSend.d.ts.map +1 -1
- package/dist/commonjs/funcs/betaResponsesSend.js +1 -1
- package/dist/commonjs/funcs/betaResponsesSend.js.map +1 -1
- package/dist/commonjs/funcs/chatSend.js +1 -1
- package/dist/commonjs/funcs/chatSend.js.map +1 -1
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.d.ts +43 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.d.ts.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.js +50 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.js.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.test.d.ts +2 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.test.d.ts.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.test.js +213 -0
- package/dist/commonjs/funcs/custom/oAuthCreateAuthorizationUrl.test.js.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.d.ts +35 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.d.ts.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.js +75 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.js.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.test.d.ts +2 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.test.d.ts.map +1 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.test.js +164 -0
- package/dist/commonjs/funcs/custom/oAuthCreateSHA256CodeChallenge.test.js.map +1 -0
- package/dist/commonjs/funcs/modelsList.js +1 -1
- package/dist/commonjs/funcs/modelsList.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.d.ts +16 -42
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.js +27 -6
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts +6 -22
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts.map +1 -1
- package/dist/commonjs/models/chatmessagecontentitemaudio.js +10 -2
- package/dist/commonjs/models/chatmessagecontentitemaudio.js.map +1 -1
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts +6 -14
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts.map +1 -1
- package/dist/commonjs/models/chatmessagecontentitemimage.js +10 -2
- package/dist/commonjs/models/chatmessagecontentitemimage.js.map +1 -1
- package/dist/commonjs/models/chatresponsechoice.d.ts +6 -18
- package/dist/commonjs/models/chatresponsechoice.d.ts.map +1 -1
- package/dist/commonjs/models/chatresponsechoice.js +10 -2
- package/dist/commonjs/models/chatresponsechoice.js.map +1 -1
- package/dist/commonjs/models/chatstreamingchoice.d.ts +6 -18
- package/dist/commonjs/models/chatstreamingchoice.d.ts.map +1 -1
- package/dist/commonjs/models/chatstreamingchoice.js +10 -2
- package/dist/commonjs/models/chatstreamingchoice.js.map +1 -1
- package/dist/commonjs/models/completionfinishreason.d.ts +6 -14
- package/dist/commonjs/models/completionfinishreason.d.ts.map +1 -1
- package/dist/commonjs/models/completionfinishreason.js +10 -2
- package/dist/commonjs/models/completionfinishreason.js.map +1 -1
- package/dist/commonjs/models/createapikeydata.d.ts +120 -0
- package/dist/commonjs/models/createapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/createapikeydata.js +134 -0
- package/dist/commonjs/models/createapikeydata.js.map +1 -0
- package/dist/commonjs/models/endpointslist.d.ts +21 -269
- package/dist/commonjs/models/endpointslist.d.ts.map +1 -1
- package/dist/commonjs/models/endpointslist.js +37 -8
- package/dist/commonjs/models/endpointslist.js.map +1 -1
- package/dist/commonjs/models/errorresponse.d.ts +6 -148
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +10 -2
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/getapikeydata.d.ts +120 -0
- package/dist/commonjs/models/getapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/getapikeydata.js +134 -0
- package/dist/commonjs/models/getapikeydata.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +4 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/keyinfo.d.ts +8 -8
- package/dist/commonjs/models/listapikeysdata.d.ts +117 -0
- package/dist/commonjs/models/listapikeysdata.d.ts.map +1 -0
- package/dist/commonjs/models/listapikeysdata.js +134 -0
- package/dist/commonjs/models/listapikeysdata.js.map +1 -0
- package/dist/commonjs/models/modelslist.d.ts +26 -178
- package/dist/commonjs/models/modelslist.d.ts.map +1 -1
- package/dist/commonjs/models/modelslist.js +46 -11
- package/dist/commonjs/models/modelslist.js.map +1 -1
- package/dist/commonjs/models/operations/addcoinbasecharge.d.ts +6 -14
- package/dist/commonjs/models/operations/addcoinbasecharge.d.ts.map +1 -1
- package/dist/commonjs/models/operations/addcoinbasecharge.js +9 -2
- package/dist/commonjs/models/operations/addcoinbasecharge.js.map +1 -1
- package/dist/commonjs/models/operations/create.d.ts +35 -68
- package/dist/commonjs/models/operations/create.d.ts.map +1 -1
- package/dist/commonjs/models/operations/create.js +39 -54
- package/dist/commonjs/models/operations/create.js.map +1 -1
- package/dist/commonjs/models/operations/createauthorizationcode.d.ts +6 -12
- package/dist/commonjs/models/operations/createauthorizationcode.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createauthorizationcode.js +9 -2
- package/dist/commonjs/models/operations/createauthorizationcode.js.map +1 -1
- package/dist/commonjs/models/operations/exchangeauthorizationcode.d.ts +6 -12
- package/dist/commonjs/models/operations/exchangeauthorizationcode.d.ts.map +1 -1
- package/dist/commonjs/models/operations/exchangeauthorizationcode.js +9 -2
- package/dist/commonjs/models/operations/exchangeauthorizationcode.js.map +1 -1
- package/dist/commonjs/models/operations/generate.d.ts +37 -569
- package/dist/commonjs/models/operations/generate.d.ts.map +1 -1
- package/dist/commonjs/models/operations/generate.js +55 -12
- package/dist/commonjs/models/operations/generate.js.map +1 -1
- package/dist/commonjs/models/operations/getapikey.d.ts +3 -68
- package/dist/commonjs/models/operations/getapikey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getapikey.js +4 -55
- package/dist/commonjs/models/operations/getapikey.js.map +1 -1
- package/dist/commonjs/models/operations/getmetadata.d.ts +6 -12
- package/dist/commonjs/models/operations/getmetadata.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmetadata.js +9 -2
- package/dist/commonjs/models/operations/getmetadata.js.map +1 -1
- package/dist/commonjs/models/operations/getparameters.d.ts +11 -189
- package/dist/commonjs/models/operations/getparameters.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparameters.js +19 -4
- package/dist/commonjs/models/operations/getparameters.js.map +1 -1
- package/dist/commonjs/models/operations/list.d.ts +21 -125
- package/dist/commonjs/models/operations/list.d.ts.map +1 -1
- package/dist/commonjs/models/operations/list.js +36 -8
- package/dist/commonjs/models/operations/list.js.map +1 -1
- package/dist/commonjs/models/operations/listapikeys.d.ts +3 -65
- package/dist/commonjs/models/operations/listapikeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listapikeys.js +4 -54
- package/dist/commonjs/models/operations/listapikeys.js.map +1 -1
- package/dist/commonjs/models/operations/previewzdr.d.ts +21 -269
- package/dist/commonjs/models/operations/previewzdr.d.ts.map +1 -1
- package/dist/commonjs/models/operations/previewzdr.js +38 -9
- package/dist/commonjs/models/operations/previewzdr.js.map +1 -1
- package/dist/commonjs/models/operations/sendresponsesrequest.d.ts +57 -621
- package/dist/commonjs/models/operations/sendresponsesrequest.d.ts.map +1 -1
- package/dist/commonjs/models/operations/sendresponsesrequest.js +88 -20
- package/dist/commonjs/models/operations/sendresponsesrequest.js.map +1 -1
- package/dist/commonjs/models/operations/update.d.ts +35 -68
- package/dist/commonjs/models/operations/update.d.ts.map +1 -1
- package/dist/commonjs/models/operations/update.js +39 -54
- package/dist/commonjs/models/operations/update.js.map +1 -1
- package/dist/commonjs/models/responsefunctioncallstatus.d.ts +6 -14
- package/dist/commonjs/models/responsefunctioncallstatus.d.ts.map +1 -1
- package/dist/commonjs/models/responsefunctioncallstatus.js +10 -2
- package/dist/commonjs/models/responsefunctioncallstatus.js.map +1 -1
- package/dist/commonjs/models/responseimagegenerationcallstatus.d.ts +6 -16
- package/dist/commonjs/models/responseimagegenerationcallstatus.d.ts.map +1 -1
- package/dist/commonjs/models/responseimagegenerationcallstatus.js +10 -2
- package/dist/commonjs/models/responseimagegenerationcallstatus.js.map +1 -1
- package/dist/commonjs/models/responseincludable.d.ts +6 -18
- package/dist/commonjs/models/responseincludable.d.ts.map +1 -1
- package/dist/commonjs/models/responseincludable.js +10 -2
- package/dist/commonjs/models/responseincludable.js.map +1 -1
- package/dist/commonjs/models/responseinputimagedetail.d.ts +6 -14
- package/dist/commonjs/models/responseinputimagedetail.d.ts.map +1 -1
- package/dist/commonjs/models/responseinputimagedetail.js +10 -2
- package/dist/commonjs/models/responseinputimagedetail.js.map +1 -1
- package/dist/commonjs/models/responsereasoningconfig.d.ts +6 -16
- package/dist/commonjs/models/responsereasoningconfig.d.ts.map +1 -1
- package/dist/commonjs/models/responsereasoningconfig.js +10 -2
- package/dist/commonjs/models/responsereasoningconfig.js.map +1 -1
- package/dist/commonjs/models/responsereasoningsummarymode.d.ts +6 -14
- package/dist/commonjs/models/responsereasoningsummarymode.d.ts.map +1 -1
- package/dist/commonjs/models/responsereasoningsummarymode.js +10 -2
- package/dist/commonjs/models/responsereasoningsummarymode.js.map +1 -1
- package/dist/commonjs/models/responsesincompletedetails.d.ts +6 -12
- package/dist/commonjs/models/responsesincompletedetails.d.ts.map +1 -1
- package/dist/commonjs/models/responsesincompletedetails.js +10 -2
- package/dist/commonjs/models/responsesincompletedetails.js.map +1 -1
- package/dist/commonjs/models/responsesnonstreamingresponse.d.ts +21 -61
- package/dist/commonjs/models/responsesnonstreamingresponse.d.ts.map +1 -1
- package/dist/commonjs/models/responsesnonstreamingresponse.js +35 -8
- package/dist/commonjs/models/responsesnonstreamingresponse.js.map +1 -1
- package/dist/commonjs/models/responsesoutputitemfilesearchcall.d.ts +6 -16
- package/dist/commonjs/models/responsesoutputitemfilesearchcall.d.ts.map +1 -1
- package/dist/commonjs/models/responsesoutputitemfilesearchcall.js +9 -2
- package/dist/commonjs/models/responsesoutputitemfilesearchcall.js.map +1 -1
- package/dist/commonjs/models/responsesoutputitemreasoning.d.ts +7 -14
- package/dist/commonjs/models/responsesoutputitemreasoning.d.ts.map +1 -1
- package/dist/commonjs/models/responsesoutputitemreasoning.js +11 -2
- package/dist/commonjs/models/responsesoutputitemreasoning.js.map +1 -1
- package/dist/commonjs/models/responsesstreamchunkunion.d.ts +31 -81
- package/dist/commonjs/models/responsesstreamchunkunion.d.ts.map +1 -1
- package/dist/commonjs/models/responsesstreamchunkunion.js +55 -12
- package/dist/commonjs/models/responsesstreamchunkunion.js.map +1 -1
- package/dist/commonjs/models/responseswebsearchcalloutput.d.ts +6 -16
- package/dist/commonjs/models/responseswebsearchcalloutput.d.ts.map +1 -1
- package/dist/commonjs/models/responseswebsearchcalloutput.js +10 -2
- package/dist/commonjs/models/responseswebsearchcalloutput.js.map +1 -1
- package/dist/commonjs/models/responsetextverbosity.d.ts +6 -14
- package/dist/commonjs/models/responsetextverbosity.d.ts.map +1 -1
- package/dist/commonjs/models/responsetextverbosity.js +10 -2
- package/dist/commonjs/models/responsetextverbosity.js.map +1 -1
- package/dist/commonjs/models/updateapikeydata.d.ts +120 -0
- package/dist/commonjs/models/updateapikeydata.d.ts.map +1 -0
- package/dist/commonjs/models/updateapikeydata.js +134 -0
- package/dist/commonjs/models/updateapikeydata.js.map +1 -0
- package/dist/commonjs/sdk/oauth.d.ts +27 -0
- package/dist/commonjs/sdk/oauth.d.ts.map +1 -1
- package/dist/commonjs/sdk/oauth.js +43 -0
- package/dist/commonjs/sdk/oauth.js.map +1 -1
- package/dist/commonjs/sdk/responses.d.ts +2 -2
- package/dist/commonjs/sdk/responses.d.ts.map +1 -1
- package/dist/esm/funcs/betaResponsesSend.d.ts +2 -2
- package/dist/esm/funcs/betaResponsesSend.d.ts.map +1 -1
- package/dist/esm/funcs/betaResponsesSend.js +1 -1
- package/dist/esm/funcs/betaResponsesSend.js.map +1 -1
- package/dist/esm/funcs/chatSend.js +1 -1
- package/dist/esm/funcs/chatSend.js.map +1 -1
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.d.ts +43 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.d.ts.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.js +44 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.js.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.test.d.ts +2 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.test.d.ts.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.test.js +211 -0
- package/dist/esm/funcs/custom/oAuthCreateAuthorizationUrl.test.js.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.d.ts +35 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.d.ts.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.js +69 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.js.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.test.d.ts +2 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.test.d.ts.map +1 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.test.js +162 -0
- package/dist/esm/funcs/custom/oAuthCreateSHA256CodeChallenge.test.js.map +1 -0
- package/dist/esm/funcs/modelsList.js +1 -1
- package/dist/esm/funcs/modelsList.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/chatgenerationparams.d.ts +16 -42
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/esm/models/chatgenerationparams.js +27 -6
- package/dist/esm/models/chatgenerationparams.js.map +1 -1
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts +6 -22
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts.map +1 -1
- package/dist/esm/models/chatmessagecontentitemaudio.js +10 -2
- package/dist/esm/models/chatmessagecontentitemaudio.js.map +1 -1
- package/dist/esm/models/chatmessagecontentitemimage.d.ts +6 -14
- package/dist/esm/models/chatmessagecontentitemimage.d.ts.map +1 -1
- package/dist/esm/models/chatmessagecontentitemimage.js +10 -2
- package/dist/esm/models/chatmessagecontentitemimage.js.map +1 -1
- package/dist/esm/models/chatresponsechoice.d.ts +6 -18
- package/dist/esm/models/chatresponsechoice.d.ts.map +1 -1
- package/dist/esm/models/chatresponsechoice.js +10 -2
- package/dist/esm/models/chatresponsechoice.js.map +1 -1
- package/dist/esm/models/chatstreamingchoice.d.ts +6 -18
- package/dist/esm/models/chatstreamingchoice.d.ts.map +1 -1
- package/dist/esm/models/chatstreamingchoice.js +10 -2
- package/dist/esm/models/chatstreamingchoice.js.map +1 -1
- package/dist/esm/models/completionfinishreason.d.ts +6 -14
- package/dist/esm/models/completionfinishreason.d.ts.map +1 -1
- package/dist/esm/models/completionfinishreason.js +10 -2
- package/dist/esm/models/completionfinishreason.js.map +1 -1
- package/dist/esm/models/createapikeydata.d.ts +120 -0
- package/dist/esm/models/createapikeydata.d.ts.map +1 -0
- package/dist/esm/models/createapikeydata.js +96 -0
- package/dist/esm/models/createapikeydata.js.map +1 -0
- package/dist/esm/models/endpointslist.d.ts +21 -269
- package/dist/esm/models/endpointslist.d.ts.map +1 -1
- package/dist/esm/models/endpointslist.js +37 -8
- package/dist/esm/models/endpointslist.js.map +1 -1
- package/dist/esm/models/errorresponse.d.ts +6 -148
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +10 -2
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/getapikeydata.d.ts +120 -0
- package/dist/esm/models/getapikeydata.d.ts.map +1 -0
- package/dist/esm/models/getapikeydata.js +96 -0
- package/dist/esm/models/getapikeydata.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/keyinfo.d.ts +8 -8
- package/dist/esm/models/listapikeysdata.d.ts +117 -0
- package/dist/esm/models/listapikeysdata.d.ts.map +1 -0
- package/dist/esm/models/listapikeysdata.js +96 -0
- package/dist/esm/models/listapikeysdata.js.map +1 -0
- package/dist/esm/models/modelslist.d.ts +26 -178
- package/dist/esm/models/modelslist.d.ts.map +1 -1
- package/dist/esm/models/modelslist.js +46 -11
- package/dist/esm/models/modelslist.js.map +1 -1
- package/dist/esm/models/operations/addcoinbasecharge.d.ts +6 -14
- package/dist/esm/models/operations/addcoinbasecharge.d.ts.map +1 -1
- package/dist/esm/models/operations/addcoinbasecharge.js +9 -2
- package/dist/esm/models/operations/addcoinbasecharge.js.map +1 -1
- package/dist/esm/models/operations/create.d.ts +35 -68
- package/dist/esm/models/operations/create.d.ts.map +1 -1
- package/dist/esm/models/operations/create.js +38 -51
- package/dist/esm/models/operations/create.js.map +1 -1
- package/dist/esm/models/operations/createauthorizationcode.d.ts +6 -12
- package/dist/esm/models/operations/createauthorizationcode.d.ts.map +1 -1
- package/dist/esm/models/operations/createauthorizationcode.js +9 -2
- package/dist/esm/models/operations/createauthorizationcode.js.map +1 -1
- package/dist/esm/models/operations/exchangeauthorizationcode.d.ts +6 -12
- package/dist/esm/models/operations/exchangeauthorizationcode.d.ts.map +1 -1
- package/dist/esm/models/operations/exchangeauthorizationcode.js +9 -2
- package/dist/esm/models/operations/exchangeauthorizationcode.js.map +1 -1
- package/dist/esm/models/operations/generate.d.ts +37 -569
- package/dist/esm/models/operations/generate.d.ts.map +1 -1
- package/dist/esm/models/operations/generate.js +55 -12
- package/dist/esm/models/operations/generate.js.map +1 -1
- package/dist/esm/models/operations/getapikey.d.ts +3 -68
- package/dist/esm/models/operations/getapikey.d.ts.map +1 -1
- package/dist/esm/models/operations/getapikey.js +3 -52
- package/dist/esm/models/operations/getapikey.js.map +1 -1
- package/dist/esm/models/operations/getmetadata.d.ts +6 -12
- package/dist/esm/models/operations/getmetadata.d.ts.map +1 -1
- package/dist/esm/models/operations/getmetadata.js +9 -2
- package/dist/esm/models/operations/getmetadata.js.map +1 -1
- package/dist/esm/models/operations/getparameters.d.ts +11 -189
- package/dist/esm/models/operations/getparameters.d.ts.map +1 -1
- package/dist/esm/models/operations/getparameters.js +19 -4
- package/dist/esm/models/operations/getparameters.js.map +1 -1
- package/dist/esm/models/operations/list.d.ts +21 -125
- package/dist/esm/models/operations/list.d.ts.map +1 -1
- package/dist/esm/models/operations/list.js +36 -8
- package/dist/esm/models/operations/list.js.map +1 -1
- package/dist/esm/models/operations/listapikeys.d.ts +3 -65
- package/dist/esm/models/operations/listapikeys.d.ts.map +1 -1
- package/dist/esm/models/operations/listapikeys.js +3 -51
- package/dist/esm/models/operations/listapikeys.js.map +1 -1
- package/dist/esm/models/operations/previewzdr.d.ts +21 -269
- package/dist/esm/models/operations/previewzdr.d.ts.map +1 -1
- package/dist/esm/models/operations/previewzdr.js +38 -9
- package/dist/esm/models/operations/previewzdr.js.map +1 -1
- package/dist/esm/models/operations/sendresponsesrequest.d.ts +57 -621
- package/dist/esm/models/operations/sendresponsesrequest.d.ts.map +1 -1
- package/dist/esm/models/operations/sendresponsesrequest.js +88 -20
- package/dist/esm/models/operations/sendresponsesrequest.js.map +1 -1
- package/dist/esm/models/operations/update.d.ts +35 -68
- package/dist/esm/models/operations/update.d.ts.map +1 -1
- package/dist/esm/models/operations/update.js +38 -51
- package/dist/esm/models/operations/update.js.map +1 -1
- package/dist/esm/models/responsefunctioncallstatus.d.ts +6 -14
- package/dist/esm/models/responsefunctioncallstatus.d.ts.map +1 -1
- package/dist/esm/models/responsefunctioncallstatus.js +10 -2
- package/dist/esm/models/responsefunctioncallstatus.js.map +1 -1
- package/dist/esm/models/responseimagegenerationcallstatus.d.ts +6 -16
- package/dist/esm/models/responseimagegenerationcallstatus.d.ts.map +1 -1
- package/dist/esm/models/responseimagegenerationcallstatus.js +10 -2
- package/dist/esm/models/responseimagegenerationcallstatus.js.map +1 -1
- package/dist/esm/models/responseincludable.d.ts +6 -18
- package/dist/esm/models/responseincludable.d.ts.map +1 -1
- package/dist/esm/models/responseincludable.js +10 -2
- package/dist/esm/models/responseincludable.js.map +1 -1
- package/dist/esm/models/responseinputimagedetail.d.ts +6 -14
- package/dist/esm/models/responseinputimagedetail.d.ts.map +1 -1
- package/dist/esm/models/responseinputimagedetail.js +10 -2
- package/dist/esm/models/responseinputimagedetail.js.map +1 -1
- package/dist/esm/models/responsereasoningconfig.d.ts +6 -16
- package/dist/esm/models/responsereasoningconfig.d.ts.map +1 -1
- package/dist/esm/models/responsereasoningconfig.js +10 -2
- package/dist/esm/models/responsereasoningconfig.js.map +1 -1
- package/dist/esm/models/responsereasoningsummarymode.d.ts +6 -14
- package/dist/esm/models/responsereasoningsummarymode.d.ts.map +1 -1
- package/dist/esm/models/responsereasoningsummarymode.js +10 -2
- package/dist/esm/models/responsereasoningsummarymode.js.map +1 -1
- package/dist/esm/models/responsesincompletedetails.d.ts +6 -12
- package/dist/esm/models/responsesincompletedetails.d.ts.map +1 -1
- package/dist/esm/models/responsesincompletedetails.js +10 -2
- package/dist/esm/models/responsesincompletedetails.js.map +1 -1
- package/dist/esm/models/responsesnonstreamingresponse.d.ts +21 -61
- package/dist/esm/models/responsesnonstreamingresponse.d.ts.map +1 -1
- package/dist/esm/models/responsesnonstreamingresponse.js +35 -8
- package/dist/esm/models/responsesnonstreamingresponse.js.map +1 -1
- package/dist/esm/models/responsesoutputitemfilesearchcall.d.ts +6 -16
- package/dist/esm/models/responsesoutputitemfilesearchcall.d.ts.map +1 -1
- package/dist/esm/models/responsesoutputitemfilesearchcall.js +9 -2
- package/dist/esm/models/responsesoutputitemfilesearchcall.js.map +1 -1
- package/dist/esm/models/responsesoutputitemreasoning.d.ts +7 -14
- package/dist/esm/models/responsesoutputitemreasoning.d.ts.map +1 -1
- package/dist/esm/models/responsesoutputitemreasoning.js +11 -2
- package/dist/esm/models/responsesoutputitemreasoning.js.map +1 -1
- package/dist/esm/models/responsesstreamchunkunion.d.ts +31 -81
- package/dist/esm/models/responsesstreamchunkunion.d.ts.map +1 -1
- package/dist/esm/models/responsesstreamchunkunion.js +55 -12
- package/dist/esm/models/responsesstreamchunkunion.js.map +1 -1
- package/dist/esm/models/responseswebsearchcalloutput.d.ts +6 -16
- package/dist/esm/models/responseswebsearchcalloutput.d.ts.map +1 -1
- package/dist/esm/models/responseswebsearchcalloutput.js +10 -2
- package/dist/esm/models/responseswebsearchcalloutput.js.map +1 -1
- package/dist/esm/models/responsetextverbosity.d.ts +6 -14
- package/dist/esm/models/responsetextverbosity.d.ts.map +1 -1
- package/dist/esm/models/responsetextverbosity.js +10 -2
- package/dist/esm/models/responsetextverbosity.js.map +1 -1
- package/dist/esm/models/updateapikeydata.d.ts +120 -0
- package/dist/esm/models/updateapikeydata.d.ts.map +1 -0
- package/dist/esm/models/updateapikeydata.js +96 -0
- package/dist/esm/models/updateapikeydata.js.map +1 -0
- package/dist/esm/sdk/oauth.d.ts +27 -0
- package/dist/esm/sdk/oauth.d.ts.map +1 -1
- package/dist/esm/sdk/oauth.js +43 -0
- package/dist/esm/sdk/oauth.js.map +1 -1
- package/dist/esm/sdk/responses.d.ts +2 -2
- package/dist/esm/sdk/responses.d.ts.map +1 -1
- package/docs/sdks/apikeys/README.md +4 -0
- package/jsr.json +1 -1
- package/package.json +3 -2
- package/src/funcs/betaResponsesSend.ts +3 -3
- package/src/funcs/chatSend.ts +1 -1
- package/src/funcs/custom/oAuthCreateAuthorizationUrl.test.ts +265 -0
- package/src/funcs/custom/oAuthCreateAuthorizationUrl.ts +66 -0
- package/src/funcs/custom/oAuthCreateSHA256CodeChallenge.test.ts +189 -0
- package/src/funcs/custom/oAuthCreateSHA256CodeChallenge.ts +90 -0
- package/src/funcs/modelsList.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/chatgenerationparams.ts +59 -20
- package/src/models/chatmessagecontentitemaudio.ts +23 -8
- package/src/models/chatmessagecontentitemimage.ts +16 -6
- package/src/models/chatresponsechoice.ts +23 -8
- package/src/models/chatstreamingchoice.ts +23 -8
- package/src/models/completionfinishreason.ts +23 -8
- package/src/models/createapikeydata.ts +222 -0
- package/src/models/endpointslist.ts +77 -25
- package/src/models/errorresponse.ts +23 -8
- package/src/models/getapikeydata.ts +218 -0
- package/src/models/index.ts +4 -0
- package/src/models/keyinfo.ts +8 -8
- package/src/models/listapikeysdata.ts +217 -0
- package/src/models/modelslist.ts +95 -32
- package/src/models/operations/addcoinbasecharge.ts +17 -6
- package/src/models/operations/create.ts +64 -123
- package/src/models/operations/createauthorizationcode.ts +20 -6
- package/src/models/operations/exchangeauthorizationcode.ts +23 -6
- package/src/models/operations/generate.ts +114 -41
- package/src/models/operations/getapikey.ts +5 -124
- package/src/models/operations/getmetadata.ts +17 -6
- package/src/models/operations/getparameters.ts +41 -15
- package/src/models/operations/list.ts +77 -25
- package/src/models/operations/listapikeys.ts +5 -122
- package/src/models/operations/previewzdr.ts +70 -25
- package/src/models/operations/sendresponsesrequest.ts +179 -63
- package/src/models/operations/update.ts +64 -123
- package/src/models/responsefunctioncallstatus.ts +23 -8
- package/src/models/responseimagegenerationcallstatus.ts +23 -8
- package/src/models/responseincludable.ts +23 -8
- package/src/models/responseinputimagedetail.ts +23 -8
- package/src/models/responsereasoningconfig.ts +23 -8
- package/src/models/responsereasoningsummarymode.ts +23 -8
- package/src/models/responsesincompletedetails.ts +23 -8
- package/src/models/responsesnonstreamingresponse.ts +78 -25
- package/src/models/responsesoutputitemfilesearchcall.ts +24 -8
- package/src/models/responsesoutputitemreasoning.ts +25 -8
- package/src/models/responsesstreamchunkunion.ts +114 -43
- package/src/models/responseswebsearchcalloutput.ts +24 -8
- package/src/models/responsetextverbosity.ts +23 -8
- package/src/models/updateapikeydata.ts +222 -0
- package/src/sdk/oauth.ts +60 -0
- package/src/sdk/responses.ts +2 -2
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
catchUnrecognizedEnum,
|
|
10
|
+
OpenEnum,
|
|
11
|
+
Unrecognized,
|
|
12
|
+
} from "../types/enums.js";
|
|
9
13
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
14
|
import {
|
|
11
15
|
ChatStreamOptions,
|
|
@@ -33,7 +37,7 @@ export const ChatGenerationParamsEffort = {
|
|
|
33
37
|
Medium: "medium",
|
|
34
38
|
High: "high",
|
|
35
39
|
} as const;
|
|
36
|
-
export type ChatGenerationParamsEffort =
|
|
40
|
+
export type ChatGenerationParamsEffort = OpenEnum<
|
|
37
41
|
typeof ChatGenerationParamsEffort
|
|
38
42
|
>;
|
|
39
43
|
|
|
@@ -42,14 +46,14 @@ export const GenerateSummary = {
|
|
|
42
46
|
Concise: "concise",
|
|
43
47
|
Detailed: "detailed",
|
|
44
48
|
} as const;
|
|
45
|
-
export type GenerateSummary =
|
|
49
|
+
export type GenerateSummary = OpenEnum<typeof GenerateSummary>;
|
|
46
50
|
|
|
47
51
|
export const SummaryEnum = {
|
|
48
52
|
Auto: "auto",
|
|
49
53
|
Concise: "concise",
|
|
50
54
|
Detailed: "detailed",
|
|
51
55
|
} as const;
|
|
52
|
-
export type SummaryEnum =
|
|
56
|
+
export type SummaryEnum = OpenEnum<typeof SummaryEnum>;
|
|
53
57
|
|
|
54
58
|
export type Reasoning = {
|
|
55
59
|
effort?: ChatGenerationParamsEffort | null | undefined;
|
|
@@ -126,14 +130,25 @@ export type ChatGenerationParams = {
|
|
|
126
130
|
};
|
|
127
131
|
|
|
128
132
|
/** @internal */
|
|
129
|
-
export const ChatGenerationParamsEffort$inboundSchema: z.
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
export const ChatGenerationParamsEffort$inboundSchema: z.ZodType<
|
|
134
|
+
ChatGenerationParamsEffort,
|
|
135
|
+
z.ZodTypeDef,
|
|
136
|
+
unknown
|
|
137
|
+
> = z
|
|
138
|
+
.union([
|
|
139
|
+
z.nativeEnum(ChatGenerationParamsEffort),
|
|
140
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
141
|
+
]);
|
|
132
142
|
|
|
133
143
|
/** @internal */
|
|
134
|
-
export const ChatGenerationParamsEffort$outboundSchema: z.
|
|
135
|
-
|
|
136
|
-
|
|
144
|
+
export const ChatGenerationParamsEffort$outboundSchema: z.ZodType<
|
|
145
|
+
ChatGenerationParamsEffort,
|
|
146
|
+
z.ZodTypeDef,
|
|
147
|
+
ChatGenerationParamsEffort
|
|
148
|
+
> = z.union([
|
|
149
|
+
z.nativeEnum(ChatGenerationParamsEffort),
|
|
150
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
151
|
+
]);
|
|
137
152
|
|
|
138
153
|
/**
|
|
139
154
|
* @internal
|
|
@@ -147,14 +162,25 @@ export namespace ChatGenerationParamsEffort$ {
|
|
|
147
162
|
}
|
|
148
163
|
|
|
149
164
|
/** @internal */
|
|
150
|
-
export const GenerateSummary$inboundSchema: z.
|
|
151
|
-
|
|
152
|
-
|
|
165
|
+
export const GenerateSummary$inboundSchema: z.ZodType<
|
|
166
|
+
GenerateSummary,
|
|
167
|
+
z.ZodTypeDef,
|
|
168
|
+
unknown
|
|
169
|
+
> = z
|
|
170
|
+
.union([
|
|
171
|
+
z.nativeEnum(GenerateSummary),
|
|
172
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
173
|
+
]);
|
|
153
174
|
|
|
154
175
|
/** @internal */
|
|
155
|
-
export const GenerateSummary$outboundSchema: z.
|
|
156
|
-
|
|
157
|
-
|
|
176
|
+
export const GenerateSummary$outboundSchema: z.ZodType<
|
|
177
|
+
GenerateSummary,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
GenerateSummary
|
|
180
|
+
> = z.union([
|
|
181
|
+
z.nativeEnum(GenerateSummary),
|
|
182
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
183
|
+
]);
|
|
158
184
|
|
|
159
185
|
/**
|
|
160
186
|
* @internal
|
|
@@ -168,12 +194,25 @@ export namespace GenerateSummary$ {
|
|
|
168
194
|
}
|
|
169
195
|
|
|
170
196
|
/** @internal */
|
|
171
|
-
export const SummaryEnum$inboundSchema: z.
|
|
172
|
-
|
|
197
|
+
export const SummaryEnum$inboundSchema: z.ZodType<
|
|
198
|
+
SummaryEnum,
|
|
199
|
+
z.ZodTypeDef,
|
|
200
|
+
unknown
|
|
201
|
+
> = z
|
|
202
|
+
.union([
|
|
203
|
+
z.nativeEnum(SummaryEnum),
|
|
204
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
205
|
+
]);
|
|
173
206
|
|
|
174
207
|
/** @internal */
|
|
175
|
-
export const SummaryEnum$outboundSchema: z.
|
|
176
|
-
SummaryEnum
|
|
208
|
+
export const SummaryEnum$outboundSchema: z.ZodType<
|
|
209
|
+
SummaryEnum,
|
|
210
|
+
z.ZodTypeDef,
|
|
211
|
+
SummaryEnum
|
|
212
|
+
> = z.union([
|
|
213
|
+
z.nativeEnum(SummaryEnum),
|
|
214
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
215
|
+
]);
|
|
177
216
|
|
|
178
217
|
/**
|
|
179
218
|
* @internal
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
catchUnrecognizedEnum,
|
|
10
|
+
OpenEnum,
|
|
11
|
+
Unrecognized,
|
|
12
|
+
} from "../types/enums.js";
|
|
9
13
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
14
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
15
|
|
|
@@ -18,7 +22,7 @@ export const ChatMessageContentItemAudioFormat = {
|
|
|
18
22
|
Pcm16: "pcm16",
|
|
19
23
|
Pcm24: "pcm24",
|
|
20
24
|
} as const;
|
|
21
|
-
export type ChatMessageContentItemAudioFormat =
|
|
25
|
+
export type ChatMessageContentItemAudioFormat = OpenEnum<
|
|
22
26
|
typeof ChatMessageContentItemAudioFormat
|
|
23
27
|
>;
|
|
24
28
|
|
|
@@ -33,14 +37,25 @@ export type ChatMessageContentItemAudio = {
|
|
|
33
37
|
};
|
|
34
38
|
|
|
35
39
|
/** @internal */
|
|
36
|
-
export const ChatMessageContentItemAudioFormat$inboundSchema: z.
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
export const ChatMessageContentItemAudioFormat$inboundSchema: z.ZodType<
|
|
41
|
+
ChatMessageContentItemAudioFormat,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z
|
|
45
|
+
.union([
|
|
46
|
+
z.nativeEnum(ChatMessageContentItemAudioFormat),
|
|
47
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
48
|
+
]);
|
|
39
49
|
|
|
40
50
|
/** @internal */
|
|
41
|
-
export const ChatMessageContentItemAudioFormat$outboundSchema: z.
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
export const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType<
|
|
52
|
+
ChatMessageContentItemAudioFormat,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
ChatMessageContentItemAudioFormat
|
|
55
|
+
> = z.union([
|
|
56
|
+
z.nativeEnum(ChatMessageContentItemAudioFormat),
|
|
57
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
58
|
+
]);
|
|
44
59
|
|
|
45
60
|
/**
|
|
46
61
|
* @internal
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
catchUnrecognizedEnum,
|
|
10
|
+
OpenEnum,
|
|
11
|
+
Unrecognized,
|
|
12
|
+
} from "../types/enums.js";
|
|
9
13
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
14
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
15
|
|
|
@@ -14,7 +18,7 @@ export const Detail = {
|
|
|
14
18
|
Low: "low",
|
|
15
19
|
High: "high",
|
|
16
20
|
} as const;
|
|
17
|
-
export type Detail =
|
|
21
|
+
export type Detail = OpenEnum<typeof Detail>;
|
|
18
22
|
|
|
19
23
|
export type ImageUrl = {
|
|
20
24
|
url: string;
|
|
@@ -27,12 +31,18 @@ export type ChatMessageContentItemImage = {
|
|
|
27
31
|
};
|
|
28
32
|
|
|
29
33
|
/** @internal */
|
|
30
|
-
export const Detail$inboundSchema: z.
|
|
31
|
-
.
|
|
34
|
+
export const Detail$inboundSchema: z.ZodType<Detail, z.ZodTypeDef, unknown> = z
|
|
35
|
+
.union([
|
|
36
|
+
z.nativeEnum(Detail),
|
|
37
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
38
|
+
]);
|
|
32
39
|
|
|
33
40
|
/** @internal */
|
|
34
|
-
export const Detail$outboundSchema: z.
|
|
35
|
-
|
|
41
|
+
export const Detail$outboundSchema: z.ZodType<Detail, z.ZodTypeDef, Detail> = z
|
|
42
|
+
.union([
|
|
43
|
+
z.nativeEnum(Detail),
|
|
44
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
45
|
+
]);
|
|
36
46
|
|
|
37
47
|
/**
|
|
38
48
|
* @internal
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
catchUnrecognizedEnum,
|
|
10
|
+
OpenEnum,
|
|
11
|
+
Unrecognized,
|
|
12
|
+
} from "../types/enums.js";
|
|
9
13
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
14
|
import {
|
|
11
15
|
AssistantMessage,
|
|
@@ -28,7 +32,7 @@ export const ChatResponseChoiceFinishReason = {
|
|
|
28
32
|
ContentFilter: "content_filter",
|
|
29
33
|
Error: "error",
|
|
30
34
|
} as const;
|
|
31
|
-
export type ChatResponseChoiceFinishReason =
|
|
35
|
+
export type ChatResponseChoiceFinishReason = OpenEnum<
|
|
32
36
|
typeof ChatResponseChoiceFinishReason
|
|
33
37
|
>;
|
|
34
38
|
|
|
@@ -40,14 +44,25 @@ export type ChatResponseChoice = {
|
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
/** @internal */
|
|
43
|
-
export const ChatResponseChoiceFinishReason$inboundSchema: z.
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
export const ChatResponseChoiceFinishReason$inboundSchema: z.ZodType<
|
|
48
|
+
ChatResponseChoiceFinishReason,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z
|
|
52
|
+
.union([
|
|
53
|
+
z.nativeEnum(ChatResponseChoiceFinishReason),
|
|
54
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
55
|
+
]);
|
|
46
56
|
|
|
47
57
|
/** @internal */
|
|
48
|
-
export const ChatResponseChoiceFinishReason$outboundSchema: z.
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
export const ChatResponseChoiceFinishReason$outboundSchema: z.ZodType<
|
|
59
|
+
ChatResponseChoiceFinishReason,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
ChatResponseChoiceFinishReason
|
|
62
|
+
> = z.union([
|
|
63
|
+
z.nativeEnum(ChatResponseChoiceFinishReason),
|
|
64
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
65
|
+
]);
|
|
51
66
|
|
|
52
67
|
/**
|
|
53
68
|
* @internal
|
|
@@ -5,7 +5,11 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
catchUnrecognizedEnum,
|
|
10
|
+
OpenEnum,
|
|
11
|
+
Unrecognized,
|
|
12
|
+
} from "../types/enums.js";
|
|
9
13
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
14
|
import {
|
|
11
15
|
ChatMessageTokenLogprobs,
|
|
@@ -28,7 +32,7 @@ export const ChatStreamingChoiceFinishReason = {
|
|
|
28
32
|
ContentFilter: "content_filter",
|
|
29
33
|
Error: "error",
|
|
30
34
|
} as const;
|
|
31
|
-
export type ChatStreamingChoiceFinishReason =
|
|
35
|
+
export type ChatStreamingChoiceFinishReason = OpenEnum<
|
|
32
36
|
typeof ChatStreamingChoiceFinishReason
|
|
33
37
|
>;
|
|
34
38
|
|
|
@@ -40,14 +44,25 @@ export type ChatStreamingChoice = {
|
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
/** @internal */
|
|
43
|
-
export const ChatStreamingChoiceFinishReason$inboundSchema: z.
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
export const ChatStreamingChoiceFinishReason$inboundSchema: z.ZodType<
|
|
48
|
+
ChatStreamingChoiceFinishReason,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z
|
|
52
|
+
.union([
|
|
53
|
+
z.nativeEnum(ChatStreamingChoiceFinishReason),
|
|
54
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
55
|
+
]);
|
|
46
56
|
|
|
47
57
|
/** @internal */
|
|
48
|
-
export const ChatStreamingChoiceFinishReason$outboundSchema: z.
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
export const ChatStreamingChoiceFinishReason$outboundSchema: z.ZodType<
|
|
59
|
+
ChatStreamingChoiceFinishReason,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
ChatStreamingChoiceFinishReason
|
|
62
|
+
> = z.union([
|
|
63
|
+
z.nativeEnum(ChatStreamingChoiceFinishReason),
|
|
64
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
65
|
+
]);
|
|
51
66
|
|
|
52
67
|
/**
|
|
53
68
|
* @internal
|
|
@@ -3,24 +3,39 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../types/enums.js";
|
|
7
11
|
|
|
8
12
|
export const CompletionFinishReason = {
|
|
9
13
|
Stop: "stop",
|
|
10
14
|
Length: "length",
|
|
11
15
|
ContentFilter: "content_filter",
|
|
12
16
|
} as const;
|
|
13
|
-
export type CompletionFinishReason =
|
|
17
|
+
export type CompletionFinishReason = OpenEnum<typeof CompletionFinishReason>;
|
|
14
18
|
|
|
15
19
|
/** @internal */
|
|
16
|
-
export const CompletionFinishReason$inboundSchema: z.
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
export const CompletionFinishReason$inboundSchema: z.ZodType<
|
|
21
|
+
CompletionFinishReason,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z
|
|
25
|
+
.union([
|
|
26
|
+
z.nativeEnum(CompletionFinishReason),
|
|
27
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
28
|
+
]);
|
|
19
29
|
|
|
20
30
|
/** @internal */
|
|
21
|
-
export const CompletionFinishReason$outboundSchema: z.
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
export const CompletionFinishReason$outboundSchema: z.ZodType<
|
|
32
|
+
CompletionFinishReason,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
CompletionFinishReason
|
|
35
|
+
> = z.union([
|
|
36
|
+
z.nativeEnum(CompletionFinishReason),
|
|
37
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
38
|
+
]);
|
|
24
39
|
|
|
25
40
|
/**
|
|
26
41
|
* @internal
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The created API key information
|
|
13
|
+
*/
|
|
14
|
+
export type CreateAPIKeyData = {
|
|
15
|
+
/**
|
|
16
|
+
* Unique hash identifier for the API key
|
|
17
|
+
*/
|
|
18
|
+
hash: string;
|
|
19
|
+
/**
|
|
20
|
+
* Name of the API key
|
|
21
|
+
*/
|
|
22
|
+
name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Human-readable label for the API key
|
|
25
|
+
*/
|
|
26
|
+
label: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the API key is disabled
|
|
29
|
+
*/
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Spending limit for the API key in USD
|
|
33
|
+
*/
|
|
34
|
+
limit: number | null;
|
|
35
|
+
/**
|
|
36
|
+
* Remaining spending limit in USD
|
|
37
|
+
*/
|
|
38
|
+
limitRemaining: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Type of limit reset for the API key
|
|
41
|
+
*/
|
|
42
|
+
limitReset: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to include external BYOK usage in the credit limit
|
|
45
|
+
*/
|
|
46
|
+
includeByokInLimit: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Total OpenRouter credit usage (in USD) for the API key
|
|
49
|
+
*/
|
|
50
|
+
usage: number;
|
|
51
|
+
/**
|
|
52
|
+
* OpenRouter credit usage (in USD) for the current UTC day
|
|
53
|
+
*/
|
|
54
|
+
usageDaily: number;
|
|
55
|
+
/**
|
|
56
|
+
* OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
|
|
57
|
+
*/
|
|
58
|
+
usageWeekly: number;
|
|
59
|
+
/**
|
|
60
|
+
* OpenRouter credit usage (in USD) for the current UTC month
|
|
61
|
+
*/
|
|
62
|
+
usageMonthly: number;
|
|
63
|
+
/**
|
|
64
|
+
* Total external BYOK usage (in USD) for the API key
|
|
65
|
+
*/
|
|
66
|
+
byokUsage: number;
|
|
67
|
+
/**
|
|
68
|
+
* External BYOK usage (in USD) for the current UTC day
|
|
69
|
+
*/
|
|
70
|
+
byokUsageDaily: number;
|
|
71
|
+
/**
|
|
72
|
+
* External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
|
|
73
|
+
*/
|
|
74
|
+
byokUsageWeekly: number;
|
|
75
|
+
/**
|
|
76
|
+
* External BYOK usage (in USD) for current UTC month
|
|
77
|
+
*/
|
|
78
|
+
byokUsageMonthly: number;
|
|
79
|
+
/**
|
|
80
|
+
* ISO 8601 timestamp of when the API key was created
|
|
81
|
+
*/
|
|
82
|
+
createdAt: string;
|
|
83
|
+
/**
|
|
84
|
+
* ISO 8601 timestamp of when the API key was last updated
|
|
85
|
+
*/
|
|
86
|
+
updatedAt: string | null;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const CreateAPIKeyData$inboundSchema: z.ZodType<
|
|
91
|
+
CreateAPIKeyData,
|
|
92
|
+
z.ZodTypeDef,
|
|
93
|
+
unknown
|
|
94
|
+
> = z.object({
|
|
95
|
+
hash: z.string(),
|
|
96
|
+
name: z.string(),
|
|
97
|
+
label: z.string(),
|
|
98
|
+
disabled: z.boolean(),
|
|
99
|
+
limit: z.nullable(z.number()),
|
|
100
|
+
limit_remaining: z.nullable(z.number()),
|
|
101
|
+
limit_reset: z.nullable(z.string()),
|
|
102
|
+
include_byok_in_limit: z.boolean(),
|
|
103
|
+
usage: z.number(),
|
|
104
|
+
usage_daily: z.number(),
|
|
105
|
+
usage_weekly: z.number(),
|
|
106
|
+
usage_monthly: z.number(),
|
|
107
|
+
byok_usage: z.number(),
|
|
108
|
+
byok_usage_daily: z.number(),
|
|
109
|
+
byok_usage_weekly: z.number(),
|
|
110
|
+
byok_usage_monthly: z.number(),
|
|
111
|
+
created_at: z.string(),
|
|
112
|
+
updated_at: z.nullable(z.string()),
|
|
113
|
+
}).transform((v) => {
|
|
114
|
+
return remap$(v, {
|
|
115
|
+
"limit_remaining": "limitRemaining",
|
|
116
|
+
"limit_reset": "limitReset",
|
|
117
|
+
"include_byok_in_limit": "includeByokInLimit",
|
|
118
|
+
"usage_daily": "usageDaily",
|
|
119
|
+
"usage_weekly": "usageWeekly",
|
|
120
|
+
"usage_monthly": "usageMonthly",
|
|
121
|
+
"byok_usage": "byokUsage",
|
|
122
|
+
"byok_usage_daily": "byokUsageDaily",
|
|
123
|
+
"byok_usage_weekly": "byokUsageWeekly",
|
|
124
|
+
"byok_usage_monthly": "byokUsageMonthly",
|
|
125
|
+
"created_at": "createdAt",
|
|
126
|
+
"updated_at": "updatedAt",
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export type CreateAPIKeyData$Outbound = {
|
|
132
|
+
hash: string;
|
|
133
|
+
name: string;
|
|
134
|
+
label: string;
|
|
135
|
+
disabled: boolean;
|
|
136
|
+
limit: number | null;
|
|
137
|
+
limit_remaining: number | null;
|
|
138
|
+
limit_reset: string | null;
|
|
139
|
+
include_byok_in_limit: boolean;
|
|
140
|
+
usage: number;
|
|
141
|
+
usage_daily: number;
|
|
142
|
+
usage_weekly: number;
|
|
143
|
+
usage_monthly: number;
|
|
144
|
+
byok_usage: number;
|
|
145
|
+
byok_usage_daily: number;
|
|
146
|
+
byok_usage_weekly: number;
|
|
147
|
+
byok_usage_monthly: number;
|
|
148
|
+
created_at: string;
|
|
149
|
+
updated_at: string | null;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export const CreateAPIKeyData$outboundSchema: z.ZodType<
|
|
154
|
+
CreateAPIKeyData$Outbound,
|
|
155
|
+
z.ZodTypeDef,
|
|
156
|
+
CreateAPIKeyData
|
|
157
|
+
> = z.object({
|
|
158
|
+
hash: z.string(),
|
|
159
|
+
name: z.string(),
|
|
160
|
+
label: z.string(),
|
|
161
|
+
disabled: z.boolean(),
|
|
162
|
+
limit: z.nullable(z.number()),
|
|
163
|
+
limitRemaining: z.nullable(z.number()),
|
|
164
|
+
limitReset: z.nullable(z.string()),
|
|
165
|
+
includeByokInLimit: z.boolean(),
|
|
166
|
+
usage: z.number(),
|
|
167
|
+
usageDaily: z.number(),
|
|
168
|
+
usageWeekly: z.number(),
|
|
169
|
+
usageMonthly: z.number(),
|
|
170
|
+
byokUsage: z.number(),
|
|
171
|
+
byokUsageDaily: z.number(),
|
|
172
|
+
byokUsageWeekly: z.number(),
|
|
173
|
+
byokUsageMonthly: z.number(),
|
|
174
|
+
createdAt: z.string(),
|
|
175
|
+
updatedAt: z.nullable(z.string()),
|
|
176
|
+
}).transform((v) => {
|
|
177
|
+
return remap$(v, {
|
|
178
|
+
limitRemaining: "limit_remaining",
|
|
179
|
+
limitReset: "limit_reset",
|
|
180
|
+
includeByokInLimit: "include_byok_in_limit",
|
|
181
|
+
usageDaily: "usage_daily",
|
|
182
|
+
usageWeekly: "usage_weekly",
|
|
183
|
+
usageMonthly: "usage_monthly",
|
|
184
|
+
byokUsage: "byok_usage",
|
|
185
|
+
byokUsageDaily: "byok_usage_daily",
|
|
186
|
+
byokUsageWeekly: "byok_usage_weekly",
|
|
187
|
+
byokUsageMonthly: "byok_usage_monthly",
|
|
188
|
+
createdAt: "created_at",
|
|
189
|
+
updatedAt: "updated_at",
|
|
190
|
+
});
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @internal
|
|
195
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
196
|
+
*/
|
|
197
|
+
export namespace CreateAPIKeyData$ {
|
|
198
|
+
/** @deprecated use `CreateAPIKeyData$inboundSchema` instead. */
|
|
199
|
+
export const inboundSchema = CreateAPIKeyData$inboundSchema;
|
|
200
|
+
/** @deprecated use `CreateAPIKeyData$outboundSchema` instead. */
|
|
201
|
+
export const outboundSchema = CreateAPIKeyData$outboundSchema;
|
|
202
|
+
/** @deprecated use `CreateAPIKeyData$Outbound` instead. */
|
|
203
|
+
export type Outbound = CreateAPIKeyData$Outbound;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function createAPIKeyDataToJSON(
|
|
207
|
+
createAPIKeyData: CreateAPIKeyData,
|
|
208
|
+
): string {
|
|
209
|
+
return JSON.stringify(
|
|
210
|
+
CreateAPIKeyData$outboundSchema.parse(createAPIKeyData),
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function createAPIKeyDataFromJSON(
|
|
215
|
+
jsonString: string,
|
|
216
|
+
): SafeParseResult<CreateAPIKeyData, SDKValidationError> {
|
|
217
|
+
return safeParse(
|
|
218
|
+
jsonString,
|
|
219
|
+
(x) => CreateAPIKeyData$inboundSchema.parse(JSON.parse(x)),
|
|
220
|
+
`Failed to parse 'CreateAPIKeyData' from JSON`,
|
|
221
|
+
);
|
|
222
|
+
}
|