@openrouter/sdk 0.0.1-beta.7 → 0.0.1-beta.9
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/esm/core.d.ts +10 -0
- package/esm/core.js +13 -0
- package/esm/funcs/analyticsGetUserActivity.d.ts +18 -0
- package/esm/funcs/analyticsGetUserActivity.js +85 -0
- package/esm/funcs/apiKeysCreate.d.ts +15 -0
- package/esm/funcs/apiKeysCreate.js +79 -0
- package/esm/funcs/apiKeysDelete.d.ts +15 -0
- package/esm/funcs/apiKeysDelete.js +84 -0
- package/esm/funcs/apiKeysGet.d.ts +15 -0
- package/esm/funcs/apiKeysGet.js +84 -0
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +18 -0
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +72 -0
- package/esm/funcs/apiKeysList.d.ts +15 -0
- package/esm/funcs/apiKeysList.js +83 -0
- package/esm/funcs/apiKeysUpdate.d.ts +15 -0
- package/esm/funcs/apiKeysUpdate.js +85 -0
- package/esm/funcs/betaResponsesSend.d.ts +18 -0
- package/esm/funcs/betaResponsesSend.js +69 -0
- package/esm/funcs/chatSend.d.ts +19 -0
- package/esm/funcs/chatSend.js +83 -0
- package/esm/funcs/completionsGenerate.d.ts +18 -0
- package/esm/funcs/completionsGenerate.js +82 -0
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +19 -0
- package/esm/funcs/creditsCreateCoinbaseCharge.js +77 -0
- package/esm/funcs/creditsGetCredits.d.ts +18 -0
- package/esm/funcs/creditsGetCredits.js +72 -0
- package/esm/funcs/endpointsList.d.ts +15 -0
- package/esm/funcs/endpointsList.js +88 -0
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +14 -0
- package/esm/funcs/endpointsListZdrEndpoints.js +65 -0
- package/esm/funcs/generationsGetGeneration.d.ts +15 -0
- package/esm/funcs/generationsGetGeneration.js +82 -0
- package/esm/funcs/modelsCount.d.ts +14 -0
- package/esm/funcs/modelsCount.js +65 -0
- package/esm/funcs/modelsList.d.ts +14 -0
- package/esm/funcs/modelsList.js +83 -0
- package/esm/funcs/modelsListForUser.d.ts +14 -0
- package/esm/funcs/modelsListForUser.js +69 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +43 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.js +44 -0
- package/esm/funcs/oAuthCreateSHA256CodeChallenge.d.ts +35 -0
- package/esm/funcs/oAuthCreateSHA256CodeChallenge.js +69 -0
- package/esm/funcs/parametersGetParameters.d.ts +15 -0
- package/esm/funcs/parametersGetParameters.js +96 -0
- package/esm/funcs/providersList.d.ts +15 -0
- package/esm/funcs/providersList.js +69 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.js +82 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.js +5 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +8 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.js +29 -0
- package/esm/lib/config.d.ts +44 -0
- package/esm/lib/config.js +32 -0
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/encodings.d.ts +52 -0
- package/esm/lib/encodings.js +354 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/event-streams.d.ts +11 -0
- package/esm/lib/event-streams.js +125 -0
- package/esm/lib/files.d.ts +13 -0
- package/esm/lib/files.js +73 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.js +207 -0
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.js +203 -0
- package/esm/lib/primitives.d.ts +26 -0
- package/esm/lib/primitives.js +103 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.js +147 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.js +269 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.js +137 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.js +22 -0
- package/esm/models/activityitem.d.ts +82 -0
- package/esm/models/activityitem.js +73 -0
- package/esm/models/assistantmessage.d.ts +62 -0
- package/esm/models/assistantmessage.js +73 -0
- package/esm/models/chatcompletionfinishreason.d.ts +25 -0
- package/esm/models/chatcompletionfinishreason.js +35 -0
- package/esm/models/chaterror.d.ts +56 -0
- package/esm/models/chaterror.js +64 -0
- package/esm/models/chatgenerationparams.d.ts +249 -0
- package/esm/models/chatgenerationparams.js +301 -0
- package/esm/models/chatgenerationtokenusage.d.ts +95 -0
- package/esm/models/chatgenerationtokenusage.js +142 -0
- package/esm/models/chatmessagecontentitem.d.ts +40 -0
- package/esm/models/chatmessagecontentitem.js +46 -0
- package/esm/models/chatmessagecontentitemaudio.d.ts +83 -0
- package/esm/models/chatmessagecontentitemaudio.js +102 -0
- package/esm/models/chatmessagecontentitemimage.d.ts +79 -0
- package/esm/models/chatmessagecontentitemimage.js +98 -0
- package/esm/models/chatmessagecontentitemtext.d.ts +31 -0
- package/esm/models/chatmessagecontentitemtext.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +64 -0
- package/esm/models/chatmessagetokenlogprob.js +75 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/esm/models/chatmessagetokenlogprobs.js +34 -0
- package/esm/models/chatmessagetoolcall.d.ts +60 -0
- package/esm/models/chatmessagetoolcall.js +62 -0
- package/esm/models/chatresponse.d.ts +43 -0
- package/esm/models/chatresponse.js +55 -0
- package/esm/models/chatresponsechoice.d.ts +38 -0
- package/esm/models/chatresponsechoice.js +49 -0
- package/esm/models/chatstreamingchoice.d.ts +38 -0
- package/esm/models/chatstreamingchoice.js +49 -0
- package/esm/models/chatstreamingmessagechunk.d.ts +61 -0
- package/esm/models/chatstreamingmessagechunk.js +67 -0
- package/esm/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/esm/models/chatstreamingmessagetoolcall.js +66 -0
- package/esm/models/chatstreamingresponsechunk.d.ts +97 -0
- package/esm/models/chatstreamingresponsechunk.js +120 -0
- package/esm/models/chatstreamoptions.d.ts +29 -0
- package/esm/models/chatstreamoptions.js +40 -0
- package/esm/models/completionchoice.d.ts +57 -0
- package/esm/models/completionchoice.js +75 -0
- package/esm/models/completioncreateparams.d.ts +240 -0
- package/esm/models/completioncreateparams.js +313 -0
- package/esm/models/completionlogprobs.d.ts +39 -0
- package/esm/models/completionlogprobs.js +50 -0
- package/esm/models/completionresponse.d.ts +43 -0
- package/esm/models/completionresponse.js +54 -0
- package/esm/models/completionusage.d.ts +33 -0
- package/esm/models/completionusage.js +48 -0
- package/esm/models/createchargerequest.d.ts +28 -0
- package/esm/models/createchargerequest.js +27 -0
- package/esm/models/errorresponse.d.ts +155 -0
- package/esm/models/errorresponse.js +167 -0
- package/esm/models/errors/chaterror.d.ts +37 -0
- package/esm/models/errors/chaterror.js +48 -0
- package/esm/models/errors/errorresponse.d.ts +46 -0
- package/esm/models/errors/errorresponse.js +64 -0
- package/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/esm/models/errors/httpclienterrors.js +69 -0
- package/esm/models/errors/index.d.ts +9 -0
- package/esm/models/errors/index.js +12 -0
- package/esm/models/errors/listproviders.d.ts +49 -0
- package/esm/models/errors/listproviders.js +51 -0
- package/esm/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/esm/models/errors/openrouterdefaulterror.js +30 -0
- package/esm/models/errors/openroutererror.d.ts +19 -0
- package/esm/models/errors/openroutererror.js +16 -0
- package/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/esm/models/errors/responsevalidationerror.js +29 -0
- package/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/esm/models/errors/sdkvalidationerror.js +44 -0
- package/esm/models/filecitationannotation.d.ts +58 -0
- package/esm/models/filecitationannotation.js +64 -0
- package/esm/models/filepathannotation.d.ts +56 -0
- package/esm/models/filepathannotation.js +62 -0
- package/esm/models/imagegenerationstatus.d.ts +24 -0
- package/esm/models/imagegenerationstatus.js +34 -0
- package/esm/models/index.d.ts +96 -0
- package/esm/models/index.js +99 -0
- package/esm/models/jsonschemaconfig.d.ts +39 -0
- package/esm/models/jsonschemaconfig.js +37 -0
- package/esm/models/listendpointsresponse.d.ts +28 -0
- package/esm/models/listendpointsresponse.js +27 -0
- package/esm/models/message.d.ts +80 -0
- package/esm/models/message.js +101 -0
- package/esm/models/modelscountresponse.d.ts +28 -0
- package/esm/models/modelscountresponse.js +27 -0
- package/esm/models/modelslistresponse.d.ts +28 -0
- package/esm/models/modelslistresponse.js +27 -0
- package/esm/models/namedtoolchoice.d.ts +56 -0
- package/esm/models/namedtoolchoice.js +58 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +190 -0
- package/esm/models/openresponseseasyinputmessage.js +194 -0
- package/esm/models/openresponsesformatjsonobject.d.ts +55 -0
- package/esm/models/openresponsesformatjsonobject.js +49 -0
- package/esm/models/openresponsesformatjsonschema.d.ts +67 -0
- package/esm/models/openresponsesformatjsonschema.js +57 -0
- package/esm/models/openresponsesformattext.d.ts +55 -0
- package/esm/models/openresponsesformattext.js +49 -0
- package/esm/models/openresponsesformattextconfig.d.ts +31 -0
- package/esm/models/openresponsesformattextconfig.js +38 -0
- package/esm/models/openresponsesfunctioncalloutput.d.ts +64 -0
- package/esm/models/openresponsesfunctioncalloutput.js +67 -0
- package/esm/models/openresponsesfunctiontoolcall.d.ts +66 -0
- package/esm/models/openresponsesfunctiontoolcall.js +69 -0
- package/esm/models/openresponsesinput.d.ts +29 -0
- package/esm/models/openresponsesinput.js +36 -0
- package/esm/models/openresponsesinputcontent.d.ts +43 -0
- package/esm/models/openresponsesinputcontent.js +50 -0
- package/esm/models/openresponsesinputfile.d.ts +63 -0
- package/esm/models/openresponsesinputfile.js +70 -0
- package/esm/models/openresponsesinputimage.d.ts +79 -0
- package/esm/models/openresponsesinputimage.js +90 -0
- package/esm/models/openresponsesinputitem.d.ts +39 -0
- package/esm/models/openresponsesinputitem.js +62 -0
- package/esm/models/openresponsesinputmessageitem.d.ts +149 -0
- package/esm/models/openresponsesinputmessageitem.js +147 -0
- package/esm/models/openresponsesinputtext.d.ts +57 -0
- package/esm/models/openresponsesinputtext.js +51 -0
- package/esm/models/openresponseslogprobs.d.ts +66 -0
- package/esm/models/openresponseslogprobs.js +71 -0
- package/esm/models/openresponsesnonstreamingresponse.d.ts +260 -0
- package/esm/models/openresponsesnonstreamingresponse.js +290 -0
- package/esm/models/openresponsesoutputtext.d.ts +80 -0
- package/esm/models/openresponsesoutputtext.js +93 -0
- package/esm/models/openresponsesprompt.d.ts +39 -0
- package/esm/models/openresponsesprompt.js +34 -0
- package/esm/models/openresponsesreasoning.d.ts +90 -0
- package/esm/models/openresponsesreasoning.js +101 -0
- package/esm/models/openresponsesreasoningconfig.d.ts +61 -0
- package/esm/models/openresponsesreasoningconfig.js +78 -0
- package/esm/models/openresponsesrefusalcontent.d.ts +54 -0
- package/esm/models/openresponsesrefusalcontent.js +51 -0
- package/esm/models/openresponsesrequest.d.ts +28 -0
- package/esm/models/openresponsesrequest.js +27 -0
- package/esm/models/openresponsesstreamevent.d.ts +1683 -0
- package/esm/models/openresponsesstreamevent.js +1944 -0
- package/esm/models/openresponsestextconfig.d.ts +59 -0
- package/esm/models/openresponsestextconfig.js +63 -0
- package/esm/models/openresponsestoolchoice.d.ts +148 -0
- package/esm/models/openresponsestoolchoice.js +139 -0
- package/esm/models/openresponsestoolunion.d.ts +95 -0
- package/esm/models/openresponsestoolunion.js +94 -0
- package/esm/models/openresponseswebsearch20250826tool.d.ts +94 -0
- package/esm/models/openresponseswebsearch20250826tool.js +103 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +64 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.js +68 -0
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +64 -0
- package/esm/models/openresponseswebsearchpreviewtool.js +68 -0
- package/esm/models/openresponseswebsearchtool.d.ts +94 -0
- package/esm/models/openresponseswebsearchtool.js +103 -0
- package/esm/models/operations/createapialpharesponses.d.ts +58 -0
- package/esm/models/operations/createapialpharesponses.js +83 -0
- package/esm/models/operations/createcoinbasecharge.d.ts +212 -0
- package/esm/models/operations/createcoinbasecharge.js +267 -0
- package/esm/models/operations/createkeys.d.ts +226 -0
- package/esm/models/operations/createkeys.js +195 -0
- package/esm/models/operations/deletekeys.d.ts +63 -0
- package/esm/models/operations/deletekeys.js +56 -0
- package/esm/models/operations/getcredits.d.ts +28 -0
- package/esm/models/operations/getcredits.js +27 -0
- package/esm/models/operations/getcurrentkey.d.ts +186 -0
- package/esm/models/operations/getcurrentkey.js +148 -0
- package/esm/models/operations/getgeneration.d.ts +272 -0
- package/esm/models/operations/getgeneration.js +230 -0
- package/esm/models/operations/getkey.d.ts +179 -0
- package/esm/models/operations/getkey.js +148 -0
- package/esm/models/operations/getmodels.d.ts +57 -0
- package/esm/models/operations/getmodels.js +80 -0
- package/esm/models/operations/getparameters.d.ts +250 -0
- package/esm/models/operations/getparameters.js +260 -0
- package/esm/models/operations/getuseractivity.d.ts +64 -0
- package/esm/models/operations/getuseractivity.js +57 -0
- package/esm/models/operations/index.d.ts +20 -0
- package/esm/models/operations/index.js +23 -0
- package/esm/models/operations/list.d.ts +181 -0
- package/esm/models/operations/list.js +159 -0
- package/esm/models/operations/listendpoints.d.ts +63 -0
- package/esm/models/operations/listendpoints.js +59 -0
- package/esm/models/operations/listendpointszdr.d.ts +54 -0
- package/esm/models/operations/listendpointszdr.js +59 -0
- package/esm/models/operations/listmodelscount.d.ts +26 -0
- package/esm/models/operations/listmodelscount.js +34 -0
- package/esm/models/operations/listmodelsuser.d.ts +51 -0
- package/esm/models/operations/listmodelsuser.js +59 -0
- package/esm/models/operations/listproviders.d.ts +116 -0
- package/esm/models/operations/listproviders.js +105 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +27 -0
- package/esm/models/operations/sendchatcompletionrequest.js +41 -0
- package/esm/models/operations/updatekeys.d.ts +256 -0
- package/esm/models/operations/updatekeys.js +230 -0
- package/esm/models/outputtextcontent.d.ts +80 -0
- package/esm/models/outputtextcontent.js +93 -0
- package/esm/models/publicendpoint.d.ts +28 -0
- package/esm/models/publicendpoint.js +27 -0
- package/esm/models/reasoningsummarytext.d.ts +54 -0
- package/esm/models/reasoningsummarytext.js +51 -0
- package/esm/models/reasoningsummaryverbosity.d.ts +23 -0
- package/esm/models/reasoningsummaryverbosity.js +33 -0
- package/esm/models/reasoningtextcontent.d.ts +54 -0
- package/esm/models/reasoningtextcontent.js +51 -0
- package/esm/models/refusalcontent.d.ts +54 -0
- package/esm/models/refusalcontent.js +51 -0
- package/esm/models/responseformatjsonschema.d.ts +32 -0
- package/esm/models/responseformatjsonschema.js +43 -0
- package/esm/models/responseformattextgrammar.d.ts +31 -0
- package/esm/models/responseformattextgrammar.js +33 -0
- package/esm/models/responseserrorfield.d.ts +55 -0
- package/esm/models/responseserrorfield.js +61 -0
- package/esm/models/responsesimagegenerationcall.d.ts +59 -0
- package/esm/models/responsesimagegenerationcall.js +56 -0
- package/esm/models/responsesoutputitem.d.ts +34 -0
- package/esm/models/responsesoutputitem.js +47 -0
- package/esm/models/responsesoutputitemfilesearchcall.d.ts +59 -0
- package/esm/models/responsesoutputitemfilesearchcall.js +56 -0
- package/esm/models/responsesoutputitemfunctioncall.d.ts +60 -0
- package/esm/models/responsesoutputitemfunctioncall.js +66 -0
- package/esm/models/responsesoutputitemreasoning.d.ts +62 -0
- package/esm/models/responsesoutputitemreasoning.js +68 -0
- package/esm/models/responsesoutputmessage.d.ts +192 -0
- package/esm/models/responsesoutputmessage.js +190 -0
- package/esm/models/responsessearchcontextsize.d.ts +29 -0
- package/esm/models/responsessearchcontextsize.js +36 -0
- package/esm/models/responsesusage.d.ts +131 -0
- package/esm/models/responsesusage.js +174 -0
- package/esm/models/responseswebsearchcalloutput.d.ts +57 -0
- package/esm/models/responseswebsearchcalloutput.js +54 -0
- package/esm/models/responseswebsearchuserlocation.d.ts +63 -0
- package/esm/models/responseswebsearchuserlocation.js +57 -0
- package/esm/models/security.d.ts +29 -0
- package/esm/models/security.js +32 -0
- package/esm/models/systemmessage.d.ts +55 -0
- package/esm/models/systemmessage.js +64 -0
- package/esm/models/tool.d.ts +66 -0
- package/esm/models/tool.js +65 -0
- package/esm/models/toolcallstatus.d.ts +23 -0
- package/esm/models/toolcallstatus.js +33 -0
- package/esm/models/toolchoicetypes.d.ts +164 -0
- package/esm/models/toolchoicetypes.js +167 -0
- package/esm/models/toolresponsemessage.d.ts +55 -0
- package/esm/models/toolresponsemessage.js +69 -0
- package/esm/models/urlcitationannotation.d.ts +60 -0
- package/esm/models/urlcitationannotation.js +68 -0
- package/esm/models/usermessage.d.ts +55 -0
- package/esm/models/usermessage.js +64 -0
- package/esm/models/websearchpreviewtooluserlocation.d.ts +60 -0
- package/esm/models/websearchpreviewtooluserlocation.js +57 -0
- package/esm/models/websearchstatus.d.ts +24 -0
- package/esm/models/websearchstatus.js +34 -0
- package/esm/react-query/_context.d.ts +8 -0
- package/esm/react-query/_context.js +14 -0
- package/esm/react-query/_types.d.ts +27 -0
- package/esm/react-query/_types.js +5 -0
- package/esm/react-query/analyticsGetUserActivity.d.ts +36 -0
- package/esm/react-query/analyticsGetUserActivity.js +77 -0
- package/esm/react-query/apiKeysCreate.d.ts +20 -0
- package/esm/react-query/apiKeysCreate.js +39 -0
- package/esm/react-query/apiKeysDelete.d.ts +20 -0
- package/esm/react-query/apiKeysDelete.js +39 -0
- package/esm/react-query/apiKeysGet.d.ts +24 -0
- package/esm/react-query/apiKeysGet.js +66 -0
- package/esm/react-query/apiKeysGetCurrentKeyMetadata.d.ts +29 -0
- package/esm/react-query/apiKeysGetCurrentKeyMetadata.js +66 -0
- package/esm/react-query/apiKeysList.d.ts +37 -0
- package/esm/react-query/apiKeysList.js +69 -0
- package/esm/react-query/apiKeysUpdate.d.ts +20 -0
- package/esm/react-query/apiKeysUpdate.js +39 -0
- package/esm/react-query/betaResponsesSend.d.ts +24 -0
- package/esm/react-query/betaResponsesSend.js +42 -0
- package/esm/react-query/chatSend.d.ts +24 -0
- package/esm/react-query/chatSend.js +42 -0
- package/esm/react-query/completionsGenerate.d.ts +23 -0
- package/esm/react-query/completionsGenerate.js +42 -0
- package/esm/react-query/creditsCreateCoinbaseCharge.d.ts +25 -0
- package/esm/react-query/creditsCreateCoinbaseCharge.js +42 -0
- package/esm/react-query/creditsGetCredits.d.ts +29 -0
- package/esm/react-query/creditsGetCredits.js +66 -0
- package/esm/react-query/endpointsList.d.ts +24 -0
- package/esm/react-query/endpointsList.js +66 -0
- package/esm/react-query/endpointsListZdrEndpoints.d.ts +23 -0
- package/esm/react-query/endpointsListZdrEndpoints.js +60 -0
- package/esm/react-query/generationsGetGeneration.d.ts +30 -0
- package/esm/react-query/generationsGetGeneration.js +71 -0
- package/esm/react-query/index.d.ts +23 -0
- package/esm/react-query/index.js +26 -0
- package/esm/react-query/modelsCount.d.ts +23 -0
- package/esm/react-query/modelsCount.js +60 -0
- package/esm/react-query/modelsList.d.ts +43 -0
- package/esm/react-query/modelsList.js +71 -0
- package/esm/react-query/modelsListForUser.d.ts +23 -0
- package/esm/react-query/modelsListForUser.js +60 -0
- package/esm/react-query/parametersGetParameters.d.ts +38 -0
- package/esm/react-query/parametersGetParameters.js +80 -0
- package/esm/react-query/providersList.d.ts +23 -0
- package/esm/react-query/providersList.js +60 -0
- package/esm/sdk/analytics.d.ts +12 -0
- package/esm/sdk/analytics.js +18 -0
- package/esm/sdk/apikeys.d.ts +32 -0
- package/esm/sdk/apikeys.js +53 -0
- package/esm/sdk/beta.d.ts +7 -0
- package/esm/sdk/beta.js +11 -0
- package/esm/sdk/chat.d.ts +13 -0
- package/esm/sdk/chat.js +18 -0
- package/esm/sdk/completions.d.ts +12 -0
- package/esm/sdk/completions.js +18 -0
- package/esm/sdk/credits.d.ts +20 -0
- package/esm/sdk/credits.js +28 -0
- package/esm/sdk/endpoints.d.ts +13 -0
- package/esm/sdk/endpoints.js +22 -0
- package/esm/sdk/generations.d.ts +9 -0
- package/esm/sdk/generations.js +15 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/models.d.ts +17 -0
- package/esm/sdk/models.js +29 -0
- package/esm/sdk/parameters.d.ts +9 -0
- package/esm/sdk/parameters.js +15 -0
- package/esm/sdk/providers.d.ts +9 -0
- package/esm/sdk/providers.js +15 -0
- package/esm/sdk/responses.d.ts +13 -0
- package/esm/sdk/responses.js +18 -0
- package/esm/sdk/sdk.d.ts +37 -0
- package/esm/sdk/sdk.js +51 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.js +40 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/constdatetime.d.ts +3 -0
- package/esm/types/constdatetime.js +10 -0
- package/esm/types/enums.d.ts +12 -0
- package/esm/types/enums.js +7 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/index.d.ts +8 -0
- package/esm/types/index.js +8 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.js +42 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.js +15 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/tsconfig.json +3 -3
- package/core.d.ts +0 -9
- package/core.js +0 -12
- package/funcs/analyticsGetUserActivity.d.ts +0 -17
- package/funcs/analyticsGetUserActivity.js +0 -84
- package/funcs/apiKeysCreate.d.ts +0 -14
- package/funcs/apiKeysCreate.js +0 -78
- package/funcs/apiKeysDelete.d.ts +0 -14
- package/funcs/apiKeysDelete.js +0 -83
- package/funcs/apiKeysGet.d.ts +0 -14
- package/funcs/apiKeysGet.js +0 -83
- package/funcs/apiKeysGetCurrentKeyMetadata.d.ts +0 -17
- package/funcs/apiKeysGetCurrentKeyMetadata.js +0 -71
- package/funcs/apiKeysList.d.ts +0 -14
- package/funcs/apiKeysList.js +0 -82
- package/funcs/apiKeysUpdate.d.ts +0 -14
- package/funcs/apiKeysUpdate.js +0 -84
- package/funcs/betaResponsesSend.d.ts +0 -17
- package/funcs/betaResponsesSend.js +0 -68
- package/funcs/chatSend.d.ts +0 -18
- package/funcs/chatSend.js +0 -82
- package/funcs/completionsGenerate.d.ts +0 -17
- package/funcs/completionsGenerate.js +0 -81
- package/funcs/creditsCreateCoinbaseCharge.d.ts +0 -18
- package/funcs/creditsCreateCoinbaseCharge.js +0 -76
- package/funcs/creditsGetCredits.d.ts +0 -17
- package/funcs/creditsGetCredits.js +0 -71
- package/funcs/endpointsList.d.ts +0 -14
- package/funcs/endpointsList.js +0 -87
- package/funcs/endpointsListZdrEndpoints.d.ts +0 -13
- package/funcs/endpointsListZdrEndpoints.js +0 -64
- package/funcs/generationsGetGeneration.d.ts +0 -14
- package/funcs/generationsGetGeneration.js +0 -81
- package/funcs/modelsCount.d.ts +0 -13
- package/funcs/modelsCount.js +0 -64
- package/funcs/modelsList.d.ts +0 -13
- package/funcs/modelsList.js +0 -82
- package/funcs/modelsListForUser.d.ts +0 -13
- package/funcs/modelsListForUser.js +0 -68
- package/funcs/oAuthCreateAuthorizationUrl.d.ts +0 -42
- package/funcs/oAuthCreateAuthorizationUrl.js +0 -43
- package/funcs/oAuthCreateSHA256CodeChallenge.d.ts +0 -34
- package/funcs/oAuthCreateSHA256CodeChallenge.js +0 -68
- package/funcs/parametersGetParameters.d.ts +0 -14
- package/funcs/parametersGetParameters.js +0 -95
- package/funcs/providersList.d.ts +0 -14
- package/funcs/providersList.js +0 -68
- package/hooks/hooks.d.ts +0 -24
- package/hooks/hooks.js +0 -81
- package/hooks/index.d.ts +0 -2
- package/hooks/index.js +0 -5
- package/hooks/registration.d.ts +0 -2
- package/hooks/registration.js +0 -11
- package/hooks/types.d.ts +0 -75
- package/hooks/types.js +0 -4
- package/index.d.ts +0 -5
- package/index.js +0 -7
- package/lib/base64.d.ts +0 -9
- package/lib/base64.js +0 -28
- package/lib/config.d.ts +0 -43
- package/lib/config.js +0 -31
- package/lib/dlv.d.ts +0 -13
- package/lib/dlv.js +0 -45
- package/lib/encodings.d.ts +0 -51
- package/lib/encodings.js +0 -353
- package/lib/env.d.ts +0 -14
- package/lib/env.js +0 -43
- package/lib/event-streams.d.ts +0 -10
- package/lib/event-streams.js +0 -124
- package/lib/files.d.ts +0 -12
- package/lib/files.js +0 -72
- package/lib/http.d.ts +0 -66
- package/lib/http.js +0 -206
- package/lib/is-plain-object.d.ts +0 -1
- package/lib/is-plain-object.js +0 -37
- package/lib/logger.d.ts +0 -5
- package/lib/logger.js +0 -4
- package/lib/matchers.d.ts +0 -58
- package/lib/matchers.js +0 -202
- package/lib/primitives.d.ts +0 -25
- package/lib/primitives.js +0 -102
- package/lib/retries.d.ts +0 -37
- package/lib/retries.js +0 -146
- package/lib/schemas.d.ts +0 -20
- package/lib/schemas.js +0 -56
- package/lib/sdks.d.ts +0 -62
- package/lib/sdks.js +0 -268
- package/lib/security.d.ts +0 -82
- package/lib/security.js +0 -136
- package/lib/url.d.ts +0 -4
- package/lib/url.js +0 -21
- package/models/activityitem.d.ts +0 -81
- package/models/activityitem.js +0 -72
- package/models/assistantmessage.d.ts +0 -61
- package/models/assistantmessage.js +0 -72
- package/models/chatcompletionfinishreason.d.ts +0 -24
- package/models/chatcompletionfinishreason.js +0 -34
- package/models/chaterror.d.ts +0 -55
- package/models/chaterror.js +0 -63
- package/models/chatgenerationparams.d.ts +0 -248
- package/models/chatgenerationparams.js +0 -300
- package/models/chatgenerationtokenusage.d.ts +0 -94
- package/models/chatgenerationtokenusage.js +0 -141
- package/models/chatmessagecontentitem.d.ts +0 -39
- package/models/chatmessagecontentitem.js +0 -45
- package/models/chatmessagecontentitemaudio.d.ts +0 -82
- package/models/chatmessagecontentitemaudio.js +0 -101
- package/models/chatmessagecontentitemimage.d.ts +0 -78
- package/models/chatmessagecontentitemimage.js +0 -97
- package/models/chatmessagecontentitemtext.d.ts +0 -30
- package/models/chatmessagecontentitemtext.js +0 -32
- package/models/chatmessagetokenlogprob.d.ts +0 -63
- package/models/chatmessagetokenlogprob.js +0 -74
- package/models/chatmessagetokenlogprobs.d.ts +0 -31
- package/models/chatmessagetokenlogprobs.js +0 -33
- package/models/chatmessagetoolcall.d.ts +0 -59
- package/models/chatmessagetoolcall.js +0 -61
- package/models/chatresponse.d.ts +0 -42
- package/models/chatresponse.js +0 -54
- package/models/chatresponsechoice.d.ts +0 -37
- package/models/chatresponsechoice.js +0 -48
- package/models/chatstreamingchoice.d.ts +0 -37
- package/models/chatstreamingchoice.js +0 -48
- package/models/chatstreamingmessagechunk.d.ts +0 -60
- package/models/chatstreamingmessagechunk.js +0 -66
- package/models/chatstreamingmessagetoolcall.d.ts +0 -61
- package/models/chatstreamingmessagetoolcall.js +0 -65
- package/models/chatstreamingresponsechunk.d.ts +0 -96
- package/models/chatstreamingresponsechunk.js +0 -119
- package/models/chatstreamoptions.d.ts +0 -28
- package/models/chatstreamoptions.js +0 -39
- package/models/completionchoice.d.ts +0 -56
- package/models/completionchoice.js +0 -74
- package/models/completioncreateparams.d.ts +0 -239
- package/models/completioncreateparams.js +0 -312
- package/models/completionlogprobs.d.ts +0 -38
- package/models/completionlogprobs.js +0 -49
- package/models/completionresponse.d.ts +0 -42
- package/models/completionresponse.js +0 -53
- package/models/completionusage.d.ts +0 -32
- package/models/completionusage.js +0 -47
- package/models/createchargerequest.d.ts +0 -27
- package/models/createchargerequest.js +0 -26
- package/models/errorresponse.d.ts +0 -154
- package/models/errorresponse.js +0 -166
- package/models/errors/chaterror.d.ts +0 -36
- package/models/errors/chaterror.js +0 -47
- package/models/errors/errorresponse.d.ts +0 -45
- package/models/errors/errorresponse.js +0 -63
- package/models/errors/httpclienterrors.d.ts +0 -43
- package/models/errors/httpclienterrors.js +0 -68
- package/models/errors/index.d.ts +0 -8
- package/models/errors/index.js +0 -11
- package/models/errors/listproviders.d.ts +0 -48
- package/models/errors/listproviders.js +0 -50
- package/models/errors/openrouterdefaulterror.d.ts +0 -9
- package/models/errors/openrouterdefaulterror.js +0 -29
- package/models/errors/openroutererror.d.ts +0 -18
- package/models/errors/openroutererror.js +0 -15
- package/models/errors/responsevalidationerror.d.ts +0 -25
- package/models/errors/responsevalidationerror.js +0 -28
- package/models/errors/sdkvalidationerror.d.ts +0 -20
- package/models/errors/sdkvalidationerror.js +0 -43
- package/models/filecitationannotation.d.ts +0 -57
- package/models/filecitationannotation.js +0 -63
- package/models/filepathannotation.d.ts +0 -55
- package/models/filepathannotation.js +0 -61
- package/models/imagegenerationstatus.d.ts +0 -23
- package/models/imagegenerationstatus.js +0 -33
- package/models/index.d.ts +0 -95
- package/models/index.js +0 -98
- package/models/jsonschemaconfig.d.ts +0 -38
- package/models/jsonschemaconfig.js +0 -36
- package/models/listendpointsresponse.d.ts +0 -27
- package/models/listendpointsresponse.js +0 -26
- package/models/message.d.ts +0 -79
- package/models/message.js +0 -100
- package/models/modelscountresponse.d.ts +0 -27
- package/models/modelscountresponse.js +0 -26
- package/models/modelslistresponse.d.ts +0 -27
- package/models/modelslistresponse.js +0 -26
- package/models/namedtoolchoice.d.ts +0 -55
- package/models/namedtoolchoice.js +0 -57
- package/models/openresponseseasyinputmessage.d.ts +0 -189
- package/models/openresponseseasyinputmessage.js +0 -193
- package/models/openresponsesformatjsonobject.d.ts +0 -54
- package/models/openresponsesformatjsonobject.js +0 -48
- package/models/openresponsesformatjsonschema.d.ts +0 -66
- package/models/openresponsesformatjsonschema.js +0 -56
- package/models/openresponsesformattext.d.ts +0 -54
- package/models/openresponsesformattext.js +0 -48
- package/models/openresponsesformattextconfig.d.ts +0 -30
- package/models/openresponsesformattextconfig.js +0 -37
- package/models/openresponsesfunctioncalloutput.d.ts +0 -63
- package/models/openresponsesfunctioncalloutput.js +0 -66
- package/models/openresponsesfunctiontoolcall.d.ts +0 -65
- package/models/openresponsesfunctiontoolcall.js +0 -68
- package/models/openresponsesinput.d.ts +0 -28
- package/models/openresponsesinput.js +0 -35
- package/models/openresponsesinputcontent.d.ts +0 -42
- package/models/openresponsesinputcontent.js +0 -49
- package/models/openresponsesinputfile.d.ts +0 -62
- package/models/openresponsesinputfile.js +0 -69
- package/models/openresponsesinputimage.d.ts +0 -78
- package/models/openresponsesinputimage.js +0 -89
- package/models/openresponsesinputitem.d.ts +0 -38
- package/models/openresponsesinputitem.js +0 -61
- package/models/openresponsesinputmessageitem.d.ts +0 -148
- package/models/openresponsesinputmessageitem.js +0 -146
- package/models/openresponsesinputtext.d.ts +0 -56
- package/models/openresponsesinputtext.js +0 -50
- package/models/openresponseslogprobs.d.ts +0 -65
- package/models/openresponseslogprobs.js +0 -70
- package/models/openresponsesnonstreamingresponse.d.ts +0 -259
- package/models/openresponsesnonstreamingresponse.js +0 -289
- package/models/openresponsesoutputtext.d.ts +0 -79
- package/models/openresponsesoutputtext.js +0 -92
- package/models/openresponsesprompt.d.ts +0 -38
- package/models/openresponsesprompt.js +0 -33
- package/models/openresponsesreasoning.d.ts +0 -89
- package/models/openresponsesreasoning.js +0 -100
- package/models/openresponsesreasoningconfig.d.ts +0 -60
- package/models/openresponsesreasoningconfig.js +0 -77
- package/models/openresponsesrefusalcontent.d.ts +0 -53
- package/models/openresponsesrefusalcontent.js +0 -50
- package/models/openresponsesrequest.d.ts +0 -27
- package/models/openresponsesrequest.js +0 -26
- package/models/openresponsesstreamevent.d.ts +0 -1682
- package/models/openresponsesstreamevent.js +0 -1943
- package/models/openresponsestextconfig.d.ts +0 -58
- package/models/openresponsestextconfig.js +0 -62
- package/models/openresponsestoolchoice.d.ts +0 -147
- package/models/openresponsestoolchoice.js +0 -138
- package/models/openresponsestoolunion.d.ts +0 -94
- package/models/openresponsestoolunion.js +0 -93
- package/models/openresponseswebsearch20250826tool.d.ts +0 -93
- package/models/openresponseswebsearch20250826tool.js +0 -102
- package/models/openresponseswebsearchpreview20250311tool.d.ts +0 -63
- package/models/openresponseswebsearchpreview20250311tool.js +0 -67
- package/models/openresponseswebsearchpreviewtool.d.ts +0 -63
- package/models/openresponseswebsearchpreviewtool.js +0 -67
- package/models/openresponseswebsearchtool.d.ts +0 -93
- package/models/openresponseswebsearchtool.js +0 -102
- package/models/operations/createapialpharesponses.d.ts +0 -57
- package/models/operations/createapialpharesponses.js +0 -82
- package/models/operations/createcoinbasecharge.d.ts +0 -211
- package/models/operations/createcoinbasecharge.js +0 -266
- package/models/operations/createkeys.d.ts +0 -225
- package/models/operations/createkeys.js +0 -194
- package/models/operations/deletekeys.d.ts +0 -62
- package/models/operations/deletekeys.js +0 -55
- package/models/operations/getcredits.d.ts +0 -27
- package/models/operations/getcredits.js +0 -26
- package/models/operations/getcurrentkey.d.ts +0 -185
- package/models/operations/getcurrentkey.js +0 -147
- package/models/operations/getgeneration.d.ts +0 -271
- package/models/operations/getgeneration.js +0 -229
- package/models/operations/getkey.d.ts +0 -178
- package/models/operations/getkey.js +0 -147
- package/models/operations/getmodels.d.ts +0 -56
- package/models/operations/getmodels.js +0 -79
- package/models/operations/getparameters.d.ts +0 -249
- package/models/operations/getparameters.js +0 -259
- package/models/operations/getuseractivity.d.ts +0 -63
- package/models/operations/getuseractivity.js +0 -56
- package/models/operations/index.d.ts +0 -19
- package/models/operations/index.js +0 -22
- package/models/operations/list.d.ts +0 -180
- package/models/operations/list.js +0 -158
- package/models/operations/listendpoints.d.ts +0 -62
- package/models/operations/listendpoints.js +0 -58
- package/models/operations/listendpointszdr.d.ts +0 -53
- package/models/operations/listendpointszdr.js +0 -58
- package/models/operations/listmodelscount.d.ts +0 -25
- package/models/operations/listmodelscount.js +0 -33
- package/models/operations/listmodelsuser.d.ts +0 -50
- package/models/operations/listmodelsuser.js +0 -58
- package/models/operations/listproviders.d.ts +0 -115
- package/models/operations/listproviders.js +0 -104
- package/models/operations/sendchatcompletionrequest.d.ts +0 -26
- package/models/operations/sendchatcompletionrequest.js +0 -40
- package/models/operations/updatekeys.d.ts +0 -255
- package/models/operations/updatekeys.js +0 -229
- package/models/outputtextcontent.d.ts +0 -79
- package/models/outputtextcontent.js +0 -92
- package/models/publicendpoint.d.ts +0 -27
- package/models/publicendpoint.js +0 -26
- package/models/reasoningsummarytext.d.ts +0 -53
- package/models/reasoningsummarytext.js +0 -50
- package/models/reasoningsummaryverbosity.d.ts +0 -22
- package/models/reasoningsummaryverbosity.js +0 -32
- package/models/reasoningtextcontent.d.ts +0 -53
- package/models/reasoningtextcontent.js +0 -50
- package/models/refusalcontent.d.ts +0 -53
- package/models/refusalcontent.js +0 -50
- package/models/responseformatjsonschema.d.ts +0 -31
- package/models/responseformatjsonschema.js +0 -42
- package/models/responseformattextgrammar.d.ts +0 -30
- package/models/responseformattextgrammar.js +0 -32
- package/models/responseserrorfield.d.ts +0 -54
- package/models/responseserrorfield.js +0 -60
- package/models/responsesimagegenerationcall.d.ts +0 -58
- package/models/responsesimagegenerationcall.js +0 -55
- package/models/responsesoutputitem.d.ts +0 -33
- package/models/responsesoutputitem.js +0 -46
- package/models/responsesoutputitemfilesearchcall.d.ts +0 -58
- package/models/responsesoutputitemfilesearchcall.js +0 -55
- package/models/responsesoutputitemfunctioncall.d.ts +0 -59
- package/models/responsesoutputitemfunctioncall.js +0 -65
- package/models/responsesoutputitemreasoning.d.ts +0 -61
- package/models/responsesoutputitemreasoning.js +0 -67
- package/models/responsesoutputmessage.d.ts +0 -191
- package/models/responsesoutputmessage.js +0 -189
- package/models/responsessearchcontextsize.d.ts +0 -28
- package/models/responsessearchcontextsize.js +0 -35
- package/models/responsesusage.d.ts +0 -130
- package/models/responsesusage.js +0 -173
- package/models/responseswebsearchcalloutput.d.ts +0 -56
- package/models/responseswebsearchcalloutput.js +0 -53
- package/models/responseswebsearchuserlocation.d.ts +0 -62
- package/models/responseswebsearchuserlocation.js +0 -56
- package/models/security.d.ts +0 -28
- package/models/security.js +0 -31
- package/models/systemmessage.d.ts +0 -54
- package/models/systemmessage.js +0 -63
- package/models/tool.d.ts +0 -65
- package/models/tool.js +0 -64
- package/models/toolcallstatus.d.ts +0 -22
- package/models/toolcallstatus.js +0 -32
- package/models/toolchoicetypes.d.ts +0 -163
- package/models/toolchoicetypes.js +0 -166
- package/models/toolresponsemessage.d.ts +0 -54
- package/models/toolresponsemessage.js +0 -68
- package/models/urlcitationannotation.d.ts +0 -59
- package/models/urlcitationannotation.js +0 -67
- package/models/usermessage.d.ts +0 -54
- package/models/usermessage.js +0 -63
- package/models/websearchpreviewtooluserlocation.d.ts +0 -59
- package/models/websearchpreviewtooluserlocation.js +0 -56
- package/models/websearchstatus.d.ts +0 -23
- package/models/websearchstatus.js +0 -33
- package/react-query/_context.d.ts +0 -7
- package/react-query/_context.js +0 -13
- package/react-query/_types.d.ts +0 -26
- package/react-query/_types.js +0 -4
- package/react-query/analyticsGetUserActivity.d.ts +0 -35
- package/react-query/analyticsGetUserActivity.js +0 -76
- package/react-query/apiKeysCreate.d.ts +0 -19
- package/react-query/apiKeysCreate.js +0 -38
- package/react-query/apiKeysDelete.d.ts +0 -19
- package/react-query/apiKeysDelete.js +0 -38
- package/react-query/apiKeysGet.d.ts +0 -23
- package/react-query/apiKeysGet.js +0 -65
- package/react-query/apiKeysGetCurrentKeyMetadata.d.ts +0 -28
- package/react-query/apiKeysGetCurrentKeyMetadata.js +0 -65
- package/react-query/apiKeysList.d.ts +0 -36
- package/react-query/apiKeysList.js +0 -68
- package/react-query/apiKeysUpdate.d.ts +0 -19
- package/react-query/apiKeysUpdate.js +0 -38
- package/react-query/betaResponsesSend.d.ts +0 -23
- package/react-query/betaResponsesSend.js +0 -41
- package/react-query/chatSend.d.ts +0 -23
- package/react-query/chatSend.js +0 -41
- package/react-query/completionsGenerate.d.ts +0 -22
- package/react-query/completionsGenerate.js +0 -41
- package/react-query/creditsCreateCoinbaseCharge.d.ts +0 -24
- package/react-query/creditsCreateCoinbaseCharge.js +0 -41
- package/react-query/creditsGetCredits.d.ts +0 -28
- package/react-query/creditsGetCredits.js +0 -65
- package/react-query/endpointsList.d.ts +0 -23
- package/react-query/endpointsList.js +0 -65
- package/react-query/endpointsListZdrEndpoints.d.ts +0 -22
- package/react-query/endpointsListZdrEndpoints.js +0 -59
- package/react-query/generationsGetGeneration.d.ts +0 -29
- package/react-query/generationsGetGeneration.js +0 -70
- package/react-query/index.d.ts +0 -22
- package/react-query/index.js +0 -25
- package/react-query/modelsCount.d.ts +0 -22
- package/react-query/modelsCount.js +0 -59
- package/react-query/modelsList.d.ts +0 -42
- package/react-query/modelsList.js +0 -70
- package/react-query/modelsListForUser.d.ts +0 -22
- package/react-query/modelsListForUser.js +0 -59
- package/react-query/parametersGetParameters.d.ts +0 -37
- package/react-query/parametersGetParameters.js +0 -79
- package/react-query/providersList.d.ts +0 -22
- package/react-query/providersList.js +0 -59
- package/sdk/analytics.d.ts +0 -11
- package/sdk/analytics.js +0 -17
- package/sdk/apikeys.d.ts +0 -31
- package/sdk/apikeys.js +0 -52
- package/sdk/beta.d.ts +0 -6
- package/sdk/beta.js +0 -10
- package/sdk/chat.d.ts +0 -12
- package/sdk/chat.js +0 -17
- package/sdk/completions.d.ts +0 -11
- package/sdk/completions.js +0 -17
- package/sdk/credits.d.ts +0 -19
- package/sdk/credits.js +0 -27
- package/sdk/endpoints.d.ts +0 -12
- package/sdk/endpoints.js +0 -21
- package/sdk/generations.d.ts +0 -8
- package/sdk/generations.js +0 -14
- package/sdk/index.d.ts +0 -1
- package/sdk/index.js +0 -4
- package/sdk/models.d.ts +0 -16
- package/sdk/models.js +0 -28
- package/sdk/parameters.d.ts +0 -8
- package/sdk/parameters.js +0 -14
- package/sdk/providers.d.ts +0 -8
- package/sdk/providers.js +0 -14
- package/sdk/responses.d.ts +0 -12
- package/sdk/responses.js +0 -17
- package/sdk/sdk.d.ts +0 -36
- package/sdk/sdk.js +0 -50
- package/types/async.d.ts +0 -22
- package/types/async.js +0 -39
- package/types/blobs.d.ts +0 -3
- package/types/blobs.js +0 -24
- package/types/constdatetime.d.ts +0 -2
- package/types/constdatetime.js +0 -9
- package/types/enums.d.ts +0 -11
- package/types/enums.js +0 -6
- package/types/fp.d.ts +0 -30
- package/types/fp.js +0 -30
- package/types/index.d.ts +0 -7
- package/types/index.js +0 -7
- package/types/operations.d.ts +0 -26
- package/types/operations.js +0 -76
- package/types/rfcdate.d.ts +0 -20
- package/types/rfcdate.js +0 -41
- package/types/streams.d.ts +0 -1
- package/types/streams.js +0 -14
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
export type GetGenerationRequest = {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Type of API used for the generation
|
|
10
|
+
*/
|
|
11
|
+
export declare const ApiType: {
|
|
12
|
+
readonly Completions: "completions";
|
|
13
|
+
readonly Embeddings: "embeddings";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Type of API used for the generation
|
|
17
|
+
*/
|
|
18
|
+
export type ApiType = OpenEnum<typeof ApiType>;
|
|
19
|
+
/**
|
|
20
|
+
* Generation data
|
|
21
|
+
*/
|
|
22
|
+
export type GetGenerationData = {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier for the generation
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
/**
|
|
28
|
+
* Upstream provider's identifier for this generation
|
|
29
|
+
*/
|
|
30
|
+
upstreamId: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Total cost of the generation in USD
|
|
33
|
+
*/
|
|
34
|
+
totalCost: number;
|
|
35
|
+
/**
|
|
36
|
+
* Discount applied due to caching
|
|
37
|
+
*/
|
|
38
|
+
cacheDiscount: number | null;
|
|
39
|
+
/**
|
|
40
|
+
* Cost charged by the upstream provider
|
|
41
|
+
*/
|
|
42
|
+
upstreamInferenceCost: number | null;
|
|
43
|
+
/**
|
|
44
|
+
* ISO 8601 timestamp of when the generation was created
|
|
45
|
+
*/
|
|
46
|
+
createdAt: string;
|
|
47
|
+
/**
|
|
48
|
+
* Model used for the generation
|
|
49
|
+
*/
|
|
50
|
+
model: string;
|
|
51
|
+
/**
|
|
52
|
+
* ID of the app that made the request
|
|
53
|
+
*/
|
|
54
|
+
appId: number | null;
|
|
55
|
+
/**
|
|
56
|
+
* Whether the response was streamed
|
|
57
|
+
*/
|
|
58
|
+
streamed: boolean | null;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the generation was cancelled
|
|
61
|
+
*/
|
|
62
|
+
cancelled: boolean | null;
|
|
63
|
+
/**
|
|
64
|
+
* Name of the provider that served the request
|
|
65
|
+
*/
|
|
66
|
+
providerName: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* Total latency in milliseconds
|
|
69
|
+
*/
|
|
70
|
+
latency: number | null;
|
|
71
|
+
/**
|
|
72
|
+
* Moderation latency in milliseconds
|
|
73
|
+
*/
|
|
74
|
+
moderationLatency: number | null;
|
|
75
|
+
/**
|
|
76
|
+
* Time taken for generation in milliseconds
|
|
77
|
+
*/
|
|
78
|
+
generationTime: number | null;
|
|
79
|
+
/**
|
|
80
|
+
* Reason the generation finished
|
|
81
|
+
*/
|
|
82
|
+
finishReason: string | null;
|
|
83
|
+
/**
|
|
84
|
+
* Number of tokens in the prompt
|
|
85
|
+
*/
|
|
86
|
+
tokensPrompt: number | null;
|
|
87
|
+
/**
|
|
88
|
+
* Number of tokens in the completion
|
|
89
|
+
*/
|
|
90
|
+
tokensCompletion: number | null;
|
|
91
|
+
/**
|
|
92
|
+
* Native prompt tokens as reported by provider
|
|
93
|
+
*/
|
|
94
|
+
nativeTokensPrompt: number | null;
|
|
95
|
+
/**
|
|
96
|
+
* Native completion tokens as reported by provider
|
|
97
|
+
*/
|
|
98
|
+
nativeTokensCompletion: number | null;
|
|
99
|
+
/**
|
|
100
|
+
* Native completion image tokens as reported by provider
|
|
101
|
+
*/
|
|
102
|
+
nativeTokensCompletionImages: number | null;
|
|
103
|
+
/**
|
|
104
|
+
* Native reasoning tokens as reported by provider
|
|
105
|
+
*/
|
|
106
|
+
nativeTokensReasoning: number | null;
|
|
107
|
+
/**
|
|
108
|
+
* Native cached tokens as reported by provider
|
|
109
|
+
*/
|
|
110
|
+
nativeTokensCached: number | null;
|
|
111
|
+
/**
|
|
112
|
+
* Number of media items in the prompt
|
|
113
|
+
*/
|
|
114
|
+
numMediaPrompt: number | null;
|
|
115
|
+
/**
|
|
116
|
+
* Number of audio inputs in the prompt
|
|
117
|
+
*/
|
|
118
|
+
numInputAudioPrompt: number | null;
|
|
119
|
+
/**
|
|
120
|
+
* Number of media items in the completion
|
|
121
|
+
*/
|
|
122
|
+
numMediaCompletion: number | null;
|
|
123
|
+
/**
|
|
124
|
+
* Number of search results included
|
|
125
|
+
*/
|
|
126
|
+
numSearchResults: number | null;
|
|
127
|
+
/**
|
|
128
|
+
* Origin URL of the request
|
|
129
|
+
*/
|
|
130
|
+
origin: string;
|
|
131
|
+
/**
|
|
132
|
+
* Usage amount in USD
|
|
133
|
+
*/
|
|
134
|
+
usage: number;
|
|
135
|
+
/**
|
|
136
|
+
* Whether this used bring-your-own-key
|
|
137
|
+
*/
|
|
138
|
+
isByok: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* Native finish reason as reported by provider
|
|
141
|
+
*/
|
|
142
|
+
nativeFinishReason: string | null;
|
|
143
|
+
/**
|
|
144
|
+
* External user identifier
|
|
145
|
+
*/
|
|
146
|
+
externalUser: string | null;
|
|
147
|
+
/**
|
|
148
|
+
* Type of API used for the generation
|
|
149
|
+
*/
|
|
150
|
+
apiType: ApiType | null;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Generation response
|
|
154
|
+
*/
|
|
155
|
+
export type GetGenerationResponse = {
|
|
156
|
+
/**
|
|
157
|
+
* Generation data
|
|
158
|
+
*/
|
|
159
|
+
data: GetGenerationData;
|
|
160
|
+
};
|
|
161
|
+
/** @internal */
|
|
162
|
+
export declare const GetGenerationRequest$inboundSchema: z.ZodType<GetGenerationRequest, unknown>;
|
|
163
|
+
/** @internal */
|
|
164
|
+
export type GetGenerationRequest$Outbound = {
|
|
165
|
+
id: string;
|
|
166
|
+
};
|
|
167
|
+
/** @internal */
|
|
168
|
+
export declare const GetGenerationRequest$outboundSchema: z.ZodType<GetGenerationRequest$Outbound, GetGenerationRequest>;
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
172
|
+
*/
|
|
173
|
+
export declare namespace GetGenerationRequest$ {
|
|
174
|
+
/** @deprecated use `GetGenerationRequest$inboundSchema` instead. */
|
|
175
|
+
const inboundSchema: z.ZodType<GetGenerationRequest, unknown, z.core.$ZodTypeInternals<GetGenerationRequest, unknown>>;
|
|
176
|
+
/** @deprecated use `GetGenerationRequest$outboundSchema` instead. */
|
|
177
|
+
const outboundSchema: z.ZodType<GetGenerationRequest$Outbound, GetGenerationRequest, z.core.$ZodTypeInternals<GetGenerationRequest$Outbound, GetGenerationRequest>>;
|
|
178
|
+
/** @deprecated use `GetGenerationRequest$Outbound` instead. */
|
|
179
|
+
type Outbound = GetGenerationRequest$Outbound;
|
|
180
|
+
}
|
|
181
|
+
export declare function getGenerationRequestToJSON(getGenerationRequest: GetGenerationRequest): string;
|
|
182
|
+
export declare function getGenerationRequestFromJSON(jsonString: string): SafeParseResult<GetGenerationRequest, SDKValidationError>;
|
|
183
|
+
/** @internal */
|
|
184
|
+
export declare const ApiType$inboundSchema: z.ZodType<ApiType, unknown>;
|
|
185
|
+
/** @internal */
|
|
186
|
+
export declare const ApiType$outboundSchema: z.ZodType<ApiType, ApiType>;
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
|
+
*/
|
|
191
|
+
export declare namespace ApiType$ {
|
|
192
|
+
/** @deprecated use `ApiType$inboundSchema` instead. */
|
|
193
|
+
const inboundSchema: z.ZodType<ApiType, unknown, z.core.$ZodTypeInternals<ApiType, unknown>>;
|
|
194
|
+
/** @deprecated use `ApiType$outboundSchema` instead. */
|
|
195
|
+
const outboundSchema: z.ZodType<ApiType, ApiType, z.core.$ZodTypeInternals<ApiType, ApiType>>;
|
|
196
|
+
}
|
|
197
|
+
/** @internal */
|
|
198
|
+
export declare const GetGenerationData$inboundSchema: z.ZodType<GetGenerationData, unknown>;
|
|
199
|
+
/** @internal */
|
|
200
|
+
export type GetGenerationData$Outbound = {
|
|
201
|
+
id: string;
|
|
202
|
+
upstream_id: string | null;
|
|
203
|
+
total_cost: number;
|
|
204
|
+
cache_discount: number | null;
|
|
205
|
+
upstream_inference_cost: number | null;
|
|
206
|
+
created_at: string;
|
|
207
|
+
model: string;
|
|
208
|
+
app_id: number | null;
|
|
209
|
+
streamed: boolean | null;
|
|
210
|
+
cancelled: boolean | null;
|
|
211
|
+
provider_name: string | null;
|
|
212
|
+
latency: number | null;
|
|
213
|
+
moderation_latency: number | null;
|
|
214
|
+
generation_time: number | null;
|
|
215
|
+
finish_reason: string | null;
|
|
216
|
+
tokens_prompt: number | null;
|
|
217
|
+
tokens_completion: number | null;
|
|
218
|
+
native_tokens_prompt: number | null;
|
|
219
|
+
native_tokens_completion: number | null;
|
|
220
|
+
native_tokens_completion_images: number | null;
|
|
221
|
+
native_tokens_reasoning: number | null;
|
|
222
|
+
native_tokens_cached: number | null;
|
|
223
|
+
num_media_prompt: number | null;
|
|
224
|
+
num_input_audio_prompt: number | null;
|
|
225
|
+
num_media_completion: number | null;
|
|
226
|
+
num_search_results: number | null;
|
|
227
|
+
origin: string;
|
|
228
|
+
usage: number;
|
|
229
|
+
is_byok: boolean;
|
|
230
|
+
native_finish_reason: string | null;
|
|
231
|
+
external_user: string | null;
|
|
232
|
+
api_type: string | null;
|
|
233
|
+
};
|
|
234
|
+
/** @internal */
|
|
235
|
+
export declare const GetGenerationData$outboundSchema: z.ZodType<GetGenerationData$Outbound, GetGenerationData>;
|
|
236
|
+
/**
|
|
237
|
+
* @internal
|
|
238
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
239
|
+
*/
|
|
240
|
+
export declare namespace GetGenerationData$ {
|
|
241
|
+
/** @deprecated use `GetGenerationData$inboundSchema` instead. */
|
|
242
|
+
const inboundSchema: z.ZodType<GetGenerationData, unknown, z.core.$ZodTypeInternals<GetGenerationData, unknown>>;
|
|
243
|
+
/** @deprecated use `GetGenerationData$outboundSchema` instead. */
|
|
244
|
+
const outboundSchema: z.ZodType<GetGenerationData$Outbound, GetGenerationData, z.core.$ZodTypeInternals<GetGenerationData$Outbound, GetGenerationData>>;
|
|
245
|
+
/** @deprecated use `GetGenerationData$Outbound` instead. */
|
|
246
|
+
type Outbound = GetGenerationData$Outbound;
|
|
247
|
+
}
|
|
248
|
+
export declare function getGenerationDataToJSON(getGenerationData: GetGenerationData): string;
|
|
249
|
+
export declare function getGenerationDataFromJSON(jsonString: string): SafeParseResult<GetGenerationData, SDKValidationError>;
|
|
250
|
+
/** @internal */
|
|
251
|
+
export declare const GetGenerationResponse$inboundSchema: z.ZodType<GetGenerationResponse, unknown>;
|
|
252
|
+
/** @internal */
|
|
253
|
+
export type GetGenerationResponse$Outbound = {
|
|
254
|
+
data: GetGenerationData$Outbound;
|
|
255
|
+
};
|
|
256
|
+
/** @internal */
|
|
257
|
+
export declare const GetGenerationResponse$outboundSchema: z.ZodType<GetGenerationResponse$Outbound, GetGenerationResponse>;
|
|
258
|
+
/**
|
|
259
|
+
* @internal
|
|
260
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
261
|
+
*/
|
|
262
|
+
export declare namespace GetGenerationResponse$ {
|
|
263
|
+
/** @deprecated use `GetGenerationResponse$inboundSchema` instead. */
|
|
264
|
+
const inboundSchema: z.ZodType<GetGenerationResponse, unknown, z.core.$ZodTypeInternals<GetGenerationResponse, unknown>>;
|
|
265
|
+
/** @deprecated use `GetGenerationResponse$outboundSchema` instead. */
|
|
266
|
+
const outboundSchema: z.ZodType<GetGenerationResponse$Outbound, GetGenerationResponse, z.core.$ZodTypeInternals<GetGenerationResponse$Outbound, GetGenerationResponse>>;
|
|
267
|
+
/** @deprecated use `GetGenerationResponse$Outbound` instead. */
|
|
268
|
+
type Outbound = GetGenerationResponse$Outbound;
|
|
269
|
+
}
|
|
270
|
+
export declare function getGenerationResponseToJSON(getGenerationResponse: GetGenerationResponse): string;
|
|
271
|
+
export declare function getGenerationResponseFromJSON(jsonString: string): SafeParseResult<GetGenerationResponse, SDKValidationError>;
|
|
272
|
+
//# sourceMappingURL=getgeneration.d.ts.map
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { catchUnrecognizedEnum, } from "../../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* Type of API used for the generation
|
|
10
|
+
*/
|
|
11
|
+
export const ApiType = {
|
|
12
|
+
Completions: "completions",
|
|
13
|
+
Embeddings: "embeddings",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetGenerationRequest$inboundSchema = z.object({
|
|
17
|
+
id: z.string(),
|
|
18
|
+
});
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetGenerationRequest$outboundSchema = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
+
*/
|
|
27
|
+
export var GetGenerationRequest$;
|
|
28
|
+
(function (GetGenerationRequest$) {
|
|
29
|
+
/** @deprecated use `GetGenerationRequest$inboundSchema` instead. */
|
|
30
|
+
GetGenerationRequest$.inboundSchema = GetGenerationRequest$inboundSchema;
|
|
31
|
+
/** @deprecated use `GetGenerationRequest$outboundSchema` instead. */
|
|
32
|
+
GetGenerationRequest$.outboundSchema = GetGenerationRequest$outboundSchema;
|
|
33
|
+
})(GetGenerationRequest$ || (GetGenerationRequest$ = {}));
|
|
34
|
+
export function getGenerationRequestToJSON(getGenerationRequest) {
|
|
35
|
+
return JSON.stringify(GetGenerationRequest$outboundSchema.parse(getGenerationRequest));
|
|
36
|
+
}
|
|
37
|
+
export function getGenerationRequestFromJSON(jsonString) {
|
|
38
|
+
return safeParse(jsonString, (x) => GetGenerationRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGenerationRequest' from JSON`);
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ApiType$inboundSchema = z
|
|
42
|
+
.union([
|
|
43
|
+
z.enum(ApiType),
|
|
44
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
45
|
+
]);
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const ApiType$outboundSchema = z.union([
|
|
48
|
+
z.enum(ApiType),
|
|
49
|
+
z.string().and(z.custom()),
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export var ApiType$;
|
|
56
|
+
(function (ApiType$) {
|
|
57
|
+
/** @deprecated use `ApiType$inboundSchema` instead. */
|
|
58
|
+
ApiType$.inboundSchema = ApiType$inboundSchema;
|
|
59
|
+
/** @deprecated use `ApiType$outboundSchema` instead. */
|
|
60
|
+
ApiType$.outboundSchema = ApiType$outboundSchema;
|
|
61
|
+
})(ApiType$ || (ApiType$ = {}));
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const GetGenerationData$inboundSchema = z.object({
|
|
64
|
+
id: z.string(),
|
|
65
|
+
upstream_id: z.nullable(z.string()),
|
|
66
|
+
total_cost: z.number(),
|
|
67
|
+
cache_discount: z.nullable(z.number()),
|
|
68
|
+
upstream_inference_cost: z.nullable(z.number()),
|
|
69
|
+
created_at: z.string(),
|
|
70
|
+
model: z.string(),
|
|
71
|
+
app_id: z.nullable(z.number()),
|
|
72
|
+
streamed: z.nullable(z.boolean()),
|
|
73
|
+
cancelled: z.nullable(z.boolean()),
|
|
74
|
+
provider_name: z.nullable(z.string()),
|
|
75
|
+
latency: z.nullable(z.number()),
|
|
76
|
+
moderation_latency: z.nullable(z.number()),
|
|
77
|
+
generation_time: z.nullable(z.number()),
|
|
78
|
+
finish_reason: z.nullable(z.string()),
|
|
79
|
+
tokens_prompt: z.nullable(z.number()),
|
|
80
|
+
tokens_completion: z.nullable(z.number()),
|
|
81
|
+
native_tokens_prompt: z.nullable(z.number()),
|
|
82
|
+
native_tokens_completion: z.nullable(z.number()),
|
|
83
|
+
native_tokens_completion_images: z.nullable(z.number()),
|
|
84
|
+
native_tokens_reasoning: z.nullable(z.number()),
|
|
85
|
+
native_tokens_cached: z.nullable(z.number()),
|
|
86
|
+
num_media_prompt: z.nullable(z.number()),
|
|
87
|
+
num_input_audio_prompt: z.nullable(z.number()),
|
|
88
|
+
num_media_completion: z.nullable(z.number()),
|
|
89
|
+
num_search_results: z.nullable(z.number()),
|
|
90
|
+
origin: z.string(),
|
|
91
|
+
usage: z.number(),
|
|
92
|
+
is_byok: z.boolean(),
|
|
93
|
+
native_finish_reason: z.nullable(z.string()),
|
|
94
|
+
external_user: z.nullable(z.string()),
|
|
95
|
+
api_type: z.nullable(ApiType$inboundSchema),
|
|
96
|
+
}).transform((v) => {
|
|
97
|
+
return remap$(v, {
|
|
98
|
+
"upstream_id": "upstreamId",
|
|
99
|
+
"total_cost": "totalCost",
|
|
100
|
+
"cache_discount": "cacheDiscount",
|
|
101
|
+
"upstream_inference_cost": "upstreamInferenceCost",
|
|
102
|
+
"created_at": "createdAt",
|
|
103
|
+
"app_id": "appId",
|
|
104
|
+
"provider_name": "providerName",
|
|
105
|
+
"moderation_latency": "moderationLatency",
|
|
106
|
+
"generation_time": "generationTime",
|
|
107
|
+
"finish_reason": "finishReason",
|
|
108
|
+
"tokens_prompt": "tokensPrompt",
|
|
109
|
+
"tokens_completion": "tokensCompletion",
|
|
110
|
+
"native_tokens_prompt": "nativeTokensPrompt",
|
|
111
|
+
"native_tokens_completion": "nativeTokensCompletion",
|
|
112
|
+
"native_tokens_completion_images": "nativeTokensCompletionImages",
|
|
113
|
+
"native_tokens_reasoning": "nativeTokensReasoning",
|
|
114
|
+
"native_tokens_cached": "nativeTokensCached",
|
|
115
|
+
"num_media_prompt": "numMediaPrompt",
|
|
116
|
+
"num_input_audio_prompt": "numInputAudioPrompt",
|
|
117
|
+
"num_media_completion": "numMediaCompletion",
|
|
118
|
+
"num_search_results": "numSearchResults",
|
|
119
|
+
"is_byok": "isByok",
|
|
120
|
+
"native_finish_reason": "nativeFinishReason",
|
|
121
|
+
"external_user": "externalUser",
|
|
122
|
+
"api_type": "apiType",
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const GetGenerationData$outboundSchema = z.object({
|
|
127
|
+
id: z.string(),
|
|
128
|
+
upstreamId: z.nullable(z.string()),
|
|
129
|
+
totalCost: z.number(),
|
|
130
|
+
cacheDiscount: z.nullable(z.number()),
|
|
131
|
+
upstreamInferenceCost: z.nullable(z.number()),
|
|
132
|
+
createdAt: z.string(),
|
|
133
|
+
model: z.string(),
|
|
134
|
+
appId: z.nullable(z.number()),
|
|
135
|
+
streamed: z.nullable(z.boolean()),
|
|
136
|
+
cancelled: z.nullable(z.boolean()),
|
|
137
|
+
providerName: z.nullable(z.string()),
|
|
138
|
+
latency: z.nullable(z.number()),
|
|
139
|
+
moderationLatency: z.nullable(z.number()),
|
|
140
|
+
generationTime: z.nullable(z.number()),
|
|
141
|
+
finishReason: z.nullable(z.string()),
|
|
142
|
+
tokensPrompt: z.nullable(z.number()),
|
|
143
|
+
tokensCompletion: z.nullable(z.number()),
|
|
144
|
+
nativeTokensPrompt: z.nullable(z.number()),
|
|
145
|
+
nativeTokensCompletion: z.nullable(z.number()),
|
|
146
|
+
nativeTokensCompletionImages: z.nullable(z.number()),
|
|
147
|
+
nativeTokensReasoning: z.nullable(z.number()),
|
|
148
|
+
nativeTokensCached: z.nullable(z.number()),
|
|
149
|
+
numMediaPrompt: z.nullable(z.number()),
|
|
150
|
+
numInputAudioPrompt: z.nullable(z.number()),
|
|
151
|
+
numMediaCompletion: z.nullable(z.number()),
|
|
152
|
+
numSearchResults: z.nullable(z.number()),
|
|
153
|
+
origin: z.string(),
|
|
154
|
+
usage: z.number(),
|
|
155
|
+
isByok: z.boolean(),
|
|
156
|
+
nativeFinishReason: z.nullable(z.string()),
|
|
157
|
+
externalUser: z.nullable(z.string()),
|
|
158
|
+
apiType: z.nullable(ApiType$outboundSchema),
|
|
159
|
+
}).transform((v) => {
|
|
160
|
+
return remap$(v, {
|
|
161
|
+
upstreamId: "upstream_id",
|
|
162
|
+
totalCost: "total_cost",
|
|
163
|
+
cacheDiscount: "cache_discount",
|
|
164
|
+
upstreamInferenceCost: "upstream_inference_cost",
|
|
165
|
+
createdAt: "created_at",
|
|
166
|
+
appId: "app_id",
|
|
167
|
+
providerName: "provider_name",
|
|
168
|
+
moderationLatency: "moderation_latency",
|
|
169
|
+
generationTime: "generation_time",
|
|
170
|
+
finishReason: "finish_reason",
|
|
171
|
+
tokensPrompt: "tokens_prompt",
|
|
172
|
+
tokensCompletion: "tokens_completion",
|
|
173
|
+
nativeTokensPrompt: "native_tokens_prompt",
|
|
174
|
+
nativeTokensCompletion: "native_tokens_completion",
|
|
175
|
+
nativeTokensCompletionImages: "native_tokens_completion_images",
|
|
176
|
+
nativeTokensReasoning: "native_tokens_reasoning",
|
|
177
|
+
nativeTokensCached: "native_tokens_cached",
|
|
178
|
+
numMediaPrompt: "num_media_prompt",
|
|
179
|
+
numInputAudioPrompt: "num_input_audio_prompt",
|
|
180
|
+
numMediaCompletion: "num_media_completion",
|
|
181
|
+
numSearchResults: "num_search_results",
|
|
182
|
+
isByok: "is_byok",
|
|
183
|
+
nativeFinishReason: "native_finish_reason",
|
|
184
|
+
externalUser: "external_user",
|
|
185
|
+
apiType: "api_type",
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
/**
|
|
189
|
+
* @internal
|
|
190
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
191
|
+
*/
|
|
192
|
+
export var GetGenerationData$;
|
|
193
|
+
(function (GetGenerationData$) {
|
|
194
|
+
/** @deprecated use `GetGenerationData$inboundSchema` instead. */
|
|
195
|
+
GetGenerationData$.inboundSchema = GetGenerationData$inboundSchema;
|
|
196
|
+
/** @deprecated use `GetGenerationData$outboundSchema` instead. */
|
|
197
|
+
GetGenerationData$.outboundSchema = GetGenerationData$outboundSchema;
|
|
198
|
+
})(GetGenerationData$ || (GetGenerationData$ = {}));
|
|
199
|
+
export function getGenerationDataToJSON(getGenerationData) {
|
|
200
|
+
return JSON.stringify(GetGenerationData$outboundSchema.parse(getGenerationData));
|
|
201
|
+
}
|
|
202
|
+
export function getGenerationDataFromJSON(jsonString) {
|
|
203
|
+
return safeParse(jsonString, (x) => GetGenerationData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGenerationData' from JSON`);
|
|
204
|
+
}
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const GetGenerationResponse$inboundSchema = z.object({
|
|
207
|
+
data: z.lazy(() => GetGenerationData$inboundSchema),
|
|
208
|
+
});
|
|
209
|
+
/** @internal */
|
|
210
|
+
export const GetGenerationResponse$outboundSchema = z.object({
|
|
211
|
+
data: z.lazy(() => GetGenerationData$outboundSchema),
|
|
212
|
+
});
|
|
213
|
+
/**
|
|
214
|
+
* @internal
|
|
215
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
216
|
+
*/
|
|
217
|
+
export var GetGenerationResponse$;
|
|
218
|
+
(function (GetGenerationResponse$) {
|
|
219
|
+
/** @deprecated use `GetGenerationResponse$inboundSchema` instead. */
|
|
220
|
+
GetGenerationResponse$.inboundSchema = GetGenerationResponse$inboundSchema;
|
|
221
|
+
/** @deprecated use `GetGenerationResponse$outboundSchema` instead. */
|
|
222
|
+
GetGenerationResponse$.outboundSchema = GetGenerationResponse$outboundSchema;
|
|
223
|
+
})(GetGenerationResponse$ || (GetGenerationResponse$ = {}));
|
|
224
|
+
export function getGenerationResponseToJSON(getGenerationResponse) {
|
|
225
|
+
return JSON.stringify(GetGenerationResponse$outboundSchema.parse(getGenerationResponse));
|
|
226
|
+
}
|
|
227
|
+
export function getGenerationResponseFromJSON(jsonString) {
|
|
228
|
+
return safeParse(jsonString, (x) => GetGenerationResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetGenerationResponse' from JSON`);
|
|
229
|
+
}
|
|
230
|
+
//# sourceMappingURL=getgeneration.js.map
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
export type GetKeyRequest = {
|
|
5
|
+
/**
|
|
6
|
+
* The hash identifier of the API key to retrieve
|
|
7
|
+
*/
|
|
8
|
+
hash: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* The API key information
|
|
12
|
+
*/
|
|
13
|
+
export type GetKeyData = {
|
|
14
|
+
/**
|
|
15
|
+
* Unique hash identifier for the API key
|
|
16
|
+
*/
|
|
17
|
+
hash: string;
|
|
18
|
+
/**
|
|
19
|
+
* Name of the API key
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable label for the API key
|
|
24
|
+
*/
|
|
25
|
+
label: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the API key is disabled
|
|
28
|
+
*/
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Spending limit for the API key in USD
|
|
32
|
+
*/
|
|
33
|
+
limit: number | null;
|
|
34
|
+
/**
|
|
35
|
+
* Remaining spending limit in USD
|
|
36
|
+
*/
|
|
37
|
+
limitRemaining: number | null;
|
|
38
|
+
/**
|
|
39
|
+
* Type of limit reset for the API key
|
|
40
|
+
*/
|
|
41
|
+
limitReset: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to include external BYOK usage in the credit limit
|
|
44
|
+
*/
|
|
45
|
+
includeByokInLimit: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Total OpenRouter credit usage (in USD) for the API key
|
|
48
|
+
*/
|
|
49
|
+
usage: number;
|
|
50
|
+
/**
|
|
51
|
+
* OpenRouter credit usage (in USD) for the current UTC day
|
|
52
|
+
*/
|
|
53
|
+
usageDaily: number;
|
|
54
|
+
/**
|
|
55
|
+
* OpenRouter credit usage (in USD) for the current UTC week (Monday-Sunday)
|
|
56
|
+
*/
|
|
57
|
+
usageWeekly: number;
|
|
58
|
+
/**
|
|
59
|
+
* OpenRouter credit usage (in USD) for the current UTC month
|
|
60
|
+
*/
|
|
61
|
+
usageMonthly: number;
|
|
62
|
+
/**
|
|
63
|
+
* Total external BYOK usage (in USD) for the API key
|
|
64
|
+
*/
|
|
65
|
+
byokUsage: number;
|
|
66
|
+
/**
|
|
67
|
+
* External BYOK usage (in USD) for the current UTC day
|
|
68
|
+
*/
|
|
69
|
+
byokUsageDaily: number;
|
|
70
|
+
/**
|
|
71
|
+
* External BYOK usage (in USD) for the current UTC week (Monday-Sunday)
|
|
72
|
+
*/
|
|
73
|
+
byokUsageWeekly: number;
|
|
74
|
+
/**
|
|
75
|
+
* External BYOK usage (in USD) for current UTC month
|
|
76
|
+
*/
|
|
77
|
+
byokUsageMonthly: number;
|
|
78
|
+
/**
|
|
79
|
+
* ISO 8601 timestamp of when the API key was created
|
|
80
|
+
*/
|
|
81
|
+
createdAt: string;
|
|
82
|
+
/**
|
|
83
|
+
* ISO 8601 timestamp of when the API key was last updated
|
|
84
|
+
*/
|
|
85
|
+
updatedAt: string | null;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* API key details
|
|
89
|
+
*/
|
|
90
|
+
export type GetKeyResponse = {
|
|
91
|
+
/**
|
|
92
|
+
* The API key information
|
|
93
|
+
*/
|
|
94
|
+
data: GetKeyData;
|
|
95
|
+
};
|
|
96
|
+
/** @internal */
|
|
97
|
+
export declare const GetKeyRequest$inboundSchema: z.ZodType<GetKeyRequest, unknown>;
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type GetKeyRequest$Outbound = {
|
|
100
|
+
hash: string;
|
|
101
|
+
};
|
|
102
|
+
/** @internal */
|
|
103
|
+
export declare const GetKeyRequest$outboundSchema: z.ZodType<GetKeyRequest$Outbound, GetKeyRequest>;
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export declare namespace GetKeyRequest$ {
|
|
109
|
+
/** @deprecated use `GetKeyRequest$inboundSchema` instead. */
|
|
110
|
+
const inboundSchema: z.ZodType<GetKeyRequest, unknown, z.core.$ZodTypeInternals<GetKeyRequest, unknown>>;
|
|
111
|
+
/** @deprecated use `GetKeyRequest$outboundSchema` instead. */
|
|
112
|
+
const outboundSchema: z.ZodType<GetKeyRequest$Outbound, GetKeyRequest, z.core.$ZodTypeInternals<GetKeyRequest$Outbound, GetKeyRequest>>;
|
|
113
|
+
/** @deprecated use `GetKeyRequest$Outbound` instead. */
|
|
114
|
+
type Outbound = GetKeyRequest$Outbound;
|
|
115
|
+
}
|
|
116
|
+
export declare function getKeyRequestToJSON(getKeyRequest: GetKeyRequest): string;
|
|
117
|
+
export declare function getKeyRequestFromJSON(jsonString: string): SafeParseResult<GetKeyRequest, SDKValidationError>;
|
|
118
|
+
/** @internal */
|
|
119
|
+
export declare const GetKeyData$inboundSchema: z.ZodType<GetKeyData, unknown>;
|
|
120
|
+
/** @internal */
|
|
121
|
+
export type GetKeyData$Outbound = {
|
|
122
|
+
hash: string;
|
|
123
|
+
name: string;
|
|
124
|
+
label: string;
|
|
125
|
+
disabled: boolean;
|
|
126
|
+
limit: number | null;
|
|
127
|
+
limit_remaining: number | null;
|
|
128
|
+
limit_reset: string | null;
|
|
129
|
+
include_byok_in_limit: boolean;
|
|
130
|
+
usage: number;
|
|
131
|
+
usage_daily: number;
|
|
132
|
+
usage_weekly: number;
|
|
133
|
+
usage_monthly: number;
|
|
134
|
+
byok_usage: number;
|
|
135
|
+
byok_usage_daily: number;
|
|
136
|
+
byok_usage_weekly: number;
|
|
137
|
+
byok_usage_monthly: number;
|
|
138
|
+
created_at: string;
|
|
139
|
+
updated_at: string | null;
|
|
140
|
+
};
|
|
141
|
+
/** @internal */
|
|
142
|
+
export declare const GetKeyData$outboundSchema: z.ZodType<GetKeyData$Outbound, GetKeyData>;
|
|
143
|
+
/**
|
|
144
|
+
* @internal
|
|
145
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
146
|
+
*/
|
|
147
|
+
export declare namespace GetKeyData$ {
|
|
148
|
+
/** @deprecated use `GetKeyData$inboundSchema` instead. */
|
|
149
|
+
const inboundSchema: z.ZodType<GetKeyData, unknown, z.core.$ZodTypeInternals<GetKeyData, unknown>>;
|
|
150
|
+
/** @deprecated use `GetKeyData$outboundSchema` instead. */
|
|
151
|
+
const outboundSchema: z.ZodType<GetKeyData$Outbound, GetKeyData, z.core.$ZodTypeInternals<GetKeyData$Outbound, GetKeyData>>;
|
|
152
|
+
/** @deprecated use `GetKeyData$Outbound` instead. */
|
|
153
|
+
type Outbound = GetKeyData$Outbound;
|
|
154
|
+
}
|
|
155
|
+
export declare function getKeyDataToJSON(getKeyData: GetKeyData): string;
|
|
156
|
+
export declare function getKeyDataFromJSON(jsonString: string): SafeParseResult<GetKeyData, SDKValidationError>;
|
|
157
|
+
/** @internal */
|
|
158
|
+
export declare const GetKeyResponse$inboundSchema: z.ZodType<GetKeyResponse, unknown>;
|
|
159
|
+
/** @internal */
|
|
160
|
+
export type GetKeyResponse$Outbound = {
|
|
161
|
+
data: GetKeyData$Outbound;
|
|
162
|
+
};
|
|
163
|
+
/** @internal */
|
|
164
|
+
export declare const GetKeyResponse$outboundSchema: z.ZodType<GetKeyResponse$Outbound, GetKeyResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* @internal
|
|
167
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
168
|
+
*/
|
|
169
|
+
export declare namespace GetKeyResponse$ {
|
|
170
|
+
/** @deprecated use `GetKeyResponse$inboundSchema` instead. */
|
|
171
|
+
const inboundSchema: z.ZodType<GetKeyResponse, unknown, z.core.$ZodTypeInternals<GetKeyResponse, unknown>>;
|
|
172
|
+
/** @deprecated use `GetKeyResponse$outboundSchema` instead. */
|
|
173
|
+
const outboundSchema: z.ZodType<GetKeyResponse$Outbound, GetKeyResponse, z.core.$ZodTypeInternals<GetKeyResponse$Outbound, GetKeyResponse>>;
|
|
174
|
+
/** @deprecated use `GetKeyResponse$Outbound` instead. */
|
|
175
|
+
type Outbound = GetKeyResponse$Outbound;
|
|
176
|
+
}
|
|
177
|
+
export declare function getKeyResponseToJSON(getKeyResponse: GetKeyResponse): string;
|
|
178
|
+
export declare function getKeyResponseFromJSON(jsonString: string): SafeParseResult<GetKeyResponse, SDKValidationError>;
|
|
179
|
+
//# sourceMappingURL=getkey.d.ts.map
|