@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
|
@@ -3,53 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import * as models from "../index.js";
|
|
10
10
|
|
|
11
11
|
export type GetApiKeyRequest = {
|
|
12
12
|
hash: string;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* The API key information
|
|
17
|
-
*/
|
|
18
|
-
export type GetApiKeyData = {
|
|
19
|
-
/**
|
|
20
|
-
* Unique hash identifier for the API key
|
|
21
|
-
*/
|
|
22
|
-
hash: string;
|
|
23
|
-
/**
|
|
24
|
-
* Name of the API key
|
|
25
|
-
*/
|
|
26
|
-
name: string;
|
|
27
|
-
/**
|
|
28
|
-
* Human-readable label for the API key
|
|
29
|
-
*/
|
|
30
|
-
label: string;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the API key is disabled
|
|
33
|
-
*/
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Spending limit for the API key in USD
|
|
37
|
-
*/
|
|
38
|
-
limit: number | null;
|
|
39
|
-
/**
|
|
40
|
-
* Current usage of the API key in USD
|
|
41
|
-
*/
|
|
42
|
-
usage: number;
|
|
43
|
-
/**
|
|
44
|
-
* ISO 8601 timestamp of when the API key was created
|
|
45
|
-
*/
|
|
46
|
-
createdAt: string;
|
|
47
|
-
/**
|
|
48
|
-
* ISO 8601 timestamp of when the API key was last updated
|
|
49
|
-
*/
|
|
50
|
-
updatedAt: string | null;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
15
|
/**
|
|
54
16
|
* API key details
|
|
55
17
|
*/
|
|
@@ -57,7 +19,7 @@ export type GetApiKeyResponse = {
|
|
|
57
19
|
/**
|
|
58
20
|
* The API key information
|
|
59
21
|
*/
|
|
60
|
-
data:
|
|
22
|
+
data: models.GetAPIKeyData;
|
|
61
23
|
};
|
|
62
24
|
|
|
63
25
|
/** @internal */
|
|
@@ -114,99 +76,18 @@ export function getApiKeyRequestFromJSON(
|
|
|
114
76
|
);
|
|
115
77
|
}
|
|
116
78
|
|
|
117
|
-
/** @internal */
|
|
118
|
-
export const GetApiKeyData$inboundSchema: z.ZodType<
|
|
119
|
-
GetApiKeyData,
|
|
120
|
-
z.ZodTypeDef,
|
|
121
|
-
unknown
|
|
122
|
-
> = z.object({
|
|
123
|
-
hash: z.string(),
|
|
124
|
-
name: z.string(),
|
|
125
|
-
label: z.string(),
|
|
126
|
-
disabled: z.boolean(),
|
|
127
|
-
limit: z.nullable(z.number()),
|
|
128
|
-
usage: z.number(),
|
|
129
|
-
created_at: z.string(),
|
|
130
|
-
updated_at: z.nullable(z.string()),
|
|
131
|
-
}).transform((v) => {
|
|
132
|
-
return remap$(v, {
|
|
133
|
-
"created_at": "createdAt",
|
|
134
|
-
"updated_at": "updatedAt",
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
/** @internal */
|
|
139
|
-
export type GetApiKeyData$Outbound = {
|
|
140
|
-
hash: string;
|
|
141
|
-
name: string;
|
|
142
|
-
label: string;
|
|
143
|
-
disabled: boolean;
|
|
144
|
-
limit: number | null;
|
|
145
|
-
usage: number;
|
|
146
|
-
created_at: string;
|
|
147
|
-
updated_at: string | null;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/** @internal */
|
|
151
|
-
export const GetApiKeyData$outboundSchema: z.ZodType<
|
|
152
|
-
GetApiKeyData$Outbound,
|
|
153
|
-
z.ZodTypeDef,
|
|
154
|
-
GetApiKeyData
|
|
155
|
-
> = z.object({
|
|
156
|
-
hash: z.string(),
|
|
157
|
-
name: z.string(),
|
|
158
|
-
label: z.string(),
|
|
159
|
-
disabled: z.boolean(),
|
|
160
|
-
limit: z.nullable(z.number()),
|
|
161
|
-
usage: z.number(),
|
|
162
|
-
createdAt: z.string(),
|
|
163
|
-
updatedAt: z.nullable(z.string()),
|
|
164
|
-
}).transform((v) => {
|
|
165
|
-
return remap$(v, {
|
|
166
|
-
createdAt: "created_at",
|
|
167
|
-
updatedAt: "updated_at",
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* @internal
|
|
173
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
174
|
-
*/
|
|
175
|
-
export namespace GetApiKeyData$ {
|
|
176
|
-
/** @deprecated use `GetApiKeyData$inboundSchema` instead. */
|
|
177
|
-
export const inboundSchema = GetApiKeyData$inboundSchema;
|
|
178
|
-
/** @deprecated use `GetApiKeyData$outboundSchema` instead. */
|
|
179
|
-
export const outboundSchema = GetApiKeyData$outboundSchema;
|
|
180
|
-
/** @deprecated use `GetApiKeyData$Outbound` instead. */
|
|
181
|
-
export type Outbound = GetApiKeyData$Outbound;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export function getApiKeyDataToJSON(getApiKeyData: GetApiKeyData): string {
|
|
185
|
-
return JSON.stringify(GetApiKeyData$outboundSchema.parse(getApiKeyData));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
export function getApiKeyDataFromJSON(
|
|
189
|
-
jsonString: string,
|
|
190
|
-
): SafeParseResult<GetApiKeyData, SDKValidationError> {
|
|
191
|
-
return safeParse(
|
|
192
|
-
jsonString,
|
|
193
|
-
(x) => GetApiKeyData$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
-
`Failed to parse 'GetApiKeyData' from JSON`,
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
79
|
/** @internal */
|
|
199
80
|
export const GetApiKeyResponse$inboundSchema: z.ZodType<
|
|
200
81
|
GetApiKeyResponse,
|
|
201
82
|
z.ZodTypeDef,
|
|
202
83
|
unknown
|
|
203
84
|
> = z.object({
|
|
204
|
-
data:
|
|
85
|
+
data: models.GetAPIKeyData$inboundSchema,
|
|
205
86
|
});
|
|
206
87
|
|
|
207
88
|
/** @internal */
|
|
208
89
|
export type GetApiKeyResponse$Outbound = {
|
|
209
|
-
data:
|
|
90
|
+
data: models.GetAPIKeyData$Outbound;
|
|
210
91
|
};
|
|
211
92
|
|
|
212
93
|
/** @internal */
|
|
@@ -215,7 +96,7 @@ export const GetApiKeyResponse$outboundSchema: z.ZodType<
|
|
|
215
96
|
z.ZodTypeDef,
|
|
216
97
|
GetApiKeyResponse
|
|
217
98
|
> = z.object({
|
|
218
|
-
data:
|
|
99
|
+
data: models.GetAPIKeyData$outboundSchema,
|
|
219
100
|
});
|
|
220
101
|
|
|
221
102
|
/**
|
|
@@ -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
|
|
|
@@ -23,7 +27,7 @@ export const ApiType = {
|
|
|
23
27
|
/**
|
|
24
28
|
* Type of API used for the generation
|
|
25
29
|
*/
|
|
26
|
-
export type ApiType =
|
|
30
|
+
export type ApiType = OpenEnum<typeof ApiType>;
|
|
27
31
|
|
|
28
32
|
/**
|
|
29
33
|
* Generation data
|
|
@@ -220,12 +224,19 @@ export function getMetadataRequestFromJSON(
|
|
|
220
224
|
}
|
|
221
225
|
|
|
222
226
|
/** @internal */
|
|
223
|
-
export const ApiType$inboundSchema: z.
|
|
224
|
-
|
|
227
|
+
export const ApiType$inboundSchema: z.ZodType<ApiType, z.ZodTypeDef, unknown> =
|
|
228
|
+
z
|
|
229
|
+
.union([
|
|
230
|
+
z.nativeEnum(ApiType),
|
|
231
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
232
|
+
]);
|
|
225
233
|
|
|
226
234
|
/** @internal */
|
|
227
|
-
export const ApiType$outboundSchema: z.
|
|
228
|
-
|
|
235
|
+
export const ApiType$outboundSchema: z.ZodType<ApiType, z.ZodTypeDef, ApiType> =
|
|
236
|
+
z.union([
|
|
237
|
+
z.nativeEnum(ApiType),
|
|
238
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
239
|
+
]);
|
|
229
240
|
|
|
230
241
|
/**
|
|
231
242
|
* @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
|
|
|
@@ -79,7 +83,7 @@ export const GetParametersProvider = {
|
|
|
79
83
|
ZAi: "Z.AI",
|
|
80
84
|
FakeProvider: "FakeProvider",
|
|
81
85
|
} as const;
|
|
82
|
-
export type GetParametersProvider =
|
|
86
|
+
export type GetParametersProvider = OpenEnum<typeof GetParametersProvider>;
|
|
83
87
|
|
|
84
88
|
export type GetParametersRequest = {
|
|
85
89
|
author: string;
|
|
@@ -112,7 +116,7 @@ export const GetParametersSupportedParameter = {
|
|
|
112
116
|
WebSearchOptions: "web_search_options",
|
|
113
117
|
Verbosity: "verbosity",
|
|
114
118
|
} as const;
|
|
115
|
-
export type GetParametersSupportedParameter =
|
|
119
|
+
export type GetParametersSupportedParameter = OpenEnum<
|
|
116
120
|
typeof GetParametersSupportedParameter
|
|
117
121
|
>;
|
|
118
122
|
|
|
@@ -195,14 +199,25 @@ export function getParametersSecurityFromJSON(
|
|
|
195
199
|
}
|
|
196
200
|
|
|
197
201
|
/** @internal */
|
|
198
|
-
export const GetParametersProvider$inboundSchema: z.
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
export const GetParametersProvider$inboundSchema: z.ZodType<
|
|
203
|
+
GetParametersProvider,
|
|
204
|
+
z.ZodTypeDef,
|
|
205
|
+
unknown
|
|
206
|
+
> = z
|
|
207
|
+
.union([
|
|
208
|
+
z.nativeEnum(GetParametersProvider),
|
|
209
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
210
|
+
]);
|
|
201
211
|
|
|
202
212
|
/** @internal */
|
|
203
|
-
export const GetParametersProvider$outboundSchema: z.
|
|
204
|
-
|
|
205
|
-
|
|
213
|
+
export const GetParametersProvider$outboundSchema: z.ZodType<
|
|
214
|
+
GetParametersProvider,
|
|
215
|
+
z.ZodTypeDef,
|
|
216
|
+
GetParametersProvider
|
|
217
|
+
> = z.union([
|
|
218
|
+
z.nativeEnum(GetParametersProvider),
|
|
219
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
220
|
+
]);
|
|
206
221
|
|
|
207
222
|
/**
|
|
208
223
|
* @internal
|
|
@@ -276,14 +291,25 @@ export function getParametersRequestFromJSON(
|
|
|
276
291
|
}
|
|
277
292
|
|
|
278
293
|
/** @internal */
|
|
279
|
-
export const GetParametersSupportedParameter$inboundSchema: z.
|
|
280
|
-
|
|
281
|
-
|
|
294
|
+
export const GetParametersSupportedParameter$inboundSchema: z.ZodType<
|
|
295
|
+
GetParametersSupportedParameter,
|
|
296
|
+
z.ZodTypeDef,
|
|
297
|
+
unknown
|
|
298
|
+
> = z
|
|
299
|
+
.union([
|
|
300
|
+
z.nativeEnum(GetParametersSupportedParameter),
|
|
301
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
302
|
+
]);
|
|
282
303
|
|
|
283
304
|
/** @internal */
|
|
284
|
-
export const GetParametersSupportedParameter$outboundSchema: z.
|
|
285
|
-
|
|
286
|
-
|
|
305
|
+
export const GetParametersSupportedParameter$outboundSchema: z.ZodType<
|
|
306
|
+
GetParametersSupportedParameter,
|
|
307
|
+
z.ZodTypeDef,
|
|
308
|
+
GetParametersSupportedParameter
|
|
309
|
+
> = z.union([
|
|
310
|
+
z.nativeEnum(GetParametersSupportedParameter),
|
|
311
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
312
|
+
]);
|
|
287
313
|
|
|
288
314
|
/**
|
|
289
315
|
* @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
|
import * as models from "../index.js";
|
|
@@ -42,7 +46,7 @@ export const Tokenizer = {
|
|
|
42
46
|
/**
|
|
43
47
|
* Tokenizer type used by the model
|
|
44
48
|
*/
|
|
45
|
-
export type Tokenizer =
|
|
49
|
+
export type Tokenizer = OpenEnum<typeof Tokenizer>;
|
|
46
50
|
|
|
47
51
|
/**
|
|
48
52
|
* Instruction format type
|
|
@@ -74,7 +78,7 @@ export const InstructType = {
|
|
|
74
78
|
/**
|
|
75
79
|
* Instruction format type
|
|
76
80
|
*/
|
|
77
|
-
export type InstructType =
|
|
81
|
+
export type InstructType = OpenEnum<typeof InstructType>;
|
|
78
82
|
|
|
79
83
|
export const InputModality = {
|
|
80
84
|
Text: "text",
|
|
@@ -82,14 +86,14 @@ export const InputModality = {
|
|
|
82
86
|
File: "file",
|
|
83
87
|
Audio: "audio",
|
|
84
88
|
} as const;
|
|
85
|
-
export type InputModality =
|
|
89
|
+
export type InputModality = OpenEnum<typeof InputModality>;
|
|
86
90
|
|
|
87
91
|
export const OutputModality = {
|
|
88
92
|
Text: "text",
|
|
89
93
|
Image: "image",
|
|
90
94
|
Embeddings: "embeddings",
|
|
91
95
|
} as const;
|
|
92
|
-
export type OutputModality =
|
|
96
|
+
export type OutputModality = OpenEnum<typeof OutputModality>;
|
|
93
97
|
|
|
94
98
|
/**
|
|
95
99
|
* Model architecture information
|
|
@@ -205,12 +209,25 @@ export function listRequestFromJSON(
|
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
/** @internal */
|
|
208
|
-
export const Tokenizer$inboundSchema: z.
|
|
209
|
-
|
|
212
|
+
export const Tokenizer$inboundSchema: z.ZodType<
|
|
213
|
+
Tokenizer,
|
|
214
|
+
z.ZodTypeDef,
|
|
215
|
+
unknown
|
|
216
|
+
> = z
|
|
217
|
+
.union([
|
|
218
|
+
z.nativeEnum(Tokenizer),
|
|
219
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
220
|
+
]);
|
|
210
221
|
|
|
211
222
|
/** @internal */
|
|
212
|
-
export const Tokenizer$outboundSchema: z.
|
|
213
|
-
Tokenizer
|
|
223
|
+
export const Tokenizer$outboundSchema: z.ZodType<
|
|
224
|
+
Tokenizer,
|
|
225
|
+
z.ZodTypeDef,
|
|
226
|
+
Tokenizer
|
|
227
|
+
> = z.union([
|
|
228
|
+
z.nativeEnum(Tokenizer),
|
|
229
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
230
|
+
]);
|
|
214
231
|
|
|
215
232
|
/**
|
|
216
233
|
* @internal
|
|
@@ -224,12 +241,25 @@ export namespace Tokenizer$ {
|
|
|
224
241
|
}
|
|
225
242
|
|
|
226
243
|
/** @internal */
|
|
227
|
-
export const InstructType$inboundSchema: z.
|
|
228
|
-
|
|
244
|
+
export const InstructType$inboundSchema: z.ZodType<
|
|
245
|
+
InstructType,
|
|
246
|
+
z.ZodTypeDef,
|
|
247
|
+
unknown
|
|
248
|
+
> = z
|
|
249
|
+
.union([
|
|
250
|
+
z.nativeEnum(InstructType),
|
|
251
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
252
|
+
]);
|
|
229
253
|
|
|
230
254
|
/** @internal */
|
|
231
|
-
export const InstructType$outboundSchema: z.
|
|
232
|
-
InstructType
|
|
255
|
+
export const InstructType$outboundSchema: z.ZodType<
|
|
256
|
+
InstructType,
|
|
257
|
+
z.ZodTypeDef,
|
|
258
|
+
InstructType
|
|
259
|
+
> = z.union([
|
|
260
|
+
z.nativeEnum(InstructType),
|
|
261
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
262
|
+
]);
|
|
233
263
|
|
|
234
264
|
/**
|
|
235
265
|
* @internal
|
|
@@ -243,14 +273,25 @@ export namespace InstructType$ {
|
|
|
243
273
|
}
|
|
244
274
|
|
|
245
275
|
/** @internal */
|
|
246
|
-
export const InputModality$inboundSchema: z.
|
|
247
|
-
|
|
248
|
-
|
|
276
|
+
export const InputModality$inboundSchema: z.ZodType<
|
|
277
|
+
InputModality,
|
|
278
|
+
z.ZodTypeDef,
|
|
279
|
+
unknown
|
|
280
|
+
> = z
|
|
281
|
+
.union([
|
|
282
|
+
z.nativeEnum(InputModality),
|
|
283
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
284
|
+
]);
|
|
249
285
|
|
|
250
286
|
/** @internal */
|
|
251
|
-
export const InputModality$outboundSchema: z.
|
|
252
|
-
|
|
253
|
-
|
|
287
|
+
export const InputModality$outboundSchema: z.ZodType<
|
|
288
|
+
InputModality,
|
|
289
|
+
z.ZodTypeDef,
|
|
290
|
+
InputModality
|
|
291
|
+
> = z.union([
|
|
292
|
+
z.nativeEnum(InputModality),
|
|
293
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
294
|
+
]);
|
|
254
295
|
|
|
255
296
|
/**
|
|
256
297
|
* @internal
|
|
@@ -264,14 +305,25 @@ export namespace InputModality$ {
|
|
|
264
305
|
}
|
|
265
306
|
|
|
266
307
|
/** @internal */
|
|
267
|
-
export const OutputModality$inboundSchema: z.
|
|
268
|
-
|
|
269
|
-
|
|
308
|
+
export const OutputModality$inboundSchema: z.ZodType<
|
|
309
|
+
OutputModality,
|
|
310
|
+
z.ZodTypeDef,
|
|
311
|
+
unknown
|
|
312
|
+
> = z
|
|
313
|
+
.union([
|
|
314
|
+
z.nativeEnum(OutputModality),
|
|
315
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
316
|
+
]);
|
|
270
317
|
|
|
271
318
|
/** @internal */
|
|
272
|
-
export const OutputModality$outboundSchema: z.
|
|
273
|
-
|
|
274
|
-
|
|
319
|
+
export const OutputModality$outboundSchema: z.ZodType<
|
|
320
|
+
OutputModality,
|
|
321
|
+
z.ZodTypeDef,
|
|
322
|
+
OutputModality
|
|
323
|
+
> = z.union([
|
|
324
|
+
z.nativeEnum(OutputModality),
|
|
325
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
326
|
+
]);
|
|
275
327
|
|
|
276
328
|
/**
|
|
277
329
|
* @internal
|
|
@@ -7,47 +7,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as models from "../index.js";
|
|
10
11
|
|
|
11
12
|
export type ListApiKeysRequest = {
|
|
12
13
|
includeDisabled?: string | undefined;
|
|
13
14
|
offset?: string | undefined;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
|
-
export type ListApiKeysData = {
|
|
17
|
-
/**
|
|
18
|
-
* Unique hash identifier for the API key
|
|
19
|
-
*/
|
|
20
|
-
hash: string;
|
|
21
|
-
/**
|
|
22
|
-
* Name of the API key
|
|
23
|
-
*/
|
|
24
|
-
name: string;
|
|
25
|
-
/**
|
|
26
|
-
* Human-readable label for the API key
|
|
27
|
-
*/
|
|
28
|
-
label: string;
|
|
29
|
-
/**
|
|
30
|
-
* Whether the API key is disabled
|
|
31
|
-
*/
|
|
32
|
-
disabled: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Spending limit for the API key in USD
|
|
35
|
-
*/
|
|
36
|
-
limit: number | null;
|
|
37
|
-
/**
|
|
38
|
-
* Current usage of the API key in USD
|
|
39
|
-
*/
|
|
40
|
-
usage: number;
|
|
41
|
-
/**
|
|
42
|
-
* ISO 8601 timestamp of when the API key was created
|
|
43
|
-
*/
|
|
44
|
-
createdAt: string;
|
|
45
|
-
/**
|
|
46
|
-
* ISO 8601 timestamp of when the API key was last updated
|
|
47
|
-
*/
|
|
48
|
-
updatedAt: string | null;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
17
|
/**
|
|
52
18
|
* List of API keys
|
|
53
19
|
*/
|
|
@@ -55,7 +21,7 @@ export type ListApiKeysResponse = {
|
|
|
55
21
|
/**
|
|
56
22
|
* List of API keys
|
|
57
23
|
*/
|
|
58
|
-
data: Array<
|
|
24
|
+
data: Array<models.ListAPIKeysData>;
|
|
59
25
|
};
|
|
60
26
|
|
|
61
27
|
/** @internal */
|
|
@@ -123,101 +89,18 @@ export function listApiKeysRequestFromJSON(
|
|
|
123
89
|
);
|
|
124
90
|
}
|
|
125
91
|
|
|
126
|
-
/** @internal */
|
|
127
|
-
export const ListApiKeysData$inboundSchema: z.ZodType<
|
|
128
|
-
ListApiKeysData,
|
|
129
|
-
z.ZodTypeDef,
|
|
130
|
-
unknown
|
|
131
|
-
> = z.object({
|
|
132
|
-
hash: z.string(),
|
|
133
|
-
name: z.string(),
|
|
134
|
-
label: z.string(),
|
|
135
|
-
disabled: z.boolean(),
|
|
136
|
-
limit: z.nullable(z.number()),
|
|
137
|
-
usage: z.number(),
|
|
138
|
-
created_at: z.string(),
|
|
139
|
-
updated_at: z.nullable(z.string()),
|
|
140
|
-
}).transform((v) => {
|
|
141
|
-
return remap$(v, {
|
|
142
|
-
"created_at": "createdAt",
|
|
143
|
-
"updated_at": "updatedAt",
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
/** @internal */
|
|
148
|
-
export type ListApiKeysData$Outbound = {
|
|
149
|
-
hash: string;
|
|
150
|
-
name: string;
|
|
151
|
-
label: string;
|
|
152
|
-
disabled: boolean;
|
|
153
|
-
limit: number | null;
|
|
154
|
-
usage: number;
|
|
155
|
-
created_at: string;
|
|
156
|
-
updated_at: string | null;
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/** @internal */
|
|
160
|
-
export const ListApiKeysData$outboundSchema: z.ZodType<
|
|
161
|
-
ListApiKeysData$Outbound,
|
|
162
|
-
z.ZodTypeDef,
|
|
163
|
-
ListApiKeysData
|
|
164
|
-
> = z.object({
|
|
165
|
-
hash: z.string(),
|
|
166
|
-
name: z.string(),
|
|
167
|
-
label: z.string(),
|
|
168
|
-
disabled: z.boolean(),
|
|
169
|
-
limit: z.nullable(z.number()),
|
|
170
|
-
usage: z.number(),
|
|
171
|
-
createdAt: z.string(),
|
|
172
|
-
updatedAt: z.nullable(z.string()),
|
|
173
|
-
}).transform((v) => {
|
|
174
|
-
return remap$(v, {
|
|
175
|
-
createdAt: "created_at",
|
|
176
|
-
updatedAt: "updated_at",
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @internal
|
|
182
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
183
|
-
*/
|
|
184
|
-
export namespace ListApiKeysData$ {
|
|
185
|
-
/** @deprecated use `ListApiKeysData$inboundSchema` instead. */
|
|
186
|
-
export const inboundSchema = ListApiKeysData$inboundSchema;
|
|
187
|
-
/** @deprecated use `ListApiKeysData$outboundSchema` instead. */
|
|
188
|
-
export const outboundSchema = ListApiKeysData$outboundSchema;
|
|
189
|
-
/** @deprecated use `ListApiKeysData$Outbound` instead. */
|
|
190
|
-
export type Outbound = ListApiKeysData$Outbound;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export function listApiKeysDataToJSON(
|
|
194
|
-
listApiKeysData: ListApiKeysData,
|
|
195
|
-
): string {
|
|
196
|
-
return JSON.stringify(ListApiKeysData$outboundSchema.parse(listApiKeysData));
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
export function listApiKeysDataFromJSON(
|
|
200
|
-
jsonString: string,
|
|
201
|
-
): SafeParseResult<ListApiKeysData, SDKValidationError> {
|
|
202
|
-
return safeParse(
|
|
203
|
-
jsonString,
|
|
204
|
-
(x) => ListApiKeysData$inboundSchema.parse(JSON.parse(x)),
|
|
205
|
-
`Failed to parse 'ListApiKeysData' from JSON`,
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
92
|
/** @internal */
|
|
210
93
|
export const ListApiKeysResponse$inboundSchema: z.ZodType<
|
|
211
94
|
ListApiKeysResponse,
|
|
212
95
|
z.ZodTypeDef,
|
|
213
96
|
unknown
|
|
214
97
|
> = z.object({
|
|
215
|
-
data: z.array(
|
|
98
|
+
data: z.array(models.ListAPIKeysData$inboundSchema),
|
|
216
99
|
});
|
|
217
100
|
|
|
218
101
|
/** @internal */
|
|
219
102
|
export type ListApiKeysResponse$Outbound = {
|
|
220
|
-
data: Array<
|
|
103
|
+
data: Array<models.ListAPIKeysData$Outbound>;
|
|
221
104
|
};
|
|
222
105
|
|
|
223
106
|
/** @internal */
|
|
@@ -226,7 +109,7 @@ export const ListApiKeysResponse$outboundSchema: z.ZodType<
|
|
|
226
109
|
z.ZodTypeDef,
|
|
227
110
|
ListApiKeysResponse
|
|
228
111
|
> = z.object({
|
|
229
|
-
data: z.array(
|
|
112
|
+
data: z.array(models.ListAPIKeysData$outboundSchema),
|
|
230
113
|
});
|
|
231
114
|
|
|
232
115
|
/**
|