@openrouter/sdk 0.1.2 → 0.1.4
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/funcs/modelsListEmbeddings.d.ts +18 -0
- package/esm/funcs/modelsListEmbeddings.js +72 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/activityitem.d.ts +0 -29
- package/esm/models/activityitem.js +0 -38
- package/esm/models/assistantmessage.d.ts +0 -24
- package/esm/models/assistantmessage.js +0 -22
- package/esm/models/badgatewayresponseerrordata.d.ts +0 -23
- package/esm/models/badgatewayresponseerrordata.js +0 -20
- package/esm/models/badrequestresponseerrordata.d.ts +0 -23
- package/esm/models/badrequestresponseerrordata.js +0 -20
- package/esm/models/chatcompletionfinishreason.d.ts +0 -12
- package/esm/models/chatcompletionfinishreason.js +1 -17
- package/esm/models/chaterror.d.ts +0 -39
- package/esm/models/chaterror.js +0 -40
- package/esm/models/chatgenerationparams.d.ts +3 -122
- package/esm/models/chatgenerationparams.js +7 -195
- package/esm/models/chatgenerationtokenusage.d.ts +6 -70
- package/esm/models/chatgenerationtokenusage.js +7 -89
- package/esm/models/chatmessagecontentitem.d.ts +5 -12
- package/esm/models/chatmessagecontentitem.js +7 -11
- package/esm/models/chatmessagecontentitemaudio.d.ts +0 -34
- package/esm/models/chatmessagecontentitemaudio.js +0 -33
- package/esm/models/chatmessagecontentitemimage.d.ts +0 -34
- package/esm/models/chatmessagecontentitemimage.js +0 -33
- package/esm/models/chatmessagecontentitemtext.d.ts +0 -12
- package/esm/models/chatmessagecontentitemtext.js +0 -11
- package/esm/models/chatmessagecontentitemvideo.d.ts +32 -0
- package/esm/models/chatmessagecontentitemvideo.js +46 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +0 -43
- package/esm/models/chatmessagetokenlogprob.js +0 -45
- package/esm/models/chatmessagetokenlogprobs.d.ts +1 -21
- package/esm/models/chatmessagetokenlogprobs.js +1 -20
- package/esm/models/chatmessagetoolcall.d.ts +0 -24
- package/esm/models/chatmessagetoolcall.js +0 -22
- package/esm/models/chatresponse.d.ts +2 -27
- package/esm/models/chatresponse.js +2 -30
- package/esm/models/chatresponsechoice.d.ts +2 -24
- package/esm/models/chatresponsechoice.js +3 -28
- package/esm/models/chatstreamingchoice.d.ts +2 -24
- package/esm/models/chatstreamingchoice.js +3 -28
- package/esm/models/chatstreamingmessagechunk.d.ts +1 -40
- package/esm/models/chatstreamingmessagechunk.js +1 -40
- package/esm/models/chatstreamingmessagetoolcall.d.ts +0 -42
- package/esm/models/chatstreamingmessagetoolcall.js +0 -41
- package/esm/models/chatstreamingresponsechunk.d.ts +2 -67
- package/esm/models/chatstreamingresponsechunk.js +2 -69
- package/esm/models/chatstreamoptions.d.ts +0 -17
- package/esm/models/chatstreamoptions.js +0 -23
- package/esm/models/completionchoice.d.ts +1 -35
- package/esm/models/completionchoice.js +2 -43
- package/esm/models/completioncreateparams.d.ts +0 -122
- package/esm/models/completioncreateparams.js +2 -200
- package/esm/models/completionlogprobs.d.ts +0 -24
- package/esm/models/completionlogprobs.js +0 -27
- package/esm/models/completionresponse.d.ts +2 -27
- package/esm/models/completionresponse.js +2 -30
- package/esm/models/completionusage.d.ts +0 -21
- package/esm/models/completionusage.js +0 -26
- package/esm/models/createchargerequest.d.ts +0 -29
- package/esm/models/createchargerequest.js +0 -43
- package/esm/models/defaultparameters.d.ts +0 -21
- package/esm/models/defaultparameters.js +0 -25
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +0 -23
- package/esm/models/edgenetworktimeoutresponseerrordata.js +0 -20
- package/esm/models/endpointstatus.d.ts +0 -12
- package/esm/models/endpointstatus.js +1 -17
- package/esm/models/errors/badgatewayresponseerror.d.ts +0 -19
- package/esm/models/errors/badgatewayresponseerror.js +0 -22
- package/esm/models/errors/badrequestresponseerror.d.ts +0 -19
- package/esm/models/errors/badrequestresponseerror.js +0 -22
- package/esm/models/errors/chaterror.d.ts +0 -18
- package/esm/models/errors/chaterror.js +0 -17
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +0 -19
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +0 -22
- package/esm/models/errors/forbiddenresponseerror.d.ts +0 -19
- package/esm/models/errors/forbiddenresponseerror.js +0 -22
- package/esm/models/errors/internalserverresponseerror.d.ts +0 -19
- package/esm/models/errors/internalserverresponseerror.js +0 -22
- package/esm/models/errors/notfoundresponseerror.d.ts +0 -19
- package/esm/models/errors/notfoundresponseerror.js +0 -22
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +0 -19
- package/esm/models/errors/payloadtoolargeresponseerror.js +0 -22
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +0 -19
- package/esm/models/errors/paymentrequiredresponseerror.js +0 -22
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +0 -19
- package/esm/models/errors/provideroverloadedresponseerror.js +0 -22
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +0 -19
- package/esm/models/errors/requesttimeoutresponseerror.js +0 -22
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +0 -19
- package/esm/models/errors/serviceunavailableresponseerror.js +0 -22
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +0 -19
- package/esm/models/errors/toomanyrequestsresponseerror.js +0 -22
- package/esm/models/errors/unauthorizedresponseerror.d.ts +0 -19
- package/esm/models/errors/unauthorizedresponseerror.js +0 -22
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +0 -19
- package/esm/models/errors/unprocessableentityresponseerror.js +0 -22
- package/esm/models/filecitation.d.ts +0 -26
- package/esm/models/filecitation.js +0 -22
- package/esm/models/filepath.d.ts +0 -26
- package/esm/models/filepath.js +0 -22
- package/esm/models/forbiddenresponseerrordata.d.ts +0 -23
- package/esm/models/forbiddenresponseerrordata.js +0 -20
- package/esm/models/imagegenerationstatus.d.ts +0 -10
- package/esm/models/imagegenerationstatus.js +0 -11
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -1
- package/esm/models/inputmodality.d.ts +0 -12
- package/esm/models/inputmodality.js +1 -17
- package/esm/models/instructtype.d.ts +0 -12
- package/esm/models/instructtype.js +1 -17
- package/esm/models/internalserverresponseerrordata.d.ts +0 -23
- package/esm/models/internalserverresponseerrordata.js +0 -20
- package/esm/models/jsonschemaconfig.d.ts +0 -17
- package/esm/models/jsonschemaconfig.js +0 -22
- package/esm/models/listendpointsresponse.d.ts +1 -60
- package/esm/models/listendpointsresponse.js +5 -73
- package/esm/models/message.d.ts +0 -47
- package/esm/models/message.js +5 -67
- package/esm/models/model.d.ts +5 -36
- package/esm/models/model.js +6 -46
- package/esm/models/modelarchitecture.d.ts +0 -35
- package/esm/models/modelarchitecture.js +4 -49
- package/esm/models/modelgroup.d.ts +0 -12
- package/esm/models/modelgroup.js +1 -18
- package/esm/models/modelscountresponse.d.ts +0 -38
- package/esm/models/modelscountresponse.js +0 -36
- package/esm/models/modelslistresponse.d.ts +1 -20
- package/esm/models/modelslistresponse.js +1 -19
- package/esm/models/namedtoolchoice.d.ts +0 -32
- package/esm/models/namedtoolchoice.js +0 -38
- package/esm/models/notfoundresponseerrordata.d.ts +0 -23
- package/esm/models/notfoundresponseerrordata.js +0 -20
- package/esm/models/openairesponsesannotation.d.ts +0 -12
- package/esm/models/openairesponsesannotation.js +0 -11
- package/esm/models/openairesponsesincludable.d.ts +0 -12
- package/esm/models/openairesponsesincludable.js +0 -18
- package/esm/models/openairesponsesincompletedetails.d.ts +0 -31
- package/esm/models/openairesponsesincompletedetails.js +1 -35
- package/esm/models/openairesponsesinputunion.d.ts +6 -431
- package/esm/models/openairesponsesinputunion.js +7 -463
- package/esm/models/openairesponsesprompt.d.ts +0 -24
- package/esm/models/openairesponsesprompt.js +0 -22
- package/esm/models/openairesponsesreasoningconfig.d.ts +0 -20
- package/esm/models/openairesponsesreasoningconfig.js +2 -21
- package/esm/models/openairesponsesreasoningeffort.d.ts +0 -10
- package/esm/models/openairesponsesreasoningeffort.js +0 -11
- package/esm/models/openairesponsesrefusalcontent.d.ts +0 -26
- package/esm/models/openairesponsesrefusalcontent.js +0 -22
- package/esm/models/openairesponsesresponsestatus.d.ts +0 -12
- package/esm/models/openairesponsesresponsestatus.js +1 -17
- package/esm/models/openairesponsesservicetier.d.ts +0 -12
- package/esm/models/openairesponsesservicetier.js +1 -17
- package/esm/models/openairesponsestoolchoiceunion.d.ts +0 -132
- package/esm/models/openairesponsestoolchoiceunion.js +0 -110
- package/esm/models/openairesponsestruncation.d.ts +0 -12
- package/esm/models/openairesponsestruncation.js +1 -17
- package/esm/models/openresponseseasyinputmessage.d.ts +0 -142
- package/esm/models/openresponseseasyinputmessage.js +9 -198
- package/esm/models/openresponseserrorevent.d.ts +0 -39
- package/esm/models/openresponseserrorevent.js +0 -39
- package/esm/models/openresponsesfunctioncalloutput.d.ts +0 -33
- package/esm/models/openresponsesfunctioncalloutput.js +2 -42
- package/esm/models/openresponsesfunctiontoolcall.d.ts +0 -33
- package/esm/models/openresponsesfunctiontoolcall.js +2 -43
- package/esm/models/openresponsesimagegencallcompleted.d.ts +0 -38
- package/esm/models/openresponsesimagegencallcompleted.js +0 -40
- package/esm/models/openresponsesimagegencallgenerating.d.ts +0 -38
- package/esm/models/openresponsesimagegencallgenerating.js +0 -40
- package/esm/models/openresponsesimagegencallinprogress.d.ts +0 -38
- package/esm/models/openresponsesimagegencallinprogress.js +0 -40
- package/esm/models/openresponsesimagegencallpartialimage.d.ts +0 -40
- package/esm/models/openresponsesimagegencallpartialimage.js +0 -44
- package/esm/models/openresponsesinput.d.ts +0 -32
- package/esm/models/openresponsesinput.js +11 -71
- package/esm/models/openresponsesinputmessageitem.d.ts +0 -111
- package/esm/models/openresponsesinputmessageitem.js +8 -148
- package/esm/models/openresponseslogprobs.d.ts +1 -22
- package/esm/models/openresponseslogprobs.js +1 -25
- package/esm/models/openresponsesnonstreamingresponse.d.ts +13 -138
- package/esm/models/openresponsesnonstreamingresponse.js +16 -157
- package/esm/models/openresponsesreasoning.d.ts +0 -108
- package/esm/models/openresponsesreasoning.js +6 -130
- package/esm/models/openresponsesreasoningconfig.d.ts +0 -17
- package/esm/models/openresponsesreasoningconfig.js +2 -28
- package/esm/models/openresponsesreasoningdeltaevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningdeltaevent.js +0 -43
- package/esm/models/openresponsesreasoningdoneevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningdoneevent.js +0 -43
- package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +1 -41
- package/esm/models/openresponsesreasoningsummarypartaddedevent.js +1 -44
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +0 -43
- package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +0 -40
- package/esm/models/openresponsesreasoningsummarytextdoneevent.js +0 -43
- package/esm/models/openresponsesrequest.d.ts +5 -356
- package/esm/models/openresponsesrequest.js +18 -530
- package/esm/models/openresponsesresponsetext.d.ts +0 -29
- package/esm/models/openresponsesresponsetext.js +1 -40
- package/esm/models/openresponsesstreamevent.d.ts +18 -732
- package/esm/models/openresponsesstreamevent.js +18 -808
- package/esm/models/openresponsestoplogprobs.d.ts +0 -20
- package/esm/models/openresponsestoplogprobs.js +0 -19
- package/esm/models/openresponsesusage.d.ts +0 -85
- package/esm/models/openresponsesusage.js +0 -105
- package/esm/models/openresponseswebsearch20250826tool.d.ts +0 -38
- package/esm/models/openresponseswebsearch20250826tool.js +0 -33
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +0 -26
- package/esm/models/openresponseswebsearchpreview20250311tool.js +0 -22
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +0 -26
- package/esm/models/openresponseswebsearchpreviewtool.js +0 -22
- package/esm/models/openresponseswebsearchtool.d.ts +0 -38
- package/esm/models/openresponseswebsearchtool.js +0 -33
- package/esm/models/operations/createauthkeyscode.d.ts +0 -67
- package/esm/models/operations/createauthkeyscode.js +0 -89
- package/esm/models/operations/createcoinbasecharge.d.ts +0 -144
- package/esm/models/operations/createcoinbasecharge.js +0 -170
- package/esm/models/operations/createembeddings.d.ts +5 -330
- package/esm/models/operations/createembeddings.js +4 -404
- package/esm/models/operations/createkeys.d.ts +0 -83
- package/esm/models/operations/createkeys.js +0 -113
- package/esm/models/operations/createresponses.d.ts +0 -36
- package/esm/models/operations/createresponses.js +0 -37
- package/esm/models/operations/deletekeys.d.ts +0 -34
- package/esm/models/operations/deletekeys.js +0 -36
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +0 -47
- package/esm/models/operations/exchangeauthcodeforapikey.js +0 -66
- package/esm/models/operations/getcredits.d.ts +0 -17
- package/esm/models/operations/getcredits.js +0 -16
- package/esm/models/operations/getcurrentkey.d.ts +0 -74
- package/esm/models/operations/getcurrentkey.js +0 -87
- package/esm/models/operations/getgeneration.d.ts +0 -101
- package/esm/models/operations/getgeneration.js +1 -134
- package/esm/models/operations/getkey.d.ts +0 -70
- package/esm/models/operations/getkey.js +0 -87
- package/esm/models/operations/getmodels.d.ts +0 -17
- package/esm/models/operations/getmodels.js +0 -24
- package/esm/models/operations/getparameters.d.ts +0 -93
- package/esm/models/operations/getparameters.js +0 -112
- package/esm/models/operations/getuseractivity.d.ts +0 -34
- package/esm/models/operations/getuseractivity.js +0 -36
- package/esm/models/operations/list.d.ts +0 -70
- package/esm/models/operations/list.js +0 -93
- package/esm/models/operations/listendpoints.d.ts +0 -34
- package/esm/models/operations/listendpoints.js +0 -37
- package/esm/models/operations/listendpointszdr.d.ts +0 -19
- package/esm/models/operations/listendpointszdr.js +0 -18
- package/esm/models/operations/listmodelsuser.d.ts +0 -17
- package/esm/models/operations/listmodelsuser.js +0 -19
- package/esm/models/operations/listproviders.d.ts +0 -42
- package/esm/models/operations/listproviders.js +0 -46
- package/esm/models/operations/sendchatcompletionrequest.d.ts +0 -17
- package/esm/models/operations/sendchatcompletionrequest.js +0 -16
- package/esm/models/operations/updatekeys.d.ts +0 -97
- package/esm/models/operations/updatekeys.js +0 -136
- package/esm/models/outputitemimagegenerationcall.d.ts +0 -38
- package/esm/models/outputitemimagegenerationcall.js +1 -35
- package/esm/models/outputmessage.d.ts +2 -139
- package/esm/models/outputmessage.js +2 -135
- package/esm/models/outputmodality.d.ts +0 -12
- package/esm/models/outputmodality.js +1 -17
- package/esm/models/parameter.d.ts +0 -12
- package/esm/models/parameter.js +1 -18
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +0 -23
- package/esm/models/payloadtoolargeresponseerrordata.js +0 -20
- package/esm/models/paymentrequiredresponseerrordata.d.ts +0 -23
- package/esm/models/paymentrequiredresponseerrordata.js +0 -20
- package/esm/models/perrequestlimits.d.ts +0 -20
- package/esm/models/perrequestlimits.js +0 -24
- package/esm/models/providername.d.ts +0 -10
- package/esm/models/providername.js +0 -11
- package/esm/models/provideroverloadedresponseerrordata.d.ts +0 -23
- package/esm/models/provideroverloadedresponseerrordata.js +0 -20
- package/esm/models/publicendpoint.d.ts +0 -73
- package/esm/models/publicendpoint.js +4 -100
- package/esm/models/publicpricing.d.ts +0 -30
- package/esm/models/publicpricing.js +0 -38
- package/esm/models/quantization.d.ts +0 -12
- package/esm/models/quantization.js +0 -18
- package/esm/models/reasoningsummarytext.d.ts +0 -26
- package/esm/models/reasoningsummarytext.js +0 -22
- package/esm/models/reasoningsummaryverbosity.d.ts +0 -10
- package/esm/models/reasoningsummaryverbosity.js +0 -11
- package/esm/models/reasoningtextcontent.d.ts +0 -26
- package/esm/models/reasoningtextcontent.js +0 -22
- package/esm/models/requesttimeoutresponseerrordata.d.ts +0 -23
- package/esm/models/requesttimeoutresponseerrordata.js +0 -20
- package/esm/models/responseformatjsonschema.d.ts +0 -17
- package/esm/models/responseformatjsonschema.js +1 -25
- package/esm/models/responseformattextconfig.d.ts +0 -12
- package/esm/models/responseformattextconfig.js +0 -11
- package/esm/models/responseformattextgrammar.d.ts +0 -17
- package/esm/models/responseformattextgrammar.js +0 -20
- package/esm/models/responseinputaudio.d.ts +0 -48
- package/esm/models/responseinputaudio.js +0 -44
- package/esm/models/responseinputfile.d.ts +0 -26
- package/esm/models/responseinputfile.js +0 -22
- package/esm/models/responseinputimage.d.ts +0 -36
- package/esm/models/responseinputimage.js +0 -33
- package/esm/models/responseinputtext.d.ts +0 -26
- package/esm/models/responseinputtext.js +0 -22
- package/esm/models/responseoutputtext.d.ts +0 -26
- package/esm/models/responseoutputtext.js +0 -22
- package/esm/models/responseserrorfield.d.ts +0 -32
- package/esm/models/responseserrorfield.js +1 -36
- package/esm/models/responsesformatjsonobject.d.ts +0 -26
- package/esm/models/responsesformatjsonobject.js +0 -22
- package/esm/models/responsesformattext.d.ts +0 -26
- package/esm/models/responsesformattext.js +0 -22
- package/esm/models/responsesformattextjsonschemaconfig.d.ts +0 -26
- package/esm/models/responsesformattextjsonschemaconfig.js +0 -22
- package/esm/models/responsesimagegenerationcall.d.ts +0 -26
- package/esm/models/responsesimagegenerationcall.js +0 -22
- package/esm/models/responsesoutputitem.d.ts +6 -23
- package/esm/models/responsesoutputitem.js +6 -29
- package/esm/models/responsesoutputitemfilesearchcall.d.ts +0 -26
- package/esm/models/responsesoutputitemfilesearchcall.js +0 -22
- package/esm/models/responsesoutputitemfunctioncall.d.ts +0 -80
- package/esm/models/responsesoutputitemfunctioncall.js +0 -66
- package/esm/models/responsesoutputitemreasoning.d.ts +0 -80
- package/esm/models/responsesoutputitemreasoning.js +0 -66
- package/esm/models/responsesoutputmessage.d.ts +0 -106
- package/esm/models/responsesoutputmessage.js +0 -88
- package/esm/models/responsessearchcontextsize.d.ts +0 -10
- package/esm/models/responsessearchcontextsize.js +0 -11
- package/esm/models/responseswebsearchcalloutput.d.ts +0 -26
- package/esm/models/responseswebsearchcalloutput.js +0 -22
- package/esm/models/responseswebsearchuserlocation.d.ts +0 -26
- package/esm/models/responseswebsearchuserlocation.js +0 -22
- package/esm/models/responsetextconfig.d.ts +1 -33
- package/esm/models/responsetextconfig.js +2 -37
- package/esm/models/security.d.ts +0 -17
- package/esm/models/security.js +0 -19
- package/esm/models/serviceunavailableresponseerrordata.d.ts +0 -23
- package/esm/models/serviceunavailableresponseerrordata.js +0 -20
- package/esm/models/systemmessage.d.ts +0 -32
- package/esm/models/systemmessage.js +1 -42
- package/esm/models/toolcallstatus.d.ts +0 -10
- package/esm/models/toolcallstatus.js +0 -11
- package/esm/models/tooldefinitionjson.d.ts +34 -0
- package/esm/models/tooldefinitionjson.js +23 -0
- package/esm/models/toolresponsemessage.d.ts +0 -32
- package/esm/models/toolresponsemessage.js +1 -42
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +0 -23
- package/esm/models/toomanyrequestsresponseerrordata.js +0 -20
- package/esm/models/topproviderinfo.d.ts +0 -21
- package/esm/models/topproviderinfo.js +0 -26
- package/esm/models/unauthorizedresponseerrordata.d.ts +0 -23
- package/esm/models/unauthorizedresponseerrordata.js +0 -20
- package/esm/models/unprocessableentityresponseerrordata.d.ts +0 -23
- package/esm/models/unprocessableentityresponseerrordata.js +0 -20
- package/esm/models/urlcitation.d.ts +0 -26
- package/esm/models/urlcitation.js +0 -22
- package/esm/models/usermessage.d.ts +0 -32
- package/esm/models/usermessage.js +1 -42
- package/esm/models/websearchpreviewtooluserlocation.d.ts +0 -26
- package/esm/models/websearchpreviewtooluserlocation.js +0 -22
- package/esm/models/websearchstatus.d.ts +0 -10
- package/esm/models/websearchstatus.js +0 -11
- package/esm/react-query/index.d.ts +1 -0
- package/esm/react-query/index.js +1 -0
- package/esm/react-query/modelsListEmbeddings.d.ts +29 -0
- package/esm/react-query/modelsListEmbeddings.js +66 -0
- package/esm/sdk/models.d.ts +7 -0
- package/esm/sdk/models.js +10 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/esm/models/tool.d.ts +0 -66
- package/esm/models/tool.js +0 -65
|
@@ -9,26 +9,6 @@ export const UnauthorizedResponseErrorData$inboundSchema = z.object({
|
|
|
9
9
|
message: z.string(),
|
|
10
10
|
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
11
|
});
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const UnauthorizedResponseErrorData$outboundSchema = z.object({
|
|
14
|
-
code: z.number().int(),
|
|
15
|
-
message: z.string(),
|
|
16
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
-
*/
|
|
22
|
-
export var UnauthorizedResponseErrorData$;
|
|
23
|
-
(function (UnauthorizedResponseErrorData$) {
|
|
24
|
-
/** @deprecated use `UnauthorizedResponseErrorData$inboundSchema` instead. */
|
|
25
|
-
UnauthorizedResponseErrorData$.inboundSchema = UnauthorizedResponseErrorData$inboundSchema;
|
|
26
|
-
/** @deprecated use `UnauthorizedResponseErrorData$outboundSchema` instead. */
|
|
27
|
-
UnauthorizedResponseErrorData$.outboundSchema = UnauthorizedResponseErrorData$outboundSchema;
|
|
28
|
-
})(UnauthorizedResponseErrorData$ || (UnauthorizedResponseErrorData$ = {}));
|
|
29
|
-
export function unauthorizedResponseErrorDataToJSON(unauthorizedResponseErrorData) {
|
|
30
|
-
return JSON.stringify(UnauthorizedResponseErrorData$outboundSchema.parse(unauthorizedResponseErrorData));
|
|
31
|
-
}
|
|
32
12
|
export function unauthorizedResponseErrorDataFromJSON(jsonString) {
|
|
33
13
|
return safeParse(jsonString, (x) => UnauthorizedResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnauthorizedResponseErrorData' from JSON`);
|
|
34
14
|
}
|
|
@@ -13,28 +13,5 @@ export type UnprocessableEntityResponseErrorData = {
|
|
|
13
13
|
};
|
|
14
14
|
/** @internal */
|
|
15
15
|
export declare const UnprocessableEntityResponseErrorData$inboundSchema: z.ZodType<UnprocessableEntityResponseErrorData, unknown>;
|
|
16
|
-
/** @internal */
|
|
17
|
-
export type UnprocessableEntityResponseErrorData$Outbound = {
|
|
18
|
-
code: number;
|
|
19
|
-
message: string;
|
|
20
|
-
metadata?: {
|
|
21
|
-
[k: string]: any | null;
|
|
22
|
-
} | null | undefined;
|
|
23
|
-
};
|
|
24
|
-
/** @internal */
|
|
25
|
-
export declare const UnprocessableEntityResponseErrorData$outboundSchema: z.ZodType<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData>;
|
|
26
|
-
/**
|
|
27
|
-
* @internal
|
|
28
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
29
|
-
*/
|
|
30
|
-
export declare namespace UnprocessableEntityResponseErrorData$ {
|
|
31
|
-
/** @deprecated use `UnprocessableEntityResponseErrorData$inboundSchema` instead. */
|
|
32
|
-
const inboundSchema: z.ZodType<UnprocessableEntityResponseErrorData, unknown, z.core.$ZodTypeInternals<UnprocessableEntityResponseErrorData, unknown>>;
|
|
33
|
-
/** @deprecated use `UnprocessableEntityResponseErrorData$outboundSchema` instead. */
|
|
34
|
-
const outboundSchema: z.ZodType<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData, z.core.$ZodTypeInternals<UnprocessableEntityResponseErrorData$Outbound, UnprocessableEntityResponseErrorData>>;
|
|
35
|
-
/** @deprecated use `UnprocessableEntityResponseErrorData$Outbound` instead. */
|
|
36
|
-
type Outbound = UnprocessableEntityResponseErrorData$Outbound;
|
|
37
|
-
}
|
|
38
|
-
export declare function unprocessableEntityResponseErrorDataToJSON(unprocessableEntityResponseErrorData: UnprocessableEntityResponseErrorData): string;
|
|
39
16
|
export declare function unprocessableEntityResponseErrorDataFromJSON(jsonString: string): SafeParseResult<UnprocessableEntityResponseErrorData, SDKValidationError>;
|
|
40
17
|
//# sourceMappingURL=unprocessableentityresponseerrordata.d.ts.map
|
|
@@ -9,26 +9,6 @@ export const UnprocessableEntityResponseErrorData$inboundSchema = z.object({
|
|
|
9
9
|
message: z.string(),
|
|
10
10
|
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
11
11
|
});
|
|
12
|
-
/** @internal */
|
|
13
|
-
export const UnprocessableEntityResponseErrorData$outboundSchema = z.object({
|
|
14
|
-
code: z.number().int(),
|
|
15
|
-
message: z.string(),
|
|
16
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
17
|
-
});
|
|
18
|
-
/**
|
|
19
|
-
* @internal
|
|
20
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
-
*/
|
|
22
|
-
export var UnprocessableEntityResponseErrorData$;
|
|
23
|
-
(function (UnprocessableEntityResponseErrorData$) {
|
|
24
|
-
/** @deprecated use `UnprocessableEntityResponseErrorData$inboundSchema` instead. */
|
|
25
|
-
UnprocessableEntityResponseErrorData$.inboundSchema = UnprocessableEntityResponseErrorData$inboundSchema;
|
|
26
|
-
/** @deprecated use `UnprocessableEntityResponseErrorData$outboundSchema` instead. */
|
|
27
|
-
UnprocessableEntityResponseErrorData$.outboundSchema = UnprocessableEntityResponseErrorData$outboundSchema;
|
|
28
|
-
})(UnprocessableEntityResponseErrorData$ || (UnprocessableEntityResponseErrorData$ = {}));
|
|
29
|
-
export function unprocessableEntityResponseErrorDataToJSON(unprocessableEntityResponseErrorData) {
|
|
30
|
-
return JSON.stringify(UnprocessableEntityResponseErrorData$outboundSchema.parse(unprocessableEntityResponseErrorData));
|
|
31
|
-
}
|
|
32
12
|
export function unprocessableEntityResponseErrorDataFromJSON(jsonString) {
|
|
33
13
|
return safeParse(jsonString, (x) => UnprocessableEntityResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UnprocessableEntityResponseErrorData' from JSON`);
|
|
34
14
|
}
|
|
@@ -17,20 +17,6 @@ export type URLCitation = {
|
|
|
17
17
|
export declare const URLCitationType$inboundSchema: z.ZodEnum<typeof URLCitationType>;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare const URLCitationType$outboundSchema: z.ZodEnum<typeof URLCitationType>;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
-
*/
|
|
24
|
-
export declare namespace URLCitationType$ {
|
|
25
|
-
/** @deprecated use `URLCitationType$inboundSchema` instead. */
|
|
26
|
-
const inboundSchema: z.ZodEnum<{
|
|
27
|
-
readonly UrlCitation: "url_citation";
|
|
28
|
-
}>;
|
|
29
|
-
/** @deprecated use `URLCitationType$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.ZodEnum<{
|
|
31
|
-
readonly UrlCitation: "url_citation";
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
20
|
/** @internal */
|
|
35
21
|
export declare const URLCitation$inboundSchema: z.ZodType<URLCitation, unknown>;
|
|
36
22
|
/** @internal */
|
|
@@ -43,18 +29,6 @@ export type URLCitation$Outbound = {
|
|
|
43
29
|
};
|
|
44
30
|
/** @internal */
|
|
45
31
|
export declare const URLCitation$outboundSchema: z.ZodType<URLCitation$Outbound, URLCitation>;
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
-
*/
|
|
50
|
-
export declare namespace URLCitation$ {
|
|
51
|
-
/** @deprecated use `URLCitation$inboundSchema` instead. */
|
|
52
|
-
const inboundSchema: z.ZodType<URLCitation, unknown, z.core.$ZodTypeInternals<URLCitation, unknown>>;
|
|
53
|
-
/** @deprecated use `URLCitation$outboundSchema` instead. */
|
|
54
|
-
const outboundSchema: z.ZodType<URLCitation$Outbound, URLCitation, z.core.$ZodTypeInternals<URLCitation$Outbound, URLCitation>>;
|
|
55
|
-
/** @deprecated use `URLCitation$Outbound` instead. */
|
|
56
|
-
type Outbound = URLCitation$Outbound;
|
|
57
|
-
}
|
|
58
32
|
export declare function urlCitationToJSON(urlCitation: URLCitation): string;
|
|
59
33
|
export declare function urlCitationFromJSON(jsonString: string): SafeParseResult<URLCitation, SDKValidationError>;
|
|
60
34
|
//# sourceMappingURL=urlcitation.d.ts.map
|
|
@@ -11,17 +11,6 @@ export const URLCitationType = {
|
|
|
11
11
|
export const URLCitationType$inboundSchema = z.enum(URLCitationType);
|
|
12
12
|
/** @internal */
|
|
13
13
|
export const URLCitationType$outboundSchema = URLCitationType$inboundSchema;
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
|
-
*/
|
|
18
|
-
export var URLCitationType$;
|
|
19
|
-
(function (URLCitationType$) {
|
|
20
|
-
/** @deprecated use `URLCitationType$inboundSchema` instead. */
|
|
21
|
-
URLCitationType$.inboundSchema = URLCitationType$inboundSchema;
|
|
22
|
-
/** @deprecated use `URLCitationType$outboundSchema` instead. */
|
|
23
|
-
URLCitationType$.outboundSchema = URLCitationType$outboundSchema;
|
|
24
|
-
})(URLCitationType$ || (URLCitationType$ = {}));
|
|
25
14
|
/** @internal */
|
|
26
15
|
export const URLCitation$inboundSchema = z
|
|
27
16
|
.object({
|
|
@@ -49,17 +38,6 @@ export const URLCitation$outboundSchema = z.object({
|
|
|
49
38
|
endIndex: "end_index",
|
|
50
39
|
});
|
|
51
40
|
});
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
-
*/
|
|
56
|
-
export var URLCitation$;
|
|
57
|
-
(function (URLCitation$) {
|
|
58
|
-
/** @deprecated use `URLCitation$inboundSchema` instead. */
|
|
59
|
-
URLCitation$.inboundSchema = URLCitation$inboundSchema;
|
|
60
|
-
/** @deprecated use `URLCitation$outboundSchema` instead. */
|
|
61
|
-
URLCitation$.outboundSchema = URLCitation$outboundSchema;
|
|
62
|
-
})(URLCitation$ || (URLCitation$ = {}));
|
|
63
41
|
export function urlCitationToJSON(urlCitation) {
|
|
64
42
|
return JSON.stringify(URLCitation$outboundSchema.parse(urlCitation));
|
|
65
43
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
2
|
import { ChatMessageContentItem, ChatMessageContentItem$Outbound } from "./chatmessagecontentitem.js";
|
|
4
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
3
|
export type UserMessageContent = string | Array<ChatMessageContentItem>;
|
|
6
4
|
export type UserMessage = {
|
|
7
5
|
role: "user";
|
|
@@ -9,27 +7,10 @@ export type UserMessage = {
|
|
|
9
7
|
name?: string | undefined;
|
|
10
8
|
};
|
|
11
9
|
/** @internal */
|
|
12
|
-
export declare const UserMessageContent$inboundSchema: z.ZodType<UserMessageContent, unknown>;
|
|
13
|
-
/** @internal */
|
|
14
10
|
export type UserMessageContent$Outbound = string | Array<ChatMessageContentItem$Outbound>;
|
|
15
11
|
/** @internal */
|
|
16
12
|
export declare const UserMessageContent$outboundSchema: z.ZodType<UserMessageContent$Outbound, UserMessageContent>;
|
|
17
|
-
/**
|
|
18
|
-
* @internal
|
|
19
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
20
|
-
*/
|
|
21
|
-
export declare namespace UserMessageContent$ {
|
|
22
|
-
/** @deprecated use `UserMessageContent$inboundSchema` instead. */
|
|
23
|
-
const inboundSchema: z.ZodType<UserMessageContent, unknown, z.core.$ZodTypeInternals<UserMessageContent, unknown>>;
|
|
24
|
-
/** @deprecated use `UserMessageContent$outboundSchema` instead. */
|
|
25
|
-
const outboundSchema: z.ZodType<UserMessageContent$Outbound, UserMessageContent, z.core.$ZodTypeInternals<UserMessageContent$Outbound, UserMessageContent>>;
|
|
26
|
-
/** @deprecated use `UserMessageContent$Outbound` instead. */
|
|
27
|
-
type Outbound = UserMessageContent$Outbound;
|
|
28
|
-
}
|
|
29
13
|
export declare function userMessageContentToJSON(userMessageContent: UserMessageContent): string;
|
|
30
|
-
export declare function userMessageContentFromJSON(jsonString: string): SafeParseResult<UserMessageContent, SDKValidationError>;
|
|
31
|
-
/** @internal */
|
|
32
|
-
export declare const UserMessage$inboundSchema: z.ZodType<UserMessage, unknown>;
|
|
33
14
|
/** @internal */
|
|
34
15
|
export type UserMessage$Outbound = {
|
|
35
16
|
role: "user";
|
|
@@ -38,18 +19,5 @@ export type UserMessage$Outbound = {
|
|
|
38
19
|
};
|
|
39
20
|
/** @internal */
|
|
40
21
|
export declare const UserMessage$outboundSchema: z.ZodType<UserMessage$Outbound, UserMessage>;
|
|
41
|
-
/**
|
|
42
|
-
* @internal
|
|
43
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
-
*/
|
|
45
|
-
export declare namespace UserMessage$ {
|
|
46
|
-
/** @deprecated use `UserMessage$inboundSchema` instead. */
|
|
47
|
-
const inboundSchema: z.ZodType<UserMessage, unknown, z.core.$ZodTypeInternals<UserMessage, unknown>>;
|
|
48
|
-
/** @deprecated use `UserMessage$outboundSchema` instead. */
|
|
49
|
-
const outboundSchema: z.ZodType<UserMessage$Outbound, UserMessage, z.core.$ZodTypeInternals<UserMessage$Outbound, UserMessage>>;
|
|
50
|
-
/** @deprecated use `UserMessage$Outbound` instead. */
|
|
51
|
-
type Outbound = UserMessage$Outbound;
|
|
52
|
-
}
|
|
53
22
|
export declare function userMessageToJSON(userMessage: UserMessage): string;
|
|
54
|
-
export declare function userMessageFromJSON(jsonString: string): SafeParseResult<UserMessage, SDKValidationError>;
|
|
55
23
|
//# sourceMappingURL=usermessage.d.ts.map
|
|
@@ -2,39 +2,12 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v4";
|
|
5
|
-
import {
|
|
6
|
-
import { ChatMessageContentItem$inboundSchema, ChatMessageContentItem$outboundSchema, } from "./chatmessagecontentitem.js";
|
|
7
|
-
/** @internal */
|
|
8
|
-
export const UserMessageContent$inboundSchema = z.union([z.string(), z.array(ChatMessageContentItem$inboundSchema)]);
|
|
5
|
+
import { ChatMessageContentItem$outboundSchema, } from "./chatmessagecontentitem.js";
|
|
9
6
|
/** @internal */
|
|
10
7
|
export const UserMessageContent$outboundSchema = z.union([z.string(), z.array(ChatMessageContentItem$outboundSchema)]);
|
|
11
|
-
/**
|
|
12
|
-
* @internal
|
|
13
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
14
|
-
*/
|
|
15
|
-
export var UserMessageContent$;
|
|
16
|
-
(function (UserMessageContent$) {
|
|
17
|
-
/** @deprecated use `UserMessageContent$inboundSchema` instead. */
|
|
18
|
-
UserMessageContent$.inboundSchema = UserMessageContent$inboundSchema;
|
|
19
|
-
/** @deprecated use `UserMessageContent$outboundSchema` instead. */
|
|
20
|
-
UserMessageContent$.outboundSchema = UserMessageContent$outboundSchema;
|
|
21
|
-
})(UserMessageContent$ || (UserMessageContent$ = {}));
|
|
22
8
|
export function userMessageContentToJSON(userMessageContent) {
|
|
23
9
|
return JSON.stringify(UserMessageContent$outboundSchema.parse(userMessageContent));
|
|
24
10
|
}
|
|
25
|
-
export function userMessageContentFromJSON(jsonString) {
|
|
26
|
-
return safeParse(jsonString, (x) => UserMessageContent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserMessageContent' from JSON`);
|
|
27
|
-
}
|
|
28
|
-
/** @internal */
|
|
29
|
-
export const UserMessage$inboundSchema = z
|
|
30
|
-
.object({
|
|
31
|
-
role: z.literal("user"),
|
|
32
|
-
content: z.union([
|
|
33
|
-
z.string(),
|
|
34
|
-
z.array(ChatMessageContentItem$inboundSchema),
|
|
35
|
-
]),
|
|
36
|
-
name: z.string().optional(),
|
|
37
|
-
});
|
|
38
11
|
/** @internal */
|
|
39
12
|
export const UserMessage$outboundSchema = z.object({
|
|
40
13
|
role: z.literal("user"),
|
|
@@ -44,21 +17,7 @@ export const UserMessage$outboundSchema = z.object({
|
|
|
44
17
|
]),
|
|
45
18
|
name: z.string().optional(),
|
|
46
19
|
});
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
-
*/
|
|
51
|
-
export var UserMessage$;
|
|
52
|
-
(function (UserMessage$) {
|
|
53
|
-
/** @deprecated use `UserMessage$inboundSchema` instead. */
|
|
54
|
-
UserMessage$.inboundSchema = UserMessage$inboundSchema;
|
|
55
|
-
/** @deprecated use `UserMessage$outboundSchema` instead. */
|
|
56
|
-
UserMessage$.outboundSchema = UserMessage$outboundSchema;
|
|
57
|
-
})(UserMessage$ || (UserMessage$ = {}));
|
|
58
20
|
export function userMessageToJSON(userMessage) {
|
|
59
21
|
return JSON.stringify(UserMessage$outboundSchema.parse(userMessage));
|
|
60
22
|
}
|
|
61
|
-
export function userMessageFromJSON(jsonString) {
|
|
62
|
-
return safeParse(jsonString, (x) => UserMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserMessage' from JSON`);
|
|
63
|
-
}
|
|
64
23
|
//# sourceMappingURL=usermessage.js.map
|
|
@@ -17,20 +17,6 @@ export type WebSearchPreviewToolUserLocation = {
|
|
|
17
17
|
export declare const WebSearchPreviewToolUserLocationType$inboundSchema: z.ZodEnum<typeof WebSearchPreviewToolUserLocationType>;
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare const WebSearchPreviewToolUserLocationType$outboundSchema: z.ZodEnum<typeof WebSearchPreviewToolUserLocationType>;
|
|
20
|
-
/**
|
|
21
|
-
* @internal
|
|
22
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
23
|
-
*/
|
|
24
|
-
export declare namespace WebSearchPreviewToolUserLocationType$ {
|
|
25
|
-
/** @deprecated use `WebSearchPreviewToolUserLocationType$inboundSchema` instead. */
|
|
26
|
-
const inboundSchema: z.ZodEnum<{
|
|
27
|
-
readonly Approximate: "approximate";
|
|
28
|
-
}>;
|
|
29
|
-
/** @deprecated use `WebSearchPreviewToolUserLocationType$outboundSchema` instead. */
|
|
30
|
-
const outboundSchema: z.ZodEnum<{
|
|
31
|
-
readonly Approximate: "approximate";
|
|
32
|
-
}>;
|
|
33
|
-
}
|
|
34
20
|
/** @internal */
|
|
35
21
|
export declare const WebSearchPreviewToolUserLocation$inboundSchema: z.ZodType<WebSearchPreviewToolUserLocation, unknown>;
|
|
36
22
|
/** @internal */
|
|
@@ -43,18 +29,6 @@ export type WebSearchPreviewToolUserLocation$Outbound = {
|
|
|
43
29
|
};
|
|
44
30
|
/** @internal */
|
|
45
31
|
export declare const WebSearchPreviewToolUserLocation$outboundSchema: z.ZodType<WebSearchPreviewToolUserLocation$Outbound, WebSearchPreviewToolUserLocation>;
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
-
*/
|
|
50
|
-
export declare namespace WebSearchPreviewToolUserLocation$ {
|
|
51
|
-
/** @deprecated use `WebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
52
|
-
const inboundSchema: z.ZodType<WebSearchPreviewToolUserLocation, unknown, z.core.$ZodTypeInternals<WebSearchPreviewToolUserLocation, unknown>>;
|
|
53
|
-
/** @deprecated use `WebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
54
|
-
const outboundSchema: z.ZodType<WebSearchPreviewToolUserLocation$Outbound, WebSearchPreviewToolUserLocation, z.core.$ZodTypeInternals<WebSearchPreviewToolUserLocation$Outbound, WebSearchPreviewToolUserLocation>>;
|
|
55
|
-
/** @deprecated use `WebSearchPreviewToolUserLocation$Outbound` instead. */
|
|
56
|
-
type Outbound = WebSearchPreviewToolUserLocation$Outbound;
|
|
57
|
-
}
|
|
58
32
|
export declare function webSearchPreviewToolUserLocationToJSON(webSearchPreviewToolUserLocation: WebSearchPreviewToolUserLocation): string;
|
|
59
33
|
export declare function webSearchPreviewToolUserLocationFromJSON(jsonString: string): SafeParseResult<WebSearchPreviewToolUserLocation, SDKValidationError>;
|
|
60
34
|
//# sourceMappingURL=websearchpreviewtooluserlocation.d.ts.map
|
|
@@ -10,17 +10,6 @@ export const WebSearchPreviewToolUserLocationType = {
|
|
|
10
10
|
export const WebSearchPreviewToolUserLocationType$inboundSchema = z.enum(WebSearchPreviewToolUserLocationType);
|
|
11
11
|
/** @internal */
|
|
12
12
|
export const WebSearchPreviewToolUserLocationType$outboundSchema = WebSearchPreviewToolUserLocationType$inboundSchema;
|
|
13
|
-
/**
|
|
14
|
-
* @internal
|
|
15
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
16
|
-
*/
|
|
17
|
-
export var WebSearchPreviewToolUserLocationType$;
|
|
18
|
-
(function (WebSearchPreviewToolUserLocationType$) {
|
|
19
|
-
/** @deprecated use `WebSearchPreviewToolUserLocationType$inboundSchema` instead. */
|
|
20
|
-
WebSearchPreviewToolUserLocationType$.inboundSchema = WebSearchPreviewToolUserLocationType$inboundSchema;
|
|
21
|
-
/** @deprecated use `WebSearchPreviewToolUserLocationType$outboundSchema` instead. */
|
|
22
|
-
WebSearchPreviewToolUserLocationType$.outboundSchema = WebSearchPreviewToolUserLocationType$outboundSchema;
|
|
23
|
-
})(WebSearchPreviewToolUserLocationType$ || (WebSearchPreviewToolUserLocationType$ = {}));
|
|
24
13
|
/** @internal */
|
|
25
14
|
export const WebSearchPreviewToolUserLocation$inboundSchema = z.object({
|
|
26
15
|
type: WebSearchPreviewToolUserLocationType$inboundSchema,
|
|
@@ -37,17 +26,6 @@ export const WebSearchPreviewToolUserLocation$outboundSchema = z.object({
|
|
|
37
26
|
region: z.nullable(z.string()).optional(),
|
|
38
27
|
timezone: z.nullable(z.string()).optional(),
|
|
39
28
|
});
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
-
*/
|
|
44
|
-
export var WebSearchPreviewToolUserLocation$;
|
|
45
|
-
(function (WebSearchPreviewToolUserLocation$) {
|
|
46
|
-
/** @deprecated use `WebSearchPreviewToolUserLocation$inboundSchema` instead. */
|
|
47
|
-
WebSearchPreviewToolUserLocation$.inboundSchema = WebSearchPreviewToolUserLocation$inboundSchema;
|
|
48
|
-
/** @deprecated use `WebSearchPreviewToolUserLocation$outboundSchema` instead. */
|
|
49
|
-
WebSearchPreviewToolUserLocation$.outboundSchema = WebSearchPreviewToolUserLocation$outboundSchema;
|
|
50
|
-
})(WebSearchPreviewToolUserLocation$ || (WebSearchPreviewToolUserLocation$ = {}));
|
|
51
29
|
export function webSearchPreviewToolUserLocationToJSON(webSearchPreviewToolUserLocation) {
|
|
52
30
|
return JSON.stringify(WebSearchPreviewToolUserLocation$outboundSchema.parse(webSearchPreviewToolUserLocation));
|
|
53
31
|
}
|
|
@@ -11,14 +11,4 @@ export type WebSearchStatus = OpenEnum<typeof WebSearchStatus>;
|
|
|
11
11
|
export declare const WebSearchStatus$inboundSchema: z.ZodType<WebSearchStatus, unknown>;
|
|
12
12
|
/** @internal */
|
|
13
13
|
export declare const WebSearchStatus$outboundSchema: z.ZodType<WebSearchStatus, WebSearchStatus>;
|
|
14
|
-
/**
|
|
15
|
-
* @internal
|
|
16
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
|
-
*/
|
|
18
|
-
export declare namespace WebSearchStatus$ {
|
|
19
|
-
/** @deprecated use `WebSearchStatus$inboundSchema` instead. */
|
|
20
|
-
const inboundSchema: z.ZodType<WebSearchStatus, unknown, z.core.$ZodTypeInternals<WebSearchStatus, unknown>>;
|
|
21
|
-
/** @deprecated use `WebSearchStatus$outboundSchema` instead. */
|
|
22
|
-
const outboundSchema: z.ZodType<WebSearchStatus, WebSearchStatus, z.core.$ZodTypeInternals<WebSearchStatus, WebSearchStatus>>;
|
|
23
|
-
}
|
|
24
14
|
//# sourceMappingURL=websearchstatus.d.ts.map
|
|
@@ -20,15 +20,4 @@ export const WebSearchStatus$outboundSchema = z.union([
|
|
|
20
20
|
z.enum(WebSearchStatus),
|
|
21
21
|
z.string().and(z.custom()),
|
|
22
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 WebSearchStatus$;
|
|
28
|
-
(function (WebSearchStatus$) {
|
|
29
|
-
/** @deprecated use `WebSearchStatus$inboundSchema` instead. */
|
|
30
|
-
WebSearchStatus$.inboundSchema = WebSearchStatus$inboundSchema;
|
|
31
|
-
/** @deprecated use `WebSearchStatus$outboundSchema` instead. */
|
|
32
|
-
WebSearchStatus$.outboundSchema = WebSearchStatus$outboundSchema;
|
|
33
|
-
})(WebSearchStatus$ || (WebSearchStatus$ = {}));
|
|
34
23
|
//# sourceMappingURL=websearchstatus.js.map
|
|
@@ -18,6 +18,7 @@ export * from "./endpointsListZdrEndpoints.js";
|
|
|
18
18
|
export * from "./generationsGetGeneration.js";
|
|
19
19
|
export * from "./modelsCount.js";
|
|
20
20
|
export * from "./modelsList.js";
|
|
21
|
+
export * from "./modelsListEmbeddings.js";
|
|
21
22
|
export * from "./modelsListForUser.js";
|
|
22
23
|
export * from "./oAuthCreateAuthCode.js";
|
|
23
24
|
export * from "./oAuthExchangeAuthCodeForAPIKey.js";
|
package/esm/react-query/index.js
CHANGED
|
@@ -21,6 +21,7 @@ export * from "./endpointsListZdrEndpoints.js";
|
|
|
21
21
|
export * from "./generationsGetGeneration.js";
|
|
22
22
|
export * from "./modelsCount.js";
|
|
23
23
|
export * from "./modelsList.js";
|
|
24
|
+
export * from "./modelsListEmbeddings.js";
|
|
24
25
|
export * from "./modelsListForUser.js";
|
|
25
26
|
export * from "./oAuthCreateAuthCode.js";
|
|
26
27
|
export * from "./oAuthExchangeAuthCodeForAPIKey.js";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { InvalidateQueryFilters, QueryClient, QueryFunctionContext, QueryKey, UseQueryResult, UseSuspenseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import { OpenRouterCore } from "../core.js";
|
|
3
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
4
|
+
import * as models from "../models/index.js";
|
|
5
|
+
import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
|
|
6
|
+
export type ModelsListEmbeddingsQueryData = models.ModelsListResponse;
|
|
7
|
+
/**
|
|
8
|
+
* List all embeddings models
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* Returns a list of all available embeddings models and their properties
|
|
12
|
+
*/
|
|
13
|
+
export declare function useModelsListEmbeddings(options?: QueryHookOptions<ModelsListEmbeddingsQueryData>): UseQueryResult<ModelsListEmbeddingsQueryData, Error>;
|
|
14
|
+
/**
|
|
15
|
+
* List all embeddings models
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Returns a list of all available embeddings models and their properties
|
|
19
|
+
*/
|
|
20
|
+
export declare function useModelsListEmbeddingsSuspense(options?: SuspenseQueryHookOptions<ModelsListEmbeddingsQueryData>): UseSuspenseQueryResult<ModelsListEmbeddingsQueryData, Error>;
|
|
21
|
+
export declare function prefetchModelsListEmbeddings(queryClient: QueryClient, client$: OpenRouterCore): Promise<void>;
|
|
22
|
+
export declare function setModelsListEmbeddingsData(client: QueryClient, data: ModelsListEmbeddingsQueryData): ModelsListEmbeddingsQueryData | undefined;
|
|
23
|
+
export declare function invalidateAllModelsListEmbeddings(client: QueryClient, filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">): Promise<void>;
|
|
24
|
+
export declare function buildModelsListEmbeddingsQuery(client$: OpenRouterCore, options?: RequestOptions): {
|
|
25
|
+
queryKey: QueryKey;
|
|
26
|
+
queryFn: (context: QueryFunctionContext) => Promise<ModelsListEmbeddingsQueryData>;
|
|
27
|
+
};
|
|
28
|
+
export declare function queryKeyModelsListEmbeddings(): QueryKey;
|
|
29
|
+
//# sourceMappingURL=modelsListEmbeddings.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import { useQuery, useSuspenseQuery, } from "@tanstack/react-query";
|
|
5
|
+
import { modelsListEmbeddings } from "../funcs/modelsListEmbeddings.js";
|
|
6
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
7
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
8
|
+
import { useOpenRouterContext } from "./_context.js";
|
|
9
|
+
/**
|
|
10
|
+
* List all embeddings models
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Returns a list of all available embeddings models and their properties
|
|
14
|
+
*/
|
|
15
|
+
export function useModelsListEmbeddings(options) {
|
|
16
|
+
const client = useOpenRouterContext();
|
|
17
|
+
return useQuery({
|
|
18
|
+
...buildModelsListEmbeddingsQuery(client, options),
|
|
19
|
+
...options,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List all embeddings models
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Returns a list of all available embeddings models and their properties
|
|
27
|
+
*/
|
|
28
|
+
export function useModelsListEmbeddingsSuspense(options) {
|
|
29
|
+
const client = useOpenRouterContext();
|
|
30
|
+
return useSuspenseQuery({
|
|
31
|
+
...buildModelsListEmbeddingsQuery(client, options),
|
|
32
|
+
...options,
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export function prefetchModelsListEmbeddings(queryClient, client$) {
|
|
36
|
+
return queryClient.prefetchQuery({
|
|
37
|
+
...buildModelsListEmbeddingsQuery(client$),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
export function setModelsListEmbeddingsData(client, data) {
|
|
41
|
+
const key = queryKeyModelsListEmbeddings();
|
|
42
|
+
return client.setQueryData(key, data);
|
|
43
|
+
}
|
|
44
|
+
export function invalidateAllModelsListEmbeddings(client, filters) {
|
|
45
|
+
return client.invalidateQueries({
|
|
46
|
+
...filters,
|
|
47
|
+
queryKey: ["@openrouter/sdk", "Models", "listEmbeddings"],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export function buildModelsListEmbeddingsQuery(client$, options) {
|
|
51
|
+
return {
|
|
52
|
+
queryKey: queryKeyModelsListEmbeddings(),
|
|
53
|
+
queryFn: async function modelsListEmbeddingsQueryFn(ctx) {
|
|
54
|
+
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
55
|
+
const mergedOptions = {
|
|
56
|
+
...options,
|
|
57
|
+
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
58
|
+
};
|
|
59
|
+
return unwrapAsync(modelsListEmbeddings(client$, mergedOptions));
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function queryKeyModelsListEmbeddings() {
|
|
64
|
+
return ["@openrouter/sdk", "Models", "listEmbeddings"];
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=modelsListEmbeddings.js.map
|
package/esm/sdk/models.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ export declare class Models extends ClientSDK {
|
|
|
10
10
|
* List all models and their properties
|
|
11
11
|
*/
|
|
12
12
|
list(request?: operations.GetModelsRequest | undefined, options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* List all embeddings models
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Returns a list of all available embeddings models and their properties
|
|
18
|
+
*/
|
|
19
|
+
listEmbeddings(options?: RequestOptions): Promise<models.ModelsListResponse>;
|
|
13
20
|
/**
|
|
14
21
|
* List models filtered by user provider preferences
|
|
15
22
|
*/
|
package/esm/sdk/models.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { modelsCount } from "../funcs/modelsCount.js";
|
|
5
5
|
import { modelsList } from "../funcs/modelsList.js";
|
|
6
|
+
import { modelsListEmbeddings } from "../funcs/modelsListEmbeddings.js";
|
|
6
7
|
import { modelsListForUser } from "../funcs/modelsListForUser.js";
|
|
7
8
|
import { ClientSDK } from "../lib/sdks.js";
|
|
8
9
|
import { unwrapAsync } from "../types/fp.js";
|
|
@@ -19,6 +20,15 @@ export class Models extends ClientSDK {
|
|
|
19
20
|
async list(request, options) {
|
|
20
21
|
return unwrapAsync(modelsList(this, request, options));
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* List all embeddings models
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Returns a list of all available embeddings models and their properties
|
|
28
|
+
*/
|
|
29
|
+
async listEmbeddings(options) {
|
|
30
|
+
return unwrapAsync(modelsListEmbeddings(this, options));
|
|
31
|
+
}
|
|
22
32
|
/**
|
|
23
33
|
* List models filtered by user provider preferences
|
|
24
34
|
*/
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/esm/models/tool.d.ts
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
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 ToolFunction = {
|
|
5
|
-
name: string;
|
|
6
|
-
description?: string | undefined;
|
|
7
|
-
parameters?: {
|
|
8
|
-
[k: string]: any;
|
|
9
|
-
} | undefined;
|
|
10
|
-
strict?: boolean | null | undefined;
|
|
11
|
-
};
|
|
12
|
-
export type Tool = {
|
|
13
|
-
type: "function";
|
|
14
|
-
function: ToolFunction;
|
|
15
|
-
};
|
|
16
|
-
/** @internal */
|
|
17
|
-
export declare const ToolFunction$inboundSchema: z.ZodType<ToolFunction, unknown>;
|
|
18
|
-
/** @internal */
|
|
19
|
-
export type ToolFunction$Outbound = {
|
|
20
|
-
name: string;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
parameters?: {
|
|
23
|
-
[k: string]: any;
|
|
24
|
-
} | undefined;
|
|
25
|
-
strict?: boolean | null | undefined;
|
|
26
|
-
};
|
|
27
|
-
/** @internal */
|
|
28
|
-
export declare const ToolFunction$outboundSchema: z.ZodType<ToolFunction$Outbound, ToolFunction>;
|
|
29
|
-
/**
|
|
30
|
-
* @internal
|
|
31
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
-
*/
|
|
33
|
-
export declare namespace ToolFunction$ {
|
|
34
|
-
/** @deprecated use `ToolFunction$inboundSchema` instead. */
|
|
35
|
-
const inboundSchema: z.ZodType<ToolFunction, unknown, z.core.$ZodTypeInternals<ToolFunction, unknown>>;
|
|
36
|
-
/** @deprecated use `ToolFunction$outboundSchema` instead. */
|
|
37
|
-
const outboundSchema: z.ZodType<ToolFunction$Outbound, ToolFunction, z.core.$ZodTypeInternals<ToolFunction$Outbound, ToolFunction>>;
|
|
38
|
-
/** @deprecated use `ToolFunction$Outbound` instead. */
|
|
39
|
-
type Outbound = ToolFunction$Outbound;
|
|
40
|
-
}
|
|
41
|
-
export declare function toolFunctionToJSON(toolFunction: ToolFunction): string;
|
|
42
|
-
export declare function toolFunctionFromJSON(jsonString: string): SafeParseResult<ToolFunction, SDKValidationError>;
|
|
43
|
-
/** @internal */
|
|
44
|
-
export declare const Tool$inboundSchema: z.ZodType<Tool, unknown>;
|
|
45
|
-
/** @internal */
|
|
46
|
-
export type Tool$Outbound = {
|
|
47
|
-
type: "function";
|
|
48
|
-
function: ToolFunction$Outbound;
|
|
49
|
-
};
|
|
50
|
-
/** @internal */
|
|
51
|
-
export declare const Tool$outboundSchema: z.ZodType<Tool$Outbound, Tool>;
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
-
*/
|
|
56
|
-
export declare namespace Tool$ {
|
|
57
|
-
/** @deprecated use `Tool$inboundSchema` instead. */
|
|
58
|
-
const inboundSchema: z.ZodType<Tool, unknown, z.core.$ZodTypeInternals<Tool, unknown>>;
|
|
59
|
-
/** @deprecated use `Tool$outboundSchema` instead. */
|
|
60
|
-
const outboundSchema: z.ZodType<Tool$Outbound, Tool, z.core.$ZodTypeInternals<Tool$Outbound, Tool>>;
|
|
61
|
-
/** @deprecated use `Tool$Outbound` instead. */
|
|
62
|
-
type Outbound = Tool$Outbound;
|
|
63
|
-
}
|
|
64
|
-
export declare function toolToJSON(tool: Tool): string;
|
|
65
|
-
export declare function toolFromJSON(jsonString: string): SafeParseResult<Tool, SDKValidationError>;
|
|
66
|
-
//# sourceMappingURL=tool.d.ts.map
|