diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 5850025d..059b2612 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 16f22cbf-f23f-4419-8924-3a4b06381947 management: - docChecksum: 75338df5d596b761fe73fe6ff177a197 + docChecksum: a6fee1797b2da7ccbaf7743772a40b56 docVersion: 0.0.3 - speakeasyVersion: 1.392.1 - generationVersion: 2.411.9 - releaseVersion: 0.21.1 - configChecksum: 34ca28189c800b0933ed3de23dc9a3ca + speakeasyVersion: 1.394.0 + generationVersion: 2.413.0 + releaseVersion: 0.22.0 + configChecksum: d564900123a71faa49f3efd7732519bf repoURL: https://github.com/LukeHagar/plexjs.git repoSubDirectory: . installationURL: https://github.com/LukeHagar/plexjs @@ -15,7 +15,7 @@ features: typescript: additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.16.4 + core: 3.17.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 downloadStreams: 0.1.1 @@ -43,297 +43,297 @@ generatedFiles: - RUNTIMES.md - USAGE.md - docs/lib/utils/retryconfig.md + - docs/sdk/models/errors/addplaylistcontentsbadrequest.md - docs/sdk/models/errors/addplaylistcontentserrors.md - docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md - - docs/sdk/models/errors/addplaylistcontentsplaylistsresponsebody.md - - docs/sdk/models/errors/addplaylistcontentsresponsebody.md + - docs/sdk/models/errors/addplaylistcontentsunauthorized.md + - docs/sdk/models/errors/applyupdatesbadrequest.md - docs/sdk/models/errors/applyupdateserrors.md - - docs/sdk/models/errors/applyupdatesresponsebody.md + - docs/sdk/models/errors/applyupdatesunauthorized.md - docs/sdk/models/errors/applyupdatesupdatererrors.md - - docs/sdk/models/errors/applyupdatesupdaterresponsebody.md - docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md - - docs/sdk/models/errors/cancelserveractivitiesactivitiesresponsebody.md + - docs/sdk/models/errors/cancelserveractivitiesbadrequest.md - docs/sdk/models/errors/cancelserveractivitieserrors.md - - docs/sdk/models/errors/cancelserveractivitiesresponsebody.md + - docs/sdk/models/errors/cancelserveractivitiesunauthorized.md + - docs/sdk/models/errors/checkforupdatesbadrequest.md - docs/sdk/models/errors/checkforupdateserrors.md - - docs/sdk/models/errors/checkforupdatesresponsebody.md + - docs/sdk/models/errors/checkforupdatesunauthorized.md - docs/sdk/models/errors/checkforupdatesupdatererrors.md - - docs/sdk/models/errors/checkforupdatesupdaterresponsebody.md + - docs/sdk/models/errors/clearplaylistcontentsbadrequest.md - docs/sdk/models/errors/clearplaylistcontentserrors.md - docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md - - docs/sdk/models/errors/clearplaylistcontentsplaylistsresponsebody.md - - docs/sdk/models/errors/clearplaylistcontentsresponsebody.md + - docs/sdk/models/errors/clearplaylistcontentsunauthorized.md + - docs/sdk/models/errors/createplaylistbadrequest.md - docs/sdk/models/errors/createplaylisterrors.md - docs/sdk/models/errors/createplaylistplaylistserrors.md - - docs/sdk/models/errors/createplaylistplaylistsresponsebody.md - - docs/sdk/models/errors/createplaylistresponsebody.md + - docs/sdk/models/errors/createplaylistunauthorized.md + - docs/sdk/models/errors/deletelibrarybadrequest.md - docs/sdk/models/errors/deletelibraryerrors.md - docs/sdk/models/errors/deletelibrarylibraryerrors.md - - docs/sdk/models/errors/deletelibrarylibraryresponsebody.md - - docs/sdk/models/errors/deletelibraryresponsebody.md + - docs/sdk/models/errors/deletelibraryunauthorized.md + - docs/sdk/models/errors/deleteplaylistbadrequest.md - docs/sdk/models/errors/deleteplaylisterrors.md - docs/sdk/models/errors/deleteplaylistplaylistserrors.md - - docs/sdk/models/errors/deleteplaylistplaylistsresponsebody.md - - docs/sdk/models/errors/deleteplaylistresponsebody.md + - docs/sdk/models/errors/deleteplaylistunauthorized.md + - docs/sdk/models/errors/enablepapertrailbadrequest.md - docs/sdk/models/errors/enablepapertrailerrors.md - docs/sdk/models/errors/enablepapertraillogerrors.md - - docs/sdk/models/errors/enablepapertraillogresponsebody.md - - docs/sdk/models/errors/enablepapertrailresponsebody.md + - docs/sdk/models/errors/enablepapertrailunauthorized.md - docs/sdk/models/errors/errors.md + - docs/sdk/models/errors/getalllibrariesbadrequest.md - docs/sdk/models/errors/getalllibrarieserrors.md - docs/sdk/models/errors/getalllibrarieslibraryerrors.md - - docs/sdk/models/errors/getalllibrarieslibraryresponsebody.md - - docs/sdk/models/errors/getalllibrariesresponsebody.md + - docs/sdk/models/errors/getalllibrariesunauthorized.md + - docs/sdk/models/errors/getavailableclientsbadrequest.md - docs/sdk/models/errors/getavailableclientserrors.md - - docs/sdk/models/errors/getavailableclientsresponsebody.md - docs/sdk/models/errors/getavailableclientsservererrors.md - - docs/sdk/models/errors/getavailableclientsserverresponsebody.md + - docs/sdk/models/errors/getavailableclientsunauthorized.md + - docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md - docs/sdk/models/errors/getbandwidthstatisticserrors.md - - docs/sdk/models/errors/getbandwidthstatisticsresponsebody.md - docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md - - docs/sdk/models/errors/getbandwidthstatisticsstatisticsresponsebody.md + - docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md + - docs/sdk/models/errors/getbannerimagebadrequest.md - docs/sdk/models/errors/getbannerimageerrors.md - docs/sdk/models/errors/getbannerimagemediaerrors.md - - docs/sdk/models/errors/getbannerimagemediaresponsebody.md - - docs/sdk/models/errors/getbannerimageresponsebody.md + - docs/sdk/models/errors/getbannerimageunauthorized.md + - docs/sdk/models/errors/getbutlertasksbadrequest.md - docs/sdk/models/errors/getbutlertasksbutlererrors.md - - docs/sdk/models/errors/getbutlertasksbutlerresponsebody.md - docs/sdk/models/errors/getbutlertaskserrors.md - - docs/sdk/models/errors/getbutlertasksresponsebody.md + - docs/sdk/models/errors/getbutlertasksunauthorized.md + - docs/sdk/models/errors/getcompanionsdatabadrequest.md - docs/sdk/models/errors/getcompanionsdataerrors.md - docs/sdk/models/errors/getcompanionsdataplexerrors.md - - docs/sdk/models/errors/getcompanionsdataplexresponsebody.md - - docs/sdk/models/errors/getcompanionsdataresponsebody.md + - docs/sdk/models/errors/getcompanionsdataunauthorized.md + - docs/sdk/models/errors/getdevicesbadrequest.md - docs/sdk/models/errors/getdeviceserrors.md - - docs/sdk/models/errors/getdevicesresponsebody.md - docs/sdk/models/errors/getdevicesservererrors.md - - docs/sdk/models/errors/getdevicesserverresponsebody.md + - docs/sdk/models/errors/getdevicesunauthorized.md + - docs/sdk/models/errors/getfilehashbadrequest.md - docs/sdk/models/errors/getfilehasherrors.md - docs/sdk/models/errors/getfilehashlibraryerrors.md - - docs/sdk/models/errors/getfilehashlibraryresponsebody.md - - docs/sdk/models/errors/getfilehashresponsebody.md + - docs/sdk/models/errors/getfilehashunauthorized.md + - docs/sdk/models/errors/getgeodatabadrequest.md - docs/sdk/models/errors/getgeodataerrors.md - docs/sdk/models/errors/getgeodataplexerrors.md - - docs/sdk/models/errors/getgeodataplexresponsebody.md - - docs/sdk/models/errors/getgeodataresponsebody.md + - docs/sdk/models/errors/getgeodataunauthorized.md + - docs/sdk/models/errors/getglobalhubsbadrequest.md - docs/sdk/models/errors/getglobalhubserrors.md - docs/sdk/models/errors/getglobalhubshubserrors.md - - docs/sdk/models/errors/getglobalhubshubsresponsebody.md - - docs/sdk/models/errors/getglobalhubsresponsebody.md + - docs/sdk/models/errors/getglobalhubsunauthorized.md + - docs/sdk/models/errors/gethomedatabadrequest.md - docs/sdk/models/errors/gethomedataerrors.md - docs/sdk/models/errors/gethomedataplexerrors.md - - docs/sdk/models/errors/gethomedataplexresponsebody.md - - docs/sdk/models/errors/gethomedataresponsebody.md + - docs/sdk/models/errors/gethomedataunauthorized.md + - docs/sdk/models/errors/getlibrarydetailsbadrequest.md - docs/sdk/models/errors/getlibrarydetailserrors.md - docs/sdk/models/errors/getlibrarydetailslibraryerrors.md - - docs/sdk/models/errors/getlibrarydetailslibraryresponsebody.md - - docs/sdk/models/errors/getlibrarydetailsresponsebody.md + - docs/sdk/models/errors/getlibrarydetailsunauthorized.md + - docs/sdk/models/errors/getlibraryhubsbadrequest.md - docs/sdk/models/errors/getlibraryhubserrors.md - docs/sdk/models/errors/getlibraryhubshubserrors.md - - docs/sdk/models/errors/getlibraryhubshubsresponsebody.md - - docs/sdk/models/errors/getlibraryhubsresponsebody.md + - docs/sdk/models/errors/getlibraryhubsunauthorized.md + - docs/sdk/models/errors/getlibraryitemsbadrequest.md - docs/sdk/models/errors/getlibraryitemserrors.md - docs/sdk/models/errors/getlibraryitemslibraryerrors.md - - docs/sdk/models/errors/getlibraryitemslibraryresponsebody.md - - docs/sdk/models/errors/getlibraryitemsresponsebody.md + - docs/sdk/models/errors/getlibraryitemsunauthorized.md + - docs/sdk/models/errors/getmediaprovidersbadrequest.md - docs/sdk/models/errors/getmediaproviderserrors.md - - docs/sdk/models/errors/getmediaprovidersresponsebody.md - docs/sdk/models/errors/getmediaprovidersservererrors.md - - docs/sdk/models/errors/getmediaprovidersserverresponsebody.md + - docs/sdk/models/errors/getmediaprovidersunauthorized.md + - docs/sdk/models/errors/getmetadatabyratingkeybadrequest.md - docs/sdk/models/errors/getmetadatabyratingkeyerrors.md - docs/sdk/models/errors/getmetadatabyratingkeylibraryerrors.md - - docs/sdk/models/errors/getmetadatabyratingkeylibraryresponsebody.md - - docs/sdk/models/errors/getmetadatabyratingkeyresponsebody.md + - docs/sdk/models/errors/getmetadatabyratingkeyunauthorized.md + - docs/sdk/models/errors/getmetadatachildrenbadrequest.md - docs/sdk/models/errors/getmetadatachildrenerrors.md - docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md - - docs/sdk/models/errors/getmetadatachildrenlibraryresponsebody.md - - docs/sdk/models/errors/getmetadatachildrenresponsebody.md + - docs/sdk/models/errors/getmetadatachildrenunauthorized.md + - docs/sdk/models/errors/getmyplexaccountbadrequest.md - docs/sdk/models/errors/getmyplexaccounterrors.md - - docs/sdk/models/errors/getmyplexaccountresponsebody.md - docs/sdk/models/errors/getmyplexaccountservererrors.md - - docs/sdk/models/errors/getmyplexaccountserverresponsebody.md + - docs/sdk/models/errors/getmyplexaccountunauthorized.md + - docs/sdk/models/errors/getondeckbadrequest.md - docs/sdk/models/errors/getondeckerrors.md - docs/sdk/models/errors/getondecklibraryerrors.md - - docs/sdk/models/errors/getondecklibraryresponsebody.md - - docs/sdk/models/errors/getondeckresponsebody.md + - docs/sdk/models/errors/getondeckunauthorized.md + - docs/sdk/models/errors/getpinbadrequest.md - docs/sdk/models/errors/getpinerrors.md - - docs/sdk/models/errors/getpinresponsebody.md + - docs/sdk/models/errors/getplaylistbadrequest.md + - docs/sdk/models/errors/getplaylistcontentsbadrequest.md - docs/sdk/models/errors/getplaylistcontentserrors.md - docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md - - docs/sdk/models/errors/getplaylistcontentsplaylistsresponsebody.md - - docs/sdk/models/errors/getplaylistcontentsresponsebody.md + - docs/sdk/models/errors/getplaylistcontentsunauthorized.md - docs/sdk/models/errors/getplaylisterrors.md - docs/sdk/models/errors/getplaylistplaylistserrors.md - - docs/sdk/models/errors/getplaylistplaylistsresponsebody.md - - docs/sdk/models/errors/getplaylistresponsebody.md + - docs/sdk/models/errors/getplaylistsbadrequest.md - docs/sdk/models/errors/getplaylistserrors.md - docs/sdk/models/errors/getplaylistsplaylistserrors.md - - docs/sdk/models/errors/getplaylistsplaylistsresponsebody.md - - docs/sdk/models/errors/getplaylistsresponsebody.md + - docs/sdk/models/errors/getplaylistsunauthorized.md + - docs/sdk/models/errors/getplaylistunauthorized.md + - docs/sdk/models/errors/getrecentlyaddedbadrequest.md - docs/sdk/models/errors/getrecentlyaddederrors.md - docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md - - docs/sdk/models/errors/getrecentlyaddedlibraryresponsebody.md - - docs/sdk/models/errors/getrecentlyaddedresponsebody.md + - docs/sdk/models/errors/getrecentlyaddedunauthorized.md + - docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md - docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md - docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md - - docs/sdk/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md - - docs/sdk/models/errors/getrefreshlibrarymetadataresponsebody.md + - docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md + - docs/sdk/models/errors/getresizedphotobadrequest.md - docs/sdk/models/errors/getresizedphotoerrors.md - - docs/sdk/models/errors/getresizedphotoresponsebody.md - docs/sdk/models/errors/getresizedphotoservererrors.md - - docs/sdk/models/errors/getresizedphotoserverresponsebody.md + - docs/sdk/models/errors/getresizedphotounauthorized.md + - docs/sdk/models/errors/getresourcesstatisticsbadrequest.md - docs/sdk/models/errors/getresourcesstatisticserrors.md - - docs/sdk/models/errors/getresourcesstatisticsresponsebody.md - docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md - - docs/sdk/models/errors/getresourcesstatisticsstatisticsresponsebody.md + - docs/sdk/models/errors/getresourcesstatisticsunauthorized.md + - docs/sdk/models/errors/getsearchlibrarybadrequest.md - docs/sdk/models/errors/getsearchlibraryerrors.md - docs/sdk/models/errors/getsearchlibrarylibraryerrors.md - - docs/sdk/models/errors/getsearchlibrarylibraryresponsebody.md - - docs/sdk/models/errors/getsearchlibraryresponsebody.md + - docs/sdk/models/errors/getsearchlibraryunauthorized.md + - docs/sdk/models/errors/getsearchresultsbadrequest.md - docs/sdk/models/errors/getsearchresultserrors.md - - docs/sdk/models/errors/getsearchresultsresponsebody.md - docs/sdk/models/errors/getsearchresultssearcherrors.md - - docs/sdk/models/errors/getsearchresultssearchresponsebody.md + - docs/sdk/models/errors/getsearchresultsunauthorized.md - docs/sdk/models/errors/getserveractivitiesactivitieserrors.md - - docs/sdk/models/errors/getserveractivitiesactivitiesresponsebody.md + - docs/sdk/models/errors/getserveractivitiesbadrequest.md - docs/sdk/models/errors/getserveractivitieserrors.md - - docs/sdk/models/errors/getserveractivitiesresponsebody.md + - docs/sdk/models/errors/getserveractivitiesunauthorized.md + - docs/sdk/models/errors/getservercapabilitiesbadrequest.md - docs/sdk/models/errors/getservercapabilitieserrors.md - - docs/sdk/models/errors/getservercapabilitiesresponsebody.md - - docs/sdk/models/errors/getservercapabilitiesserverresponsebody.md - - docs/sdk/models/errors/getserveridentityresponsebody.md + - docs/sdk/models/errors/getservercapabilitiesunauthorized.md + - docs/sdk/models/errors/getserveridentityrequesttimeout.md + - docs/sdk/models/errors/getserverlistbadrequest.md - docs/sdk/models/errors/getserverlisterrors.md - - docs/sdk/models/errors/getserverlistresponsebody.md - docs/sdk/models/errors/getserverlistservererrors.md - - docs/sdk/models/errors/getserverlistserverresponsebody.md + - docs/sdk/models/errors/getserverlistunauthorized.md + - docs/sdk/models/errors/getserverpreferencesbadrequest.md - docs/sdk/models/errors/getserverpreferenceserrors.md - - docs/sdk/models/errors/getserverpreferencesresponsebody.md - docs/sdk/models/errors/getserverpreferencesservererrors.md - - docs/sdk/models/errors/getserverpreferencesserverresponsebody.md + - docs/sdk/models/errors/getserverpreferencesunauthorized.md + - docs/sdk/models/errors/getserverresourcesbadrequest.md - docs/sdk/models/errors/getserverresourceserrors.md - docs/sdk/models/errors/getserverresourcesplexerrors.md - - docs/sdk/models/errors/getserverresourcesplexresponsebody.md - - docs/sdk/models/errors/getserverresourcesresponsebody.md + - docs/sdk/models/errors/getserverresourcesunauthorized.md + - docs/sdk/models/errors/getsessionhistorybadrequest.md - docs/sdk/models/errors/getsessionhistoryerrors.md - - docs/sdk/models/errors/getsessionhistoryresponsebody.md - docs/sdk/models/errors/getsessionhistorysessionserrors.md - - docs/sdk/models/errors/getsessionhistorysessionsresponsebody.md + - docs/sdk/models/errors/getsessionhistoryunauthorized.md + - docs/sdk/models/errors/getsessionsbadrequest.md - docs/sdk/models/errors/getsessionserrors.md - - docs/sdk/models/errors/getsessionsresponsebody.md - docs/sdk/models/errors/getsessionssessionserrors.md - - docs/sdk/models/errors/getsessionssessionsresponsebody.md + - docs/sdk/models/errors/getsessionsunauthorized.md - docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md - - docs/sdk/models/errors/getsourceconnectioninformationauthenticationresponsebody.md + - docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md - docs/sdk/models/errors/getsourceconnectioninformationerrors.md - - docs/sdk/models/errors/getsourceconnectioninformationresponsebody.md + - docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md + - docs/sdk/models/errors/getstatisticsbadrequest.md - docs/sdk/models/errors/getstatisticserrors.md - - docs/sdk/models/errors/getstatisticsresponsebody.md - docs/sdk/models/errors/getstatisticsstatisticserrors.md - - docs/sdk/models/errors/getstatisticsstatisticsresponsebody.md + - docs/sdk/models/errors/getstatisticsunauthorized.md + - docs/sdk/models/errors/getthumbimagebadrequest.md - docs/sdk/models/errors/getthumbimageerrors.md - docs/sdk/models/errors/getthumbimagemediaerrors.md - - docs/sdk/models/errors/getthumbimagemediaresponsebody.md - - docs/sdk/models/errors/getthumbimageresponsebody.md + - docs/sdk/models/errors/getthumbimageunauthorized.md + - docs/sdk/models/errors/gettimelinebadrequest.md - docs/sdk/models/errors/gettimelineerrors.md - - docs/sdk/models/errors/gettimelineresponsebody.md + - docs/sdk/models/errors/gettimelineunauthorized.md - docs/sdk/models/errors/gettimelinevideoerrors.md - - docs/sdk/models/errors/gettimelinevideoresponsebody.md + - docs/sdk/models/errors/gettokenbypinidbadrequest.md - docs/sdk/models/errors/gettokenbypiniderrors.md - docs/sdk/models/errors/gettokenbypinidplexerrors.md - - docs/sdk/models/errors/gettokenbypinidplexresponsebody.md - docs/sdk/models/errors/gettokenbypinidresponsebody.md + - docs/sdk/models/errors/gettokendetailsauthenticationerrors.md + - docs/sdk/models/errors/gettokendetailsbadrequest.md + - docs/sdk/models/errors/gettokendetailserrors.md + - docs/sdk/models/errors/gettokendetailsunauthorized.md + - docs/sdk/models/errors/gettopwatchedcontentbadrequest.md - docs/sdk/models/errors/gettopwatchedcontenterrors.md - docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md - - docs/sdk/models/errors/gettopwatchedcontentlibraryresponsebody.md - - docs/sdk/models/errors/gettopwatchedcontentresponsebody.md + - docs/sdk/models/errors/gettopwatchedcontentunauthorized.md + - docs/sdk/models/errors/gettranscodesessionsbadrequest.md - docs/sdk/models/errors/gettranscodesessionserrors.md - - docs/sdk/models/errors/gettranscodesessionsresponsebody.md - docs/sdk/models/errors/gettranscodesessionssessionserrors.md - - docs/sdk/models/errors/gettranscodesessionssessionsresponsebody.md + - docs/sdk/models/errors/gettranscodesessionsunauthorized.md - docs/sdk/models/errors/gettransienttokenauthenticationerrors.md - - docs/sdk/models/errors/gettransienttokenauthenticationresponsebody.md + - docs/sdk/models/errors/gettransienttokenbadrequest.md - docs/sdk/models/errors/gettransienttokenerrors.md - - docs/sdk/models/errors/gettransienttokenresponsebody.md + - docs/sdk/models/errors/gettransienttokenunauthorized.md + - docs/sdk/models/errors/getupdatestatusbadrequest.md - docs/sdk/models/errors/getupdatestatuserrors.md - - docs/sdk/models/errors/getupdatestatusresponsebody.md + - docs/sdk/models/errors/getupdatestatusunauthorized.md - docs/sdk/models/errors/getupdatestatusupdatererrors.md - - docs/sdk/models/errors/getupdatestatusupdaterresponsebody.md - - docs/sdk/models/errors/getuserdetailsauthenticationerrors.md - - docs/sdk/models/errors/getuserdetailsauthenticationresponsebody.md - - docs/sdk/models/errors/getuserdetailserrors.md - - docs/sdk/models/errors/getuserdetailsresponsebody.md + - docs/sdk/models/errors/getuserfriendsbadrequest.md - docs/sdk/models/errors/getuserfriendserrors.md - docs/sdk/models/errors/getuserfriendsplexerrors.md - - docs/sdk/models/errors/getuserfriendsplexresponsebody.md - - docs/sdk/models/errors/getuserfriendsresponsebody.md + - docs/sdk/models/errors/getuserfriendsunauthorized.md + - docs/sdk/models/errors/getwatchlistbadrequest.md - docs/sdk/models/errors/getwatchlisterrors.md - - docs/sdk/models/errors/getwatchlistresponsebody.md + - docs/sdk/models/errors/getwatchlistunauthorized.md - docs/sdk/models/errors/getwatchlistwatchlisterrors.md - - docs/sdk/models/errors/getwatchlistwatchlistresponsebody.md + - docs/sdk/models/errors/loglinebadrequest.md - docs/sdk/models/errors/loglineerrors.md - docs/sdk/models/errors/loglinelogerrors.md - - docs/sdk/models/errors/loglinelogresponsebody.md - - docs/sdk/models/errors/loglineresponsebody.md + - docs/sdk/models/errors/loglineunauthorized.md + - docs/sdk/models/errors/logmultilinebadrequest.md - docs/sdk/models/errors/logmultilineerrors.md - docs/sdk/models/errors/logmultilinelogerrors.md - - docs/sdk/models/errors/logmultilinelogresponsebody.md - - docs/sdk/models/errors/logmultilineresponsebody.md + - docs/sdk/models/errors/logmultilineunauthorized.md + - docs/sdk/models/errors/markplayedbadrequest.md - docs/sdk/models/errors/markplayederrors.md - docs/sdk/models/errors/markplayedmediaerrors.md - - docs/sdk/models/errors/markplayedmediaresponsebody.md - - docs/sdk/models/errors/markplayedresponsebody.md + - docs/sdk/models/errors/markplayedunauthorized.md + - docs/sdk/models/errors/markunplayedbadrequest.md - docs/sdk/models/errors/markunplayederrors.md - docs/sdk/models/errors/markunplayedmediaerrors.md - - docs/sdk/models/errors/markunplayedmediaresponsebody.md - - docs/sdk/models/errors/markunplayedresponsebody.md + - docs/sdk/models/errors/markunplayedunauthorized.md + - docs/sdk/models/errors/performsearchbadrequest.md - docs/sdk/models/errors/performsearcherrors.md - - docs/sdk/models/errors/performsearchresponsebody.md - docs/sdk/models/errors/performsearchsearcherrors.md - - docs/sdk/models/errors/performsearchsearchresponsebody.md + - docs/sdk/models/errors/performsearchunauthorized.md + - docs/sdk/models/errors/performvoicesearchbadrequest.md - docs/sdk/models/errors/performvoicesearcherrors.md - - docs/sdk/models/errors/performvoicesearchresponsebody.md - docs/sdk/models/errors/performvoicesearchsearcherrors.md - - docs/sdk/models/errors/performvoicesearchsearchresponsebody.md + - docs/sdk/models/errors/performvoicesearchunauthorized.md - docs/sdk/models/errors/postuserssignindataauthenticationerrors.md - - docs/sdk/models/errors/postuserssignindataauthenticationresponsebody.md + - docs/sdk/models/errors/postuserssignindatabadrequest.md - docs/sdk/models/errors/postuserssignindataerrors.md - - docs/sdk/models/errors/postuserssignindataresponsebody.md + - docs/sdk/models/errors/postuserssignindataunauthorized.md + - docs/sdk/models/errors/startalltasksbadrequest.md - docs/sdk/models/errors/startalltasksbutlererrors.md - - docs/sdk/models/errors/startalltasksbutlerresponsebody.md - docs/sdk/models/errors/startalltaskserrors.md - - docs/sdk/models/errors/startalltasksresponsebody.md + - docs/sdk/models/errors/startalltasksunauthorized.md + - docs/sdk/models/errors/starttaskbadrequest.md - docs/sdk/models/errors/starttaskbutlererrors.md - - docs/sdk/models/errors/starttaskbutlerresponsebody.md - docs/sdk/models/errors/starttaskerrors.md - - docs/sdk/models/errors/starttaskresponsebody.md + - docs/sdk/models/errors/starttaskunauthorized.md + - docs/sdk/models/errors/startuniversaltranscodebadrequest.md - docs/sdk/models/errors/startuniversaltranscodeerrors.md - - docs/sdk/models/errors/startuniversaltranscoderesponsebody.md + - docs/sdk/models/errors/startuniversaltranscodeunauthorized.md - docs/sdk/models/errors/startuniversaltranscodevideoerrors.md - - docs/sdk/models/errors/startuniversaltranscodevideoresponsebody.md + - docs/sdk/models/errors/stopalltasksbadrequest.md - docs/sdk/models/errors/stopalltasksbutlererrors.md - - docs/sdk/models/errors/stopalltasksbutlerresponsebody.md - docs/sdk/models/errors/stopalltaskserrors.md - - docs/sdk/models/errors/stopalltasksresponsebody.md + - docs/sdk/models/errors/stopalltasksunauthorized.md + - docs/sdk/models/errors/stoptaskbadrequest.md - docs/sdk/models/errors/stoptaskbutlererrors.md - - docs/sdk/models/errors/stoptaskbutlerresponsebody.md - docs/sdk/models/errors/stoptaskerrors.md - - docs/sdk/models/errors/stoptaskresponsebody.md + - docs/sdk/models/errors/stoptaskunauthorized.md + - docs/sdk/models/errors/stoptranscodesessionbadrequest.md - docs/sdk/models/errors/stoptranscodesessionerrors.md - - docs/sdk/models/errors/stoptranscodesessionresponsebody.md - docs/sdk/models/errors/stoptranscodesessionsessionserrors.md - - docs/sdk/models/errors/stoptranscodesessionsessionsresponsebody.md + - docs/sdk/models/errors/stoptranscodesessionunauthorized.md + - docs/sdk/models/errors/updateplaylistbadrequest.md - docs/sdk/models/errors/updateplaylisterrors.md - docs/sdk/models/errors/updateplaylistplaylistserrors.md - - docs/sdk/models/errors/updateplaylistplaylistsresponsebody.md - - docs/sdk/models/errors/updateplaylistresponsebody.md + - docs/sdk/models/errors/updateplaylistunauthorized.md + - docs/sdk/models/errors/updateplayprogressbadrequest.md - docs/sdk/models/errors/updateplayprogresserrors.md - docs/sdk/models/errors/updateplayprogressmediaerrors.md - - docs/sdk/models/errors/updateplayprogressmediaresponsebody.md - - docs/sdk/models/errors/updateplayprogressresponsebody.md + - docs/sdk/models/errors/updateplayprogressunauthorized.md + - docs/sdk/models/errors/uploadplaylistbadrequest.md - docs/sdk/models/errors/uploadplaylisterrors.md - docs/sdk/models/errors/uploadplaylistplaylistserrors.md - - docs/sdk/models/errors/uploadplaylistplaylistsresponsebody.md - - docs/sdk/models/errors/uploadplaylistresponsebody.md + - docs/sdk/models/errors/uploadplaylistunauthorized.md - docs/sdk/models/operations/account.md - docs/sdk/models/operations/activity.md - docs/sdk/models/operations/addplaylistcontentsmediacontainer.md @@ -583,6 +583,13 @@ generatedFiles: - docs/sdk/models/operations/gettokenbypinidglobals.md - docs/sdk/models/operations/gettokenbypinidrequest.md - docs/sdk/models/operations/gettokenbypinidresponse.md + - docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md + - docs/sdk/models/operations/gettokendetailsauthenticationstatus.md + - docs/sdk/models/operations/gettokendetailsfeatures.md + - docs/sdk/models/operations/gettokendetailsresponse.md + - docs/sdk/models/operations/gettokendetailsstatus.md + - docs/sdk/models/operations/gettokendetailssubscription.md + - docs/sdk/models/operations/gettokendetailsuserplexaccount.md - docs/sdk/models/operations/gettopwatchedcontentcountry.md - docs/sdk/models/operations/gettopwatchedcontentgenre.md - docs/sdk/models/operations/gettopwatchedcontentguids.md @@ -602,14 +609,6 @@ generatedFiles: - docs/sdk/models/operations/getupdatestatusmediacontainer.md - docs/sdk/models/operations/getupdatestatusresponse.md - docs/sdk/models/operations/getupdatestatusresponsebody.md - - docs/sdk/models/operations/getuserdetailsauthenticationresponsestatus.md - - docs/sdk/models/operations/getuserdetailsauthenticationstatus.md - - docs/sdk/models/operations/getuserdetailsfeatures.md - - docs/sdk/models/operations/getuserdetailsrequest.md - - docs/sdk/models/operations/getuserdetailsresponse.md - - docs/sdk/models/operations/getuserdetailsstatus.md - - docs/sdk/models/operations/getuserdetailssubscription.md - - docs/sdk/models/operations/getuserdetailsuserplexaccount.md - docs/sdk/models/operations/getuserfriendsresponse.md - docs/sdk/models/operations/getwatchlistrequest.md - docs/sdk/models/operations/getwatchlistresponse.md @@ -759,8 +758,8 @@ generatedFiles: - src/funcs/activitiesCancelServerActivities.ts - src/funcs/activitiesGetServerActivities.ts - src/funcs/authenticationGetSourceConnectionInformation.ts + - src/funcs/authenticationGetTokenDetails.ts - src/funcs/authenticationGetTransientToken.ts - - src/funcs/authenticationGetUserDetails.ts - src/funcs/authenticationPostUsersSignInData.ts - src/funcs/butlerGetButlerTasks.ts - src/funcs/butlerStartAllTasks.ts @@ -908,11 +907,11 @@ generatedFiles: - src/sdk/models/errors/getthumbimage.ts - src/sdk/models/errors/gettimeline.ts - src/sdk/models/errors/gettokenbypinid.ts + - src/sdk/models/errors/gettokendetails.ts - src/sdk/models/errors/gettopwatchedcontent.ts - src/sdk/models/errors/gettranscodesessions.ts - src/sdk/models/errors/gettransienttoken.ts - src/sdk/models/errors/getupdatestatus.ts - - src/sdk/models/errors/getuserdetails.ts - src/sdk/models/errors/getuserfriends.ts - src/sdk/models/errors/getwatchlist.ts - src/sdk/models/errors/httpclienterrors.ts @@ -986,11 +985,11 @@ generatedFiles: - src/sdk/models/operations/getthumbimage.ts - src/sdk/models/operations/gettimeline.ts - src/sdk/models/operations/gettokenbypinid.ts + - src/sdk/models/operations/gettokendetails.ts - src/sdk/models/operations/gettopwatchedcontent.ts - src/sdk/models/operations/gettranscodesessions.ts - src/sdk/models/operations/gettransienttoken.ts - src/sdk/models/operations/getupdatestatus.ts - - src/sdk/models/operations/getuserdetails.ts - src/sdk/models/operations/getuserfriends.ts - src/sdk/models/operations/getwatchlist.ts - src/sdk/models/operations/index.ts @@ -1337,7 +1336,8 @@ examples: responses: "401": application/json: {"errors": []} - "200": {} + "200": + application/json: [] "400": application/json: {"errors": []} getPin: @@ -1959,3 +1959,12 @@ examples: application/json: {"errors": []} "400": application/json: {"errors": []} + getTokenDetails: + speakeasy-default-get-token-details: + responses: + "200": + application/json: {"adsConsent": true, "adsConsentReminderAt": "2019-08-24T14:15:22Z", "adsConsentSetAt": "2019-08-24T14:15:22Z", "anonymous": false, "authToken": "CxoUzBTSV5hsxjTpFKaf", "backupCodesCreated": false, "confirmed": false, "country": "US", "email": "username@email.com", "emailOnlyAuth": false, "experimentalFeatures": false, "friendlyName": "friendlyUsername", "entitlements": [], "guest": false, "hasPassword": true, "home": false, "homeAdmin": false, "homeSize": 1, "id": 13692262, "joinedAt": 1721154902, "locale": null, "mailingListActive": false, "mailingListStatus": "unsubscribed", "maxHomeSize": 15, "pin": "string", "profile": {"autoSelectAudio": true, "defaultAudioLanguage": "ja", "defaultSubtitleLanguage": "en", "autoSelectSubtitle": "1", "defaultSubtitleAccessibility": "1", "defaultSubtitleForced": "0", "watchedIndicator": "1", "mediaReviewsVisibility": 0}, "protected": false, "rememberExpiresAt": 1722364046, "restricted": false, "roles": ["string"], "scrobbleTypes": "", "services": [{"identifier": "metadata-dev", "endpoint": "https://epg.provider.plex.tv", "token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", "secret": "string", "status": "online"}], "subscription": {"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}, "subscriptionDescription": "string", "subscriptions": [{"features": ["Android - Dolby Vision"], "active": true, "subscribedAt": "2021-04-12T18:21:12Z", "status": "Inactive", "paymentService": "string", "plan": "string"}], "thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", "title": "UsernameTitle", "twoFactorEnabled": false, "username": "Username", "uuid": "dae343c1f45beb4f"} + "400": + application/json: {"errors": []} + "401": + application/json: {"errors": []} diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index b3e8af0f..cf7087b3 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -12,7 +12,7 @@ generation: auth: oAuth2ClientCredentialsEnabled: true typescript: - version: 0.21.1 + version: 0.22.0 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 84ad38ab..c68bfd40 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.392.1 +speakeasyVersion: 1.394.0 sources: my-source: sourceNamespace: my-source - sourceRevisionDigest: sha256:06d2bc8083f30b9af5d98573735dcbe4b08efb34abd1829f8ce5d8a4a54f2a7c - sourceBlobDigest: sha256:ce28f3e6f2abc18cde6fb9e41093952eac55be5ad46b47b6f44fcdee1ca77eb2 + sourceRevisionDigest: sha256:289c5a73965c8fa779f32919d1353d0d275163982c0a0f5525ef4146c462a486 + sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9 tags: - latest - main @@ -11,10 +11,10 @@ targets: plexjs: source: my-source sourceNamespace: my-source - sourceRevisionDigest: sha256:06d2bc8083f30b9af5d98573735dcbe4b08efb34abd1829f8ce5d8a4a54f2a7c - sourceBlobDigest: sha256:ce28f3e6f2abc18cde6fb9e41093952eac55be5ad46b47b6f44fcdee1ca77eb2 + sourceRevisionDigest: sha256:289c5a73965c8fa779f32919d1353d0d275163982c0a0f5525ef4146c462a486 + sourceBlobDigest: sha256:f7e2709f52370dff16c1851a7a4e44a89f2e978e9cae335bffc10625950b3bd9 codeSamplesNamespace: code-samples-typescript-plexjs - codeSamplesRevisionDigest: sha256:449f01edd3f23d0c55b0daeac1240a8b08125fd34e06c09da47e9cb8222d2494 + codeSamplesRevisionDigest: sha256:4839a28a1c341cc984e5d46aabc2c5a1885e0fdea0a670ef61e83286ee087e19 outLocation: /github/workspace/repo workflow: workflowVersion: 1.0.0 diff --git a/README.md b/README.md index 103be1e5..54e26d72 100644 --- a/README.md +++ b/README.md @@ -72,15 +72,15 @@ yarn add @lukehagar/plexjs zod import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -189,9 +189,9 @@ run(); ### [authentication](docs/sdks/authentication/README.md) -* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token. +* [getTransientToken](docs/sdks/authentication/README.md#gettransienttoken) - Get a Transient Token * [getSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) - Get Source Connection Information -* [getUserDetails](docs/sdks/authentication/README.md#getuserdetails) - Get User Data By Token +* [getTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - Get Token Details * [postUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - Get User Sign In Data ### [statistics](docs/sdks/statistics/README.md) @@ -219,11 +219,11 @@ run(); All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. -| Error Object | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| errors.GetServerCapabilitiesResponseBody | 400 | application/json | -| errors.GetServerCapabilitiesServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetServerCapabilitiesBadRequest | 400 | application/json | +| errors.GetServerCapabilitiesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. @@ -231,47 +231,47 @@ Validation errors can also occur when either method arguments or data returned f ```typescript import { PlexAPI } from "@lukehagar/plexjs"; import { - GetServerCapabilitiesResponseBody, - GetServerCapabilitiesServerResponseBody, - SDKValidationError, + GetServerCapabilitiesBadRequest, + GetServerCapabilitiesUnauthorized, + SDKValidationError, } from "@lukehagar/plexjs/sdk/models/errors"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - let result; - try { - result = await plexAPI.server.getServerCapabilities(); + let result; + try { + result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); - } catch (err) { - switch (true) { - case err instanceof SDKValidationError: { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - case err instanceof GetServerCapabilitiesResponseBody: { - // Handle err.data$: GetServerCapabilitiesResponseBodyData - console.error(err); - return; - } - case err instanceof GetServerCapabilitiesServerResponseBody: { - // Handle err.data$: GetServerCapabilitiesServerResponseBodyData - console.error(err); - return; - } - default: { - throw err; - } - } + // Handle the result + console.log(result); + } catch (err) { + switch (true) { + case (err instanceof SDKValidationError): { + // Validation errors can be pretty-printed + console.error(err.pretty()); + // Raw value may also be inspected + console.error(err.rawValue); + return; + } + case (err instanceof GetServerCapabilitiesBadRequest): { + // Handle err.data$: GetServerCapabilitiesBadRequestData + console.error(err); + return; + } + case (err instanceof GetServerCapabilitiesUnauthorized): { + // Handle err.data$: GetServerCapabilitiesUnauthorizedData + console.error(err); + return; + } + default: { + throw err; + } } + } } run(); @@ -294,16 +294,16 @@ You can override the default server globally by passing a server index to the `s import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - serverIdx: 0, - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + serverIdx: 0, + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -325,16 +325,16 @@ The default server can also be overridden globally by passing a URL to the `serv import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - serverURL: "{protocol}://{ip}:{port}", - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + serverURL: "{protocol}://{ip}:{port}", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -348,17 +348,17 @@ The server URL can also be overridden on a per-operation basis, provided a serve import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.plex.getCompanionsData({ - serverURL: "https://plex.tv/api/v2/", - }); + const result = await plexAPI.plex.getCompanionsData({ + serverURL: "https://plex.tv/api/v2/", + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -431,15 +431,15 @@ To authenticate with the API the `accessToken` parameter must be set when initia import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -471,8 +471,8 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [activitiesCancelServerActivities](docs/sdks/activities/README.md#cancelserveractivities) - [activitiesGetServerActivities](docs/sdks/activities/README.md#getserveractivities) - [authenticationGetSourceConnectionInformation](docs/sdks/authentication/README.md#getsourceconnectioninformation) +- [authenticationGetTokenDetails](docs/sdks/authentication/README.md#gettokendetails) - [authenticationGetTransientToken](docs/sdks/authentication/README.md#gettransienttoken) -- [authenticationGetUserDetails](docs/sdks/authentication/README.md#getuserdetails) - [authenticationPostUsersSignInData](docs/sdks/authentication/README.md#postuserssignindata) - [butlerGetButlerTasks](docs/sdks/butler/README.md#getbutlertasks) - [butlerStartAllTasks](docs/sdks/butler/README.md#startalltasks) @@ -571,23 +571,27 @@ This is used to track the client application and its usage ```typescript import { PlexAPI } from "@lukehagar/plexjs"; -import { IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations"; +import { + IncludeHttps, + IncludeIPv6, + IncludeRelay, +} from "@lukehagar/plexjs/sdk/models/operations"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.plex.getServerResources({ - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - includeHttps: IncludeHttps.One, - includeRelay: IncludeRelay.One, - includeIPv6: IncludeIPv6.One, - }); + const result = await plexAPI.plex.getServerResources( + "gcgzw5rz2xovp84b4vha3a40", + IncludeHttps.One, + IncludeRelay.One, + IncludeIPv6.One, + ); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -605,26 +609,26 @@ To change the default retry strategy for a single API call, simply provide a ret import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities({ - retries: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - }); + const result = await plexAPI.server.getServerCapabilities({ + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); @@ -636,25 +640,25 @@ If you'd like to override the default retry strategy for all operations that sup import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - retryConfig: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, }, - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + retryConnectionErrors: false, + }, + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/RELEASES.md b/RELEASES.md index e3169d66..3455a8b3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -978,4 +978,14 @@ Based on: ### Generated - [typescript v0.21.1] . ### Releases -- [NPM v0.21.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.21.1 - . \ No newline at end of file +- [NPM v0.21.1] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.21.1 - . + +## 2024-09-10 00:09:01 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.394.0 (2.413.0) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.22.0] . +### Releases +- [NPM v0.22.0] https://www.npmjs.com/package/@lukehagar/plexjs/v/0.22.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index 34b6046a..6c40d0c4 100644 --- a/USAGE.md +++ b/USAGE.md @@ -3,15 +3,15 @@ import { PlexAPI } from "@lukehagar/plexjs"; const plexAPI = new PlexAPI({ - accessToken: "", - xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", + accessToken: "", + xPlexClientIdentifier: "gcgzw5rz2xovp84b4vha3a40", }); async function run() { - const result = await plexAPI.server.getServerCapabilities(); + const result = await plexAPI.server.getServerCapabilities(); - // Handle the result - console.log(result); + // Handle the result + console.log(result); } run(); diff --git a/codeSamples.yaml b/codeSamples.yaml index 2c30c173..dc563996 100644 --- a/codeSamples.yaml +++ b/codeSamples.yaml @@ -344,7 +344,7 @@ actions: x-codeSamples: - lang: typescript label: resources - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { IncludeHttps, IncludeIPv6, IncludeRelay } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getServerResources({\n xPlexToken: \"CV5xoxjTpFKUzBTShsaf\",\n includeHttps: IncludeHttps.One,\n includeRelay: IncludeRelay.One,\n includeIPv6: IncludeIPv6.One,\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + source: "import { PlexAPI } from \"@lukehagar/plexjs\";\nimport { IncludeHttps, IncludeIPv6, IncludeRelay } from \"@lukehagar/plexjs/sdk/models/operations\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.plex.getServerResources(\"gcgzw5rz2xovp84b4vha3a40\", IncludeHttps.One, IncludeRelay.One, IncludeIPv6.One);\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/search"]["get"] update: x-codeSamples: @@ -433,8 +433,8 @@ actions: update: x-codeSamples: - lang: typescript - label: getUserDetails - source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.getUserDetails(\"CV5xoxjTpFKUzBTShsaf\");\n \n // Handle the result\n console.log(result)\n}\n\nrun();" + label: getTokenDetails + source: "import { PlexAPI } from \"@lukehagar/plexjs\";\n\nconst plexAPI = new PlexAPI({\n accessToken: \"\",\n xPlexClientIdentifier: \"gcgzw5rz2xovp84b4vha3a40\",\n});\n\nasync function run() {\n const result = await plexAPI.authentication.getTokenDetails();\n \n // Handle the result\n console.log(result)\n}\n\nrun();" - target: $["paths"]["/users/signin"]["post"] update: x-codeSamples: diff --git a/docs/sdk/models/errors/addplaylistcontentsresponsebody.md b/docs/sdk/models/errors/addplaylistcontentsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/addplaylistcontentsresponsebody.md rename to docs/sdk/models/errors/addplaylistcontentsbadrequest.md index d9cf9e1d..6baf891f 100644 --- a/docs/sdk/models/errors/addplaylistcontentsresponsebody.md +++ b/docs/sdk/models/errors/addplaylistcontentsbadrequest.md @@ -1,11 +1,11 @@ -# AddPlaylistContentsResponseBody +# AddPlaylistContentsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { AddPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { AddPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/addplaylistcontentserrors.md b/docs/sdk/models/errors/addplaylistcontentserrors.md index db5318ba..71662629 100644 --- a/docs/sdk/models/errors/addplaylistcontentserrors.md +++ b/docs/sdk/models/errors/addplaylistcontentserrors.md @@ -6,9 +6,9 @@ import { AddPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: AddPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md index 9255bb78..cd4e099d 100644 --- a/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md +++ b/docs/sdk/models/errors/addplaylistcontentsplaylistserrors.md @@ -6,9 +6,9 @@ import { AddPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: AddPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/addplaylistcontentsplaylistsresponsebody.md b/docs/sdk/models/errors/addplaylistcontentsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/addplaylistcontentsplaylistsresponsebody.md rename to docs/sdk/models/errors/addplaylistcontentsunauthorized.md index 94451b36..6d1ba09e 100644 --- a/docs/sdk/models/errors/addplaylistcontentsplaylistsresponsebody.md +++ b/docs/sdk/models/errors/addplaylistcontentsunauthorized.md @@ -1,11 +1,11 @@ -# AddPlaylistContentsPlaylistsResponseBody +# AddPlaylistContentsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { AddPlaylistContentsPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { AddPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/applyupdatesresponsebody.md b/docs/sdk/models/errors/applyupdatesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/applyupdatesresponsebody.md rename to docs/sdk/models/errors/applyupdatesbadrequest.md index 2198b1b8..04d03ac7 100644 --- a/docs/sdk/models/errors/applyupdatesresponsebody.md +++ b/docs/sdk/models/errors/applyupdatesbadrequest.md @@ -1,11 +1,11 @@ -# ApplyUpdatesResponseBody +# ApplyUpdatesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { ApplyUpdatesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { ApplyUpdatesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/applyupdateserrors.md b/docs/sdk/models/errors/applyupdateserrors.md index 01327afa..a3bf92cf 100644 --- a/docs/sdk/models/errors/applyupdateserrors.md +++ b/docs/sdk/models/errors/applyupdateserrors.md @@ -6,9 +6,9 @@ import { ApplyUpdatesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: ApplyUpdatesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/applyupdatesupdaterresponsebody.md b/docs/sdk/models/errors/applyupdatesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/applyupdatesupdaterresponsebody.md rename to docs/sdk/models/errors/applyupdatesunauthorized.md index c4a36790..d0fff00d 100644 --- a/docs/sdk/models/errors/applyupdatesupdaterresponsebody.md +++ b/docs/sdk/models/errors/applyupdatesunauthorized.md @@ -1,11 +1,11 @@ -# ApplyUpdatesUpdaterResponseBody +# ApplyUpdatesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { ApplyUpdatesUpdaterResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { ApplyUpdatesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/applyupdatesupdatererrors.md b/docs/sdk/models/errors/applyupdatesupdatererrors.md index be1092fc..ec27ec22 100644 --- a/docs/sdk/models/errors/applyupdatesupdatererrors.md +++ b/docs/sdk/models/errors/applyupdatesupdatererrors.md @@ -6,9 +6,9 @@ import { ApplyUpdatesUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: ApplyUpdatesUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md b/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md index eb458ef2..12493b96 100644 --- a/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md +++ b/docs/sdk/models/errors/cancelserveractivitiesactivitieserrors.md @@ -6,9 +6,9 @@ import { CancelServerActivitiesActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CancelServerActivitiesActivitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/cancelserveractivitiesresponsebody.md b/docs/sdk/models/errors/cancelserveractivitiesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/cancelserveractivitiesresponsebody.md rename to docs/sdk/models/errors/cancelserveractivitiesbadrequest.md index cb80c072..97f0af15 100644 --- a/docs/sdk/models/errors/cancelserveractivitiesresponsebody.md +++ b/docs/sdk/models/errors/cancelserveractivitiesbadrequest.md @@ -1,11 +1,11 @@ -# CancelServerActivitiesResponseBody +# CancelServerActivitiesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { CancelServerActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CancelServerActivitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/cancelserveractivitieserrors.md b/docs/sdk/models/errors/cancelserveractivitieserrors.md index c34c4e2e..bd3fd8c6 100644 --- a/docs/sdk/models/errors/cancelserveractivitieserrors.md +++ b/docs/sdk/models/errors/cancelserveractivitieserrors.md @@ -6,9 +6,9 @@ import { CancelServerActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CancelServerActivitiesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/cancelserveractivitiesactivitiesresponsebody.md b/docs/sdk/models/errors/cancelserveractivitiesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/cancelserveractivitiesactivitiesresponsebody.md rename to docs/sdk/models/errors/cancelserveractivitiesunauthorized.md index 6a9f1bae..6ae98ee6 100644 --- a/docs/sdk/models/errors/cancelserveractivitiesactivitiesresponsebody.md +++ b/docs/sdk/models/errors/cancelserveractivitiesunauthorized.md @@ -1,11 +1,11 @@ -# CancelServerActivitiesActivitiesResponseBody +# CancelServerActivitiesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { CancelServerActivitiesActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CancelServerActivitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/checkforupdatesresponsebody.md b/docs/sdk/models/errors/checkforupdatesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/checkforupdatesresponsebody.md rename to docs/sdk/models/errors/checkforupdatesbadrequest.md index 93b61ef9..d22fa190 100644 --- a/docs/sdk/models/errors/checkforupdatesresponsebody.md +++ b/docs/sdk/models/errors/checkforupdatesbadrequest.md @@ -1,11 +1,11 @@ -# CheckForUpdatesResponseBody +# CheckForUpdatesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { CheckForUpdatesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CheckForUpdatesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/checkforupdateserrors.md b/docs/sdk/models/errors/checkforupdateserrors.md index 49629c86..8f7d99c5 100644 --- a/docs/sdk/models/errors/checkforupdateserrors.md +++ b/docs/sdk/models/errors/checkforupdateserrors.md @@ -6,9 +6,9 @@ import { CheckForUpdatesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CheckForUpdatesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/checkforupdatesupdaterresponsebody.md b/docs/sdk/models/errors/checkforupdatesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/checkforupdatesupdaterresponsebody.md rename to docs/sdk/models/errors/checkforupdatesunauthorized.md index 08683035..90428db6 100644 --- a/docs/sdk/models/errors/checkforupdatesupdaterresponsebody.md +++ b/docs/sdk/models/errors/checkforupdatesunauthorized.md @@ -1,11 +1,11 @@ -# CheckForUpdatesUpdaterResponseBody +# CheckForUpdatesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { CheckForUpdatesUpdaterResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CheckForUpdatesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/checkforupdatesupdatererrors.md b/docs/sdk/models/errors/checkforupdatesupdatererrors.md index c9cc6dbe..cf1704ab 100644 --- a/docs/sdk/models/errors/checkforupdatesupdatererrors.md +++ b/docs/sdk/models/errors/checkforupdatesupdatererrors.md @@ -6,9 +6,9 @@ import { CheckForUpdatesUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CheckForUpdatesUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/clearplaylistcontentsresponsebody.md b/docs/sdk/models/errors/clearplaylistcontentsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/clearplaylistcontentsresponsebody.md rename to docs/sdk/models/errors/clearplaylistcontentsbadrequest.md index c650d754..bf27c58c 100644 --- a/docs/sdk/models/errors/clearplaylistcontentsresponsebody.md +++ b/docs/sdk/models/errors/clearplaylistcontentsbadrequest.md @@ -1,11 +1,11 @@ -# ClearPlaylistContentsResponseBody +# ClearPlaylistContentsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { ClearPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { ClearPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/clearplaylistcontentserrors.md b/docs/sdk/models/errors/clearplaylistcontentserrors.md index 486c105e..59b8930a 100644 --- a/docs/sdk/models/errors/clearplaylistcontentserrors.md +++ b/docs/sdk/models/errors/clearplaylistcontentserrors.md @@ -6,9 +6,9 @@ import { ClearPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: ClearPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md index 9a3cf571..11f62f17 100644 --- a/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md +++ b/docs/sdk/models/errors/clearplaylistcontentsplaylistserrors.md @@ -6,9 +6,9 @@ import { ClearPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: ClearPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/clearplaylistcontentsplaylistsresponsebody.md b/docs/sdk/models/errors/clearplaylistcontentsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/clearplaylistcontentsplaylistsresponsebody.md rename to docs/sdk/models/errors/clearplaylistcontentsunauthorized.md index 3980491f..a6fb6dd2 100644 --- a/docs/sdk/models/errors/clearplaylistcontentsplaylistsresponsebody.md +++ b/docs/sdk/models/errors/clearplaylistcontentsunauthorized.md @@ -1,11 +1,11 @@ -# ClearPlaylistContentsPlaylistsResponseBody +# ClearPlaylistContentsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { ClearPlaylistContentsPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { ClearPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/createplaylistresponsebody.md b/docs/sdk/models/errors/createplaylistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/createplaylistresponsebody.md rename to docs/sdk/models/errors/createplaylistbadrequest.md index 4da89f3a..52b3b32e 100644 --- a/docs/sdk/models/errors/createplaylistresponsebody.md +++ b/docs/sdk/models/errors/createplaylistbadrequest.md @@ -1,11 +1,11 @@ -# CreatePlaylistResponseBody +# CreatePlaylistBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { CreatePlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CreatePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/createplaylisterrors.md b/docs/sdk/models/errors/createplaylisterrors.md index 09b7103d..e0023b16 100644 --- a/docs/sdk/models/errors/createplaylisterrors.md +++ b/docs/sdk/models/errors/createplaylisterrors.md @@ -6,9 +6,9 @@ import { CreatePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CreatePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/createplaylistplaylistserrors.md b/docs/sdk/models/errors/createplaylistplaylistserrors.md index ef8d6f1e..49282604 100644 --- a/docs/sdk/models/errors/createplaylistplaylistserrors.md +++ b/docs/sdk/models/errors/createplaylistplaylistserrors.md @@ -6,9 +6,9 @@ import { CreatePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: CreatePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/createplaylistplaylistsresponsebody.md b/docs/sdk/models/errors/createplaylistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/createplaylistplaylistsresponsebody.md rename to docs/sdk/models/errors/createplaylistunauthorized.md index 4885387a..705f4294 100644 --- a/docs/sdk/models/errors/createplaylistplaylistsresponsebody.md +++ b/docs/sdk/models/errors/createplaylistunauthorized.md @@ -1,11 +1,11 @@ -# CreatePlaylistPlaylistsResponseBody +# CreatePlaylistUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { CreatePlaylistPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { CreatePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/deletelibraryresponsebody.md b/docs/sdk/models/errors/deletelibrarybadrequest.md similarity index 93% rename from docs/sdk/models/errors/deletelibraryresponsebody.md rename to docs/sdk/models/errors/deletelibrarybadrequest.md index a829a818..7bdd5333 100644 --- a/docs/sdk/models/errors/deletelibraryresponsebody.md +++ b/docs/sdk/models/errors/deletelibrarybadrequest.md @@ -1,11 +1,11 @@ -# DeleteLibraryResponseBody +# DeleteLibraryBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { DeleteLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { DeleteLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/deletelibraryerrors.md b/docs/sdk/models/errors/deletelibraryerrors.md index 8ed6a24e..b1f58a97 100644 --- a/docs/sdk/models/errors/deletelibraryerrors.md +++ b/docs/sdk/models/errors/deletelibraryerrors.md @@ -6,9 +6,9 @@ import { DeleteLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: DeleteLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/deletelibrarylibraryerrors.md b/docs/sdk/models/errors/deletelibrarylibraryerrors.md index db79b834..27a138fa 100644 --- a/docs/sdk/models/errors/deletelibrarylibraryerrors.md +++ b/docs/sdk/models/errors/deletelibrarylibraryerrors.md @@ -6,9 +6,9 @@ import { DeleteLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: DeleteLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/deletelibrarylibraryresponsebody.md b/docs/sdk/models/errors/deletelibraryunauthorized.md similarity index 93% rename from docs/sdk/models/errors/deletelibrarylibraryresponsebody.md rename to docs/sdk/models/errors/deletelibraryunauthorized.md index 66f67ee5..cad716c0 100644 --- a/docs/sdk/models/errors/deletelibrarylibraryresponsebody.md +++ b/docs/sdk/models/errors/deletelibraryunauthorized.md @@ -1,11 +1,11 @@ -# DeleteLibraryLibraryResponseBody +# DeleteLibraryUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { DeleteLibraryLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { DeleteLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/deleteplaylistresponsebody.md b/docs/sdk/models/errors/deleteplaylistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/deleteplaylistresponsebody.md rename to docs/sdk/models/errors/deleteplaylistbadrequest.md index dc654e54..35c36920 100644 --- a/docs/sdk/models/errors/deleteplaylistresponsebody.md +++ b/docs/sdk/models/errors/deleteplaylistbadrequest.md @@ -1,11 +1,11 @@ -# DeletePlaylistResponseBody +# DeletePlaylistBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { DeletePlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { DeletePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/deleteplaylisterrors.md b/docs/sdk/models/errors/deleteplaylisterrors.md index 0f4d9876..9a838f9a 100644 --- a/docs/sdk/models/errors/deleteplaylisterrors.md +++ b/docs/sdk/models/errors/deleteplaylisterrors.md @@ -6,9 +6,9 @@ import { DeletePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: DeletePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/deleteplaylistplaylistserrors.md b/docs/sdk/models/errors/deleteplaylistplaylistserrors.md index 847f8975..127b3667 100644 --- a/docs/sdk/models/errors/deleteplaylistplaylistserrors.md +++ b/docs/sdk/models/errors/deleteplaylistplaylistserrors.md @@ -6,9 +6,9 @@ import { DeletePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: DeletePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/deleteplaylistplaylistsresponsebody.md b/docs/sdk/models/errors/deleteplaylistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/deleteplaylistplaylistsresponsebody.md rename to docs/sdk/models/errors/deleteplaylistunauthorized.md index fb814dc7..ecbbecda 100644 --- a/docs/sdk/models/errors/deleteplaylistplaylistsresponsebody.md +++ b/docs/sdk/models/errors/deleteplaylistunauthorized.md @@ -1,11 +1,11 @@ -# DeletePlaylistPlaylistsResponseBody +# DeletePlaylistUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { DeletePlaylistPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { DeletePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/enablepapertrailresponsebody.md b/docs/sdk/models/errors/enablepapertrailbadrequest.md similarity index 93% rename from docs/sdk/models/errors/enablepapertrailresponsebody.md rename to docs/sdk/models/errors/enablepapertrailbadrequest.md index 7bba24da..4d4c881a 100644 --- a/docs/sdk/models/errors/enablepapertrailresponsebody.md +++ b/docs/sdk/models/errors/enablepapertrailbadrequest.md @@ -1,11 +1,11 @@ -# EnablePaperTrailResponseBody +# EnablePaperTrailBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { EnablePaperTrailResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { EnablePaperTrailBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/enablepapertrailerrors.md b/docs/sdk/models/errors/enablepapertrailerrors.md index fde05661..e85e945d 100644 --- a/docs/sdk/models/errors/enablepapertrailerrors.md +++ b/docs/sdk/models/errors/enablepapertrailerrors.md @@ -6,9 +6,9 @@ import { EnablePaperTrailErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: EnablePaperTrailErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/enablepapertraillogerrors.md b/docs/sdk/models/errors/enablepapertraillogerrors.md index 7f00314f..d374aa4c 100644 --- a/docs/sdk/models/errors/enablepapertraillogerrors.md +++ b/docs/sdk/models/errors/enablepapertraillogerrors.md @@ -6,9 +6,9 @@ import { EnablePaperTrailLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: EnablePaperTrailLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/enablepapertraillogresponsebody.md b/docs/sdk/models/errors/enablepapertrailunauthorized.md similarity index 93% rename from docs/sdk/models/errors/enablepapertraillogresponsebody.md rename to docs/sdk/models/errors/enablepapertrailunauthorized.md index b3292876..42503ef8 100644 --- a/docs/sdk/models/errors/enablepapertraillogresponsebody.md +++ b/docs/sdk/models/errors/enablepapertrailunauthorized.md @@ -1,11 +1,11 @@ -# EnablePaperTrailLogResponseBody +# EnablePaperTrailUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { EnablePaperTrailLogResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { EnablePaperTrailUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/errors.md b/docs/sdk/models/errors/errors.md index c3628c37..a2a6165f 100644 --- a/docs/sdk/models/errors/errors.md +++ b/docs/sdk/models/errors/errors.md @@ -6,9 +6,9 @@ import { Errors } from "@lukehagar/plexjs/sdk/models/errors"; let value: Errors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getalllibrariesresponsebody.md b/docs/sdk/models/errors/getalllibrariesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getalllibrariesresponsebody.md rename to docs/sdk/models/errors/getalllibrariesbadrequest.md index 02e0f46f..3204c618 100644 --- a/docs/sdk/models/errors/getalllibrariesresponsebody.md +++ b/docs/sdk/models/errors/getalllibrariesbadrequest.md @@ -1,11 +1,11 @@ -# GetAllLibrariesResponseBody +# GetAllLibrariesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetAllLibrariesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetAllLibrariesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getalllibrarieserrors.md b/docs/sdk/models/errors/getalllibrarieserrors.md index bd15413e..2408fec2 100644 --- a/docs/sdk/models/errors/getalllibrarieserrors.md +++ b/docs/sdk/models/errors/getalllibrarieserrors.md @@ -6,9 +6,9 @@ import { GetAllLibrariesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetAllLibrariesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getalllibrarieslibraryerrors.md b/docs/sdk/models/errors/getalllibrarieslibraryerrors.md index db5f9ec1..2be1f59b 100644 --- a/docs/sdk/models/errors/getalllibrarieslibraryerrors.md +++ b/docs/sdk/models/errors/getalllibrarieslibraryerrors.md @@ -6,9 +6,9 @@ import { GetAllLibrariesLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetAllLibrariesLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getalllibrarieslibraryresponsebody.md b/docs/sdk/models/errors/getalllibrariesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getalllibrarieslibraryresponsebody.md rename to docs/sdk/models/errors/getalllibrariesunauthorized.md index d5c29c75..0d694f26 100644 --- a/docs/sdk/models/errors/getalllibrarieslibraryresponsebody.md +++ b/docs/sdk/models/errors/getalllibrariesunauthorized.md @@ -1,11 +1,11 @@ -# GetAllLibrariesLibraryResponseBody +# GetAllLibrariesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetAllLibrariesLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetAllLibrariesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getavailableclientsresponsebody.md b/docs/sdk/models/errors/getavailableclientsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getavailableclientsresponsebody.md rename to docs/sdk/models/errors/getavailableclientsbadrequest.md index 7e7477cb..97b79856 100644 --- a/docs/sdk/models/errors/getavailableclientsresponsebody.md +++ b/docs/sdk/models/errors/getavailableclientsbadrequest.md @@ -1,11 +1,11 @@ -# GetAvailableClientsResponseBody +# GetAvailableClientsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetAvailableClientsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetAvailableClientsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getavailableclientserrors.md b/docs/sdk/models/errors/getavailableclientserrors.md index b9bc257a..86e9a82b 100644 --- a/docs/sdk/models/errors/getavailableclientserrors.md +++ b/docs/sdk/models/errors/getavailableclientserrors.md @@ -6,9 +6,9 @@ import { GetAvailableClientsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetAvailableClientsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getavailableclientsservererrors.md b/docs/sdk/models/errors/getavailableclientsservererrors.md index cfbb5fe2..6a48914a 100644 --- a/docs/sdk/models/errors/getavailableclientsservererrors.md +++ b/docs/sdk/models/errors/getavailableclientsservererrors.md @@ -6,9 +6,9 @@ import { GetAvailableClientsServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetAvailableClientsServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getavailableclientsserverresponsebody.md b/docs/sdk/models/errors/getavailableclientsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getavailableclientsserverresponsebody.md rename to docs/sdk/models/errors/getavailableclientsunauthorized.md index c254a5fa..29cce9ff 100644 --- a/docs/sdk/models/errors/getavailableclientsserverresponsebody.md +++ b/docs/sdk/models/errors/getavailableclientsunauthorized.md @@ -1,11 +1,11 @@ -# GetAvailableClientsServerResponseBody +# GetAvailableClientsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetAvailableClientsServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetAvailableClientsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbandwidthstatisticsresponsebody.md b/docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getbandwidthstatisticsresponsebody.md rename to docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md index 5b980354..4018e95e 100644 --- a/docs/sdk/models/errors/getbandwidthstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getbandwidthstatisticsbadrequest.md @@ -1,11 +1,11 @@ -# GetBandwidthStatisticsResponseBody +# GetBandwidthStatisticsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetBandwidthStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetBandwidthStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbandwidthstatisticserrors.md b/docs/sdk/models/errors/getbandwidthstatisticserrors.md index 6bf34df8..a0bb56d2 100644 --- a/docs/sdk/models/errors/getbandwidthstatisticserrors.md +++ b/docs/sdk/models/errors/getbandwidthstatisticserrors.md @@ -6,9 +6,9 @@ import { GetBandwidthStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetBandwidthStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md b/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md index 05e25d27..dfd157b2 100644 --- a/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md +++ b/docs/sdk/models/errors/getbandwidthstatisticsstatisticserrors.md @@ -6,9 +6,9 @@ import { GetBandwidthStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetBandwidthStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getbandwidthstatisticsstatisticsresponsebody.md b/docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getbandwidthstatisticsstatisticsresponsebody.md rename to docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md index 86c8eac4..41dfba1a 100644 --- a/docs/sdk/models/errors/getbandwidthstatisticsstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getbandwidthstatisticsunauthorized.md @@ -1,11 +1,11 @@ -# GetBandwidthStatisticsStatisticsResponseBody +# GetBandwidthStatisticsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetBandwidthStatisticsStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetBandwidthStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbannerimageresponsebody.md b/docs/sdk/models/errors/getbannerimagebadrequest.md similarity index 93% rename from docs/sdk/models/errors/getbannerimageresponsebody.md rename to docs/sdk/models/errors/getbannerimagebadrequest.md index 2b9369d8..01bf3a2c 100644 --- a/docs/sdk/models/errors/getbannerimageresponsebody.md +++ b/docs/sdk/models/errors/getbannerimagebadrequest.md @@ -1,11 +1,11 @@ -# GetBannerImageResponseBody +# GetBannerImageBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetBannerImageResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetBannerImageBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbannerimageerrors.md b/docs/sdk/models/errors/getbannerimageerrors.md index 2c609b06..969fb25c 100644 --- a/docs/sdk/models/errors/getbannerimageerrors.md +++ b/docs/sdk/models/errors/getbannerimageerrors.md @@ -6,9 +6,9 @@ import { GetBannerImageErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetBannerImageErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getbannerimagemediaerrors.md b/docs/sdk/models/errors/getbannerimagemediaerrors.md index 620ab46a..c81084e0 100644 --- a/docs/sdk/models/errors/getbannerimagemediaerrors.md +++ b/docs/sdk/models/errors/getbannerimagemediaerrors.md @@ -6,9 +6,9 @@ import { GetBannerImageMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetBannerImageMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getbannerimagemediaresponsebody.md b/docs/sdk/models/errors/getbannerimageunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getbannerimagemediaresponsebody.md rename to docs/sdk/models/errors/getbannerimageunauthorized.md index 74ce5da4..a076937b 100644 --- a/docs/sdk/models/errors/getbannerimagemediaresponsebody.md +++ b/docs/sdk/models/errors/getbannerimageunauthorized.md @@ -1,11 +1,11 @@ -# GetBannerImageMediaResponseBody +# GetBannerImageUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetBannerImageMediaResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetBannerImageUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbutlertasksresponsebody.md b/docs/sdk/models/errors/getbutlertasksbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getbutlertasksresponsebody.md rename to docs/sdk/models/errors/getbutlertasksbadrequest.md index 4ac892eb..fa8b643f 100644 --- a/docs/sdk/models/errors/getbutlertasksresponsebody.md +++ b/docs/sdk/models/errors/getbutlertasksbadrequest.md @@ -1,11 +1,11 @@ -# GetButlerTasksResponseBody +# GetButlerTasksBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetButlerTasksResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetButlerTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getbutlertasksbutlererrors.md b/docs/sdk/models/errors/getbutlertasksbutlererrors.md index c7c28fbe..b7df223c 100644 --- a/docs/sdk/models/errors/getbutlertasksbutlererrors.md +++ b/docs/sdk/models/errors/getbutlertasksbutlererrors.md @@ -6,9 +6,9 @@ import { GetButlerTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetButlerTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getbutlertaskserrors.md b/docs/sdk/models/errors/getbutlertaskserrors.md index 2dd61a9e..815e6809 100644 --- a/docs/sdk/models/errors/getbutlertaskserrors.md +++ b/docs/sdk/models/errors/getbutlertaskserrors.md @@ -6,9 +6,9 @@ import { GetButlerTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetButlerTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getbutlertasksbutlerresponsebody.md b/docs/sdk/models/errors/getbutlertasksunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getbutlertasksbutlerresponsebody.md rename to docs/sdk/models/errors/getbutlertasksunauthorized.md index f818412d..5fe8a9f0 100644 --- a/docs/sdk/models/errors/getbutlertasksbutlerresponsebody.md +++ b/docs/sdk/models/errors/getbutlertasksunauthorized.md @@ -1,11 +1,11 @@ -# GetButlerTasksButlerResponseBody +# GetButlerTasksUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetButlerTasksButlerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetButlerTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getcompanionsdataresponsebody.md b/docs/sdk/models/errors/getcompanionsdatabadrequest.md similarity index 93% rename from docs/sdk/models/errors/getcompanionsdataresponsebody.md rename to docs/sdk/models/errors/getcompanionsdatabadrequest.md index 8146af27..d1fe40d9 100644 --- a/docs/sdk/models/errors/getcompanionsdataresponsebody.md +++ b/docs/sdk/models/errors/getcompanionsdatabadrequest.md @@ -1,11 +1,11 @@ -# GetCompanionsDataResponseBody +# GetCompanionsDataBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetCompanionsDataResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetCompanionsDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getcompanionsdataerrors.md b/docs/sdk/models/errors/getcompanionsdataerrors.md index 6608dc6e..2b4a0842 100644 --- a/docs/sdk/models/errors/getcompanionsdataerrors.md +++ b/docs/sdk/models/errors/getcompanionsdataerrors.md @@ -6,9 +6,9 @@ import { GetCompanionsDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetCompanionsDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getcompanionsdataplexerrors.md b/docs/sdk/models/errors/getcompanionsdataplexerrors.md index 90493fd4..882ec52f 100644 --- a/docs/sdk/models/errors/getcompanionsdataplexerrors.md +++ b/docs/sdk/models/errors/getcompanionsdataplexerrors.md @@ -6,9 +6,9 @@ import { GetCompanionsDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetCompanionsDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getcompanionsdataplexresponsebody.md b/docs/sdk/models/errors/getcompanionsdataunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getcompanionsdataplexresponsebody.md rename to docs/sdk/models/errors/getcompanionsdataunauthorized.md index 59a98ff6..53cfba90 100644 --- a/docs/sdk/models/errors/getcompanionsdataplexresponsebody.md +++ b/docs/sdk/models/errors/getcompanionsdataunauthorized.md @@ -1,11 +1,11 @@ -# GetCompanionsDataPlexResponseBody +# GetCompanionsDataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetCompanionsDataPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetCompanionsDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getdevicesresponsebody.md b/docs/sdk/models/errors/getdevicesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getdevicesresponsebody.md rename to docs/sdk/models/errors/getdevicesbadrequest.md index d2ddf941..bb6f9ced 100644 --- a/docs/sdk/models/errors/getdevicesresponsebody.md +++ b/docs/sdk/models/errors/getdevicesbadrequest.md @@ -1,11 +1,11 @@ -# GetDevicesResponseBody +# GetDevicesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetDevicesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetDevicesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getdeviceserrors.md b/docs/sdk/models/errors/getdeviceserrors.md index dc8080c4..ec140711 100644 --- a/docs/sdk/models/errors/getdeviceserrors.md +++ b/docs/sdk/models/errors/getdeviceserrors.md @@ -6,9 +6,9 @@ import { GetDevicesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetDevicesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getdevicesservererrors.md b/docs/sdk/models/errors/getdevicesservererrors.md index 04f9c2e3..d2ef04b8 100644 --- a/docs/sdk/models/errors/getdevicesservererrors.md +++ b/docs/sdk/models/errors/getdevicesservererrors.md @@ -6,9 +6,9 @@ import { GetDevicesServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetDevicesServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getdevicesserverresponsebody.md b/docs/sdk/models/errors/getdevicesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getdevicesserverresponsebody.md rename to docs/sdk/models/errors/getdevicesunauthorized.md index b5a4d1cc..49614bed 100644 --- a/docs/sdk/models/errors/getdevicesserverresponsebody.md +++ b/docs/sdk/models/errors/getdevicesunauthorized.md @@ -1,11 +1,11 @@ -# GetDevicesServerResponseBody +# GetDevicesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetDevicesServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetDevicesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getfilehashresponsebody.md b/docs/sdk/models/errors/getfilehashbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getfilehashresponsebody.md rename to docs/sdk/models/errors/getfilehashbadrequest.md index dd272d6e..53526aec 100644 --- a/docs/sdk/models/errors/getfilehashresponsebody.md +++ b/docs/sdk/models/errors/getfilehashbadrequest.md @@ -1,11 +1,11 @@ -# GetFileHashResponseBody +# GetFileHashBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetFileHashResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetFileHashBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getfilehasherrors.md b/docs/sdk/models/errors/getfilehasherrors.md index eabfd280..f836c2ea 100644 --- a/docs/sdk/models/errors/getfilehasherrors.md +++ b/docs/sdk/models/errors/getfilehasherrors.md @@ -6,9 +6,9 @@ import { GetFileHashErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetFileHashErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getfilehashlibraryerrors.md b/docs/sdk/models/errors/getfilehashlibraryerrors.md index 164e9a10..d5087398 100644 --- a/docs/sdk/models/errors/getfilehashlibraryerrors.md +++ b/docs/sdk/models/errors/getfilehashlibraryerrors.md @@ -6,9 +6,9 @@ import { GetFileHashLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetFileHashLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getfilehashlibraryresponsebody.md b/docs/sdk/models/errors/getfilehashunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getfilehashlibraryresponsebody.md rename to docs/sdk/models/errors/getfilehashunauthorized.md index 48780fad..f1f6acf8 100644 --- a/docs/sdk/models/errors/getfilehashlibraryresponsebody.md +++ b/docs/sdk/models/errors/getfilehashunauthorized.md @@ -1,11 +1,11 @@ -# GetFileHashLibraryResponseBody +# GetFileHashUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetFileHashLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetFileHashUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getgeodataresponsebody.md b/docs/sdk/models/errors/getgeodatabadrequest.md similarity index 93% rename from docs/sdk/models/errors/getgeodataresponsebody.md rename to docs/sdk/models/errors/getgeodatabadrequest.md index a8c611d5..506b2edd 100644 --- a/docs/sdk/models/errors/getgeodataresponsebody.md +++ b/docs/sdk/models/errors/getgeodatabadrequest.md @@ -1,11 +1,11 @@ -# GetGeoDataResponseBody +# GetGeoDataBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetGeoDataResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetGeoDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getgeodataerrors.md b/docs/sdk/models/errors/getgeodataerrors.md index 2352aac2..5833fc71 100644 --- a/docs/sdk/models/errors/getgeodataerrors.md +++ b/docs/sdk/models/errors/getgeodataerrors.md @@ -6,9 +6,9 @@ import { GetGeoDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetGeoDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getgeodataplexerrors.md b/docs/sdk/models/errors/getgeodataplexerrors.md index fed15b62..28ddd506 100644 --- a/docs/sdk/models/errors/getgeodataplexerrors.md +++ b/docs/sdk/models/errors/getgeodataplexerrors.md @@ -6,9 +6,9 @@ import { GetGeoDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetGeoDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getgeodataplexresponsebody.md b/docs/sdk/models/errors/getgeodataunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getgeodataplexresponsebody.md rename to docs/sdk/models/errors/getgeodataunauthorized.md index 7834f73a..5f03ad8e 100644 --- a/docs/sdk/models/errors/getgeodataplexresponsebody.md +++ b/docs/sdk/models/errors/getgeodataunauthorized.md @@ -1,11 +1,11 @@ -# GetGeoDataPlexResponseBody +# GetGeoDataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetGeoDataPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetGeoDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getglobalhubsresponsebody.md b/docs/sdk/models/errors/getglobalhubsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getglobalhubsresponsebody.md rename to docs/sdk/models/errors/getglobalhubsbadrequest.md index 28513c82..5fae13f0 100644 --- a/docs/sdk/models/errors/getglobalhubsresponsebody.md +++ b/docs/sdk/models/errors/getglobalhubsbadrequest.md @@ -1,11 +1,11 @@ -# GetGlobalHubsResponseBody +# GetGlobalHubsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetGlobalHubsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetGlobalHubsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getglobalhubserrors.md b/docs/sdk/models/errors/getglobalhubserrors.md index 99f1875b..8bf89f4d 100644 --- a/docs/sdk/models/errors/getglobalhubserrors.md +++ b/docs/sdk/models/errors/getglobalhubserrors.md @@ -6,9 +6,9 @@ import { GetGlobalHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetGlobalHubsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getglobalhubshubserrors.md b/docs/sdk/models/errors/getglobalhubshubserrors.md index effa0993..19e3e723 100644 --- a/docs/sdk/models/errors/getglobalhubshubserrors.md +++ b/docs/sdk/models/errors/getglobalhubshubserrors.md @@ -6,9 +6,9 @@ import { GetGlobalHubsHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetGlobalHubsHubsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getglobalhubshubsresponsebody.md b/docs/sdk/models/errors/getglobalhubsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getglobalhubshubsresponsebody.md rename to docs/sdk/models/errors/getglobalhubsunauthorized.md index 7b77a9be..ab5adb83 100644 --- a/docs/sdk/models/errors/getglobalhubshubsresponsebody.md +++ b/docs/sdk/models/errors/getglobalhubsunauthorized.md @@ -1,11 +1,11 @@ -# GetGlobalHubsHubsResponseBody +# GetGlobalHubsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetGlobalHubsHubsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetGlobalHubsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gethomedataresponsebody.md b/docs/sdk/models/errors/gethomedatabadrequest.md similarity index 93% rename from docs/sdk/models/errors/gethomedataresponsebody.md rename to docs/sdk/models/errors/gethomedatabadrequest.md index ddeb6fb9..c845207f 100644 --- a/docs/sdk/models/errors/gethomedataresponsebody.md +++ b/docs/sdk/models/errors/gethomedatabadrequest.md @@ -1,11 +1,11 @@ -# GetHomeDataResponseBody +# GetHomeDataBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetHomeDataResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetHomeDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gethomedataerrors.md b/docs/sdk/models/errors/gethomedataerrors.md index 96783a5c..de510616 100644 --- a/docs/sdk/models/errors/gethomedataerrors.md +++ b/docs/sdk/models/errors/gethomedataerrors.md @@ -6,9 +6,9 @@ import { GetHomeDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetHomeDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gethomedataplexerrors.md b/docs/sdk/models/errors/gethomedataplexerrors.md index c71fb2e0..c9fa6f4a 100644 --- a/docs/sdk/models/errors/gethomedataplexerrors.md +++ b/docs/sdk/models/errors/gethomedataplexerrors.md @@ -6,9 +6,9 @@ import { GetHomeDataPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetHomeDataPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gethomedataplexresponsebody.md b/docs/sdk/models/errors/gethomedataunauthorized.md similarity index 93% rename from docs/sdk/models/errors/gethomedataplexresponsebody.md rename to docs/sdk/models/errors/gethomedataunauthorized.md index 74091ac6..bee5fccb 100644 --- a/docs/sdk/models/errors/gethomedataplexresponsebody.md +++ b/docs/sdk/models/errors/gethomedataunauthorized.md @@ -1,11 +1,11 @@ -# GetHomeDataPlexResponseBody +# GetHomeDataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetHomeDataPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetHomeDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibrarydetailsresponsebody.md b/docs/sdk/models/errors/getlibrarydetailsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getlibrarydetailsresponsebody.md rename to docs/sdk/models/errors/getlibrarydetailsbadrequest.md index 64769013..47966b92 100644 --- a/docs/sdk/models/errors/getlibrarydetailsresponsebody.md +++ b/docs/sdk/models/errors/getlibrarydetailsbadrequest.md @@ -1,11 +1,11 @@ -# GetLibraryDetailsResponseBody +# GetLibraryDetailsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetLibraryDetailsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryDetailsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibrarydetailserrors.md b/docs/sdk/models/errors/getlibrarydetailserrors.md index ec43c6dd..bf0a14b3 100644 --- a/docs/sdk/models/errors/getlibrarydetailserrors.md +++ b/docs/sdk/models/errors/getlibrarydetailserrors.md @@ -6,9 +6,9 @@ import { GetLibraryDetailsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryDetailsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md b/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md index 7e56ea9f..1f0be31e 100644 --- a/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md +++ b/docs/sdk/models/errors/getlibrarydetailslibraryerrors.md @@ -6,9 +6,9 @@ import { GetLibraryDetailsLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryDetailsLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getlibrarydetailslibraryresponsebody.md b/docs/sdk/models/errors/getlibrarydetailsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getlibrarydetailslibraryresponsebody.md rename to docs/sdk/models/errors/getlibrarydetailsunauthorized.md index d266bafe..b8da3499 100644 --- a/docs/sdk/models/errors/getlibrarydetailslibraryresponsebody.md +++ b/docs/sdk/models/errors/getlibrarydetailsunauthorized.md @@ -1,11 +1,11 @@ -# GetLibraryDetailsLibraryResponseBody +# GetLibraryDetailsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetLibraryDetailsLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryDetailsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibraryhubsresponsebody.md b/docs/sdk/models/errors/getlibraryhubsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getlibraryhubsresponsebody.md rename to docs/sdk/models/errors/getlibraryhubsbadrequest.md index 71da82d6..bd2cc367 100644 --- a/docs/sdk/models/errors/getlibraryhubsresponsebody.md +++ b/docs/sdk/models/errors/getlibraryhubsbadrequest.md @@ -1,11 +1,11 @@ -# GetLibraryHubsResponseBody +# GetLibraryHubsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetLibraryHubsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryHubsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibraryhubserrors.md b/docs/sdk/models/errors/getlibraryhubserrors.md index 81c17f04..32ea934f 100644 --- a/docs/sdk/models/errors/getlibraryhubserrors.md +++ b/docs/sdk/models/errors/getlibraryhubserrors.md @@ -6,9 +6,9 @@ import { GetLibraryHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryHubsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getlibraryhubshubserrors.md b/docs/sdk/models/errors/getlibraryhubshubserrors.md index 08cf3adc..e7f7bc7a 100644 --- a/docs/sdk/models/errors/getlibraryhubshubserrors.md +++ b/docs/sdk/models/errors/getlibraryhubshubserrors.md @@ -6,9 +6,9 @@ import { GetLibraryHubsHubsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryHubsHubsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getlibraryhubshubsresponsebody.md b/docs/sdk/models/errors/getlibraryhubsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getlibraryhubshubsresponsebody.md rename to docs/sdk/models/errors/getlibraryhubsunauthorized.md index cd57f11e..567701a5 100644 --- a/docs/sdk/models/errors/getlibraryhubshubsresponsebody.md +++ b/docs/sdk/models/errors/getlibraryhubsunauthorized.md @@ -1,11 +1,11 @@ -# GetLibraryHubsHubsResponseBody +# GetLibraryHubsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetLibraryHubsHubsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryHubsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibraryitemsresponsebody.md b/docs/sdk/models/errors/getlibraryitemsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getlibraryitemsresponsebody.md rename to docs/sdk/models/errors/getlibraryitemsbadrequest.md index 957b4827..dd222c3a 100644 --- a/docs/sdk/models/errors/getlibraryitemsresponsebody.md +++ b/docs/sdk/models/errors/getlibraryitemsbadrequest.md @@ -1,11 +1,11 @@ -# GetLibraryItemsResponseBody +# GetLibraryItemsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetLibraryItemsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryItemsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getlibraryitemserrors.md b/docs/sdk/models/errors/getlibraryitemserrors.md index 3be58099..4ddd74e5 100644 --- a/docs/sdk/models/errors/getlibraryitemserrors.md +++ b/docs/sdk/models/errors/getlibraryitemserrors.md @@ -6,9 +6,9 @@ import { GetLibraryItemsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryItemsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getlibraryitemslibraryerrors.md b/docs/sdk/models/errors/getlibraryitemslibraryerrors.md index 0e89c9cc..ffa0be3d 100644 --- a/docs/sdk/models/errors/getlibraryitemslibraryerrors.md +++ b/docs/sdk/models/errors/getlibraryitemslibraryerrors.md @@ -6,9 +6,9 @@ import { GetLibraryItemsLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetLibraryItemsLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getlibraryitemslibraryresponsebody.md b/docs/sdk/models/errors/getlibraryitemsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getlibraryitemslibraryresponsebody.md rename to docs/sdk/models/errors/getlibraryitemsunauthorized.md index 2ad197f0..28ea8e6a 100644 --- a/docs/sdk/models/errors/getlibraryitemslibraryresponsebody.md +++ b/docs/sdk/models/errors/getlibraryitemsunauthorized.md @@ -1,11 +1,11 @@ -# GetLibraryItemsLibraryResponseBody +# GetLibraryItemsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetLibraryItemsLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetLibraryItemsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmediaprovidersresponsebody.md b/docs/sdk/models/errors/getmediaprovidersbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getmediaprovidersresponsebody.md rename to docs/sdk/models/errors/getmediaprovidersbadrequest.md index 1cbd020e..01706bdf 100644 --- a/docs/sdk/models/errors/getmediaprovidersresponsebody.md +++ b/docs/sdk/models/errors/getmediaprovidersbadrequest.md @@ -1,11 +1,11 @@ -# GetMediaProvidersResponseBody +# GetMediaProvidersBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetMediaProvidersResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMediaProvidersBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmediaproviderserrors.md b/docs/sdk/models/errors/getmediaproviderserrors.md index 313cbc27..22d946a7 100644 --- a/docs/sdk/models/errors/getmediaproviderserrors.md +++ b/docs/sdk/models/errors/getmediaproviderserrors.md @@ -6,9 +6,9 @@ import { GetMediaProvidersErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMediaProvidersErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getmediaprovidersservererrors.md b/docs/sdk/models/errors/getmediaprovidersservererrors.md index 8c4efa67..f31ab63a 100644 --- a/docs/sdk/models/errors/getmediaprovidersservererrors.md +++ b/docs/sdk/models/errors/getmediaprovidersservererrors.md @@ -6,9 +6,9 @@ import { GetMediaProvidersServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMediaProvidersServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getmediaprovidersserverresponsebody.md b/docs/sdk/models/errors/getmediaprovidersunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getmediaprovidersserverresponsebody.md rename to docs/sdk/models/errors/getmediaprovidersunauthorized.md index ddf1b59b..315ee3ed 100644 --- a/docs/sdk/models/errors/getmediaprovidersserverresponsebody.md +++ b/docs/sdk/models/errors/getmediaprovidersunauthorized.md @@ -1,11 +1,11 @@ -# GetMediaProvidersServerResponseBody +# GetMediaProvidersUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetMediaProvidersServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMediaProvidersUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmetadatabyratingkeyresponsebody.md b/docs/sdk/models/errors/getmetadatabyratingkeybadrequest.md similarity index 93% rename from docs/sdk/models/errors/getmetadatabyratingkeyresponsebody.md rename to docs/sdk/models/errors/getmetadatabyratingkeybadrequest.md index 14ea748e..bf55dbfa 100644 --- a/docs/sdk/models/errors/getmetadatabyratingkeyresponsebody.md +++ b/docs/sdk/models/errors/getmetadatabyratingkeybadrequest.md @@ -1,11 +1,11 @@ -# GetMetaDataByRatingKeyResponseBody +# GetMetaDataByRatingKeyBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetMetaDataByRatingKeyResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMetaDataByRatingKeyBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmetadatabyratingkeyerrors.md b/docs/sdk/models/errors/getmetadatabyratingkeyerrors.md index 0cd4620f..81b7ca08 100644 --- a/docs/sdk/models/errors/getmetadatabyratingkeyerrors.md +++ b/docs/sdk/models/errors/getmetadatabyratingkeyerrors.md @@ -6,9 +6,9 @@ import { GetMetaDataByRatingKeyErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMetaDataByRatingKeyErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getmetadatabyratingkeylibraryerrors.md b/docs/sdk/models/errors/getmetadatabyratingkeylibraryerrors.md index 4b6ec48e..b41060dd 100644 --- a/docs/sdk/models/errors/getmetadatabyratingkeylibraryerrors.md +++ b/docs/sdk/models/errors/getmetadatabyratingkeylibraryerrors.md @@ -6,9 +6,9 @@ import { GetMetaDataByRatingKeyLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMetaDataByRatingKeyLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getmetadatabyratingkeylibraryresponsebody.md b/docs/sdk/models/errors/getmetadatabyratingkeyunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getmetadatabyratingkeylibraryresponsebody.md rename to docs/sdk/models/errors/getmetadatabyratingkeyunauthorized.md index 0c5f27fc..592b6a63 100644 --- a/docs/sdk/models/errors/getmetadatabyratingkeylibraryresponsebody.md +++ b/docs/sdk/models/errors/getmetadatabyratingkeyunauthorized.md @@ -1,11 +1,11 @@ -# GetMetaDataByRatingKeyLibraryResponseBody +# GetMetaDataByRatingKeyUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetMetaDataByRatingKeyLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMetaDataByRatingKeyUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmetadatachildrenresponsebody.md b/docs/sdk/models/errors/getmetadatachildrenbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getmetadatachildrenresponsebody.md rename to docs/sdk/models/errors/getmetadatachildrenbadrequest.md index f60677b0..7934e0fb 100644 --- a/docs/sdk/models/errors/getmetadatachildrenresponsebody.md +++ b/docs/sdk/models/errors/getmetadatachildrenbadrequest.md @@ -1,11 +1,11 @@ -# GetMetadataChildrenResponseBody +# GetMetadataChildrenBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetMetadataChildrenResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMetadataChildrenBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmetadatachildrenerrors.md b/docs/sdk/models/errors/getmetadatachildrenerrors.md index 92ab1440..dba3735d 100644 --- a/docs/sdk/models/errors/getmetadatachildrenerrors.md +++ b/docs/sdk/models/errors/getmetadatachildrenerrors.md @@ -6,9 +6,9 @@ import { GetMetadataChildrenErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMetadataChildrenErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md b/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md index 96867607..f9c34ca1 100644 --- a/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md +++ b/docs/sdk/models/errors/getmetadatachildrenlibraryerrors.md @@ -6,9 +6,9 @@ import { GetMetadataChildrenLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMetadataChildrenLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getmetadatachildrenlibraryresponsebody.md b/docs/sdk/models/errors/getmetadatachildrenunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getmetadatachildrenlibraryresponsebody.md rename to docs/sdk/models/errors/getmetadatachildrenunauthorized.md index 87a6ca39..57475a1a 100644 --- a/docs/sdk/models/errors/getmetadatachildrenlibraryresponsebody.md +++ b/docs/sdk/models/errors/getmetadatachildrenunauthorized.md @@ -1,11 +1,11 @@ -# GetMetadataChildrenLibraryResponseBody +# GetMetadataChildrenUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetMetadataChildrenLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMetadataChildrenUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmyplexaccountresponsebody.md b/docs/sdk/models/errors/getmyplexaccountbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getmyplexaccountresponsebody.md rename to docs/sdk/models/errors/getmyplexaccountbadrequest.md index 1da7b1c6..05a2b2a9 100644 --- a/docs/sdk/models/errors/getmyplexaccountresponsebody.md +++ b/docs/sdk/models/errors/getmyplexaccountbadrequest.md @@ -1,11 +1,11 @@ -# GetMyPlexAccountResponseBody +# GetMyPlexAccountBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetMyPlexAccountResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMyPlexAccountBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getmyplexaccounterrors.md b/docs/sdk/models/errors/getmyplexaccounterrors.md index 3fe06f4b..a2ce1239 100644 --- a/docs/sdk/models/errors/getmyplexaccounterrors.md +++ b/docs/sdk/models/errors/getmyplexaccounterrors.md @@ -6,9 +6,9 @@ import { GetMyPlexAccountErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMyPlexAccountErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getmyplexaccountservererrors.md b/docs/sdk/models/errors/getmyplexaccountservererrors.md index 097f826a..24335960 100644 --- a/docs/sdk/models/errors/getmyplexaccountservererrors.md +++ b/docs/sdk/models/errors/getmyplexaccountservererrors.md @@ -6,9 +6,9 @@ import { GetMyPlexAccountServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetMyPlexAccountServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getmyplexaccountserverresponsebody.md b/docs/sdk/models/errors/getmyplexaccountunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getmyplexaccountserverresponsebody.md rename to docs/sdk/models/errors/getmyplexaccountunauthorized.md index d99b08c2..047faf79 100644 --- a/docs/sdk/models/errors/getmyplexaccountserverresponsebody.md +++ b/docs/sdk/models/errors/getmyplexaccountunauthorized.md @@ -1,11 +1,11 @@ -# GetMyPlexAccountServerResponseBody +# GetMyPlexAccountUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetMyPlexAccountServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetMyPlexAccountUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getondeckresponsebody.md b/docs/sdk/models/errors/getondeckbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getondeckresponsebody.md rename to docs/sdk/models/errors/getondeckbadrequest.md index 6e125d54..48618b7d 100644 --- a/docs/sdk/models/errors/getondeckresponsebody.md +++ b/docs/sdk/models/errors/getondeckbadrequest.md @@ -1,11 +1,11 @@ -# GetOnDeckResponseBody +# GetOnDeckBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetOnDeckResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetOnDeckBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getondeckerrors.md b/docs/sdk/models/errors/getondeckerrors.md index c293c65f..d5ce61ea 100644 --- a/docs/sdk/models/errors/getondeckerrors.md +++ b/docs/sdk/models/errors/getondeckerrors.md @@ -6,9 +6,9 @@ import { GetOnDeckErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetOnDeckErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getondecklibraryerrors.md b/docs/sdk/models/errors/getondecklibraryerrors.md index dacddbf0..e9a8ca5d 100644 --- a/docs/sdk/models/errors/getondecklibraryerrors.md +++ b/docs/sdk/models/errors/getondecklibraryerrors.md @@ -6,9 +6,9 @@ import { GetOnDeckLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetOnDeckLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getondecklibraryresponsebody.md b/docs/sdk/models/errors/getondeckunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getondecklibraryresponsebody.md rename to docs/sdk/models/errors/getondeckunauthorized.md index 4fef6613..62b256be 100644 --- a/docs/sdk/models/errors/getondecklibraryresponsebody.md +++ b/docs/sdk/models/errors/getondeckunauthorized.md @@ -1,11 +1,11 @@ -# GetOnDeckLibraryResponseBody +# GetOnDeckUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetOnDeckLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetOnDeckUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getpinresponsebody.md b/docs/sdk/models/errors/getpinbadrequest.md similarity index 88% rename from docs/sdk/models/errors/getpinresponsebody.md rename to docs/sdk/models/errors/getpinbadrequest.md index b5ac6d20..fa042221 100644 --- a/docs/sdk/models/errors/getpinresponsebody.md +++ b/docs/sdk/models/errors/getpinbadrequest.md @@ -1,11 +1,11 @@ -# GetPinResponseBody +# GetPinBadRequest -Bad Request response when the X-Plex-Client-Identifier is missing +Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetPinResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPinBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getpinerrors.md b/docs/sdk/models/errors/getpinerrors.md index 8e0b7767..961b90b4 100644 --- a/docs/sdk/models/errors/getpinerrors.md +++ b/docs/sdk/models/errors/getpinerrors.md @@ -6,9 +6,9 @@ import { GetPinErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPinErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getplaylistresponsebody.md b/docs/sdk/models/errors/getplaylistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getplaylistresponsebody.md rename to docs/sdk/models/errors/getplaylistbadrequest.md index c789ae80..27623349 100644 --- a/docs/sdk/models/errors/getplaylistresponsebody.md +++ b/docs/sdk/models/errors/getplaylistbadrequest.md @@ -1,11 +1,11 @@ -# GetPlaylistResponseBody +# GetPlaylistBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetPlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getplaylistcontentsresponsebody.md b/docs/sdk/models/errors/getplaylistcontentsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getplaylistcontentsresponsebody.md rename to docs/sdk/models/errors/getplaylistcontentsbadrequest.md index 64c3246f..44788a9e 100644 --- a/docs/sdk/models/errors/getplaylistcontentsresponsebody.md +++ b/docs/sdk/models/errors/getplaylistcontentsbadrequest.md @@ -1,11 +1,11 @@ -# GetPlaylistContentsResponseBody +# GetPlaylistContentsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistContentsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getplaylistcontentserrors.md b/docs/sdk/models/errors/getplaylistcontentserrors.md index 65704a7c..b927c5ce 100644 --- a/docs/sdk/models/errors/getplaylistcontentserrors.md +++ b/docs/sdk/models/errors/getplaylistcontentserrors.md @@ -6,9 +6,9 @@ import { GetPlaylistContentsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistContentsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md b/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md index c81651e0..7c6e67f9 100644 --- a/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md +++ b/docs/sdk/models/errors/getplaylistcontentsplaylistserrors.md @@ -6,9 +6,9 @@ import { GetPlaylistContentsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistContentsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getplaylistcontentsplaylistsresponsebody.md b/docs/sdk/models/errors/getplaylistcontentsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getplaylistcontentsplaylistsresponsebody.md rename to docs/sdk/models/errors/getplaylistcontentsunauthorized.md index 5275738b..50078bf6 100644 --- a/docs/sdk/models/errors/getplaylistcontentsplaylistsresponsebody.md +++ b/docs/sdk/models/errors/getplaylistcontentsunauthorized.md @@ -1,11 +1,11 @@ -# GetPlaylistContentsPlaylistsResponseBody +# GetPlaylistContentsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetPlaylistContentsPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistContentsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getplaylisterrors.md b/docs/sdk/models/errors/getplaylisterrors.md index 522a0e94..6e7233a2 100644 --- a/docs/sdk/models/errors/getplaylisterrors.md +++ b/docs/sdk/models/errors/getplaylisterrors.md @@ -6,9 +6,9 @@ import { GetPlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getplaylistplaylistserrors.md b/docs/sdk/models/errors/getplaylistplaylistserrors.md index 85db400f..69b0203d 100644 --- a/docs/sdk/models/errors/getplaylistplaylistserrors.md +++ b/docs/sdk/models/errors/getplaylistplaylistserrors.md @@ -6,9 +6,9 @@ import { GetPlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getplaylistsresponsebody.md b/docs/sdk/models/errors/getplaylistsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getplaylistsresponsebody.md rename to docs/sdk/models/errors/getplaylistsbadrequest.md index 27fda7a6..6de5f414 100644 --- a/docs/sdk/models/errors/getplaylistsresponsebody.md +++ b/docs/sdk/models/errors/getplaylistsbadrequest.md @@ -1,11 +1,11 @@ -# GetPlaylistsResponseBody +# GetPlaylistsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getplaylistserrors.md b/docs/sdk/models/errors/getplaylistserrors.md index 806c5bac..3fc820bb 100644 --- a/docs/sdk/models/errors/getplaylistserrors.md +++ b/docs/sdk/models/errors/getplaylistserrors.md @@ -6,9 +6,9 @@ import { GetPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getplaylistsplaylistserrors.md b/docs/sdk/models/errors/getplaylistsplaylistserrors.md index a630f6d7..f2acdc2d 100644 --- a/docs/sdk/models/errors/getplaylistsplaylistserrors.md +++ b/docs/sdk/models/errors/getplaylistsplaylistserrors.md @@ -6,9 +6,9 @@ import { GetPlaylistsPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetPlaylistsPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getplaylistsplaylistsresponsebody.md b/docs/sdk/models/errors/getplaylistsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getplaylistsplaylistsresponsebody.md rename to docs/sdk/models/errors/getplaylistsunauthorized.md index 888bedf4..907a2cc7 100644 --- a/docs/sdk/models/errors/getplaylistsplaylistsresponsebody.md +++ b/docs/sdk/models/errors/getplaylistsunauthorized.md @@ -1,11 +1,11 @@ -# GetPlaylistsPlaylistsResponseBody +# GetPlaylistsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetPlaylistsPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getplaylistplaylistsresponsebody.md b/docs/sdk/models/errors/getplaylistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getplaylistplaylistsresponsebody.md rename to docs/sdk/models/errors/getplaylistunauthorized.md index 0613c597..33b891a9 100644 --- a/docs/sdk/models/errors/getplaylistplaylistsresponsebody.md +++ b/docs/sdk/models/errors/getplaylistunauthorized.md @@ -1,11 +1,11 @@ -# GetPlaylistPlaylistsResponseBody +# GetPlaylistUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetPlaylistPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetPlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getrecentlyaddedresponsebody.md b/docs/sdk/models/errors/getrecentlyaddedbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getrecentlyaddedresponsebody.md rename to docs/sdk/models/errors/getrecentlyaddedbadrequest.md index 8d508761..76e83816 100644 --- a/docs/sdk/models/errors/getrecentlyaddedresponsebody.md +++ b/docs/sdk/models/errors/getrecentlyaddedbadrequest.md @@ -1,11 +1,11 @@ -# GetRecentlyAddedResponseBody +# GetRecentlyAddedBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetRecentlyAddedResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetRecentlyAddedBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getrecentlyaddederrors.md b/docs/sdk/models/errors/getrecentlyaddederrors.md index 82841910..8645c75a 100644 --- a/docs/sdk/models/errors/getrecentlyaddederrors.md +++ b/docs/sdk/models/errors/getrecentlyaddederrors.md @@ -6,9 +6,9 @@ import { GetRecentlyAddedErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetRecentlyAddedErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md b/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md index e88848b7..4c02ab1b 100644 --- a/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md +++ b/docs/sdk/models/errors/getrecentlyaddedlibraryerrors.md @@ -6,9 +6,9 @@ import { GetRecentlyAddedLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetRecentlyAddedLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getrecentlyaddedlibraryresponsebody.md b/docs/sdk/models/errors/getrecentlyaddedunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getrecentlyaddedlibraryresponsebody.md rename to docs/sdk/models/errors/getrecentlyaddedunauthorized.md index 7619bc1c..218cb251 100644 --- a/docs/sdk/models/errors/getrecentlyaddedlibraryresponsebody.md +++ b/docs/sdk/models/errors/getrecentlyaddedunauthorized.md @@ -1,11 +1,11 @@ -# GetRecentlyAddedLibraryResponseBody +# GetRecentlyAddedUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetRecentlyAddedLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetRecentlyAddedUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadataresponsebody.md b/docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md similarity index 93% rename from docs/sdk/models/errors/getrefreshlibrarymetadataresponsebody.md rename to docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md index 1f60264a..b2add72d 100644 --- a/docs/sdk/models/errors/getrefreshlibrarymetadataresponsebody.md +++ b/docs/sdk/models/errors/getrefreshlibrarymetadatabadrequest.md @@ -1,11 +1,11 @@ -# GetRefreshLibraryMetadataResponseBody +# GetRefreshLibraryMetadataBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetRefreshLibraryMetadataResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetRefreshLibraryMetadataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md b/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md index f02e498a..db832209 100644 --- a/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md +++ b/docs/sdk/models/errors/getrefreshlibrarymetadataerrors.md @@ -6,9 +6,9 @@ import { GetRefreshLibraryMetadataErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetRefreshLibraryMetadataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md b/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md index af018587..b234090e 100644 --- a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md +++ b/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryerrors.md @@ -6,9 +6,9 @@ import { GetRefreshLibraryMetadataLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetRefreshLibraryMetadataLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md b/docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md rename to docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md index 790e49c7..1c8fd64e 100644 --- a/docs/sdk/models/errors/getrefreshlibrarymetadatalibraryresponsebody.md +++ b/docs/sdk/models/errors/getrefreshlibrarymetadataunauthorized.md @@ -1,11 +1,11 @@ -# GetRefreshLibraryMetadataLibraryResponseBody +# GetRefreshLibraryMetadataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetRefreshLibraryMetadataLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetRefreshLibraryMetadataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getresizedphotoresponsebody.md b/docs/sdk/models/errors/getresizedphotobadrequest.md similarity index 93% rename from docs/sdk/models/errors/getresizedphotoresponsebody.md rename to docs/sdk/models/errors/getresizedphotobadrequest.md index 815a9636..ad518326 100644 --- a/docs/sdk/models/errors/getresizedphotoresponsebody.md +++ b/docs/sdk/models/errors/getresizedphotobadrequest.md @@ -1,11 +1,11 @@ -# GetResizedPhotoResponseBody +# GetResizedPhotoBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetResizedPhotoResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetResizedPhotoBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getresizedphotoerrors.md b/docs/sdk/models/errors/getresizedphotoerrors.md index bf508df9..129dca12 100644 --- a/docs/sdk/models/errors/getresizedphotoerrors.md +++ b/docs/sdk/models/errors/getresizedphotoerrors.md @@ -6,9 +6,9 @@ import { GetResizedPhotoErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetResizedPhotoErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getresizedphotoservererrors.md b/docs/sdk/models/errors/getresizedphotoservererrors.md index f14c5001..64a42b26 100644 --- a/docs/sdk/models/errors/getresizedphotoservererrors.md +++ b/docs/sdk/models/errors/getresizedphotoservererrors.md @@ -6,9 +6,9 @@ import { GetResizedPhotoServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetResizedPhotoServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getresizedphotoserverresponsebody.md b/docs/sdk/models/errors/getresizedphotounauthorized.md similarity index 93% rename from docs/sdk/models/errors/getresizedphotoserverresponsebody.md rename to docs/sdk/models/errors/getresizedphotounauthorized.md index 9ac91a87..d0873a7a 100644 --- a/docs/sdk/models/errors/getresizedphotoserverresponsebody.md +++ b/docs/sdk/models/errors/getresizedphotounauthorized.md @@ -1,11 +1,11 @@ -# GetResizedPhotoServerResponseBody +# GetResizedPhotoUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetResizedPhotoServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetResizedPhotoUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getresourcesstatisticsresponsebody.md b/docs/sdk/models/errors/getresourcesstatisticsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getresourcesstatisticsresponsebody.md rename to docs/sdk/models/errors/getresourcesstatisticsbadrequest.md index 2abc6f8d..2c1772e1 100644 --- a/docs/sdk/models/errors/getresourcesstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getresourcesstatisticsbadrequest.md @@ -1,11 +1,11 @@ -# GetResourcesStatisticsResponseBody +# GetResourcesStatisticsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetResourcesStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetResourcesStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getresourcesstatisticserrors.md b/docs/sdk/models/errors/getresourcesstatisticserrors.md index 72820509..265471e9 100644 --- a/docs/sdk/models/errors/getresourcesstatisticserrors.md +++ b/docs/sdk/models/errors/getresourcesstatisticserrors.md @@ -6,9 +6,9 @@ import { GetResourcesStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetResourcesStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md b/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md index 9b56586f..82e87186 100644 --- a/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md +++ b/docs/sdk/models/errors/getresourcesstatisticsstatisticserrors.md @@ -6,9 +6,9 @@ import { GetResourcesStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetResourcesStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getresourcesstatisticsstatisticsresponsebody.md b/docs/sdk/models/errors/getresourcesstatisticsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getresourcesstatisticsstatisticsresponsebody.md rename to docs/sdk/models/errors/getresourcesstatisticsunauthorized.md index 5384a8aa..1e90ddb0 100644 --- a/docs/sdk/models/errors/getresourcesstatisticsstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getresourcesstatisticsunauthorized.md @@ -1,11 +1,11 @@ -# GetResourcesStatisticsStatisticsResponseBody +# GetResourcesStatisticsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetResourcesStatisticsStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetResourcesStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsearchlibraryresponsebody.md b/docs/sdk/models/errors/getsearchlibrarybadrequest.md similarity index 93% rename from docs/sdk/models/errors/getsearchlibraryresponsebody.md rename to docs/sdk/models/errors/getsearchlibrarybadrequest.md index 0fbaa0d7..262774e4 100644 --- a/docs/sdk/models/errors/getsearchlibraryresponsebody.md +++ b/docs/sdk/models/errors/getsearchlibrarybadrequest.md @@ -1,11 +1,11 @@ -# GetSearchLibraryResponseBody +# GetSearchLibraryBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetSearchLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSearchLibraryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsearchlibraryerrors.md b/docs/sdk/models/errors/getsearchlibraryerrors.md index b4a4bce1..eed26eef 100644 --- a/docs/sdk/models/errors/getsearchlibraryerrors.md +++ b/docs/sdk/models/errors/getsearchlibraryerrors.md @@ -6,9 +6,9 @@ import { GetSearchLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSearchLibraryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md b/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md index 6e89af0f..76aa207b 100644 --- a/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md +++ b/docs/sdk/models/errors/getsearchlibrarylibraryerrors.md @@ -6,9 +6,9 @@ import { GetSearchLibraryLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSearchLibraryLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getsearchlibrarylibraryresponsebody.md b/docs/sdk/models/errors/getsearchlibraryunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getsearchlibrarylibraryresponsebody.md rename to docs/sdk/models/errors/getsearchlibraryunauthorized.md index b3db006b..27f52db1 100644 --- a/docs/sdk/models/errors/getsearchlibrarylibraryresponsebody.md +++ b/docs/sdk/models/errors/getsearchlibraryunauthorized.md @@ -1,11 +1,11 @@ -# GetSearchLibraryLibraryResponseBody +# GetSearchLibraryUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetSearchLibraryLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSearchLibraryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsearchresultsresponsebody.md b/docs/sdk/models/errors/getsearchresultsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getsearchresultsresponsebody.md rename to docs/sdk/models/errors/getsearchresultsbadrequest.md index de6eb1f6..5493c5d8 100644 --- a/docs/sdk/models/errors/getsearchresultsresponsebody.md +++ b/docs/sdk/models/errors/getsearchresultsbadrequest.md @@ -1,11 +1,11 @@ -# GetSearchResultsResponseBody +# GetSearchResultsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetSearchResultsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSearchResultsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsearchresultserrors.md b/docs/sdk/models/errors/getsearchresultserrors.md index 5ade1895..e3794d08 100644 --- a/docs/sdk/models/errors/getsearchresultserrors.md +++ b/docs/sdk/models/errors/getsearchresultserrors.md @@ -6,9 +6,9 @@ import { GetSearchResultsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSearchResultsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getsearchresultssearcherrors.md b/docs/sdk/models/errors/getsearchresultssearcherrors.md index 7c7d91d4..7724c4c8 100644 --- a/docs/sdk/models/errors/getsearchresultssearcherrors.md +++ b/docs/sdk/models/errors/getsearchresultssearcherrors.md @@ -6,9 +6,9 @@ import { GetSearchResultsSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSearchResultsSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getsearchresultssearchresponsebody.md b/docs/sdk/models/errors/getsearchresultsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getsearchresultssearchresponsebody.md rename to docs/sdk/models/errors/getsearchresultsunauthorized.md index bd9ecbf8..bb78606f 100644 --- a/docs/sdk/models/errors/getsearchresultssearchresponsebody.md +++ b/docs/sdk/models/errors/getsearchresultsunauthorized.md @@ -1,11 +1,11 @@ -# GetSearchResultsSearchResponseBody +# GetSearchResultsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetSearchResultsSearchResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSearchResultsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md b/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md index 56e08556..37598fbd 100644 --- a/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md +++ b/docs/sdk/models/errors/getserveractivitiesactivitieserrors.md @@ -6,9 +6,9 @@ import { GetServerActivitiesActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerActivitiesActivitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getserveractivitiesresponsebody.md b/docs/sdk/models/errors/getserveractivitiesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getserveractivitiesresponsebody.md rename to docs/sdk/models/errors/getserveractivitiesbadrequest.md index f49a850a..6715c0ee 100644 --- a/docs/sdk/models/errors/getserveractivitiesresponsebody.md +++ b/docs/sdk/models/errors/getserveractivitiesbadrequest.md @@ -1,11 +1,11 @@ -# GetServerActivitiesResponseBody +# GetServerActivitiesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetServerActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerActivitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserveractivitieserrors.md b/docs/sdk/models/errors/getserveractivitieserrors.md index 6a7e8f61..62b87b24 100644 --- a/docs/sdk/models/errors/getserveractivitieserrors.md +++ b/docs/sdk/models/errors/getserveractivitieserrors.md @@ -6,9 +6,9 @@ import { GetServerActivitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerActivitiesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getserveractivitiesactivitiesresponsebody.md b/docs/sdk/models/errors/getserveractivitiesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getserveractivitiesactivitiesresponsebody.md rename to docs/sdk/models/errors/getserveractivitiesunauthorized.md index 7913f743..d3096ae1 100644 --- a/docs/sdk/models/errors/getserveractivitiesactivitiesresponsebody.md +++ b/docs/sdk/models/errors/getserveractivitiesunauthorized.md @@ -1,11 +1,11 @@ -# GetServerActivitiesActivitiesResponseBody +# GetServerActivitiesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetServerActivitiesActivitiesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerActivitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getservercapabilitiesresponsebody.md b/docs/sdk/models/errors/getservercapabilitiesbadrequest.md similarity index 91% rename from docs/sdk/models/errors/getservercapabilitiesresponsebody.md rename to docs/sdk/models/errors/getservercapabilitiesbadrequest.md index af1f1ca1..b103e750 100644 --- a/docs/sdk/models/errors/getservercapabilitiesresponsebody.md +++ b/docs/sdk/models/errors/getservercapabilitiesbadrequest.md @@ -1,11 +1,11 @@ -# GetServerCapabilitiesResponseBody +# GetServerCapabilitiesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetServerCapabilitiesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerCapabilitiesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getservercapabilitieserrors.md b/docs/sdk/models/errors/getservercapabilitieserrors.md index 28d8c01e..e46cc7e2 100644 --- a/docs/sdk/models/errors/getservercapabilitieserrors.md +++ b/docs/sdk/models/errors/getservercapabilitieserrors.md @@ -6,9 +6,9 @@ import { GetServerCapabilitiesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerCapabilitiesErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getservercapabilitiesserverresponsebody.md b/docs/sdk/models/errors/getservercapabilitiesunauthorized.md similarity index 92% rename from docs/sdk/models/errors/getservercapabilitiesserverresponsebody.md rename to docs/sdk/models/errors/getservercapabilitiesunauthorized.md index 19f94348..4ce689ba 100644 --- a/docs/sdk/models/errors/getservercapabilitiesserverresponsebody.md +++ b/docs/sdk/models/errors/getservercapabilitiesunauthorized.md @@ -1,11 +1,11 @@ -# GetServerCapabilitiesServerResponseBody +# GetServerCapabilitiesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetServerCapabilitiesServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerCapabilitiesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserveridentityresponsebody.md b/docs/sdk/models/errors/getserveridentityrequesttimeout.md similarity index 94% rename from docs/sdk/models/errors/getserveridentityresponsebody.md rename to docs/sdk/models/errors/getserveridentityrequesttimeout.md index 50017706..166d2d5c 100644 --- a/docs/sdk/models/errors/getserveridentityresponsebody.md +++ b/docs/sdk/models/errors/getserveridentityrequesttimeout.md @@ -1,11 +1,11 @@ -# GetServerIdentityResponseBody +# GetServerIdentityRequestTimeout Request Timeout ## Example Usage ```typescript -import { GetServerIdentityResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerIdentityRequestTimeout } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverlistresponsebody.md b/docs/sdk/models/errors/getserverlistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getserverlistresponsebody.md rename to docs/sdk/models/errors/getserverlistbadrequest.md index 41c8fe23..045ea411 100644 --- a/docs/sdk/models/errors/getserverlistresponsebody.md +++ b/docs/sdk/models/errors/getserverlistbadrequest.md @@ -1,11 +1,11 @@ -# GetServerListResponseBody +# GetServerListBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetServerListResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerListBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverlisterrors.md b/docs/sdk/models/errors/getserverlisterrors.md index 16612fa0..34370bfe 100644 --- a/docs/sdk/models/errors/getserverlisterrors.md +++ b/docs/sdk/models/errors/getserverlisterrors.md @@ -6,9 +6,9 @@ import { GetServerListErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerListErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getserverlistservererrors.md b/docs/sdk/models/errors/getserverlistservererrors.md index eee663d4..eaf070c4 100644 --- a/docs/sdk/models/errors/getserverlistservererrors.md +++ b/docs/sdk/models/errors/getserverlistservererrors.md @@ -6,9 +6,9 @@ import { GetServerListServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerListServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getserverlistserverresponsebody.md b/docs/sdk/models/errors/getserverlistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getserverlistserverresponsebody.md rename to docs/sdk/models/errors/getserverlistunauthorized.md index 5df57f70..f6846308 100644 --- a/docs/sdk/models/errors/getserverlistserverresponsebody.md +++ b/docs/sdk/models/errors/getserverlistunauthorized.md @@ -1,11 +1,11 @@ -# GetServerListServerResponseBody +# GetServerListUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetServerListServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerListUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverpreferencesresponsebody.md b/docs/sdk/models/errors/getserverpreferencesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getserverpreferencesresponsebody.md rename to docs/sdk/models/errors/getserverpreferencesbadrequest.md index 5e8d768c..3eec63dd 100644 --- a/docs/sdk/models/errors/getserverpreferencesresponsebody.md +++ b/docs/sdk/models/errors/getserverpreferencesbadrequest.md @@ -1,11 +1,11 @@ -# GetServerPreferencesResponseBody +# GetServerPreferencesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetServerPreferencesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerPreferencesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverpreferenceserrors.md b/docs/sdk/models/errors/getserverpreferenceserrors.md index 9f4f743b..42d9ab28 100644 --- a/docs/sdk/models/errors/getserverpreferenceserrors.md +++ b/docs/sdk/models/errors/getserverpreferenceserrors.md @@ -6,9 +6,9 @@ import { GetServerPreferencesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerPreferencesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getserverpreferencesservererrors.md b/docs/sdk/models/errors/getserverpreferencesservererrors.md index 4c8e7639..5ab928d1 100644 --- a/docs/sdk/models/errors/getserverpreferencesservererrors.md +++ b/docs/sdk/models/errors/getserverpreferencesservererrors.md @@ -6,9 +6,9 @@ import { GetServerPreferencesServerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerPreferencesServerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getserverpreferencesserverresponsebody.md b/docs/sdk/models/errors/getserverpreferencesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getserverpreferencesserverresponsebody.md rename to docs/sdk/models/errors/getserverpreferencesunauthorized.md index cdd2c1e3..4f6cf54d 100644 --- a/docs/sdk/models/errors/getserverpreferencesserverresponsebody.md +++ b/docs/sdk/models/errors/getserverpreferencesunauthorized.md @@ -1,11 +1,11 @@ -# GetServerPreferencesServerResponseBody +# GetServerPreferencesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetServerPreferencesServerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerPreferencesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverresourcesresponsebody.md b/docs/sdk/models/errors/getserverresourcesbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getserverresourcesresponsebody.md rename to docs/sdk/models/errors/getserverresourcesbadrequest.md index 7b94948e..ecca39c8 100644 --- a/docs/sdk/models/errors/getserverresourcesresponsebody.md +++ b/docs/sdk/models/errors/getserverresourcesbadrequest.md @@ -1,11 +1,11 @@ -# GetServerResourcesResponseBody +# GetServerResourcesBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetServerResourcesResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerResourcesBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getserverresourceserrors.md b/docs/sdk/models/errors/getserverresourceserrors.md index b86297da..7fa7b1f8 100644 --- a/docs/sdk/models/errors/getserverresourceserrors.md +++ b/docs/sdk/models/errors/getserverresourceserrors.md @@ -6,9 +6,9 @@ import { GetServerResourcesErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerResourcesErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getserverresourcesplexerrors.md b/docs/sdk/models/errors/getserverresourcesplexerrors.md index ab1a545e..6988e053 100644 --- a/docs/sdk/models/errors/getserverresourcesplexerrors.md +++ b/docs/sdk/models/errors/getserverresourcesplexerrors.md @@ -6,9 +6,9 @@ import { GetServerResourcesPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetServerResourcesPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getserverresourcesplexresponsebody.md b/docs/sdk/models/errors/getserverresourcesunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getserverresourcesplexresponsebody.md rename to docs/sdk/models/errors/getserverresourcesunauthorized.md index f21260ed..18f074bc 100644 --- a/docs/sdk/models/errors/getserverresourcesplexresponsebody.md +++ b/docs/sdk/models/errors/getserverresourcesunauthorized.md @@ -1,11 +1,11 @@ -# GetServerResourcesPlexResponseBody +# GetServerResourcesUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetServerResourcesPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetServerResourcesUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsessionhistoryresponsebody.md b/docs/sdk/models/errors/getsessionhistorybadrequest.md similarity index 93% rename from docs/sdk/models/errors/getsessionhistoryresponsebody.md rename to docs/sdk/models/errors/getsessionhistorybadrequest.md index 8f1ec4d9..6104e6c6 100644 --- a/docs/sdk/models/errors/getsessionhistoryresponsebody.md +++ b/docs/sdk/models/errors/getsessionhistorybadrequest.md @@ -1,11 +1,11 @@ -# GetSessionHistoryResponseBody +# GetSessionHistoryBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetSessionHistoryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSessionHistoryBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsessionhistoryerrors.md b/docs/sdk/models/errors/getsessionhistoryerrors.md index 8b63a82a..70c769b9 100644 --- a/docs/sdk/models/errors/getsessionhistoryerrors.md +++ b/docs/sdk/models/errors/getsessionhistoryerrors.md @@ -6,9 +6,9 @@ import { GetSessionHistoryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSessionHistoryErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getsessionhistorysessionserrors.md b/docs/sdk/models/errors/getsessionhistorysessionserrors.md index cb0e21a2..f68309f9 100644 --- a/docs/sdk/models/errors/getsessionhistorysessionserrors.md +++ b/docs/sdk/models/errors/getsessionhistorysessionserrors.md @@ -6,9 +6,9 @@ import { GetSessionHistorySessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSessionHistorySessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getsessionhistorysessionsresponsebody.md b/docs/sdk/models/errors/getsessionhistoryunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getsessionhistorysessionsresponsebody.md rename to docs/sdk/models/errors/getsessionhistoryunauthorized.md index dde3a19e..8b4cc7e7 100644 --- a/docs/sdk/models/errors/getsessionhistorysessionsresponsebody.md +++ b/docs/sdk/models/errors/getsessionhistoryunauthorized.md @@ -1,11 +1,11 @@ -# GetSessionHistorySessionsResponseBody +# GetSessionHistoryUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetSessionHistorySessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSessionHistoryUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsessionsresponsebody.md b/docs/sdk/models/errors/getsessionsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getsessionsresponsebody.md rename to docs/sdk/models/errors/getsessionsbadrequest.md index f5936fde..8e0b48cf 100644 --- a/docs/sdk/models/errors/getsessionsresponsebody.md +++ b/docs/sdk/models/errors/getsessionsbadrequest.md @@ -1,11 +1,11 @@ -# GetSessionsResponseBody +# GetSessionsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSessionsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsessionserrors.md b/docs/sdk/models/errors/getsessionserrors.md index da27124a..671b5a2b 100644 --- a/docs/sdk/models/errors/getsessionserrors.md +++ b/docs/sdk/models/errors/getsessionserrors.md @@ -6,9 +6,9 @@ import { GetSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSessionsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getsessionssessionserrors.md b/docs/sdk/models/errors/getsessionssessionserrors.md index 59bb17f8..2964e3be 100644 --- a/docs/sdk/models/errors/getsessionssessionserrors.md +++ b/docs/sdk/models/errors/getsessionssessionserrors.md @@ -6,9 +6,9 @@ import { GetSessionsSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSessionsSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getsessionssessionsresponsebody.md b/docs/sdk/models/errors/getsessionsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getsessionssessionsresponsebody.md rename to docs/sdk/models/errors/getsessionsunauthorized.md index 76d6ec6e..9bb49d83 100644 --- a/docs/sdk/models/errors/getsessionssessionsresponsebody.md +++ b/docs/sdk/models/errors/getsessionsunauthorized.md @@ -1,11 +1,11 @@ -# GetSessionsSessionsResponseBody +# GetSessionsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetSessionsSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSessionsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md b/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md index cb4b29eb..80a09a96 100644 --- a/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md +++ b/docs/sdk/models/errors/getsourceconnectioninformationauthenticationerrors.md @@ -6,9 +6,9 @@ import { GetSourceConnectionInformationAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSourceConnectionInformationAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getsourceconnectioninformationresponsebody.md b/docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getsourceconnectioninformationresponsebody.md rename to docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md index 59de55e4..a144bc13 100644 --- a/docs/sdk/models/errors/getsourceconnectioninformationresponsebody.md +++ b/docs/sdk/models/errors/getsourceconnectioninformationbadrequest.md @@ -1,11 +1,11 @@ -# GetSourceConnectionInformationResponseBody +# GetSourceConnectionInformationBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetSourceConnectionInformationResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSourceConnectionInformationBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getsourceconnectioninformationerrors.md b/docs/sdk/models/errors/getsourceconnectioninformationerrors.md index 17d800db..ee70e819 100644 --- a/docs/sdk/models/errors/getsourceconnectioninformationerrors.md +++ b/docs/sdk/models/errors/getsourceconnectioninformationerrors.md @@ -6,9 +6,9 @@ import { GetSourceConnectionInformationErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetSourceConnectionInformationErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getsourceconnectioninformationauthenticationresponsebody.md b/docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getsourceconnectioninformationauthenticationresponsebody.md rename to docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md index cb65dac9..6b1ec190 100644 --- a/docs/sdk/models/errors/getsourceconnectioninformationauthenticationresponsebody.md +++ b/docs/sdk/models/errors/getsourceconnectioninformationunauthorized.md @@ -1,11 +1,11 @@ -# GetSourceConnectionInformationAuthenticationResponseBody +# GetSourceConnectionInformationUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetSourceConnectionInformationAuthenticationResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetSourceConnectionInformationUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getstatisticsresponsebody.md b/docs/sdk/models/errors/getstatisticsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getstatisticsresponsebody.md rename to docs/sdk/models/errors/getstatisticsbadrequest.md index 04cb5314..005f480b 100644 --- a/docs/sdk/models/errors/getstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getstatisticsbadrequest.md @@ -1,11 +1,11 @@ -# GetStatisticsResponseBody +# GetStatisticsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetStatisticsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getstatisticserrors.md b/docs/sdk/models/errors/getstatisticserrors.md index 6d0cbd5d..7df79970 100644 --- a/docs/sdk/models/errors/getstatisticserrors.md +++ b/docs/sdk/models/errors/getstatisticserrors.md @@ -6,9 +6,9 @@ import { GetStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetStatisticsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getstatisticsstatisticserrors.md b/docs/sdk/models/errors/getstatisticsstatisticserrors.md index 41d45c7e..27c6b3f7 100644 --- a/docs/sdk/models/errors/getstatisticsstatisticserrors.md +++ b/docs/sdk/models/errors/getstatisticsstatisticserrors.md @@ -6,9 +6,9 @@ import { GetStatisticsStatisticsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetStatisticsStatisticsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getstatisticsstatisticsresponsebody.md b/docs/sdk/models/errors/getstatisticsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getstatisticsstatisticsresponsebody.md rename to docs/sdk/models/errors/getstatisticsunauthorized.md index f01779e5..438211b7 100644 --- a/docs/sdk/models/errors/getstatisticsstatisticsresponsebody.md +++ b/docs/sdk/models/errors/getstatisticsunauthorized.md @@ -1,11 +1,11 @@ -# GetStatisticsStatisticsResponseBody +# GetStatisticsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetStatisticsStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetStatisticsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getthumbimageresponsebody.md b/docs/sdk/models/errors/getthumbimagebadrequest.md similarity index 93% rename from docs/sdk/models/errors/getthumbimageresponsebody.md rename to docs/sdk/models/errors/getthumbimagebadrequest.md index 037afc87..683a49b2 100644 --- a/docs/sdk/models/errors/getthumbimageresponsebody.md +++ b/docs/sdk/models/errors/getthumbimagebadrequest.md @@ -1,11 +1,11 @@ -# GetThumbImageResponseBody +# GetThumbImageBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetThumbImageResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetThumbImageBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getthumbimageerrors.md b/docs/sdk/models/errors/getthumbimageerrors.md index 5b780264..8f6bfe5b 100644 --- a/docs/sdk/models/errors/getthumbimageerrors.md +++ b/docs/sdk/models/errors/getthumbimageerrors.md @@ -6,9 +6,9 @@ import { GetThumbImageErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetThumbImageErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getthumbimagemediaerrors.md b/docs/sdk/models/errors/getthumbimagemediaerrors.md index 3d2ca0e3..9d341ed4 100644 --- a/docs/sdk/models/errors/getthumbimagemediaerrors.md +++ b/docs/sdk/models/errors/getthumbimagemediaerrors.md @@ -6,9 +6,9 @@ import { GetThumbImageMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetThumbImageMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getthumbimagemediaresponsebody.md b/docs/sdk/models/errors/getthumbimageunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getthumbimagemediaresponsebody.md rename to docs/sdk/models/errors/getthumbimageunauthorized.md index 262e317b..10567bdf 100644 --- a/docs/sdk/models/errors/getthumbimagemediaresponsebody.md +++ b/docs/sdk/models/errors/getthumbimageunauthorized.md @@ -1,11 +1,11 @@ -# GetThumbImageMediaResponseBody +# GetThumbImageUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetThumbImageMediaResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetThumbImageUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettimelineresponsebody.md b/docs/sdk/models/errors/gettimelinebadrequest.md similarity index 93% rename from docs/sdk/models/errors/gettimelineresponsebody.md rename to docs/sdk/models/errors/gettimelinebadrequest.md index eb7ac41a..fa4cfc5c 100644 --- a/docs/sdk/models/errors/gettimelineresponsebody.md +++ b/docs/sdk/models/errors/gettimelinebadrequest.md @@ -1,11 +1,11 @@ -# GetTimelineResponseBody +# GetTimelineBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetTimelineResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTimelineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettimelineerrors.md b/docs/sdk/models/errors/gettimelineerrors.md index 196a9d2f..39a64b30 100644 --- a/docs/sdk/models/errors/gettimelineerrors.md +++ b/docs/sdk/models/errors/gettimelineerrors.md @@ -6,9 +6,9 @@ import { GetTimelineErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTimelineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettimelinevideoresponsebody.md b/docs/sdk/models/errors/gettimelineunauthorized.md similarity index 93% rename from docs/sdk/models/errors/gettimelinevideoresponsebody.md rename to docs/sdk/models/errors/gettimelineunauthorized.md index 32e6ef13..b7e12bba 100644 --- a/docs/sdk/models/errors/gettimelinevideoresponsebody.md +++ b/docs/sdk/models/errors/gettimelineunauthorized.md @@ -1,11 +1,11 @@ -# GetTimelineVideoResponseBody +# GetTimelineUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetTimelineVideoResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTimelineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettimelinevideoerrors.md b/docs/sdk/models/errors/gettimelinevideoerrors.md index 65ebc9a2..ad34cc0f 100644 --- a/docs/sdk/models/errors/gettimelinevideoerrors.md +++ b/docs/sdk/models/errors/gettimelinevideoerrors.md @@ -6,9 +6,9 @@ import { GetTimelineVideoErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTimelineVideoErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gettokenbypinidbadrequest.md b/docs/sdk/models/errors/gettokenbypinidbadrequest.md new file mode 100644 index 00000000..8aff7909 --- /dev/null +++ b/docs/sdk/models/errors/gettokenbypinidbadrequest.md @@ -0,0 +1,18 @@ +# GetTokenByPinIdBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + +## Example Usage + +```typescript +import { GetTokenByPinIdBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `errors` | [errors.GetTokenByPinIdErrors](../../../sdk/models/errors/gettokenbypiniderrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokenbypiniderrors.md b/docs/sdk/models/errors/gettokenbypiniderrors.md index b00a6936..490aab67 100644 --- a/docs/sdk/models/errors/gettokenbypiniderrors.md +++ b/docs/sdk/models/errors/gettokenbypiniderrors.md @@ -6,9 +6,9 @@ import { GetTokenByPinIdErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTokenByPinIdErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettokenbypinidplexerrors.md b/docs/sdk/models/errors/gettokenbypinidplexerrors.md index fabb2f90..d569b452 100644 --- a/docs/sdk/models/errors/gettokenbypinidplexerrors.md +++ b/docs/sdk/models/errors/gettokenbypinidplexerrors.md @@ -6,8 +6,8 @@ import { GetTokenByPinIdPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTokenByPinIdPlexErrors = { - code: 1020, - message: "Code not found or expired", + code: 1020, + message: "Code not found or expired", }; ``` diff --git a/docs/sdk/models/errors/gettokenbypinidplexresponsebody.md b/docs/sdk/models/errors/gettokenbypinidplexresponsebody.md deleted file mode 100644 index a4a298cb..00000000 --- a/docs/sdk/models/errors/gettokenbypinidplexresponsebody.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetTokenByPinIdPlexResponseBody - -Not Found or Expired - -## Example Usage - -```typescript -import { GetTokenByPinIdPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTokenByPinIdPlexErrors](../../../sdk/models/errors/gettokenbypinidplexerrors.md)[] | :heavy_minus_sign: | N/A | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettokenbypinidresponsebody.md b/docs/sdk/models/errors/gettokenbypinidresponsebody.md index dea0f211..21492a90 100644 --- a/docs/sdk/models/errors/gettokenbypinidresponsebody.md +++ b/docs/sdk/models/errors/gettokenbypinidresponsebody.md @@ -1,6 +1,6 @@ # GetTokenByPinIdResponseBody -Bad Request response when the X-Plex-Client-Identifier is missing +Not Found or Expired ## Example Usage @@ -12,7 +12,7 @@ import { GetTokenByPinIdResponseBody } from "@lukehagar/plexjs/sdk/models/errors ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `errors` | [errors.GetTokenByPinIdErrors](../../../sdk/models/errors/gettokenbypiniderrors.md)[] | :heavy_minus_sign: | N/A | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `errors` | [errors.GetTokenByPinIdPlexErrors](../../../sdk/models/errors/gettokenbypinidplexerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserdetailsauthenticationerrors.md b/docs/sdk/models/errors/gettokendetailsauthenticationerrors.md similarity index 77% rename from docs/sdk/models/errors/getuserdetailsauthenticationerrors.md rename to docs/sdk/models/errors/gettokendetailsauthenticationerrors.md index 1dc593d8..e1bd60d6 100644 --- a/docs/sdk/models/errors/getuserdetailsauthenticationerrors.md +++ b/docs/sdk/models/errors/gettokendetailsauthenticationerrors.md @@ -1,14 +1,14 @@ -# GetUserDetailsAuthenticationErrors +# GetTokenDetailsAuthenticationErrors ## Example Usage ```typescript -import { GetUserDetailsAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTokenDetailsAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; -let value: GetUserDetailsAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, +let value: GetTokenDetailsAuthenticationErrors = { + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gettokendetailsbadrequest.md b/docs/sdk/models/errors/gettokendetailsbadrequest.md new file mode 100644 index 00000000..dc8b0b2a --- /dev/null +++ b/docs/sdk/models/errors/gettokendetailsbadrequest.md @@ -0,0 +1,18 @@ +# GetTokenDetailsBadRequest + +Bad Request - A parameter was not specified, or was specified incorrectly. + +## Example Usage + +```typescript +import { GetTokenDetailsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `errors` | [errors.GetTokenDetailsErrors](../../../sdk/models/errors/gettokendetailserrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserdetailserrors.md b/docs/sdk/models/errors/gettokendetailserrors.md similarity index 82% rename from docs/sdk/models/errors/getuserdetailserrors.md rename to docs/sdk/models/errors/gettokendetailserrors.md index cb042f4d..fdede137 100644 --- a/docs/sdk/models/errors/getuserdetailserrors.md +++ b/docs/sdk/models/errors/gettokendetailserrors.md @@ -1,14 +1,14 @@ -# GetUserDetailsErrors +# GetTokenDetailsErrors ## Example Usage ```typescript -import { GetUserDetailsErrors } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTokenDetailsErrors } from "@lukehagar/plexjs/sdk/models/errors"; -let value: GetUserDetailsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, +let value: GetTokenDetailsErrors = { + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettokendetailsunauthorized.md b/docs/sdk/models/errors/gettokendetailsunauthorized.md new file mode 100644 index 00000000..de4123d7 --- /dev/null +++ b/docs/sdk/models/errors/gettokendetailsunauthorized.md @@ -0,0 +1,18 @@ +# GetTokenDetailsUnauthorized + +Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + +## Example Usage + +```typescript +import { GetTokenDetailsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | +| `errors` | [errors.GetTokenDetailsAuthenticationErrors](../../../sdk/models/errors/gettokendetailsauthenticationerrors.md)[] | :heavy_minus_sign: | N/A | +| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/gettopwatchedcontentresponsebody.md b/docs/sdk/models/errors/gettopwatchedcontentbadrequest.md similarity index 93% rename from docs/sdk/models/errors/gettopwatchedcontentresponsebody.md rename to docs/sdk/models/errors/gettopwatchedcontentbadrequest.md index b5a86bfc..8487d6a4 100644 --- a/docs/sdk/models/errors/gettopwatchedcontentresponsebody.md +++ b/docs/sdk/models/errors/gettopwatchedcontentbadrequest.md @@ -1,11 +1,11 @@ -# GetTopWatchedContentResponseBody +# GetTopWatchedContentBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetTopWatchedContentResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTopWatchedContentBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettopwatchedcontenterrors.md b/docs/sdk/models/errors/gettopwatchedcontenterrors.md index 219a9f8b..58f27253 100644 --- a/docs/sdk/models/errors/gettopwatchedcontenterrors.md +++ b/docs/sdk/models/errors/gettopwatchedcontenterrors.md @@ -6,9 +6,9 @@ import { GetTopWatchedContentErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTopWatchedContentErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md b/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md index 9b4c5a35..28deb481 100644 --- a/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md +++ b/docs/sdk/models/errors/gettopwatchedcontentlibraryerrors.md @@ -6,9 +6,9 @@ import { GetTopWatchedContentLibraryErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTopWatchedContentLibraryErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gettopwatchedcontentlibraryresponsebody.md b/docs/sdk/models/errors/gettopwatchedcontentunauthorized.md similarity index 93% rename from docs/sdk/models/errors/gettopwatchedcontentlibraryresponsebody.md rename to docs/sdk/models/errors/gettopwatchedcontentunauthorized.md index 70a46fdc..3cd343a4 100644 --- a/docs/sdk/models/errors/gettopwatchedcontentlibraryresponsebody.md +++ b/docs/sdk/models/errors/gettopwatchedcontentunauthorized.md @@ -1,11 +1,11 @@ -# GetTopWatchedContentLibraryResponseBody +# GetTopWatchedContentUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetTopWatchedContentLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTopWatchedContentUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettranscodesessionsresponsebody.md b/docs/sdk/models/errors/gettranscodesessionsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/gettranscodesessionsresponsebody.md rename to docs/sdk/models/errors/gettranscodesessionsbadrequest.md index 53888fee..5a042ce4 100644 --- a/docs/sdk/models/errors/gettranscodesessionsresponsebody.md +++ b/docs/sdk/models/errors/gettranscodesessionsbadrequest.md @@ -1,11 +1,11 @@ -# GetTranscodeSessionsResponseBody +# GetTranscodeSessionsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetTranscodeSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTranscodeSessionsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettranscodesessionserrors.md b/docs/sdk/models/errors/gettranscodesessionserrors.md index 332e3e84..0689531c 100644 --- a/docs/sdk/models/errors/gettranscodesessionserrors.md +++ b/docs/sdk/models/errors/gettranscodesessionserrors.md @@ -6,9 +6,9 @@ import { GetTranscodeSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTranscodeSessionsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettranscodesessionssessionserrors.md b/docs/sdk/models/errors/gettranscodesessionssessionserrors.md index b5244b70..e206090f 100644 --- a/docs/sdk/models/errors/gettranscodesessionssessionserrors.md +++ b/docs/sdk/models/errors/gettranscodesessionssessionserrors.md @@ -6,9 +6,9 @@ import { GetTranscodeSessionsSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTranscodeSessionsSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gettranscodesessionssessionsresponsebody.md b/docs/sdk/models/errors/gettranscodesessionsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/gettranscodesessionssessionsresponsebody.md rename to docs/sdk/models/errors/gettranscodesessionsunauthorized.md index 5149712a..8b7f677a 100644 --- a/docs/sdk/models/errors/gettranscodesessionssessionsresponsebody.md +++ b/docs/sdk/models/errors/gettranscodesessionsunauthorized.md @@ -1,11 +1,11 @@ -# GetTranscodeSessionsSessionsResponseBody +# GetTranscodeSessionsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetTranscodeSessionsSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTranscodeSessionsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md b/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md index a7704136..c613151b 100644 --- a/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md +++ b/docs/sdk/models/errors/gettransienttokenauthenticationerrors.md @@ -6,9 +6,9 @@ import { GetTransientTokenAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTransientTokenAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/gettransienttokenresponsebody.md b/docs/sdk/models/errors/gettransienttokenbadrequest.md similarity index 93% rename from docs/sdk/models/errors/gettransienttokenresponsebody.md rename to docs/sdk/models/errors/gettransienttokenbadrequest.md index df800e7b..363d3800 100644 --- a/docs/sdk/models/errors/gettransienttokenresponsebody.md +++ b/docs/sdk/models/errors/gettransienttokenbadrequest.md @@ -1,11 +1,11 @@ -# GetTransientTokenResponseBody +# GetTransientTokenBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetTransientTokenResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTransientTokenBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/gettransienttokenerrors.md b/docs/sdk/models/errors/gettransienttokenerrors.md index a48639ee..29cb6ddc 100644 --- a/docs/sdk/models/errors/gettransienttokenerrors.md +++ b/docs/sdk/models/errors/gettransienttokenerrors.md @@ -6,9 +6,9 @@ import { GetTransientTokenErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetTransientTokenErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/gettransienttokenauthenticationresponsebody.md b/docs/sdk/models/errors/gettransienttokenunauthorized.md similarity index 93% rename from docs/sdk/models/errors/gettransienttokenauthenticationresponsebody.md rename to docs/sdk/models/errors/gettransienttokenunauthorized.md index 0b1ba01b..e0cc237f 100644 --- a/docs/sdk/models/errors/gettransienttokenauthenticationresponsebody.md +++ b/docs/sdk/models/errors/gettransienttokenunauthorized.md @@ -1,11 +1,11 @@ -# GetTransientTokenAuthenticationResponseBody +# GetTransientTokenUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetTransientTokenAuthenticationResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetTransientTokenUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getupdatestatusresponsebody.md b/docs/sdk/models/errors/getupdatestatusbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getupdatestatusresponsebody.md rename to docs/sdk/models/errors/getupdatestatusbadrequest.md index ce3e3694..843db175 100644 --- a/docs/sdk/models/errors/getupdatestatusresponsebody.md +++ b/docs/sdk/models/errors/getupdatestatusbadrequest.md @@ -1,11 +1,11 @@ -# GetUpdateStatusResponseBody +# GetUpdateStatusBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetUpdateStatusResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetUpdateStatusBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getupdatestatuserrors.md b/docs/sdk/models/errors/getupdatestatuserrors.md index 702b3fbc..4be84ac7 100644 --- a/docs/sdk/models/errors/getupdatestatuserrors.md +++ b/docs/sdk/models/errors/getupdatestatuserrors.md @@ -6,9 +6,9 @@ import { GetUpdateStatusErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetUpdateStatusErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getupdatestatusupdaterresponsebody.md b/docs/sdk/models/errors/getupdatestatusunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getupdatestatusupdaterresponsebody.md rename to docs/sdk/models/errors/getupdatestatusunauthorized.md index d0edc684..9169a770 100644 --- a/docs/sdk/models/errors/getupdatestatusupdaterresponsebody.md +++ b/docs/sdk/models/errors/getupdatestatusunauthorized.md @@ -1,11 +1,11 @@ -# GetUpdateStatusUpdaterResponseBody +# GetUpdateStatusUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetUpdateStatusUpdaterResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetUpdateStatusUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getupdatestatusupdatererrors.md b/docs/sdk/models/errors/getupdatestatusupdatererrors.md index 20780355..632db38a 100644 --- a/docs/sdk/models/errors/getupdatestatusupdatererrors.md +++ b/docs/sdk/models/errors/getupdatestatusupdatererrors.md @@ -6,9 +6,9 @@ import { GetUpdateStatusUpdaterErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetUpdateStatusUpdaterErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getuserdetailsauthenticationresponsebody.md b/docs/sdk/models/errors/getuserdetailsauthenticationresponsebody.md deleted file mode 100644 index 24976336..00000000 --- a/docs/sdk/models/errors/getuserdetailsauthenticationresponsebody.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUserDetailsAuthenticationResponseBody - -Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - -## Example Usage - -```typescript -import { GetUserDetailsAuthenticationResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -| `errors` | [errors.GetUserDetailsAuthenticationErrors](../../../sdk/models/errors/getuserdetailsauthenticationerrors.md)[] | :heavy_minus_sign: | N/A | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserdetailsresponsebody.md b/docs/sdk/models/errors/getuserdetailsresponsebody.md deleted file mode 100644 index 059f65c9..00000000 --- a/docs/sdk/models/errors/getuserdetailsresponsebody.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUserDetailsResponseBody - -Bad Request - A parameter was not specified, or was specified incorrectly. - -## Example Usage - -```typescript -import { GetUserDetailsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; - -// No examples available for this model -``` - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -| `errors` | [errors.GetUserDetailsErrors](../../../sdk/models/errors/getuserdetailserrors.md)[] | :heavy_minus_sign: | N/A | -| `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_minus_sign: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/docs/sdk/models/errors/getuserfriendsresponsebody.md b/docs/sdk/models/errors/getuserfriendsbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getuserfriendsresponsebody.md rename to docs/sdk/models/errors/getuserfriendsbadrequest.md index 4ca4e5ff..6cf7b5b2 100644 --- a/docs/sdk/models/errors/getuserfriendsresponsebody.md +++ b/docs/sdk/models/errors/getuserfriendsbadrequest.md @@ -1,11 +1,11 @@ -# GetUserFriendsResponseBody +# GetUserFriendsBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetUserFriendsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetUserFriendsBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getuserfriendserrors.md b/docs/sdk/models/errors/getuserfriendserrors.md index 96cff3c1..99b6c58b 100644 --- a/docs/sdk/models/errors/getuserfriendserrors.md +++ b/docs/sdk/models/errors/getuserfriendserrors.md @@ -6,9 +6,9 @@ import { GetUserFriendsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetUserFriendsErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getuserfriendsplexerrors.md b/docs/sdk/models/errors/getuserfriendsplexerrors.md index 35e38554..8495a709 100644 --- a/docs/sdk/models/errors/getuserfriendsplexerrors.md +++ b/docs/sdk/models/errors/getuserfriendsplexerrors.md @@ -6,9 +6,9 @@ import { GetUserFriendsPlexErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetUserFriendsPlexErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/getuserfriendsplexresponsebody.md b/docs/sdk/models/errors/getuserfriendsunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getuserfriendsplexresponsebody.md rename to docs/sdk/models/errors/getuserfriendsunauthorized.md index ac52a496..5031f848 100644 --- a/docs/sdk/models/errors/getuserfriendsplexresponsebody.md +++ b/docs/sdk/models/errors/getuserfriendsunauthorized.md @@ -1,11 +1,11 @@ -# GetUserFriendsPlexResponseBody +# GetUserFriendsUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetUserFriendsPlexResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetUserFriendsUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getwatchlistresponsebody.md b/docs/sdk/models/errors/getwatchlistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/getwatchlistresponsebody.md rename to docs/sdk/models/errors/getwatchlistbadrequest.md index 25a5b8e6..aa084904 100644 --- a/docs/sdk/models/errors/getwatchlistresponsebody.md +++ b/docs/sdk/models/errors/getwatchlistbadrequest.md @@ -1,11 +1,11 @@ -# GetWatchListResponseBody +# GetWatchListBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { GetWatchListResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetWatchListBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getwatchlisterrors.md b/docs/sdk/models/errors/getwatchlisterrors.md index 185acc7b..f2378ea6 100644 --- a/docs/sdk/models/errors/getwatchlisterrors.md +++ b/docs/sdk/models/errors/getwatchlisterrors.md @@ -6,9 +6,9 @@ import { GetWatchListErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetWatchListErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/getwatchlistwatchlistresponsebody.md b/docs/sdk/models/errors/getwatchlistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/getwatchlistwatchlistresponsebody.md rename to docs/sdk/models/errors/getwatchlistunauthorized.md index 1c7923b5..8f0fb397 100644 --- a/docs/sdk/models/errors/getwatchlistwatchlistresponsebody.md +++ b/docs/sdk/models/errors/getwatchlistunauthorized.md @@ -1,11 +1,11 @@ -# GetWatchListWatchlistResponseBody +# GetWatchListUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { GetWatchListWatchlistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { GetWatchListUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/getwatchlistwatchlisterrors.md b/docs/sdk/models/errors/getwatchlistwatchlisterrors.md index cbb6a0d0..6256ebb4 100644 --- a/docs/sdk/models/errors/getwatchlistwatchlisterrors.md +++ b/docs/sdk/models/errors/getwatchlistwatchlisterrors.md @@ -6,9 +6,9 @@ import { GetWatchListWatchlistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: GetWatchListWatchlistErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/loglineresponsebody.md b/docs/sdk/models/errors/loglinebadrequest.md similarity index 93% rename from docs/sdk/models/errors/loglineresponsebody.md rename to docs/sdk/models/errors/loglinebadrequest.md index 8403a4f9..850191da 100644 --- a/docs/sdk/models/errors/loglineresponsebody.md +++ b/docs/sdk/models/errors/loglinebadrequest.md @@ -1,11 +1,11 @@ -# LogLineResponseBody +# LogLineBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { LogLineResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { LogLineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/loglineerrors.md b/docs/sdk/models/errors/loglineerrors.md index 1364c88d..2bfa4d3e 100644 --- a/docs/sdk/models/errors/loglineerrors.md +++ b/docs/sdk/models/errors/loglineerrors.md @@ -6,9 +6,9 @@ import { LogLineErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: LogLineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/loglinelogerrors.md b/docs/sdk/models/errors/loglinelogerrors.md index 064a9cdb..f82431d2 100644 --- a/docs/sdk/models/errors/loglinelogerrors.md +++ b/docs/sdk/models/errors/loglinelogerrors.md @@ -6,9 +6,9 @@ import { LogLineLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: LogLineLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/loglinelogresponsebody.md b/docs/sdk/models/errors/loglineunauthorized.md similarity index 93% rename from docs/sdk/models/errors/loglinelogresponsebody.md rename to docs/sdk/models/errors/loglineunauthorized.md index 00927aad..a48880c7 100644 --- a/docs/sdk/models/errors/loglinelogresponsebody.md +++ b/docs/sdk/models/errors/loglineunauthorized.md @@ -1,11 +1,11 @@ -# LogLineLogResponseBody +# LogLineUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { LogLineLogResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { LogLineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/logmultilineresponsebody.md b/docs/sdk/models/errors/logmultilinebadrequest.md similarity index 93% rename from docs/sdk/models/errors/logmultilineresponsebody.md rename to docs/sdk/models/errors/logmultilinebadrequest.md index 0a2e9273..0a4dcb9d 100644 --- a/docs/sdk/models/errors/logmultilineresponsebody.md +++ b/docs/sdk/models/errors/logmultilinebadrequest.md @@ -1,11 +1,11 @@ -# LogMultiLineResponseBody +# LogMultiLineBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { LogMultiLineResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { LogMultiLineBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/logmultilineerrors.md b/docs/sdk/models/errors/logmultilineerrors.md index 3c8daa1d..b35fdfee 100644 --- a/docs/sdk/models/errors/logmultilineerrors.md +++ b/docs/sdk/models/errors/logmultilineerrors.md @@ -6,9 +6,9 @@ import { LogMultiLineErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: LogMultiLineErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/logmultilinelogerrors.md b/docs/sdk/models/errors/logmultilinelogerrors.md index 9d46324b..293c96ca 100644 --- a/docs/sdk/models/errors/logmultilinelogerrors.md +++ b/docs/sdk/models/errors/logmultilinelogerrors.md @@ -6,9 +6,9 @@ import { LogMultiLineLogErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: LogMultiLineLogErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/logmultilinelogresponsebody.md b/docs/sdk/models/errors/logmultilineunauthorized.md similarity index 93% rename from docs/sdk/models/errors/logmultilinelogresponsebody.md rename to docs/sdk/models/errors/logmultilineunauthorized.md index 2a973663..cbed2b5b 100644 --- a/docs/sdk/models/errors/logmultilinelogresponsebody.md +++ b/docs/sdk/models/errors/logmultilineunauthorized.md @@ -1,11 +1,11 @@ -# LogMultiLineLogResponseBody +# LogMultiLineUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { LogMultiLineLogResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { LogMultiLineUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/markplayedresponsebody.md b/docs/sdk/models/errors/markplayedbadrequest.md similarity index 93% rename from docs/sdk/models/errors/markplayedresponsebody.md rename to docs/sdk/models/errors/markplayedbadrequest.md index a5882a69..977ef4a0 100644 --- a/docs/sdk/models/errors/markplayedresponsebody.md +++ b/docs/sdk/models/errors/markplayedbadrequest.md @@ -1,11 +1,11 @@ -# MarkPlayedResponseBody +# MarkPlayedBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { MarkPlayedResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { MarkPlayedBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/markplayederrors.md b/docs/sdk/models/errors/markplayederrors.md index 415220c7..1ac9da9a 100644 --- a/docs/sdk/models/errors/markplayederrors.md +++ b/docs/sdk/models/errors/markplayederrors.md @@ -6,9 +6,9 @@ import { MarkPlayedErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: MarkPlayedErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/markplayedmediaerrors.md b/docs/sdk/models/errors/markplayedmediaerrors.md index 10d360b3..797557cc 100644 --- a/docs/sdk/models/errors/markplayedmediaerrors.md +++ b/docs/sdk/models/errors/markplayedmediaerrors.md @@ -6,9 +6,9 @@ import { MarkPlayedMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: MarkPlayedMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/markplayedmediaresponsebody.md b/docs/sdk/models/errors/markplayedunauthorized.md similarity index 93% rename from docs/sdk/models/errors/markplayedmediaresponsebody.md rename to docs/sdk/models/errors/markplayedunauthorized.md index 1f8d6823..5e156bc0 100644 --- a/docs/sdk/models/errors/markplayedmediaresponsebody.md +++ b/docs/sdk/models/errors/markplayedunauthorized.md @@ -1,11 +1,11 @@ -# MarkPlayedMediaResponseBody +# MarkPlayedUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { MarkPlayedMediaResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { MarkPlayedUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/markunplayedresponsebody.md b/docs/sdk/models/errors/markunplayedbadrequest.md similarity index 93% rename from docs/sdk/models/errors/markunplayedresponsebody.md rename to docs/sdk/models/errors/markunplayedbadrequest.md index 36353912..f9de478e 100644 --- a/docs/sdk/models/errors/markunplayedresponsebody.md +++ b/docs/sdk/models/errors/markunplayedbadrequest.md @@ -1,11 +1,11 @@ -# MarkUnplayedResponseBody +# MarkUnplayedBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { MarkUnplayedResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { MarkUnplayedBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/markunplayederrors.md b/docs/sdk/models/errors/markunplayederrors.md index b2dcb889..c0c67ead 100644 --- a/docs/sdk/models/errors/markunplayederrors.md +++ b/docs/sdk/models/errors/markunplayederrors.md @@ -6,9 +6,9 @@ import { MarkUnplayedErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: MarkUnplayedErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/markunplayedmediaerrors.md b/docs/sdk/models/errors/markunplayedmediaerrors.md index 8efe24bd..8bb88348 100644 --- a/docs/sdk/models/errors/markunplayedmediaerrors.md +++ b/docs/sdk/models/errors/markunplayedmediaerrors.md @@ -6,9 +6,9 @@ import { MarkUnplayedMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: MarkUnplayedMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/markunplayedmediaresponsebody.md b/docs/sdk/models/errors/markunplayedunauthorized.md similarity index 93% rename from docs/sdk/models/errors/markunplayedmediaresponsebody.md rename to docs/sdk/models/errors/markunplayedunauthorized.md index 2fe2dfaa..baa80da1 100644 --- a/docs/sdk/models/errors/markunplayedmediaresponsebody.md +++ b/docs/sdk/models/errors/markunplayedunauthorized.md @@ -1,11 +1,11 @@ -# MarkUnplayedMediaResponseBody +# MarkUnplayedUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { MarkUnplayedMediaResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { MarkUnplayedUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/performsearchresponsebody.md b/docs/sdk/models/errors/performsearchbadrequest.md similarity index 93% rename from docs/sdk/models/errors/performsearchresponsebody.md rename to docs/sdk/models/errors/performsearchbadrequest.md index c06e72e8..d8f86bac 100644 --- a/docs/sdk/models/errors/performsearchresponsebody.md +++ b/docs/sdk/models/errors/performsearchbadrequest.md @@ -1,11 +1,11 @@ -# PerformSearchResponseBody +# PerformSearchBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { PerformSearchResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PerformSearchBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/performsearcherrors.md b/docs/sdk/models/errors/performsearcherrors.md index 96a3342d..84bd8fa1 100644 --- a/docs/sdk/models/errors/performsearcherrors.md +++ b/docs/sdk/models/errors/performsearcherrors.md @@ -6,9 +6,9 @@ import { PerformSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PerformSearchErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/performsearchsearcherrors.md b/docs/sdk/models/errors/performsearchsearcherrors.md index 9ce44c4b..06ffe8ea 100644 --- a/docs/sdk/models/errors/performsearchsearcherrors.md +++ b/docs/sdk/models/errors/performsearchsearcherrors.md @@ -6,9 +6,9 @@ import { PerformSearchSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PerformSearchSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/performsearchsearchresponsebody.md b/docs/sdk/models/errors/performsearchunauthorized.md similarity index 93% rename from docs/sdk/models/errors/performsearchsearchresponsebody.md rename to docs/sdk/models/errors/performsearchunauthorized.md index e59a0017..8170ea67 100644 --- a/docs/sdk/models/errors/performsearchsearchresponsebody.md +++ b/docs/sdk/models/errors/performsearchunauthorized.md @@ -1,11 +1,11 @@ -# PerformSearchSearchResponseBody +# PerformSearchUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { PerformSearchSearchResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PerformSearchUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/performvoicesearchresponsebody.md b/docs/sdk/models/errors/performvoicesearchbadrequest.md similarity index 93% rename from docs/sdk/models/errors/performvoicesearchresponsebody.md rename to docs/sdk/models/errors/performvoicesearchbadrequest.md index b95c3cb3..d3fb6b9f 100644 --- a/docs/sdk/models/errors/performvoicesearchresponsebody.md +++ b/docs/sdk/models/errors/performvoicesearchbadrequest.md @@ -1,11 +1,11 @@ -# PerformVoiceSearchResponseBody +# PerformVoiceSearchBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { PerformVoiceSearchResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PerformVoiceSearchBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/performvoicesearcherrors.md b/docs/sdk/models/errors/performvoicesearcherrors.md index 4fdf9592..97950a37 100644 --- a/docs/sdk/models/errors/performvoicesearcherrors.md +++ b/docs/sdk/models/errors/performvoicesearcherrors.md @@ -6,9 +6,9 @@ import { PerformVoiceSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PerformVoiceSearchErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/performvoicesearchsearcherrors.md b/docs/sdk/models/errors/performvoicesearchsearcherrors.md index f229ee41..a81b2eeb 100644 --- a/docs/sdk/models/errors/performvoicesearchsearcherrors.md +++ b/docs/sdk/models/errors/performvoicesearchsearcherrors.md @@ -6,9 +6,9 @@ import { PerformVoiceSearchSearchErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PerformVoiceSearchSearchErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/performvoicesearchsearchresponsebody.md b/docs/sdk/models/errors/performvoicesearchunauthorized.md similarity index 93% rename from docs/sdk/models/errors/performvoicesearchsearchresponsebody.md rename to docs/sdk/models/errors/performvoicesearchunauthorized.md index c4994d8c..e9e09e88 100644 --- a/docs/sdk/models/errors/performvoicesearchsearchresponsebody.md +++ b/docs/sdk/models/errors/performvoicesearchunauthorized.md @@ -1,11 +1,11 @@ -# PerformVoiceSearchSearchResponseBody +# PerformVoiceSearchUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { PerformVoiceSearchSearchResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PerformVoiceSearchUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md b/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md index 5e38bd38..133e6836 100644 --- a/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md +++ b/docs/sdk/models/errors/postuserssignindataauthenticationerrors.md @@ -6,9 +6,9 @@ import { PostUsersSignInDataAuthenticationErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PostUsersSignInDataAuthenticationErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/postuserssignindataresponsebody.md b/docs/sdk/models/errors/postuserssignindatabadrequest.md similarity index 93% rename from docs/sdk/models/errors/postuserssignindataresponsebody.md rename to docs/sdk/models/errors/postuserssignindatabadrequest.md index add1447b..674a83bd 100644 --- a/docs/sdk/models/errors/postuserssignindataresponsebody.md +++ b/docs/sdk/models/errors/postuserssignindatabadrequest.md @@ -1,11 +1,11 @@ -# PostUsersSignInDataResponseBody +# PostUsersSignInDataBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { PostUsersSignInDataResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PostUsersSignInDataBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/postuserssignindataerrors.md b/docs/sdk/models/errors/postuserssignindataerrors.md index 82e05dac..dc049d7c 100644 --- a/docs/sdk/models/errors/postuserssignindataerrors.md +++ b/docs/sdk/models/errors/postuserssignindataerrors.md @@ -6,9 +6,9 @@ import { PostUsersSignInDataErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: PostUsersSignInDataErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/postuserssignindataauthenticationresponsebody.md b/docs/sdk/models/errors/postuserssignindataunauthorized.md similarity index 93% rename from docs/sdk/models/errors/postuserssignindataauthenticationresponsebody.md rename to docs/sdk/models/errors/postuserssignindataunauthorized.md index de2fdfa9..3c74889c 100644 --- a/docs/sdk/models/errors/postuserssignindataauthenticationresponsebody.md +++ b/docs/sdk/models/errors/postuserssignindataunauthorized.md @@ -1,11 +1,11 @@ -# PostUsersSignInDataAuthenticationResponseBody +# PostUsersSignInDataUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { PostUsersSignInDataAuthenticationResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { PostUsersSignInDataUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/startalltasksresponsebody.md b/docs/sdk/models/errors/startalltasksbadrequest.md similarity index 93% rename from docs/sdk/models/errors/startalltasksresponsebody.md rename to docs/sdk/models/errors/startalltasksbadrequest.md index 1bbd6967..395e1cfb 100644 --- a/docs/sdk/models/errors/startalltasksresponsebody.md +++ b/docs/sdk/models/errors/startalltasksbadrequest.md @@ -1,11 +1,11 @@ -# StartAllTasksResponseBody +# StartAllTasksBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StartAllTasksResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartAllTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/startalltasksbutlererrors.md b/docs/sdk/models/errors/startalltasksbutlererrors.md index 6052d784..cbfc92e1 100644 --- a/docs/sdk/models/errors/startalltasksbutlererrors.md +++ b/docs/sdk/models/errors/startalltasksbutlererrors.md @@ -6,9 +6,9 @@ import { StartAllTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartAllTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/startalltaskserrors.md b/docs/sdk/models/errors/startalltaskserrors.md index 1b24b449..168050dd 100644 --- a/docs/sdk/models/errors/startalltaskserrors.md +++ b/docs/sdk/models/errors/startalltaskserrors.md @@ -6,9 +6,9 @@ import { StartAllTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartAllTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/startalltasksbutlerresponsebody.md b/docs/sdk/models/errors/startalltasksunauthorized.md similarity index 93% rename from docs/sdk/models/errors/startalltasksbutlerresponsebody.md rename to docs/sdk/models/errors/startalltasksunauthorized.md index cbbd810d..233fa389 100644 --- a/docs/sdk/models/errors/startalltasksbutlerresponsebody.md +++ b/docs/sdk/models/errors/startalltasksunauthorized.md @@ -1,11 +1,11 @@ -# StartAllTasksButlerResponseBody +# StartAllTasksUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StartAllTasksButlerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartAllTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/starttaskresponsebody.md b/docs/sdk/models/errors/starttaskbadrequest.md similarity index 93% rename from docs/sdk/models/errors/starttaskresponsebody.md rename to docs/sdk/models/errors/starttaskbadrequest.md index f629e6aa..76a5dd56 100644 --- a/docs/sdk/models/errors/starttaskresponsebody.md +++ b/docs/sdk/models/errors/starttaskbadrequest.md @@ -1,11 +1,11 @@ -# StartTaskResponseBody +# StartTaskBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StartTaskResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartTaskBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/starttaskbutlererrors.md b/docs/sdk/models/errors/starttaskbutlererrors.md index 395664f9..63e0e589 100644 --- a/docs/sdk/models/errors/starttaskbutlererrors.md +++ b/docs/sdk/models/errors/starttaskbutlererrors.md @@ -6,9 +6,9 @@ import { StartTaskButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartTaskButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/starttaskerrors.md b/docs/sdk/models/errors/starttaskerrors.md index 23382023..4f95963d 100644 --- a/docs/sdk/models/errors/starttaskerrors.md +++ b/docs/sdk/models/errors/starttaskerrors.md @@ -6,9 +6,9 @@ import { StartTaskErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartTaskErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/starttaskbutlerresponsebody.md b/docs/sdk/models/errors/starttaskunauthorized.md similarity index 93% rename from docs/sdk/models/errors/starttaskbutlerresponsebody.md rename to docs/sdk/models/errors/starttaskunauthorized.md index ba8f0284..3c3c7008 100644 --- a/docs/sdk/models/errors/starttaskbutlerresponsebody.md +++ b/docs/sdk/models/errors/starttaskunauthorized.md @@ -1,11 +1,11 @@ -# StartTaskButlerResponseBody +# StartTaskUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StartTaskButlerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartTaskUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/startuniversaltranscoderesponsebody.md b/docs/sdk/models/errors/startuniversaltranscodebadrequest.md similarity index 93% rename from docs/sdk/models/errors/startuniversaltranscoderesponsebody.md rename to docs/sdk/models/errors/startuniversaltranscodebadrequest.md index f016edf9..372abd46 100644 --- a/docs/sdk/models/errors/startuniversaltranscoderesponsebody.md +++ b/docs/sdk/models/errors/startuniversaltranscodebadrequest.md @@ -1,11 +1,11 @@ -# StartUniversalTranscodeResponseBody +# StartUniversalTranscodeBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StartUniversalTranscodeResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartUniversalTranscodeBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/startuniversaltranscodeerrors.md b/docs/sdk/models/errors/startuniversaltranscodeerrors.md index af172ba7..1929e736 100644 --- a/docs/sdk/models/errors/startuniversaltranscodeerrors.md +++ b/docs/sdk/models/errors/startuniversaltranscodeerrors.md @@ -6,9 +6,9 @@ import { StartUniversalTranscodeErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartUniversalTranscodeErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/startuniversaltranscodevideoresponsebody.md b/docs/sdk/models/errors/startuniversaltranscodeunauthorized.md similarity index 93% rename from docs/sdk/models/errors/startuniversaltranscodevideoresponsebody.md rename to docs/sdk/models/errors/startuniversaltranscodeunauthorized.md index ded75759..69a95705 100644 --- a/docs/sdk/models/errors/startuniversaltranscodevideoresponsebody.md +++ b/docs/sdk/models/errors/startuniversaltranscodeunauthorized.md @@ -1,11 +1,11 @@ -# StartUniversalTranscodeVideoResponseBody +# StartUniversalTranscodeUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StartUniversalTranscodeVideoResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StartUniversalTranscodeUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md b/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md index 562ab020..1b05b2d6 100644 --- a/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md +++ b/docs/sdk/models/errors/startuniversaltranscodevideoerrors.md @@ -6,9 +6,9 @@ import { StartUniversalTranscodeVideoErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StartUniversalTranscodeVideoErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/stopalltasksresponsebody.md b/docs/sdk/models/errors/stopalltasksbadrequest.md similarity index 93% rename from docs/sdk/models/errors/stopalltasksresponsebody.md rename to docs/sdk/models/errors/stopalltasksbadrequest.md index 50570520..8887f1d1 100644 --- a/docs/sdk/models/errors/stopalltasksresponsebody.md +++ b/docs/sdk/models/errors/stopalltasksbadrequest.md @@ -1,11 +1,11 @@ -# StopAllTasksResponseBody +# StopAllTasksBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StopAllTasksResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopAllTasksBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/stopalltasksbutlererrors.md b/docs/sdk/models/errors/stopalltasksbutlererrors.md index 2ae835e9..717413ea 100644 --- a/docs/sdk/models/errors/stopalltasksbutlererrors.md +++ b/docs/sdk/models/errors/stopalltasksbutlererrors.md @@ -6,9 +6,9 @@ import { StopAllTasksButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopAllTasksButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/stopalltaskserrors.md b/docs/sdk/models/errors/stopalltaskserrors.md index fd463c9a..8f87b170 100644 --- a/docs/sdk/models/errors/stopalltaskserrors.md +++ b/docs/sdk/models/errors/stopalltaskserrors.md @@ -6,9 +6,9 @@ import { StopAllTasksErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopAllTasksErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/stopalltasksbutlerresponsebody.md b/docs/sdk/models/errors/stopalltasksunauthorized.md similarity index 93% rename from docs/sdk/models/errors/stopalltasksbutlerresponsebody.md rename to docs/sdk/models/errors/stopalltasksunauthorized.md index 43185076..818020a3 100644 --- a/docs/sdk/models/errors/stopalltasksbutlerresponsebody.md +++ b/docs/sdk/models/errors/stopalltasksunauthorized.md @@ -1,11 +1,11 @@ -# StopAllTasksButlerResponseBody +# StopAllTasksUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StopAllTasksButlerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopAllTasksUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/stoptaskresponsebody.md b/docs/sdk/models/errors/stoptaskbadrequest.md similarity index 93% rename from docs/sdk/models/errors/stoptaskresponsebody.md rename to docs/sdk/models/errors/stoptaskbadrequest.md index 51498f16..9babd9da 100644 --- a/docs/sdk/models/errors/stoptaskresponsebody.md +++ b/docs/sdk/models/errors/stoptaskbadrequest.md @@ -1,11 +1,11 @@ -# StopTaskResponseBody +# StopTaskBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StopTaskResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopTaskBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/stoptaskbutlererrors.md b/docs/sdk/models/errors/stoptaskbutlererrors.md index c1746d81..4fd898bf 100644 --- a/docs/sdk/models/errors/stoptaskbutlererrors.md +++ b/docs/sdk/models/errors/stoptaskbutlererrors.md @@ -6,9 +6,9 @@ import { StopTaskButlerErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopTaskButlerErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/stoptaskerrors.md b/docs/sdk/models/errors/stoptaskerrors.md index 579372a7..85e6ba7c 100644 --- a/docs/sdk/models/errors/stoptaskerrors.md +++ b/docs/sdk/models/errors/stoptaskerrors.md @@ -6,9 +6,9 @@ import { StopTaskErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopTaskErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/stoptaskbutlerresponsebody.md b/docs/sdk/models/errors/stoptaskunauthorized.md similarity index 93% rename from docs/sdk/models/errors/stoptaskbutlerresponsebody.md rename to docs/sdk/models/errors/stoptaskunauthorized.md index 8d990952..a6f355d9 100644 --- a/docs/sdk/models/errors/stoptaskbutlerresponsebody.md +++ b/docs/sdk/models/errors/stoptaskunauthorized.md @@ -1,11 +1,11 @@ -# StopTaskButlerResponseBody +# StopTaskUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StopTaskButlerResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopTaskUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/stoptranscodesessionresponsebody.md b/docs/sdk/models/errors/stoptranscodesessionbadrequest.md similarity index 93% rename from docs/sdk/models/errors/stoptranscodesessionresponsebody.md rename to docs/sdk/models/errors/stoptranscodesessionbadrequest.md index 16f33d56..2f135c9d 100644 --- a/docs/sdk/models/errors/stoptranscodesessionresponsebody.md +++ b/docs/sdk/models/errors/stoptranscodesessionbadrequest.md @@ -1,11 +1,11 @@ -# StopTranscodeSessionResponseBody +# StopTranscodeSessionBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { StopTranscodeSessionResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopTranscodeSessionBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/stoptranscodesessionerrors.md b/docs/sdk/models/errors/stoptranscodesessionerrors.md index eebf92d4..14fcb188 100644 --- a/docs/sdk/models/errors/stoptranscodesessionerrors.md +++ b/docs/sdk/models/errors/stoptranscodesessionerrors.md @@ -6,9 +6,9 @@ import { StopTranscodeSessionErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopTranscodeSessionErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md b/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md index 7082b84b..8b6d2ae0 100644 --- a/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md +++ b/docs/sdk/models/errors/stoptranscodesessionsessionserrors.md @@ -6,9 +6,9 @@ import { StopTranscodeSessionSessionsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: StopTranscodeSessionSessionsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/stoptranscodesessionsessionsresponsebody.md b/docs/sdk/models/errors/stoptranscodesessionunauthorized.md similarity index 93% rename from docs/sdk/models/errors/stoptranscodesessionsessionsresponsebody.md rename to docs/sdk/models/errors/stoptranscodesessionunauthorized.md index 36c32e4b..bdcb59f2 100644 --- a/docs/sdk/models/errors/stoptranscodesessionsessionsresponsebody.md +++ b/docs/sdk/models/errors/stoptranscodesessionunauthorized.md @@ -1,11 +1,11 @@ -# StopTranscodeSessionSessionsResponseBody +# StopTranscodeSessionUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { StopTranscodeSessionSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { StopTranscodeSessionUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/updateplaylistresponsebody.md b/docs/sdk/models/errors/updateplaylistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/updateplaylistresponsebody.md rename to docs/sdk/models/errors/updateplaylistbadrequest.md index e31f37dd..fcc5b115 100644 --- a/docs/sdk/models/errors/updateplaylistresponsebody.md +++ b/docs/sdk/models/errors/updateplaylistbadrequest.md @@ -1,11 +1,11 @@ -# UpdatePlaylistResponseBody +# UpdatePlaylistBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { UpdatePlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UpdatePlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/updateplaylisterrors.md b/docs/sdk/models/errors/updateplaylisterrors.md index 97230b1c..fe15ccf0 100644 --- a/docs/sdk/models/errors/updateplaylisterrors.md +++ b/docs/sdk/models/errors/updateplaylisterrors.md @@ -6,9 +6,9 @@ import { UpdatePlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UpdatePlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/updateplaylistplaylistserrors.md b/docs/sdk/models/errors/updateplaylistplaylistserrors.md index 132450d9..1a154e84 100644 --- a/docs/sdk/models/errors/updateplaylistplaylistserrors.md +++ b/docs/sdk/models/errors/updateplaylistplaylistserrors.md @@ -6,9 +6,9 @@ import { UpdatePlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UpdatePlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/updateplaylistplaylistsresponsebody.md b/docs/sdk/models/errors/updateplaylistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/updateplaylistplaylistsresponsebody.md rename to docs/sdk/models/errors/updateplaylistunauthorized.md index 34b674fe..c205789d 100644 --- a/docs/sdk/models/errors/updateplaylistplaylistsresponsebody.md +++ b/docs/sdk/models/errors/updateplaylistunauthorized.md @@ -1,11 +1,11 @@ -# UpdatePlaylistPlaylistsResponseBody +# UpdatePlaylistUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { UpdatePlaylistPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UpdatePlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/updateplayprogressresponsebody.md b/docs/sdk/models/errors/updateplayprogressbadrequest.md similarity index 93% rename from docs/sdk/models/errors/updateplayprogressresponsebody.md rename to docs/sdk/models/errors/updateplayprogressbadrequest.md index 692397eb..bdb79d5c 100644 --- a/docs/sdk/models/errors/updateplayprogressresponsebody.md +++ b/docs/sdk/models/errors/updateplayprogressbadrequest.md @@ -1,11 +1,11 @@ -# UpdatePlayProgressResponseBody +# UpdatePlayProgressBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { UpdatePlayProgressResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UpdatePlayProgressBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/updateplayprogresserrors.md b/docs/sdk/models/errors/updateplayprogresserrors.md index 7b809d44..96010734 100644 --- a/docs/sdk/models/errors/updateplayprogresserrors.md +++ b/docs/sdk/models/errors/updateplayprogresserrors.md @@ -6,9 +6,9 @@ import { UpdatePlayProgressErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UpdatePlayProgressErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/updateplayprogressmediaerrors.md b/docs/sdk/models/errors/updateplayprogressmediaerrors.md index a1e865b6..539866a2 100644 --- a/docs/sdk/models/errors/updateplayprogressmediaerrors.md +++ b/docs/sdk/models/errors/updateplayprogressmediaerrors.md @@ -6,9 +6,9 @@ import { UpdatePlayProgressMediaErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UpdatePlayProgressMediaErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/updateplayprogressmediaresponsebody.md b/docs/sdk/models/errors/updateplayprogressunauthorized.md similarity index 93% rename from docs/sdk/models/errors/updateplayprogressmediaresponsebody.md rename to docs/sdk/models/errors/updateplayprogressunauthorized.md index 51c5baea..f79e8c8d 100644 --- a/docs/sdk/models/errors/updateplayprogressmediaresponsebody.md +++ b/docs/sdk/models/errors/updateplayprogressunauthorized.md @@ -1,11 +1,11 @@ -# UpdatePlayProgressMediaResponseBody +# UpdatePlayProgressUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { UpdatePlayProgressMediaResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UpdatePlayProgressUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/uploadplaylistresponsebody.md b/docs/sdk/models/errors/uploadplaylistbadrequest.md similarity index 93% rename from docs/sdk/models/errors/uploadplaylistresponsebody.md rename to docs/sdk/models/errors/uploadplaylistbadrequest.md index 57282d8e..2a34b504 100644 --- a/docs/sdk/models/errors/uploadplaylistresponsebody.md +++ b/docs/sdk/models/errors/uploadplaylistbadrequest.md @@ -1,11 +1,11 @@ -# UploadPlaylistResponseBody +# UploadPlaylistBadRequest Bad Request - A parameter was not specified, or was specified incorrectly. ## Example Usage ```typescript -import { UploadPlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UploadPlaylistBadRequest } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/errors/uploadplaylisterrors.md b/docs/sdk/models/errors/uploadplaylisterrors.md index 2a22b8e0..196b81d0 100644 --- a/docs/sdk/models/errors/uploadplaylisterrors.md +++ b/docs/sdk/models/errors/uploadplaylisterrors.md @@ -6,9 +6,9 @@ import { UploadPlaylistErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UploadPlaylistErrors = { - code: 1000, - message: "X-Plex-Client-Identifier is missing", - status: 400, + code: 1000, + message: "X-Plex-Client-Identifier is missing", + status: 400, }; ``` diff --git a/docs/sdk/models/errors/uploadplaylistplaylistserrors.md b/docs/sdk/models/errors/uploadplaylistplaylistserrors.md index 6e3393f4..8e72d39b 100644 --- a/docs/sdk/models/errors/uploadplaylistplaylistserrors.md +++ b/docs/sdk/models/errors/uploadplaylistplaylistserrors.md @@ -6,9 +6,9 @@ import { UploadPlaylistPlaylistsErrors } from "@lukehagar/plexjs/sdk/models/errors"; let value: UploadPlaylistPlaylistsErrors = { - code: 1001, - message: "User could not be authenticated", - status: 401, + code: 1001, + message: "User could not be authenticated", + status: 401, }; ``` diff --git a/docs/sdk/models/errors/uploadplaylistplaylistsresponsebody.md b/docs/sdk/models/errors/uploadplaylistunauthorized.md similarity index 93% rename from docs/sdk/models/errors/uploadplaylistplaylistsresponsebody.md rename to docs/sdk/models/errors/uploadplaylistunauthorized.md index 2768ec87..36a8cce0 100644 --- a/docs/sdk/models/errors/uploadplaylistplaylistsresponsebody.md +++ b/docs/sdk/models/errors/uploadplaylistunauthorized.md @@ -1,11 +1,11 @@ -# UploadPlaylistPlaylistsResponseBody +# UploadPlaylistUnauthorized Unauthorized - Returned if the X-Plex-Token is missing from the header or query. ## Example Usage ```typescript -import { UploadPlaylistPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/errors"; +import { UploadPlaylistUnauthorized } from "@lukehagar/plexjs/sdk/models/errors"; // No examples available for this model ``` diff --git a/docs/sdk/models/operations/account.md b/docs/sdk/models/operations/account.md index c5924866..168c86d5 100644 --- a/docs/sdk/models/operations/account.md +++ b/docs/sdk/models/operations/account.md @@ -6,14 +6,14 @@ import { Account } from "@lukehagar/plexjs/sdk/models/operations"; let value: Account = { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", }; ``` diff --git a/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md b/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md index 3f67c772..872ee744 100644 --- a/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md +++ b/docs/sdk/models/operations/addplaylistcontentsmediacontainer.md @@ -6,26 +6,26 @@ import { AddPlaylistContentsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: AddPlaylistContentsMediaContainer = { - size: 1, - leafCountAdded: 1, - leafCountRequested: 1, - metadata: [ - { - ratingKey: "94", - key: "/playlists/94/items", - guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", - type: "playlist", - title: "A great playlist", - summary: "One of my great playlists", - smart: false, - playlistType: "video", - composite: "/playlists/94/composite/1705800070", - duration: 423000, - leafCount: 3, - addedAt: 1705716458, - updatedAt: 1705800070, - }, - ], + size: 1, + leafCountAdded: 1, + leafCountRequested: 1, + metadata: [ + { + ratingKey: "94", + key: "/playlists/94/items", + guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", + type: "playlist", + title: "A great playlist", + summary: "One of my great playlists", + smart: false, + playlistType: "video", + composite: "/playlists/94/composite/1705800070", + duration: 423000, + leafCount: 3, + addedAt: 1705716458, + updatedAt: 1705800070, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/addplaylistcontentsmetadata.md b/docs/sdk/models/operations/addplaylistcontentsmetadata.md index 581571e3..98931b9f 100644 --- a/docs/sdk/models/operations/addplaylistcontentsmetadata.md +++ b/docs/sdk/models/operations/addplaylistcontentsmetadata.md @@ -6,19 +6,19 @@ import { AddPlaylistContentsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: AddPlaylistContentsMetadata = { - ratingKey: "94", - key: "/playlists/94/items", - guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", - type: "playlist", - title: "A great playlist", - summary: "One of my great playlists", - smart: false, - playlistType: "video", - composite: "/playlists/94/composite/1705800070", - duration: 423000, - leafCount: 3, - addedAt: 1705716458, - updatedAt: 1705800070, + ratingKey: "94", + key: "/playlists/94/items", + guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", + type: "playlist", + title: "A great playlist", + summary: "One of my great playlists", + smart: false, + playlistType: "video", + composite: "/playlists/94/composite/1705800070", + duration: 423000, + leafCount: 3, + addedAt: 1705716458, + updatedAt: 1705800070, }; ``` diff --git a/docs/sdk/models/operations/addplaylistcontentsrequest.md b/docs/sdk/models/operations/addplaylistcontentsrequest.md index e0b72c96..a98f38c6 100644 --- a/docs/sdk/models/operations/addplaylistcontentsrequest.md +++ b/docs/sdk/models/operations/addplaylistcontentsrequest.md @@ -6,9 +6,9 @@ import { AddPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: AddPlaylistContentsRequest = { - playlistID: 6625.27, - uri: "server://12345/com.plexapp.plugins.library/library/metadata/1", - playQueueID: 123, + playlistID: 6625.27, + uri: "server://12345/com.plexapp.plugins.library/library/metadata/1", + playQueueID: 123, }; ``` diff --git a/docs/sdk/models/operations/addplaylistcontentsresponse.md b/docs/sdk/models/operations/addplaylistcontentsresponse.md index 82846f53..fee8dd12 100644 --- a/docs/sdk/models/operations/addplaylistcontentsresponse.md +++ b/docs/sdk/models/operations/addplaylistcontentsresponse.md @@ -6,35 +6,36 @@ import { AddPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: AddPlaylistContentsResponse = { - contentType: "", - statusCode: 820994, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - leafCountAdded: 1, - leafCountRequested: 1, - metadata: [ - { - ratingKey: "94", - key: "/playlists/94/items", - guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", - type: "playlist", - title: "A great playlist", - summary: "One of my great playlists", - smart: false, - playlistType: "video", - composite: "/playlists/94/composite/1705800070", - duration: 423000, - leafCount: 3, - addedAt: 1705716458, - updatedAt: 1705800070, - }, - ], + contentType: "", + statusCode: 820994, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + leafCountAdded: 1, + leafCountRequested: 1, + metadata: [ + { + ratingKey: "94", + key: "/playlists/94/items", + guid: + "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", + type: "playlist", + title: "A great playlist", + summary: "One of my great playlists", + smart: false, + playlistType: "video", + composite: "/playlists/94/composite/1705800070", + duration: 423000, + leafCount: 3, + addedAt: 1705716458, + updatedAt: 1705800070, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/addplaylistcontentsresponsebody.md b/docs/sdk/models/operations/addplaylistcontentsresponsebody.md index 047c6db7..0186c79e 100644 --- a/docs/sdk/models/operations/addplaylistcontentsresponsebody.md +++ b/docs/sdk/models/operations/addplaylistcontentsresponsebody.md @@ -8,28 +8,28 @@ Playlist Updated import { AddPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: AddPlaylistContentsResponseBody = { - mediaContainer: { - size: 1, - leafCountAdded: 1, - leafCountRequested: 1, - metadata: [ - { - ratingKey: "94", - key: "/playlists/94/items", - guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", - type: "playlist", - title: "A great playlist", - summary: "One of my great playlists", - smart: false, - playlistType: "video", - composite: "/playlists/94/composite/1705800070", - duration: 423000, - leafCount: 3, - addedAt: 1705716458, - updatedAt: 1705800070, - }, - ], - }, + mediaContainer: { + size: 1, + leafCountAdded: 1, + leafCountRequested: 1, + metadata: [ + { + ratingKey: "94", + key: "/playlists/94/items", + guid: "com.plexapp.agents.none://972e3047-83d6-4848-a000-261f0af26ba2", + type: "playlist", + title: "A great playlist", + summary: "One of my great playlists", + smart: false, + playlistType: "video", + composite: "/playlists/94/composite/1705800070", + duration: 423000, + leafCount: 3, + addedAt: 1705716458, + updatedAt: 1705800070, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/applyupdatesrequest.md b/docs/sdk/models/operations/applyupdatesrequest.md index 3573ffb4..764dfa31 100644 --- a/docs/sdk/models/operations/applyupdatesrequest.md +++ b/docs/sdk/models/operations/applyupdatesrequest.md @@ -6,8 +6,8 @@ import { ApplyUpdatesRequest, Skip, Tonight } from "@lukehagar/plexjs/sdk/models/operations"; let value: ApplyUpdatesRequest = { - tonight: Tonight.One, - skip: Skip.One, + tonight: Tonight.One, + skip: Skip.One, }; ``` diff --git a/docs/sdk/models/operations/applyupdatesresponse.md b/docs/sdk/models/operations/applyupdatesresponse.md index e34fb453..67f82cb6 100644 --- a/docs/sdk/models/operations/applyupdatesresponse.md +++ b/docs/sdk/models/operations/applyupdatesresponse.md @@ -6,11 +6,11 @@ import { ApplyUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: ApplyUpdatesResponse = { - contentType: "", - statusCode: 318569, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 318569, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/billing.md b/docs/sdk/models/operations/billing.md index b2a066bd..6b31bb1f 100644 --- a/docs/sdk/models/operations/billing.md +++ b/docs/sdk/models/operations/billing.md @@ -6,8 +6,8 @@ import { Billing } from "@lukehagar/plexjs/sdk/models/operations"; let value: Billing = { - internalPaymentMethod: {}, - paymentMethodId: 317983, + internalPaymentMethod: {}, + paymentMethodId: 317983, }; ``` diff --git a/docs/sdk/models/operations/butlertask.md b/docs/sdk/models/operations/butlertask.md index e3709a99..e1d68ec9 100644 --- a/docs/sdk/models/operations/butlertask.md +++ b/docs/sdk/models/operations/butlertask.md @@ -6,10 +6,11 @@ import { ButlerTask } from "@lukehagar/plexjs/sdk/models/operations"; let value: ButlerTask = { - name: "BackupDatabase", - interval: 3, - title: "Backup Database", - description: "Create a backup copy of the server's database in the configured backup directory", + name: "BackupDatabase", + interval: 3, + title: "Backup Database", + description: + "Create a backup copy of the server's database in the configured backup directory", }; ``` diff --git a/docs/sdk/models/operations/butlertasks.md b/docs/sdk/models/operations/butlertasks.md index c6e3edac..167dcd55 100644 --- a/docs/sdk/models/operations/butlertasks.md +++ b/docs/sdk/models/operations/butlertasks.md @@ -6,15 +6,15 @@ import { ButlerTasks } from "@lukehagar/plexjs/sdk/models/operations"; let value: ButlerTasks = { - butlerTask: [ - { - name: "BackupDatabase", - interval: 3, - title: "Backup Database", - description: - "Create a backup copy of the server's database in the configured backup directory", - }, - ], + butlerTask: [ + { + name: "BackupDatabase", + interval: 3, + title: "Backup Database", + description: + "Create a backup copy of the server's database in the configured backup directory", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/cancelserveractivitiesrequest.md b/docs/sdk/models/operations/cancelserveractivitiesrequest.md index 3b750d89..3631e801 100644 --- a/docs/sdk/models/operations/cancelserveractivitiesrequest.md +++ b/docs/sdk/models/operations/cancelserveractivitiesrequest.md @@ -6,7 +6,7 @@ import { CancelServerActivitiesRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: CancelServerActivitiesRequest = { - activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e", + activityUUID: "25b71ed5-0f9d-461c-baa7-d404e9e10d3e", }; ``` diff --git a/docs/sdk/models/operations/cancelserveractivitiesresponse.md b/docs/sdk/models/operations/cancelserveractivitiesresponse.md index 999f9148..9d6f1b27 100644 --- a/docs/sdk/models/operations/cancelserveractivitiesresponse.md +++ b/docs/sdk/models/operations/cancelserveractivitiesresponse.md @@ -6,11 +6,11 @@ import { CancelServerActivitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: CancelServerActivitiesResponse = { - contentType: "", - statusCode: 791725, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 791725, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/checkforupdatesrequest.md b/docs/sdk/models/operations/checkforupdatesrequest.md index bb16497c..69634ba1 100644 --- a/docs/sdk/models/operations/checkforupdatesrequest.md +++ b/docs/sdk/models/operations/checkforupdatesrequest.md @@ -6,7 +6,7 @@ import { CheckForUpdatesRequest, Download } from "@lukehagar/plexjs/sdk/models/operations"; let value: CheckForUpdatesRequest = { - download: Download.One, + download: Download.One, }; ``` diff --git a/docs/sdk/models/operations/checkforupdatesresponse.md b/docs/sdk/models/operations/checkforupdatesresponse.md index c26afd62..1c740384 100644 --- a/docs/sdk/models/operations/checkforupdatesresponse.md +++ b/docs/sdk/models/operations/checkforupdatesresponse.md @@ -6,11 +6,11 @@ import { CheckForUpdatesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: CheckForUpdatesResponse = { - contentType: "", - statusCode: 277718, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 277718, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/clearplaylistcontentsrequest.md b/docs/sdk/models/operations/clearplaylistcontentsrequest.md index 2f62ad9f..913233cc 100644 --- a/docs/sdk/models/operations/clearplaylistcontentsrequest.md +++ b/docs/sdk/models/operations/clearplaylistcontentsrequest.md @@ -6,7 +6,7 @@ import { ClearPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: ClearPlaylistContentsRequest = { - playlistID: 9495.72, + playlistID: 9495.72, }; ``` diff --git a/docs/sdk/models/operations/clearplaylistcontentsresponse.md b/docs/sdk/models/operations/clearplaylistcontentsresponse.md index 0ed2a966..a76c03ce 100644 --- a/docs/sdk/models/operations/clearplaylistcontentsresponse.md +++ b/docs/sdk/models/operations/clearplaylistcontentsresponse.md @@ -6,11 +6,11 @@ import { ClearPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: ClearPlaylistContentsResponse = { - contentType: "", - statusCode: 368725, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 368725, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/connections.md b/docs/sdk/models/operations/connections.md index 1dcab6dd..0f94ba1f 100644 --- a/docs/sdk/models/operations/connections.md +++ b/docs/sdk/models/operations/connections.md @@ -6,13 +6,13 @@ import { Connections } from "@lukehagar/plexjs/sdk/models/operations"; let value: Connections = { - protocol: "", - address: "971 Strosin Wall", - port: 4736.08, - uri: "https://starry-initialise.name", - local: false, - relay: false, - iPv6: false, + protocol: "", + address: "971 Strosin Wall", + port: 4736.08, + uri: "https://starry-initialise.name", + local: false, + relay: false, + iPv6: false, }; ``` diff --git a/docs/sdk/models/operations/country.md b/docs/sdk/models/operations/country.md index 0eaf607d..ef06749b 100644 --- a/docs/sdk/models/operations/country.md +++ b/docs/sdk/models/operations/country.md @@ -6,7 +6,7 @@ import { Country } from "@lukehagar/plexjs/sdk/models/operations"; let value: Country = { - tag: "United States of America", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/createplaylistmediacontainer.md b/docs/sdk/models/operations/createplaylistmediacontainer.md index bb0033ea..2dab667d 100644 --- a/docs/sdk/models/operations/createplaylistmediacontainer.md +++ b/docs/sdk/models/operations/createplaylistmediacontainer.md @@ -6,27 +6,27 @@ import { CreatePlaylistMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: CreatePlaylistMediaContainer = { - size: 7, - metadata: [ - { - ratingKey: "96", - key: "/playlists/96/items", - guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", - type: "playlist", - title: "A Great Playlist", - summary: "What a great playlist", - smart: false, - playlistType: "video", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705719589, - leafCount: 1, - addedAt: 1705719589, - updatedAt: 1705724593, - composite: "/playlists/96/composite/1705724593", - duration: 141000, - }, - ], + size: 7, + metadata: [ + { + ratingKey: "96", + key: "/playlists/96/items", + guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", + type: "playlist", + title: "A Great Playlist", + summary: "What a great playlist", + smart: false, + playlistType: "video", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705719589, + leafCount: 1, + addedAt: 1705719589, + updatedAt: 1705724593, + composite: "/playlists/96/composite/1705724593", + duration: 141000, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/createplaylistmetadata.md b/docs/sdk/models/operations/createplaylistmetadata.md index 8b620d49..1140776a 100644 --- a/docs/sdk/models/operations/createplaylistmetadata.md +++ b/docs/sdk/models/operations/createplaylistmetadata.md @@ -6,22 +6,22 @@ import { CreatePlaylistMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: CreatePlaylistMetadata = { - ratingKey: "96", - key: "/playlists/96/items", - guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", - type: "playlist", - title: "A Great Playlist", - summary: "What a great playlist", - smart: false, - playlistType: "video", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705719589, - leafCount: 1, - addedAt: 1705719589, - updatedAt: 1705724593, - composite: "/playlists/96/composite/1705724593", - duration: 141000, + ratingKey: "96", + key: "/playlists/96/items", + guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", + type: "playlist", + title: "A Great Playlist", + summary: "What a great playlist", + smart: false, + playlistType: "video", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705719589, + leafCount: 1, + addedAt: 1705719589, + updatedAt: 1705724593, + composite: "/playlists/96/composite/1705724593", + duration: 141000, }; ``` diff --git a/docs/sdk/models/operations/createplaylistrequest.md b/docs/sdk/models/operations/createplaylistrequest.md index b4ccdd0d..29b4dde9 100644 --- a/docs/sdk/models/operations/createplaylistrequest.md +++ b/docs/sdk/models/operations/createplaylistrequest.md @@ -6,10 +6,10 @@ import { CreatePlaylistQueryParamType, CreatePlaylistRequest, Smart } from "@lukehagar/plexjs/sdk/models/operations"; let value: CreatePlaylistRequest = { - title: "", - type: CreatePlaylistQueryParamType.Photo, - smart: Smart.One, - uri: "https://exotic-harm.info", + title: "", + type: CreatePlaylistQueryParamType.Photo, + smart: Smart.One, + uri: "https://exotic-harm.info", }; ``` diff --git a/docs/sdk/models/operations/createplaylistresponse.md b/docs/sdk/models/operations/createplaylistresponse.md index 5511b0ca..094ab2e5 100644 --- a/docs/sdk/models/operations/createplaylistresponse.md +++ b/docs/sdk/models/operations/createplaylistresponse.md @@ -6,36 +6,37 @@ import { CreatePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: CreatePlaylistResponse = { - contentType: "", - statusCode: 474697, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 7, - metadata: [ - { - ratingKey: "96", - key: "/playlists/96/items", - guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", - type: "playlist", - title: "A Great Playlist", - summary: "What a great playlist", - smart: false, - playlistType: "video", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705719589, - leafCount: 1, - addedAt: 1705719589, - updatedAt: 1705724593, - composite: "/playlists/96/composite/1705724593", - duration: 141000, - }, - ], + contentType: "", + statusCode: 474697, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 7, + metadata: [ + { + ratingKey: "96", + key: "/playlists/96/items", + guid: + "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", + type: "playlist", + title: "A Great Playlist", + summary: "What a great playlist", + smart: false, + playlistType: "video", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705719589, + leafCount: 1, + addedAt: 1705719589, + updatedAt: 1705724593, + composite: "/playlists/96/composite/1705724593", + duration: 141000, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/createplaylistresponsebody.md b/docs/sdk/models/operations/createplaylistresponsebody.md index a84b4b5c..42799839 100644 --- a/docs/sdk/models/operations/createplaylistresponsebody.md +++ b/docs/sdk/models/operations/createplaylistresponsebody.md @@ -8,29 +8,29 @@ returns all playlists import { CreatePlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: CreatePlaylistResponseBody = { - mediaContainer: { - size: 7, - metadata: [ - { - ratingKey: "96", - key: "/playlists/96/items", - guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", - type: "playlist", - title: "A Great Playlist", - summary: "What a great playlist", - smart: false, - playlistType: "video", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705719589, - leafCount: 1, - addedAt: 1705719589, - updatedAt: 1705724593, - composite: "/playlists/96/composite/1705724593", - duration: 141000, - }, - ], - }, + mediaContainer: { + size: 7, + metadata: [ + { + ratingKey: "96", + key: "/playlists/96/items", + guid: "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55", + type: "playlist", + title: "A Great Playlist", + summary: "What a great playlist", + smart: false, + playlistType: "video", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705719589, + leafCount: 1, + addedAt: 1705719589, + updatedAt: 1705724593, + composite: "/playlists/96/composite/1705724593", + duration: 141000, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/deletelibraryrequest.md b/docs/sdk/models/operations/deletelibraryrequest.md index ddbe6d6d..7ffd2c25 100644 --- a/docs/sdk/models/operations/deletelibraryrequest.md +++ b/docs/sdk/models/operations/deletelibraryrequest.md @@ -6,7 +6,7 @@ import { DeleteLibraryRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: DeleteLibraryRequest = { - sectionKey: 9518, + sectionKey: 9518, }; ``` diff --git a/docs/sdk/models/operations/deletelibraryresponse.md b/docs/sdk/models/operations/deletelibraryresponse.md index 7857a671..5320c2c1 100644 --- a/docs/sdk/models/operations/deletelibraryresponse.md +++ b/docs/sdk/models/operations/deletelibraryresponse.md @@ -6,11 +6,11 @@ import { DeleteLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: DeleteLibraryResponse = { - contentType: "", - statusCode: 697631, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 697631, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/deleteplaylistrequest.md b/docs/sdk/models/operations/deleteplaylistrequest.md index fa87111f..492f778f 100644 --- a/docs/sdk/models/operations/deleteplaylistrequest.md +++ b/docs/sdk/models/operations/deleteplaylistrequest.md @@ -6,7 +6,7 @@ import { DeletePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: DeletePlaylistRequest = { - playlistID: 6747.52, + playlistID: 6747.52, }; ``` diff --git a/docs/sdk/models/operations/deleteplaylistresponse.md b/docs/sdk/models/operations/deleteplaylistresponse.md index d5d31768..0d04271f 100644 --- a/docs/sdk/models/operations/deleteplaylistresponse.md +++ b/docs/sdk/models/operations/deleteplaylistresponse.md @@ -6,11 +6,11 @@ import { DeletePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: DeletePlaylistResponse = { - contentType: "", - statusCode: 656330, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 656330, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/device.md b/docs/sdk/models/operations/device.md index 628cc9b3..bfaaa241 100644 --- a/docs/sdk/models/operations/device.md +++ b/docs/sdk/models/operations/device.md @@ -6,10 +6,10 @@ import { Device } from "@lukehagar/plexjs/sdk/models/operations"; let value: Device = { - id: 1, - name: "iPhone", - platform: "iOS", - createdAt: 1654131230, + id: 1, + name: "iPhone", + platform: "iOS", + createdAt: 1654131230, }; ``` diff --git a/docs/sdk/models/operations/director.md b/docs/sdk/models/operations/director.md index 23c133da..ac3d59ce 100644 --- a/docs/sdk/models/operations/director.md +++ b/docs/sdk/models/operations/director.md @@ -6,7 +6,7 @@ import { Director } from "@lukehagar/plexjs/sdk/models/operations"; let value: Director = { - tag: "Peyton Reed", + tag: "Peyton Reed", }; ``` diff --git a/docs/sdk/models/operations/enablepapertrailresponse.md b/docs/sdk/models/operations/enablepapertrailresponse.md index 1e090974..61b4fea4 100644 --- a/docs/sdk/models/operations/enablepapertrailresponse.md +++ b/docs/sdk/models/operations/enablepapertrailresponse.md @@ -6,11 +6,11 @@ import { EnablePaperTrailResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: EnablePaperTrailResponse = { - contentType: "", - statusCode: 208876, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 208876, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/field.md b/docs/sdk/models/operations/field.md index 44eca221..a1d81062 100644 --- a/docs/sdk/models/operations/field.md +++ b/docs/sdk/models/operations/field.md @@ -6,10 +6,10 @@ import { Field } from "@lukehagar/plexjs/sdk/models/operations"; let value: Field = { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", + key: "label", + title: "Label", + type: "tag", + subType: "bitrate", }; ``` diff --git a/docs/sdk/models/operations/fieldtype.md b/docs/sdk/models/operations/fieldtype.md index 71d63ec1..e683b32f 100644 --- a/docs/sdk/models/operations/fieldtype.md +++ b/docs/sdk/models/operations/fieldtype.md @@ -6,13 +6,13 @@ import { FieldType } from "@lukehagar/plexjs/sdk/models/operations"; let value: FieldType = { - type: "resolution", - operator: [ - { - key: "=", - title: "is", - }, - ], + type: "resolution", + operator: [ + { + key: "=", + title: "is", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/friend.md b/docs/sdk/models/operations/friend.md index 898d6c9b..a24f9f43 100644 --- a/docs/sdk/models/operations/friend.md +++ b/docs/sdk/models/operations/friend.md @@ -6,18 +6,22 @@ import { Friend, Status } from "@lukehagar/plexjs/sdk/models/operations"; let value: Friend = { - email: "username@email.com", - friendlyName: "exampleUser", - home: true, - id: 0, - restricted: false, - sharedServers: [{}], - sharedSources: [{}], - status: Status.Accepted, - thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", - title: "username123", - username: "username123", - uuid: "7d1916e0d8f6e76b", + email: "username@email.com", + friendlyName: "exampleUser", + home: true, + id: 0, + restricted: false, + sharedServers: [ + {}, + ], + sharedSources: [ + {}, + ], + status: Status.Accepted, + thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", + title: "username123", + username: "username123", + uuid: "7d1916e0d8f6e76b", }; ``` diff --git a/docs/sdk/models/operations/genre.md b/docs/sdk/models/operations/genre.md index bb10341c..12ee1cf3 100644 --- a/docs/sdk/models/operations/genre.md +++ b/docs/sdk/models/operations/genre.md @@ -6,7 +6,7 @@ import { Genre } from "@lukehagar/plexjs/sdk/models/operations"; let value: Genre = { - tag: "Comedy", + tag: "Comedy", }; ``` diff --git a/docs/sdk/models/operations/geodata.md b/docs/sdk/models/operations/geodata.md index b76219d6..74deda8b 100644 --- a/docs/sdk/models/operations/geodata.md +++ b/docs/sdk/models/operations/geodata.md @@ -8,17 +8,17 @@ Geo location data import { GeoData } from "@lukehagar/plexjs/sdk/models/operations"; let value: GeoData = { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", }; ``` diff --git a/docs/sdk/models/operations/getalllibrariesdirectory.md b/docs/sdk/models/operations/getalllibrariesdirectory.md index 22fd7c58..0831616f 100644 --- a/docs/sdk/models/operations/getalllibrariesdirectory.md +++ b/docs/sdk/models/operations/getalllibrariesdirectory.md @@ -6,32 +6,32 @@ import { GetAllLibrariesDirectory } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAllLibrariesDirectory = { - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - composite: "/library/sections/1/composite/1705615584", - filters: true, - refreshing: false, - thumb: "/:/resources/movie.png", - key: "1", - type: "movie", - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 3192854, - hidden: 0, - location: [ - { - id: 1, - path: "/movies", - }, - ], + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + composite: "/library/sections/1/composite/1705615584", + filters: true, + refreshing: false, + thumb: "/:/resources/movie.png", + key: "1", + type: "movie", + title: "Movies", + agent: "tv.plex.agents.movie", + scanner: "Plex Movie", + language: "en-US", + uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", + updatedAt: 1556281940, + createdAt: 1556281940, + scannedAt: 1556281940, + content: true, + directory: true, + contentChangedAt: 3192854, + hidden: 0, + location: [ + { + id: 1, + path: "/movies", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getalllibrariesmediacontainer.md b/docs/sdk/models/operations/getalllibrariesmediacontainer.md index e0b8c2c1..9371b436 100644 --- a/docs/sdk/models/operations/getalllibrariesmediacontainer.md +++ b/docs/sdk/models/operations/getalllibrariesmediacontainer.md @@ -6,39 +6,39 @@ import { GetAllLibrariesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAllLibrariesMediaContainer = { - size: 5, - allowSync: false, - title1: "Plex Library", - directory: [ + size: 5, + allowSync: false, + title1: "Plex Library", + directory: [ + { + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + composite: "/library/sections/1/composite/1705615584", + filters: true, + refreshing: false, + thumb: "/:/resources/movie.png", + key: "1", + type: "movie", + title: "Movies", + agent: "tv.plex.agents.movie", + scanner: "Plex Movie", + language: "en-US", + uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", + updatedAt: 1556281940, + createdAt: 1556281940, + scannedAt: 1556281940, + content: true, + directory: true, + contentChangedAt: 3192854, + hidden: 0, + location: [ { - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - composite: "/library/sections/1/composite/1705615584", - filters: true, - refreshing: false, - thumb: "/:/resources/movie.png", - key: "1", - type: "movie", - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 3192854, - hidden: 0, - location: [ - { - id: 1, - path: "/movies", - }, - ], + id: 1, + path: "/movies", }, - ], + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getalllibrariesresponse.md b/docs/sdk/models/operations/getalllibrariesresponse.md index d8075a3e..70b4dee4 100644 --- a/docs/sdk/models/operations/getalllibrariesresponse.md +++ b/docs/sdk/models/operations/getalllibrariesresponse.md @@ -6,48 +6,48 @@ import { GetAllLibrariesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAllLibrariesResponse = { - contentType: "", - statusCode: 613064, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 5, - allowSync: false, - title1: "Plex Library", - directory: [ - { - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - composite: "/library/sections/1/composite/1705615584", - filters: true, - refreshing: false, - thumb: "/:/resources/movie.png", - key: "1", - type: "movie", - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 3192854, - hidden: 0, - location: [ - { - id: 1, - path: "/movies", - }, - ], - }, - ], + contentType: "", + statusCode: 613064, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 5, + allowSync: false, + title1: "Plex Library", + directory: [ + { + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + composite: "/library/sections/1/composite/1705615584", + filters: true, + refreshing: false, + thumb: "/:/resources/movie.png", + key: "1", + type: "movie", + title: "Movies", + agent: "tv.plex.agents.movie", + scanner: "Plex Movie", + language: "en-US", + uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", + updatedAt: 1556281940, + createdAt: 1556281940, + scannedAt: 1556281940, + content: true, + directory: true, + contentChangedAt: 3192854, + hidden: 0, + location: [ + { + id: 1, + path: "/movies", + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getalllibrariesresponsebody.md b/docs/sdk/models/operations/getalllibrariesresponsebody.md index 2d13e401..a7ff89dd 100644 --- a/docs/sdk/models/operations/getalllibrariesresponsebody.md +++ b/docs/sdk/models/operations/getalllibrariesresponsebody.md @@ -8,41 +8,41 @@ The libraries available on the Server import { GetAllLibrariesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAllLibrariesResponseBody = { - mediaContainer: { - size: 5, - allowSync: false, - title1: "Plex Library", - directory: [ - { - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - composite: "/library/sections/1/composite/1705615584", - filters: true, - refreshing: false, - thumb: "/:/resources/movie.png", - key: "1", - type: "movie", - title: "Movies", - agent: "tv.plex.agents.movie", - scanner: "Plex Movie", - language: "en-US", - uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", - updatedAt: 1556281940, - createdAt: 1556281940, - scannedAt: 1556281940, - content: true, - directory: true, - contentChangedAt: 3192854, - hidden: 0, - location: [ - { - id: 1, - path: "/movies", - }, - ], - }, + mediaContainer: { + size: 5, + allowSync: false, + title1: "Plex Library", + directory: [ + { + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + composite: "/library/sections/1/composite/1705615584", + filters: true, + refreshing: false, + thumb: "/:/resources/movie.png", + key: "1", + type: "movie", + title: "Movies", + agent: "tv.plex.agents.movie", + scanner: "Plex Movie", + language: "en-US", + uuid: "322a231a-b7f7-49f5-920f-14c61199cd30", + updatedAt: 1556281940, + createdAt: 1556281940, + scannedAt: 1556281940, + content: true, + directory: true, + contentChangedAt: 3192854, + hidden: 0, + location: [ + { + id: 1, + path: "/movies", + }, ], - }, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getavailableclientsmediacontainer.md b/docs/sdk/models/operations/getavailableclientsmediacontainer.md index 028c8e98..6083c1a5 100644 --- a/docs/sdk/models/operations/getavailableclientsmediacontainer.md +++ b/docs/sdk/models/operations/getavailableclientsmediacontainer.md @@ -6,22 +6,22 @@ import { GetAvailableClientsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAvailableClientsMediaContainer = { - size: 1, - server: [ - { - name: "iPad", - host: "10.10.10.102", - address: "10.10.10.102", - port: 32500, - machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", - version: "8.17", - protocol: "plex", - product: "Plex for iOS", - deviceClass: "tablet", - protocolVersion: 2, - protocolCapabilities: "playback,playqueues,timeline,provider-playback", - }, - ], + size: 1, + server: [ + { + name: "iPad", + host: "10.10.10.102", + address: "10.10.10.102", + port: 32500, + machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", + version: "8.17", + protocol: "plex", + product: "Plex for iOS", + deviceClass: "tablet", + protocolVersion: 2, + protocolCapabilities: "playback,playqueues,timeline,provider-playback", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getavailableclientsresponse.md b/docs/sdk/models/operations/getavailableclientsresponse.md index e98b762b..34ecbdda 100644 --- a/docs/sdk/models/operations/getavailableclientsresponse.md +++ b/docs/sdk/models/operations/getavailableclientsresponse.md @@ -6,31 +6,32 @@ import { GetAvailableClientsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAvailableClientsResponse = { - contentType: "", - statusCode: 715190, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - server: [ - { - name: "iPad", - host: "10.10.10.102", - address: "10.10.10.102", - port: 32500, - machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", - version: "8.17", - protocol: "plex", - product: "Plex for iOS", - deviceClass: "tablet", - protocolVersion: 2, - protocolCapabilities: "playback,playqueues,timeline,provider-playback", - }, - ], + contentType: "", + statusCode: 715190, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + server: [ + { + name: "iPad", + host: "10.10.10.102", + address: "10.10.10.102", + port: 32500, + machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", + version: "8.17", + protocol: "plex", + product: "Plex for iOS", + deviceClass: "tablet", + protocolVersion: 2, + protocolCapabilities: + "playback,playqueues,timeline,provider-playback", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getavailableclientsresponsebody.md b/docs/sdk/models/operations/getavailableclientsresponsebody.md index 5d29d3c4..033286a9 100644 --- a/docs/sdk/models/operations/getavailableclientsresponsebody.md +++ b/docs/sdk/models/operations/getavailableclientsresponsebody.md @@ -8,24 +8,24 @@ Available Clients import { GetAvailableClientsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetAvailableClientsResponseBody = { - mediaContainer: { - size: 1, - server: [ - { - name: "iPad", - host: "10.10.10.102", - address: "10.10.10.102", - port: 32500, - machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", - version: "8.17", - protocol: "plex", - product: "Plex for iOS", - deviceClass: "tablet", - protocolVersion: 2, - protocolCapabilities: "playback,playqueues,timeline,provider-playback", - }, - ], - }, + mediaContainer: { + size: 1, + server: [ + { + name: "iPad", + host: "10.10.10.102", + address: "10.10.10.102", + port: 32500, + machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", + version: "8.17", + protocol: "plex", + product: "Plex for iOS", + deviceClass: "tablet", + protocolVersion: 2, + protocolCapabilities: "playback,playqueues,timeline,provider-playback", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsaccount.md b/docs/sdk/models/operations/getbandwidthstatisticsaccount.md index 4fe1221f..f125f078 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsaccount.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsaccount.md @@ -6,14 +6,14 @@ import { GetBandwidthStatisticsAccount } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsAccount = { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsdevice.md b/docs/sdk/models/operations/getbandwidthstatisticsdevice.md index b7fd042d..ea381a75 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsdevice.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsdevice.md @@ -6,11 +6,11 @@ import { GetBandwidthStatisticsDevice } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsDevice = { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md b/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md index a105f847..5d23699a 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsmediacontainer.md @@ -6,38 +6,38 @@ import { GetBandwidthStatisticsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsMediaContainer = { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsBandwidth: [ - { - accountID: 238960586, - deviceID: 208, - timespan: 6, - at: 1718387650, - lan: true, - bytes: 22, - }, - ], + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, + }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsBandwidth: [ + { + accountID: 238960586, + deviceID: 208, + timespan: 6, + at: 1718387650, + lan: true, + bytes: 22, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsrequest.md b/docs/sdk/models/operations/getbandwidthstatisticsrequest.md index f1caa56c..c4a99720 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsrequest.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsrequest.md @@ -6,7 +6,7 @@ import { GetBandwidthStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsRequest = { - timespan: 4, + timespan: 4, }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsresponse.md b/docs/sdk/models/operations/getbandwidthstatisticsresponse.md index 36b8fe84..529b85fe 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsresponse.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsresponse.md @@ -6,47 +6,47 @@ import { GetBandwidthStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsResponse = { - contentType: "", - statusCode: 916723, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsBandwidth: [ - { - accountID: 238960586, - deviceID: 208, - timespan: 6, - at: 1718387650, - lan: true, - bytes: 22, - }, - ], + contentType: "", + statusCode: 916723, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsBandwidth: [ + { + accountID: 238960586, + deviceID: 208, + timespan: 6, + at: 1718387650, + lan: true, + bytes: 22, + }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md b/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md index ce1506cb..ee9275fb 100644 --- a/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md +++ b/docs/sdk/models/operations/getbandwidthstatisticsresponsebody.md @@ -8,40 +8,40 @@ Bandwidth Statistics import { GetBandwidthStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBandwidthStatisticsResponseBody = { - mediaContainer: { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsBandwidth: [ - { - accountID: 238960586, - deviceID: 208, - timespan: 6, - at: 1718387650, - lan: true, - bytes: 22, - }, - ], - }, + mediaContainer: { + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, + }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsBandwidth: [ + { + accountID: 238960586, + deviceID: 208, + timespan: 6, + at: 1718387650, + lan: true, + bytes: 22, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getbannerimagerequest.md b/docs/sdk/models/operations/getbannerimagerequest.md index c2864269..44f02679 100644 --- a/docs/sdk/models/operations/getbannerimagerequest.md +++ b/docs/sdk/models/operations/getbannerimagerequest.md @@ -6,12 +6,12 @@ import { GetBannerImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetBannerImageRequest = { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", }; ``` diff --git a/docs/sdk/models/operations/getbutlertasksresponse.md b/docs/sdk/models/operations/getbutlertasksresponse.md index 9756f565..a0b02742 100644 --- a/docs/sdk/models/operations/getbutlertasksresponse.md +++ b/docs/sdk/models/operations/getbutlertasksresponse.md @@ -6,24 +6,24 @@ import { GetButlerTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetButlerTasksResponse = { - contentType: "", - statusCode: 812169, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - butlerTasks: { - butlerTask: [ - { - name: "BackupDatabase", - interval: 3, - title: "Backup Database", - description: - "Create a backup copy of the server's database in the configured backup directory", - }, - ], + contentType: "", + statusCode: 812169, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + butlerTasks: { + butlerTask: [ + { + name: "BackupDatabase", + interval: 3, + title: "Backup Database", + description: + "Create a backup copy of the server's database in the configured backup directory", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getbutlertasksresponsebody.md b/docs/sdk/models/operations/getbutlertasksresponsebody.md index e342dfd9..24450a58 100644 --- a/docs/sdk/models/operations/getbutlertasksresponsebody.md +++ b/docs/sdk/models/operations/getbutlertasksresponsebody.md @@ -8,17 +8,17 @@ All butler tasks import { GetButlerTasksResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetButlerTasksResponseBody = { - butlerTasks: { - butlerTask: [ - { - name: "BackupDatabase", - interval: 3, - title: "Backup Database", - description: - "Create a backup copy of the server's database in the configured backup directory", - }, - ], - }, + butlerTasks: { + butlerTask: [ + { + name: "BackupDatabase", + interval: 3, + title: "Backup Database", + description: + "Create a backup copy of the server's database in the configured backup directory", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getcompanionsdataresponse.md b/docs/sdk/models/operations/getcompanionsdataresponse.md index 8810eb99..fc5239b2 100644 --- a/docs/sdk/models/operations/getcompanionsdataresponse.md +++ b/docs/sdk/models/operations/getcompanionsdataresponse.md @@ -6,21 +6,21 @@ import { GetCompanionsDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetCompanionsDataResponse = { - contentType: "", - statusCode: 87129, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - responseBodies: [ - { - identifier: "tv.plex.sonos", - baseURL: "https://sonos.plex.tv", - title: "Sonos", - linkURL: "https://sonos.plex.tv/link", - provides: "client,player", - token: "", - }, - ], + contentType: "", + statusCode: 87129, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + responseBodies: [ + { + identifier: "tv.plex.sonos", + baseURL: "https://sonos.plex.tv", + title: "Sonos", + linkURL: "https://sonos.plex.tv/link", + provides: "client,player", + token: "", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getdevicesmediacontainer.md b/docs/sdk/models/operations/getdevicesmediacontainer.md index 6498be8d..d5dd0929 100644 --- a/docs/sdk/models/operations/getdevicesmediacontainer.md +++ b/docs/sdk/models/operations/getdevicesmediacontainer.md @@ -6,16 +6,16 @@ import { GetDevicesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetDevicesMediaContainer = { - size: 151, - identifier: "com.plexapp.system.devices", - device: [ - { - id: 1, - name: "iPhone", - platform: "iOS", - createdAt: 1654131230, - }, - ], + size: 151, + identifier: "com.plexapp.system.devices", + device: [ + { + id: 1, + name: "iPhone", + platform: "iOS", + createdAt: 1654131230, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getdevicesresponse.md b/docs/sdk/models/operations/getdevicesresponse.md index 26e82dd8..c9de8056 100644 --- a/docs/sdk/models/operations/getdevicesresponse.md +++ b/docs/sdk/models/operations/getdevicesresponse.md @@ -6,25 +6,25 @@ import { GetDevicesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetDevicesResponse = { - contentType: "", - statusCode: 844266, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 151, - identifier: "com.plexapp.system.devices", - device: [ - { - id: 1, - name: "iPhone", - platform: "iOS", - createdAt: 1654131230, - }, - ], + contentType: "", + statusCode: 844266, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 151, + identifier: "com.plexapp.system.devices", + device: [ + { + id: 1, + name: "iPhone", + platform: "iOS", + createdAt: 1654131230, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getdevicesresponsebody.md b/docs/sdk/models/operations/getdevicesresponsebody.md index a628f680..cafd76a7 100644 --- a/docs/sdk/models/operations/getdevicesresponsebody.md +++ b/docs/sdk/models/operations/getdevicesresponsebody.md @@ -8,18 +8,18 @@ Devices import { GetDevicesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetDevicesResponseBody = { - mediaContainer: { - size: 151, - identifier: "com.plexapp.system.devices", - device: [ - { - id: 1, - name: "iPhone", - platform: "iOS", - createdAt: 1654131230, - }, - ], - }, + mediaContainer: { + size: 151, + identifier: "com.plexapp.system.devices", + device: [ + { + id: 1, + name: "iPhone", + platform: "iOS", + createdAt: 1654131230, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getfilehashrequest.md b/docs/sdk/models/operations/getfilehashrequest.md index 4820e12d..8ecd1257 100644 --- a/docs/sdk/models/operations/getfilehashrequest.md +++ b/docs/sdk/models/operations/getfilehashrequest.md @@ -6,7 +6,7 @@ import { GetFileHashRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetFileHashRequest = { - url: "file://C:Image.png&type=13", + url: "file://C:\Image.png&type=13", }; ``` diff --git a/docs/sdk/models/operations/getfilehashresponse.md b/docs/sdk/models/operations/getfilehashresponse.md index bcd422ee..1f57348d 100644 --- a/docs/sdk/models/operations/getfilehashresponse.md +++ b/docs/sdk/models/operations/getfilehashresponse.md @@ -6,11 +6,11 @@ import { GetFileHashResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetFileHashResponse = { - contentType: "", - statusCode: 449950, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 449950, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getgeodatageodata.md b/docs/sdk/models/operations/getgeodatageodata.md index ce59e61e..d0270250 100644 --- a/docs/sdk/models/operations/getgeodatageodata.md +++ b/docs/sdk/models/operations/getgeodatageodata.md @@ -8,17 +8,17 @@ Geo location data import { GetGeoDataGeoData } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGeoDataGeoData = { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", }; ``` diff --git a/docs/sdk/models/operations/getgeodataresponse.md b/docs/sdk/models/operations/getgeodataresponse.md index 1e6965b9..a8197d8d 100644 --- a/docs/sdk/models/operations/getgeodataresponse.md +++ b/docs/sdk/models/operations/getgeodataresponse.md @@ -6,24 +6,24 @@ import { GetGeoDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGeoDataResponse = { - contentType: "", - statusCode: 20218, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - geoData: { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", - }, + contentType: "", + statusCode: 20218, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + geoData: { + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", + }, }; ``` diff --git a/docs/sdk/models/operations/getglobalhubsmediacontainer.md b/docs/sdk/models/operations/getglobalhubsmediacontainer.md index 7bd2ad69..1a92b337 100644 --- a/docs/sdk/models/operations/getglobalhubsmediacontainer.md +++ b/docs/sdk/models/operations/getglobalhubsmediacontainer.md @@ -6,44 +6,46 @@ import { GetGlobalHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGlobalHubsMediaContainer = { - size: 8, - allowSync: true, - identifier: "com.plexapp.plugins.library", - hub: [ + size: 8, + allowSync: true, + identifier: "com.plexapp.plugins.library", + hub: [ + { + hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", + key: + "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", + title: "Recent Playlists", + type: "playlist", + hubIdentifier: "home.playlists", + context: "hub.home.playlists", + size: 6, + more: true, + style: "shelf", + promoted: true, + metadata: [ { - hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", - key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", - title: "Recent Playlists", - type: "playlist", - hubIdentifier: "home.playlists", - context: "hub.home.playlists", - size: 6, - more: true, - style: "shelf", - promoted: true, - metadata: [ - { - ratingKey: "57070", - key: "/playlists/57070/items", - guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", - type: "playlist", - title: "November Movie Day", - titleSort: "Tracks", - summary: "", - smart: false, - playlistType: "video", - composite: "/playlists/57070/composite/1668787730", - icon: "playlist://image.smart", - viewCount: 2, - lastViewedAt: 1668787732, - duration: 16873000, - leafCount: 3, - addedAt: 1668779618, - updatedAt: 1668787730, - }, - ], + ratingKey: "57070", + key: "/playlists/57070/items", + guid: + "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", + type: "playlist", + title: "November Movie Day", + titleSort: "Tracks", + summary: "", + smart: false, + playlistType: "video", + composite: "/playlists/57070/composite/1668787730", + icon: "playlist://image.smart", + viewCount: 2, + lastViewedAt: 1668787732, + duration: 16873000, + leafCount: 3, + addedAt: 1668779618, + updatedAt: 1668787730, }, - ], + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getglobalhubsmetadata.md b/docs/sdk/models/operations/getglobalhubsmetadata.md index a7a76cb4..26aba0a4 100644 --- a/docs/sdk/models/operations/getglobalhubsmetadata.md +++ b/docs/sdk/models/operations/getglobalhubsmetadata.md @@ -6,23 +6,23 @@ import { GetGlobalHubsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGlobalHubsMetadata = { - ratingKey: "57070", - key: "/playlists/57070/items", - guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", - type: "playlist", - title: "November Movie Day", - titleSort: "Tracks", - summary: "", - smart: false, - playlistType: "video", - composite: "/playlists/57070/composite/1668787730", - icon: "playlist://image.smart", - viewCount: 2, - lastViewedAt: 1668787732, - duration: 16873000, - leafCount: 3, - addedAt: 1668779618, - updatedAt: 1668787730, + ratingKey: "57070", + key: "/playlists/57070/items", + guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", + type: "playlist", + title: "November Movie Day", + titleSort: "Tracks", + summary: "", + smart: false, + playlistType: "video", + composite: "/playlists/57070/composite/1668787730", + icon: "playlist://image.smart", + viewCount: 2, + lastViewedAt: 1668787732, + duration: 16873000, + leafCount: 3, + addedAt: 1668779618, + updatedAt: 1668787730, }; ``` diff --git a/docs/sdk/models/operations/getglobalhubsresponse.md b/docs/sdk/models/operations/getglobalhubsresponse.md index 8f69a51f..61045003 100644 --- a/docs/sdk/models/operations/getglobalhubsresponse.md +++ b/docs/sdk/models/operations/getglobalhubsresponse.md @@ -6,53 +6,55 @@ import { GetGlobalHubsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGlobalHubsResponse = { - contentType: "", - statusCode: 149675, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 8, - allowSync: true, - identifier: "com.plexapp.plugins.library", - hub: [ - { - hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", - key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", - title: "Recent Playlists", - type: "playlist", - hubIdentifier: "home.playlists", - context: "hub.home.playlists", - size: 6, - more: true, - style: "shelf", - promoted: true, - metadata: [ - { - ratingKey: "57070", - key: "/playlists/57070/items", - guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", - type: "playlist", - title: "November Movie Day", - titleSort: "Tracks", - summary: "", - smart: false, - playlistType: "video", - composite: "/playlists/57070/composite/1668787730", - icon: "playlist://image.smart", - viewCount: 2, - lastViewedAt: 1668787732, - duration: 16873000, - leafCount: 3, - addedAt: 1668779618, - updatedAt: 1668787730, - }, - ], - }, - ], + contentType: "", + statusCode: 149675, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 8, + allowSync: true, + identifier: "com.plexapp.plugins.library", + hub: [ + { + hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", + key: + "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", + title: "Recent Playlists", + type: "playlist", + hubIdentifier: "home.playlists", + context: "hub.home.playlists", + size: 6, + more: true, + style: "shelf", + promoted: true, + metadata: [ + { + ratingKey: "57070", + key: "/playlists/57070/items", + guid: + "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", + type: "playlist", + title: "November Movie Day", + titleSort: "Tracks", + summary: "", + smart: false, + playlistType: "video", + composite: "/playlists/57070/composite/1668787730", + icon: "playlist://image.smart", + viewCount: 2, + lastViewedAt: 1668787732, + duration: 16873000, + leafCount: 3, + addedAt: 1668779618, + updatedAt: 1668787730, + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getglobalhubsresponsebody.md b/docs/sdk/models/operations/getglobalhubsresponsebody.md index 3c8d54c5..01f83033 100644 --- a/docs/sdk/models/operations/getglobalhubsresponsebody.md +++ b/docs/sdk/models/operations/getglobalhubsresponsebody.md @@ -8,46 +8,48 @@ returns global hubs import { GetGlobalHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetGlobalHubsResponseBody = { - mediaContainer: { - size: 8, - allowSync: true, - identifier: "com.plexapp.plugins.library", - hub: [ - { - hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", - key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", - title: "Recent Playlists", - type: "playlist", - hubIdentifier: "home.playlists", - context: "hub.home.playlists", - size: 6, - more: true, - style: "shelf", - promoted: true, - metadata: [ - { - ratingKey: "57070", - key: "/playlists/57070/items", - guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", - type: "playlist", - title: "November Movie Day", - titleSort: "Tracks", - summary: "", - smart: false, - playlistType: "video", - composite: "/playlists/57070/composite/1668787730", - icon: "playlist://image.smart", - viewCount: 2, - lastViewedAt: 1668787732, - duration: 16873000, - leafCount: 3, - addedAt: 1668779618, - updatedAt: 1668787730, - }, - ], - }, + mediaContainer: { + size: 8, + allowSync: true, + identifier: "com.plexapp.plugins.library", + hub: [ + { + hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", + key: + "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", + title: "Recent Playlists", + type: "playlist", + hubIdentifier: "home.playlists", + context: "hub.home.playlists", + size: 6, + more: true, + style: "shelf", + promoted: true, + metadata: [ + { + ratingKey: "57070", + key: "/playlists/57070/items", + guid: + "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", + type: "playlist", + title: "November Movie Day", + titleSort: "Tracks", + summary: "", + smart: false, + playlistType: "video", + composite: "/playlists/57070/composite/1668787730", + icon: "playlist://image.smart", + viewCount: 2, + lastViewedAt: 1668787732, + duration: 16873000, + leafCount: 3, + addedAt: 1668779618, + updatedAt: 1668787730, + }, ], - }, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/gethomedataresponse.md b/docs/sdk/models/operations/gethomedataresponse.md index 52f775bb..8500e59f 100644 --- a/docs/sdk/models/operations/gethomedataresponse.md +++ b/docs/sdk/models/operations/gethomedataresponse.md @@ -6,17 +6,17 @@ import { GetHomeDataResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetHomeDataResponse = { - contentType: "", - statusCode: 368241, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - id: 1841489, - name: "Blindkitty38's home", - guestUserID: 58815432, - guestUserUUID: "f3df4e01bfca0787", - }, + contentType: "", + statusCode: 368241, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + id: 1841489, + name: "Blindkitty38's home", + guestUserID: 58815432, + guestUserUUID: "f3df4e01bfca0787", + }, }; ``` diff --git a/docs/sdk/models/operations/gethomedataresponsebody.md b/docs/sdk/models/operations/gethomedataresponsebody.md index 31332c19..8bc72e75 100644 --- a/docs/sdk/models/operations/gethomedataresponsebody.md +++ b/docs/sdk/models/operations/gethomedataresponsebody.md @@ -8,10 +8,10 @@ Home Data import { GetHomeDataResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetHomeDataResponseBody = { - id: 1841489, - name: "Blindkitty38's home", - guestUserID: 58815432, - guestUserUUID: "f3df4e01bfca0787", + id: 1841489, + name: "Blindkitty38's home", + guestUserID: 58815432, + guestUserUUID: "f3df4e01bfca0787", }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsdirectory.md b/docs/sdk/models/operations/getlibrarydetailsdirectory.md index a9bbc725..bfdac3cf 100644 --- a/docs/sdk/models/operations/getlibrarydetailsdirectory.md +++ b/docs/sdk/models/operations/getlibrarydetailsdirectory.md @@ -6,11 +6,11 @@ import { GetLibraryDetailsDirectory } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsDirectory = { - key: "search?type=1", - title: "Search...", - secondary: true, - prompt: "Search Movies", - search: true, + key: "search?type=1", + title: "Search...", + secondary: true, + prompt: "Search Movies", + search: true, }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsfilter.md b/docs/sdk/models/operations/getlibrarydetailsfilter.md index 1061b2ca..266c03d8 100644 --- a/docs/sdk/models/operations/getlibrarydetailsfilter.md +++ b/docs/sdk/models/operations/getlibrarydetailsfilter.md @@ -6,11 +6,11 @@ import { GetLibraryDetailsFilter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsFilter = { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", + filter: "label", + filterType: "string", + key: "/library/sections/1/label", + title: "Labels", + type: "filter", }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md b/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md index 50439bd2..d1620a90 100644 --- a/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md +++ b/docs/sdk/models/operations/getlibrarydetailsmediacontainer.md @@ -6,73 +6,73 @@ import { GetLibraryDetailsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsMediaContainer = { - size: 29, - allowSync: false, - art: "/:/resources/movie-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - viewGroup: "secondary", - viewMode: 65592, - directory: [ + size: 29, + allowSync: false, + art: "/:/resources/movie-fanart.jpg", + content: "secondary", + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + viewGroup: "secondary", + viewMode: 65592, + directory: [ + { + key: "search?type=1", + title: "Search...", + secondary: true, + prompt: "Search Movies", + search: true, + }, + ], + type: [ + { + key: "/library/sections/1/all?type=1", + type: "movie", + title: "Movies", + active: false, + filter: [ { - key: "search?type=1", - title: "Search...", - secondary: true, - prompt: "Search Movies", - search: true, + filter: "label", + filterType: "string", + key: "/library/sections/1/label", + title: "Labels", + type: "filter", }, - ], - type: [ + ], + sort: [ { - key: "/library/sections/1/all?type=1", - type: "movie", - title: "Movies", - active: false, - filter: [ - { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", - }, - ], - field: [ - { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", - }, - ], + default: "asc", + defaultDirection: "desc", + descKey: "random:desc", + firstCharacterKey: "/library/sections/1/firstCharacter", + key: "random", + title: "Randomly", }, - ], - fieldType: [ + ], + field: [ { - type: "resolution", - operator: [ - { - key: "=", - title: "is", - }, - ], + key: "label", + title: "Label", + type: "tag", + subType: "bitrate", }, - ], + ], + }, + ], + fieldType: [ + { + type: "resolution", + operator: [ + { + key: "=", + title: "is", + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsrequest.md b/docs/sdk/models/operations/getlibrarydetailsrequest.md index 08cb5be4..b54a0402 100644 --- a/docs/sdk/models/operations/getlibrarydetailsrequest.md +++ b/docs/sdk/models/operations/getlibrarydetailsrequest.md @@ -6,7 +6,7 @@ import { GetLibraryDetailsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsRequest = { - sectionKey: 9518, + sectionKey: 9518, }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsresponse.md b/docs/sdk/models/operations/getlibrarydetailsresponse.md index 310f0997..7609c5e7 100644 --- a/docs/sdk/models/operations/getlibrarydetailsresponse.md +++ b/docs/sdk/models/operations/getlibrarydetailsresponse.md @@ -6,82 +6,82 @@ import { GetLibraryDetailsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsResponse = { - contentType: "", - statusCode: 902349, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 29, - allowSync: false, - art: "/:/resources/movie-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - viewGroup: "secondary", - viewMode: 65592, - directory: [ - { - key: "search?type=1", - title: "Search...", - secondary: true, - prompt: "Search Movies", - search: true, - }, - ], - type: [ - { - key: "/library/sections/1/all?type=1", - type: "movie", - title: "Movies", - active: false, - filter: [ - { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", - }, - ], - field: [ - { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", - }, - ], - }, - ], - fieldType: [ - { - type: "resolution", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, - ], + contentType: "", + statusCode: 902349, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 29, + allowSync: false, + art: "/:/resources/movie-fanart.jpg", + content: "secondary", + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + viewGroup: "secondary", + viewMode: 65592, + directory: [ + { + key: "search?type=1", + title: "Search...", + secondary: true, + prompt: "Search Movies", + search: true, }, + ], + type: [ + { + key: "/library/sections/1/all?type=1", + type: "movie", + title: "Movies", + active: false, + filter: [ + { + filter: "label", + filterType: "string", + key: "/library/sections/1/label", + title: "Labels", + type: "filter", + }, + ], + sort: [ + { + default: "asc", + defaultDirection: "desc", + descKey: "random:desc", + firstCharacterKey: "/library/sections/1/firstCharacter", + key: "random", + title: "Randomly", + }, + ], + field: [ + { + key: "label", + title: "Label", + type: "tag", + subType: "bitrate", + }, + ], + }, + ], + fieldType: [ + { + type: "resolution", + operator: [ + { + key: "=", + title: "is", + }, + ], + }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailsresponsebody.md b/docs/sdk/models/operations/getlibrarydetailsresponsebody.md index 5aedeb9d..1981d42c 100644 --- a/docs/sdk/models/operations/getlibrarydetailsresponsebody.md +++ b/docs/sdk/models/operations/getlibrarydetailsresponsebody.md @@ -8,75 +8,75 @@ The details of the library import { GetLibraryDetailsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsResponseBody = { - mediaContainer: { - size: 29, - allowSync: false, - art: "/:/resources/movie-fanart.jpg", - content: "secondary", - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - viewGroup: "secondary", - viewMode: 65592, - directory: [ - { - key: "search?type=1", - title: "Search...", - secondary: true, - prompt: "Search Movies", - search: true, - }, + mediaContainer: { + size: 29, + allowSync: false, + art: "/:/resources/movie-fanart.jpg", + content: "secondary", + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + viewGroup: "secondary", + viewMode: 65592, + directory: [ + { + key: "search?type=1", + title: "Search...", + secondary: true, + prompt: "Search Movies", + search: true, + }, + ], + type: [ + { + key: "/library/sections/1/all?type=1", + type: "movie", + title: "Movies", + active: false, + filter: [ + { + filter: "label", + filterType: "string", + key: "/library/sections/1/label", + title: "Labels", + type: "filter", + }, ], - type: [ - { - key: "/library/sections/1/all?type=1", - type: "movie", - title: "Movies", - active: false, - filter: [ - { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", - }, - ], - field: [ - { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", - }, - ], - }, + sort: [ + { + default: "asc", + defaultDirection: "desc", + descKey: "random:desc", + firstCharacterKey: "/library/sections/1/firstCharacter", + key: "random", + title: "Randomly", + }, ], - fieldType: [ - { - type: "resolution", - operator: [ - { - key: "=", - title: "is", - }, - ], - }, + field: [ + { + key: "label", + title: "Label", + type: "tag", + subType: "bitrate", + }, ], - }, + }, + ], + fieldType: [ + { + type: "resolution", + operator: [ + { + key: "=", + title: "is", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getlibrarydetailstype.md b/docs/sdk/models/operations/getlibrarydetailstype.md index 34f13450..d240b42b 100644 --- a/docs/sdk/models/operations/getlibrarydetailstype.md +++ b/docs/sdk/models/operations/getlibrarydetailstype.md @@ -6,37 +6,37 @@ import { GetLibraryDetailsType } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryDetailsType = { - key: "/library/sections/1/all?type=1", - type: "movie", - title: "Movies", - active: false, - filter: [ - { - filter: "label", - filterType: "string", - key: "/library/sections/1/label", - title: "Labels", - type: "filter", - }, - ], - sort: [ - { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", - }, - ], - field: [ - { - key: "label", - title: "Label", - type: "tag", - subType: "bitrate", - }, - ], + key: "/library/sections/1/all?type=1", + type: "movie", + title: "Movies", + active: false, + filter: [ + { + filter: "label", + filterType: "string", + key: "/library/sections/1/label", + title: "Labels", + type: "filter", + }, + ], + sort: [ + { + default: "asc", + defaultDirection: "desc", + descKey: "random:desc", + firstCharacterKey: "/library/sections/1/firstCharacter", + key: "random", + title: "Randomly", + }, + ], + field: [ + { + key: "label", + title: "Label", + type: "tag", + subType: "bitrate", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubscountry.md b/docs/sdk/models/operations/getlibraryhubscountry.md index 804a1b12..f3cd2087 100644 --- a/docs/sdk/models/operations/getlibraryhubscountry.md +++ b/docs/sdk/models/operations/getlibraryhubscountry.md @@ -6,7 +6,7 @@ import { GetLibraryHubsCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsCountry = { - tag: "United States of America", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsdirector.md b/docs/sdk/models/operations/getlibraryhubsdirector.md index 2778c516..33d70106 100644 --- a/docs/sdk/models/operations/getlibraryhubsdirector.md +++ b/docs/sdk/models/operations/getlibraryhubsdirector.md @@ -6,7 +6,7 @@ import { GetLibraryHubsDirector } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsDirector = { - tag: "Nathan Greno", + tag: "Nathan Greno", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsgenre.md b/docs/sdk/models/operations/getlibraryhubsgenre.md index f617265f..752b3f72 100644 --- a/docs/sdk/models/operations/getlibraryhubsgenre.md +++ b/docs/sdk/models/operations/getlibraryhubsgenre.md @@ -6,7 +6,7 @@ import { GetLibraryHubsGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsGenre = { - tag: "Animation", + tag: "Animation", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubshub.md b/docs/sdk/models/operations/getlibraryhubshub.md index dc1f8da6..f81bc8a3 100644 --- a/docs/sdk/models/operations/getlibraryhubshub.md +++ b/docs/sdk/models/operations/getlibraryhubshub.md @@ -7,109 +7,110 @@ import { GetLibraryHubsHub } from "@lukehagar/plexjs/sdk/models/operations"; import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryHubsHub = { - key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", - title: "Recently Played Movies", - type: "movie", - hubIdentifier: "movie.recentlyviewed.1", - context: "hub.movie.recentlyviewed", - size: 6, - more: true, - style: "shelf", - hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", - metadata: [ + key: + "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", + title: "Recently Played Movies", + type: "movie", + hubIdentifier: "movie.recentlyviewed.1", + context: "hub.movie.recentlyviewed", + size: 6, + more: true, + style: "shelf", + hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", + metadata: [ + { + ratingKey: "14944", + key: "/library/metadata/14944", + guid: "plex://movie/5d77686eeb5d26001f1eb339", + studio: "Walt Disney Animation Studios", + type: "movie", + title: "Tangled", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG", + summary: + "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", + rating: 8.9, + audienceRating: 8.7, + viewCount: 1, + lastViewedAt: 1704936047, + year: 2010, + tagline: "They're taking adventure to new lengths.", + thumb: "/library/metadata/14944/thumb/1705739847", + art: "/library/metadata/14944/art/1705739847", + duration: 6017237, + originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), + addedAt: 1589412494, + updatedAt: 1705739847, + audienceRatingImage: "rottentomatoes://image.rating.upright", + primaryExtraKey: "/library/metadata/14952", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ { - ratingKey: "14944", - key: "/library/metadata/14944", - guid: "plex://movie/5d77686eeb5d26001f1eb339", - studio: "Walt Disney Animation Studios", - type: "movie", - title: "Tangled", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG", - summary: - "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", - rating: 8.9, - audienceRating: 8.7, - viewCount: 1, - lastViewedAt: 1704936047, - year: 2010, - tagline: "They're taking adventure to new lengths.", - thumb: "/library/metadata/14944/thumb/1705739847", - art: "/library/metadata/14944/art/1705739847", - duration: 6017237, - originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), - addedAt: 1589412494, - updatedAt: 1705739847, - audienceRatingImage: "rottentomatoes://image.rating.upright", - primaryExtraKey: "/library/metadata/14952", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Animation", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Nathan Greno", - }, - ], - role: [ - { - tag: "Donna Murphy", - }, - ], - writer: [ - { - tag: "Wilhelm Grimm", - }, - ], - skipCount: 1, - chapterSource: "media", + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", + }, + ], }, - ], - promoted: true, - random: true, + ], + genre: [ + { + tag: "Animation", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Nathan Greno", + }, + ], + role: [ + { + tag: "Donna Murphy", + }, + ], + writer: [ + { + tag: "Wilhelm Grimm", + }, + ], + skipCount: 1, + chapterSource: "media", + }, + ], + promoted: true, + random: true, }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsmedia.md b/docs/sdk/models/operations/getlibraryhubsmedia.md index e043cb0f..1b57bd2f 100644 --- a/docs/sdk/models/operations/getlibraryhubsmedia.md +++ b/docs/sdk/models/operations/getlibraryhubsmedia.md @@ -6,36 +6,36 @@ import { GetLibraryHubsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsMedia = { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsmediacontainer.md b/docs/sdk/models/operations/getlibraryhubsmediacontainer.md index 5bfe969c..179354e7 100644 --- a/docs/sdk/models/operations/getlibraryhubsmediacontainer.md +++ b/docs/sdk/models/operations/getlibraryhubsmediacontainer.md @@ -7,119 +7,121 @@ import { GetLibraryHubsMediaContainer } from "@lukehagar/plexjs/sdk/models/opera import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryHubsMediaContainer = { - size: 7, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - hub: [ + size: 7, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + hub: [ + { + key: + "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", + title: "Recently Played Movies", + type: "movie", + hubIdentifier: "movie.recentlyviewed.1", + context: "hub.movie.recentlyviewed", + size: 6, + more: true, + style: "shelf", + hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", + metadata: [ { - key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", - title: "Recently Played Movies", - type: "movie", - hubIdentifier: "movie.recentlyviewed.1", - context: "hub.movie.recentlyviewed", - size: 6, - more: true, - style: "shelf", - hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", - metadata: [ + ratingKey: "14944", + key: "/library/metadata/14944", + guid: "plex://movie/5d77686eeb5d26001f1eb339", + studio: "Walt Disney Animation Studios", + type: "movie", + title: "Tangled", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG", + summary: + "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", + rating: 8.9, + audienceRating: 8.7, + viewCount: 1, + lastViewedAt: 1704936047, + year: 2010, + tagline: "They're taking adventure to new lengths.", + thumb: "/library/metadata/14944/thumb/1705739847", + art: "/library/metadata/14944/art/1705739847", + duration: 6017237, + originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), + addedAt: 1589412494, + updatedAt: 1705739847, + audienceRatingImage: "rottentomatoes://image.rating.upright", + primaryExtraKey: "/library/metadata/14952", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - ratingKey: "14944", - key: "/library/metadata/14944", - guid: "plex://movie/5d77686eeb5d26001f1eb339", - studio: "Walt Disney Animation Studios", - type: "movie", - title: "Tangled", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG", - summary: - "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", - rating: 8.9, - audienceRating: 8.7, - viewCount: 1, - lastViewedAt: 1704936047, - year: 2010, - tagline: "They're taking adventure to new lengths.", - thumb: "/library/metadata/14944/thumb/1705739847", - art: "/library/metadata/14944/art/1705739847", - duration: 6017237, - originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), - addedAt: 1589412494, - updatedAt: 1705739847, - audienceRatingImage: "rottentomatoes://image.rating.upright", - primaryExtraKey: "/library/metadata/14952", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Animation", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Nathan Greno", - }, - ], - role: [ - { - tag: "Donna Murphy", - }, - ], - writer: [ - { - tag: "Wilhelm Grimm", - }, - ], - skipCount: 1, - chapterSource: "media", + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: + "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", }, - ], - promoted: true, - random: true, + ], + }, + ], + genre: [ + { + tag: "Animation", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Nathan Greno", + }, + ], + role: [ + { + tag: "Donna Murphy", + }, + ], + writer: [ + { + tag: "Wilhelm Grimm", + }, + ], + skipCount: 1, + chapterSource: "media", }, - ], + ], + promoted: true, + random: true, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsmetadata.md b/docs/sdk/models/operations/getlibraryhubsmetadata.md index 19ae6016..a212ddf9 100644 --- a/docs/sdk/models/operations/getlibraryhubsmetadata.md +++ b/docs/sdk/models/operations/getlibraryhubsmetadata.md @@ -7,94 +7,94 @@ import { GetLibraryHubsMetadata } from "@lukehagar/plexjs/sdk/models/operations" import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryHubsMetadata = { - ratingKey: "14944", - key: "/library/metadata/14944", - guid: "plex://movie/5d77686eeb5d26001f1eb339", - studio: "Walt Disney Animation Studios", - type: "movie", - title: "Tangled", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG", - summary: - "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", - rating: 8.9, - audienceRating: 8.7, - viewCount: 1, - lastViewedAt: 1704936047, - year: 2010, - tagline: "They're taking adventure to new lengths.", - thumb: "/library/metadata/14944/thumb/1705739847", - art: "/library/metadata/14944/art/1705739847", - duration: 6017237, - originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), - addedAt: 1589412494, - updatedAt: 1705739847, - audienceRatingImage: "rottentomatoes://image.rating.upright", - primaryExtraKey: "/library/metadata/14952", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ + ratingKey: "14944", + key: "/library/metadata/14944", + guid: "plex://movie/5d77686eeb5d26001f1eb339", + studio: "Walt Disney Animation Studios", + type: "movie", + title: "Tangled", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG", + summary: + "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", + rating: 8.9, + audienceRating: 8.7, + viewCount: 1, + lastViewedAt: 1704936047, + year: 2010, + tagline: "They're taking adventure to new lengths.", + thumb: "/library/metadata/14944/thumb/1705739847", + art: "/library/metadata/14944/art/1705739847", + duration: 6017237, + originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), + addedAt: 1589412494, + updatedAt: 1705739847, + audienceRatingImage: "rottentomatoes://image.rating.upright", + primaryExtraKey: "/library/metadata/14952", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", }, - ], - genre: [ - { - tag: "Animation", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Nathan Greno", - }, - ], - role: [ - { - tag: "Donna Murphy", - }, - ], - writer: [ - { - tag: "Wilhelm Grimm", - }, - ], - skipCount: 1, - chapterSource: "media", + ], + }, + ], + genre: [ + { + tag: "Animation", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Nathan Greno", + }, + ], + role: [ + { + tag: "Donna Murphy", + }, + ], + writer: [ + { + tag: "Wilhelm Grimm", + }, + ], + skipCount: 1, + chapterSource: "media", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubspart.md b/docs/sdk/models/operations/getlibraryhubspart.md index 2ea59349..535ffa8d 100644 --- a/docs/sdk/models/operations/getlibraryhubspart.md +++ b/docs/sdk/models/operations/getlibraryhubspart.md @@ -6,16 +6,16 @@ import { GetLibraryHubsPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsPart = { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsrequest.md b/docs/sdk/models/operations/getlibraryhubsrequest.md index 96311f31..b9bff940 100644 --- a/docs/sdk/models/operations/getlibraryhubsrequest.md +++ b/docs/sdk/models/operations/getlibraryhubsrequest.md @@ -6,7 +6,7 @@ import { GetLibraryHubsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsRequest = { - sectionId: 2223.21, + sectionId: 2223.21, }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsresponse.md b/docs/sdk/models/operations/getlibraryhubsresponse.md index 6c7998c7..d4f5a91a 100644 --- a/docs/sdk/models/operations/getlibraryhubsresponse.md +++ b/docs/sdk/models/operations/getlibraryhubsresponse.md @@ -7,128 +7,130 @@ import { GetLibraryHubsResponse } from "@lukehagar/plexjs/sdk/models/operations" import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryHubsResponse = { - contentType: "", - statusCode: 616934, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 7, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - hub: [ + contentType: "", + statusCode: 616934, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 7, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + hub: [ + { + key: + "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", + title: "Recently Played Movies", + type: "movie", + hubIdentifier: "movie.recentlyviewed.1", + context: "hub.movie.recentlyviewed", + size: 6, + more: true, + style: "shelf", + hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", + metadata: [ + { + ratingKey: "14944", + key: "/library/metadata/14944", + guid: "plex://movie/5d77686eeb5d26001f1eb339", + studio: "Walt Disney Animation Studios", + type: "movie", + title: "Tangled", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG", + summary: + "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", + rating: 8.9, + audienceRating: 8.7, + viewCount: 1, + lastViewedAt: 1704936047, + year: 2010, + tagline: "They're taking adventure to new lengths.", + thumb: "/library/metadata/14944/thumb/1705739847", + art: "/library/metadata/14944/art/1705739847", + duration: 6017237, + originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), + addedAt: 1589412494, + updatedAt: 1705739847, + audienceRatingImage: "rottentomatoes://image.rating.upright", + primaryExtraKey: "/library/metadata/14952", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ { - key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", - title: "Recently Played Movies", - type: "movie", - hubIdentifier: "movie.recentlyviewed.1", - context: "hub.movie.recentlyviewed", - size: 6, - more: true, - style: "shelf", - hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", - metadata: [ - { - ratingKey: "14944", - key: "/library/metadata/14944", - guid: "plex://movie/5d77686eeb5d26001f1eb339", - studio: "Walt Disney Animation Studios", - type: "movie", - title: "Tangled", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG", - summary: - "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", - rating: 8.9, - audienceRating: 8.7, - viewCount: 1, - lastViewedAt: 1704936047, - year: 2010, - tagline: "They're taking adventure to new lengths.", - thumb: "/library/metadata/14944/thumb/1705739847", - art: "/library/metadata/14944/art/1705739847", - duration: 6017237, - originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), - addedAt: 1589412494, - updatedAt: 1705739847, - audienceRatingImage: "rottentomatoes://image.rating.upright", - primaryExtraKey: "/library/metadata/14952", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Animation", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Nathan Greno", - }, - ], - role: [ - { - tag: "Donna Murphy", - }, - ], - writer: [ - { - tag: "Wilhelm Grimm", - }, - ], - skipCount: 1, - chapterSource: "media", - }, - ], - promoted: true, - random: true, + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: + "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", + }, + ], }, - ], + ], + genre: [ + { + tag: "Animation", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Nathan Greno", + }, + ], + role: [ + { + tag: "Donna Murphy", + }, + ], + writer: [ + { + tag: "Wilhelm Grimm", + }, + ], + skipCount: 1, + chapterSource: "media", + }, + ], + promoted: true, + random: true, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsresponsebody.md b/docs/sdk/models/operations/getlibraryhubsresponsebody.md index 904f9234..d950fbcd 100644 --- a/docs/sdk/models/operations/getlibraryhubsresponsebody.md +++ b/docs/sdk/models/operations/getlibraryhubsresponsebody.md @@ -9,121 +9,123 @@ import { GetLibraryHubsResponseBody } from "@lukehagar/plexjs/sdk/models/operati import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryHubsResponseBody = { - mediaContainer: { - size: 7, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - hub: [ - { - key: "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", - title: "Recently Played Movies", - type: "movie", - hubIdentifier: "movie.recentlyviewed.1", - context: "hub.movie.recentlyviewed", - size: 6, - more: true, - style: "shelf", - hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", - metadata: [ - { - ratingKey: "14944", - key: "/library/metadata/14944", - guid: "plex://movie/5d77686eeb5d26001f1eb339", - studio: "Walt Disney Animation Studios", - type: "movie", - title: "Tangled", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG", - summary: - "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", - rating: 8.9, - audienceRating: 8.7, - viewCount: 1, - lastViewedAt: 1704936047, - year: 2010, - tagline: "They're taking adventure to new lengths.", - thumb: "/library/metadata/14944/thumb/1705739847", - art: "/library/metadata/14944/art/1705739847", - duration: 6017237, - originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), - addedAt: 1589412494, - updatedAt: 1705739847, - audienceRatingImage: "rottentomatoes://image.rating.upright", - primaryExtraKey: "/library/metadata/14952", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 38247, - duration: 6017237, - bitrate: 2051, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 1, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 38247, - key: "/library/parts/38247/1589412494/file.mp4", - duration: 6017237, - file: "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", - size: 1545647447, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: true, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Animation", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Nathan Greno", - }, - ], - role: [ - { - tag: "Donna Murphy", - }, - ], - writer: [ - { - tag: "Wilhelm Grimm", - }, - ], - skipCount: 1, - chapterSource: "media", - }, + mediaContainer: { + size: 7, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + hub: [ + { + key: + "/library/sections/1/all?sort=lastViewedAt:desc&unwatched=0&viewOffset=0", + title: "Recently Played Movies", + type: "movie", + hubIdentifier: "movie.recentlyviewed.1", + context: "hub.movie.recentlyviewed", + size: 6, + more: true, + style: "shelf", + hubKey: "/library/metadata/66485,66098,57249,11449,5858,14944", + metadata: [ + { + ratingKey: "14944", + key: "/library/metadata/14944", + guid: "plex://movie/5d77686eeb5d26001f1eb339", + studio: "Walt Disney Animation Studios", + type: "movie", + title: "Tangled", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG", + summary: + "The magically long-haired Rapunzel has spent her entire life in a tower, but now that a runaway thief has stumbled upon her, she is about to discover the world for the first time, and who she really is.", + rating: 8.9, + audienceRating: 8.7, + viewCount: 1, + lastViewedAt: 1704936047, + year: 2010, + tagline: "They're taking adventure to new lengths.", + thumb: "/library/metadata/14944/thumb/1705739847", + art: "/library/metadata/14944/art/1705739847", + duration: 6017237, + originallyAvailableAt: new RFCDate("2010-11-24T00:00:00Z"), + addedAt: 1589412494, + updatedAt: 1705739847, + audienceRatingImage: "rottentomatoes://image.rating.upright", + primaryExtraKey: "/library/metadata/14952", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 38247, + duration: 6017237, + bitrate: 2051, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 1, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 38247, + key: "/library/parts/38247/1589412494/file.mp4", + duration: 6017237, + file: + "/movies/Tangled (2010)/Tangled (2010) Bluray-1080p.mp4", + size: 1545647447, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: true, + videoProfile: "high", + }, ], - promoted: true, - random: true, - }, + }, + ], + genre: [ + { + tag: "Animation", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Nathan Greno", + }, + ], + role: [ + { + tag: "Donna Murphy", + }, + ], + writer: [ + { + tag: "Wilhelm Grimm", + }, + ], + skipCount: 1, + chapterSource: "media", + }, ], - }, + promoted: true, + random: true, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubsrole.md b/docs/sdk/models/operations/getlibraryhubsrole.md index 706a1480..4ba46b64 100644 --- a/docs/sdk/models/operations/getlibraryhubsrole.md +++ b/docs/sdk/models/operations/getlibraryhubsrole.md @@ -6,7 +6,7 @@ import { GetLibraryHubsRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsRole = { - tag: "Donna Murphy", + tag: "Donna Murphy", }; ``` diff --git a/docs/sdk/models/operations/getlibraryhubswriter.md b/docs/sdk/models/operations/getlibraryhubswriter.md index 5235dfac..43011a2b 100644 --- a/docs/sdk/models/operations/getlibraryhubswriter.md +++ b/docs/sdk/models/operations/getlibraryhubswriter.md @@ -6,7 +6,7 @@ import { GetLibraryHubsWriter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryHubsWriter = { - tag: "Wilhelm Grimm", + tag: "Wilhelm Grimm", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemscountry.md b/docs/sdk/models/operations/getlibraryitemscountry.md index cec8485d..5a406107 100644 --- a/docs/sdk/models/operations/getlibraryitemscountry.md +++ b/docs/sdk/models/operations/getlibraryitemscountry.md @@ -6,7 +6,7 @@ import { GetLibraryItemsCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsCountry = { - tag: "United States of America", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsdirector.md b/docs/sdk/models/operations/getlibraryitemsdirector.md index 30412f87..b06f70a9 100644 --- a/docs/sdk/models/operations/getlibraryitemsdirector.md +++ b/docs/sdk/models/operations/getlibraryitemsdirector.md @@ -6,7 +6,7 @@ import { GetLibraryItemsDirector } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsDirector = { - tag: "James Cameron", + tag: "James Cameron", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsgenre.md b/docs/sdk/models/operations/getlibraryitemsgenre.md index 1b1a5c9b..fede3b9d 100644 --- a/docs/sdk/models/operations/getlibraryitemsgenre.md +++ b/docs/sdk/models/operations/getlibraryitemsgenre.md @@ -6,7 +6,7 @@ import { GetLibraryItemsGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsGenre = { - tag: "Adventure", + tag: "Adventure", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsmedia.md b/docs/sdk/models/operations/getlibraryitemsmedia.md index 8b7499b3..490cfa7e 100644 --- a/docs/sdk/models/operations/getlibraryitemsmedia.md +++ b/docs/sdk/models/operations/getlibraryitemsmedia.md @@ -6,30 +6,31 @@ import { GetLibraryItemsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsMedia = { - id: 119534, - duration: 11558112, - bitrate: 25025, - width: 3840, - height: 2072, - aspectRatio: 1.85, - audioChannels: 6, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - part: [ - { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", - }, - ], + id: 119534, + duration: 11558112, + bitrate: 25025, + width: 3840, + height: 2072, + aspectRatio: 1.85, + audioChannels: 6, + audioCodec: "eac3", + videoCodec: "hevc", + videoResolution: "4k", + container: "mkv", + videoFrameRate: "24p", + videoProfile: "main 10", + part: [ + { + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", + duration: 11558112, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsmediacontainer.md b/docs/sdk/models/operations/getlibraryitemsmediacontainer.md index 8f3c5f96..af8ea4f5 100644 --- a/docs/sdk/models/operations/getlibraryitemsmediacontainer.md +++ b/docs/sdk/models/operations/getlibraryitemsmediacontainer.md @@ -7,129 +7,130 @@ import { GetLibraryItemsMediaContainer } from "@lukehagar/plexjs/sdk/models/oper import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryItemsMediaContainer = { - size: 70, - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - identifier: "com.plexapp.plugins.library", - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - title2: "Recently Released", - viewGroup: "movie", - viewMode: 65592, - mixedParents: true, - metadata: [ + size: 70, + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + identifier: "com.plexapp.plugins.library", + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + title2: "Recently Released", + viewGroup: "movie", + viewMode: 65592, + mixedParents: true, + metadata: [ + { + ratingKey: "58683", + key: "/library/metadata/58683", + guid: "plex://movie/5d7768ba96b655001fdc0408", + studio: "20th Century Studios", + type: "movie", + title: "Avatar: The Way of Water", + contentRating: "PG-13", + summary: + "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", + rating: 7.6, + audienceRating: 9.2, + year: 2022, + tagline: "Return to Pandora.", + thumb: "/library/metadata/58683/thumb/1703239236", + art: "/library/metadata/58683/art/1703239236", + duration: 11558112, + originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), + addedAt: 1680457607, + updatedAt: 1703239236, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/58684", + ratingImage: "rottentomatoes://image.rating.ripe", + grandparentRatingKey: "66", + grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", + grandparentKey: "/library/metadata/66", + grandparentTitle: "Caprica", + grandparentThumb: "/library/metadata/66/thumb/1705716261", + grandparentArt: "/library/metadata/66/art/1705716261", + grandparentTheme: "/library/metadata/66/theme/1705716261", + media: [ { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - studio: "20th Century Studios", - type: "movie", - title: "Avatar: The Way of Water", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), - addedAt: 1680457607, - updatedAt: 1703239236, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - grandparentRatingKey: "66", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - media: [ - { - id: 119534, - duration: 11558112, - bitrate: 25025, - width: 3840, - height: 2072, - aspectRatio: 1.85, - audioChannels: 6, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - part: [ - { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Adventure", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "James Cameron", - }, - ], - writer: [ - { - tag: "James Cameron", - }, - ], - role: [ - { - tag: "Sigourney Weaver", - }, - ], - titleSort: "Whale", - viewCount: 1, - lastViewedAt: 1682752242, - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - viewOffset: 5222500, - skipCount: 1, - index: 1, - theme: "/library/metadata/1/theme/1705636920", - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - parentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentStudio: "UCP", - parentKey: "/library/metadata/66", - parentTitle: "Caprica", - parentIndex: 1, - parentYear: 2010, - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTheme: "/library/metadata/66/theme/1705716261", + id: 119534, + duration: 11558112, + bitrate: 25025, + width: 3840, + height: 2072, + aspectRatio: 1.85, + audioChannels: 6, + audioCodec: "eac3", + videoCodec: "hevc", + videoResolution: "4k", + container: "mkv", + videoFrameRate: "24p", + videoProfile: "main 10", + part: [ + { + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", + duration: 11558112, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", + }, + ], }, - ], + ], + genre: [ + { + tag: "Adventure", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "James Cameron", + }, + ], + writer: [ + { + tag: "James Cameron", + }, + ], + role: [ + { + tag: "Sigourney Weaver", + }, + ], + titleSort: "Whale", + viewCount: 1, + lastViewedAt: 1682752242, + originalTitle: "映画 ブラッククローバー 魔法帝の剣", + viewOffset: 5222500, + skipCount: 1, + index: 1, + theme: "/library/metadata/1/theme/1705636920", + leafCount: 14, + viewedLeafCount: 0, + childCount: 1, + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + parentRatingKey: "66", + parentGuid: "plex://show/5d9c081b170e24001f2a7be4", + parentStudio: "UCP", + parentKey: "/library/metadata/66", + parentTitle: "Caprica", + parentIndex: 1, + parentYear: 2010, + parentThumb: "/library/metadata/66/thumb/1705716261", + parentTheme: "/library/metadata/66/theme/1705716261", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsmetadata.md b/docs/sdk/models/operations/getlibraryitemsmetadata.md index 7d00ede9..5d8e1efa 100644 --- a/docs/sdk/models/operations/getlibraryitemsmetadata.md +++ b/docs/sdk/models/operations/getlibraryitemsmetadata.md @@ -7,111 +7,112 @@ import { GetLibraryItemsMetadata } from "@lukehagar/plexjs/sdk/models/operations import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryItemsMetadata = { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - studio: "20th Century Studios", - type: "movie", - title: "Avatar: The Way of Water", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), - addedAt: 1680457607, - updatedAt: 1703239236, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - grandparentRatingKey: "66", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - media: [ + ratingKey: "58683", + key: "/library/metadata/58683", + guid: "plex://movie/5d7768ba96b655001fdc0408", + studio: "20th Century Studios", + type: "movie", + title: "Avatar: The Way of Water", + contentRating: "PG-13", + summary: + "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", + rating: 7.6, + audienceRating: 9.2, + year: 2022, + tagline: "Return to Pandora.", + thumb: "/library/metadata/58683/thumb/1703239236", + art: "/library/metadata/58683/art/1703239236", + duration: 11558112, + originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), + addedAt: 1680457607, + updatedAt: 1703239236, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/58684", + ratingImage: "rottentomatoes://image.rating.ripe", + grandparentRatingKey: "66", + grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", + grandparentKey: "/library/metadata/66", + grandparentTitle: "Caprica", + grandparentThumb: "/library/metadata/66/thumb/1705716261", + grandparentArt: "/library/metadata/66/art/1705716261", + grandparentTheme: "/library/metadata/66/theme/1705716261", + media: [ + { + id: 119534, + duration: 11558112, + bitrate: 25025, + width: 3840, + height: 2072, + aspectRatio: 1.85, + audioChannels: 6, + audioCodec: "eac3", + videoCodec: "hevc", + videoResolution: "4k", + container: "mkv", + videoFrameRate: "24p", + videoProfile: "main 10", + part: [ { - id: 119534, - duration: 11558112, - bitrate: 25025, - width: 3840, - height: 2072, - aspectRatio: 1.85, - audioChannels: 6, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - part: [ - { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", - }, - ], + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", + duration: 11558112, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", }, - ], - genre: [ - { - tag: "Adventure", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "James Cameron", - }, - ], - writer: [ - { - tag: "James Cameron", - }, - ], - role: [ - { - tag: "Sigourney Weaver", - }, - ], - titleSort: "Whale", - viewCount: 1, - lastViewedAt: 1682752242, - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - viewOffset: 5222500, - skipCount: 1, - index: 1, - theme: "/library/metadata/1/theme/1705636920", - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - parentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentStudio: "UCP", - parentKey: "/library/metadata/66", - parentTitle: "Caprica", - parentIndex: 1, - parentYear: 2010, - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTheme: "/library/metadata/66/theme/1705716261", + ], + }, + ], + genre: [ + { + tag: "Adventure", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "James Cameron", + }, + ], + writer: [ + { + tag: "James Cameron", + }, + ], + role: [ + { + tag: "Sigourney Weaver", + }, + ], + titleSort: "Whale", + viewCount: 1, + lastViewedAt: 1682752242, + originalTitle: "映画 ブラッククローバー 魔法帝の剣", + viewOffset: 5222500, + skipCount: 1, + index: 1, + theme: "/library/metadata/1/theme/1705636920", + leafCount: 14, + viewedLeafCount: 0, + childCount: 1, + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + parentRatingKey: "66", + parentGuid: "plex://show/5d9c081b170e24001f2a7be4", + parentStudio: "UCP", + parentKey: "/library/metadata/66", + parentTitle: "Caprica", + parentIndex: 1, + parentYear: 2010, + parentThumb: "/library/metadata/66/thumb/1705716261", + parentTheme: "/library/metadata/66/theme/1705716261", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemspart.md b/docs/sdk/models/operations/getlibraryitemspart.md index 1fb642fa..e28996a1 100644 --- a/docs/sdk/models/operations/getlibraryitemspart.md +++ b/docs/sdk/models/operations/getlibraryitemspart.md @@ -6,13 +6,14 @@ import { GetLibraryItemsPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsPart = { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", + duration: 11558112, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsrequest.md b/docs/sdk/models/operations/getlibraryitemsrequest.md index 5752035e..32adea97 100644 --- a/docs/sdk/models/operations/getlibraryitemsrequest.md +++ b/docs/sdk/models/operations/getlibraryitemsrequest.md @@ -6,13 +6,13 @@ import { GetLibraryItemsRequest, IncludeGuids, IncludeMeta, Tag, Type } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsRequest = { - sectionKey: 9518, - tag: Tag.Unwatched, - includeGuids: IncludeGuids.One, - includeMeta: IncludeMeta.One, - type: Type.Two, - xPlexContainerStart: 0, - xPlexContainerSize: 50, + sectionKey: 9518, + tag: Tag.Unwatched, + includeGuids: IncludeGuids.One, + includeMeta: IncludeMeta.One, + type: Type.Two, + xPlexContainerStart: 0, + xPlexContainerSize: 50, }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsresponse.md b/docs/sdk/models/operations/getlibraryitemsresponse.md index beb9cf06..746d927d 100644 --- a/docs/sdk/models/operations/getlibraryitemsresponse.md +++ b/docs/sdk/models/operations/getlibraryitemsresponse.md @@ -7,138 +7,139 @@ import { GetLibraryItemsResponse } from "@lukehagar/plexjs/sdk/models/operations import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryItemsResponse = { - contentType: "", - statusCode: 666767, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 70, - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - identifier: "com.plexapp.plugins.library", - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - title2: "Recently Released", - viewGroup: "movie", - viewMode: 65592, - mixedParents: true, - metadata: [ + contentType: "", + statusCode: 666767, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 70, + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + identifier: "com.plexapp.plugins.library", + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + title2: "Recently Released", + viewGroup: "movie", + viewMode: 65592, + mixedParents: true, + metadata: [ + { + ratingKey: "58683", + key: "/library/metadata/58683", + guid: "plex://movie/5d7768ba96b655001fdc0408", + studio: "20th Century Studios", + type: "movie", + title: "Avatar: The Way of Water", + contentRating: "PG-13", + summary: + "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", + rating: 7.6, + audienceRating: 9.2, + year: 2022, + tagline: "Return to Pandora.", + thumb: "/library/metadata/58683/thumb/1703239236", + art: "/library/metadata/58683/art/1703239236", + duration: 11558112, + originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), + addedAt: 1680457607, + updatedAt: 1703239236, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/58684", + ratingImage: "rottentomatoes://image.rating.ripe", + grandparentRatingKey: "66", + grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", + grandparentKey: "/library/metadata/66", + grandparentTitle: "Caprica", + grandparentThumb: "/library/metadata/66/thumb/1705716261", + grandparentArt: "/library/metadata/66/art/1705716261", + grandparentTheme: "/library/metadata/66/theme/1705716261", + media: [ + { + id: 119534, + duration: 11558112, + bitrate: 25025, + width: 3840, + height: 2072, + aspectRatio: 1.85, + audioChannels: 6, + audioCodec: "eac3", + videoCodec: "hevc", + videoResolution: "4k", + container: "mkv", + videoFrameRate: "24p", + videoProfile: "main 10", + part: [ { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - studio: "20th Century Studios", - type: "movie", - title: "Avatar: The Way of Water", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", - duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), - addedAt: 1680457607, - updatedAt: 1703239236, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - grandparentRatingKey: "66", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - media: [ - { - id: 119534, - duration: 11558112, - bitrate: 25025, - width: 3840, - height: 2072, - aspectRatio: 1.85, - audioChannels: 6, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - part: [ - { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Adventure", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "James Cameron", - }, - ], - writer: [ - { - tag: "James Cameron", - }, - ], - role: [ - { - tag: "Sigourney Weaver", - }, - ], - titleSort: "Whale", - viewCount: 1, - lastViewedAt: 1682752242, - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - viewOffset: 5222500, - skipCount: 1, - index: 1, - theme: "/library/metadata/1/theme/1705636920", - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - parentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentStudio: "UCP", - parentKey: "/library/metadata/66", - parentTitle: "Caprica", - parentIndex: 1, - parentYear: 2010, - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTheme: "/library/metadata/66/theme/1705716261", + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", + duration: 11558112, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", }, - ], + ], + }, + ], + genre: [ + { + tag: "Adventure", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "James Cameron", + }, + ], + writer: [ + { + tag: "James Cameron", + }, + ], + role: [ + { + tag: "Sigourney Weaver", + }, + ], + titleSort: "Whale", + viewCount: 1, + lastViewedAt: 1682752242, + originalTitle: "映画 ブラッククローバー 魔法帝の剣", + viewOffset: 5222500, + skipCount: 1, + index: 1, + theme: "/library/metadata/1/theme/1705636920", + leafCount: 14, + viewedLeafCount: 0, + childCount: 1, + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + parentRatingKey: "66", + parentGuid: "plex://show/5d9c081b170e24001f2a7be4", + parentStudio: "UCP", + parentKey: "/library/metadata/66", + parentTitle: "Caprica", + parentIndex: 1, + parentYear: 2010, + parentThumb: "/library/metadata/66/thumb/1705716261", + parentTheme: "/library/metadata/66/theme/1705716261", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsresponsebody.md b/docs/sdk/models/operations/getlibraryitemsresponsebody.md index f11c1cec..a4e07e5d 100644 --- a/docs/sdk/models/operations/getlibraryitemsresponsebody.md +++ b/docs/sdk/models/operations/getlibraryitemsresponsebody.md @@ -9,131 +9,132 @@ import { GetLibraryItemsResponseBody } from "@lukehagar/plexjs/sdk/models/operat import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetLibraryItemsResponseBody = { - mediaContainer: { - size: 70, - allowSync: true, - art: "/:/resources/movie-fanart.jpg", - identifier: "com.plexapp.plugins.library", - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - thumb: "/:/resources/movie.png", - title1: "Movies", - title2: "Recently Released", - viewGroup: "movie", - viewMode: 65592, - mixedParents: true, - metadata: [ - { - ratingKey: "58683", - key: "/library/metadata/58683", - guid: "plex://movie/5d7768ba96b655001fdc0408", - studio: "20th Century Studios", - type: "movie", - title: "Avatar: The Way of Water", - contentRating: "PG-13", - summary: - "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", - rating: 7.6, - audienceRating: 9.2, - year: 2022, - tagline: "Return to Pandora.", - thumb: "/library/metadata/58683/thumb/1703239236", - art: "/library/metadata/58683/art/1703239236", + mediaContainer: { + size: 70, + allowSync: true, + art: "/:/resources/movie-fanart.jpg", + identifier: "com.plexapp.plugins.library", + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + thumb: "/:/resources/movie.png", + title1: "Movies", + title2: "Recently Released", + viewGroup: "movie", + viewMode: 65592, + mixedParents: true, + metadata: [ + { + ratingKey: "58683", + key: "/library/metadata/58683", + guid: "plex://movie/5d7768ba96b655001fdc0408", + studio: "20th Century Studios", + type: "movie", + title: "Avatar: The Way of Water", + contentRating: "PG-13", + summary: + "Jake Sully lives with his newfound family formed on the extrasolar moon Pandora. Once a familiar threat returns to finish what was previously started, Jake must work with Neytiri and the army of the Na'vi race to protect their home.", + rating: 7.6, + audienceRating: 9.2, + year: 2022, + tagline: "Return to Pandora.", + thumb: "/library/metadata/58683/thumb/1703239236", + art: "/library/metadata/58683/art/1703239236", + duration: 11558112, + originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), + addedAt: 1680457607, + updatedAt: 1703239236, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/58684", + ratingImage: "rottentomatoes://image.rating.ripe", + grandparentRatingKey: "66", + grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", + grandparentKey: "/library/metadata/66", + grandparentTitle: "Caprica", + grandparentThumb: "/library/metadata/66/thumb/1705716261", + grandparentArt: "/library/metadata/66/art/1705716261", + grandparentTheme: "/library/metadata/66/theme/1705716261", + media: [ + { + id: 119534, + duration: 11558112, + bitrate: 25025, + width: 3840, + height: 2072, + aspectRatio: 1.85, + audioChannels: 6, + audioCodec: "eac3", + videoCodec: "hevc", + videoResolution: "4k", + container: "mkv", + videoFrameRate: "24p", + videoProfile: "main 10", + part: [ + { + id: 119542, + key: "/library/parts/119542/1680457526/file.mkv", duration: 11558112, - originallyAvailableAt: new RFCDate("2022-12-14T00:00:00Z"), - addedAt: 1680457607, - updatedAt: 1703239236, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/58684", - ratingImage: "rottentomatoes://image.rating.ripe", - grandparentRatingKey: "66", - grandparentGuid: "plex://show/5d9c081b170e24001f2a7be4", - grandparentKey: "/library/metadata/66", - grandparentTitle: "Caprica", - grandparentThumb: "/library/metadata/66/thumb/1705716261", - grandparentArt: "/library/metadata/66/art/1705716261", - grandparentTheme: "/library/metadata/66/theme/1705716261", - media: [ - { - id: 119534, - duration: 11558112, - bitrate: 25025, - width: 3840, - height: 2072, - aspectRatio: 1.85, - audioChannels: 6, - audioCodec: "eac3", - videoCodec: "hevc", - videoResolution: "4k", - container: "mkv", - videoFrameRate: "24p", - videoProfile: "main 10", - part: [ - { - id: 119542, - key: "/library/parts/119542/1680457526/file.mkv", - duration: 11558112, - file: "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", - size: 36158371307, - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Adventure", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "James Cameron", - }, - ], - writer: [ - { - tag: "James Cameron", - }, - ], - role: [ - { - tag: "Sigourney Weaver", - }, - ], - titleSort: "Whale", - viewCount: 1, - lastViewedAt: 1682752242, - originalTitle: "映画 ブラッククローバー 魔法帝の剣", - viewOffset: 5222500, - skipCount: 1, - index: 1, - theme: "/library/metadata/1/theme/1705636920", - leafCount: 14, - viewedLeafCount: 0, - childCount: 1, - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - parentRatingKey: "66", - parentGuid: "plex://show/5d9c081b170e24001f2a7be4", - parentStudio: "UCP", - parentKey: "/library/metadata/66", - parentTitle: "Caprica", - parentIndex: 1, - parentYear: 2010, - parentThumb: "/library/metadata/66/thumb/1705716261", - parentTheme: "/library/metadata/66/theme/1705716261", - }, + file: + "/movies/Avatar The Way of Water (2022)/Avatar.The.Way.of.Water.2022.2160p.WEB-DL.DDP5.1.Atmos.DV.HDR10.HEVC-CMRG.mkv", + size: 36158371307, + container: "mkv", + videoProfile: "main 10", + }, + ], + }, ], - }, + genre: [ + { + tag: "Adventure", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "James Cameron", + }, + ], + writer: [ + { + tag: "James Cameron", + }, + ], + role: [ + { + tag: "Sigourney Weaver", + }, + ], + titleSort: "Whale", + viewCount: 1, + lastViewedAt: 1682752242, + originalTitle: "映画 ブラッククローバー 魔法帝の剣", + viewOffset: 5222500, + skipCount: 1, + index: 1, + theme: "/library/metadata/1/theme/1705636920", + leafCount: 14, + viewedLeafCount: 0, + childCount: 1, + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + parentRatingKey: "66", + parentGuid: "plex://show/5d9c081b170e24001f2a7be4", + parentStudio: "UCP", + parentKey: "/library/metadata/66", + parentTitle: "Caprica", + parentIndex: 1, + parentYear: 2010, + parentThumb: "/library/metadata/66/thumb/1705716261", + parentTheme: "/library/metadata/66/theme/1705716261", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemsrole.md b/docs/sdk/models/operations/getlibraryitemsrole.md index fcc996cd..899a22a9 100644 --- a/docs/sdk/models/operations/getlibraryitemsrole.md +++ b/docs/sdk/models/operations/getlibraryitemsrole.md @@ -6,7 +6,7 @@ import { GetLibraryItemsRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsRole = { - tag: "Sigourney Weaver", + tag: "Sigourney Weaver", }; ``` diff --git a/docs/sdk/models/operations/getlibraryitemswriter.md b/docs/sdk/models/operations/getlibraryitemswriter.md index b564e179..4a6d11b2 100644 --- a/docs/sdk/models/operations/getlibraryitemswriter.md +++ b/docs/sdk/models/operations/getlibraryitemswriter.md @@ -6,7 +6,7 @@ import { GetLibraryItemsWriter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetLibraryItemsWriter = { - tag: "James Cameron", + tag: "James Cameron", }; ``` diff --git a/docs/sdk/models/operations/getmediaprovidersrequest.md b/docs/sdk/models/operations/getmediaprovidersrequest.md index ff1d92fc..a049d79c 100644 --- a/docs/sdk/models/operations/getmediaprovidersrequest.md +++ b/docs/sdk/models/operations/getmediaprovidersrequest.md @@ -6,7 +6,7 @@ import { GetMediaProvidersRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMediaProvidersRequest = { - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + xPlexToken: "CV5xoxjTpFKUzBTShsaf", }; ``` diff --git a/docs/sdk/models/operations/getmediaprovidersresponse.md b/docs/sdk/models/operations/getmediaprovidersresponse.md index 42b59360..75c395ac 100644 --- a/docs/sdk/models/operations/getmediaprovidersresponse.md +++ b/docs/sdk/models/operations/getmediaprovidersresponse.md @@ -6,11 +6,11 @@ import { GetMediaProvidersResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMediaProvidersResponse = { - contentType: "", - statusCode: 437587, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 437587, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeycountry.md b/docs/sdk/models/operations/getmetadatabyratingkeycountry.md index a174fd0d..8e1e9c6b 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeycountry.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeycountry.md @@ -6,9 +6,9 @@ import { GetMetaDataByRatingKeyCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyCountry = { - id: 116, - filter: "country=116", - tag: "United States of America", + id: 116, + filter: "country=116", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeydirector.md b/docs/sdk/models/operations/getmetadatabyratingkeydirector.md index 86f7e758..28cf59d0 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeydirector.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeydirector.md @@ -6,11 +6,11 @@ import { GetMetaDataByRatingKeyDirector } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyDirector = { - id: 130, - filter: "director=130", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + id: 130, + filter: "director=130", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeygenre.md b/docs/sdk/models/operations/getmetadatabyratingkeygenre.md index e743657d..0f9e6517 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeygenre.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeygenre.md @@ -6,9 +6,9 @@ import { GetMetaDataByRatingKeyGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyGenre = { - id: 184, - filter: "genre=184", - tag: "Thriller", + id: 184, + filter: "genre=184", + tag: "Thriller", }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeymedia.md b/docs/sdk/models/operations/getmetadatabyratingkeymedia.md index 566ef362..fe2bc226 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeymedia.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeymedia.md @@ -6,72 +6,72 @@ import { GetMetaDataByRatingKeyMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyMedia = { - id: 15, - duration: 141417, - bitrate: 2278, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ + id: 15, + duration: 141417, + bitrate: 2278, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141417, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, }, - ], + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeymediacontainer.md b/docs/sdk/models/operations/getmetadatabyratingkeymediacontainer.md index 9aab0334..dc4aeb13 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeymediacontainer.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeymediacontainer.md @@ -7,176 +7,180 @@ import { GetMetaDataByRatingKeyMediaContainer } from "@lukehagar/plexjs/sdk/mode import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetMetaDataByRatingKeyMediaContainer = { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ + id: 15, + duration: 141417, + bitrate: 2278, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141417, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ { - id: 15, - duration: 141417, - bitrate: 2278, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], - }, - ], + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, }, - ], - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - ratings: [ - { - image: "themoviedb://image.rating", - value: 7.4, - type: "audience", - }, - ], - director: [ - { - id: 130, - filter: "director=130", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - writer: [ - { - id: 132, - filter: "writer=132", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - producer: [ - { - id: 221, - filter: "producer=221", - tag: "Barry Mendel", - tagKey: "5d776826961905001eb90e2b", - thumb: "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", - }, - ], + ], + }, + ], }, - ], + ], + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + ratings: [ + { + image: "themoviedb://image.rating", + value: 7.4, + type: "audience", + }, + ], + director: [ + { + id: 130, + filter: "director=130", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + writer: [ + { + id: 132, + filter: "writer=132", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + producer: [ + { + id: 221, + filter: "producer=221", + tag: "Barry Mendel", + tagKey: "5d776826961905001eb90e2b", + thumb: + "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeymetadata.md b/docs/sdk/models/operations/getmetadatabyratingkeymetadata.md index 6a203833..163cf537 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeymetadata.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeymetadata.md @@ -7,164 +7,168 @@ import { GetMetaDataByRatingKeyMetadata } from "@lukehagar/plexjs/sdk/models/ope import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetMetaDataByRatingKeyMetadata = { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141417, + bitrate: 2278, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - id: 15, - duration: 141417, - bitrate: 2278, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], - }, - ], + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141417, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ + { + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, + }, + ], }, - ], - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - ratings: [ - { - image: "themoviedb://image.rating", - value: 7.4, - type: "audience", - }, - ], - director: [ - { - id: 130, - filter: "director=130", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - writer: [ - { - id: 132, - filter: "writer=132", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - producer: [ - { - id: 221, - filter: "producer=221", - tag: "Barry Mendel", - tagKey: "5d776826961905001eb90e2b", - thumb: "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", - }, - ], + ], + }, + ], + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + ratings: [ + { + image: "themoviedb://image.rating", + value: 7.4, + type: "audience", + }, + ], + director: [ + { + id: 130, + filter: "director=130", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + writer: [ + { + id: 132, + filter: "writer=132", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + producer: [ + { + id: 221, + filter: "producer=221", + tag: "Barry Mendel", + tagKey: "5d776826961905001eb90e2b", + thumb: + "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeypart.md b/docs/sdk/models/operations/getmetadatabyratingkeypart.md index 9bcee6ad..d85705c6 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeypart.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeypart.md @@ -6,52 +6,52 @@ import { GetMetaDataByRatingKeyPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyPart = { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141417, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ + { + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeyrequest.md b/docs/sdk/models/operations/getmetadatabyratingkeyrequest.md index f55adda0..1b024728 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeyrequest.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeyrequest.md @@ -6,7 +6,7 @@ import { GetMetaDataByRatingKeyRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyRequest = { - ratingKey: 9518, + ratingKey: 9518, }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeyresponse.md b/docs/sdk/models/operations/getmetadatabyratingkeyresponse.md index 32986316..ba5f7abc 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeyresponse.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeyresponse.md @@ -7,185 +7,189 @@ import { GetMetaDataByRatingKeyResponse } from "@lukehagar/plexjs/sdk/models/ope import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetMetaDataByRatingKeyResponse = { - contentType: "", - statusCode: 358152, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ + contentType: "", + statusCode: 358152, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141417, + bitrate: 2278, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 15, - duration: 141417, - bitrate: 2278, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], - }, - ], - }, - ], - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - ratings: [ - { - image: "themoviedb://image.rating", - value: 7.4, - type: "audience", - }, - ], - director: [ - { - id: 130, - filter: "director=130", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - writer: [ - { - id: 132, - filter: "writer=132", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - producer: [ - { - id: 221, - filter: "producer=221", - tag: "Barry Mendel", - tagKey: "5d776826961905001eb90e2b", - thumb: "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", - }, - ], + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141417, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ + { + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, + }, + ], }, - ], + ], + }, + ], + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + ratings: [ + { + image: "themoviedb://image.rating", + value: 7.4, + type: "audience", + }, + ], + director: [ + { + id: 130, + filter: "director=130", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + writer: [ + { + id: 132, + filter: "writer=132", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + producer: [ + { + id: 221, + filter: "producer=221", + tag: "Barry Mendel", + tagKey: "5d776826961905001eb90e2b", + thumb: + "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeyresponsebody.md b/docs/sdk/models/operations/getmetadatabyratingkeyresponsebody.md index d5ccc7ad..b8748b1e 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeyresponsebody.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeyresponsebody.md @@ -9,178 +9,182 @@ import { GetMetaDataByRatingKeyResponseBody } from "@lukehagar/plexjs/sdk/models import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetMetaDataByRatingKeyResponseBody = { - mediaContainer: { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - librarySectionID: 1, + mediaContainer: { + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", librarySectionTitle: "Movies", - librarySectionUUID: "cfc899d7-3000-46f6-8489-b9592714ada5", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ - { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141417, + bitrate: 2278, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 15, - duration: 141417, - bitrate: 2278, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141417, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - stream: [ - { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, - }, - ], - }, - ], - }, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + stream: [ + { + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, + }, ], - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - ratings: [ - { - image: "themoviedb://image.rating", - value: 7.4, - type: "audience", - }, - ], - director: [ - { - id: 130, - filter: "director=130", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - writer: [ - { - id: 132, - filter: "writer=132", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - producer: [ - { - id: 221, - filter: "producer=221", - tag: "Barry Mendel", - tagKey: "5d776826961905001eb90e2b", - thumb: "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", - }, - ], - }, + }, + ], + }, ], - }, + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + ratings: [ + { + image: "themoviedb://image.rating", + value: 7.4, + type: "audience", + }, + ], + director: [ + { + id: 130, + filter: "director=130", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + writer: [ + { + id: 132, + filter: "writer=132", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: + "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + producer: [ + { + id: 221, + filter: "producer=221", + tag: "Barry Mendel", + tagKey: "5d776826961905001eb90e2b", + thumb: + "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeyrole.md b/docs/sdk/models/operations/getmetadatabyratingkeyrole.md index 8317542c..0f373c5c 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeyrole.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeyrole.md @@ -6,12 +6,13 @@ import { GetMetaDataByRatingKeyRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyRole = { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", }; ``` diff --git a/docs/sdk/models/operations/getmetadatabyratingkeywriter.md b/docs/sdk/models/operations/getmetadatabyratingkeywriter.md index 4a35c45d..69836e21 100644 --- a/docs/sdk/models/operations/getmetadatabyratingkeywriter.md +++ b/docs/sdk/models/operations/getmetadatabyratingkeywriter.md @@ -6,11 +6,11 @@ import { GetMetaDataByRatingKeyWriter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetaDataByRatingKeyWriter = { - id: 132, - filter: "writer=132", - tag: "Joss Whedon", - tagKey: "5d776828880197001ec90e8f", - thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", + id: 132, + filter: "writer=132", + tag: "Joss Whedon", + tagKey: "5d776828880197001ec90e8f", + thumb: "https://metadata-static.plex.tv/people/5d776828880197001ec90e8f.jpg", }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrendirectory.md b/docs/sdk/models/operations/getmetadatachildrendirectory.md index 73652063..0d218a02 100644 --- a/docs/sdk/models/operations/getmetadatachildrendirectory.md +++ b/docs/sdk/models/operations/getmetadatachildrendirectory.md @@ -6,11 +6,11 @@ import { GetMetadataChildrenDirectory } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenDirectory = { - leafCount: 16, - thumb: "/library/metadata/30072/thumb/1705739923", - viewedLeafCount: 16, - key: "/library/metadata/30072/allLeaves", - title: "All episodes", + leafCount: 16, + thumb: "/library/metadata/30072/thumb/1705739923", + viewedLeafCount: 16, + key: "/library/metadata/30072/allLeaves", + title: "All episodes", }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md b/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md index c8456e91..3a8b30e1 100644 --- a/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md +++ b/docs/sdk/models/operations/getmetadatachildrenmediacontainer.md @@ -6,69 +6,69 @@ import { GetMetadataChildrenMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenMediaContainer = { - size: 3, - allowSync: true, - art: "/library/metadata/30072/art/1705739923", - identifier: "com.plexapp.plugins.library", - key: "30072", - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - nocache: true, - parentIndex: 1, - parentTitle: "Reacher", - parentYear: 2022, - summary: - "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", - theme: "/library/metadata/30072/theme/1705739923", - thumb: "/library/metadata/30072/thumb/1705739923", - title1: "TV Shows", - title2: "Reacher", - viewGroup: "season", - viewMode: 65593, - directory: [ - { - leafCount: 16, - thumb: "/library/metadata/30072/thumb/1705739923", - viewedLeafCount: 16, - key: "/library/metadata/30072/allLeaves", - title: "All episodes", - }, - ], - metadata: [ - { - ratingKey: "66488", - key: "/library/metadata/66488/children", - parentRatingKey: "30072", - guid: "plex://season/652aea6549508477c34c6000", - parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", - parentStudio: "Amazon Studios", - type: "season", - title: "Season 2", - parentKey: "/library/metadata/30072", - parentTitle: "Reacher", - summary: - 'Based on"Bad Luck and Trouble," when members of Reacher\'s old military unit start turning up dead, Reacher has just one thing on his mind—revenge.', - index: 2, - parentIndex: 1, - viewCount: 11, - lastViewedAt: 1705646565, - parentYear: 2022, - thumb: "/library/metadata/66488/thumb/1703065033", - art: "/library/metadata/30072/art/1705739923", - parentThumb: "/library/metadata/30072/thumb/1705739923", - parentTheme: "/library/metadata/30072/theme/1705739923", - leafCount: 8, - viewedLeafCount: 8, - addedAt: 1702602021, - updatedAt: 1703065033, - userRating: 9, - skipCount: 1, - lastRatedAt: 1703881224, - }, - ], + size: 3, + allowSync: true, + art: "/library/metadata/30072/art/1705739923", + identifier: "com.plexapp.plugins.library", + key: "30072", + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + nocache: true, + parentIndex: 1, + parentTitle: "Reacher", + parentYear: 2022, + summary: + "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", + theme: "/library/metadata/30072/theme/1705739923", + thumb: "/library/metadata/30072/thumb/1705739923", + title1: "TV Shows", + title2: "Reacher", + viewGroup: "season", + viewMode: 65593, + directory: [ + { + leafCount: 16, + thumb: "/library/metadata/30072/thumb/1705739923", + viewedLeafCount: 16, + key: "/library/metadata/30072/allLeaves", + title: "All episodes", + }, + ], + metadata: [ + { + ratingKey: "66488", + key: "/library/metadata/66488/children", + parentRatingKey: "30072", + guid: "plex://season/652aea6549508477c34c6000", + parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", + parentStudio: "Amazon Studios", + type: "season", + title: "Season 2", + parentKey: "/library/metadata/30072", + parentTitle: "Reacher", + summary: + "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.", + index: 2, + parentIndex: 1, + viewCount: 11, + lastViewedAt: 1705646565, + parentYear: 2022, + thumb: "/library/metadata/66488/thumb/1703065033", + art: "/library/metadata/30072/art/1705739923", + parentThumb: "/library/metadata/30072/thumb/1705739923", + parentTheme: "/library/metadata/30072/theme/1705739923", + leafCount: 8, + viewedLeafCount: 8, + addedAt: 1702602021, + updatedAt: 1703065033, + userRating: 9, + skipCount: 1, + lastRatedAt: 1703881224, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrenmetadata.md b/docs/sdk/models/operations/getmetadatachildrenmetadata.md index 1e1df8ce..876a8e31 100644 --- a/docs/sdk/models/operations/getmetadatachildrenmetadata.md +++ b/docs/sdk/models/operations/getmetadatachildrenmetadata.md @@ -6,34 +6,34 @@ import { GetMetadataChildrenMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenMetadata = { - ratingKey: "66488", - key: "/library/metadata/66488/children", - parentRatingKey: "30072", - guid: "plex://season/652aea6549508477c34c6000", - parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", - parentStudio: "Amazon Studios", - type: "season", - title: "Season 2", - parentKey: "/library/metadata/30072", - parentTitle: "Reacher", - summary: - 'Based on"Bad Luck and Trouble," when members of Reacher\'s old military unit start turning up dead, Reacher has just one thing on his mind—revenge.', - index: 2, - parentIndex: 1, - viewCount: 11, - lastViewedAt: 1705646565, - parentYear: 2022, - thumb: "/library/metadata/66488/thumb/1703065033", - art: "/library/metadata/30072/art/1705739923", - parentThumb: "/library/metadata/30072/thumb/1705739923", - parentTheme: "/library/metadata/30072/theme/1705739923", - leafCount: 8, - viewedLeafCount: 8, - addedAt: 1702602021, - updatedAt: 1703065033, - userRating: 9, - skipCount: 1, - lastRatedAt: 1703881224, + ratingKey: "66488", + key: "/library/metadata/66488/children", + parentRatingKey: "30072", + guid: "plex://season/652aea6549508477c34c6000", + parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", + parentStudio: "Amazon Studios", + type: "season", + title: "Season 2", + parentKey: "/library/metadata/30072", + parentTitle: "Reacher", + summary: + "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.", + index: 2, + parentIndex: 1, + viewCount: 11, + lastViewedAt: 1705646565, + parentYear: 2022, + thumb: "/library/metadata/66488/thumb/1703065033", + art: "/library/metadata/30072/art/1705739923", + parentThumb: "/library/metadata/30072/thumb/1705739923", + parentTheme: "/library/metadata/30072/theme/1705739923", + leafCount: 8, + viewedLeafCount: 8, + addedAt: 1702602021, + updatedAt: 1703065033, + userRating: 9, + skipCount: 1, + lastRatedAt: 1703881224, }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrenrequest.md b/docs/sdk/models/operations/getmetadatachildrenrequest.md index cca98363..c18716b0 100644 --- a/docs/sdk/models/operations/getmetadatachildrenrequest.md +++ b/docs/sdk/models/operations/getmetadatachildrenrequest.md @@ -6,7 +6,7 @@ import { GetMetadataChildrenRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenRequest = { - ratingKey: 1289.26, + ratingKey: 1289.26, }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrenresponse.md b/docs/sdk/models/operations/getmetadatachildrenresponse.md index 87d19645..6705b8de 100644 --- a/docs/sdk/models/operations/getmetadatachildrenresponse.md +++ b/docs/sdk/models/operations/getmetadatachildrenresponse.md @@ -6,78 +6,78 @@ import { GetMetadataChildrenResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenResponse = { - contentType: "", - statusCode: 750686, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 3, - allowSync: true, - art: "/library/metadata/30072/art/1705739923", - identifier: "com.plexapp.plugins.library", - key: "30072", - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - nocache: true, - parentIndex: 1, - parentTitle: "Reacher", - parentYear: 2022, - summary: - "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", - theme: "/library/metadata/30072/theme/1705739923", - thumb: "/library/metadata/30072/thumb/1705739923", - title1: "TV Shows", - title2: "Reacher", - viewGroup: "season", - viewMode: 65593, - directory: [ - { - leafCount: 16, - thumb: "/library/metadata/30072/thumb/1705739923", - viewedLeafCount: 16, - key: "/library/metadata/30072/allLeaves", - title: "All episodes", - }, - ], - metadata: [ - { - ratingKey: "66488", - key: "/library/metadata/66488/children", - parentRatingKey: "30072", - guid: "plex://season/652aea6549508477c34c6000", - parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", - parentStudio: "Amazon Studios", - type: "season", - title: "Season 2", - parentKey: "/library/metadata/30072", - parentTitle: "Reacher", - summary: - 'Based on"Bad Luck and Trouble," when members of Reacher\'s old military unit start turning up dead, Reacher has just one thing on his mind—revenge.', - index: 2, - parentIndex: 1, - viewCount: 11, - lastViewedAt: 1705646565, - parentYear: 2022, - thumb: "/library/metadata/66488/thumb/1703065033", - art: "/library/metadata/30072/art/1705739923", - parentThumb: "/library/metadata/30072/thumb/1705739923", - parentTheme: "/library/metadata/30072/theme/1705739923", - leafCount: 8, - viewedLeafCount: 8, - addedAt: 1702602021, - updatedAt: 1703065033, - userRating: 9, - skipCount: 1, - lastRatedAt: 1703881224, - }, - ], + contentType: "", + statusCode: 750686, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 3, + allowSync: true, + art: "/library/metadata/30072/art/1705739923", + identifier: "com.plexapp.plugins.library", + key: "30072", + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + nocache: true, + parentIndex: 1, + parentTitle: "Reacher", + parentYear: 2022, + summary: + "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", + theme: "/library/metadata/30072/theme/1705739923", + thumb: "/library/metadata/30072/thumb/1705739923", + title1: "TV Shows", + title2: "Reacher", + viewGroup: "season", + viewMode: 65593, + directory: [ + { + leafCount: 16, + thumb: "/library/metadata/30072/thumb/1705739923", + viewedLeafCount: 16, + key: "/library/metadata/30072/allLeaves", + title: "All episodes", }, + ], + metadata: [ + { + ratingKey: "66488", + key: "/library/metadata/66488/children", + parentRatingKey: "30072", + guid: "plex://season/652aea6549508477c34c6000", + parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", + parentStudio: "Amazon Studios", + type: "season", + title: "Season 2", + parentKey: "/library/metadata/30072", + parentTitle: "Reacher", + summary: + "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.", + index: 2, + parentIndex: 1, + viewCount: 11, + lastViewedAt: 1705646565, + parentYear: 2022, + thumb: "/library/metadata/66488/thumb/1703065033", + art: "/library/metadata/30072/art/1705739923", + parentThumb: "/library/metadata/30072/thumb/1705739923", + parentTheme: "/library/metadata/30072/theme/1705739923", + leafCount: 8, + viewedLeafCount: 8, + addedAt: 1702602021, + updatedAt: 1703065033, + userRating: 9, + skipCount: 1, + lastRatedAt: 1703881224, + }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getmetadatachildrenresponsebody.md b/docs/sdk/models/operations/getmetadatachildrenresponsebody.md index b81f7251..6db8d3eb 100644 --- a/docs/sdk/models/operations/getmetadatachildrenresponsebody.md +++ b/docs/sdk/models/operations/getmetadatachildrenresponsebody.md @@ -8,71 +8,71 @@ The children of the library item. import { GetMetadataChildrenResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMetadataChildrenResponseBody = { - mediaContainer: { - size: 3, - allowSync: true, - art: "/library/metadata/30072/art/1705739923", - identifier: "com.plexapp.plugins.library", - key: "30072", - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1701731894, - nocache: true, - parentIndex: 1, - parentTitle: "Reacher", - parentYear: 2022, - summary: - "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", - theme: "/library/metadata/30072/theme/1705739923", + mediaContainer: { + size: 3, + allowSync: true, + art: "/library/metadata/30072/art/1705739923", + identifier: "com.plexapp.plugins.library", + key: "30072", + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1701731894, + nocache: true, + parentIndex: 1, + parentTitle: "Reacher", + parentYear: 2022, + summary: + "When retired Military Police Officer Jack Reacher is arrested for a murder he did not commit, he finds himself in the middle of a deadly conspiracy full of dirty cops, shady businessmen, and scheming politicians. With nothing but his wits, he must figure out what is happening in Margrave, Georgia.", + theme: "/library/metadata/30072/theme/1705739923", + thumb: "/library/metadata/30072/thumb/1705739923", + title1: "TV Shows", + title2: "Reacher", + viewGroup: "season", + viewMode: 65593, + directory: [ + { + leafCount: 16, thumb: "/library/metadata/30072/thumb/1705739923", - title1: "TV Shows", - title2: "Reacher", - viewGroup: "season", - viewMode: 65593, - directory: [ - { - leafCount: 16, - thumb: "/library/metadata/30072/thumb/1705739923", - viewedLeafCount: 16, - key: "/library/metadata/30072/allLeaves", - title: "All episodes", - }, - ], - metadata: [ - { - ratingKey: "66488", - key: "/library/metadata/66488/children", - parentRatingKey: "30072", - guid: "plex://season/652aea6549508477c34c6000", - parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", - parentStudio: "Amazon Studios", - type: "season", - title: "Season 2", - parentKey: "/library/metadata/30072", - parentTitle: "Reacher", - summary: - 'Based on"Bad Luck and Trouble," when members of Reacher\'s old military unit start turning up dead, Reacher has just one thing on his mind—revenge.', - index: 2, - parentIndex: 1, - viewCount: 11, - lastViewedAt: 1705646565, - parentYear: 2022, - thumb: "/library/metadata/66488/thumb/1703065033", - art: "/library/metadata/30072/art/1705739923", - parentThumb: "/library/metadata/30072/thumb/1705739923", - parentTheme: "/library/metadata/30072/theme/1705739923", - leafCount: 8, - viewedLeafCount: 8, - addedAt: 1702602021, - updatedAt: 1703065033, - userRating: 9, - skipCount: 1, - lastRatedAt: 1703881224, - }, - ], - }, + viewedLeafCount: 16, + key: "/library/metadata/30072/allLeaves", + title: "All episodes", + }, + ], + metadata: [ + { + ratingKey: "66488", + key: "/library/metadata/66488/children", + parentRatingKey: "30072", + guid: "plex://season/652aea6549508477c34c6000", + parentGuid: "plex://show/5d9c09190aaccd001f8f42f0", + parentStudio: "Amazon Studios", + type: "season", + title: "Season 2", + parentKey: "/library/metadata/30072", + parentTitle: "Reacher", + summary: + "Based on\"Bad Luck and Trouble,\" when members of Reacher's old military unit start turning up dead, Reacher has just one thing on his mind—revenge.", + index: 2, + parentIndex: 1, + viewCount: 11, + lastViewedAt: 1705646565, + parentYear: 2022, + thumb: "/library/metadata/66488/thumb/1703065033", + art: "/library/metadata/30072/art/1705739923", + parentThumb: "/library/metadata/30072/thumb/1705739923", + parentTheme: "/library/metadata/30072/theme/1705739923", + leafCount: 8, + viewedLeafCount: 8, + addedAt: 1702602021, + updatedAt: 1703065033, + userRating: 9, + skipCount: 1, + lastRatedAt: 1703881224, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getmyplexaccountresponse.md b/docs/sdk/models/operations/getmyplexaccountresponse.md index 37464a17..dc1de6ce 100644 --- a/docs/sdk/models/operations/getmyplexaccountresponse.md +++ b/docs/sdk/models/operations/getmyplexaccountresponse.md @@ -6,26 +6,26 @@ import { GetMyPlexAccountResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMyPlexAccountResponse = { - contentType: "", - statusCode: 857946, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - myPlex: { - authToken: "Z5v-PrNASDFpsaCi3CPK7", - username: "example.email@mail.com", - mappingState: "mapped", - signInState: "ok", - publicAddress: "140.20.68.140", - publicPort: 32400, - privateAddress: "10.10.10.47", - privatePort: 32400, - subscriptionFeatures: - "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", - subscriptionState: "Active", - }, + contentType: "", + statusCode: 857946, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + myPlex: { + authToken: "Z5v-PrNASDFpsaCi3CPK7", + username: "example.email@mail.com", + mappingState: "mapped", + signInState: "ok", + publicAddress: "140.20.68.140", + publicPort: 32400, + privateAddress: "10.10.10.47", + privatePort: 32400, + subscriptionFeatures: + "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", + subscriptionState: "Active", }, + }, }; ``` diff --git a/docs/sdk/models/operations/getmyplexaccountresponsebody.md b/docs/sdk/models/operations/getmyplexaccountresponsebody.md index 4b441364..1325e200 100644 --- a/docs/sdk/models/operations/getmyplexaccountresponsebody.md +++ b/docs/sdk/models/operations/getmyplexaccountresponsebody.md @@ -8,19 +8,19 @@ MyPlex Account import { GetMyPlexAccountResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetMyPlexAccountResponseBody = { - myPlex: { - authToken: "Z5v-PrNASDFpsaCi3CPK7", - username: "example.email@mail.com", - mappingState: "mapped", - signInState: "ok", - publicAddress: "140.20.68.140", - publicPort: 32400, - privateAddress: "10.10.10.47", - privatePort: 32400, - subscriptionFeatures: - "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", - subscriptionState: "Active", - }, + myPlex: { + authToken: "Z5v-PrNASDFpsaCi3CPK7", + username: "example.email@mail.com", + mappingState: "mapped", + signInState: "ok", + publicAddress: "140.20.68.140", + publicPort: 32400, + privateAddress: "10.10.10.47", + privatePort: 32400, + subscriptionFeatures: + "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", + subscriptionState: "Active", + }, }; ``` diff --git a/docs/sdk/models/operations/getondeckguids.md b/docs/sdk/models/operations/getondeckguids.md index f3c10d63..4934303c 100644 --- a/docs/sdk/models/operations/getondeckguids.md +++ b/docs/sdk/models/operations/getondeckguids.md @@ -6,7 +6,7 @@ import { GetOnDeckGuids } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckGuids = { - id: "imdb://tt13303712", + id: "imdb://tt13303712", }; ``` diff --git a/docs/sdk/models/operations/getondeckmedia.md b/docs/sdk/models/operations/getondeckmedia.md index 72c05c49..c3033404 100644 --- a/docs/sdk/models/operations/getondeckmedia.md +++ b/docs/sdk/models/operations/getondeckmedia.md @@ -6,58 +6,58 @@ import { GetOnDeckMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckMedia = { - id: 80994, - duration: 420080, - bitrate: 1046, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "1080", - container: "mkv", - videoFrameRate: "PAL", - audioProfile: "lc", - videoProfile: "main", - part: [ + id: 80994, + duration: 420080, + bitrate: 1046, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: "1080", + container: "mkv", + videoFrameRate: "PAL", + audioProfile: "lc", + videoProfile: "main", + part: [ + { + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", + duration: 420080, + file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", }, - ], + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getondeckmediacontainer.md b/docs/sdk/models/operations/getondeckmediacontainer.md index d4909290..d1324110 100644 --- a/docs/sdk/models/operations/getondeckmediacontainer.md +++ b/docs/sdk/models/operations/getondeckmediacontainer.md @@ -6,109 +6,109 @@ import { GetOnDeckMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckMediaContainer = { - size: 16, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + size: 16, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + ratingKey: 49564, + key: "/library/metadata/49564", + parentRatingKey: 49557, + grandparentRatingKey: 49556, + guid: "plex://episode/5ea7d7402e7ab10042e74d4f", + parentGuid: "plex://season/602e754d67f4c8002ce54b3d", + grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", + type: "episode", + title: "Circus", + grandparentKey: "/library/metadata/49556", + parentKey: "/library/metadata/49557", + librarySectionKey: "/library/sections/2", + grandparentTitle: "Bluey (2018)", + parentTitle: "Season 2", + contentRating: "TV-Y", + summary: + "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", + index: 33, + parentIndex: 2, + lastViewedAt: 1681908352, + year: 2018, + thumb: "/library/metadata/49564/thumb/1654258204", + art: "/library/metadata/49556/art/1680939546", + parentThumb: "/library/metadata/49557/thumb/1654258204", + grandparentThumb: "/library/metadata/49556/thumb/1680939546", + grandparentArt: "/library/metadata/49556/art/1680939546", + grandparentTheme: "/library/metadata/49556/theme/1680939546", + duration: 420080, + originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), + addedAt: 1654258196, + updatedAt: 1654258204, + media: [ { - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - ratingKey: 49564, - key: "/library/metadata/49564", - parentRatingKey: 49557, - grandparentRatingKey: 49556, - guid: "plex://episode/5ea7d7402e7ab10042e74d4f", - parentGuid: "plex://season/602e754d67f4c8002ce54b3d", - grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", - type: "episode", - title: "Circus", - grandparentKey: "/library/metadata/49556", - parentKey: "/library/metadata/49557", - librarySectionKey: "/library/sections/2", - grandparentTitle: "Bluey (2018)", - parentTitle: "Season 2", - contentRating: "TV-Y", - summary: - "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", - index: 33, - parentIndex: 2, - lastViewedAt: 1681908352, - year: 2018, - thumb: "/library/metadata/49564/thumb/1654258204", - art: "/library/metadata/49556/art/1680939546", - parentThumb: "/library/metadata/49557/thumb/1654258204", - grandparentThumb: "/library/metadata/49556/thumb/1680939546", - grandparentArt: "/library/metadata/49556/art/1680939546", - grandparentTheme: "/library/metadata/49556/theme/1680939546", - duration: 420080, - originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), - addedAt: 1654258196, - updatedAt: 1654258204, - media: [ + id: 80994, + duration: 420080, + bitrate: 1046, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: "1080", + container: "mkv", + videoFrameRate: "PAL", + audioProfile: "lc", + videoProfile: "main", + part: [ + { + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", + duration: 420080, + file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ { - id: 80994, - duration: 420080, - bitrate: 1046, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "1080", - container: "mkv", - videoFrameRate: "PAL", - audioProfile: "lc", - videoProfile: "main", - part: [ - { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], - }, - ], + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", }, - ], - guids: [ - { - id: "imdb://tt13303712", - }, - ], + ], + }, + ], }, - ], + ], + guids: [ + { + id: "imdb://tt13303712", + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getondeckmetadata.md b/docs/sdk/models/operations/getondeckmetadata.md index ecd527fd..64e45466 100644 --- a/docs/sdk/models/operations/getondeckmetadata.md +++ b/docs/sdk/models/operations/getondeckmetadata.md @@ -6,101 +6,101 @@ import { GetOnDeckMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckMetadata = { - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - ratingKey: 49564, - key: "/library/metadata/49564", - parentRatingKey: 49557, - grandparentRatingKey: 49556, - guid: "plex://episode/5ea7d7402e7ab10042e74d4f", - parentGuid: "plex://season/602e754d67f4c8002ce54b3d", - grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", - type: "episode", - title: "Circus", - grandparentKey: "/library/metadata/49556", - parentKey: "/library/metadata/49557", - librarySectionKey: "/library/sections/2", - grandparentTitle: "Bluey (2018)", - parentTitle: "Season 2", - contentRating: "TV-Y", - summary: - "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", - index: 33, - parentIndex: 2, - lastViewedAt: 1681908352, - year: 2018, - thumb: "/library/metadata/49564/thumb/1654258204", - art: "/library/metadata/49556/art/1680939546", - parentThumb: "/library/metadata/49557/thumb/1654258204", - grandparentThumb: "/library/metadata/49556/thumb/1680939546", - grandparentArt: "/library/metadata/49556/art/1680939546", - grandparentTheme: "/library/metadata/49556/theme/1680939546", - duration: 420080, - originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), - addedAt: 1654258196, - updatedAt: 1654258204, - media: [ + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + ratingKey: 49564, + key: "/library/metadata/49564", + parentRatingKey: 49557, + grandparentRatingKey: 49556, + guid: "plex://episode/5ea7d7402e7ab10042e74d4f", + parentGuid: "plex://season/602e754d67f4c8002ce54b3d", + grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", + type: "episode", + title: "Circus", + grandparentKey: "/library/metadata/49556", + parentKey: "/library/metadata/49557", + librarySectionKey: "/library/sections/2", + grandparentTitle: "Bluey (2018)", + parentTitle: "Season 2", + contentRating: "TV-Y", + summary: + "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", + index: 33, + parentIndex: 2, + lastViewedAt: 1681908352, + year: 2018, + thumb: "/library/metadata/49564/thumb/1654258204", + art: "/library/metadata/49556/art/1680939546", + parentThumb: "/library/metadata/49557/thumb/1654258204", + grandparentThumb: "/library/metadata/49556/thumb/1680939546", + grandparentArt: "/library/metadata/49556/art/1680939546", + grandparentTheme: "/library/metadata/49556/theme/1680939546", + duration: 420080, + originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), + addedAt: 1654258196, + updatedAt: 1654258204, + media: [ + { + id: 80994, + duration: 420080, + bitrate: 1046, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: "1080", + container: "mkv", + videoFrameRate: "PAL", + audioProfile: "lc", + videoProfile: "main", + part: [ { - id: 80994, - duration: 420080, - bitrate: 1046, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "1080", - container: "mkv", - videoFrameRate: "PAL", - audioProfile: "lc", - videoProfile: "main", - part: [ - { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], - }, - ], + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", + duration: 420080, + file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ + { + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", + }, + ], }, - ], - guids: [ - { - id: "imdb://tt13303712", - }, - ], + ], + }, + ], + guids: [ + { + id: "imdb://tt13303712", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getondeckpart.md b/docs/sdk/models/operations/getondeckpart.md index 5ec8bc20..c3169eb7 100644 --- a/docs/sdk/models/operations/getondeckpart.md +++ b/docs/sdk/models/operations/getondeckpart.md @@ -6,40 +6,40 @@ import { GetOnDeckPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckPart = { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", + duration: 420080, + file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ + { + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getondeckresponse.md b/docs/sdk/models/operations/getondeckresponse.md index bf05738b..19395121 100644 --- a/docs/sdk/models/operations/getondeckresponse.md +++ b/docs/sdk/models/operations/getondeckresponse.md @@ -6,118 +6,119 @@ import { GetOnDeckResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckResponse = { - contentType: "", - statusCode: 607831, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 16, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + contentType: "", + statusCode: 607831, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 16, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + ratingKey: 49564, + key: "/library/metadata/49564", + parentRatingKey: 49557, + grandparentRatingKey: 49556, + guid: "plex://episode/5ea7d7402e7ab10042e74d4f", + parentGuid: "plex://season/602e754d67f4c8002ce54b3d", + grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", + type: "episode", + title: "Circus", + grandparentKey: "/library/metadata/49556", + parentKey: "/library/metadata/49557", + librarySectionKey: "/library/sections/2", + grandparentTitle: "Bluey (2018)", + parentTitle: "Season 2", + contentRating: "TV-Y", + summary: + "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", + index: 33, + parentIndex: 2, + lastViewedAt: 1681908352, + year: 2018, + thumb: "/library/metadata/49564/thumb/1654258204", + art: "/library/metadata/49556/art/1680939546", + parentThumb: "/library/metadata/49557/thumb/1654258204", + grandparentThumb: "/library/metadata/49556/thumb/1680939546", + grandparentArt: "/library/metadata/49556/art/1680939546", + grandparentTheme: "/library/metadata/49556/theme/1680939546", + duration: 420080, + originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), + addedAt: 1654258196, + updatedAt: 1654258204, + media: [ + { + id: 80994, + duration: 420080, + bitrate: 1046, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: "1080", + container: "mkv", + videoFrameRate: "PAL", + audioProfile: "lc", + videoProfile: "main", + part: [ { - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - ratingKey: 49564, - key: "/library/metadata/49564", - parentRatingKey: 49557, - grandparentRatingKey: 49556, - guid: "plex://episode/5ea7d7402e7ab10042e74d4f", - parentGuid: "plex://season/602e754d67f4c8002ce54b3d", - grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", - type: "episode", - title: "Circus", - grandparentKey: "/library/metadata/49556", - parentKey: "/library/metadata/49557", - librarySectionKey: "/library/sections/2", - grandparentTitle: "Bluey (2018)", - parentTitle: "Season 2", - contentRating: "TV-Y", - summary: - "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", - index: 33, - parentIndex: 2, - lastViewedAt: 1681908352, - year: 2018, - thumb: "/library/metadata/49564/thumb/1654258204", - art: "/library/metadata/49556/art/1680939546", - parentThumb: "/library/metadata/49557/thumb/1654258204", - grandparentThumb: "/library/metadata/49556/thumb/1680939546", - grandparentArt: "/library/metadata/49556/art/1680939546", - grandparentTheme: "/library/metadata/49556/theme/1680939546", - duration: 420080, - originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), - addedAt: 1654258196, - updatedAt: 1654258204, - media: [ - { - id: 80994, - duration: 420080, - bitrate: 1046, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "1080", - container: "mkv", - videoFrameRate: "PAL", - audioProfile: "lc", - videoProfile: "main", - part: [ - { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], - }, - ], - }, - ], - guids: [ - { - id: "imdb://tt13303712", - }, - ], + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", + duration: 420080, + file: + "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ + { + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", + }, + ], }, - ], + ], + }, + ], + guids: [ + { + id: "imdb://tt13303712", + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getondeckresponsebody.md b/docs/sdk/models/operations/getondeckresponsebody.md index 592a353a..ff6806dc 100644 --- a/docs/sdk/models/operations/getondeckresponsebody.md +++ b/docs/sdk/models/operations/getondeckresponsebody.md @@ -8,111 +8,112 @@ The on Deck content import { GetOnDeckResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckResponseBody = { - mediaContainer: { - size: 16, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ - { - librarySectionID: 2, - librarySectionTitle: "TV Shows", - librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", - ratingKey: 49564, - key: "/library/metadata/49564", - parentRatingKey: 49557, - grandparentRatingKey: 49556, - guid: "plex://episode/5ea7d7402e7ab10042e74d4f", - parentGuid: "plex://season/602e754d67f4c8002ce54b3d", - grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", - type: "episode", - title: "Circus", - grandparentKey: "/library/metadata/49556", - parentKey: "/library/metadata/49557", - librarySectionKey: "/library/sections/2", - grandparentTitle: "Bluey (2018)", - parentTitle: "Season 2", - contentRating: "TV-Y", - summary: - "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", - index: 33, - parentIndex: 2, - lastViewedAt: 1681908352, - year: 2018, - thumb: "/library/metadata/49564/thumb/1654258204", - art: "/library/metadata/49556/art/1680939546", - parentThumb: "/library/metadata/49557/thumb/1654258204", - grandparentThumb: "/library/metadata/49556/thumb/1680939546", - grandparentArt: "/library/metadata/49556/art/1680939546", - grandparentTheme: "/library/metadata/49556/theme/1680939546", + mediaContainer: { + size: 16, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 2, + librarySectionTitle: "TV Shows", + librarySectionUUID: "4bb2521c-8ba9-459b-aaee-8ab8bc35eabd", + ratingKey: 49564, + key: "/library/metadata/49564", + parentRatingKey: 49557, + grandparentRatingKey: 49556, + guid: "plex://episode/5ea7d7402e7ab10042e74d4f", + parentGuid: "plex://season/602e754d67f4c8002ce54b3d", + grandparentGuid: "plex://show/5d9c090e705e7a001e6e94d8", + type: "episode", + title: "Circus", + grandparentKey: "/library/metadata/49556", + parentKey: "/library/metadata/49557", + librarySectionKey: "/library/sections/2", + grandparentTitle: "Bluey (2018)", + parentTitle: "Season 2", + contentRating: "TV-Y", + summary: + "Bluey is the ringmaster in a game of circus with her friends but Hercules wants to play his motorcycle game instead. Luckily Bluey has a solution to keep everyone happy.", + index: 33, + parentIndex: 2, + lastViewedAt: 1681908352, + year: 2018, + thumb: "/library/metadata/49564/thumb/1654258204", + art: "/library/metadata/49556/art/1680939546", + parentThumb: "/library/metadata/49557/thumb/1654258204", + grandparentThumb: "/library/metadata/49556/thumb/1680939546", + grandparentArt: "/library/metadata/49556/art/1680939546", + grandparentTheme: "/library/metadata/49556/theme/1680939546", + duration: 420080, + originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), + addedAt: 1654258196, + updatedAt: 1654258204, + media: [ + { + id: 80994, + duration: 420080, + bitrate: 1046, + width: 1920, + height: 1080, + aspectRatio: 1.78, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: "1080", + container: "mkv", + videoFrameRate: "PAL", + audioProfile: "lc", + videoProfile: "main", + part: [ + { + id: 80994, + key: "/library/parts/80994/1655007810/file.mkv", duration: 420080, - originallyAvailableAt: new Date("2020-10-31T00:00:00Z"), - addedAt: 1654258196, - updatedAt: 1654258204, - media: [ - { - id: 80994, - duration: 420080, - bitrate: 1046, - width: 1920, - height: 1080, - aspectRatio: 1.78, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: "1080", - container: "mkv", - videoFrameRate: "PAL", - audioProfile: "lc", - videoProfile: "main", - part: [ - { - id: 80994, - key: "/library/parts/80994/1655007810/file.mkv", - duration: 420080, - file: "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", - size: 55148931, - audioProfile: "lc", - container: "mkv", - videoProfile: "main", - stream: [ - { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", - }, - ], - }, - ], - }, + file: + "/tvshows/Bluey (2018)/Bluey (2018) - S02E33 - Circus.mkv", + size: 55148931, + audioProfile: "lc", + container: "mkv", + videoProfile: "main", + stream: [ + { + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", + }, ], - guids: [ - { - id: "imdb://tt13303712", - }, - ], - }, + }, + ], + }, ], - }, + guids: [ + { + id: "imdb://tt13303712", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getondeckstream.md b/docs/sdk/models/operations/getondeckstream.md index 58847c52..ef62c84f 100644 --- a/docs/sdk/models/operations/getondeckstream.md +++ b/docs/sdk/models/operations/getondeckstream.md @@ -6,28 +6,28 @@ import { GetOnDeckStream } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetOnDeckStream = { - id: 211234, - streamType: 1, - codec: "hevc", - index: 0, - bitrate: 918, - language: "English", - languageTag: "en", - languageCode: "eng", - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "4:2:0", - codedHeight: 1080, - codedWidth: 1920, - colorRange: "tv", - frameRate: 25, - height: 1080, - level: 120, - profile: "main", - refFrames: 1, - width: 1920, - displayTitle: "1080p (HEVC Main)", - extendedDisplayTitle: "1080p (HEVC Main)", + id: 211234, + streamType: 1, + codec: "hevc", + index: 0, + bitrate: 918, + language: "English", + languageTag: "en", + languageCode: "eng", + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "4:2:0", + codedHeight: 1080, + codedWidth: 1920, + colorRange: "tv", + frameRate: 25, + height: 1080, + level: 120, + profile: "main", + refFrames: 1, + width: 1920, + displayTitle: "1080p (HEVC Main)", + extendedDisplayTitle: "1080p (HEVC Main)", }; ``` diff --git a/docs/sdk/models/operations/getpinauthpincontainer.md b/docs/sdk/models/operations/getpinauthpincontainer.md index 78a24ce2..d238a22c 100644 --- a/docs/sdk/models/operations/getpinauthpincontainer.md +++ b/docs/sdk/models/operations/getpinauthpincontainer.md @@ -8,30 +8,30 @@ Requests a new pin id used in the authentication flow import { GetPinAuthPinContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPinAuthPinContainer = { - id: 308667304, - code: "7RQZ", - product: "0", - trusted: false, - qr: "https://plex.tv/api/v2/pins/qr/7RQZ", - clientIdentifier: "string", - location: { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", - }, - expiresIn: 876, - createdAt: new Date("2024-07-16T17:03:05Z"), - expiresAt: new Date("2024-07-16T17:18:05Z"), - authToken: null, - newRegistration: null, + id: 308667304, + code: "7RQZ", + product: "0", + trusted: false, + qr: "https://plex.tv/api/v2/pins/qr/7RQZ", + clientIdentifier: "string", + location: { + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", + }, + expiresIn: 876, + createdAt: new Date("2024-07-16T17:03:05Z"), + expiresAt: new Date("2024-07-16T17:18:05Z"), + authToken: null, + newRegistration: null, }; ``` diff --git a/docs/sdk/models/operations/getpinrequest.md b/docs/sdk/models/operations/getpinrequest.md index 58c85c79..e2ebf1cb 100644 --- a/docs/sdk/models/operations/getpinrequest.md +++ b/docs/sdk/models/operations/getpinrequest.md @@ -6,7 +6,7 @@ import { GetPinRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPinRequest = { - xPlexProduct: "Plex Web", + xPlexProduct: "Plex Web", }; ``` diff --git a/docs/sdk/models/operations/getpinresponse.md b/docs/sdk/models/operations/getpinresponse.md index dc375f73..eaa478eb 100644 --- a/docs/sdk/models/operations/getpinresponse.md +++ b/docs/sdk/models/operations/getpinresponse.md @@ -6,37 +6,37 @@ import { GetPinResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPinResponse = { - contentType: "", - statusCode: 135218, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - authPinContainer: { - id: 308667304, - code: "7RQZ", - product: "0", - trusted: false, - qr: "https://plex.tv/api/v2/pins/qr/7RQZ", - clientIdentifier: "string", - location: { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", - }, - expiresIn: 876, - createdAt: new Date("2024-07-16T17:03:05Z"), - expiresAt: new Date("2024-07-16T17:18:05Z"), - authToken: null, - newRegistration: null, + contentType: "", + statusCode: 135218, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + authPinContainer: { + id: 308667304, + code: "7RQZ", + product: "0", + trusted: false, + qr: "https://plex.tv/api/v2/pins/qr/7RQZ", + clientIdentifier: "string", + location: { + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", }, + expiresIn: 876, + createdAt: new Date("2024-07-16T17:03:05Z"), + expiresAt: new Date("2024-07-16T17:18:05Z"), + authToken: null, + newRegistration: null, + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentscountry.md b/docs/sdk/models/operations/getplaylistcontentscountry.md index 5a84bdfd..89897747 100644 --- a/docs/sdk/models/operations/getplaylistcontentscountry.md +++ b/docs/sdk/models/operations/getplaylistcontentscountry.md @@ -6,7 +6,7 @@ import { GetPlaylistContentsCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsCountry = { - tag: "United States of America", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsdirector.md b/docs/sdk/models/operations/getplaylistcontentsdirector.md index 5492de75..f52c4bad 100644 --- a/docs/sdk/models/operations/getplaylistcontentsdirector.md +++ b/docs/sdk/models/operations/getplaylistcontentsdirector.md @@ -6,7 +6,7 @@ import { GetPlaylistContentsDirector } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsDirector = { - tag: "Joss Whedon", + tag: "Joss Whedon", }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsgenre.md b/docs/sdk/models/operations/getplaylistcontentsgenre.md index c335a1fc..c7959ef7 100644 --- a/docs/sdk/models/operations/getplaylistcontentsgenre.md +++ b/docs/sdk/models/operations/getplaylistcontentsgenre.md @@ -6,7 +6,7 @@ import { GetPlaylistContentsGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsGenre = { - tag: "Action", + tag: "Action", }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsmedia.md b/docs/sdk/models/operations/getplaylistcontentsmedia.md index 9d3bff49..84f2bdad 100644 --- a/docs/sdk/models/operations/getplaylistcontentsmedia.md +++ b/docs/sdk/models/operations/getplaylistcontentsmedia.md @@ -6,36 +6,36 @@ import { GetPlaylistContentsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsMedia = { - id: 15, - duration: 141416, - bitrate: 2273, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - }, - ], + id: 15, + duration: 141416, + bitrate: 2273, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141416, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md b/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md index 2ccf4a74..533ef68c 100644 --- a/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md +++ b/docs/sdk/models/operations/getplaylistcontentsmediacontainer.md @@ -7,104 +7,104 @@ import { GetPlaylistContentsMediaContainer } from "@lukehagar/plexjs/sdk/models/ import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetPlaylistContentsMediaContainer = { - size: 2, - composite: "/playlists/95/composite/1705717521", - duration: 282, - leafCount: 2, - playlistType: "video", - ratingKey: "95", - smart: true, - title: "Smart Movie Playlist", - metadata: [ + size: 2, + composite: "/playlists/95/composite/1705717521", + duration: 282, + leafCount: 2, + playlistType: "video", + ratingKey: "95", + smart: true, + title: "Smart Movie Playlist", + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + titleSort: "Amazing Spider-Man 2", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141416, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - titleSort: "Amazing Spider-Man 2", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141416, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 15, - duration: 141416, - bitrate: 2273, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Joss Whedon", - }, - ], - writer: [ - { - tag: "Joss Whedon", - }, - ], - role: [ - { - tag: "Gina Torres", - }, - ], + id: 15, + duration: 141416, + bitrate: 2273, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141416, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + }, + ], }, - ], + ], + genre: [ + { + tag: "Action", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Joss Whedon", + }, + ], + writer: [ + { + tag: "Joss Whedon", + }, + ], + role: [ + { + tag: "Gina Torres", + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsmetadata.md b/docs/sdk/models/operations/getplaylistcontentsmetadata.md index 2ab8ae39..b6f1e3ac 100644 --- a/docs/sdk/models/operations/getplaylistcontentsmetadata.md +++ b/docs/sdk/models/operations/getplaylistcontentsmetadata.md @@ -7,92 +7,92 @@ import { GetPlaylistContentsMetadata } from "@lukehagar/plexjs/sdk/models/operat import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetPlaylistContentsMetadata = { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - titleSort: "Amazing Spider-Man 2", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141416, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + titleSort: "Amazing Spider-Man 2", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141416, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141416, + bitrate: 2273, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - id: 15, - duration: 141416, - bitrate: 2273, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - }, - ], + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141416, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", }, - ], - genre: [ - { - tag: "Action", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Joss Whedon", - }, - ], - writer: [ - { - tag: "Joss Whedon", - }, - ], - role: [ - { - tag: "Gina Torres", - }, - ], + ], + }, + ], + genre: [ + { + tag: "Action", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Joss Whedon", + }, + ], + writer: [ + { + tag: "Joss Whedon", + }, + ], + role: [ + { + tag: "Gina Torres", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentspart.md b/docs/sdk/models/operations/getplaylistcontentspart.md index f47b4ba5..ed7805c8 100644 --- a/docs/sdk/models/operations/getplaylistcontentspart.md +++ b/docs/sdk/models/operations/getplaylistcontentspart.md @@ -6,16 +6,16 @@ import { GetPlaylistContentsPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsPart = { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141416, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md b/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md index 409861e9..e83e3b77 100644 --- a/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md +++ b/docs/sdk/models/operations/getplaylistcontentsqueryparamtype.md @@ -13,7 +13,8 @@ E.g. A movie library will not return anything with type 3 as there are no season ```typescript import { GetPlaylistContentsQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetPlaylistContentsQueryParamType = GetPlaylistContentsQueryParamType.Two; +let value: GetPlaylistContentsQueryParamType = + GetPlaylistContentsQueryParamType.Two; ``` ## Values diff --git a/docs/sdk/models/operations/getplaylistcontentsrequest.md b/docs/sdk/models/operations/getplaylistcontentsrequest.md index cfe8412a..30c05947 100644 --- a/docs/sdk/models/operations/getplaylistcontentsrequest.md +++ b/docs/sdk/models/operations/getplaylistcontentsrequest.md @@ -6,8 +6,8 @@ import { GetPlaylistContentsQueryParamType, GetPlaylistContentsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsRequest = { - playlistID: 7783.46, - type: GetPlaylistContentsQueryParamType.Two, + playlistID: 7783.46, + type: GetPlaylistContentsQueryParamType.Two, }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsresponse.md b/docs/sdk/models/operations/getplaylistcontentsresponse.md index dd73a900..e9356f5f 100644 --- a/docs/sdk/models/operations/getplaylistcontentsresponse.md +++ b/docs/sdk/models/operations/getplaylistcontentsresponse.md @@ -7,113 +7,113 @@ import { GetPlaylistContentsResponse } from "@lukehagar/plexjs/sdk/models/operat import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetPlaylistContentsResponse = { - contentType: "", - statusCode: 196582, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 2, - composite: "/playlists/95/composite/1705717521", - duration: 282, - leafCount: 2, - playlistType: "video", - ratingKey: "95", - smart: true, - title: "Smart Movie Playlist", - metadata: [ + contentType: "", + statusCode: 196582, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 2, + composite: "/playlists/95/composite/1705717521", + duration: 282, + leafCount: 2, + playlistType: "video", + ratingKey: "95", + smart: true, + title: "Smart Movie Playlist", + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + titleSort: "Amazing Spider-Man 2", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141416, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141416, + bitrate: 2273, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - titleSort: "Amazing Spider-Man 2", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141416, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 15, - duration: 141416, - bitrate: 2273, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Joss Whedon", - }, - ], - writer: [ - { - tag: "Joss Whedon", - }, - ], - role: [ - { - tag: "Gina Torres", - }, - ], + id: 15, + key: "/library/parts/15/1705637151/file.mp4", + duration: 141416, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", }, - ], + ], + }, + ], + genre: [ + { + tag: "Action", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Joss Whedon", + }, + ], + writer: [ + { + tag: "Joss Whedon", + }, + ], + role: [ + { + tag: "Gina Torres", + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsresponsebody.md b/docs/sdk/models/operations/getplaylistcontentsresponsebody.md index 4bbf02e9..4ffaf4e4 100644 --- a/docs/sdk/models/operations/getplaylistcontentsresponsebody.md +++ b/docs/sdk/models/operations/getplaylistcontentsresponsebody.md @@ -9,106 +9,106 @@ import { GetPlaylistContentsResponseBody } from "@lukehagar/plexjs/sdk/models/op import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetPlaylistContentsResponseBody = { - mediaContainer: { - size: 2, - composite: "/playlists/95/composite/1705717521", - duration: 282, - leafCount: 2, - playlistType: "video", - ratingKey: "95", - smart: true, - title: "Smart Movie Playlist", - metadata: [ - { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - titleSort: "Amazing Spider-Man 2", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - rating: 8.2, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", + mediaContainer: { + size: 2, + composite: "/playlists/95/composite/1705717521", + duration: 282, + leafCount: 2, + playlistType: "video", + ratingKey: "95", + smart: true, + title: "Smart Movie Playlist", + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + titleSort: "Amazing Spider-Man 2", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + rating: 8.2, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141416, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + addedAt: 1705637164, + updatedAt: 1705637165, + audienceRatingImage: "rottentomatoes://image.rating.upright", + hasPremiumExtras: "1", + hasPremiumPrimaryExtra: "1", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 15, + duration: 141416, + bitrate: 2273, + width: 1920, + height: 814, + aspectRatio: 2.35, + audioChannels: 2, + audioCodec: "aac", + videoCodec: "h264", + videoResolution: "1080", + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + audioProfile: "lc", + has64bitOffsets: false, + videoProfile: "high", + part: [ + { + id: 15, + key: "/library/parts/15/1705637151/file.mp4", duration: 141416, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - addedAt: 1705637164, - updatedAt: 1705637165, - audienceRatingImage: "rottentomatoes://image.rating.upright", - hasPremiumExtras: "1", - hasPremiumPrimaryExtra: "1", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 15, - duration: 141416, - bitrate: 2273, - width: 1920, - height: 814, - aspectRatio: 2.35, - audioChannels: 2, - audioCodec: "aac", - videoCodec: "h264", - videoResolution: "1080", - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - audioProfile: "lc", - has64bitOffsets: false, - videoProfile: "high", - part: [ - { - id: 15, - key: "/library/parts/15/1705637151/file.mp4", - duration: 141416, - file: "/movies/Serenity (2005)/Serenity (2005).mp4", - size: 40271948, - audioProfile: "lc", - container: "mp4", - has64bitOffsets: false, - optimizedForStreaming: false, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - director: [ - { - tag: "Joss Whedon", - }, - ], - writer: [ - { - tag: "Joss Whedon", - }, - ], - role: [ - { - tag: "Gina Torres", - }, - ], - }, + file: "/movies/Serenity (2005)/Serenity (2005).mp4", + size: 40271948, + audioProfile: "lc", + container: "mp4", + has64bitOffsets: false, + optimizedForStreaming: false, + videoProfile: "high", + }, + ], + }, ], - }, + genre: [ + { + tag: "Action", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + director: [ + { + tag: "Joss Whedon", + }, + ], + writer: [ + { + tag: "Joss Whedon", + }, + ], + role: [ + { + tag: "Gina Torres", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentsrole.md b/docs/sdk/models/operations/getplaylistcontentsrole.md index 16c3381e..fb2f6443 100644 --- a/docs/sdk/models/operations/getplaylistcontentsrole.md +++ b/docs/sdk/models/operations/getplaylistcontentsrole.md @@ -6,7 +6,7 @@ import { GetPlaylistContentsRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsRole = { - tag: "Gina Torres", + tag: "Gina Torres", }; ``` diff --git a/docs/sdk/models/operations/getplaylistcontentswriter.md b/docs/sdk/models/operations/getplaylistcontentswriter.md index 91da2c1d..6c9b660a 100644 --- a/docs/sdk/models/operations/getplaylistcontentswriter.md +++ b/docs/sdk/models/operations/getplaylistcontentswriter.md @@ -6,7 +6,7 @@ import { GetPlaylistContentsWriter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistContentsWriter = { - tag: "Joss Whedon", + tag: "Joss Whedon", }; ``` diff --git a/docs/sdk/models/operations/getplaylistmediacontainer.md b/docs/sdk/models/operations/getplaylistmediacontainer.md index d847bdb1..21fd79b4 100644 --- a/docs/sdk/models/operations/getplaylistmediacontainer.md +++ b/docs/sdk/models/operations/getplaylistmediacontainer.md @@ -6,27 +6,27 @@ import { GetPlaylistMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistMediaContainer = { - size: 1, - metadata: [ - { - content: - "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", - ratingKey: "95", - key: "/playlists/95/items", - guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", - type: "playlist", - title: "Smart Movie Playlist", - summary: "", - smart: true, - playlistType: "video", - composite: "/playlists/95/composite/1705717387", - icon: "playlist://image.smart", - duration: 282000, - leafCount: 2, - addedAt: 1705716493, - updatedAt: 1705717387, - }, - ], + size: 1, + metadata: [ + { + content: + "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", + ratingKey: "95", + key: "/playlists/95/items", + guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", + type: "playlist", + title: "Smart Movie Playlist", + summary: "", + smart: true, + playlistType: "video", + composite: "/playlists/95/composite/1705717387", + icon: "playlist://image.smart", + duration: 282000, + leafCount: 2, + addedAt: 1705716493, + updatedAt: 1705717387, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getplaylistmetadata.md b/docs/sdk/models/operations/getplaylistmetadata.md index a1fcf218..903ed9a4 100644 --- a/docs/sdk/models/operations/getplaylistmetadata.md +++ b/docs/sdk/models/operations/getplaylistmetadata.md @@ -6,22 +6,22 @@ import { GetPlaylistMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistMetadata = { - content: - "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", - ratingKey: "95", - key: "/playlists/95/items", - guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", - type: "playlist", - title: "Smart Movie Playlist", - summary: "", - smart: true, - playlistType: "video", - composite: "/playlists/95/composite/1705717387", - icon: "playlist://image.smart", - duration: 282000, - leafCount: 2, - addedAt: 1705716493, - updatedAt: 1705717387, + content: + "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", + ratingKey: "95", + key: "/playlists/95/items", + guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", + type: "playlist", + title: "Smart Movie Playlist", + summary: "", + smart: true, + playlistType: "video", + composite: "/playlists/95/composite/1705717387", + icon: "playlist://image.smart", + duration: 282000, + leafCount: 2, + addedAt: 1705716493, + updatedAt: 1705717387, }; ``` diff --git a/docs/sdk/models/operations/getplaylistrequest.md b/docs/sdk/models/operations/getplaylistrequest.md index e630c358..7e933419 100644 --- a/docs/sdk/models/operations/getplaylistrequest.md +++ b/docs/sdk/models/operations/getplaylistrequest.md @@ -6,7 +6,7 @@ import { GetPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistRequest = { - playlistID: 3380.07, + playlistID: 3380.07, }; ``` diff --git a/docs/sdk/models/operations/getplaylistresponse.md b/docs/sdk/models/operations/getplaylistresponse.md index 8dc21753..70d33934 100644 --- a/docs/sdk/models/operations/getplaylistresponse.md +++ b/docs/sdk/models/operations/getplaylistresponse.md @@ -6,36 +6,37 @@ import { GetPlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistResponse = { - contentType: "", - statusCode: 110375, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - metadata: [ - { - content: - "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", - ratingKey: "95", - key: "/playlists/95/items", - guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", - type: "playlist", - title: "Smart Movie Playlist", - summary: "", - smart: true, - playlistType: "video", - composite: "/playlists/95/composite/1705717387", - icon: "playlist://image.smart", - duration: 282000, - leafCount: 2, - addedAt: 1705716493, - updatedAt: 1705717387, - }, - ], + contentType: "", + statusCode: 110375, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + metadata: [ + { + content: + "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", + ratingKey: "95", + key: "/playlists/95/items", + guid: + "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", + type: "playlist", + title: "Smart Movie Playlist", + summary: "", + smart: true, + playlistType: "video", + composite: "/playlists/95/composite/1705717387", + icon: "playlist://image.smart", + duration: 282000, + leafCount: 2, + addedAt: 1705716493, + updatedAt: 1705717387, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistresponsebody.md b/docs/sdk/models/operations/getplaylistresponsebody.md index 2b0a1a94..14c74a16 100644 --- a/docs/sdk/models/operations/getplaylistresponsebody.md +++ b/docs/sdk/models/operations/getplaylistresponsebody.md @@ -8,29 +8,29 @@ The playlist import { GetPlaylistResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistResponseBody = { - mediaContainer: { - size: 1, - metadata: [ - { - content: - "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", - ratingKey: "95", - key: "/playlists/95/items", - guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", - type: "playlist", - title: "Smart Movie Playlist", - summary: "", - smart: true, - playlistType: "video", - composite: "/playlists/95/composite/1705717387", - icon: "playlist://image.smart", - duration: 282000, - leafCount: 2, - addedAt: 1705716493, - updatedAt: 1705717387, - }, - ], - }, + mediaContainer: { + size: 1, + metadata: [ + { + content: + "library://x/directory/%2Flibrary%2Fsections%2F1%2Fall%3Ftype%3D1%26push%3D1%26title%3D2%26or%3D1%26title%3DSerenity%26pop%3D1", + ratingKey: "95", + key: "/playlists/95/items", + guid: "com.plexapp.agents.none://87425529-380f-44b8-a689-9a0537e7ec91", + type: "playlist", + title: "Smart Movie Playlist", + summary: "", + smart: true, + playlistType: "video", + composite: "/playlists/95/composite/1705717387", + icon: "playlist://image.smart", + duration: 282000, + leafCount: 2, + addedAt: 1705716493, + updatedAt: 1705717387, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistsmediacontainer.md b/docs/sdk/models/operations/getplaylistsmediacontainer.md index 502a38e9..dfa14a1e 100644 --- a/docs/sdk/models/operations/getplaylistsmediacontainer.md +++ b/docs/sdk/models/operations/getplaylistsmediacontainer.md @@ -6,27 +6,27 @@ import { GetPlaylistsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistsMediaContainer = { - size: 4, - metadata: [ - { - ratingKey: "92", - key: "/playlists/92/items", - guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", - type: "playlist", - title: "Static Playlist", - summary: "A Great Playlist", - smart: false, - playlistType: "video", - composite: "/playlists/92/composite/1705716440", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705716298, - duration: 7328000, - leafCount: 32, - addedAt: 1705716298, - updatedAt: 1705716440, - }, - ], + size: 4, + metadata: [ + { + ratingKey: "92", + key: "/playlists/92/items", + guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", + type: "playlist", + title: "Static Playlist", + summary: "A Great Playlist", + smart: false, + playlistType: "video", + composite: "/playlists/92/composite/1705716440", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705716298, + duration: 7328000, + leafCount: 32, + addedAt: 1705716298, + updatedAt: 1705716440, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getplaylistsmetadata.md b/docs/sdk/models/operations/getplaylistsmetadata.md index e4273fb2..226c8bb0 100644 --- a/docs/sdk/models/operations/getplaylistsmetadata.md +++ b/docs/sdk/models/operations/getplaylistsmetadata.md @@ -6,22 +6,22 @@ import { GetPlaylistsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistsMetadata = { - ratingKey: "92", - key: "/playlists/92/items", - guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", - type: "playlist", - title: "Static Playlist", - summary: "A Great Playlist", - smart: false, - playlistType: "video", - composite: "/playlists/92/composite/1705716440", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705716298, - duration: 7328000, - leafCount: 32, - addedAt: 1705716298, - updatedAt: 1705716440, + ratingKey: "92", + key: "/playlists/92/items", + guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", + type: "playlist", + title: "Static Playlist", + summary: "A Great Playlist", + smart: false, + playlistType: "video", + composite: "/playlists/92/composite/1705716440", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705716298, + duration: 7328000, + leafCount: 32, + addedAt: 1705716298, + updatedAt: 1705716440, }; ``` diff --git a/docs/sdk/models/operations/getplaylistsresponse.md b/docs/sdk/models/operations/getplaylistsresponse.md index 760a7ab3..1715ba92 100644 --- a/docs/sdk/models/operations/getplaylistsresponse.md +++ b/docs/sdk/models/operations/getplaylistsresponse.md @@ -6,36 +6,37 @@ import { GetPlaylistsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistsResponse = { - contentType: "", - statusCode: 158969, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 4, - metadata: [ - { - ratingKey: "92", - key: "/playlists/92/items", - guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", - type: "playlist", - title: "Static Playlist", - summary: "A Great Playlist", - smart: false, - playlistType: "video", - composite: "/playlists/92/composite/1705716440", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705716298, - duration: 7328000, - leafCount: 32, - addedAt: 1705716298, - updatedAt: 1705716440, - }, - ], + contentType: "", + statusCode: 158969, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 4, + metadata: [ + { + ratingKey: "92", + key: "/playlists/92/items", + guid: + "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", + type: "playlist", + title: "Static Playlist", + summary: "A Great Playlist", + smart: false, + playlistType: "video", + composite: "/playlists/92/composite/1705716440", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705716298, + duration: 7328000, + leafCount: 32, + addedAt: 1705716298, + updatedAt: 1705716440, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getplaylistsresponsebody.md b/docs/sdk/models/operations/getplaylistsresponsebody.md index 0772c058..6f054fde 100644 --- a/docs/sdk/models/operations/getplaylistsresponsebody.md +++ b/docs/sdk/models/operations/getplaylistsresponsebody.md @@ -8,29 +8,29 @@ returns all playlists import { GetPlaylistsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetPlaylistsResponseBody = { - mediaContainer: { - size: 4, - metadata: [ - { - ratingKey: "92", - key: "/playlists/92/items", - guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", - type: "playlist", - title: "Static Playlist", - summary: "A Great Playlist", - smart: false, - playlistType: "video", - composite: "/playlists/92/composite/1705716440", - icon: "playlist://image.smart", - viewCount: 1, - lastViewedAt: 1705716298, - duration: 7328000, - leafCount: 32, - addedAt: 1705716298, - updatedAt: 1705716440, - }, - ], - }, + mediaContainer: { + size: 4, + metadata: [ + { + ratingKey: "92", + key: "/playlists/92/items", + guid: "com.plexapp.agents.none://7ca5aaef-58e8-4828-9e21-c009c97f2903", + type: "playlist", + title: "Static Playlist", + summary: "A Great Playlist", + smart: false, + playlistType: "video", + composite: "/playlists/92/composite/1705716440", + icon: "playlist://image.smart", + viewCount: 1, + lastViewedAt: 1705716298, + duration: 7328000, + leafCount: 32, + addedAt: 1705716298, + updatedAt: 1705716440, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md b/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md index 0701b80e..923c4e79 100644 --- a/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md +++ b/docs/sdk/models/operations/getrecentlyaddedmediacontainer.md @@ -6,95 +6,96 @@ import { GetRecentlyAddedMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRecentlyAddedMediaContainer = { - size: 50, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + size: 50, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + ratingKey: 59398, + key: "/library/metadata/59398", + guid: "plex://movie/5e161a83bea6ac004126e148", + studio: "Marvel Studios", + type: "movie", + title: "Ant-Man and the Wasp: Quantumania", + contentRating: "PG-13", + summary: + "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", + rating: 4.7, + audienceRating: 8.3, + year: 2023, + tagline: "Witness the beginning of a new dynasty.", + thumb: "/library/metadata/59398/thumb/1681888010", + art: "/library/metadata/59398/art/1681888010", + duration: 7474422, + originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), + addedAt: 1681803215, + updatedAt: 1681888010, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/59399", + ratingImage: "rottentomatoes://image.rating.rotten", + media: [ { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - ratingKey: 59398, - key: "/library/metadata/59398", - guid: "plex://movie/5e161a83bea6ac004126e148", - studio: "Marvel Studios", - type: "movie", - title: "Ant-Man and the Wasp: Quantumania", - contentRating: "PG-13", - summary: - "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", - rating: 4.7, - audienceRating: 8.3, - year: 2023, - tagline: "Witness the beginning of a new dynasty.", - thumb: "/library/metadata/59398/thumb/1681888010", - art: "/library/metadata/59398/art/1681888010", - duration: 7474422, - originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), - addedAt: 1681803215, - updatedAt: 1681888010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/59399", - ratingImage: "rottentomatoes://image.rating.rotten", - media: [ - { - id: 120345, - duration: 7474422, - bitrate: 3623, - width: 1920, - height: 804, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "ac3", - videoCodec: "h264", - videoResolution: 1080, - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - videoProfile: "high", - part: [ - { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Comedy", - }, - ], - director: [ - { - tag: "Peyton Reed", - }, - ], - writer: [ - { - tag: "Jeff Loveness", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Paul Rudd", - }, - ], + id: 120345, + duration: 7474422, + bitrate: 3623, + width: 1920, + height: 804, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "ac3", + videoCodec: "h264", + videoResolution: 1080, + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + videoProfile: "high", + part: [ + { + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", + duration: 7474422, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", + }, + ], }, - ], + ], + genre: [ + { + tag: "Comedy", + }, + ], + director: [ + { + tag: "Peyton Reed", + }, + ], + writer: [ + { + tag: "Jeff Loveness", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Paul Rudd", + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getrecentlyaddedmetadata.md b/docs/sdk/models/operations/getrecentlyaddedmetadata.md index 3642d616..6d09d4c9 100644 --- a/docs/sdk/models/operations/getrecentlyaddedmetadata.md +++ b/docs/sdk/models/operations/getrecentlyaddedmetadata.md @@ -6,87 +6,88 @@ import { GetRecentlyAddedMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRecentlyAddedMetadata = { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - ratingKey: 59398, - key: "/library/metadata/59398", - guid: "plex://movie/5e161a83bea6ac004126e148", - studio: "Marvel Studios", - type: "movie", - title: "Ant-Man and the Wasp: Quantumania", - contentRating: "PG-13", - summary: - "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", - rating: 4.7, - audienceRating: 8.3, - year: 2023, - tagline: "Witness the beginning of a new dynasty.", - thumb: "/library/metadata/59398/thumb/1681888010", - art: "/library/metadata/59398/art/1681888010", - duration: 7474422, - originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), - addedAt: 1681803215, - updatedAt: 1681888010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/59399", - ratingImage: "rottentomatoes://image.rating.rotten", - media: [ + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + ratingKey: 59398, + key: "/library/metadata/59398", + guid: "plex://movie/5e161a83bea6ac004126e148", + studio: "Marvel Studios", + type: "movie", + title: "Ant-Man and the Wasp: Quantumania", + contentRating: "PG-13", + summary: + "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", + rating: 4.7, + audienceRating: 8.3, + year: 2023, + tagline: "Witness the beginning of a new dynasty.", + thumb: "/library/metadata/59398/thumb/1681888010", + art: "/library/metadata/59398/art/1681888010", + duration: 7474422, + originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), + addedAt: 1681803215, + updatedAt: 1681888010, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/59399", + ratingImage: "rottentomatoes://image.rating.rotten", + media: [ + { + id: 120345, + duration: 7474422, + bitrate: 3623, + width: 1920, + height: 804, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "ac3", + videoCodec: "h264", + videoResolution: 1080, + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + videoProfile: "high", + part: [ { - id: 120345, - duration: 7474422, - bitrate: 3623, - width: 1920, - height: 804, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "ac3", - videoCodec: "h264", - videoResolution: 1080, - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - videoProfile: "high", - part: [ - { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", - }, - ], + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", + duration: 7474422, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", }, - ], - genre: [ - { - tag: "Comedy", - }, - ], - director: [ - { - tag: "Peyton Reed", - }, - ], - writer: [ - { - tag: "Jeff Loveness", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Paul Rudd", - }, - ], + ], + }, + ], + genre: [ + { + tag: "Comedy", + }, + ], + director: [ + { + tag: "Peyton Reed", + }, + ], + writer: [ + { + tag: "Jeff Loveness", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Paul Rudd", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getrecentlyaddedrequest.md b/docs/sdk/models/operations/getrecentlyaddedrequest.md index 6e1a1989..9f358ffa 100644 --- a/docs/sdk/models/operations/getrecentlyaddedrequest.md +++ b/docs/sdk/models/operations/getrecentlyaddedrequest.md @@ -6,8 +6,8 @@ import { GetRecentlyAddedRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRecentlyAddedRequest = { - xPlexContainerStart: 0, - xPlexContainerSize: 50, + xPlexContainerStart: 0, + xPlexContainerSize: 50, }; ``` diff --git a/docs/sdk/models/operations/getrecentlyaddedresponse.md b/docs/sdk/models/operations/getrecentlyaddedresponse.md index db471292..f97ac040 100644 --- a/docs/sdk/models/operations/getrecentlyaddedresponse.md +++ b/docs/sdk/models/operations/getrecentlyaddedresponse.md @@ -6,104 +6,105 @@ import { GetRecentlyAddedResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRecentlyAddedResponse = { - contentType: "", - statusCode: 359508, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 50, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + contentType: "", + statusCode: 359508, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 50, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + ratingKey: 59398, + key: "/library/metadata/59398", + guid: "plex://movie/5e161a83bea6ac004126e148", + studio: "Marvel Studios", + type: "movie", + title: "Ant-Man and the Wasp: Quantumania", + contentRating: "PG-13", + summary: + "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", + rating: 4.7, + audienceRating: 8.3, + year: 2023, + tagline: "Witness the beginning of a new dynasty.", + thumb: "/library/metadata/59398/thumb/1681888010", + art: "/library/metadata/59398/art/1681888010", + duration: 7474422, + originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), + addedAt: 1681803215, + updatedAt: 1681888010, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/59399", + ratingImage: "rottentomatoes://image.rating.rotten", + media: [ + { + id: 120345, + duration: 7474422, + bitrate: 3623, + width: 1920, + height: 804, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "ac3", + videoCodec: "h264", + videoResolution: 1080, + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + videoProfile: "high", + part: [ { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - ratingKey: 59398, - key: "/library/metadata/59398", - guid: "plex://movie/5e161a83bea6ac004126e148", - studio: "Marvel Studios", - type: "movie", - title: "Ant-Man and the Wasp: Quantumania", - contentRating: "PG-13", - summary: - "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", - rating: 4.7, - audienceRating: 8.3, - year: 2023, - tagline: "Witness the beginning of a new dynasty.", - thumb: "/library/metadata/59398/thumb/1681888010", - art: "/library/metadata/59398/art/1681888010", - duration: 7474422, - originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), - addedAt: 1681803215, - updatedAt: 1681888010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/59399", - ratingImage: "rottentomatoes://image.rating.rotten", - media: [ - { - id: 120345, - duration: 7474422, - bitrate: 3623, - width: 1920, - height: 804, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "ac3", - videoCodec: "h264", - videoResolution: 1080, - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - videoProfile: "high", - part: [ - { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Comedy", - }, - ], - director: [ - { - tag: "Peyton Reed", - }, - ], - writer: [ - { - tag: "Jeff Loveness", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Paul Rudd", - }, - ], + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", + duration: 7474422, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", }, - ], + ], + }, + ], + genre: [ + { + tag: "Comedy", + }, + ], + director: [ + { + tag: "Peyton Reed", + }, + ], + writer: [ + { + tag: "Jeff Loveness", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Paul Rudd", + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md b/docs/sdk/models/operations/getrecentlyaddedresponsebody.md index 0d0b9fe4..74ea43c5 100644 --- a/docs/sdk/models/operations/getrecentlyaddedresponsebody.md +++ b/docs/sdk/models/operations/getrecentlyaddedresponsebody.md @@ -8,97 +8,98 @@ The recently added content import { GetRecentlyAddedResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRecentlyAddedResponseBody = { - mediaContainer: { - size: 50, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ - { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - ratingKey: 59398, - key: "/library/metadata/59398", - guid: "plex://movie/5e161a83bea6ac004126e148", - studio: "Marvel Studios", - type: "movie", - title: "Ant-Man and the Wasp: Quantumania", - contentRating: "PG-13", - summary: - "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", - rating: 4.7, - audienceRating: 8.3, - year: 2023, - tagline: "Witness the beginning of a new dynasty.", - thumb: "/library/metadata/59398/thumb/1681888010", - art: "/library/metadata/59398/art/1681888010", + mediaContainer: { + size: 50, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + ratingKey: 59398, + key: "/library/metadata/59398", + guid: "plex://movie/5e161a83bea6ac004126e148", + studio: "Marvel Studios", + type: "movie", + title: "Ant-Man and the Wasp: Quantumania", + contentRating: "PG-13", + summary: + "Scott Lang and Hope Van Dyne along with Hank Pym and Janet Van Dyne explore the Quantum Realm where they interact with strange creatures and embark on an adventure that goes beyond the limits of what they thought was possible.", + rating: 4.7, + audienceRating: 8.3, + year: 2023, + tagline: "Witness the beginning of a new dynasty.", + thumb: "/library/metadata/59398/thumb/1681888010", + art: "/library/metadata/59398/art/1681888010", + duration: 7474422, + originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), + addedAt: 1681803215, + updatedAt: 1681888010, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/59399", + ratingImage: "rottentomatoes://image.rating.rotten", + media: [ + { + id: 120345, + duration: 7474422, + bitrate: 3623, + width: 1920, + height: 804, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "ac3", + videoCodec: "h264", + videoResolution: 1080, + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + videoProfile: "high", + part: [ + { + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", duration: 7474422, - originallyAvailableAt: new Date("2023-02-15T00:00:00Z"), - addedAt: 1681803215, - updatedAt: 1681888010, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/59399", - ratingImage: "rottentomatoes://image.rating.rotten", - media: [ - { - id: 120345, - duration: 7474422, - bitrate: 3623, - width: 1920, - height: 804, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "ac3", - videoCodec: "h264", - videoResolution: 1080, - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - videoProfile: "high", - part: [ - { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", - }, - ], - }, - ], - genre: [ - { - tag: "Comedy", - }, - ], - director: [ - { - tag: "Peyton Reed", - }, - ], - writer: [ - { - tag: "Jeff Loveness", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Paul Rudd", - }, - ], - }, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", + }, + ], + }, ], - }, + genre: [ + { + tag: "Comedy", + }, + ], + director: [ + { + tag: "Peyton Reed", + }, + ], + writer: [ + { + tag: "Jeff Loveness", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Paul Rudd", + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md b/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md index 11fc6b95..d41ca89f 100644 --- a/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md +++ b/docs/sdk/models/operations/getrefreshlibrarymetadatarequest.md @@ -6,8 +6,8 @@ import { Force, GetRefreshLibraryMetadataRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRefreshLibraryMetadataRequest = { - sectionKey: 9518, - force: Force.One, + sectionKey: 9518, + force: Force.One, }; ``` diff --git a/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md b/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md index 922675bd..5830b338 100644 --- a/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md +++ b/docs/sdk/models/operations/getrefreshlibrarymetadataresponse.md @@ -6,11 +6,11 @@ import { GetRefreshLibraryMetadataResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetRefreshLibraryMetadataResponse = { - contentType: "", - statusCode: 170909, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 170909, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getresizedphotorequest.md b/docs/sdk/models/operations/getresizedphotorequest.md index 679b5629..e2e203d4 100644 --- a/docs/sdk/models/operations/getresizedphotorequest.md +++ b/docs/sdk/models/operations/getresizedphotorequest.md @@ -6,13 +6,13 @@ import { GetResizedPhotoRequest, MinSize, Upscale } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResizedPhotoRequest = { - width: 110, - height: 165, - opacity: 100, - blur: 20, - minSize: MinSize.One, - upscale: Upscale.One, - url: "/library/metadata/49564/thumb/1654258204", + width: 110, + height: 165, + opacity: 100, + blur: 20, + minSize: MinSize.One, + upscale: Upscale.One, + url: "/library/metadata/49564/thumb/1654258204", }; ``` diff --git a/docs/sdk/models/operations/getresizedphotoresponse.md b/docs/sdk/models/operations/getresizedphotoresponse.md index f7324e42..498b7607 100644 --- a/docs/sdk/models/operations/getresizedphotoresponse.md +++ b/docs/sdk/models/operations/getresizedphotoresponse.md @@ -6,11 +6,11 @@ import { GetResizedPhotoResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResizedPhotoResponse = { - contentType: "", - statusCode: 384382, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 384382, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md b/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md index cf7514d6..aa1f4bc7 100644 --- a/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md +++ b/docs/sdk/models/operations/getresourcesstatisticsmediacontainer.md @@ -6,17 +6,17 @@ import { GetResourcesStatisticsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResourcesStatisticsMediaContainer = { - size: 5497, - statisticsResources: [ - { - timespan: 6, - at: 1718384427, - hostCpuUtilization: 1.276, - processCpuUtilization: 0.025, - hostMemoryUtilization: 17.026, - processMemoryUtilization: 0.493, - }, - ], + size: 5497, + statisticsResources: [ + { + timespan: 6, + at: 1718384427, + hostCpuUtilization: 1.276, + processCpuUtilization: 0.025, + hostMemoryUtilization: 17.026, + processMemoryUtilization: 0.493, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getresourcesstatisticsrequest.md b/docs/sdk/models/operations/getresourcesstatisticsrequest.md index 69bc1da4..18adc7e3 100644 --- a/docs/sdk/models/operations/getresourcesstatisticsrequest.md +++ b/docs/sdk/models/operations/getresourcesstatisticsrequest.md @@ -6,7 +6,7 @@ import { GetResourcesStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResourcesStatisticsRequest = { - timespan: 4, + timespan: 4, }; ``` diff --git a/docs/sdk/models/operations/getresourcesstatisticsresponse.md b/docs/sdk/models/operations/getresourcesstatisticsresponse.md index 802ad68e..43847521 100644 --- a/docs/sdk/models/operations/getresourcesstatisticsresponse.md +++ b/docs/sdk/models/operations/getresourcesstatisticsresponse.md @@ -6,26 +6,26 @@ import { GetResourcesStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResourcesStatisticsResponse = { - contentType: "", - statusCode: 523248, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 5497, - statisticsResources: [ - { - timespan: 6, - at: 1718384427, - hostCpuUtilization: 1.276, - processCpuUtilization: 0.025, - hostMemoryUtilization: 17.026, - processMemoryUtilization: 0.493, - }, - ], + contentType: "", + statusCode: 523248, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 5497, + statisticsResources: [ + { + timespan: 6, + at: 1718384427, + hostCpuUtilization: 1.276, + processCpuUtilization: 0.025, + hostMemoryUtilization: 17.026, + processMemoryUtilization: 0.493, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md b/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md index 316a5741..0719ca66 100644 --- a/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md +++ b/docs/sdk/models/operations/getresourcesstatisticsresponsebody.md @@ -8,19 +8,19 @@ Resource Statistics import { GetResourcesStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetResourcesStatisticsResponseBody = { - mediaContainer: { - size: 5497, - statisticsResources: [ - { - timespan: 6, - at: 1718384427, - hostCpuUtilization: 1.276, - processCpuUtilization: 0.025, - hostMemoryUtilization: 17.026, - processMemoryUtilization: 0.493, - }, - ], - }, + mediaContainer: { + size: 5497, + statisticsResources: [ + { + timespan: 6, + at: 1718384427, + hostCpuUtilization: 1.276, + processCpuUtilization: 0.025, + hostMemoryUtilization: 17.026, + processMemoryUtilization: 0.493, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getsearchlibrarymediacontainer.md b/docs/sdk/models/operations/getsearchlibrarymediacontainer.md index 2d58873f..94f88183 100644 --- a/docs/sdk/models/operations/getsearchlibrarymediacontainer.md +++ b/docs/sdk/models/operations/getsearchlibrarymediacontainer.md @@ -6,43 +6,43 @@ import { GetSearchLibraryMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchLibraryMediaContainer = { - size: 2, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Shows", - title2: "Search for ''", - viewGroup: "season", - viewMode: 65593, - metadata: [ - { - ratingKey: "2", - key: "/library/metadata/2/children", - parentRatingKey: "1", - guid: "plex://season/602e67e766dfdb002c0a1b5b", - parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", - parentStudio: "Mutant Enemy Productions", - type: "season", - title: "Season 1", - parentKey: "/library/metadata/1", - parentTitle: "Firefly", - summary: - "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", - index: 1, - parentIndex: 1, - parentYear: 2002, - thumb: "/library/metadata/2/thumb/1705636920", - art: "/library/metadata/1/art/1705636920", - parentThumb: "/library/metadata/1/thumb/1705636920", - parentTheme: "/library/metadata/1/theme/1705636920", - addedAt: 1705636916, - updatedAt: 1705636920, - }, - ], + size: 2, + allowSync: false, + art: "/:/resources/show-fanart.jpg", + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + nocache: true, + thumb: "/:/resources/show.png", + title1: "TV Shows", + title2: "Search for ''", + viewGroup: "season", + viewMode: 65593, + metadata: [ + { + ratingKey: "2", + key: "/library/metadata/2/children", + parentRatingKey: "1", + guid: "plex://season/602e67e766dfdb002c0a1b5b", + parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", + parentStudio: "Mutant Enemy Productions", + type: "season", + title: "Season 1", + parentKey: "/library/metadata/1", + parentTitle: "Firefly", + summary: + "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", + index: 1, + parentIndex: 1, + parentYear: 2002, + thumb: "/library/metadata/2/thumb/1705636920", + art: "/library/metadata/1/art/1705636920", + parentThumb: "/library/metadata/1/thumb/1705636920", + parentTheme: "/library/metadata/1/theme/1705636920", + addedAt: 1705636916, + updatedAt: 1705636920, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsearchlibrarymetadata.md b/docs/sdk/models/operations/getsearchlibrarymetadata.md index 8e4b8073..47d091e2 100644 --- a/docs/sdk/models/operations/getsearchlibrarymetadata.md +++ b/docs/sdk/models/operations/getsearchlibrarymetadata.md @@ -6,27 +6,27 @@ import { GetSearchLibraryMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchLibraryMetadata = { - ratingKey: "2", - key: "/library/metadata/2/children", - parentRatingKey: "1", - guid: "plex://season/602e67e766dfdb002c0a1b5b", - parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", - parentStudio: "Mutant Enemy Productions", - type: "season", - title: "Season 1", - parentKey: "/library/metadata/1", - parentTitle: "Firefly", - summary: - "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", - index: 1, - parentIndex: 1, - parentYear: 2002, - thumb: "/library/metadata/2/thumb/1705636920", - art: "/library/metadata/1/art/1705636920", - parentThumb: "/library/metadata/1/thumb/1705636920", - parentTheme: "/library/metadata/1/theme/1705636920", - addedAt: 1705636916, - updatedAt: 1705636920, + ratingKey: "2", + key: "/library/metadata/2/children", + parentRatingKey: "1", + guid: "plex://season/602e67e766dfdb002c0a1b5b", + parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", + parentStudio: "Mutant Enemy Productions", + type: "season", + title: "Season 1", + parentKey: "/library/metadata/1", + parentTitle: "Firefly", + summary: + "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", + index: 1, + parentIndex: 1, + parentYear: 2002, + thumb: "/library/metadata/2/thumb/1705636920", + art: "/library/metadata/1/art/1705636920", + parentThumb: "/library/metadata/1/thumb/1705636920", + parentTheme: "/library/metadata/1/theme/1705636920", + addedAt: 1705636916, + updatedAt: 1705636920, }; ``` diff --git a/docs/sdk/models/operations/getsearchlibraryrequest.md b/docs/sdk/models/operations/getsearchlibraryrequest.md index 01a9826a..2f611679 100644 --- a/docs/sdk/models/operations/getsearchlibraryrequest.md +++ b/docs/sdk/models/operations/getsearchlibraryrequest.md @@ -6,8 +6,8 @@ import { GetSearchLibraryRequest, QueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchLibraryRequest = { - sectionKey: 9518, - type: QueryParamType.Two, + sectionKey: 9518, + type: QueryParamType.Two, }; ``` diff --git a/docs/sdk/models/operations/getsearchlibraryresponse.md b/docs/sdk/models/operations/getsearchlibraryresponse.md index 0cf87d2a..1b428102 100644 --- a/docs/sdk/models/operations/getsearchlibraryresponse.md +++ b/docs/sdk/models/operations/getsearchlibraryresponse.md @@ -6,52 +6,52 @@ import { GetSearchLibraryResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchLibraryResponse = { - contentType: "", - statusCode: 210382, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 2, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Shows", - title2: "Search for ''", - viewGroup: "season", - viewMode: 65593, - metadata: [ - { - ratingKey: "2", - key: "/library/metadata/2/children", - parentRatingKey: "1", - guid: "plex://season/602e67e766dfdb002c0a1b5b", - parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", - parentStudio: "Mutant Enemy Productions", - type: "season", - title: "Season 1", - parentKey: "/library/metadata/1", - parentTitle: "Firefly", - summary: - "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", - index: 1, - parentIndex: 1, - parentYear: 2002, - thumb: "/library/metadata/2/thumb/1705636920", - art: "/library/metadata/1/art/1705636920", - parentThumb: "/library/metadata/1/thumb/1705636920", - parentTheme: "/library/metadata/1/theme/1705636920", - addedAt: 1705636916, - updatedAt: 1705636920, - }, - ], + contentType: "", + statusCode: 210382, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 2, + allowSync: false, + art: "/:/resources/show-fanart.jpg", + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + nocache: true, + thumb: "/:/resources/show.png", + title1: "TV Shows", + title2: "Search for ''", + viewGroup: "season", + viewMode: 65593, + metadata: [ + { + ratingKey: "2", + key: "/library/metadata/2/children", + parentRatingKey: "1", + guid: "plex://season/602e67e766dfdb002c0a1b5b", + parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", + parentStudio: "Mutant Enemy Productions", + type: "season", + title: "Season 1", + parentKey: "/library/metadata/1", + parentTitle: "Firefly", + summary: + "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", + index: 1, + parentIndex: 1, + parentYear: 2002, + thumb: "/library/metadata/2/thumb/1705636920", + art: "/library/metadata/1/art/1705636920", + parentThumb: "/library/metadata/1/thumb/1705636920", + parentTheme: "/library/metadata/1/theme/1705636920", + addedAt: 1705636916, + updatedAt: 1705636920, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getsearchlibraryresponsebody.md b/docs/sdk/models/operations/getsearchlibraryresponsebody.md index 8f5c9ab8..e08143f7 100644 --- a/docs/sdk/models/operations/getsearchlibraryresponsebody.md +++ b/docs/sdk/models/operations/getsearchlibraryresponsebody.md @@ -8,45 +8,45 @@ The contents of the library by section and type import { GetSearchLibraryResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchLibraryResponseBody = { - mediaContainer: { - size: 2, - allowSync: false, - art: "/:/resources/show-fanart.jpg", - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - nocache: true, - thumb: "/:/resources/show.png", - title1: "TV Shows", - title2: "Search for ''", - viewGroup: "season", - viewMode: 65593, - metadata: [ - { - ratingKey: "2", - key: "/library/metadata/2/children", - parentRatingKey: "1", - guid: "plex://season/602e67e766dfdb002c0a1b5b", - parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", - parentStudio: "Mutant Enemy Productions", - type: "season", - title: "Season 1", - parentKey: "/library/metadata/1", - parentTitle: "Firefly", - summary: - "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", - index: 1, - parentIndex: 1, - parentYear: 2002, - thumb: "/library/metadata/2/thumb/1705636920", - art: "/library/metadata/1/art/1705636920", - parentThumb: "/library/metadata/1/thumb/1705636920", - parentTheme: "/library/metadata/1/theme/1705636920", - addedAt: 1705636916, - updatedAt: 1705636920, - }, - ], - }, + mediaContainer: { + size: 2, + allowSync: false, + art: "/:/resources/show-fanart.jpg", + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + nocache: true, + thumb: "/:/resources/show.png", + title1: "TV Shows", + title2: "Search for ''", + viewGroup: "season", + viewMode: 65593, + metadata: [ + { + ratingKey: "2", + key: "/library/metadata/2/children", + parentRatingKey: "1", + guid: "plex://season/602e67e766dfdb002c0a1b5b", + parentGuid: "plex://show/5d9c086c7d06d9001ffd27aa", + parentStudio: "Mutant Enemy Productions", + type: "season", + title: "Season 1", + parentKey: "/library/metadata/1", + parentTitle: "Firefly", + summary: + "Captain Malcolm 'Mal' Reynolds is a former galactic war veteran who is the captain of the transport ship \"Serenity\". Mal and his crew, ensign Zoe Alleyne Washburne; Zoe's husband, pilot Hoban 'Wash' Washburne; muscular mercenary Jayne Cobb; young mechanic Kaylee Frye; former Alliance medical officer Simon Tam; his disturbed teenage sister River (both on the run from the interplanetary government \"The Alliance\"); the beautiful courtesan Inara Serra; and preacher Shepherd Book do any jobs, legal or illegal, they can find as the Serenity crew travels across the outskirts of outer space.", + index: 1, + parentIndex: 1, + parentYear: 2002, + thumb: "/library/metadata/2/thumb/1705636920", + art: "/library/metadata/1/art/1705636920", + parentThumb: "/library/metadata/1/thumb/1705636920", + parentTheme: "/library/metadata/1/theme/1705636920", + addedAt: 1705636916, + updatedAt: 1705636920, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getsearchresultscountry.md b/docs/sdk/models/operations/getsearchresultscountry.md index eb552625..6517f92d 100644 --- a/docs/sdk/models/operations/getsearchresultscountry.md +++ b/docs/sdk/models/operations/getsearchresultscountry.md @@ -6,7 +6,7 @@ import { GetSearchResultsCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsCountry = { - tag: "United States of America", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsdirector.md b/docs/sdk/models/operations/getsearchresultsdirector.md index d13d0d0e..de699901 100644 --- a/docs/sdk/models/operations/getsearchresultsdirector.md +++ b/docs/sdk/models/operations/getsearchresultsdirector.md @@ -6,7 +6,7 @@ import { GetSearchResultsDirector } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsDirector = { - tag: "Brian De Palma", + tag: "Brian De Palma", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsgenre.md b/docs/sdk/models/operations/getsearchresultsgenre.md index c613ffc4..bb8b479e 100644 --- a/docs/sdk/models/operations/getsearchresultsgenre.md +++ b/docs/sdk/models/operations/getsearchresultsgenre.md @@ -6,7 +6,7 @@ import { GetSearchResultsGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsGenre = { - tag: "Action", + tag: "Action", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsmedia.md b/docs/sdk/models/operations/getsearchresultsmedia.md index 0a458d83..1eaf347a 100644 --- a/docs/sdk/models/operations/getsearchresultsmedia.md +++ b/docs/sdk/models/operations/getsearchresultsmedia.md @@ -6,32 +6,33 @@ import { GetSearchResultsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsMedia = { - id: 26610, - duration: 6612628, - bitrate: 4751, - width: 1916, - height: 796, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: 1080, - container: "mkv", - videoFrameRate: "24p", - audioProfile: "lc", - videoProfile: "main 10", - part: [ - { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", - }, - ], + id: 26610, + duration: 6612628, + bitrate: 4751, + width: 1916, + height: 796, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: 1080, + container: "mkv", + videoFrameRate: "24p", + audioProfile: "lc", + videoProfile: "main 10", + part: [ + { + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", + duration: 6612628, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsmediacontainer.md b/docs/sdk/models/operations/getsearchresultsmediacontainer.md index fab02eba..4d8e98b0 100644 --- a/docs/sdk/models/operations/getsearchresultsmediacontainer.md +++ b/docs/sdk/models/operations/getsearchresultsmediacontainer.md @@ -6,103 +6,104 @@ import { GetSearchResultsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsMediaContainer = { - size: 26, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + size: 26, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + sourceTitle: "Hera", + ratingKey: 10398, + key: "/library/metadata/10398", + guid: "plex://movie/5d7768284de0ee001fcc8f52", + studio: "Paramount", + type: "movie", + title: "Mission: Impossible", + contentRating: "PG-13", + summary: + "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", + rating: 6.6, + audienceRating: 7.1, + year: 1996, + tagline: "Expect the impossible.", + thumb: "/library/metadata/10398/thumb/1679505055", + art: "/library/metadata/10398/art/1679505055", + duration: 6612628, + originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), + addedAt: 1589234571, + updatedAt: 1679505055, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/10501", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - sourceTitle: "Hera", - ratingKey: 10398, - key: "/library/metadata/10398", - guid: "plex://movie/5d7768284de0ee001fcc8f52", - studio: "Paramount", - type: "movie", - title: "Mission: Impossible", - contentRating: "PG-13", - summary: - "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", - rating: 6.6, - audienceRating: 7.1, - year: 1996, - tagline: "Expect the impossible.", - thumb: "/library/metadata/10398/thumb/1679505055", - art: "/library/metadata/10398/art/1679505055", - duration: 6612628, - originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), - addedAt: 1589234571, - updatedAt: 1679505055, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/10501", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 26610, - duration: 6612628, - bitrate: 4751, - width: 1916, - height: 796, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: 1080, - container: "mkv", - videoFrameRate: "24p", - audioProfile: "lc", - videoProfile: "main 10", - part: [ - { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - director: [ - { - tag: "Brian De Palma", - }, - ], - writer: [ - { - tag: "David Koepp", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Tom Cruise", - }, - ], + id: 26610, + duration: 6612628, + bitrate: 4751, + width: 1916, + height: 796, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: 1080, + container: "mkv", + videoFrameRate: "24p", + audioProfile: "lc", + videoProfile: "main 10", + part: [ + { + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", + duration: 6612628, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", + }, + ], }, - ], - provider: [ + ], + genre: [ { - key: "/system/search", - title: "Local Network", - type: "mixed", + tag: "Action", }, - ], + ], + director: [ + { + tag: "Brian De Palma", + }, + ], + writer: [ + { + tag: "David Koepp", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Tom Cruise", + }, + ], + }, + ], + provider: [ + { + key: "/system/search", + title: "Local Network", + type: "mixed", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsmetadata.md b/docs/sdk/models/operations/getsearchresultsmetadata.md index c736a84e..83cd8ead 100644 --- a/docs/sdk/models/operations/getsearchresultsmetadata.md +++ b/docs/sdk/models/operations/getsearchresultsmetadata.md @@ -6,88 +6,89 @@ import { GetSearchResultsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsMetadata = { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - sourceTitle: "Hera", - ratingKey: 10398, - key: "/library/metadata/10398", - guid: "plex://movie/5d7768284de0ee001fcc8f52", - studio: "Paramount", - type: "movie", - title: "Mission: Impossible", - contentRating: "PG-13", - summary: - "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", - rating: 6.6, - audienceRating: 7.1, - year: 1996, - tagline: "Expect the impossible.", - thumb: "/library/metadata/10398/thumb/1679505055", - art: "/library/metadata/10398/art/1679505055", - duration: 6612628, - originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), - addedAt: 1589234571, - updatedAt: 1679505055, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/10501", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + sourceTitle: "Hera", + ratingKey: 10398, + key: "/library/metadata/10398", + guid: "plex://movie/5d7768284de0ee001fcc8f52", + studio: "Paramount", + type: "movie", + title: "Mission: Impossible", + contentRating: "PG-13", + summary: + "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", + rating: 6.6, + audienceRating: 7.1, + year: 1996, + tagline: "Expect the impossible.", + thumb: "/library/metadata/10398/thumb/1679505055", + art: "/library/metadata/10398/art/1679505055", + duration: 6612628, + originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), + addedAt: 1589234571, + updatedAt: 1679505055, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/10501", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 26610, + duration: 6612628, + bitrate: 4751, + width: 1916, + height: 796, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: 1080, + container: "mkv", + videoFrameRate: "24p", + audioProfile: "lc", + videoProfile: "main 10", + part: [ { - id: 26610, - duration: 6612628, - bitrate: 4751, - width: 1916, - height: 796, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: 1080, - container: "mkv", - videoFrameRate: "24p", - audioProfile: "lc", - videoProfile: "main 10", - part: [ - { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", - }, - ], + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", + duration: 6612628, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", }, - ], - genre: [ - { - tag: "Action", - }, - ], - director: [ - { - tag: "Brian De Palma", - }, - ], - writer: [ - { - tag: "David Koepp", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Tom Cruise", - }, - ], + ], + }, + ], + genre: [ + { + tag: "Action", + }, + ], + director: [ + { + tag: "Brian De Palma", + }, + ], + writer: [ + { + tag: "David Koepp", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Tom Cruise", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsearchresultspart.md b/docs/sdk/models/operations/getsearchresultspart.md index a8d71077..52a2293b 100644 --- a/docs/sdk/models/operations/getsearchresultspart.md +++ b/docs/sdk/models/operations/getsearchresultspart.md @@ -6,14 +6,15 @@ import { GetSearchResultsPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsPart = { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", + duration: 6612628, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsrequest.md b/docs/sdk/models/operations/getsearchresultsrequest.md index 7e592c6d..cbfffe3a 100644 --- a/docs/sdk/models/operations/getsearchresultsrequest.md +++ b/docs/sdk/models/operations/getsearchresultsrequest.md @@ -6,7 +6,7 @@ import { GetSearchResultsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsRequest = { - query: "110", + query: "110", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsresponse.md b/docs/sdk/models/operations/getsearchresultsresponse.md index e0e555b1..9f26e8ee 100644 --- a/docs/sdk/models/operations/getsearchresultsresponse.md +++ b/docs/sdk/models/operations/getsearchresultsresponse.md @@ -6,112 +6,113 @@ import { GetSearchResultsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsResponse = { - contentType: "", - statusCode: 681820, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 26, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ + contentType: "", + statusCode: 681820, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 26, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + sourceTitle: "Hera", + ratingKey: 10398, + key: "/library/metadata/10398", + guid: "plex://movie/5d7768284de0ee001fcc8f52", + studio: "Paramount", + type: "movie", + title: "Mission: Impossible", + contentRating: "PG-13", + summary: + "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", + rating: 6.6, + audienceRating: 7.1, + year: 1996, + tagline: "Expect the impossible.", + thumb: "/library/metadata/10398/thumb/1679505055", + art: "/library/metadata/10398/art/1679505055", + duration: 6612628, + originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), + addedAt: 1589234571, + updatedAt: 1679505055, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/10501", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 26610, + duration: 6612628, + bitrate: 4751, + width: 1916, + height: 796, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: 1080, + container: "mkv", + videoFrameRate: "24p", + audioProfile: "lc", + videoProfile: "main 10", + part: [ { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - sourceTitle: "Hera", - ratingKey: 10398, - key: "/library/metadata/10398", - guid: "plex://movie/5d7768284de0ee001fcc8f52", - studio: "Paramount", - type: "movie", - title: "Mission: Impossible", - contentRating: "PG-13", - summary: - "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", - rating: 6.6, - audienceRating: 7.1, - year: 1996, - tagline: "Expect the impossible.", - thumb: "/library/metadata/10398/thumb/1679505055", - art: "/library/metadata/10398/art/1679505055", - duration: 6612628, - originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), - addedAt: 1589234571, - updatedAt: 1679505055, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/10501", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 26610, - duration: 6612628, - bitrate: 4751, - width: 1916, - height: 796, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: 1080, - container: "mkv", - videoFrameRate: "24p", - audioProfile: "lc", - videoProfile: "main 10", - part: [ - { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - director: [ - { - tag: "Brian De Palma", - }, - ], - writer: [ - { - tag: "David Koepp", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Tom Cruise", - }, - ], + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", + duration: 6612628, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", }, - ], - provider: [ - { - key: "/system/search", - title: "Local Network", - type: "mixed", - }, - ], + ], + }, + ], + genre: [ + { + tag: "Action", + }, + ], + director: [ + { + tag: "Brian De Palma", + }, + ], + writer: [ + { + tag: "David Koepp", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Tom Cruise", + }, + ], }, + ], + provider: [ + { + key: "/system/search", + title: "Local Network", + type: "mixed", + }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsresponsebody.md b/docs/sdk/models/operations/getsearchresultsresponsebody.md index 1fb0c5e2..65df7b56 100644 --- a/docs/sdk/models/operations/getsearchresultsresponsebody.md +++ b/docs/sdk/models/operations/getsearchresultsresponsebody.md @@ -8,105 +8,106 @@ Search Results import { GetSearchResultsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsResponseBody = { - mediaContainer: { - size: 26, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1680021154, - metadata: [ - { - librarySectionID: 1, - librarySectionTitle: "Movies", - librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", - sourceTitle: "Hera", - ratingKey: 10398, - key: "/library/metadata/10398", - guid: "plex://movie/5d7768284de0ee001fcc8f52", - studio: "Paramount", - type: "movie", - title: "Mission: Impossible", - contentRating: "PG-13", - summary: - "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", - rating: 6.6, - audienceRating: 7.1, - year: 1996, - tagline: "Expect the impossible.", - thumb: "/library/metadata/10398/thumb/1679505055", - art: "/library/metadata/10398/art/1679505055", + mediaContainer: { + size: 26, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1680021154, + metadata: [ + { + librarySectionID: 1, + librarySectionTitle: "Movies", + librarySectionUUID: "322a231a-b7f7-49f5-920f-14c61199cd30", + sourceTitle: "Hera", + ratingKey: 10398, + key: "/library/metadata/10398", + guid: "plex://movie/5d7768284de0ee001fcc8f52", + studio: "Paramount", + type: "movie", + title: "Mission: Impossible", + contentRating: "PG-13", + summary: + "When Ethan Hunt the leader of a crack espionage team whose perilous operation has gone awry with no explanation discovers that a mole has penetrated the CIA he's surprised to learn that he's the No. 1 suspect. To clear his name Hunt now must ferret out the real double agent and in the process even the score.", + rating: 6.6, + audienceRating: 7.1, + year: 1996, + tagline: "Expect the impossible.", + thumb: "/library/metadata/10398/thumb/1679505055", + art: "/library/metadata/10398/art/1679505055", + duration: 6612628, + originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), + addedAt: 1589234571, + updatedAt: 1679505055, + audienceRatingImage: "rottentomatoes://image.rating.upright", + chapterSource: "media", + primaryExtraKey: "/library/metadata/10501", + ratingImage: "rottentomatoes://image.rating.ripe", + media: [ + { + id: 26610, + duration: 6612628, + bitrate: 4751, + width: 1916, + height: 796, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "aac", + videoCodec: "hevc", + videoResolution: 1080, + container: "mkv", + videoFrameRate: "24p", + audioProfile: "lc", + videoProfile: "main 10", + part: [ + { + id: 26610, + key: "/library/parts/26610/1589234571/file.mkv", duration: 6612628, - originallyAvailableAt: new Date("1996-05-22T00:00:00Z"), - addedAt: 1589234571, - updatedAt: 1679505055, - audienceRatingImage: "rottentomatoes://image.rating.upright", - chapterSource: "media", - primaryExtraKey: "/library/metadata/10501", - ratingImage: "rottentomatoes://image.rating.ripe", - media: [ - { - id: 26610, - duration: 6612628, - bitrate: 4751, - width: 1916, - height: 796, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "aac", - videoCodec: "hevc", - videoResolution: 1080, - container: "mkv", - videoFrameRate: "24p", - audioProfile: "lc", - videoProfile: "main 10", - part: [ - { - id: 26610, - key: "/library/parts/26610/1589234571/file.mkv", - duration: 6612628, - file: "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", - size: 3926903851, - audioProfile: "lc", - container: "mkv", - videoProfile: "main 10", - }, - ], - }, - ], - genre: [ - { - tag: "Action", - }, - ], - director: [ - { - tag: "Brian De Palma", - }, - ], - writer: [ - { - tag: "David Koepp", - }, - ], - country: [ - { - tag: "United States of America", - }, - ], - role: [ - { - tag: "Tom Cruise", - }, - ], - }, + file: + "/movies/Mission Impossible (1996)/Mission Impossible (1996) Bluray-1080p.mkv", + size: 3926903851, + audioProfile: "lc", + container: "mkv", + videoProfile: "main 10", + }, + ], + }, ], - provider: [ - { - key: "/system/search", - title: "Local Network", - type: "mixed", - }, + genre: [ + { + tag: "Action", + }, ], - }, + director: [ + { + tag: "Brian De Palma", + }, + ], + writer: [ + { + tag: "David Koepp", + }, + ], + country: [ + { + tag: "United States of America", + }, + ], + role: [ + { + tag: "Tom Cruise", + }, + ], + }, + ], + provider: [ + { + key: "/system/search", + title: "Local Network", + type: "mixed", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getsearchresultsrole.md b/docs/sdk/models/operations/getsearchresultsrole.md index 7b08374c..a02a9756 100644 --- a/docs/sdk/models/operations/getsearchresultsrole.md +++ b/docs/sdk/models/operations/getsearchresultsrole.md @@ -6,7 +6,7 @@ import { GetSearchResultsRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsRole = { - tag: "Tom Cruise", + tag: "Tom Cruise", }; ``` diff --git a/docs/sdk/models/operations/getsearchresultswriter.md b/docs/sdk/models/operations/getsearchresultswriter.md index 2fbee9d8..a7326529 100644 --- a/docs/sdk/models/operations/getsearchresultswriter.md +++ b/docs/sdk/models/operations/getsearchresultswriter.md @@ -6,7 +6,7 @@ import { GetSearchResultsWriter } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSearchResultsWriter = { - tag: "David Koepp", + tag: "David Koepp", }; ``` diff --git a/docs/sdk/models/operations/getserveractivitiesresponse.md b/docs/sdk/models/operations/getserveractivitiesresponse.md index 10c5c8dc..44d06691 100644 --- a/docs/sdk/models/operations/getserveractivitiesresponse.md +++ b/docs/sdk/models/operations/getserveractivitiesresponse.md @@ -6,11 +6,11 @@ import { GetServerActivitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerActivitiesResponse = { - contentType: "", - statusCode: 477665, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 477665, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getservercapabilitiesresponse.md b/docs/sdk/models/operations/getservercapabilitiesresponse.md index 9a85da48..3ee1a882 100644 --- a/docs/sdk/models/operations/getservercapabilitiesresponse.md +++ b/docs/sdk/models/operations/getservercapabilitiesresponse.md @@ -6,11 +6,11 @@ import { GetServerCapabilitiesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerCapabilitiesResponse = { - contentType: "", - statusCode: 548814, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 548814, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getserveridentitymediacontainer.md b/docs/sdk/models/operations/getserveridentitymediacontainer.md index b6db7196..ebd3d3c0 100644 --- a/docs/sdk/models/operations/getserveridentitymediacontainer.md +++ b/docs/sdk/models/operations/getserveridentitymediacontainer.md @@ -6,9 +6,9 @@ import { GetServerIdentityMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerIdentityMediaContainer = { - size: 0, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", + size: 0, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", }; ``` diff --git a/docs/sdk/models/operations/getserveridentityresponse.md b/docs/sdk/models/operations/getserveridentityresponse.md index 8ef2bc3a..e2a6dd0e 100644 --- a/docs/sdk/models/operations/getserveridentityresponse.md +++ b/docs/sdk/models/operations/getserveridentityresponse.md @@ -6,18 +6,18 @@ import { GetServerIdentityResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerIdentityResponse = { - contentType: "", - statusCode: 602763, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 0, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, + contentType: "", + statusCode: 602763, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 0, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", }, + }, }; ``` diff --git a/docs/sdk/models/operations/getserveridentityresponsebody.md b/docs/sdk/models/operations/getserveridentityresponsebody.md index e89be2df..1857bca7 100644 --- a/docs/sdk/models/operations/getserveridentityresponsebody.md +++ b/docs/sdk/models/operations/getserveridentityresponsebody.md @@ -8,11 +8,11 @@ The Server Identity information import { GetServerIdentityResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerIdentityResponseBody = { - mediaContainer: { - size: 0, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, + mediaContainer: { + size: 0, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", + }, }; ``` diff --git a/docs/sdk/models/operations/getserverlistmediacontainer.md b/docs/sdk/models/operations/getserverlistmediacontainer.md index 4834c744..bbe139ce 100644 --- a/docs/sdk/models/operations/getserverlistmediacontainer.md +++ b/docs/sdk/models/operations/getserverlistmediacontainer.md @@ -6,17 +6,17 @@ import { GetServerListMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerListMediaContainer = { - size: 1, - server: [ - { - name: "Hera", - host: "10.10.10.47", - address: "10.10.10.47", - port: 32400, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, - ], + size: 1, + server: [ + { + name: "Hera", + host: "10.10.10.47", + address: "10.10.10.47", + port: 32400, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getserverlistresponse.md b/docs/sdk/models/operations/getserverlistresponse.md index af9b3b50..1b4c2dde 100644 --- a/docs/sdk/models/operations/getserverlistresponse.md +++ b/docs/sdk/models/operations/getserverlistresponse.md @@ -6,26 +6,26 @@ import { GetServerListResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerListResponse = { - contentType: "", - statusCode: 297534, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - server: [ - { - name: "Hera", - host: "10.10.10.47", - address: "10.10.10.47", - port: 32400, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, - ], + contentType: "", + statusCode: 297534, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + server: [ + { + name: "Hera", + host: "10.10.10.47", + address: "10.10.10.47", + port: 32400, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getserverlistresponsebody.md b/docs/sdk/models/operations/getserverlistresponsebody.md index 2566183d..3638cf42 100644 --- a/docs/sdk/models/operations/getserverlistresponsebody.md +++ b/docs/sdk/models/operations/getserverlistresponsebody.md @@ -8,19 +8,19 @@ List of Servers import { GetServerListResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerListResponseBody = { - mediaContainer: { - size: 1, - server: [ - { - name: "Hera", - host: "10.10.10.47", - address: "10.10.10.47", - port: 32400, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", - }, - ], - }, + mediaContainer: { + size: 1, + server: [ + { + name: "Hera", + host: "10.10.10.47", + address: "10.10.10.47", + port: 32400, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getserverlistserver.md b/docs/sdk/models/operations/getserverlistserver.md index 5794c81f..8eb7a41d 100644 --- a/docs/sdk/models/operations/getserverlistserver.md +++ b/docs/sdk/models/operations/getserverlistserver.md @@ -6,12 +6,12 @@ import { GetServerListServer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerListServer = { - name: "Hera", - host: "10.10.10.47", - address: "10.10.10.47", - port: 32400, - machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", - version: "1.31.3.6868-28fc46b27", + name: "Hera", + host: "10.10.10.47", + address: "10.10.10.47", + port: 32400, + machineIdentifier: "96f2fe7a78c9dc1f16a16bedbe90f98149be16b4", + version: "1.31.3.6868-28fc46b27", }; ``` diff --git a/docs/sdk/models/operations/getserverpreferencesmediacontainer.md b/docs/sdk/models/operations/getserverpreferencesmediacontainer.md index b0af3191..cceca5ff 100644 --- a/docs/sdk/models/operations/getserverpreferencesmediacontainer.md +++ b/docs/sdk/models/operations/getserverpreferencesmediacontainer.md @@ -6,21 +6,21 @@ import { GetServerPreferencesMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerPreferencesMediaContainer = { - size: 161, - setting: [ - { - id: "EnableDatabaseTrace", - label: "", - summary: "", - type: "bool", - default: false, - value: false, - hidden: true, - advanced: false, - group: "", - enumValues: "1:admin only|2:everyone", - }, - ], + size: 161, + setting: [ + { + id: "EnableDatabaseTrace", + label: "", + summary: "", + type: "bool", + default: false, + value: false, + hidden: true, + advanced: false, + group: "", + enumValues: "1:admin only|2:everyone", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getserverpreferencesresponse.md b/docs/sdk/models/operations/getserverpreferencesresponse.md index a722b3e2..3425b619 100644 --- a/docs/sdk/models/operations/getserverpreferencesresponse.md +++ b/docs/sdk/models/operations/getserverpreferencesresponse.md @@ -6,30 +6,30 @@ import { GetServerPreferencesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerPreferencesResponse = { - contentType: "", - statusCode: 592845, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 161, - setting: [ - { - id: "EnableDatabaseTrace", - label: "", - summary: "", - type: "bool", - default: false, - value: false, - hidden: true, - advanced: false, - group: "", - enumValues: "1:admin only|2:everyone", - }, - ], + contentType: "", + statusCode: 592845, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 161, + setting: [ + { + id: "EnableDatabaseTrace", + label: "", + summary: "", + type: "bool", + default: false, + value: false, + hidden: true, + advanced: false, + group: "", + enumValues: "1:admin only|2:everyone", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getserverpreferencesresponsebody.md b/docs/sdk/models/operations/getserverpreferencesresponsebody.md index 47235cae..befcfbc0 100644 --- a/docs/sdk/models/operations/getserverpreferencesresponsebody.md +++ b/docs/sdk/models/operations/getserverpreferencesresponsebody.md @@ -8,23 +8,23 @@ Server Preferences import { GetServerPreferencesResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerPreferencesResponseBody = { - mediaContainer: { - size: 161, - setting: [ - { - id: "EnableDatabaseTrace", - label: "", - summary: "", - type: "bool", - default: false, - value: false, - hidden: true, - advanced: false, - group: "", - enumValues: "1:admin only|2:everyone", - }, - ], - }, + mediaContainer: { + size: 161, + setting: [ + { + id: "EnableDatabaseTrace", + label: "", + summary: "", + type: "bool", + default: false, + value: false, + hidden: true, + advanced: false, + group: "", + enumValues: "1:admin only|2:everyone", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getserverresourcesrequest.md b/docs/sdk/models/operations/getserverresourcesrequest.md index 28ba8fc1..34421482 100644 --- a/docs/sdk/models/operations/getserverresourcesrequest.md +++ b/docs/sdk/models/operations/getserverresourcesrequest.md @@ -6,10 +6,9 @@ import { GetServerResourcesRequest, IncludeHttps, IncludeIPv6, IncludeRelay } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerResourcesRequest = { - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - includeHttps: IncludeHttps.One, - includeRelay: IncludeRelay.One, - includeIPv6: IncludeIPv6.One, + includeHttps: IncludeHttps.One, + includeRelay: IncludeRelay.One, + includeIPv6: IncludeIPv6.One, }; ``` @@ -18,7 +17,6 @@ let value: GetServerResourcesRequest = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| gcgzw5rz2xovp84b4vha3a40 | -| `xPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | | `includeHttps` | [operations.IncludeHttps](../../../sdk/models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | 1 | | `includeRelay` | [operations.IncludeRelay](../../../sdk/models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| 1 | | `includeIPv6` | [operations.IncludeIPv6](../../../sdk/models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | 1 | \ No newline at end of file diff --git a/docs/sdk/models/operations/getserverresourcesresponse.md b/docs/sdk/models/operations/getserverresourcesresponse.md index d5e8953b..96b31e7e 100644 --- a/docs/sdk/models/operations/getserverresourcesresponse.md +++ b/docs/sdk/models/operations/getserverresourcesresponse.md @@ -6,11 +6,11 @@ import { GetServerResourcesResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetServerResourcesResponse = { - contentType: "", - statusCode: 568434, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 568434, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getsessionhistorymediacontainer.md b/docs/sdk/models/operations/getsessionhistorymediacontainer.md index 9f55e5d9..80919bc3 100644 --- a/docs/sdk/models/operations/getsessionhistorymediacontainer.md +++ b/docs/sdk/models/operations/getsessionhistorymediacontainer.md @@ -7,30 +7,30 @@ import { GetSessionHistoryMediaContainer } from "@lukehagar/plexjs/sdk/models/op import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetSessionHistoryMediaContainer = { - size: 10855, - metadata: [ - { - historyKey: "/status/sessions/history/1", - key: "/library/metadata/32171", - ratingKey: "32171", - librarySectionID: "2", - parentKey: "/library/metadata/32170", - grandparentKey: "/library/metadata/32132", - title: "The Noise That Blue Makes", - grandparentTitle: "Taskmaster", - type: "episode", - thumb: "/library/metadata/32171/thumb/-1", - parentThumb: "/library/metadata/32170/thumb/1654134301", - grandparentThumb: "/library/metadata/32132/thumb/1703933346", - grandparentArt: "/library/metadata/32132/art/1703933346", - index: 1, - parentIndex: 13, - originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), - viewedAt: 1654139223, - accountID: 1, - deviceID: 5, - }, - ], + size: 10855, + metadata: [ + { + historyKey: "/status/sessions/history/1", + key: "/library/metadata/32171", + ratingKey: "32171", + librarySectionID: "2", + parentKey: "/library/metadata/32170", + grandparentKey: "/library/metadata/32132", + title: "The Noise That Blue Makes", + grandparentTitle: "Taskmaster", + type: "episode", + thumb: "/library/metadata/32171/thumb/-1", + parentThumb: "/library/metadata/32170/thumb/1654134301", + grandparentThumb: "/library/metadata/32132/thumb/1703933346", + grandparentArt: "/library/metadata/32132/art/1703933346", + index: 1, + parentIndex: 13, + originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), + viewedAt: 1654139223, + accountID: 1, + deviceID: 5, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsessionhistorymetadata.md b/docs/sdk/models/operations/getsessionhistorymetadata.md index 76089160..b0fac6f0 100644 --- a/docs/sdk/models/operations/getsessionhistorymetadata.md +++ b/docs/sdk/models/operations/getsessionhistorymetadata.md @@ -7,25 +7,25 @@ import { GetSessionHistoryMetadata } from "@lukehagar/plexjs/sdk/models/operatio import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetSessionHistoryMetadata = { - historyKey: "/status/sessions/history/1", - key: "/library/metadata/32171", - ratingKey: "32171", - librarySectionID: "2", - parentKey: "/library/metadata/32170", - grandparentKey: "/library/metadata/32132", - title: "The Noise That Blue Makes", - grandparentTitle: "Taskmaster", - type: "episode", - thumb: "/library/metadata/32171/thumb/-1", - parentThumb: "/library/metadata/32170/thumb/1654134301", - grandparentThumb: "/library/metadata/32132/thumb/1703933346", - grandparentArt: "/library/metadata/32132/art/1703933346", - index: 1, - parentIndex: 13, - originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), - viewedAt: 1654139223, - accountID: 1, - deviceID: 5, + historyKey: "/status/sessions/history/1", + key: "/library/metadata/32171", + ratingKey: "32171", + librarySectionID: "2", + parentKey: "/library/metadata/32170", + grandparentKey: "/library/metadata/32132", + title: "The Noise That Blue Makes", + grandparentTitle: "Taskmaster", + type: "episode", + thumb: "/library/metadata/32171/thumb/-1", + parentThumb: "/library/metadata/32170/thumb/1654134301", + grandparentThumb: "/library/metadata/32132/thumb/1703933346", + grandparentArt: "/library/metadata/32132/art/1703933346", + index: 1, + parentIndex: 13, + originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), + viewedAt: 1654139223, + accountID: 1, + deviceID: 5, }; ``` diff --git a/docs/sdk/models/operations/getsessionhistoryrequest.md b/docs/sdk/models/operations/getsessionhistoryrequest.md index 49fd7a6c..83ac0497 100644 --- a/docs/sdk/models/operations/getsessionhistoryrequest.md +++ b/docs/sdk/models/operations/getsessionhistoryrequest.md @@ -6,9 +6,9 @@ import { GetSessionHistoryRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionHistoryRequest = { - accountId: 1, - filter: {}, - librarySectionID: 12, + accountId: 1, + filter: {}, + librarySectionID: 12, }; ``` diff --git a/docs/sdk/models/operations/getsessionhistoryresponse.md b/docs/sdk/models/operations/getsessionhistoryresponse.md index 2dcc3a6b..cb42b7ce 100644 --- a/docs/sdk/models/operations/getsessionhistoryresponse.md +++ b/docs/sdk/models/operations/getsessionhistoryresponse.md @@ -7,39 +7,39 @@ import { GetSessionHistoryResponse } from "@lukehagar/plexjs/sdk/models/operatio import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetSessionHistoryResponse = { - contentType: "", - statusCode: 921158, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 10855, - metadata: [ - { - historyKey: "/status/sessions/history/1", - key: "/library/metadata/32171", - ratingKey: "32171", - librarySectionID: "2", - parentKey: "/library/metadata/32170", - grandparentKey: "/library/metadata/32132", - title: "The Noise That Blue Makes", - grandparentTitle: "Taskmaster", - type: "episode", - thumb: "/library/metadata/32171/thumb/-1", - parentThumb: "/library/metadata/32170/thumb/1654134301", - grandparentThumb: "/library/metadata/32132/thumb/1703933346", - grandparentArt: "/library/metadata/32132/art/1703933346", - index: 1, - parentIndex: 13, - originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), - viewedAt: 1654139223, - accountID: 1, - deviceID: 5, - }, - ], + contentType: "", + statusCode: 921158, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 10855, + metadata: [ + { + historyKey: "/status/sessions/history/1", + key: "/library/metadata/32171", + ratingKey: "32171", + librarySectionID: "2", + parentKey: "/library/metadata/32170", + grandparentKey: "/library/metadata/32132", + title: "The Noise That Blue Makes", + grandparentTitle: "Taskmaster", + type: "episode", + thumb: "/library/metadata/32171/thumb/-1", + parentThumb: "/library/metadata/32170/thumb/1654134301", + grandparentThumb: "/library/metadata/32132/thumb/1703933346", + grandparentArt: "/library/metadata/32132/art/1703933346", + index: 1, + parentIndex: 13, + originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), + viewedAt: 1654139223, + accountID: 1, + deviceID: 5, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getsessionhistoryresponsebody.md b/docs/sdk/models/operations/getsessionhistoryresponsebody.md index a9e74e04..83cd0a39 100644 --- a/docs/sdk/models/operations/getsessionhistoryresponsebody.md +++ b/docs/sdk/models/operations/getsessionhistoryresponsebody.md @@ -9,32 +9,32 @@ import { GetSessionHistoryResponseBody } from "@lukehagar/plexjs/sdk/models/oper import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetSessionHistoryResponseBody = { - mediaContainer: { - size: 10855, - metadata: [ - { - historyKey: "/status/sessions/history/1", - key: "/library/metadata/32171", - ratingKey: "32171", - librarySectionID: "2", - parentKey: "/library/metadata/32170", - grandparentKey: "/library/metadata/32132", - title: "The Noise That Blue Makes", - grandparentTitle: "Taskmaster", - type: "episode", - thumb: "/library/metadata/32171/thumb/-1", - parentThumb: "/library/metadata/32170/thumb/1654134301", - grandparentThumb: "/library/metadata/32132/thumb/1703933346", - grandparentArt: "/library/metadata/32132/art/1703933346", - index: 1, - parentIndex: 13, - originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), - viewedAt: 1654139223, - accountID: 1, - deviceID: 5, - }, - ], - }, + mediaContainer: { + size: 10855, + metadata: [ + { + historyKey: "/status/sessions/history/1", + key: "/library/metadata/32171", + ratingKey: "32171", + librarySectionID: "2", + parentKey: "/library/metadata/32170", + grandparentKey: "/library/metadata/32132", + title: "The Noise That Blue Makes", + grandparentTitle: "Taskmaster", + type: "episode", + thumb: "/library/metadata/32171/thumb/-1", + parentThumb: "/library/metadata/32170/thumb/1654134301", + grandparentThumb: "/library/metadata/32132/thumb/1703933346", + grandparentArt: "/library/metadata/32132/art/1703933346", + index: 1, + parentIndex: 13, + originallyAvailableAt: new RFCDate("2022-04-14T00:00:00Z"), + viewedAt: 1654139223, + accountID: 1, + deviceID: 5, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getsessionsmedia.md b/docs/sdk/models/operations/getsessionsmedia.md index 446ce23e..f58f68b9 100644 --- a/docs/sdk/models/operations/getsessionsmedia.md +++ b/docs/sdk/models/operations/getsessionsmedia.md @@ -6,50 +6,51 @@ import { GetSessionsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsMedia = { - audioChannels: 2, - audioCodec: "flac", - bitrate: 1014, - container: "flac", - duration: 186240, - id: "130355", - selected: true, - part: [ + audioChannels: 2, + audioCodec: "flac", + bitrate: 1014, + container: "flac", + duration: 186240, + id: "130355", + selected: true, + part: [ + { + container: "flac", + duration: 186240, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", }, - ], + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsessionsmediacontainer.md b/docs/sdk/models/operations/getsessionsmediacontainer.md index 41045a86..5f67e41f 100644 --- a/docs/sdk/models/operations/getsessionsmediacontainer.md +++ b/docs/sdk/models/operations/getsessionsmediacontainer.md @@ -6,119 +6,120 @@ import { GetSessionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsMediaContainer = { - size: 1, - metadata: [ + size: 1, + metadata: [ + { + addedAt: 1705543312, + art: "/library/metadata/39904/art/1705310687", + duration: 186240, + grandparentArt: "/library/metadata/39904/art/1705310687", + grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", + grandparentKey: "/library/metadata/39904", + grandparentRatingKey: "39904", + grandparentThumb: "/library/metadata/39904/thumb/1705310687", + grandparentTitle: "Green Day", + guid: "plex://track/6535834f71f22f36f71a8e8f", + index: 1, + key: "/library/metadata/67085", + librarySectionID: "3", + librarySectionKey: "/library/sections/3", + librarySectionTitle: "Music", + musicAnalysisVersion: "1", + parentGuid: "plex://album/65394d6d472b8ab03ef47f12", + parentIndex: 1, + parentKey: "/library/metadata/67084", + parentRatingKey: "67084", + parentStudio: "Reprise Records", + parentThumb: "/library/metadata/67084/thumb/1705543314", + parentTitle: "Saviors", + parentYear: 2024, + ratingCount: 45885, + ratingKey: "67085", + sessionKey: "203", + thumb: "/library/metadata/67084/thumb/1705543314", + title: "The American Dream Is Killing Me", + titleSort: "American Dream Is Killing Me", + type: "track", + updatedAt: 1705543314, + viewOffset: 1000, + media: [ { - addedAt: 1705543312, - art: "/library/metadata/39904/art/1705310687", - duration: 186240, - grandparentArt: "/library/metadata/39904/art/1705310687", - grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", - grandparentKey: "/library/metadata/39904", - grandparentRatingKey: "39904", - grandparentThumb: "/library/metadata/39904/thumb/1705310687", - grandparentTitle: "Green Day", - guid: "plex://track/6535834f71f22f36f71a8e8f", - index: 1, - key: "/library/metadata/67085", - librarySectionID: "3", - librarySectionKey: "/library/sections/3", - librarySectionTitle: "Music", - musicAnalysisVersion: "1", - parentGuid: "plex://album/65394d6d472b8ab03ef47f12", - parentIndex: 1, - parentKey: "/library/metadata/67084", - parentRatingKey: "67084", - parentStudio: "Reprise Records", - parentThumb: "/library/metadata/67084/thumb/1705543314", - parentTitle: "Saviors", - parentYear: 2024, - ratingCount: 45885, - ratingKey: "67085", - sessionKey: "203", - thumb: "/library/metadata/67084/thumb/1705543314", - title: "The American Dream Is Killing Me", - titleSort: "American Dream Is Killing Me", - type: "track", - updatedAt: 1705543314, - viewOffset: 1000, - media: [ + audioChannels: 2, + audioCodec: "flac", + bitrate: 1014, + container: "flac", + duration: 186240, + id: "130355", + selected: true, + part: [ + { + container: "flac", + duration: 186240, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ { - audioChannels: 2, - audioCodec: "flac", - bitrate: 1014, - container: "flac", - duration: 186240, - id: "130355", - selected: true, - part: [ - { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], - }, - ], + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", }, - ], - user: { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", - }, - player: { - address: "10.10.10.171", - machineIdentifier: "3tsdzir85m2onc3qyr255aq1", - model: "standalone", - platform: "windows", - platformVersion: "10.0.22621", - product: "Plex for Windows", - profile: "Plex Desktop", - remotePublicAddress: "68.248.140.20", - state: "playing", - title: "DESKTOP-BL80MTD", - version: "1.85.0.4071-21128b56", - local: true, - relayed: false, - secure: true, - userID: 1, - }, - session: { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", + ], }, + ], }, - ], + ], + user: { + id: "1", + thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", + title: "Blindkitty38", + }, + player: { + address: "10.10.10.171", + machineIdentifier: "3tsdzir85m2onc3qyr255aq1", + model: "standalone", + platform: "windows", + platformVersion: "10.0.22621", + product: "Plex for Windows", + profile: "Plex Desktop", + remotePublicAddress: "68.248.140.20", + state: "playing", + title: "DESKTOP-BL80MTD", + version: "1.85.0.4071-21128b56", + local: true, + relayed: false, + secure: true, + userID: 1, + }, + session: { + id: "93h7e00ncblxncqw9lkfaoxi", + bandwidth: 1050, + location: "lan", + }, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsessionsmetadata.md b/docs/sdk/models/operations/getsessionsmetadata.md index fe633d50..fe536221 100644 --- a/docs/sdk/models/operations/getsessionsmetadata.md +++ b/docs/sdk/models/operations/getsessionsmetadata.md @@ -6,114 +6,115 @@ import { GetSessionsMetadata } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsMetadata = { - addedAt: 1705543312, - art: "/library/metadata/39904/art/1705310687", - duration: 186240, - grandparentArt: "/library/metadata/39904/art/1705310687", - grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", - grandparentKey: "/library/metadata/39904", - grandparentRatingKey: "39904", - grandparentThumb: "/library/metadata/39904/thumb/1705310687", - grandparentTitle: "Green Day", - guid: "plex://track/6535834f71f22f36f71a8e8f", - index: 1, - key: "/library/metadata/67085", - librarySectionID: "3", - librarySectionKey: "/library/sections/3", - librarySectionTitle: "Music", - musicAnalysisVersion: "1", - parentGuid: "plex://album/65394d6d472b8ab03ef47f12", - parentIndex: 1, - parentKey: "/library/metadata/67084", - parentRatingKey: "67084", - parentStudio: "Reprise Records", - parentThumb: "/library/metadata/67084/thumb/1705543314", - parentTitle: "Saviors", - parentYear: 2024, - ratingCount: 45885, - ratingKey: "67085", - sessionKey: "203", - thumb: "/library/metadata/67084/thumb/1705543314", - title: "The American Dream Is Killing Me", - titleSort: "American Dream Is Killing Me", - type: "track", - updatedAt: 1705543314, - viewOffset: 1000, - media: [ + addedAt: 1705543312, + art: "/library/metadata/39904/art/1705310687", + duration: 186240, + grandparentArt: "/library/metadata/39904/art/1705310687", + grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", + grandparentKey: "/library/metadata/39904", + grandparentRatingKey: "39904", + grandparentThumb: "/library/metadata/39904/thumb/1705310687", + grandparentTitle: "Green Day", + guid: "plex://track/6535834f71f22f36f71a8e8f", + index: 1, + key: "/library/metadata/67085", + librarySectionID: "3", + librarySectionKey: "/library/sections/3", + librarySectionTitle: "Music", + musicAnalysisVersion: "1", + parentGuid: "plex://album/65394d6d472b8ab03ef47f12", + parentIndex: 1, + parentKey: "/library/metadata/67084", + parentRatingKey: "67084", + parentStudio: "Reprise Records", + parentThumb: "/library/metadata/67084/thumb/1705543314", + parentTitle: "Saviors", + parentYear: 2024, + ratingCount: 45885, + ratingKey: "67085", + sessionKey: "203", + thumb: "/library/metadata/67084/thumb/1705543314", + title: "The American Dream Is Killing Me", + titleSort: "American Dream Is Killing Me", + type: "track", + updatedAt: 1705543314, + viewOffset: 1000, + media: [ + { + audioChannels: 2, + audioCodec: "flac", + bitrate: 1014, + container: "flac", + duration: 186240, + id: "130355", + selected: true, + part: [ { - audioChannels: 2, - audioCodec: "flac", - bitrate: 1014, - container: "flac", - duration: 186240, - id: "130355", - selected: true, - part: [ - { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], - }, - ], + container: "flac", + duration: 186240, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ + { + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", + }, + ], }, - ], - user: { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", - }, - player: { - address: "10.10.10.171", - machineIdentifier: "3tsdzir85m2onc3qyr255aq1", - model: "standalone", - platform: "windows", - platformVersion: "10.0.22621", - product: "Plex for Windows", - profile: "Plex Desktop", - remotePublicAddress: "68.248.140.20", - state: "playing", - title: "DESKTOP-BL80MTD", - version: "1.85.0.4071-21128b56", - local: true, - relayed: false, - secure: true, - userID: 1, - }, - session: { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", + ], }, + ], + user: { + id: "1", + thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", + title: "Blindkitty38", + }, + player: { + address: "10.10.10.171", + machineIdentifier: "3tsdzir85m2onc3qyr255aq1", + model: "standalone", + platform: "windows", + platformVersion: "10.0.22621", + product: "Plex for Windows", + profile: "Plex Desktop", + remotePublicAddress: "68.248.140.20", + state: "playing", + title: "DESKTOP-BL80MTD", + version: "1.85.0.4071-21128b56", + local: true, + relayed: false, + secure: true, + userID: 1, + }, + session: { + id: "93h7e00ncblxncqw9lkfaoxi", + bandwidth: 1050, + location: "lan", + }, }; ``` diff --git a/docs/sdk/models/operations/getsessionspart.md b/docs/sdk/models/operations/getsessionspart.md index b8575dc7..d8f97e1a 100644 --- a/docs/sdk/models/operations/getsessionspart.md +++ b/docs/sdk/models/operations/getsessionspart.md @@ -6,39 +6,40 @@ import { GetSessionsPart } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsPart = { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], + container: "flac", + duration: 186240, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ + { + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getsessionsresponse.md b/docs/sdk/models/operations/getsessionsresponse.md index d312da02..28540455 100644 --- a/docs/sdk/models/operations/getsessionsresponse.md +++ b/docs/sdk/models/operations/getsessionsresponse.md @@ -6,128 +6,129 @@ import { GetSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsResponse = { - contentType: "", - statusCode: 93940, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - metadata: [ + contentType: "", + statusCode: 93940, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + metadata: [ + { + addedAt: 1705543312, + art: "/library/metadata/39904/art/1705310687", + duration: 186240, + grandparentArt: "/library/metadata/39904/art/1705310687", + grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", + grandparentKey: "/library/metadata/39904", + grandparentRatingKey: "39904", + grandparentThumb: "/library/metadata/39904/thumb/1705310687", + grandparentTitle: "Green Day", + guid: "plex://track/6535834f71f22f36f71a8e8f", + index: 1, + key: "/library/metadata/67085", + librarySectionID: "3", + librarySectionKey: "/library/sections/3", + librarySectionTitle: "Music", + musicAnalysisVersion: "1", + parentGuid: "plex://album/65394d6d472b8ab03ef47f12", + parentIndex: 1, + parentKey: "/library/metadata/67084", + parentRatingKey: "67084", + parentStudio: "Reprise Records", + parentThumb: "/library/metadata/67084/thumb/1705543314", + parentTitle: "Saviors", + parentYear: 2024, + ratingCount: 45885, + ratingKey: "67085", + sessionKey: "203", + thumb: "/library/metadata/67084/thumb/1705543314", + title: "The American Dream Is Killing Me", + titleSort: "American Dream Is Killing Me", + type: "track", + updatedAt: 1705543314, + viewOffset: 1000, + media: [ + { + audioChannels: 2, + audioCodec: "flac", + bitrate: 1014, + container: "flac", + duration: 186240, + id: "130355", + selected: true, + part: [ { - addedAt: 1705543312, - art: "/library/metadata/39904/art/1705310687", - duration: 186240, - grandparentArt: "/library/metadata/39904/art/1705310687", - grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", - grandparentKey: "/library/metadata/39904", - grandparentRatingKey: "39904", - grandparentThumb: "/library/metadata/39904/thumb/1705310687", - grandparentTitle: "Green Day", - guid: "plex://track/6535834f71f22f36f71a8e8f", - index: 1, - key: "/library/metadata/67085", - librarySectionID: "3", - librarySectionKey: "/library/sections/3", - librarySectionTitle: "Music", - musicAnalysisVersion: "1", - parentGuid: "plex://album/65394d6d472b8ab03ef47f12", - parentIndex: 1, - parentKey: "/library/metadata/67084", - parentRatingKey: "67084", - parentStudio: "Reprise Records", - parentThumb: "/library/metadata/67084/thumb/1705543314", - parentTitle: "Saviors", - parentYear: 2024, - ratingCount: 45885, - ratingKey: "67085", - sessionKey: "203", - thumb: "/library/metadata/67084/thumb/1705543314", - title: "The American Dream Is Killing Me", - titleSort: "American Dream Is Killing Me", - type: "track", - updatedAt: 1705543314, - viewOffset: 1000, - media: [ - { - audioChannels: 2, - audioCodec: "flac", - bitrate: 1014, - container: "flac", - duration: 186240, - id: "130355", - selected: true, - part: [ - { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], - }, - ], - }, - ], - user: { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", - }, - player: { - address: "10.10.10.171", - machineIdentifier: "3tsdzir85m2onc3qyr255aq1", - model: "standalone", - platform: "windows", - platformVersion: "10.0.22621", - product: "Plex for Windows", - profile: "Plex Desktop", - remotePublicAddress: "68.248.140.20", - state: "playing", - title: "DESKTOP-BL80MTD", - version: "1.85.0.4071-21128b56", - local: true, - relayed: false, - secure: true, - userID: 1, - }, - session: { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", + container: "flac", + duration: 186240, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ + { + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", }, + ], }, - ], + ], + }, + ], + user: { + id: "1", + thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", + title: "Blindkitty38", + }, + player: { + address: "10.10.10.171", + machineIdentifier: "3tsdzir85m2onc3qyr255aq1", + model: "standalone", + platform: "windows", + platformVersion: "10.0.22621", + product: "Plex for Windows", + profile: "Plex Desktop", + remotePublicAddress: "68.248.140.20", + state: "playing", + title: "DESKTOP-BL80MTD", + version: "1.85.0.4071-21128b56", + local: true, + relayed: false, + secure: true, + userID: 1, + }, + session: { + id: "93h7e00ncblxncqw9lkfaoxi", + bandwidth: 1050, + location: "lan", + }, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getsessionsresponsebody.md b/docs/sdk/models/operations/getsessionsresponsebody.md index 20bd1755..85afbeb3 100644 --- a/docs/sdk/models/operations/getsessionsresponsebody.md +++ b/docs/sdk/models/operations/getsessionsresponsebody.md @@ -8,121 +8,122 @@ List of Active Plex Sessions import { GetSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsResponseBody = { - mediaContainer: { - size: 1, - metadata: [ - { - addedAt: 1705543312, - art: "/library/metadata/39904/art/1705310687", + mediaContainer: { + size: 1, + metadata: [ + { + addedAt: 1705543312, + art: "/library/metadata/39904/art/1705310687", + duration: 186240, + grandparentArt: "/library/metadata/39904/art/1705310687", + grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", + grandparentKey: "/library/metadata/39904", + grandparentRatingKey: "39904", + grandparentThumb: "/library/metadata/39904/thumb/1705310687", + grandparentTitle: "Green Day", + guid: "plex://track/6535834f71f22f36f71a8e8f", + index: 1, + key: "/library/metadata/67085", + librarySectionID: "3", + librarySectionKey: "/library/sections/3", + librarySectionTitle: "Music", + musicAnalysisVersion: "1", + parentGuid: "plex://album/65394d6d472b8ab03ef47f12", + parentIndex: 1, + parentKey: "/library/metadata/67084", + parentRatingKey: "67084", + parentStudio: "Reprise Records", + parentThumb: "/library/metadata/67084/thumb/1705543314", + parentTitle: "Saviors", + parentYear: 2024, + ratingCount: 45885, + ratingKey: "67085", + sessionKey: "203", + thumb: "/library/metadata/67084/thumb/1705543314", + title: "The American Dream Is Killing Me", + titleSort: "American Dream Is Killing Me", + type: "track", + updatedAt: 1705543314, + viewOffset: 1000, + media: [ + { + audioChannels: 2, + audioCodec: "flac", + bitrate: 1014, + container: "flac", + duration: 186240, + id: "130355", + selected: true, + part: [ + { + container: "flac", duration: 186240, - grandparentArt: "/library/metadata/39904/art/1705310687", - grandparentGuid: "plex://artist/5d07bbfd403c6402904a6480", - grandparentKey: "/library/metadata/39904", - grandparentRatingKey: "39904", - grandparentThumb: "/library/metadata/39904/thumb/1705310687", - grandparentTitle: "Green Day", - guid: "plex://track/6535834f71f22f36f71a8e8f", - index: 1, - key: "/library/metadata/67085", - librarySectionID: "3", - librarySectionKey: "/library/sections/3", - librarySectionTitle: "Music", - musicAnalysisVersion: "1", - parentGuid: "plex://album/65394d6d472b8ab03ef47f12", - parentIndex: 1, - parentKey: "/library/metadata/67084", - parentRatingKey: "67084", - parentStudio: "Reprise Records", - parentThumb: "/library/metadata/67084/thumb/1705543314", - parentTitle: "Saviors", - parentYear: 2024, - ratingCount: 45885, - ratingKey: "67085", - sessionKey: "203", - thumb: "/library/metadata/67084/thumb/1705543314", - title: "The American Dream Is Killing Me", - titleSort: "American Dream Is Killing Me", - type: "track", - updatedAt: 1705543314, - viewOffset: 1000, - media: [ - { - audioChannels: 2, - audioCodec: "flac", - bitrate: 1014, - container: "flac", - duration: 186240, - id: "130355", - selected: true, - part: [ - { - container: "flac", - duration: 186240, - file: "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", - hasThumbnail: "1", - id: "130625", - key: "/library/parts/130625/1705543268/file.flac", - size: 23644000, - decision: "directplay", - selected: true, - stream: [ - { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", - }, - ], - }, - ], - }, + file: + "/music/Green Day/Saviors (2024)/Green Day - Saviors - 01 - The American Dream Is Killing Me.flac", + hasThumbnail: "1", + id: "130625", + key: "/library/parts/130625/1705543268/file.flac", + size: 23644000, + decision: "directplay", + selected: true, + stream: [ + { + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", + }, ], - user: { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", - }, - player: { - address: "10.10.10.171", - machineIdentifier: "3tsdzir85m2onc3qyr255aq1", - model: "standalone", - platform: "windows", - platformVersion: "10.0.22621", - product: "Plex for Windows", - profile: "Plex Desktop", - remotePublicAddress: "68.248.140.20", - state: "playing", - title: "DESKTOP-BL80MTD", - version: "1.85.0.4071-21128b56", - local: true, - relayed: false, - secure: true, - userID: 1, - }, - session: { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", - }, - }, + }, + ], + }, ], - }, + user: { + id: "1", + thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", + title: "Blindkitty38", + }, + player: { + address: "10.10.10.171", + machineIdentifier: "3tsdzir85m2onc3qyr255aq1", + model: "standalone", + platform: "windows", + platformVersion: "10.0.22621", + product: "Plex for Windows", + profile: "Plex Desktop", + remotePublicAddress: "68.248.140.20", + state: "playing", + title: "DESKTOP-BL80MTD", + version: "1.85.0.4071-21128b56", + local: true, + relayed: false, + secure: true, + userID: 1, + }, + session: { + id: "93h7e00ncblxncqw9lkfaoxi", + bandwidth: 1050, + location: "lan", + }, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getsessionsstream.md b/docs/sdk/models/operations/getsessionsstream.md index f473e940..4157585d 100644 --- a/docs/sdk/models/operations/getsessionsstream.md +++ b/docs/sdk/models/operations/getsessionsstream.md @@ -6,26 +6,26 @@ import { GetSessionsStream } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsStream = { - albumGain: "-12.94", - albumPeak: "1.000000", - albumRange: "4.751014", - audioChannelLayout: "stereo", - bitDepth: 16, - bitrate: 1014, - channels: 2, - codec: "flac", - displayTitle: "FLAC (Stereo)", - extendedDisplayTitle: "FLAC (Stereo)", - gain: "-12.94", - id: "352487", - index: 0, - loudness: "-5.94", - lra: "1.74", - peak: "1.000000", - samplingRate: 44100, - selected: true, - streamType: 2, - location: "direct", + albumGain: "-12.94", + albumPeak: "1.000000", + albumRange: "4.751014", + audioChannelLayout: "stereo", + bitDepth: 16, + bitrate: 1014, + channels: 2, + codec: "flac", + displayTitle: "FLAC (Stereo)", + extendedDisplayTitle: "FLAC (Stereo)", + gain: "-12.94", + id: "352487", + index: 0, + loudness: "-5.94", + lra: "1.74", + peak: "1.000000", + samplingRate: 44100, + selected: true, + streamType: 2, + location: "direct", }; ``` diff --git a/docs/sdk/models/operations/getsessionsuser.md b/docs/sdk/models/operations/getsessionsuser.md index afa79320..36cc80aa 100644 --- a/docs/sdk/models/operations/getsessionsuser.md +++ b/docs/sdk/models/operations/getsessionsuser.md @@ -6,9 +6,9 @@ import { GetSessionsUser } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSessionsUser = { - id: "1", - thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", - title: "Blindkitty38", + id: "1", + thumb: "https://plex.tv/users/844780fc6f8a26b5/avatar?c=1705853661", + title: "Blindkitty38", }; ``` diff --git a/docs/sdk/models/operations/getsourceconnectioninformationrequest.md b/docs/sdk/models/operations/getsourceconnectioninformationrequest.md index 409b8ac0..0b235033 100644 --- a/docs/sdk/models/operations/getsourceconnectioninformationrequest.md +++ b/docs/sdk/models/operations/getsourceconnectioninformationrequest.md @@ -6,7 +6,7 @@ import { GetSourceConnectionInformationRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSourceConnectionInformationRequest = { - source: "provider://provider-identifier", + source: "provider://provider-identifier", }; ``` diff --git a/docs/sdk/models/operations/getsourceconnectioninformationresponse.md b/docs/sdk/models/operations/getsourceconnectioninformationresponse.md index 91205b68..c8ccf736 100644 --- a/docs/sdk/models/operations/getsourceconnectioninformationresponse.md +++ b/docs/sdk/models/operations/getsourceconnectioninformationresponse.md @@ -6,11 +6,11 @@ import { GetSourceConnectionInformationResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetSourceConnectionInformationResponse = { - contentType: "", - statusCode: 96098, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 96098, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getstatisticsdevice.md b/docs/sdk/models/operations/getstatisticsdevice.md index d49bbca9..e9e458eb 100644 --- a/docs/sdk/models/operations/getstatisticsdevice.md +++ b/docs/sdk/models/operations/getstatisticsdevice.md @@ -6,11 +6,11 @@ import { GetStatisticsDevice } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetStatisticsDevice = { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, }; ``` diff --git a/docs/sdk/models/operations/getstatisticsmediacontainer.md b/docs/sdk/models/operations/getstatisticsmediacontainer.md index 353908e6..a8974cf6 100644 --- a/docs/sdk/models/operations/getstatisticsmediacontainer.md +++ b/docs/sdk/models/operations/getstatisticsmediacontainer.md @@ -6,39 +6,39 @@ import { GetStatisticsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetStatisticsMediaContainer = { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsMedia: [ - { - accountID: 1, - deviceID: 13, - timespan: 4, - at: 1707141600, - metadataType: 4, - count: 1, - duration: 1555, - }, - ], + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, + }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsMedia: [ + { + accountID: 1, + deviceID: 13, + timespan: 4, + at: 1707141600, + metadataType: 4, + count: 1, + duration: 1555, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getstatisticsrequest.md b/docs/sdk/models/operations/getstatisticsrequest.md index 4e1cae66..a3055e9a 100644 --- a/docs/sdk/models/operations/getstatisticsrequest.md +++ b/docs/sdk/models/operations/getstatisticsrequest.md @@ -6,7 +6,7 @@ import { GetStatisticsRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetStatisticsRequest = { - timespan: 4, + timespan: 4, }; ``` diff --git a/docs/sdk/models/operations/getstatisticsresponse.md b/docs/sdk/models/operations/getstatisticsresponse.md index 2a317f72..07ca0261 100644 --- a/docs/sdk/models/operations/getstatisticsresponse.md +++ b/docs/sdk/models/operations/getstatisticsresponse.md @@ -6,48 +6,48 @@ import { GetStatisticsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetStatisticsResponse = { - contentType: "", - statusCode: 508969, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsMedia: [ - { - accountID: 1, - deviceID: 13, - timespan: 4, - at: 1707141600, - metadataType: 4, - count: 1, - duration: 1555, - }, - ], + contentType: "", + statusCode: 508969, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsMedia: [ + { + accountID: 1, + deviceID: 13, + timespan: 4, + at: 1707141600, + metadataType: 4, + count: 1, + duration: 1555, + }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getstatisticsresponsebody.md b/docs/sdk/models/operations/getstatisticsresponsebody.md index 639a1c71..4529b303 100644 --- a/docs/sdk/models/operations/getstatisticsresponsebody.md +++ b/docs/sdk/models/operations/getstatisticsresponsebody.md @@ -8,41 +8,41 @@ Media Statistics import { GetStatisticsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetStatisticsResponseBody = { - mediaContainer: { - size: 5497, - device: [ - { - id: 208, - name: "Roku Express", - platform: "Roku", - clientIdentifier: "793095d235660625108ef785cc7646e9", - createdAt: 1706470556, - }, - ], - account: [ - { - id: 238960586, - key: "/accounts/238960586", - name: "Diane", - defaultAudioLanguage: "en", - autoSelectAudio: true, - defaultSubtitleLanguage: "en", - subtitleMode: 1, - thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", - }, - ], - statisticsMedia: [ - { - accountID: 1, - deviceID: 13, - timespan: 4, - at: 1707141600, - metadataType: 4, - count: 1, - duration: 1555, - }, - ], - }, + mediaContainer: { + size: 5497, + device: [ + { + id: 208, + name: "Roku Express", + platform: "Roku", + clientIdentifier: "793095d235660625108ef785cc7646e9", + createdAt: 1706470556, + }, + ], + account: [ + { + id: 238960586, + key: "/accounts/238960586", + name: "Diane", + defaultAudioLanguage: "en", + autoSelectAudio: true, + defaultSubtitleLanguage: "en", + subtitleMode: 1, + thumb: "https://plex.tv/users/50d83634246da1de/avatar?c=1707110967", + }, + ], + statisticsMedia: [ + { + accountID: 1, + deviceID: 13, + timespan: 4, + at: 1707141600, + metadataType: 4, + count: 1, + duration: 1555, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getthumbimagerequest.md b/docs/sdk/models/operations/getthumbimagerequest.md index 7f54fc7e..8c054b3a 100644 --- a/docs/sdk/models/operations/getthumbimagerequest.md +++ b/docs/sdk/models/operations/getthumbimagerequest.md @@ -6,12 +6,12 @@ import { GetThumbImageRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetThumbImageRequest = { - ratingKey: 9518, - width: 396, - height: 396, - minSize: 1, - upscale: 1, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + ratingKey: 9518, + width: 396, + height: 396, + minSize: 1, + upscale: 1, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", }; ``` diff --git a/docs/sdk/models/operations/gettimelinerequest.md b/docs/sdk/models/operations/gettimelinerequest.md index ff1d5302..ec6c6135 100644 --- a/docs/sdk/models/operations/gettimelinerequest.md +++ b/docs/sdk/models/operations/gettimelinerequest.md @@ -6,16 +6,16 @@ import { GetTimelineRequest, State } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTimelineRequest = { - ratingKey: 23409, - key: "/library/metadata/23409", - state: State.Playing, - hasMDE: 1, - time: 2000, - duration: 10000, - context: "home:hub.continueWatching", - playQueueItemID: 1, - playBackTime: 2000, - row: 1, + ratingKey: 23409, + key: "/library/metadata/23409", + state: State.Playing, + hasMDE: 1, + time: 2000, + duration: 10000, + context: "home:hub.continueWatching", + playQueueItemID: 1, + playBackTime: 2000, + row: 1, }; ``` diff --git a/docs/sdk/models/operations/gettimelineresponse.md b/docs/sdk/models/operations/gettimelineresponse.md index bff66336..89673803 100644 --- a/docs/sdk/models/operations/gettimelineresponse.md +++ b/docs/sdk/models/operations/gettimelineresponse.md @@ -6,11 +6,11 @@ import { GetTimelineResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTimelineResponse = { - contentType: "", - statusCode: 272656, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 272656, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md b/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md index 5cd5ed62..4df7c9bb 100644 --- a/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md +++ b/docs/sdk/models/operations/gettokenbypinidauthpincontainer.md @@ -8,30 +8,30 @@ The Pin with a non-null authToken when it has been verified by the user import { GetTokenByPinIdAuthPinContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTokenByPinIdAuthPinContainer = { - id: 308667304, - code: "7RQZ", - product: "0", - trusted: false, - qr: "https://plex.tv/api/v2/pins/qr/7RQZ", - clientIdentifier: "string", - location: { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", - }, - expiresIn: 876, - createdAt: new Date("2024-07-16T17:03:05Z"), - expiresAt: new Date("2024-07-16T17:18:05Z"), - authToken: null, - newRegistration: null, + id: 308667304, + code: "7RQZ", + product: "0", + trusted: false, + qr: "https://plex.tv/api/v2/pins/qr/7RQZ", + clientIdentifier: "string", + location: { + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", + }, + expiresIn: 876, + createdAt: new Date("2024-07-16T17:03:05Z"), + expiresAt: new Date("2024-07-16T17:18:05Z"), + authToken: null, + newRegistration: null, }; ``` diff --git a/docs/sdk/models/operations/gettokenbypinidgeodata.md b/docs/sdk/models/operations/gettokenbypinidgeodata.md index ca93e306..1d3f649c 100644 --- a/docs/sdk/models/operations/gettokenbypinidgeodata.md +++ b/docs/sdk/models/operations/gettokenbypinidgeodata.md @@ -8,17 +8,17 @@ Geo location data import { GetTokenByPinIdGeoData } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTokenByPinIdGeoData = { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", }; ``` diff --git a/docs/sdk/models/operations/gettokenbypinidrequest.md b/docs/sdk/models/operations/gettokenbypinidrequest.md index c1255dcd..396e7a2d 100644 --- a/docs/sdk/models/operations/gettokenbypinidrequest.md +++ b/docs/sdk/models/operations/gettokenbypinidrequest.md @@ -6,7 +6,7 @@ import { GetTokenByPinIdRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTokenByPinIdRequest = { - pinID: 18789, + pinID: 18789, }; ``` diff --git a/docs/sdk/models/operations/gettokenbypinidresponse.md b/docs/sdk/models/operations/gettokenbypinidresponse.md index 612e916e..28e12e56 100644 --- a/docs/sdk/models/operations/gettokenbypinidresponse.md +++ b/docs/sdk/models/operations/gettokenbypinidresponse.md @@ -6,37 +6,37 @@ import { GetTokenByPinIdResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTokenByPinIdResponse = { - contentType: "", - statusCode: 324141, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - authPinContainer: { - id: 308667304, - code: "7RQZ", - product: "0", - trusted: false, - qr: "https://plex.tv/api/v2/pins/qr/7RQZ", - clientIdentifier: "string", - location: { - code: "VI", - continentCode: "NA", - country: "United States Virgin Islands", - city: "Amsterdam", - europeanUnionMember: true, - timeZone: "America/St_Thomas", - postalCode: 802, - inPrivacyRestrictedCountry: true, - inPrivacyRestrictedRegion: true, - subdivisions: "Saint Thomas", - coordinates: "18.3381, -64.8941", - }, - expiresIn: 876, - createdAt: new Date("2024-07-16T17:03:05Z"), - expiresAt: new Date("2024-07-16T17:18:05Z"), - authToken: null, - newRegistration: null, + contentType: "", + statusCode: 324141, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + authPinContainer: { + id: 308667304, + code: "7RQZ", + product: "0", + trusted: false, + qr: "https://plex.tv/api/v2/pins/qr/7RQZ", + clientIdentifier: "string", + location: { + code: "VI", + continentCode: "NA", + country: "United States Virgin Islands", + city: "Amsterdam", + europeanUnionMember: true, + timeZone: "America/St_Thomas", + postalCode: 802, + inPrivacyRestrictedCountry: true, + inPrivacyRestrictedRegion: true, + subdivisions: "Saint Thomas", + coordinates: "18.3381, -64.8941", }, + expiresIn: 876, + createdAt: new Date("2024-07-16T17:03:05Z"), + expiresAt: new Date("2024-07-16T17:18:05Z"), + authToken: null, + newRegistration: null, + }, }; ``` diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md new file mode 100644 index 00000000..9cc83ee0 --- /dev/null +++ b/docs/sdk/models/operations/gettokendetailsauthenticationresponsestatus.md @@ -0,0 +1,19 @@ +# GetTokenDetailsAuthenticationResponseStatus + +String representation of subscriptionActive + +## Example Usage + +```typescript +import { GetTokenDetailsAuthenticationResponseStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTokenDetailsAuthenticationResponseStatus = + GetTokenDetailsAuthenticationResponseStatus.Inactive; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Inactive` | Inactive | +| `Active` | Active | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md b/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md new file mode 100644 index 00000000..4c8d9e2f --- /dev/null +++ b/docs/sdk/models/operations/gettokendetailsauthenticationstatus.md @@ -0,0 +1,19 @@ +# GetTokenDetailsAuthenticationStatus + +String representation of subscriptionActive + +## Example Usage + +```typescript +import { GetTokenDetailsAuthenticationStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTokenDetailsAuthenticationStatus = + GetTokenDetailsAuthenticationStatus.Inactive; +``` + +## Values + +| Name | Value | +| ---------- | ---------- | +| `Inactive` | Inactive | +| `Active` | Active | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailsfeatures.md b/docs/sdk/models/operations/gettokendetailsfeatures.md similarity index 96% rename from docs/sdk/models/operations/getuserdetailsfeatures.md rename to docs/sdk/models/operations/gettokendetailsfeatures.md index 25c0e6cc..7060a6b2 100644 --- a/docs/sdk/models/operations/getuserdetailsfeatures.md +++ b/docs/sdk/models/operations/gettokendetailsfeatures.md @@ -1,11 +1,11 @@ -# GetUserDetailsFeatures +# GetTokenDetailsFeatures ## Example Usage ```typescript -import { GetUserDetailsFeatures } from "@lukehagar/plexjs/sdk/models/operations"; +import { GetTokenDetailsFeatures } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetUserDetailsFeatures = GetUserDetailsFeatures.HRKEnableEUR; +let value: GetTokenDetailsFeatures = GetTokenDetailsFeatures.HRKEnableEUR; ``` ## Values diff --git a/docs/sdk/models/operations/getuserdetailsresponse.md b/docs/sdk/models/operations/gettokendetailsresponse.md similarity index 95% rename from docs/sdk/models/operations/getuserdetailsresponse.md rename to docs/sdk/models/operations/gettokendetailsresponse.md index 47955c2a..f6cb7bbd 100644 --- a/docs/sdk/models/operations/getuserdetailsresponse.md +++ b/docs/sdk/models/operations/gettokendetailsresponse.md @@ -1,4 +1,4 @@ -# GetUserDetailsResponse +# GetTokenDetailsResponse ## Example Usage @@ -8,97 +8,105 @@ import { DefaultSubtitleAccessibility, DefaultSubtitleForced, Features, - GetUserDetailsAuthenticationResponseStatus, - GetUserDetailsAuthenticationStatus, - GetUserDetailsFeatures, - GetUserDetailsResponse, - GetUserDetailsStatus, + GetTokenDetailsAuthenticationResponseStatus, + GetTokenDetailsAuthenticationStatus, + GetTokenDetailsFeatures, + GetTokenDetailsResponse, + GetTokenDetailsStatus, MailingListStatus, MediaReviewsVisibility, WatchedIndicator, } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetUserDetailsResponse = { - contentType: "", - statusCode: 19987, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - userPlexAccount: { - adsConsent: true, - adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), - adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), - anonymous: false, - authToken: "CxoUzBTSV5hsxjTpFKaf", - backupCodesCreated: false, - confirmed: false, - country: "US", - email: "username@email.com", - emailOnlyAuth: false, - experimentalFeatures: false, - friendlyName: "friendlyUsername", - entitlements: ["[]"], - guest: false, - hasPassword: true, - home: false, - homeAdmin: false, - homeSize: 1, - id: 13692262, - joinedAt: 1721154902, - locale: null, - mailingListActive: false, - mailingListStatus: MailingListStatus.Active, - maxHomeSize: 15, - pin: "string", - profile: { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: AutoSelectSubtitle.One, - defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, - defaultSubtitleForced: DefaultSubtitleForced.Zero, - watchedIndicator: WatchedIndicator.One, - mediaReviewsVisibility: MediaReviewsVisibility.Zero, - }, - protected: false, - rememberExpiresAt: 1722364046, - restricted: false, - roles: ["string"], - scrobbleTypes: "", - services: [ - { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "string", - status: GetUserDetailsStatus.Online, - }, - ], - subscription: { - features: [Features.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationStatus.Inactive, - paymentService: "string", - plan: "string", - }, - subscriptionDescription: "string", - subscriptions: [ - { - features: [GetUserDetailsFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationResponseStatus.Inactive, - paymentService: "string", - plan: "string", - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - twoFactorEnabled: false, - username: "Username", - uuid: "dae343c1f45beb4f", +let value: GetTokenDetailsResponse = { + contentType: "", + statusCode: 19987, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + userPlexAccount: { + adsConsent: true, + adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), + adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), + anonymous: false, + authToken: "CxoUzBTSV5hsxjTpFKaf", + backupCodesCreated: false, + confirmed: false, + country: "US", + email: "username@email.com", + emailOnlyAuth: false, + experimentalFeatures: false, + friendlyName: "friendlyUsername", + entitlements: [ + "[]", + ], + guest: false, + hasPassword: true, + home: false, + homeAdmin: false, + homeSize: 1, + id: 13692262, + joinedAt: 1721154902, + locale: null, + mailingListActive: false, + mailingListStatus: MailingListStatus.Active, + maxHomeSize: 15, + pin: "string", + profile: { + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: AutoSelectSubtitle.One, + defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, + defaultSubtitleForced: DefaultSubtitleForced.Zero, + watchedIndicator: WatchedIndicator.One, + mediaReviewsVisibility: MediaReviewsVisibility.Zero, }, + protected: false, + rememberExpiresAt: 1722364046, + restricted: false, + roles: [ + "string", + ], + scrobbleTypes: "", + services: [ + { + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "string", + status: GetTokenDetailsStatus.Online, + }, + ], + subscription: { + features: [ + Features.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationStatus.Inactive, + paymentService: "string", + plan: "string", + }, + subscriptionDescription: "string", + subscriptions: [ + { + features: [ + GetTokenDetailsFeatures.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationResponseStatus.Inactive, + paymentService: "string", + plan: "string", + }, + ], + thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", + title: "UsernameTitle", + twoFactorEnabled: false, + username: "Username", + uuid: "dae343c1f45beb4f", + }, }; ``` @@ -109,4 +117,4 @@ let value: GetUserDetailsResponse = { | `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | | `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | | `rawResponse` | [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | -| `userPlexAccount` | [operations.GetUserDetailsUserPlexAccount](../../../sdk/models/operations/getuserdetailsuserplexaccount.md) | :heavy_minus_sign: | Logged in user details | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file +| `userPlexAccount` | [operations.GetTokenDetailsUserPlexAccount](../../../sdk/models/operations/gettokendetailsuserplexaccount.md) | :heavy_minus_sign: | Logged in user details | {
"adsConsent": true,
"adsConsentReminderAt": "2019-08-24T14:15:22Z",
"adsConsentSetAt": "2019-08-24T14:15:22Z",
"anonymous": false,
"authToken": "CxoUzBTSV5hsxjTpFKaf",
"backupCodesCreated": false,
"confirmed": false,
"country": "US",
"email": "username@email.com",
"emailOnlyAuth": false,
"experimentalFeatures": false,
"friendlyName": "friendlyUsername",
"entitlements": [],
"guest": false,
"hasPassword": true,
"home": false,
"homeAdmin": false,
"homeSize": 1,
"id": 13692262,
"joinedAt": 1721154902,
"locale": null,
"mailingListActive": false,
"mailingListStatus": "subscribed",
"maxHomeSize": 15,
"pastSubscriptions": [
{
"id": "string",
"mode": "string",
"renewsAt": "string",
"endsAt": "1556281940",
"canceled": "0",
"gracePeriod": "0",
"onHold": "0",
"canReactivate": "0",
"canUpgrade": "0",
"canDowngrade": "0",
"canConvert": "0",
"type": "plexpass",
"transfer": "string",
"state": "ended",
"billing": [
{
"internalPaymentMethod": "string",
"paymentMethodId": "string"
}
]
}
],
"pin": "string",
"profile": [
{
"autoSelectAudio": true,
"defaultAudioLanguage": "ja",
"defaultSubtitleLanguage": "en",
"autoSelectSubtitle": 1,
"defaultSubtitleAccessibility": 1,
"defaultSubtitleForced": 0,
"watchedIndicator": 1,
"mediaReviewsVisibility": 0
}
],
"protected": false,
"rememberExpiresAt": 1722364046,
"restricted": false,
"roles": [
"string"
],
"scrobbleTypes": "",
"services": [
{
"identifier": "metadata-dev",
"endpoint": "https://epg.provider.plex.tv",
"token": "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv",
"secret": "string",
"status": "online"
}
],
"subscription": {
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
},
"subscriptionDescription": "string",
"subscriptions": [
{
"features": [
"Android - Dolby Vision"
],
"active": true,
"subscribedAt": "2021-04-12T18:21:12Z",
"status": "Inactive",
"paymentService": "string",
"plan": "string"
}
],
"thumb": "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101",
"title": "UsernameTitle",
"trials": [
{}
],
"twoFactorEnabled": false,
"username": "Username",
"uuid": "dae343c1f45beb4f"
} | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailsstatus.md b/docs/sdk/models/operations/gettokendetailsstatus.md new file mode 100644 index 00000000..5e02d0ad --- /dev/null +++ b/docs/sdk/models/operations/gettokendetailsstatus.md @@ -0,0 +1,16 @@ +# GetTokenDetailsStatus + +## Example Usage + +```typescript +import { GetTokenDetailsStatus } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTokenDetailsStatus = GetTokenDetailsStatus.Online; +``` + +## Values + +| Name | Value | +| --------- | --------- | +| `Online` | online | +| `Offline` | offline | \ No newline at end of file diff --git a/docs/sdk/models/operations/gettokendetailssubscription.md b/docs/sdk/models/operations/gettokendetailssubscription.md new file mode 100644 index 00000000..c72995db --- /dev/null +++ b/docs/sdk/models/operations/gettokendetailssubscription.md @@ -0,0 +1,24 @@ +# GetTokenDetailsSubscription + +## Example Usage + +```typescript +import { GetTokenDetailsAuthenticationResponseStatus, GetTokenDetailsSubscription } from "@lukehagar/plexjs/sdk/models/operations"; + +let value: GetTokenDetailsSubscription = { + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationResponseStatus.Inactive, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `features` | [operations.GetTokenDetailsFeatures](../../../sdk/models/operations/gettokendetailsfeatures.md)[] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *boolean* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [operations.GetTokenDetailsAuthenticationResponseStatus](../../../sdk/models/operations/gettokendetailsauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `paymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailsuserplexaccount.md b/docs/sdk/models/operations/gettokendetailsuserplexaccount.md similarity index 92% rename from docs/sdk/models/operations/getuserdetailsuserplexaccount.md rename to docs/sdk/models/operations/gettokendetailsuserplexaccount.md index 39a1b716..67656c2c 100644 --- a/docs/sdk/models/operations/getuserdetailsuserplexaccount.md +++ b/docs/sdk/models/operations/gettokendetailsuserplexaccount.md @@ -1,4 +1,4 @@ -# GetUserDetailsUserPlexAccount +# GetTokenDetailsUserPlexAccount Logged in user details @@ -10,90 +10,98 @@ import { DefaultSubtitleAccessibility, DefaultSubtitleForced, Features, - GetUserDetailsAuthenticationResponseStatus, - GetUserDetailsAuthenticationStatus, - GetUserDetailsFeatures, - GetUserDetailsStatus, - GetUserDetailsUserPlexAccount, + GetTokenDetailsAuthenticationResponseStatus, + GetTokenDetailsAuthenticationStatus, + GetTokenDetailsFeatures, + GetTokenDetailsStatus, + GetTokenDetailsUserPlexAccount, MailingListStatus, MediaReviewsVisibility, WatchedIndicator, } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetUserDetailsUserPlexAccount = { - adsConsent: true, - adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), - adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), - anonymous: false, - authToken: "CxoUzBTSV5hsxjTpFKaf", - backupCodesCreated: false, - confirmed: false, - country: "US", - email: "username@email.com", - emailOnlyAuth: false, - experimentalFeatures: false, - friendlyName: "friendlyUsername", - entitlements: ["[]"], - guest: false, - hasPassword: true, - home: false, - homeAdmin: false, - homeSize: 1, - id: 13692262, - joinedAt: 1721154902, - locale: null, - mailingListActive: false, - mailingListStatus: MailingListStatus.Unsubscribed, - maxHomeSize: 15, - pin: "string", - profile: { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: AutoSelectSubtitle.One, - defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, - defaultSubtitleForced: DefaultSubtitleForced.Zero, - watchedIndicator: WatchedIndicator.One, - mediaReviewsVisibility: MediaReviewsVisibility.One, +let value: GetTokenDetailsUserPlexAccount = { + adsConsent: true, + adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), + adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), + anonymous: false, + authToken: "CxoUzBTSV5hsxjTpFKaf", + backupCodesCreated: false, + confirmed: false, + country: "US", + email: "username@email.com", + emailOnlyAuth: false, + experimentalFeatures: false, + friendlyName: "friendlyUsername", + entitlements: [ + "[]", + ], + guest: false, + hasPassword: true, + home: false, + homeAdmin: false, + homeSize: 1, + id: 13692262, + joinedAt: 1721154902, + locale: null, + mailingListActive: false, + mailingListStatus: MailingListStatus.Unsubscribed, + maxHomeSize: 15, + pin: "string", + profile: { + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: AutoSelectSubtitle.One, + defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, + defaultSubtitleForced: DefaultSubtitleForced.Zero, + watchedIndicator: WatchedIndicator.One, + mediaReviewsVisibility: MediaReviewsVisibility.One, + }, + protected: false, + rememberExpiresAt: 1722364046, + restricted: false, + roles: [ + "string", + ], + scrobbleTypes: "", + services: [ + { + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "string", + status: GetTokenDetailsStatus.Online, }, - protected: false, - rememberExpiresAt: 1722364046, - restricted: false, - roles: ["string"], - scrobbleTypes: "", - services: [ - { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "string", - status: GetUserDetailsStatus.Online, - }, + ], + subscription: { + features: [ + Features.AndroidDolbyVision, ], - subscription: { - features: [Features.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationStatus.Inactive, - paymentService: "string", - plan: "string", + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationStatus.Inactive, + paymentService: "string", + plan: "string", + }, + subscriptionDescription: "string", + subscriptions: [ + { + features: [ + GetTokenDetailsFeatures.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationResponseStatus.Inactive, + paymentService: "string", + plan: "string", }, - subscriptionDescription: "string", - subscriptions: [ - { - features: [GetUserDetailsFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationResponseStatus.Inactive, - paymentService: "string", - plan: "string", - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - twoFactorEnabled: false, - username: "Username", - uuid: "dae343c1f45beb4f", + ], + thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", + title: "UsernameTitle", + twoFactorEnabled: false, + username: "Username", + uuid: "dae343c1f45beb4f", }; ``` @@ -135,7 +143,7 @@ let value: GetUserDetailsUserPlexAccount = { | `services` | [operations.Services](../../../sdk/models/operations/services.md)[] | :heavy_check_mark: | N/A | | | `subscription` | [operations.Subscription](../../../sdk/models/operations/subscription.md) | :heavy_check_mark: | If the account’s Plex Pass subscription is active | | | `subscriptionDescription` | *string* | :heavy_check_mark: | Description of the Plex Pass subscription | | -| `subscriptions` | [operations.GetUserDetailsSubscription](../../../sdk/models/operations/getuserdetailssubscription.md)[] | :heavy_check_mark: | N/A | | +| `subscriptions` | [operations.GetTokenDetailsSubscription](../../../sdk/models/operations/gettokendetailssubscription.md)[] | :heavy_check_mark: | N/A | | | `thumb` | *string* | :heavy_check_mark: | URL of the account thumbnail | https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101 | | `title` | *string* | :heavy_check_mark: | The title of the account (username or friendly name) | UsernameTitle | | `twoFactorEnabled` | *boolean* | :heavy_minus_sign: | If two-factor authentication is enabled | | diff --git a/docs/sdk/models/operations/gettopwatchedcontentcountry.md b/docs/sdk/models/operations/gettopwatchedcontentcountry.md index e33dcabc..89833277 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentcountry.md +++ b/docs/sdk/models/operations/gettopwatchedcontentcountry.md @@ -6,9 +6,9 @@ import { GetTopWatchedContentCountry } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTopWatchedContentCountry = { - id: 116, - filter: "country=116", - tag: "United States of America", + id: 116, + filter: "country=116", + tag: "United States of America", }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentgenre.md b/docs/sdk/models/operations/gettopwatchedcontentgenre.md index 206e18fa..cfea0c59 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentgenre.md +++ b/docs/sdk/models/operations/gettopwatchedcontentgenre.md @@ -6,9 +6,9 @@ import { GetTopWatchedContentGenre } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTopWatchedContentGenre = { - id: 184, - filter: "genre=184", - tag: "Thriller", + id: 184, + filter: "genre=184", + tag: "Thriller", }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentguids.md b/docs/sdk/models/operations/gettopwatchedcontentguids.md index 770813fc..6dbcdb9f 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentguids.md +++ b/docs/sdk/models/operations/gettopwatchedcontentguids.md @@ -6,7 +6,7 @@ import { GetTopWatchedContentGuids } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTopWatchedContentGuids = { - id: "tvdb://2337", + id: "tvdb://2337", }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md b/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md index f6f8bce9..372badc1 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md +++ b/docs/sdk/models/operations/gettopwatchedcontentmediacontainer.md @@ -7,77 +7,78 @@ import { GetTopWatchedContentMediaContainer } from "@lukehagar/plexjs/sdk/models import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetTopWatchedContentMediaContainer = { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + slug: "waterloo-road", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + index: 1, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + leafCount: 222, + viewedLeafCount: 100, + childCount: 13, + addedAt: 1705637164, + updatedAt: 1705637165, + globalViewCount: 80, + audienceRatingImage: "rottentomatoes://image.rating.upright", + genre: [ { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - slug: "waterloo-road", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - index: 1, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - leafCount: 222, - viewedLeafCount: 100, - childCount: 13, - addedAt: 1705637164, - updatedAt: 1705637165, - globalViewCount: 80, - audienceRatingImage: "rottentomatoes://image.rating.upright", - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - user: [ - { - id: 220, - }, - ], + id: 184, + filter: "genre=184", + tag: "Thriller", }, - ], + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + user: [ + { + id: 220, + }, + ], + }, + ], }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentmetadata.md b/docs/sdk/models/operations/gettopwatchedcontentmetadata.md index fe0bf84b..761ce1c1 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentmetadata.md +++ b/docs/sdk/models/operations/gettopwatchedcontentmetadata.md @@ -7,68 +7,69 @@ import { GetTopWatchedContentMetadata } from "@lukehagar/plexjs/sdk/models/opera import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetTopWatchedContentMetadata = { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - slug: "waterloo-road", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - index: 1, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - leafCount: 222, - viewedLeafCount: 100, - childCount: 13, - addedAt: 1705637164, - updatedAt: 1705637165, - globalViewCount: 80, - audienceRatingImage: "rottentomatoes://image.rating.upright", - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - user: [ - { - id: 220, - }, - ], + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + slug: "waterloo-road", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + index: 1, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + leafCount: 222, + viewedLeafCount: 100, + childCount: 13, + addedAt: 1705637164, + updatedAt: 1705637165, + globalViewCount: 80, + audienceRatingImage: "rottentomatoes://image.rating.upright", + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + user: [ + { + id: 220, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md b/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md index f23e08ca..e700eaf9 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md +++ b/docs/sdk/models/operations/gettopwatchedcontentqueryparamtype.md @@ -13,7 +13,8 @@ E.g. A movie library will not return anything with type 3 as there are no season ```typescript import { GetTopWatchedContentQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetTopWatchedContentQueryParamType = GetTopWatchedContentQueryParamType.Two; +let value: GetTopWatchedContentQueryParamType = + GetTopWatchedContentQueryParamType.Two; ``` ## Values diff --git a/docs/sdk/models/operations/gettopwatchedcontentrequest.md b/docs/sdk/models/operations/gettopwatchedcontentrequest.md index bcadb88f..404af2d6 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentrequest.md +++ b/docs/sdk/models/operations/gettopwatchedcontentrequest.md @@ -6,8 +6,8 @@ import { GetTopWatchedContentQueryParamType, GetTopWatchedContentRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTopWatchedContentRequest = { - type: GetTopWatchedContentQueryParamType.Two, - includeGuids: 1, + type: GetTopWatchedContentQueryParamType.Two, + includeGuids: 1, }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentresponse.md b/docs/sdk/models/operations/gettopwatchedcontentresponse.md index 442c6a6e..c9b3a990 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentresponse.md +++ b/docs/sdk/models/operations/gettopwatchedcontentresponse.md @@ -7,86 +7,87 @@ import { GetTopWatchedContentResponse } from "@lukehagar/plexjs/sdk/models/opera import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetTopWatchedContentResponse = { - contentType: "", - statusCode: 315428, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ - { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - slug: "waterloo-road", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - index: 1, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - leafCount: 222, - viewedLeafCount: 100, - childCount: 13, - addedAt: 1705637164, - updatedAt: 1705637165, - globalViewCount: 80, - audienceRatingImage: "rottentomatoes://image.rating.upright", - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - user: [ - { - id: 220, - }, - ], - }, - ], + contentType: "", + statusCode: 315428, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + slug: "waterloo-road", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + index: 1, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + leafCount: 222, + viewedLeafCount: 100, + childCount: 13, + addedAt: 1705637164, + updatedAt: 1705637165, + globalViewCount: 80, + audienceRatingImage: "rottentomatoes://image.rating.upright", + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, + ], + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + user: [ + { + id: 220, + }, + ], }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md b/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md index 72e0faec..454e6e6c 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md +++ b/docs/sdk/models/operations/gettopwatchedcontentresponsebody.md @@ -9,79 +9,80 @@ import { GetTopWatchedContentResponseBody } from "@lukehagar/plexjs/sdk/models/o import { RFCDate } from "@lukehagar/plexjs/sdk/types"; let value: GetTopWatchedContentResponseBody = { - mediaContainer: { - size: 1, - allowSync: true, - identifier: "com.plexapp.plugins.library", - mediaTagPrefix: "/system/bundle/media/flags/", - mediaTagVersion: 1698860922, - metadata: [ - { - ratingKey: "17", - key: "/library/metadata/17", - guid: "plex://movie/5d77683f6f4521001ea9dc53", - slug: "waterloo-road", - studio: "Universal Pictures", - type: "movie", - title: "Serenity", - librarySectionTitle: "Movies", - librarySectionID: 1, - librarySectionKey: "/library/sections/1", - contentRating: "PG-13", - summary: - "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", - index: 1, - audienceRating: 9.1, - year: 2005, - tagline: "They aim to misbehave.", - thumb: "/library/metadata/17/thumb/1705637165", - art: "/library/metadata/17/art/1705637165", - duration: 141417, - originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), - leafCount: 222, - viewedLeafCount: 100, - childCount: 13, - addedAt: 1705637164, - updatedAt: 1705637165, - globalViewCount: 80, - audienceRatingImage: "rottentomatoes://image.rating.upright", - genre: [ - { - id: 184, - filter: "genre=184", - tag: "Thriller", - }, - ], - country: [ - { - id: 116, - filter: "country=116", - tag: "United States of America", - }, - ], - guids: [ - { - id: "tvdb://2337", - }, - ], - role: [ - { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", - }, - ], - user: [ - { - id: 220, - }, - ], - }, + mediaContainer: { + size: 1, + allowSync: true, + identifier: "com.plexapp.plugins.library", + mediaTagPrefix: "/system/bundle/media/flags/", + mediaTagVersion: 1698860922, + metadata: [ + { + ratingKey: "17", + key: "/library/metadata/17", + guid: "plex://movie/5d77683f6f4521001ea9dc53", + slug: "waterloo-road", + studio: "Universal Pictures", + type: "movie", + title: "Serenity", + librarySectionTitle: "Movies", + librarySectionID: 1, + librarySectionKey: "/library/sections/1", + contentRating: "PG-13", + summary: + "Serenity continues the story of the TV series it was based upon (\"Firefly\"). River Tam had a secret - one in which she's not even aware - so dangerous, no one's safe, as an Alliance operative's sent to capture her, and all others are considered irrelevant to his job.", + index: 1, + audienceRating: 9.1, + year: 2005, + tagline: "They aim to misbehave.", + thumb: "/library/metadata/17/thumb/1705637165", + art: "/library/metadata/17/art/1705637165", + duration: 141417, + originallyAvailableAt: new RFCDate("2005-09-29T00:00:00Z"), + leafCount: 222, + viewedLeafCount: 100, + childCount: 13, + addedAt: 1705637164, + updatedAt: 1705637165, + globalViewCount: 80, + audienceRatingImage: "rottentomatoes://image.rating.upright", + genre: [ + { + id: 184, + filter: "genre=184", + tag: "Thriller", + }, ], - }, + country: [ + { + id: 116, + filter: "country=116", + tag: "United States of America", + }, + ], + guids: [ + { + id: "tvdb://2337", + }, + ], + role: [ + { + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + }, + ], + user: [ + { + id: 220, + }, + ], + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/gettopwatchedcontentrole.md b/docs/sdk/models/operations/gettopwatchedcontentrole.md index 53930805..14b231ce 100644 --- a/docs/sdk/models/operations/gettopwatchedcontentrole.md +++ b/docs/sdk/models/operations/gettopwatchedcontentrole.md @@ -6,12 +6,13 @@ import { GetTopWatchedContentRole } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTopWatchedContentRole = { - id: 220, - filter: "actor=220", - tag: "Dennis Keiffer", - tagKey: "5d77683554f42c001f8c4708", - role: "Bar Guy (uncredited)", - thumb: "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", + id: 220, + filter: "actor=220", + tag: "Dennis Keiffer", + tagKey: "5d77683554f42c001f8c4708", + role: "Bar Guy (uncredited)", + thumb: + "https://metadata-static.plex.tv/6/people/648e9a7ea1d537bccfcd7615134b78ce.jpg", }; ``` diff --git a/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md b/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md index d3e4c5b8..7b963afe 100644 --- a/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md +++ b/docs/sdk/models/operations/gettranscodesessionsmediacontainer.md @@ -6,35 +6,35 @@ import { GetTranscodeSessionsMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTranscodeSessionsMediaContainer = { - size: 1, - transcodeSession: [ - { - key: "vv3i2q2lax92qlzul1hbd4bx", - throttled: false, - complete: false, - progress: 1.7999999523162842, - size: -22, - speed: 25.100000381469727, - error: false, - duration: 1445695, - remaining: 53, - context: "streaming", - sourceVideoCodec: "h264", - sourceAudioCodec: "aac", - videoDecision: "transcode", - audioDecision: "transcode", - subtitleDecision: "burn", - protocol: "http", - container: "mkv", - videoCodec: "h264", - audioCodec: "opus", - audioChannels: 1, - transcodeHwRequested: true, - timeStamp: 1705895805.4919229, - maxOffsetAvailable: 29.53, - minOffsetAvailable: 3.003000020980835, - }, - ], + size: 1, + transcodeSession: [ + { + key: "vv3i2q2lax92qlzul1hbd4bx", + throttled: false, + complete: false, + progress: 1.7999999523162842, + size: -22, + speed: 25.100000381469727, + error: false, + duration: 1445695, + remaining: 53, + context: "streaming", + sourceVideoCodec: "h264", + sourceAudioCodec: "aac", + videoDecision: "transcode", + audioDecision: "transcode", + subtitleDecision: "burn", + protocol: "http", + container: "mkv", + videoCodec: "h264", + audioCodec: "opus", + audioChannels: 1, + transcodeHwRequested: true, + timeStamp: 1705895805.4919229, + maxOffsetAvailable: 29.53, + minOffsetAvailable: 3.003000020980835, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/gettranscodesessionsresponse.md b/docs/sdk/models/operations/gettranscodesessionsresponse.md index 50c83e4a..eaff8188 100644 --- a/docs/sdk/models/operations/gettranscodesessionsresponse.md +++ b/docs/sdk/models/operations/gettranscodesessionsresponse.md @@ -6,44 +6,44 @@ import { GetTranscodeSessionsResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTranscodeSessionsResponse = { - contentType: "", - statusCode: 575947, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - transcodeSession: [ - { - key: "vv3i2q2lax92qlzul1hbd4bx", - throttled: false, - complete: false, - progress: 1.7999999523162842, - size: -22, - speed: 25.100000381469727, - error: false, - duration: 1445695, - remaining: 53, - context: "streaming", - sourceVideoCodec: "h264", - sourceAudioCodec: "aac", - videoDecision: "transcode", - audioDecision: "transcode", - subtitleDecision: "burn", - protocol: "http", - container: "mkv", - videoCodec: "h264", - audioCodec: "opus", - audioChannels: 1, - transcodeHwRequested: true, - timeStamp: 1705895805.4919229, - maxOffsetAvailable: 29.53, - minOffsetAvailable: 3.003000020980835, - }, - ], + contentType: "", + statusCode: 575947, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + transcodeSession: [ + { + key: "vv3i2q2lax92qlzul1hbd4bx", + throttled: false, + complete: false, + progress: 1.7999999523162842, + size: -22, + speed: 25.100000381469727, + error: false, + duration: 1445695, + remaining: 53, + context: "streaming", + sourceVideoCodec: "h264", + sourceAudioCodec: "aac", + videoDecision: "transcode", + audioDecision: "transcode", + subtitleDecision: "burn", + protocol: "http", + container: "mkv", + videoCodec: "h264", + audioCodec: "opus", + audioChannels: 1, + transcodeHwRequested: true, + timeStamp: 1705895805.4919229, + maxOffsetAvailable: 29.53, + minOffsetAvailable: 3.003000020980835, }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/gettranscodesessionsresponsebody.md b/docs/sdk/models/operations/gettranscodesessionsresponsebody.md index e514179f..87be0bd1 100644 --- a/docs/sdk/models/operations/gettranscodesessionsresponsebody.md +++ b/docs/sdk/models/operations/gettranscodesessionsresponsebody.md @@ -8,37 +8,37 @@ The Transcode Sessions import { GetTranscodeSessionsResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTranscodeSessionsResponseBody = { - mediaContainer: { - size: 1, - transcodeSession: [ - { - key: "vv3i2q2lax92qlzul1hbd4bx", - throttled: false, - complete: false, - progress: 1.7999999523162842, - size: -22, - speed: 25.100000381469727, - error: false, - duration: 1445695, - remaining: 53, - context: "streaming", - sourceVideoCodec: "h264", - sourceAudioCodec: "aac", - videoDecision: "transcode", - audioDecision: "transcode", - subtitleDecision: "burn", - protocol: "http", - container: "mkv", - videoCodec: "h264", - audioCodec: "opus", - audioChannels: 1, - transcodeHwRequested: true, - timeStamp: 1705895805.4919229, - maxOffsetAvailable: 29.53, - minOffsetAvailable: 3.003000020980835, - }, - ], - }, + mediaContainer: { + size: 1, + transcodeSession: [ + { + key: "vv3i2q2lax92qlzul1hbd4bx", + throttled: false, + complete: false, + progress: 1.7999999523162842, + size: -22, + speed: 25.100000381469727, + error: false, + duration: 1445695, + remaining: 53, + context: "streaming", + sourceVideoCodec: "h264", + sourceAudioCodec: "aac", + videoDecision: "transcode", + audioDecision: "transcode", + subtitleDecision: "burn", + protocol: "http", + container: "mkv", + videoCodec: "h264", + audioCodec: "opus", + audioChannels: 1, + transcodeHwRequested: true, + timeStamp: 1705895805.4919229, + maxOffsetAvailable: 29.53, + minOffsetAvailable: 3.003000020980835, + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/gettransienttokenqueryparamtype.md b/docs/sdk/models/operations/gettransienttokenqueryparamtype.md index 24309e98..6121aa57 100644 --- a/docs/sdk/models/operations/gettransienttokenqueryparamtype.md +++ b/docs/sdk/models/operations/gettransienttokenqueryparamtype.md @@ -7,7 +7,8 @@ ```typescript import { GetTransientTokenQueryParamType } from "@lukehagar/plexjs/sdk/models/operations"; -let value: GetTransientTokenQueryParamType = GetTransientTokenQueryParamType.Delegation; +let value: GetTransientTokenQueryParamType = + GetTransientTokenQueryParamType.Delegation; ``` ## Values diff --git a/docs/sdk/models/operations/gettransienttokenrequest.md b/docs/sdk/models/operations/gettransienttokenrequest.md index d4dbd0ca..1e59c90a 100644 --- a/docs/sdk/models/operations/gettransienttokenrequest.md +++ b/docs/sdk/models/operations/gettransienttokenrequest.md @@ -6,8 +6,8 @@ import { GetTransientTokenQueryParamType, GetTransientTokenRequest, Scope } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTransientTokenRequest = { - type: GetTransientTokenQueryParamType.Delegation, - scope: Scope.All, + type: GetTransientTokenQueryParamType.Delegation, + scope: Scope.All, }; ``` diff --git a/docs/sdk/models/operations/gettransienttokenresponse.md b/docs/sdk/models/operations/gettransienttokenresponse.md index 1835d547..9f162bf1 100644 --- a/docs/sdk/models/operations/gettransienttokenresponse.md +++ b/docs/sdk/models/operations/gettransienttokenresponse.md @@ -6,11 +6,11 @@ import { GetTransientTokenResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetTransientTokenResponse = { - contentType: "", - statusCode: 837945, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 837945, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/getupdatestatusmediacontainer.md b/docs/sdk/models/operations/getupdatestatusmediacontainer.md index 31a790ef..c6e35497 100644 --- a/docs/sdk/models/operations/getupdatestatusmediacontainer.md +++ b/docs/sdk/models/operations/getupdatestatusmediacontainer.md @@ -6,40 +6,40 @@ import { GetUpdateStatusMediaContainer } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetUpdateStatusMediaContainer = { - size: 1, - canInstall: false, - checkedAt: 1705801232, - downloadURL: + size: 1, + canInstall: false, + checkedAt: 1705801232, + downloadURL: + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + status: 0, + release: [ + { + key: "https://plex.tv/updater/releases/5136", + version: "1.40.0.7775-456fbaf97", + added: + "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + + "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + + "(Music) Store track genres and add filtering options (#14653)\n" + + "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + + "(View History) No longer create a view history entry for items marked as played (#10888)\n" + + "(Web) Updated to 4.118.0", + fixed: + "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + + "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + + "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + + "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + + "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + + "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + + "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + + "(Search) Album search results could contain all the album's tracks too (#14486)\n" + + "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + + "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + + "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", + downloadURL: "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - status: 0, - release: [ - { - key: "https://plex.tv/updater/releases/5136", - version: "1.40.0.7775-456fbaf97", - added: - "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + - "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + - "(Music) Store track genres and add filtering options (#14653)\n" + - "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + - "(View History) No longer create a view history entry for items marked as played (#10888)\n" + - "(Web) Updated to 4.118.0", - fixed: - "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + - "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + - "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + - "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + - "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + - "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + - "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + - "(Search) Album search results could contain all the album's tracks too (#14486)\n" + - "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + - "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + - "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", - downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - state: "notify", - }, - ], + state: "notify", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getupdatestatusresponse.md b/docs/sdk/models/operations/getupdatestatusresponse.md index 4321c7e9..97dd1275 100644 --- a/docs/sdk/models/operations/getupdatestatusresponse.md +++ b/docs/sdk/models/operations/getupdatestatusresponse.md @@ -6,49 +6,49 @@ import { GetUpdateStatusResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetUpdateStatusResponse = { - contentType: "", - statusCode: 929297, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - object: { - mediaContainer: { - size: 1, - canInstall: false, - checkedAt: 1705801232, - downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - status: 0, - release: [ - { - key: "https://plex.tv/updater/releases/5136", - version: "1.40.0.7775-456fbaf97", - added: - "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + - "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + - "(Music) Store track genres and add filtering options (#14653)\n" + - "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + - "(View History) No longer create a view history entry for items marked as played (#10888)\n" + - "(Web) Updated to 4.118.0", - fixed: - "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + - "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + - "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + - "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + - "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + - "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + - "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + - "(Search) Album search results could contain all the album's tracks too (#14486)\n" + - "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + - "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + - "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", - downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - state: "notify", - }, - ], + contentType: "", + statusCode: 929297, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + object: { + mediaContainer: { + size: 1, + canInstall: false, + checkedAt: 1705801232, + downloadURL: + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + status: 0, + release: [ + { + key: "https://plex.tv/updater/releases/5136", + version: "1.40.0.7775-456fbaf97", + added: + "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + + "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + + "(Music) Store track genres and add filtering options (#14653)\n" + + "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + + "(View History) No longer create a view history entry for items marked as played (#10888)\n" + + "(Web) Updated to 4.118.0", + fixed: + "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + + "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + + "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + + "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + + "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + + "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + + "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + + "(Search) Album search results could contain all the album's tracks too (#14486)\n" + + "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + + "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + + "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", + downloadURL: + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + state: "notify", }, + ], }, + }, }; ``` diff --git a/docs/sdk/models/operations/getupdatestatusresponsebody.md b/docs/sdk/models/operations/getupdatestatusresponsebody.md index 9fe536ac..2c60b40b 100644 --- a/docs/sdk/models/operations/getupdatestatusresponsebody.md +++ b/docs/sdk/models/operations/getupdatestatusresponsebody.md @@ -8,42 +8,42 @@ The Server Updates import { GetUpdateStatusResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetUpdateStatusResponseBody = { - mediaContainer: { - size: 1, - canInstall: false, - checkedAt: 1705801232, + mediaContainer: { + size: 1, + canInstall: false, + checkedAt: 1705801232, + downloadURL: + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + status: 0, + release: [ + { + key: "https://plex.tv/updater/releases/5136", + version: "1.40.0.7775-456fbaf97", + added: + "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + + "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + + "(Music) Store track genres and add filtering options (#14653)\n" + + "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + + "(View History) No longer create a view history entry for items marked as played (#10888)\n" + + "(Web) Updated to 4.118.0", + fixed: + "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + + "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + + "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + + "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + + "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + + "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + + "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + + "(Search) Album search results could contain all the album's tracks too (#14486)\n" + + "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + + "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + + "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - status: 0, - release: [ - { - key: "https://plex.tv/updater/releases/5136", - version: "1.40.0.7775-456fbaf97", - added: - "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + - "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + - "(Music) Store track genres and add filtering options (#14653)\n" + - "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + - "(View History) No longer create a view history entry for items marked as played (#10888)\n" + - "(Web) Updated to 4.118.0", - fixed: - "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + - "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + - "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + - "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + - "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + - "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + - "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + - "(Search) Album search results could contain all the album's tracks too (#14486)\n" + - "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + - "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + - "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", - downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - state: "notify", - }, - ], - }, + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + state: "notify", + }, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/getuserdetailsauthenticationresponsestatus.md b/docs/sdk/models/operations/getuserdetailsauthenticationresponsestatus.md deleted file mode 100644 index 346e9720..00000000 --- a/docs/sdk/models/operations/getuserdetailsauthenticationresponsestatus.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetUserDetailsAuthenticationResponseStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { GetUserDetailsAuthenticationResponseStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserDetailsAuthenticationResponseStatus = - GetUserDetailsAuthenticationResponseStatus.Inactive; -``` - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailsauthenticationstatus.md b/docs/sdk/models/operations/getuserdetailsauthenticationstatus.md deleted file mode 100644 index 918e58b5..00000000 --- a/docs/sdk/models/operations/getuserdetailsauthenticationstatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetUserDetailsAuthenticationStatus - -String representation of subscriptionActive - -## Example Usage - -```typescript -import { GetUserDetailsAuthenticationStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserDetailsAuthenticationStatus = GetUserDetailsAuthenticationStatus.Inactive; -``` - -## Values - -| Name | Value | -| ---------- | ---------- | -| `Inactive` | Inactive | -| `Active` | Active | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailsrequest.md b/docs/sdk/models/operations/getuserdetailsrequest.md deleted file mode 100644 index cafccd2b..00000000 --- a/docs/sdk/models/operations/getuserdetailsrequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetUserDetailsRequest - -## Example Usage - -```typescript -import { GetUserDetailsRequest } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserDetailsRequest = { - xPlexToken: "CV5xoxjTpFKUzBTShsaf", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------- | ------------------------- | ------------------------- | ------------------------- | ------------------------- | -| `xPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | CV5xoxjTpFKUzBTShsaf | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailsstatus.md b/docs/sdk/models/operations/getuserdetailsstatus.md deleted file mode 100644 index d8eb6d39..00000000 --- a/docs/sdk/models/operations/getuserdetailsstatus.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetUserDetailsStatus - -## Example Usage - -```typescript -import { GetUserDetailsStatus } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserDetailsStatus = GetUserDetailsStatus.Online; -``` - -## Values - -| Name | Value | -| --------- | --------- | -| `Online` | online | -| `Offline` | offline | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserdetailssubscription.md b/docs/sdk/models/operations/getuserdetailssubscription.md deleted file mode 100644 index 0a9b7ae0..00000000 --- a/docs/sdk/models/operations/getuserdetailssubscription.md +++ /dev/null @@ -1,24 +0,0 @@ -# GetUserDetailsSubscription - -## Example Usage - -```typescript -import { GetUserDetailsAuthenticationResponseStatus, GetUserDetailsSubscription } from "@lukehagar/plexjs/sdk/models/operations"; - -let value: GetUserDetailsSubscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationResponseStatus.Inactive, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `features` | [operations.GetUserDetailsFeatures](../../../sdk/models/operations/getuserdetailsfeatures.md)[] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *boolean* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [operations.GetUserDetailsAuthenticationResponseStatus](../../../sdk/models/operations/getuserdetailsauthenticationresponsestatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/sdk/models/operations/getuserfriendsresponse.md b/docs/sdk/models/operations/getuserfriendsresponse.md index 0f9a4762..8eefd3b4 100644 --- a/docs/sdk/models/operations/getuserfriendsresponse.md +++ b/docs/sdk/models/operations/getuserfriendsresponse.md @@ -6,27 +6,31 @@ import { GetUserFriendsResponse, Status } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetUserFriendsResponse = { - contentType: "", - statusCode: 648172, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - friends: [ - { - email: "username@email.com", - friendlyName: "exampleUser", - home: true, - id: 0, - restricted: false, - sharedServers: [{}], - sharedSources: [{}], - status: Status.Accepted, - thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", - title: "username123", - username: "username123", - uuid: "7d1916e0d8f6e76b", - }, - ], + contentType: "", + statusCode: 648172, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + friends: [ + { + email: "username@email.com", + friendlyName: "exampleUser", + home: true, + id: 0, + restricted: false, + sharedServers: [ + {}, + ], + sharedSources: [ + {}, + ], + status: Status.Accepted, + thumb: "https://plex.tv/users/7d1916e0d8f6e76b/avatar?c=1694481578", + title: "username123", + username: "username123", + uuid: "7d1916e0d8f6e76b", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/getwatchlistrequest.md b/docs/sdk/models/operations/getwatchlistrequest.md index 5d6ffe31..3c9b4178 100644 --- a/docs/sdk/models/operations/getwatchlistrequest.md +++ b/docs/sdk/models/operations/getwatchlistrequest.md @@ -6,10 +6,10 @@ import { Filter, GetWatchListRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetWatchListRequest = { - filter: Filter.Available, - xPlexContainerStart: 0, - xPlexContainerSize: 50, - xPlexToken: "CV5xoxjTpFKUzBTShsaf", + filter: Filter.Available, + xPlexContainerStart: 0, + xPlexContainerSize: 50, + xPlexToken: "CV5xoxjTpFKUzBTShsaf", }; ``` diff --git a/docs/sdk/models/operations/getwatchlistresponse.md b/docs/sdk/models/operations/getwatchlistresponse.md index ae7ed086..f8d8882b 100644 --- a/docs/sdk/models/operations/getwatchlistresponse.md +++ b/docs/sdk/models/operations/getwatchlistresponse.md @@ -6,11 +6,11 @@ import { GetWatchListResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: GetWatchListResponse = { - contentType: "", - statusCode: 634274, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 634274, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/guids.md b/docs/sdk/models/operations/guids.md index a4ca5b7c..c842463b 100644 --- a/docs/sdk/models/operations/guids.md +++ b/docs/sdk/models/operations/guids.md @@ -6,7 +6,7 @@ import { Guids } from "@lukehagar/plexjs/sdk/models/operations"; let value: Guids = { - id: "tvdb://2337", + id: "tvdb://2337", }; ``` diff --git a/docs/sdk/models/operations/hub.md b/docs/sdk/models/operations/hub.md index dd104ffc..eba9bc1f 100644 --- a/docs/sdk/models/operations/hub.md +++ b/docs/sdk/models/operations/hub.md @@ -6,37 +6,37 @@ import { Hub } from "@lukehagar/plexjs/sdk/models/operations"; let value: Hub = { - hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", - key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", - title: "Recent Playlists", - type: "playlist", - hubIdentifier: "home.playlists", - context: "hub.home.playlists", - size: 6, - more: true, - style: "shelf", - promoted: true, - metadata: [ - { - ratingKey: "57070", - key: "/playlists/57070/items", - guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", - type: "playlist", - title: "November Movie Day", - titleSort: "Tracks", - summary: "", - smart: false, - playlistType: "video", - composite: "/playlists/57070/composite/1668787730", - icon: "playlist://image.smart", - viewCount: 2, - lastViewedAt: 1668787732, - duration: 16873000, - leafCount: 3, - addedAt: 1668779618, - updatedAt: 1668787730, - }, - ], + hubKey: "/library/metadata/50768,65523,58188,57341,57302,57070", + key: "/playlists/all?type=15&sort=lastViewedAt:desc&playlistType=video,audio", + title: "Recent Playlists", + type: "playlist", + hubIdentifier: "home.playlists", + context: "hub.home.playlists", + size: 6, + more: true, + style: "shelf", + promoted: true, + metadata: [ + { + ratingKey: "57070", + key: "/playlists/57070/items", + guid: "com.plexapp.agents.none://9fee6c5b-3143-4923-813e-57bd0190056c", + type: "playlist", + title: "November Movie Day", + titleSort: "Tracks", + summary: "", + smart: false, + playlistType: "video", + composite: "/playlists/57070/composite/1668787730", + icon: "playlist://image.smart", + viewCount: 2, + lastViewedAt: 1668787732, + duration: 16873000, + leafCount: 3, + addedAt: 1668779618, + updatedAt: 1668787730, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/location.md b/docs/sdk/models/operations/location.md index 6719d916..1db1d55e 100644 --- a/docs/sdk/models/operations/location.md +++ b/docs/sdk/models/operations/location.md @@ -6,8 +6,8 @@ import { Location } from "@lukehagar/plexjs/sdk/models/operations"; let value: Location = { - id: 1, - path: "/movies", + id: 1, + path: "/movies", }; ``` diff --git a/docs/sdk/models/operations/loglinerequest.md b/docs/sdk/models/operations/loglinerequest.md index 4ff9fa1c..85f02ac5 100644 --- a/docs/sdk/models/operations/loglinerequest.md +++ b/docs/sdk/models/operations/loglinerequest.md @@ -6,9 +6,9 @@ import { Level, LogLineRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: LogLineRequest = { - level: Level.Four, - message: "Test log message", - source: "Postman", + level: Level.Four, + message: "Test log message", + source: "Postman", }; ``` diff --git a/docs/sdk/models/operations/loglineresponse.md b/docs/sdk/models/operations/loglineresponse.md index 145a9b97..6e8ccbd1 100644 --- a/docs/sdk/models/operations/loglineresponse.md +++ b/docs/sdk/models/operations/loglineresponse.md @@ -6,11 +6,11 @@ import { LogLineResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: LogLineResponse = { - contentType: "", - statusCode: 102044, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 102044, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/logmultilineresponse.md b/docs/sdk/models/operations/logmultilineresponse.md index 7ae13c30..e8701379 100644 --- a/docs/sdk/models/operations/logmultilineresponse.md +++ b/docs/sdk/models/operations/logmultilineresponse.md @@ -6,11 +6,11 @@ import { LogMultiLineResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: LogMultiLineResponse = { - contentType: "", - statusCode: 652790, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 652790, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/markplayedrequest.md b/docs/sdk/models/operations/markplayedrequest.md index 3bd2d9bc..d1435af5 100644 --- a/docs/sdk/models/operations/markplayedrequest.md +++ b/docs/sdk/models/operations/markplayedrequest.md @@ -6,7 +6,7 @@ import { MarkPlayedRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: MarkPlayedRequest = { - key: 59398, + key: 59398, }; ``` diff --git a/docs/sdk/models/operations/markplayedresponse.md b/docs/sdk/models/operations/markplayedresponse.md index ed20d5fe..79038efe 100644 --- a/docs/sdk/models/operations/markplayedresponse.md +++ b/docs/sdk/models/operations/markplayedresponse.md @@ -6,11 +6,11 @@ import { MarkPlayedResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: MarkPlayedResponse = { - contentType: "", - statusCode: 891773, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 891773, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/markunplayedrequest.md b/docs/sdk/models/operations/markunplayedrequest.md index 6e5c1ab8..59f580fc 100644 --- a/docs/sdk/models/operations/markunplayedrequest.md +++ b/docs/sdk/models/operations/markunplayedrequest.md @@ -6,7 +6,7 @@ import { MarkUnplayedRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: MarkUnplayedRequest = { - key: 59398, + key: 59398, }; ``` diff --git a/docs/sdk/models/operations/markunplayedresponse.md b/docs/sdk/models/operations/markunplayedresponse.md index 1aabd957..b50f68bd 100644 --- a/docs/sdk/models/operations/markunplayedresponse.md +++ b/docs/sdk/models/operations/markunplayedresponse.md @@ -6,11 +6,11 @@ import { MarkUnplayedResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: MarkUnplayedResponse = { - contentType: "", - statusCode: 56713, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 56713, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/media.md b/docs/sdk/models/operations/media.md index b917b0b2..aadccb21 100644 --- a/docs/sdk/models/operations/media.md +++ b/docs/sdk/models/operations/media.md @@ -6,32 +6,33 @@ import { Media } from "@lukehagar/plexjs/sdk/models/operations"; let value: Media = { - id: 120345, - duration: 7474422, - bitrate: 3623, - width: 1920, - height: 804, - aspectRatio: 2.35, - audioChannels: 6, - audioCodec: "ac3", - videoCodec: "h264", - videoResolution: 1080, - container: "mp4", - videoFrameRate: "24p", - optimizedForStreaming: 0, - videoProfile: "high", - part: [ - { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", - }, - ], + id: 120345, + duration: 7474422, + bitrate: 3623, + width: 1920, + height: 804, + aspectRatio: 2.35, + audioChannels: 6, + audioCodec: "ac3", + videoCodec: "h264", + videoResolution: 1080, + container: "mp4", + videoFrameRate: "24p", + optimizedForStreaming: 0, + videoProfile: "high", + part: [ + { + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", + duration: 7474422, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", + }, + ], }; ``` diff --git a/docs/sdk/models/operations/myplex.md b/docs/sdk/models/operations/myplex.md index 50a617db..7c37bfc6 100644 --- a/docs/sdk/models/operations/myplex.md +++ b/docs/sdk/models/operations/myplex.md @@ -6,17 +6,17 @@ import { MyPlex } from "@lukehagar/plexjs/sdk/models/operations"; let value: MyPlex = { - authToken: "Z5v-PrNASDFpsaCi3CPK7", - username: "example.email@mail.com", - mappingState: "mapped", - signInState: "ok", - publicAddress: "140.20.68.140", - publicPort: 32400, - privateAddress: "10.10.10.47", - privatePort: 32400, - subscriptionFeatures: - "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", - subscriptionState: "Active", + authToken: "Z5v-PrNASDFpsaCi3CPK7", + username: "example.email@mail.com", + mappingState: "mapped", + signInState: "ok", + publicAddress: "140.20.68.140", + publicPort: 32400, + privateAddress: "10.10.10.47", + privatePort: 32400, + subscriptionFeatures: + "federated-auth,hardware_transcoding,home,hwtranscode,item_clusters,kevin-bacon,livetv,loudness,lyrics,music-analysis,music_videos,pass,photo_autotags,photos-v5,photosV6-edit,photosV6-tv-albums,premium_music_metadata,radio,server-manager,session_bandwidth_restrictions,session_kick,shared-radio,sync,trailers,tuner-sharing,type-first,unsupportedtuners,webhooks", + subscriptionState: "Active", }; ``` diff --git a/docs/sdk/models/operations/operator.md b/docs/sdk/models/operations/operator.md index 3be885d6..fbac8246 100644 --- a/docs/sdk/models/operations/operator.md +++ b/docs/sdk/models/operations/operator.md @@ -6,8 +6,8 @@ import { Operator } from "@lukehagar/plexjs/sdk/models/operations"; let value: Operator = { - key: "=", - title: "is", + key: "=", + title: "is", }; ``` diff --git a/docs/sdk/models/operations/part.md b/docs/sdk/models/operations/part.md index 371d5088..cfd14e4b 100644 --- a/docs/sdk/models/operations/part.md +++ b/docs/sdk/models/operations/part.md @@ -6,14 +6,15 @@ import { Part } from "@lukehagar/plexjs/sdk/models/operations"; let value: Part = { - id: 120353, - key: "/library/parts/120353/1681803203/file.mp4", - duration: 7474422, - file: "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", - size: 3395307162, - container: "mp4", - hasThumbnail: 1, - videoProfile: "high", + id: 120353, + key: "/library/parts/120353/1681803203/file.mp4", + duration: 7474422, + file: + "/movies/Ant-Man and the Wasp Quantumania (2023)/Ant-Man.and.the.Wasp.Quantumania.2023.1080p.mp4", + size: 3395307162, + container: "mp4", + hasThumbnail: 1, + videoProfile: "high", }; ``` diff --git a/docs/sdk/models/operations/pastsubscription.md b/docs/sdk/models/operations/pastsubscription.md index 9f1abf45..c4c64432 100644 --- a/docs/sdk/models/operations/pastsubscription.md +++ b/docs/sdk/models/operations/pastsubscription.md @@ -6,24 +6,24 @@ import { PastSubscription, PostUsersSignInDataState } from "@lukehagar/plexjs/sdk/models/operations"; let value: PastSubscription = { - id: "", - mode: "", - renewsAt: 1556281940, - endsAt: 1556281940, - canceled: false, - gracePeriod: false, - onHold: false, - canReactivate: false, - canUpgrade: false, - canDowngrade: false, - canConvert: false, - type: "plexpass", - transfer: "", - state: PostUsersSignInDataState.Ended, - billing: { - internalPaymentMethod: {}, - paymentMethodId: 880476, - }, + id: "", + mode: "", + renewsAt: 1556281940, + endsAt: 1556281940, + canceled: false, + gracePeriod: false, + onHold: false, + canReactivate: false, + canUpgrade: false, + canDowngrade: false, + canConvert: false, + type: "plexpass", + transfer: "", + state: PostUsersSignInDataState.Ended, + billing: { + internalPaymentMethod: {}, + paymentMethodId: 880476, + }, }; ``` diff --git a/docs/sdk/models/operations/performsearchrequest.md b/docs/sdk/models/operations/performsearchrequest.md index 36d55198..07836d5f 100644 --- a/docs/sdk/models/operations/performsearchrequest.md +++ b/docs/sdk/models/operations/performsearchrequest.md @@ -6,8 +6,8 @@ import { PerformSearchRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: PerformSearchRequest = { - query: "arnold", - limit: 5, + query: "arnold", + limit: 5, }; ``` diff --git a/docs/sdk/models/operations/performsearchresponse.md b/docs/sdk/models/operations/performsearchresponse.md index 2591d173..7bd258f6 100644 --- a/docs/sdk/models/operations/performsearchresponse.md +++ b/docs/sdk/models/operations/performsearchresponse.md @@ -6,11 +6,11 @@ import { PerformSearchResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: PerformSearchResponse = { - contentType: "", - statusCode: 943749, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 943749, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/performvoicesearchrequest.md b/docs/sdk/models/operations/performvoicesearchrequest.md index 0a7bcd19..84fbd8c5 100644 --- a/docs/sdk/models/operations/performvoicesearchrequest.md +++ b/docs/sdk/models/operations/performvoicesearchrequest.md @@ -6,8 +6,8 @@ import { PerformVoiceSearchRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: PerformVoiceSearchRequest = { - query: "dead+poop", - limit: 5, + query: "dead+poop", + limit: 5, }; ``` diff --git a/docs/sdk/models/operations/performvoicesearchresponse.md b/docs/sdk/models/operations/performvoicesearchresponse.md index ef4467f6..2a8da22e 100644 --- a/docs/sdk/models/operations/performvoicesearchresponse.md +++ b/docs/sdk/models/operations/performvoicesearchresponse.md @@ -6,11 +6,11 @@ import { PerformVoiceSearchResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: PerformVoiceSearchResponse = { - contentType: "", - statusCode: 902599, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 902599, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/player.md b/docs/sdk/models/operations/player.md index dfdefd94..1272720e 100644 --- a/docs/sdk/models/operations/player.md +++ b/docs/sdk/models/operations/player.md @@ -6,21 +6,21 @@ import { Player } from "@lukehagar/plexjs/sdk/models/operations"; let value: Player = { - address: "10.10.10.171", - machineIdentifier: "3tsdzir85m2onc3qyr255aq1", - model: "standalone", - platform: "windows", - platformVersion: "10.0.22621", - product: "Plex for Windows", - profile: "Plex Desktop", - remotePublicAddress: "68.248.140.20", - state: "playing", - title: "DESKTOP-BL80MTD", - version: "1.85.0.4071-21128b56", - local: true, - relayed: false, - secure: true, - userID: 1, + address: "10.10.10.171", + machineIdentifier: "3tsdzir85m2onc3qyr255aq1", + model: "standalone", + platform: "windows", + platformVersion: "10.0.22621", + product: "Plex for Windows", + profile: "Plex Desktop", + remotePublicAddress: "68.248.140.20", + state: "playing", + title: "DESKTOP-BL80MTD", + version: "1.85.0.4071-21128b56", + local: true, + relayed: false, + secure: true, + userID: 1, }; ``` diff --git a/docs/sdk/models/operations/plexdevice.md b/docs/sdk/models/operations/plexdevice.md index a56de09f..2efb0738 100644 --- a/docs/sdk/models/operations/plexdevice.md +++ b/docs/sdk/models/operations/plexdevice.md @@ -6,40 +6,40 @@ import { PlexDevice } from "@lukehagar/plexjs/sdk/models/operations"; let value: PlexDevice = { - name: "", - product: "Oriental Metal Computer", - productVersion: "", - platform: "", - platformVersion: "", - device: "", - clientIdentifier: "", - createdAt: new Date("2024-02-29T19:31:16.563Z"), - lastSeenAt: new Date("2023-12-03T08:28:56.752Z"), - provides: "", - ownerId: 582020, - sourceTitle: "", - publicAddress: "", - accessToken: "", - owned: false, - home: false, - synced: false, - relay: false, - presence: false, - httpsRequired: false, - publicAddressMatches: false, - dnsRebindingProtection: false, - natLoopbackSupported: false, - connections: [ - { - protocol: "", - address: "59751 Jaren Ford", - port: 1863.32, - uri: "https://several-increase.biz", - local: false, - relay: false, - iPv6: false, - }, - ], + name: "", + product: "Oriental Metal Computer", + productVersion: "", + platform: "", + platformVersion: "", + device: "", + clientIdentifier: "", + createdAt: new Date("2024-02-29T19:31:16.563Z"), + lastSeenAt: new Date("2023-12-03T08:28:56.752Z"), + provides: "", + ownerId: 582020, + sourceTitle: "", + publicAddress: "", + accessToken: "", + owned: false, + home: false, + synced: false, + relay: false, + presence: false, + httpsRequired: false, + publicAddressMatches: false, + dnsRebindingProtection: false, + natLoopbackSupported: false, + connections: [ + { + protocol: "", + address: "59751 Jaren Ford", + port: 1863.32, + uri: "https://several-increase.biz", + local: false, + relay: false, + iPv6: false, + }, + ], }; ``` diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationfeatures.md b/docs/sdk/models/operations/postuserssignindataauthenticationfeatures.md index ad45a703..281b758a 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationfeatures.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationfeatures.md @@ -6,7 +6,7 @@ import { PostUsersSignInDataAuthenticationFeatures } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataAuthenticationFeatures = - PostUsersSignInDataAuthenticationFeatures.PhotosFavorites; + PostUsersSignInDataAuthenticationFeatures.PhotosFavorites; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md index 6eeae9b7..1655eed4 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationresponsestatus.md @@ -8,7 +8,7 @@ String representation of subscriptionActive import { PostUsersSignInDataAuthenticationResponseStatus } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataAuthenticationResponseStatus = - PostUsersSignInDataAuthenticationResponseStatus.Inactive; + PostUsersSignInDataAuthenticationResponseStatus.Inactive; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md b/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md index 8f4a7567..058a646f 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationstatus.md @@ -8,7 +8,7 @@ String representation of subscriptionActive import { PostUsersSignInDataAuthenticationStatus } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataAuthenticationStatus = - PostUsersSignInDataAuthenticationStatus.Inactive; + PostUsersSignInDataAuthenticationStatus.Inactive; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md b/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md index adc5a0e6..ae32281d 100644 --- a/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md +++ b/docs/sdk/models/operations/postuserssignindataauthenticationsubscription.md @@ -9,9 +9,9 @@ import { } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataAuthenticationSubscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md b/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md index 58cff41b..d07f5d74 100644 --- a/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md +++ b/docs/sdk/models/operations/postuserssignindataautoselectsubtitle.md @@ -7,7 +7,8 @@ The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign aud ```typescript import { PostUsersSignInDataAutoSelectSubtitle } from "@lukehagar/plexjs/sdk/models/operations"; -let value: PostUsersSignInDataAutoSelectSubtitle = PostUsersSignInDataAutoSelectSubtitle.One; +let value: PostUsersSignInDataAutoSelectSubtitle = + PostUsersSignInDataAutoSelectSubtitle.One; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md index 65290c5e..393dda67 100644 --- a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md +++ b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleaccessibility.md @@ -8,7 +8,7 @@ The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer no import { PostUsersSignInDataDefaultSubtitleAccessibility } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataDefaultSubtitleAccessibility = - PostUsersSignInDataDefaultSubtitleAccessibility.One; + PostUsersSignInDataDefaultSubtitleAccessibility.One; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md index 42231c3c..6fbdf5d9 100644 --- a/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md +++ b/docs/sdk/models/operations/postuserssignindatadefaultsubtitleforced.md @@ -7,7 +7,8 @@ The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer ```typescript import { PostUsersSignInDataDefaultSubtitleForced } from "@lukehagar/plexjs/sdk/models/operations"; -let value: PostUsersSignInDataDefaultSubtitleForced = PostUsersSignInDataDefaultSubtitleForced.Zero; +let value: PostUsersSignInDataDefaultSubtitleForced = + PostUsersSignInDataDefaultSubtitleForced.Zero; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatafeatures.md b/docs/sdk/models/operations/postuserssignindatafeatures.md index 00cc8da9..d2b3b27b 100644 --- a/docs/sdk/models/operations/postuserssignindatafeatures.md +++ b/docs/sdk/models/operations/postuserssignindatafeatures.md @@ -5,7 +5,8 @@ ```typescript import { PostUsersSignInDataFeatures } from "@lukehagar/plexjs/sdk/models/operations"; -let value: PostUsersSignInDataFeatures = PostUsersSignInDataFeatures.AmazonLoopDebug; +let value: PostUsersSignInDataFeatures = + PostUsersSignInDataFeatures.AmazonLoopDebug; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md b/docs/sdk/models/operations/postuserssignindatamailingliststatus.md index 72fde72b..53e71c99 100644 --- a/docs/sdk/models/operations/postuserssignindatamailingliststatus.md +++ b/docs/sdk/models/operations/postuserssignindatamailingliststatus.md @@ -7,7 +7,8 @@ Your current mailing list status ```typescript import { PostUsersSignInDataMailingListStatus } from "@lukehagar/plexjs/sdk/models/operations"; -let value: PostUsersSignInDataMailingListStatus = PostUsersSignInDataMailingListStatus.Unsubscribed; +let value: PostUsersSignInDataMailingListStatus = + PostUsersSignInDataMailingListStatus.Unsubscribed; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md b/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md index 198d4772..0922c8d2 100644 --- a/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md +++ b/docs/sdk/models/operations/postuserssignindatamediareviewsvisibility.md @@ -6,7 +6,7 @@ import { PostUsersSignInDataMediaReviewsVisibility } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataMediaReviewsVisibility = - PostUsersSignInDataMediaReviewsVisibility.Zero; + PostUsersSignInDataMediaReviewsVisibility.Zero; ``` ## Values diff --git a/docs/sdk/models/operations/postuserssignindatarequest.md b/docs/sdk/models/operations/postuserssignindatarequest.md index 04c6c664..b67d34ae 100644 --- a/docs/sdk/models/operations/postuserssignindatarequest.md +++ b/docs/sdk/models/operations/postuserssignindatarequest.md @@ -6,11 +6,11 @@ import { PostUsersSignInDataRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataRequest = { - requestBody: { - login: "username@email.com", - password: "password123", - verificationCode: "123456", - }, + requestBody: { + login: "username@email.com", + password: "password123", + verificationCode: "123456", + }, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindatarequestbody.md b/docs/sdk/models/operations/postuserssignindatarequestbody.md index 704a752e..2cdb434b 100644 --- a/docs/sdk/models/operations/postuserssignindatarequestbody.md +++ b/docs/sdk/models/operations/postuserssignindatarequestbody.md @@ -8,9 +8,9 @@ Login credentials import { PostUsersSignInDataRequestBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataRequestBody = { - login: "username@email.com", - password: "password123", - verificationCode: "123456", + login: "username@email.com", + password: "password123", + verificationCode: "123456", }; ``` diff --git a/docs/sdk/models/operations/postuserssignindataresponse.md b/docs/sdk/models/operations/postuserssignindataresponse.md index c4ffcf6c..b7d11328 100644 --- a/docs/sdk/models/operations/postuserssignindataresponse.md +++ b/docs/sdk/models/operations/postuserssignindataresponse.md @@ -20,109 +20,120 @@ import { } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataResponse = { - contentType: "", - statusCode: 692472, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), - userPlexAccount: { - adsConsent: true, - adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), - adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), - anonymous: false, - authToken: "CxoUzBTSV5hsxjTpFKaf", - backupCodesCreated: false, - confirmed: false, - country: "US", - email: "username@email.com", - emailOnlyAuth: false, - experimentalFeatures: false, - friendlyName: "friendlyUsername", - entitlements: ["[]"], - guest: false, - hasPassword: true, - home: false, - homeAdmin: false, - homeSize: 1, - id: 13692262, - joinedAt: 1721154902, - locale: null, - mailingListActive: false, - mailingListStatus: PostUsersSignInDataMailingListStatus.Unsubscribed, - maxHomeSize: 15, - pin: "string", - profile: { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, - defaultSubtitleAccessibility: PostUsersSignInDataDefaultSubtitleAccessibility.One, - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.One, - watchedIndicator: PostUsersSignInDataWatchedIndicator.One, - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.One, - }, - protected: false, - rememberExpiresAt: 1722364046, - restricted: false, - roles: ["string"], - scrobbleTypes: "", - services: [ - { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "string", - status: PostUsersSignInDataStatus.Online, - }, - ], - subscription: { - features: [PostUsersSignInDataFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationStatus.Inactive, - paymentService: "string", - plan: "string", - }, - subscriptionDescription: "string", - subscriptions: [ - { - features: [PostUsersSignInDataAuthenticationFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, - paymentService: "string", - plan: "string", - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - twoFactorEnabled: false, - username: "Username", - uuid: "dae343c1f45beb4f", - pastSubscriptions: [ - { - id: "string", - mode: "string", - renewsAt: string, - endsAt: 1556281940, - canceled: true, - gracePeriod: true, - onHold: true, - canReactivate: true, - canUpgrade: true, - canDowngrade: true, - canConvert: true, - type: "plexpass", - transfer: "string", - state: PostUsersSignInDataState.Ended, - billing: { - internalPaymentMethod: {}, - paymentMethodId: 265389, - }, - }, - ], - trials: [{}], + contentType: "", + statusCode: 692472, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), + userPlexAccount: { + adsConsent: true, + adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), + adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), + anonymous: false, + authToken: "CxoUzBTSV5hsxjTpFKaf", + backupCodesCreated: false, + confirmed: false, + country: "US", + email: "username@email.com", + emailOnlyAuth: false, + experimentalFeatures: false, + friendlyName: "friendlyUsername", + entitlements: [ + "[]", + ], + guest: false, + hasPassword: true, + home: false, + homeAdmin: false, + homeSize: 1, + id: 13692262, + joinedAt: 1721154902, + locale: null, + mailingListActive: false, + mailingListStatus: PostUsersSignInDataMailingListStatus.Unsubscribed, + maxHomeSize: 15, + pin: "string", + profile: { + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, + defaultSubtitleAccessibility: + PostUsersSignInDataDefaultSubtitleAccessibility.One, + defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.One, + watchedIndicator: PostUsersSignInDataWatchedIndicator.One, + mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.One, }, + protected: false, + rememberExpiresAt: 1722364046, + restricted: false, + roles: [ + "string", + ], + scrobbleTypes: "", + services: [ + { + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "string", + status: PostUsersSignInDataStatus.Online, + }, + ], + subscription: { + features: [ + PostUsersSignInDataFeatures.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationStatus.Inactive, + paymentService: "string", + plan: "string", + }, + subscriptionDescription: "string", + subscriptions: [ + { + features: [ + PostUsersSignInDataAuthenticationFeatures.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, + paymentService: "string", + plan: "string", + }, + ], + thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", + title: "UsernameTitle", + twoFactorEnabled: false, + username: "Username", + uuid: "dae343c1f45beb4f", + pastSubscriptions: [ + { + id: "string", + mode: "string", + renewsAt: string, + endsAt: 1556281940, + canceled: true, + gracePeriod: true, + onHold: true, + canReactivate: true, + canUpgrade: true, + canDowngrade: true, + canConvert: true, + type: "plexpass", + transfer: "string", + state: PostUsersSignInDataState.Ended, + billing: { + internalPaymentMethod: {}, + paymentMethodId: 265389, + }, + }, + ], + trials: [ + {}, + ], + }, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindataservices.md b/docs/sdk/models/operations/postuserssignindataservices.md index ff8001dd..97d00fc1 100644 --- a/docs/sdk/models/operations/postuserssignindataservices.md +++ b/docs/sdk/models/operations/postuserssignindataservices.md @@ -6,11 +6,11 @@ import { PostUsersSignInDataServices, PostUsersSignInDataStatus } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataServices = { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "", - status: PostUsersSignInDataStatus.Online, + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "", + status: PostUsersSignInDataStatus.Online, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindatasubscription.md b/docs/sdk/models/operations/postuserssignindatasubscription.md index 51de8410..0f9deccc 100644 --- a/docs/sdk/models/operations/postuserssignindatasubscription.md +++ b/docs/sdk/models/operations/postuserssignindatasubscription.md @@ -8,9 +8,9 @@ If the account’s Plex Pass subscription is active import { PostUsersSignInDataAuthenticationStatus, PostUsersSignInDataSubscription } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataSubscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationStatus.Inactive, + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationStatus.Inactive, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindatauserplexaccount.md b/docs/sdk/models/operations/postuserssignindatauserplexaccount.md index 38784923..ca907345 100644 --- a/docs/sdk/models/operations/postuserssignindatauserplexaccount.md +++ b/docs/sdk/models/operations/postuserssignindatauserplexaccount.md @@ -22,102 +22,113 @@ import { } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataUserPlexAccount = { - adsConsent: true, - adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), - adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), - anonymous: false, - authToken: "CxoUzBTSV5hsxjTpFKaf", - backupCodesCreated: false, - confirmed: false, - country: "US", - email: "username@email.com", - emailOnlyAuth: false, - experimentalFeatures: false, - friendlyName: "friendlyUsername", - entitlements: ["[]"], - guest: false, - hasPassword: true, - home: false, - homeAdmin: false, - homeSize: 1, - id: 13692262, - joinedAt: 1721154902, - locale: null, - mailingListActive: false, - mailingListStatus: PostUsersSignInDataMailingListStatus.Active, - maxHomeSize: 15, - pin: "string", - profile: { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, - defaultSubtitleAccessibility: PostUsersSignInDataDefaultSubtitleAccessibility.One, - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.One, - watchedIndicator: PostUsersSignInDataWatchedIndicator.One, - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Zero, + adsConsent: true, + adsConsentReminderAt: new Date("2019-08-24T14:15:22Z"), + adsConsentSetAt: new Date("2019-08-24T14:15:22Z"), + anonymous: false, + authToken: "CxoUzBTSV5hsxjTpFKaf", + backupCodesCreated: false, + confirmed: false, + country: "US", + email: "username@email.com", + emailOnlyAuth: false, + experimentalFeatures: false, + friendlyName: "friendlyUsername", + entitlements: [ + "[]", + ], + guest: false, + hasPassword: true, + home: false, + homeAdmin: false, + homeSize: 1, + id: 13692262, + joinedAt: 1721154902, + locale: null, + mailingListActive: false, + mailingListStatus: PostUsersSignInDataMailingListStatus.Active, + maxHomeSize: 15, + pin: "string", + profile: { + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, + defaultSubtitleAccessibility: + PostUsersSignInDataDefaultSubtitleAccessibility.One, + defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.One, + watchedIndicator: PostUsersSignInDataWatchedIndicator.One, + mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Zero, + }, + protected: false, + rememberExpiresAt: 1722364046, + restricted: false, + roles: [ + "string", + ], + scrobbleTypes: "", + services: [ + { + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "string", + status: PostUsersSignInDataStatus.Online, }, - protected: false, - rememberExpiresAt: 1722364046, - restricted: false, - roles: ["string"], - scrobbleTypes: "", - services: [ - { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "string", - status: PostUsersSignInDataStatus.Online, - }, + ], + subscription: { + features: [ + PostUsersSignInDataFeatures.AndroidDolbyVision, ], - subscription: { - features: [PostUsersSignInDataFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationStatus.Inactive, - paymentService: "string", - plan: "string", + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationStatus.Inactive, + paymentService: "string", + plan: "string", + }, + subscriptionDescription: "string", + subscriptions: [ + { + features: [ + PostUsersSignInDataAuthenticationFeatures.AndroidDolbyVision, + ], + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, + paymentService: "string", + plan: "string", }, - subscriptionDescription: "string", - subscriptions: [ - { - features: [PostUsersSignInDataAuthenticationFeatures.AndroidDolbyVision], - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: PostUsersSignInDataAuthenticationResponseStatus.Inactive, - paymentService: "string", - plan: "string", - }, - ], - thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", - title: "UsernameTitle", - twoFactorEnabled: false, - username: "Username", - uuid: "dae343c1f45beb4f", - pastSubscriptions: [ - { - id: "string", - mode: "string", - renewsAt: string, - endsAt: 1556281940, - canceled: true, - gracePeriod: true, - onHold: true, - canReactivate: true, - canUpgrade: true, - canDowngrade: true, - canConvert: true, - type: "plexpass", - transfer: "string", - state: PostUsersSignInDataState.Ended, - billing: { - internalPaymentMethod: {}, - paymentMethodId: 216822, - }, - }, - ], - trials: [{}], + ], + thumb: "https://plex.tv/users/a4f43c1ebfde43a5/avatar?c=8372075101", + title: "UsernameTitle", + twoFactorEnabled: false, + username: "Username", + uuid: "dae343c1f45beb4f", + pastSubscriptions: [ + { + id: "string", + mode: "string", + renewsAt: string, + endsAt: 1556281940, + canceled: true, + gracePeriod: true, + onHold: true, + canReactivate: true, + canUpgrade: true, + canDowngrade: true, + canConvert: true, + type: "plexpass", + transfer: "string", + state: PostUsersSignInDataState.Ended, + billing: { + internalPaymentMethod: {}, + paymentMethodId: 216822, + }, + }, + ], + trials: [ + {}, + ], }; ``` diff --git a/docs/sdk/models/operations/postuserssignindatauserprofile.md b/docs/sdk/models/operations/postuserssignindatauserprofile.md index c02acf13..18ee83e4 100644 --- a/docs/sdk/models/operations/postuserssignindatauserprofile.md +++ b/docs/sdk/models/operations/postuserssignindatauserprofile.md @@ -13,14 +13,15 @@ import { } from "@lukehagar/plexjs/sdk/models/operations"; let value: PostUsersSignInDataUserProfile = { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, - defaultSubtitleAccessibility: PostUsersSignInDataDefaultSubtitleAccessibility.One, - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.Zero, - watchedIndicator: PostUsersSignInDataWatchedIndicator.One, - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Zero, + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle.One, + defaultSubtitleAccessibility: + PostUsersSignInDataDefaultSubtitleAccessibility.One, + defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced.Zero, + watchedIndicator: PostUsersSignInDataWatchedIndicator.One, + mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility.Zero, }; ``` diff --git a/docs/sdk/models/operations/postuserssignindatawatchedindicator.md b/docs/sdk/models/operations/postuserssignindatawatchedindicator.md index 130c12a1..54d74e9f 100644 --- a/docs/sdk/models/operations/postuserssignindatawatchedindicator.md +++ b/docs/sdk/models/operations/postuserssignindatawatchedindicator.md @@ -5,7 +5,8 @@ ```typescript import { PostUsersSignInDataWatchedIndicator } from "@lukehagar/plexjs/sdk/models/operations"; -let value: PostUsersSignInDataWatchedIndicator = PostUsersSignInDataWatchedIndicator.One; +let value: PostUsersSignInDataWatchedIndicator = + PostUsersSignInDataWatchedIndicator.One; ``` ## Values diff --git a/docs/sdk/models/operations/producer.md b/docs/sdk/models/operations/producer.md index 0fae42e0..287de1b5 100644 --- a/docs/sdk/models/operations/producer.md +++ b/docs/sdk/models/operations/producer.md @@ -6,11 +6,12 @@ import { Producer } from "@lukehagar/plexjs/sdk/models/operations"; let value: Producer = { - id: 221, - filter: "producer=221", - tag: "Barry Mendel", - tagKey: "5d776826961905001eb90e2b", - thumb: "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", + id: 221, + filter: "producer=221", + tag: "Barry Mendel", + tagKey: "5d776826961905001eb90e2b", + thumb: + "https://metadata-static.plex.tv/8/people/87877371326a964634d18556d94547e1.jpg", }; ``` diff --git a/docs/sdk/models/operations/provider.md b/docs/sdk/models/operations/provider.md index 7788532f..97b25949 100644 --- a/docs/sdk/models/operations/provider.md +++ b/docs/sdk/models/operations/provider.md @@ -6,9 +6,9 @@ import { Provider } from "@lukehagar/plexjs/sdk/models/operations"; let value: Provider = { - key: "/system/search", - title: "Local Network", - type: "mixed", + key: "/system/search", + title: "Local Network", + type: "mixed", }; ``` diff --git a/docs/sdk/models/operations/ratings.md b/docs/sdk/models/operations/ratings.md index 8f57debf..aaf1885f 100644 --- a/docs/sdk/models/operations/ratings.md +++ b/docs/sdk/models/operations/ratings.md @@ -6,9 +6,9 @@ import { Ratings } from "@lukehagar/plexjs/sdk/models/operations"; let value: Ratings = { - image: "themoviedb://image.rating", - value: 7.4, - type: "audience", + image: "themoviedb://image.rating", + value: 7.4, + type: "audience", }; ``` diff --git a/docs/sdk/models/operations/release.md b/docs/sdk/models/operations/release.md index a80fc538..30fc763c 100644 --- a/docs/sdk/models/operations/release.md +++ b/docs/sdk/models/operations/release.md @@ -6,30 +6,30 @@ import { Release } from "@lukehagar/plexjs/sdk/models/operations"; let value: Release = { - key: "https://plex.tv/updater/releases/5136", - version: "1.40.0.7775-456fbaf97", - added: - "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + - "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + - "(Music) Store track genres and add filtering options (#14653)\n" + - "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + - "(View History) No longer create a view history entry for items marked as played (#10888)\n" + - "(Web) Updated to 4.118.0", - fixed: - "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + - "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + - "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + - "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + - "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + - "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + - "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + - "(Search) Album search results could contain all the album's tracks too (#14486)\n" + - "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + - "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + - "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", - downloadURL: - "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", - state: "notify", + key: "https://plex.tv/updater/releases/5136", + version: "1.40.0.7775-456fbaf97", + added: + "(PLEASE NOTE) This version makes changes to the database which will make it compatible only with server versions 1.31.2 or higher (released March 14). You will not be able to use your database on Plex Media Server versions lower than this after this update. Please also be patient when updating to this version if you have a very large database and allow the upgrade process to finish.\n" + + "(Collections) Items added to a collection from the item context menu will now lock the collection field on the items (#12793)\n" + + "(Music) Store track genres and add filtering options (#14653)\n" + + "(Music) Support ID3v2.4 null-separated tags for genres and release type (#14653)\n" + + "(View History) No longer create a view history entry for items marked as played (#10888)\n" + + "(Web) Updated to 4.118.0", + fixed: + "(Agents) Changing a 'Other Videos' type library to the modern movie agent would fail (#14483)\n" + + "(Agents) It is possible that agents are not initialised during startup on rare occasions (#14654)\n" + + "(Agents) Remove the legacy OpenSubtitles agent which is no longer supported upstream (#14667)\n" + + "(Collection) Server could become unresponsive when collection membership changes (#14612)\n" + + "(DVR) Previously watched recordings could be deleted without being watched again (#13779)\n" + + "(Libraries) When performing fix match on items from certain music libraries the language would default to Arabic (#14501)\n" + + "(Library) The Content Rating not equal to None filter does not work (#14620)\n" + + "(Search) Album search results could contain all the album's tracks too (#14486)\n" + + "(Subtitles) In some circumstances, sidecar subtitles can show up for media when they're no longer available (#14674)\n" + + "(Transcoder) HW encoding would fail on devices with no rate control (#14222)\n" + + "(Transcoder) Software transcoding on Ubuntu could cause unexpected behavior (#14605)", + downloadURL: + "https://plex.tv/downloads/latest/5?channel=8&build=linux-x86_64&distro=redhat&X-Plex-Token=xxxxxxxxxxxxxxxxxxxx", + state: "notify", }; ``` diff --git a/docs/sdk/models/operations/responsebody.md b/docs/sdk/models/operations/responsebody.md index c9e6c45a..ea355efb 100644 --- a/docs/sdk/models/operations/responsebody.md +++ b/docs/sdk/models/operations/responsebody.md @@ -6,12 +6,12 @@ import { ResponseBody } from "@lukehagar/plexjs/sdk/models/operations"; let value: ResponseBody = { - identifier: "tv.plex.sonos", - baseURL: "https://sonos.plex.tv", - title: "Sonos", - linkURL: "https://sonos.plex.tv/link", - provides: "client,player", - token: "", + identifier: "tv.plex.sonos", + baseURL: "https://sonos.plex.tv", + title: "Sonos", + linkURL: "https://sonos.plex.tv/link", + provides: "client,player", + token: "", }; ``` diff --git a/docs/sdk/models/operations/role.md b/docs/sdk/models/operations/role.md index 6ef4db36..9eadc353 100644 --- a/docs/sdk/models/operations/role.md +++ b/docs/sdk/models/operations/role.md @@ -6,7 +6,7 @@ import { Role } from "@lukehagar/plexjs/sdk/models/operations"; let value: Role = { - tag: "Paul Rudd", + tag: "Paul Rudd", }; ``` diff --git a/docs/sdk/models/operations/server.md b/docs/sdk/models/operations/server.md index 7299e59c..8a60ab5a 100644 --- a/docs/sdk/models/operations/server.md +++ b/docs/sdk/models/operations/server.md @@ -6,17 +6,17 @@ import { Server } from "@lukehagar/plexjs/sdk/models/operations"; let value: Server = { - name: "iPad", - host: "10.10.10.102", - address: "10.10.10.102", - port: 32500, - machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", - version: "8.17", - protocol: "plex", - product: "Plex for iOS", - deviceClass: "tablet", - protocolVersion: 2, - protocolCapabilities: "playback,playqueues,timeline,provider-playback", + name: "iPad", + host: "10.10.10.102", + address: "10.10.10.102", + port: 32500, + machineIdentifier: "A2E901F8-E016-43A7-ADFB-EF8CA8A4AC05", + version: "8.17", + protocol: "plex", + product: "Plex for iOS", + deviceClass: "tablet", + protocolVersion: 2, + protocolCapabilities: "playback,playqueues,timeline,provider-playback", }; ``` diff --git a/docs/sdk/models/operations/services.md b/docs/sdk/models/operations/services.md index 46a84629..69fdd8d1 100644 --- a/docs/sdk/models/operations/services.md +++ b/docs/sdk/models/operations/services.md @@ -3,23 +3,23 @@ ## Example Usage ```typescript -import { GetUserDetailsStatus, Services } from "@lukehagar/plexjs/sdk/models/operations"; +import { GetTokenDetailsStatus, Services } from "@lukehagar/plexjs/sdk/models/operations"; let value: Services = { - identifier: "metadata-dev", - endpoint: "https://epg.provider.plex.tv", - token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", - secret: "", - status: GetUserDetailsStatus.Online, + identifier: "metadata-dev", + endpoint: "https://epg.provider.plex.tv", + token: "DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv", + secret: "", + status: GetTokenDetailsStatus.Online, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `identifier` | *string* | :heavy_check_mark: | N/A | metadata-dev | -| `endpoint` | *string* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | -| `token` | *string* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | -| `secret` | *string* | :heavy_check_mark: | N/A | | -| `status` | [operations.GetUserDetailsStatus](../../../sdk/models/operations/getuserdetailsstatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `identifier` | *string* | :heavy_check_mark: | N/A | metadata-dev | +| `endpoint` | *string* | :heavy_check_mark: | N/A | https://epg.provider.plex.tv | +| `token` | *string* | :heavy_check_mark: | N/A | DjoMtqFAGRL1uVtCyF1dKIorTbShJeqv | +| `secret` | *string* | :heavy_check_mark: | N/A | | +| `status` | [operations.GetTokenDetailsStatus](../../../sdk/models/operations/gettokendetailsstatus.md) | :heavy_check_mark: | N/A | online | \ No newline at end of file diff --git a/docs/sdk/models/operations/session.md b/docs/sdk/models/operations/session.md index 18fc6837..45a19405 100644 --- a/docs/sdk/models/operations/session.md +++ b/docs/sdk/models/operations/session.md @@ -6,9 +6,9 @@ import { Session } from "@lukehagar/plexjs/sdk/models/operations"; let value: Session = { - id: "93h7e00ncblxncqw9lkfaoxi", - bandwidth: 1050, - location: "lan", + id: "93h7e00ncblxncqw9lkfaoxi", + bandwidth: 1050, + location: "lan", }; ``` diff --git a/docs/sdk/models/operations/setting.md b/docs/sdk/models/operations/setting.md index 400d186f..633ef26a 100644 --- a/docs/sdk/models/operations/setting.md +++ b/docs/sdk/models/operations/setting.md @@ -6,16 +6,16 @@ import { Setting } from "@lukehagar/plexjs/sdk/models/operations"; let value: Setting = { - id: "EnableDatabaseTrace", - label: "", - summary: "", - type: "bool", - default: false, - value: false, - hidden: true, - advanced: false, - group: "", - enumValues: "1:admin only|2:everyone", + id: "EnableDatabaseTrace", + label: "", + summary: "", + type: "bool", + default: false, + value: false, + hidden: true, + advanced: false, + group: "", + enumValues: "1:admin only|2:everyone", }; ``` diff --git a/docs/sdk/models/operations/sort.md b/docs/sdk/models/operations/sort.md index fd155701..09666a4b 100644 --- a/docs/sdk/models/operations/sort.md +++ b/docs/sdk/models/operations/sort.md @@ -6,12 +6,12 @@ import { Sort } from "@lukehagar/plexjs/sdk/models/operations"; let value: Sort = { - default: "asc", - defaultDirection: "desc", - descKey: "random:desc", - firstCharacterKey: "/library/sections/1/firstCharacter", - key: "random", - title: "Randomly", + default: "asc", + defaultDirection: "desc", + descKey: "random:desc", + firstCharacterKey: "/library/sections/1/firstCharacter", + key: "random", + title: "Randomly", }; ``` diff --git a/docs/sdk/models/operations/startalltasksresponse.md b/docs/sdk/models/operations/startalltasksresponse.md index 48af8b53..8669566b 100644 --- a/docs/sdk/models/operations/startalltasksresponse.md +++ b/docs/sdk/models/operations/startalltasksresponse.md @@ -6,11 +6,11 @@ import { StartAllTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartAllTasksResponse = { - contentType: "", - statusCode: 528895, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 528895, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/starttaskrequest.md b/docs/sdk/models/operations/starttaskrequest.md index 5a360c3c..1adfbb6b 100644 --- a/docs/sdk/models/operations/starttaskrequest.md +++ b/docs/sdk/models/operations/starttaskrequest.md @@ -6,7 +6,7 @@ import { StartTaskRequest, TaskName } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartTaskRequest = { - taskName: TaskName.DeepMediaAnalysis, + taskName: TaskName.DeepMediaAnalysis, }; ``` diff --git a/docs/sdk/models/operations/starttaskresponse.md b/docs/sdk/models/operations/starttaskresponse.md index 216050ee..0d8d92fd 100644 --- a/docs/sdk/models/operations/starttaskresponse.md +++ b/docs/sdk/models/operations/starttaskresponse.md @@ -6,11 +6,11 @@ import { StartTaskResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartTaskResponse = { - contentType: "", - statusCode: 925597, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 925597, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/startuniversaltranscoderequest.md b/docs/sdk/models/operations/startuniversaltranscoderequest.md index 2e88f4c2..ee359105 100644 --- a/docs/sdk/models/operations/startuniversaltranscoderequest.md +++ b/docs/sdk/models/operations/startuniversaltranscoderequest.md @@ -6,22 +6,22 @@ import { StartUniversalTranscodeRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartUniversalTranscodeRequest = { - hasMDE: 1, - path: "/library/metadata/23409", - mediaIndex: 0, - partIndex: 0, - protocol: "hls", - fastSeek: 0, - directPlay: 0, - directStream: 0, - subtitleSize: 100, - subtites: "burn", - audioBoost: 100, - location: "lan", - mediaBufferSize: 102400, - session: "zvcage8b7rkioqcm8f4uns4c", - addDebugOverlay: 0, - autoAdjustQuality: 0, + hasMDE: 1, + path: "/library/metadata/23409", + mediaIndex: 0, + partIndex: 0, + protocol: "hls", + fastSeek: 0, + directPlay: 0, + directStream: 0, + subtitleSize: 100, + subtites: "burn", + audioBoost: 100, + location: "lan", + mediaBufferSize: 102400, + session: "zvcage8b7rkioqcm8f4uns4c", + addDebugOverlay: 0, + autoAdjustQuality: 0, }; ``` diff --git a/docs/sdk/models/operations/startuniversaltranscoderesponse.md b/docs/sdk/models/operations/startuniversaltranscoderesponse.md index fda53bb8..599415c0 100644 --- a/docs/sdk/models/operations/startuniversaltranscoderesponse.md +++ b/docs/sdk/models/operations/startuniversaltranscoderesponse.md @@ -6,11 +6,11 @@ import { StartUniversalTranscodeResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StartUniversalTranscodeResponse = { - contentType: "", - statusCode: 383441, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 383441, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/statisticsbandwidth.md b/docs/sdk/models/operations/statisticsbandwidth.md index 6bc0f429..e25ff6e8 100644 --- a/docs/sdk/models/operations/statisticsbandwidth.md +++ b/docs/sdk/models/operations/statisticsbandwidth.md @@ -6,12 +6,12 @@ import { StatisticsBandwidth } from "@lukehagar/plexjs/sdk/models/operations"; let value: StatisticsBandwidth = { - accountID: 238960586, - deviceID: 208, - timespan: 6, - at: 1718387650, - lan: true, - bytes: 22, + accountID: 238960586, + deviceID: 208, + timespan: 6, + at: 1718387650, + lan: true, + bytes: 22, }; ``` diff --git a/docs/sdk/models/operations/statisticsmedia.md b/docs/sdk/models/operations/statisticsmedia.md index 473e35dd..a46b580e 100644 --- a/docs/sdk/models/operations/statisticsmedia.md +++ b/docs/sdk/models/operations/statisticsmedia.md @@ -6,13 +6,13 @@ import { StatisticsMedia } from "@lukehagar/plexjs/sdk/models/operations"; let value: StatisticsMedia = { - accountID: 1, - deviceID: 13, - timespan: 4, - at: 1707141600, - metadataType: 4, - count: 1, - duration: 1555, + accountID: 1, + deviceID: 13, + timespan: 4, + at: 1707141600, + metadataType: 4, + count: 1, + duration: 1555, }; ``` diff --git a/docs/sdk/models/operations/statisticsresources.md b/docs/sdk/models/operations/statisticsresources.md index a340481e..ec98ac8b 100644 --- a/docs/sdk/models/operations/statisticsresources.md +++ b/docs/sdk/models/operations/statisticsresources.md @@ -6,12 +6,12 @@ import { StatisticsResources } from "@lukehagar/plexjs/sdk/models/operations"; let value: StatisticsResources = { - timespan: 6, - at: 1718384427, - hostCpuUtilization: 1.276, - processCpuUtilization: 0.025, - hostMemoryUtilization: 17.026, - processMemoryUtilization: 0.493, + timespan: 6, + at: 1718384427, + hostCpuUtilization: 1.276, + processCpuUtilization: 0.025, + hostMemoryUtilization: 17.026, + processMemoryUtilization: 0.493, }; ``` diff --git a/docs/sdk/models/operations/stopalltasksresponse.md b/docs/sdk/models/operations/stopalltasksresponse.md index ea7387d5..0c561c53 100644 --- a/docs/sdk/models/operations/stopalltasksresponse.md +++ b/docs/sdk/models/operations/stopalltasksresponse.md @@ -6,11 +6,11 @@ import { StopAllTasksResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopAllTasksResponse = { - contentType: "", - statusCode: 479977, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 479977, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/stoptaskrequest.md b/docs/sdk/models/operations/stoptaskrequest.md index 790bbedd..233b4b84 100644 --- a/docs/sdk/models/operations/stoptaskrequest.md +++ b/docs/sdk/models/operations/stoptaskrequest.md @@ -6,7 +6,7 @@ import { PathParamTaskName, StopTaskRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopTaskRequest = { - taskName: PathParamTaskName.BackupDatabase, + taskName: PathParamTaskName.BackupDatabase, }; ``` diff --git a/docs/sdk/models/operations/stoptaskresponse.md b/docs/sdk/models/operations/stoptaskresponse.md index ab870688..8e968ce8 100644 --- a/docs/sdk/models/operations/stoptaskresponse.md +++ b/docs/sdk/models/operations/stoptaskresponse.md @@ -6,11 +6,11 @@ import { StopTaskResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopTaskResponse = { - contentType: "", - statusCode: 337396, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 337396, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/stoptranscodesessionrequest.md b/docs/sdk/models/operations/stoptranscodesessionrequest.md index a891a1c4..ad9600cb 100644 --- a/docs/sdk/models/operations/stoptranscodesessionrequest.md +++ b/docs/sdk/models/operations/stoptranscodesessionrequest.md @@ -6,7 +6,7 @@ import { StopTranscodeSessionRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopTranscodeSessionRequest = { - sessionKey: "zz7llzqlx8w9vnrsbnwhbmep", + sessionKey: "zz7llzqlx8w9vnrsbnwhbmep", }; ``` diff --git a/docs/sdk/models/operations/stoptranscodesessionresponse.md b/docs/sdk/models/operations/stoptranscodesessionresponse.md index da1d5d19..6a23945b 100644 --- a/docs/sdk/models/operations/stoptranscodesessionresponse.md +++ b/docs/sdk/models/operations/stoptranscodesessionresponse.md @@ -6,11 +6,11 @@ import { StopTranscodeSessionResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: StopTranscodeSessionResponse = { - contentType: "", - statusCode: 83112, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 83112, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/stream.md b/docs/sdk/models/operations/stream.md index 866aebf0..2fc68607 100644 --- a/docs/sdk/models/operations/stream.md +++ b/docs/sdk/models/operations/stream.md @@ -6,38 +6,38 @@ import { Stream } from "@lukehagar/plexjs/sdk/models/operations"; let value: Stream = { - id: 29, - streamType: 2, - default: true, - codec: "aac", - index: 0, - bitrate: 128, - bitDepth: 8, - chromaLocation: "left", - chromaSubsampling: "14520", - codedHeight: 816, - codedWidth: 1920, - colorPrimaries: "bt709", - colorRange: "tv", - colorSpace: "bt709", - colorTrc: "bt709", - frameRate: 24, - hasScalingMatrix: false, - height: 814, - level: 40, - profile: "lc", - refFrames: 4, - scanType: "progressive", - streamIdentifier: "1", - width: 1920, - displayTitle: "English (AAC Stereo)", - extendedDisplayTitle: "English (AAC Stereo)", - selected: true, - channels: 2, - language: "English", - languageTag: "en", - languageCode: "eng", - samplingRate: 44100, + id: 29, + streamType: 2, + default: true, + codec: "aac", + index: 0, + bitrate: 128, + bitDepth: 8, + chromaLocation: "left", + chromaSubsampling: "14520", + codedHeight: 816, + codedWidth: 1920, + colorPrimaries: "bt709", + colorRange: "tv", + colorSpace: "bt709", + colorTrc: "bt709", + frameRate: 24, + hasScalingMatrix: false, + height: 814, + level: 40, + profile: "lc", + refFrames: 4, + scanType: "progressive", + streamIdentifier: "1", + width: 1920, + displayTitle: "English (AAC Stereo)", + extendedDisplayTitle: "English (AAC Stereo)", + selected: true, + channels: 2, + language: "English", + languageTag: "en", + languageCode: "eng", + samplingRate: 44100, }; ``` diff --git a/docs/sdk/models/operations/subscription.md b/docs/sdk/models/operations/subscription.md index d3357c36..dc71d5da 100644 --- a/docs/sdk/models/operations/subscription.md +++ b/docs/sdk/models/operations/subscription.md @@ -5,22 +5,22 @@ If the account’s Plex Pass subscription is active ## Example Usage ```typescript -import { GetUserDetailsAuthenticationStatus, Subscription } from "@lukehagar/plexjs/sdk/models/operations"; +import { GetTokenDetailsAuthenticationStatus, Subscription } from "@lukehagar/plexjs/sdk/models/operations"; let value: Subscription = { - active: true, - subscribedAt: "2021-04-12T18:21:12Z", - status: GetUserDetailsAuthenticationStatus.Inactive, + active: true, + subscribedAt: "2021-04-12T18:21:12Z", + status: GetTokenDetailsAuthenticationStatus.Inactive, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -| `features` | [operations.Features](../../../sdk/models/operations/features.md)[] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | -| `active` | *boolean* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | -| `subscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | -| `status` | [operations.GetUserDetailsAuthenticationStatus](../../../sdk/models/operations/getuserdetailsauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | -| `paymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | -| `plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| `features` | [operations.Features](../../../sdk/models/operations/features.md)[] | :heavy_minus_sign: | List of features allowed on your Plex Pass subscription | | +| `active` | *boolean* | :heavy_minus_sign: | If the account's Plex Pass subscription is active | true | +| `subscribedAt` | *string* | :heavy_minus_sign: | Date the account subscribed to Plex Pass | 2021-04-12T18:21:12Z | +| `status` | [operations.GetTokenDetailsAuthenticationStatus](../../../sdk/models/operations/gettokendetailsauthenticationstatus.md) | :heavy_minus_sign: | String representation of subscriptionActive | Inactive | +| `paymentService` | *string* | :heavy_minus_sign: | Payment service used for your Plex Pass subscription | | +| `plan` | *string* | :heavy_minus_sign: | Name of Plex Pass subscription plan | | \ No newline at end of file diff --git a/docs/sdk/models/operations/transcodesession.md b/docs/sdk/models/operations/transcodesession.md index 07ef5522..28bcf0ec 100644 --- a/docs/sdk/models/operations/transcodesession.md +++ b/docs/sdk/models/operations/transcodesession.md @@ -6,30 +6,30 @@ import { TranscodeSession } from "@lukehagar/plexjs/sdk/models/operations"; let value: TranscodeSession = { - key: "vv3i2q2lax92qlzul1hbd4bx", - throttled: false, - complete: false, - progress: 1.7999999523162842, - size: -22, - speed: 25.100000381469727, - error: false, - duration: 1445695, - remaining: 53, - context: "streaming", - sourceVideoCodec: "h264", - sourceAudioCodec: "aac", - videoDecision: "transcode", - audioDecision: "transcode", - subtitleDecision: "burn", - protocol: "http", - container: "mkv", - videoCodec: "h264", - audioCodec: "opus", - audioChannels: 1, - transcodeHwRequested: true, - timeStamp: 1705895805.4919229, - maxOffsetAvailable: 29.53, - minOffsetAvailable: 3.003000020980835, + key: "vv3i2q2lax92qlzul1hbd4bx", + throttled: false, + complete: false, + progress: 1.7999999523162842, + size: -22, + speed: 25.100000381469727, + error: false, + duration: 1445695, + remaining: 53, + context: "streaming", + sourceVideoCodec: "h264", + sourceAudioCodec: "aac", + videoDecision: "transcode", + audioDecision: "transcode", + subtitleDecision: "burn", + protocol: "http", + container: "mkv", + videoCodec: "h264", + audioCodec: "opus", + audioChannels: 1, + transcodeHwRequested: true, + timeStamp: 1705895805.4919229, + maxOffsetAvailable: 29.53, + minOffsetAvailable: 3.003000020980835, }; ``` diff --git a/docs/sdk/models/operations/updateplaylistrequest.md b/docs/sdk/models/operations/updateplaylistrequest.md index 279dec47..3edd022f 100644 --- a/docs/sdk/models/operations/updateplaylistrequest.md +++ b/docs/sdk/models/operations/updateplaylistrequest.md @@ -6,7 +6,7 @@ import { UpdatePlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: UpdatePlaylistRequest = { - playlistID: 3172.02, + playlistID: 3172.02, }; ``` diff --git a/docs/sdk/models/operations/updateplaylistresponse.md b/docs/sdk/models/operations/updateplaylistresponse.md index 63225f53..fa42c13f 100644 --- a/docs/sdk/models/operations/updateplaylistresponse.md +++ b/docs/sdk/models/operations/updateplaylistresponse.md @@ -6,11 +6,11 @@ import { UpdatePlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: UpdatePlaylistResponse = { - contentType: "", - statusCode: 138183, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 138183, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/updateplayprogressrequest.md b/docs/sdk/models/operations/updateplayprogressrequest.md index b8058336..4d901413 100644 --- a/docs/sdk/models/operations/updateplayprogressrequest.md +++ b/docs/sdk/models/operations/updateplayprogressrequest.md @@ -6,9 +6,9 @@ import { UpdatePlayProgressRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: UpdatePlayProgressRequest = { - key: "", - time: 90000, - state: "played", + key: "", + time: 90000, + state: "played", }; ``` diff --git a/docs/sdk/models/operations/updateplayprogressresponse.md b/docs/sdk/models/operations/updateplayprogressresponse.md index 62f0f5ad..9b1640fc 100644 --- a/docs/sdk/models/operations/updateplayprogressresponse.md +++ b/docs/sdk/models/operations/updateplayprogressresponse.md @@ -6,11 +6,11 @@ import { UpdatePlayProgressResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: UpdatePlayProgressResponse = { - contentType: "", - statusCode: 963663, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 963663, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/uploadplaylistrequest.md b/docs/sdk/models/operations/uploadplaylistrequest.md index a82679f5..37d757f2 100644 --- a/docs/sdk/models/operations/uploadplaylistrequest.md +++ b/docs/sdk/models/operations/uploadplaylistrequest.md @@ -6,8 +6,8 @@ import { QueryParamForce, UploadPlaylistRequest } from "@lukehagar/plexjs/sdk/models/operations"; let value: UploadPlaylistRequest = { - path: "/home/barkley/playlist.m3u", - force: QueryParamForce.Zero, + path: "/home/barkley/playlist.m3u", + force: QueryParamForce.Zero, }; ``` diff --git a/docs/sdk/models/operations/uploadplaylistresponse.md b/docs/sdk/models/operations/uploadplaylistresponse.md index b7e6f562..dba949dd 100644 --- a/docs/sdk/models/operations/uploadplaylistresponse.md +++ b/docs/sdk/models/operations/uploadplaylistresponse.md @@ -6,11 +6,11 @@ import { UploadPlaylistResponse } from "@lukehagar/plexjs/sdk/models/operations"; let value: UploadPlaylistResponse = { - contentType: "", - statusCode: 622846, - rawResponse: new Response('{"message": "hello world"}', { - headers: { "Content-Type": "application/json" }, - }), + contentType: "", + statusCode: 622846, + rawResponse: new Response("{\"message\": \"hello world\"}", { + headers: { "Content-Type": "application/json" }, + }), }; ``` diff --git a/docs/sdk/models/operations/user.md b/docs/sdk/models/operations/user.md index 78651f66..27c0dc9d 100644 --- a/docs/sdk/models/operations/user.md +++ b/docs/sdk/models/operations/user.md @@ -6,7 +6,7 @@ import { User } from "@lukehagar/plexjs/sdk/models/operations"; let value: User = { - id: 220, + id: 220, }; ``` diff --git a/docs/sdk/models/operations/userprofile.md b/docs/sdk/models/operations/userprofile.md index 924658a0..c42c49ff 100644 --- a/docs/sdk/models/operations/userprofile.md +++ b/docs/sdk/models/operations/userprofile.md @@ -13,14 +13,14 @@ import { } from "@lukehagar/plexjs/sdk/models/operations"; let value: UserProfile = { - autoSelectAudio: true, - defaultAudioLanguage: "ja", - defaultSubtitleLanguage: "en", - autoSelectSubtitle: AutoSelectSubtitle.One, - defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, - defaultSubtitleForced: DefaultSubtitleForced.Zero, - watchedIndicator: WatchedIndicator.One, - mediaReviewsVisibility: MediaReviewsVisibility.One, + autoSelectAudio: true, + defaultAudioLanguage: "ja", + defaultSubtitleLanguage: "en", + autoSelectSubtitle: AutoSelectSubtitle.One, + defaultSubtitleAccessibility: DefaultSubtitleAccessibility.One, + defaultSubtitleForced: DefaultSubtitleForced.Zero, + watchedIndicator: WatchedIndicator.One, + mediaReviewsVisibility: MediaReviewsVisibility.One, }; ``` diff --git a/docs/sdk/models/operations/writer.md b/docs/sdk/models/operations/writer.md index 5f3e2a2c..eb344674 100644 --- a/docs/sdk/models/operations/writer.md +++ b/docs/sdk/models/operations/writer.md @@ -6,7 +6,7 @@ import { Writer } from "@lukehagar/plexjs/sdk/models/operations"; let value: Writer = { - tag: "Jeff Loveness", + tag: "Jeff Loveness", }; ``` diff --git a/docs/sdks/activities/README.md b/docs/sdks/activities/README.md index 373890b8..e1795e46 100644 --- a/docs/sdks/activities/README.md +++ b/docs/sdks/activities/README.md @@ -86,11 +86,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| errors.GetServerActivitiesResponseBody | 400 | application/json | -| errors.GetServerActivitiesActivitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetServerActivitiesBadRequest | 400 | application/json | +| errors.GetServerActivitiesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## cancelServerActivities @@ -163,8 +163,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| errors.CancelServerActivitiesResponseBody | 400 | application/json | -| errors.CancelServerActivitiesActivitiesResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.CancelServerActivitiesBadRequest | 400 | application/json | +| errors.CancelServerActivitiesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/authentication/README.md b/docs/sdks/authentication/README.md index a137d7c0..ca719457 100644 --- a/docs/sdks/authentication/README.md +++ b/docs/sdks/authentication/README.md @@ -8,9 +8,9 @@ API Calls regarding authentication for Plex Media Server ### Available Operations -* [getTransientToken](#gettransienttoken) - Get a Transient Token. +* [getTransientToken](#gettransienttoken) - Get a Transient Token * [getSourceConnectionInformation](#getsourceconnectioninformation) - Get Source Connection Information -* [getUserDetails](#getuserdetails) - Get User Data By Token +* [getTokenDetails](#gettokendetails) - Get Token Details * [postUsersSignInData](#postuserssignindata) - Get User Sign In Data ## getTransientToken @@ -87,11 +87,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -| errors.GetTransientTokenResponseBody | 400 | application/json | -| errors.GetTransientTokenAuthenticationResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetTransientTokenBadRequest | 400 | application/json | +| errors.GetTransientTokenUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getSourceConnectionInformation @@ -166,14 +166,14 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | -| errors.GetSourceConnectionInformationResponseBody | 400 | application/json | -| errors.GetSourceConnectionInformationAuthenticationResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| errors.GetSourceConnectionInformationBadRequest | 400 | application/json | +| errors.GetSourceConnectionInformationUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## getUserDetails +## getTokenDetails Get the User data from the provided X-Plex-Token @@ -188,7 +188,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const result = await plexAPI.authentication.getUserDetails("CV5xoxjTpFKUzBTShsaf"); + const result = await plexAPI.authentication.getTokenDetails(); // Handle the result console.log(result) @@ -203,7 +203,7 @@ The standalone function version of this method: ```typescript import { PlexAPICore } from "@lukehagar/plexjs/core.js"; -import { authenticationGetUserDetails } from "@lukehagar/plexjs/funcs/authenticationGetUserDetails.js"; +import { authenticationGetTokenDetails } from "@lukehagar/plexjs/funcs/authenticationGetTokenDetails.js"; // Use `PlexAPICore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -213,7 +213,7 @@ const plexAPI = new PlexAPICore({ }); async function run() { - const res = await authenticationGetUserDetails(plexAPI, "CV5xoxjTpFKUzBTShsaf"); + const res = await authenticationGetTokenDetails(plexAPI); if (!res.ok) { throw res.error; @@ -230,25 +230,24 @@ run(); ### Parameters -| Parameter | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `xPlexToken` | *string* | :heavy_check_mark: | Plex Authentication Token | [object Object] | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | -| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | ### Response -**Promise\<[operations.GetUserDetailsResponse](../../sdk/models/operations/getuserdetailsresponse.md)\>** +**Promise\<[operations.GetTokenDetailsResponse](../../sdk/models/operations/gettokendetailsresponse.md)\>** ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.GetUserDetailsResponseBody | 400 | application/json | -| errors.GetUserDetailsAuthenticationResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetTokenDetailsBadRequest | 400 | application/json | +| errors.GetTokenDetailsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## postUsersSignInData @@ -329,8 +328,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------------------- | ---------------------------------------------------- | ---------------------------------------------------- | -| errors.PostUsersSignInDataResponseBody | 400 | application/json | -| errors.PostUsersSignInDataAuthenticationResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.PostUsersSignInDataBadRequest | 400 | application/json | +| errors.PostUsersSignInDataUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/butler/README.md b/docs/sdks/butler/README.md index 636fa363..da8ca7d9 100644 --- a/docs/sdks/butler/README.md +++ b/docs/sdks/butler/README.md @@ -83,11 +83,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetButlerTasksResponseBody | 400 | application/json | -| errors.GetButlerTasksButlerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetButlerTasksBadRequest | 400 | application/json | +| errors.GetButlerTasksUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## startAllTasks @@ -164,11 +164,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.StartAllTasksResponseBody | 400 | application/json | -| errors.StartAllTasksButlerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.StartAllTasksBadRequest | 400 | application/json | +| errors.StartAllTasksUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## stopAllTasks @@ -241,11 +241,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.StopAllTasksResponseBody | 400 | application/json | -| errors.StopAllTasksButlerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.StopAllTasksBadRequest | 400 | application/json | +| errors.StopAllTasksUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## startTask @@ -325,11 +325,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.StartTaskResponseBody | 400 | application/json | -| errors.StartTaskButlerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.StartTaskBadRequest | 400 | application/json | +| errors.StartTaskUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## stopTask @@ -405,8 +405,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.StopTaskResponseBody | 400 | application/json | -| errors.StopTaskButlerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.StopTaskBadRequest | 400 | application/json | +| errors.StopTaskUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/hubs/README.md b/docs/sdks/hubs/README.md index 95b73155..6f2b8d28 100644 --- a/docs/sdks/hubs/README.md +++ b/docs/sdks/hubs/README.md @@ -82,11 +82,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetGlobalHubsResponseBody | 400 | application/json | -| errors.GetGlobalHubsHubsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetGlobalHubsBadRequest | 400 | application/json | +| errors.GetGlobalHubsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getLibraryHubs @@ -162,8 +162,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.GetLibraryHubsResponseBody | 400 | application/json | -| errors.GetLibraryHubsHubsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetLibraryHubsBadRequest | 400 | application/json | +| errors.GetLibraryHubsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/library/README.md b/docs/sdks/library/README.md index aa44c6da..4ed2ecfd 100644 --- a/docs/sdks/library/README.md +++ b/docs/sdks/library/README.md @@ -92,11 +92,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.GetFileHashResponseBody | 400 | application/json | -| errors.GetFileHashLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetFileHashBadRequest | 400 | application/json | +| errors.GetFileHashUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getRecentlyAdded @@ -171,11 +171,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.GetRecentlyAddedResponseBody | 400 | application/json | -| errors.GetRecentlyAddedLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetRecentlyAddedBadRequest | 400 | application/json | +| errors.GetRecentlyAddedUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getAllLibraries @@ -253,11 +253,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetAllLibrariesResponseBody | 400 | application/json | -| errors.GetAllLibrariesLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetAllLibrariesBadRequest | 400 | application/json | +| errors.GetAllLibrariesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getLibraryDetails @@ -370,11 +370,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| errors.GetLibraryDetailsResponseBody | 400 | application/json | -| errors.GetLibraryDetailsLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetLibraryDetailsBadRequest | 400 | application/json | +| errors.GetLibraryDetailsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## deleteLibrary @@ -447,11 +447,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.DeleteLibraryResponseBody | 400 | application/json | -| errors.DeleteLibraryLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.DeleteLibraryBadRequest | 400 | application/json | +| errors.DeleteLibraryUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getLibraryItems @@ -562,11 +562,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetLibraryItemsResponseBody | 400 | application/json | -| errors.GetLibraryItemsLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetLibraryItemsBadRequest | 400 | application/json | +| errors.GetLibraryItemsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getRefreshLibraryMetadata @@ -643,11 +643,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| errors.GetRefreshLibraryMetadataResponseBody | 400 | application/json | -| errors.GetRefreshLibraryMetadataLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| errors.GetRefreshLibraryMetadataBadRequest | 400 | application/json | +| errors.GetRefreshLibraryMetadataUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getSearchLibrary @@ -741,11 +741,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.GetSearchLibraryResponseBody | 400 | application/json | -| errors.GetSearchLibraryLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetSearchLibraryBadRequest | 400 | application/json | +| errors.GetSearchLibraryUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getMetaDataByRatingKey @@ -819,11 +819,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| errors.GetMetaDataByRatingKeyResponseBody | 400 | application/json | -| errors.GetMetaDataByRatingKeyLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetMetaDataByRatingKeyBadRequest | 400 | application/json | +| errors.GetMetaDataByRatingKeyUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getMetadataChildren @@ -898,11 +898,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| errors.GetMetadataChildrenResponseBody | 400 | application/json | -| errors.GetMetadataChildrenLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetMetadataChildrenBadRequest | 400 | application/json | +| errors.GetMetadataChildrenUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getTopWatchedContent @@ -979,11 +979,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| errors.GetTopWatchedContentResponseBody | 400 | application/json | -| errors.GetTopWatchedContentLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetTopWatchedContentBadRequest | 400 | application/json | +| errors.GetTopWatchedContentUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getOnDeck @@ -1056,8 +1056,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetOnDeckResponseBody | 400 | application/json | -| errors.GetOnDeckLibraryResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.GetOnDeckBadRequest | 400 | application/json | +| errors.GetOnDeckUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/log/README.md b/docs/sdks/log/README.md index af595a94..766716a7 100644 --- a/docs/sdks/log/README.md +++ b/docs/sdks/log/README.md @@ -87,11 +87,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------- | ----------------------------- | ----------------------------- | -| errors.LogLineResponseBody | 400 | application/json | -| errors.LogLineLogResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------- | -------------------------- | -------------------------- | +| errors.LogLineBadRequest | 400 | application/json | +| errors.LogLineUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## logMultiLine @@ -189,11 +189,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.LogMultiLineResponseBody | 400 | application/json | -| errors.LogMultiLineLogResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.LogMultiLineBadRequest | 400 | application/json | +| errors.LogMultiLineUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## enablePaperTrail @@ -266,8 +266,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.EnablePaperTrailResponseBody | 400 | application/json | -| errors.EnablePaperTrailLogResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.EnablePaperTrailBadRequest | 400 | application/json | +| errors.EnablePaperTrailUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/media/README.md b/docs/sdks/media/README.md index 744455c3..9ba2cc6f 100644 --- a/docs/sdks/media/README.md +++ b/docs/sdks/media/README.md @@ -84,11 +84,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.MarkPlayedResponseBody | 400 | application/json | -| errors.MarkPlayedMediaResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.MarkPlayedBadRequest | 400 | application/json | +| errors.MarkPlayedUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## markUnplayed @@ -161,11 +161,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.MarkUnplayedResponseBody | 400 | application/json | -| errors.MarkUnplayedMediaResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.MarkUnplayedBadRequest | 400 | application/json | +| errors.MarkUnplayedUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## updatePlayProgress @@ -241,11 +241,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.UpdatePlayProgressResponseBody | 400 | application/json | -| errors.UpdatePlayProgressMediaResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.UpdatePlayProgressBadRequest | 400 | application/json | +| errors.UpdatePlayProgressUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getBannerImage @@ -332,11 +332,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetBannerImageResponseBody | 400 | application/json | -| errors.GetBannerImageMediaResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetBannerImageBadRequest | 400 | application/json | +| errors.GetBannerImageUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getThumbImage @@ -423,8 +423,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.GetThumbImageResponseBody | 400 | application/json | -| errors.GetThumbImageMediaResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetThumbImageBadRequest | 400 | application/json | +| errors.GetThumbImageUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/playlists/README.md b/docs/sdks/playlists/README.md index 30e3cf65..cfc8fa3a 100644 --- a/docs/sdks/playlists/README.md +++ b/docs/sdks/playlists/README.md @@ -106,11 +106,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.CreatePlaylistResponseBody | 400 | application/json | -| errors.CreatePlaylistPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.CreatePlaylistBadRequest | 400 | application/json | +| errors.CreatePlaylistUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getPlaylists @@ -184,11 +184,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetPlaylistsResponseBody | 400 | application/json | -| errors.GetPlaylistsPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.GetPlaylistsBadRequest | 400 | application/json | +| errors.GetPlaylistsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getPlaylist @@ -263,11 +263,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------- | --------------------------------------- | --------------------------------------- | -| errors.GetPlaylistResponseBody | 400 | application/json | -| errors.GetPlaylistPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetPlaylistBadRequest | 400 | application/json | +| errors.GetPlaylistUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## deletePlaylist @@ -341,11 +341,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.DeletePlaylistResponseBody | 400 | application/json | -| errors.DeletePlaylistPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.DeletePlaylistBadRequest | 400 | application/json | +| errors.DeletePlaylistUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## updatePlaylist @@ -421,11 +421,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.UpdatePlaylistResponseBody | 400 | application/json | -| errors.UpdatePlaylistPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.UpdatePlaylistBadRequest | 400 | application/json | +| errors.UpdatePlaylistUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getPlaylistContents @@ -505,11 +505,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.GetPlaylistContentsResponseBody | 400 | application/json | -| errors.GetPlaylistContentsPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetPlaylistContentsBadRequest | 400 | application/json | +| errors.GetPlaylistContentsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## clearPlaylistContents @@ -583,11 +583,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| errors.ClearPlaylistContentsResponseBody | 400 | application/json | -| errors.ClearPlaylistContentsPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.ClearPlaylistContentsBadRequest | 400 | application/json | +| errors.ClearPlaylistContentsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## addPlaylistContents @@ -664,11 +664,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.AddPlaylistContentsResponseBody | 400 | application/json | -| errors.AddPlaylistContentsPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.AddPlaylistContentsBadRequest | 400 | application/json | +| errors.AddPlaylistContentsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## uploadPlaylist @@ -745,8 +745,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.UploadPlaylistResponseBody | 400 | application/json | -| errors.UploadPlaylistPlaylistsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.UploadPlaylistBadRequest | 400 | application/json | +| errors.UploadPlaylistUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/plex/README.md b/docs/sdks/plex/README.md index 29d0dd85..36ad0235 100644 --- a/docs/sdks/plex/README.md +++ b/docs/sdks/plex/README.md @@ -86,11 +86,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetCompanionsDataResponseBody | 400 | application/json | -| errors.GetCompanionsDataPlexResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetCompanionsDataBadRequest | 400 | application/json | +| errors.GetCompanionsDataUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getUserFriends @@ -163,11 +163,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------- | ------------------------------------- | ------------------------------------- | -| errors.GetUserFriendsResponseBody | 400 | application/json | -| errors.GetUserFriendsPlexResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.GetUserFriendsBadRequest | 400 | application/json | +| errors.GetUserFriendsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getGeoData @@ -238,11 +238,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.GetGeoDataResponseBody | 400 | application/json | -| errors.GetGeoDataPlexResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.GetGeoDataBadRequest | 400 | application/json | +| errors.GetGeoDataUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getHomeData @@ -314,11 +314,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------- | ---------------------------------- | ---------------------------------- | -| errors.GetHomeDataResponseBody | 400 | application/json | -| errors.GetHomeDataPlexResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetHomeDataBadRequest | 400 | application/json | +| errors.GetHomeDataUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getServerResources @@ -337,12 +337,7 @@ const plexAPI = new PlexAPI({ }); async function run() { - const result = await plexAPI.plex.getServerResources({ - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - includeHttps: IncludeHttps.One, - includeRelay: IncludeRelay.One, - includeIPv6: IncludeIPv6.One, - }); + const result = await plexAPI.plex.getServerResources("gcgzw5rz2xovp84b4vha3a40", IncludeHttps.One, IncludeRelay.One, IncludeIPv6.One); // Handle the result console.log(result) @@ -368,12 +363,7 @@ const plexAPI = new PlexAPICore({ }); async function run() { - const res = await plexGetServerResources(plexAPI, { - xPlexToken: "CV5xoxjTpFKUzBTShsaf", - includeHttps: IncludeHttps.One, - includeRelay: IncludeRelay.One, - includeIPv6: IncludeIPv6.One, - }); + const res = await plexGetServerResources(plexAPI, "gcgzw5rz2xovp84b4vha3a40", IncludeHttps.One, IncludeRelay.One, IncludeIPv6.One); if (!res.ok) { throw res.error; @@ -390,13 +380,16 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.GetServerResourcesRequest](../../sdk/models/operations/getserverresourcesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | -| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | +| Parameter | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `xPlexClientIdentifier` | *string* | :heavy_minus_sign: | The unique identifier for the client application
This is used to track the client application and its usage
(UUID, serial number, or other number unique per device)
| [object Object] | +| `includeHttps` | [operations.IncludeHttps](../../sdk/models/operations/includehttps.md) | :heavy_minus_sign: | Include Https entries in the results | [object Object] | +| `includeRelay` | [operations.IncludeRelay](../../sdk/models/operations/includerelay.md) | :heavy_minus_sign: | Include Relay addresses in the results
E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400
| [object Object] | +| `includeIPv6` | [operations.IncludeIPv6](../../sdk/models/operations/includeipv6.md) | :heavy_minus_sign: | Include IPv6 entries in the results | [object Object] | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | | +| `options.serverURL` | *string* | :heavy_minus_sign: | An optional server URL to use. | http://localhost:8080 | ### Response @@ -404,11 +397,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetServerResourcesResponseBody | 400 | application/json | -| errors.GetServerResourcesPlexResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.GetServerResourcesBadRequest | 400 | application/json | +| errors.GetServerResourcesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getPin @@ -482,10 +475,10 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------- | ------------------------- | ------------------------- | -| errors.GetPinResponseBody | 400 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.GetPinBadRequest | 400 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getTokenByPinId @@ -558,8 +551,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetTokenByPinIdResponseBody | 400 | application/json | -| errors.GetTokenByPinIdPlexResponseBody | 404 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetTokenByPinIdBadRequest | 400 | application/json | +| errors.GetTokenByPinIdResponseBody | 404 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/search/README.md b/docs/sdks/search/README.md index 05a4cbb9..c0a7e6bb 100644 --- a/docs/sdks/search/README.md +++ b/docs/sdks/search/README.md @@ -96,11 +96,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.PerformSearchResponseBody | 400 | application/json | -| errors.PerformSearchSearchResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.PerformSearchBadRequest | 400 | application/json | +| errors.PerformSearchUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## performVoiceSearch @@ -179,11 +179,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| errors.PerformVoiceSearchResponseBody | 400 | application/json | -| errors.PerformVoiceSearchSearchResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | +| errors.PerformVoiceSearchBadRequest | 400 | application/json | +| errors.PerformVoiceSearchUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getSearchResults @@ -256,8 +256,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetSearchResultsResponseBody | 400 | application/json | -| errors.GetSearchResultsSearchResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetSearchResultsBadRequest | 400 | application/json | +| errors.GetSearchResultsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/server/README.md b/docs/sdks/server/README.md index 57c405c4..6a1bbfea 100644 --- a/docs/sdks/server/README.md +++ b/docs/sdks/server/README.md @@ -87,11 +87,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| errors.GetServerCapabilitiesResponseBody | 400 | application/json | -| errors.GetServerCapabilitiesServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| errors.GetServerCapabilitiesBadRequest | 400 | application/json | +| errors.GetServerCapabilitiesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getServerPreferences @@ -163,11 +163,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------- | --------------------------------------------- | --------------------------------------------- | -| errors.GetServerPreferencesResponseBody | 400 | application/json | -| errors.GetServerPreferencesServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetServerPreferencesBadRequest | 400 | application/json | +| errors.GetServerPreferencesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getAvailableClients @@ -239,11 +239,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| errors.GetAvailableClientsResponseBody | 400 | application/json | -| errors.GetAvailableClientsServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetAvailableClientsBadRequest | 400 | application/json | +| errors.GetAvailableClientsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getDevices @@ -315,11 +315,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetDevicesResponseBody | 400 | application/json | -| errors.GetDevicesServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------- | ----------------------------- | ----------------------------- | +| errors.GetDevicesBadRequest | 400 | application/json | +| errors.GetDevicesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getServerIdentity @@ -389,10 +389,10 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | -| errors.GetServerIdentityResponseBody | 408 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| errors.GetServerIdentityRequestTimeout | 408 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getMyPlexAccount @@ -464,11 +464,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetMyPlexAccountResponseBody | 400 | application/json | -| errors.GetMyPlexAccountServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.GetMyPlexAccountBadRequest | 400 | application/json | +| errors.GetMyPlexAccountUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getResizedPhoto @@ -560,11 +560,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetResizedPhotoResponseBody | 400 | application/json | -| errors.GetResizedPhotoServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetResizedPhotoBadRequest | 400 | application/json | +| errors.GetResizedPhotoUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getMediaProviders @@ -637,11 +637,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.GetMediaProvidersResponseBody | 400 | application/json | -| errors.GetMediaProvidersServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetMediaProvidersBadRequest | 400 | application/json | +| errors.GetMediaProvidersUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getServerList @@ -713,8 +713,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetServerListResponseBody | 400 | application/json | -| errors.GetServerListServerResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetServerListBadRequest | 400 | application/json | +| errors.GetServerListUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/sessions/README.md b/docs/sdks/sessions/README.md index 8c04331c..0b60b42a 100644 --- a/docs/sdks/sessions/README.md +++ b/docs/sdks/sessions/README.md @@ -82,11 +82,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.GetSessionsResponseBody | 400 | application/json | -| errors.GetSessionsSessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetSessionsBadRequest | 400 | application/json | +| errors.GetSessionsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getSessionHistory @@ -162,11 +162,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -| errors.GetSessionHistoryResponseBody | 400 | application/json | -| errors.GetSessionHistorySessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | +| errors.GetSessionHistoryBadRequest | 400 | application/json | +| errors.GetSessionHistoryUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getTranscodeSessions @@ -238,11 +238,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.GetTranscodeSessionsResponseBody | 400 | application/json | -| errors.GetTranscodeSessionsSessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.GetTranscodeSessionsBadRequest | 400 | application/json | +| errors.GetTranscodeSessionsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## stopTranscodeSession @@ -315,8 +315,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.StopTranscodeSessionResponseBody | 400 | application/json | -| errors.StopTranscodeSessionSessionsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | +| errors.StopTranscodeSessionBadRequest | 400 | application/json | +| errors.StopTranscodeSessionUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/statistics/README.md b/docs/sdks/statistics/README.md index 1db1939d..e11559e6 100644 --- a/docs/sdks/statistics/README.md +++ b/docs/sdks/statistics/README.md @@ -82,11 +82,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | -| errors.GetStatisticsResponseBody | 400 | application/json | -| errors.GetStatisticsStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| -------------------------------- | -------------------------------- | -------------------------------- | +| errors.GetStatisticsBadRequest | 400 | application/json | +| errors.GetStatisticsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getResourcesStatistics @@ -159,11 +159,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| errors.GetResourcesStatisticsResponseBody | 400 | application/json | -| errors.GetResourcesStatisticsStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetResourcesStatisticsBadRequest | 400 | application/json | +| errors.GetResourcesStatisticsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## getBandwidthStatistics @@ -236,8 +236,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | -| errors.GetBandwidthStatisticsResponseBody | 400 | application/json | -| errors.GetBandwidthStatisticsStatisticsResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| errors.GetBandwidthStatisticsBadRequest | 400 | application/json | +| errors.GetBandwidthStatisticsUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/updater/README.md b/docs/sdks/updater/README.md index d5294f3c..e4563416 100644 --- a/docs/sdks/updater/README.md +++ b/docs/sdks/updater/README.md @@ -82,11 +82,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.GetUpdateStatusResponseBody | 400 | application/json | -| errors.GetUpdateStatusUpdaterResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.GetUpdateStatusBadRequest | 400 | application/json | +| errors.GetUpdateStatusUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## checkForUpdates @@ -161,11 +161,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | -| errors.CheckForUpdatesResponseBody | 400 | application/json | -| errors.CheckForUpdatesUpdaterResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.CheckForUpdatesBadRequest | 400 | application/json | +| errors.CheckForUpdatesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## applyUpdates @@ -242,8 +242,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ApplyUpdatesResponseBody | 400 | application/json | -| errors.ApplyUpdatesUpdaterResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ApplyUpdatesBadRequest | 400 | application/json | +| errors.ApplyUpdatesUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/video/README.md b/docs/sdks/video/README.md index 82c6ee2a..40f00498 100644 --- a/docs/sdks/video/README.md +++ b/docs/sdks/video/README.md @@ -105,11 +105,11 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------- | ----------------------------------- | ----------------------------------- | -| errors.GetTimelineResponseBody | 400 | application/json | -| errors.GetTimelineVideoResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------ | ------------------------------ | ------------------------------ | +| errors.GetTimelineBadRequest | 400 | application/json | +| errors.GetTimelineUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | ## startUniversalTranscode @@ -216,8 +216,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | -| errors.StartUniversalTranscodeResponseBody | 400 | application/json | -| errors.StartUniversalTranscodeVideoResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| errors.StartUniversalTranscodeBadRequest | 400 | application/json | +| errors.StartUniversalTranscodeUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/docs/sdks/watchlist/README.md b/docs/sdks/watchlist/README.md index 5ae3f61f..2cc58db8 100644 --- a/docs/sdks/watchlist/README.md +++ b/docs/sdks/watchlist/README.md @@ -93,8 +93,8 @@ run(); ### Errors -| Error Object | Status Code | Content Type | -| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | -| errors.GetWatchListResponseBody | 400 | application/json | -| errors.GetWatchListWatchlistResponseBody | 401 | application/json | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.GetWatchListBadRequest | 400 | application/json | +| errors.GetWatchListUnauthorized | 401 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/jsr.json b/jsr.json index 44ed0984..373ca018 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@lukehagar/plexjs", - "version": "0.21.1", + "version": "0.22.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index 7a06de4b..6975f43b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@lukehagar/plexjs", - "version": "0.21.1", + "version": "0.22.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@lukehagar/plexjs", - "version": "0.21.1", + "version": "0.22.0", "devDependencies": { "@types/node": "^18.19.3", "@typescript-eslint/eslint-plugin": "^7.7.1", diff --git a/package.json b/package.json index d3e5e93f..64984839 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lukehagar/plexjs", - "version": "0.21.1", + "version": "0.22.0", "author": "LukeHagar", "main": "./index.js", "sideEffects": false, diff --git a/src/funcs/activitiesCancelServerActivities.ts b/src/funcs/activitiesCancelServerActivities.ts index 87700ee5..00ab5c0c 100644 --- a/src/funcs/activitiesCancelServerActivities.ts +++ b/src/funcs/activitiesCancelServerActivities.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,115 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * Cancel Server Activities */ export async function activitiesCancelServerActivities( - client$: PlexAPICore, - activityUUID: string, - options?: RequestOptions + client$: PlexAPICore, + activityUUID: string, + options?: RequestOptions, ): Promise< - Result< - operations.CancelServerActivitiesResponse, - | errors.CancelServerActivitiesResponseBody - | errors.CancelServerActivitiesActivitiesResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CancelServerActivitiesResponse, + | errors.CancelServerActivitiesBadRequest + | errors.CancelServerActivitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.CancelServerActivitiesRequest = { - activityUUID: activityUUID, - }; + const input$: operations.CancelServerActivitiesRequest = { + activityUUID: activityUUID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CancelServerActivitiesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CancelServerActivitiesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - activityUUID: encodeSimple$("activityUUID", payload$.activityUUID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + activityUUID: encodeSimple$("activityUUID", payload$.activityUUID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/activities/{activityUUID}")(pathParams$); + const path$ = pathToFunc("/activities/{activityUUID}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "cancelServerActivities", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "cancelServerActivities", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CancelServerActivitiesResponse, - | errors.CancelServerActivitiesResponseBody - | errors.CancelServerActivitiesActivitiesResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.CancelServerActivitiesResponse$inboundSchema), - m$.jsonErr(400, errors.CancelServerActivitiesResponseBody$inboundSchema), - m$.jsonErr(401, errors.CancelServerActivitiesActivitiesResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CancelServerActivitiesResponse, + | errors.CancelServerActivitiesBadRequest + | errors.CancelServerActivitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.CancelServerActivitiesResponse$inboundSchema), + m$.jsonErr(400, errors.CancelServerActivitiesBadRequest$inboundSchema), + m$.jsonErr(401, errors.CancelServerActivitiesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/activitiesGetServerActivities.ts b/src/funcs/activitiesGetServerActivities.ts index 686c47da..747cf54a 100644 --- a/src/funcs/activitiesGetServerActivities.ts +++ b/src/funcs/activitiesGetServerActivities.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Server Activities */ export async function activitiesGetServerActivities( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetServerActivitiesResponse, - | errors.GetServerActivitiesResponseBody - | errors.GetServerActivitiesActivitiesResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerActivitiesResponse, + | errors.GetServerActivitiesBadRequest + | errors.GetServerActivitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/activities")(); + const path$ = pathToFunc("/activities")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getServerActivities", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getServerActivities", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerActivitiesResponse, - | errors.GetServerActivitiesResponseBody - | errors.GetServerActivitiesActivitiesResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerActivitiesResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetServerActivitiesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetServerActivitiesActivitiesResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerActivitiesResponse, + | errors.GetServerActivitiesBadRequest + | errors.GetServerActivitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerActivitiesResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetServerActivitiesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetServerActivitiesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/authenticationGetSourceConnectionInformation.ts b/src/funcs/authenticationGetSourceConnectionInformation.ts index bc39c0ad..5a858395 100644 --- a/src/funcs/authenticationGetSourceConnectionInformation.ts +++ b/src/funcs/authenticationGetSourceConnectionInformation.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -28,119 +28,125 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. * Note: requires Plex Media Server >= 1.15.4. - * */ export async function authenticationGetSourceConnectionInformation( - client$: PlexAPICore, - source: string, - options?: RequestOptions + client$: PlexAPICore, + source: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetSourceConnectionInformationResponse, - | errors.GetSourceConnectionInformationResponseBody - | errors.GetSourceConnectionInformationAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSourceConnectionInformationResponse, + | errors.GetSourceConnectionInformationBadRequest + | errors.GetSourceConnectionInformationUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetSourceConnectionInformationRequest = { - source: source, - }; + const input$: operations.GetSourceConnectionInformationRequest = { + source: source, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSourceConnectionInformationRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetSourceConnectionInformationRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/security/resources")(); + const path$ = pathToFunc("/security/resources")(); - const query$ = encodeFormQuery$({ - source: payload$.source, - }); + const query$ = encodeFormQuery$({ + "source": payload$.source, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getSourceConnectionInformation", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getSourceConnectionInformation", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetSourceConnectionInformationResponse, - | errors.GetSourceConnectionInformationResponseBody - | errors.GetSourceConnectionInformationAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetSourceConnectionInformationResponse$inboundSchema), - m$.jsonErr(400, errors.GetSourceConnectionInformationResponseBody$inboundSchema), - m$.jsonErr( - 401, - errors.GetSourceConnectionInformationAuthenticationResponseBody$inboundSchema - ), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetSourceConnectionInformationResponse, + | errors.GetSourceConnectionInformationBadRequest + | errors.GetSourceConnectionInformationUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil( + 200, + operations.GetSourceConnectionInformationResponse$inboundSchema, + ), + m$.jsonErr( + 400, + errors.GetSourceConnectionInformationBadRequest$inboundSchema, + ), + m$.jsonErr( + 401, + errors.GetSourceConnectionInformationUnauthorized$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/authenticationGetTokenDetails.ts b/src/funcs/authenticationGetTokenDetails.ts new file mode 100644 index 00000000..e4957001 --- /dev/null +++ b/src/funcs/authenticationGetTokenDetails.ts @@ -0,0 +1,122 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { PlexAPICore } from "../core.js"; +import * as m$ from "../lib/matchers.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../sdk/models/errors/httpclienterrors.js"; +import * as errors from "../sdk/models/errors/index.js"; +import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import { GetTokenDetailsServerList } from "../sdk/models/operations/gettokendetails.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get Token Details + * + * @remarks + * Get the User data from the provided X-Plex-Token + */ +export async function authenticationGetTokenDetails( + client$: PlexAPICore, + options?: RequestOptions & { serverURL?: string }, +): Promise< + Result< + operations.GetTokenDetailsResponse, + | errors.GetTokenDetailsBadRequest + | errors.GetTokenDetailsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const baseURL$ = options?.serverURL + || pathToFunc(GetTokenDetailsServerList[0], { charEncoding: "percent" })(); + + const path$ = pathToFunc("/user")(); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getTokenDetails", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + + const [result$] = await m$.match< + operations.GetTokenDetailsResponse, + | errors.GetTokenDetailsBadRequest + | errors.GetTokenDetailsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTokenDetailsResponse$inboundSchema, { + key: "UserPlexAccount", + }), + m$.jsonErr(400, errors.GetTokenDetailsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetTokenDetailsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/src/funcs/authenticationGetTransientToken.ts b/src/funcs/authenticationGetTransientToken.ts index 343bd654..b91efb8f 100644 --- a/src/funcs/authenticationGetTransientToken.ts +++ b/src/funcs/authenticationGetTransientToken.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -23,123 +23,121 @@ import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; /** - * Get a Transient Token. + * Get a Transient Token * * @remarks * This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * */ export async function authenticationGetTransientToken( - client$: PlexAPICore, - type: operations.GetTransientTokenQueryParamType, - scope: operations.Scope, - options?: RequestOptions + client$: PlexAPICore, + type: operations.GetTransientTokenQueryParamType, + scope: operations.Scope, + options?: RequestOptions, ): Promise< - Result< - operations.GetTransientTokenResponse, - | errors.GetTransientTokenResponseBody - | errors.GetTransientTokenAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTransientTokenResponse, + | errors.GetTransientTokenBadRequest + | errors.GetTransientTokenUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTransientTokenRequest = { - type: type, - scope: scope, - }; + const input$: operations.GetTransientTokenRequest = { + type: type, + scope: scope, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTransientTokenRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTransientTokenRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/security/token")(); + const path$ = pathToFunc("/security/token")(); - const query$ = encodeFormQuery$({ - scope: payload$.scope, - type: payload$.type, - }); + const query$ = encodeFormQuery$({ + "scope": payload$.scope, + "type": payload$.type, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getTransientToken", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getTransientToken", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetTransientTokenResponse, - | errors.GetTransientTokenResponseBody - | errors.GetTransientTokenAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetTransientTokenResponse$inboundSchema), - m$.jsonErr(400, errors.GetTransientTokenResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetTransientTokenAuthenticationResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetTransientTokenResponse, + | errors.GetTransientTokenBadRequest + | errors.GetTransientTokenUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.GetTransientTokenResponse$inboundSchema), + m$.jsonErr(400, errors.GetTransientTokenBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetTransientTokenUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/authenticationGetUserDetails.ts b/src/funcs/authenticationGetUserDetails.ts deleted file mode 100644 index 37658e89..00000000 --- a/src/funcs/authenticationGetUserDetails.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { PlexAPICore } from "../core.js"; -import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; -import * as m$ from "../lib/matchers.js"; -import * as schemas$ from "../lib/schemas.js"; -import { RequestOptions } from "../lib/sdks.js"; -import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; -import { pathToFunc } from "../lib/url.js"; -import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, -} from "../sdk/models/errors/httpclienterrors.js"; -import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { GetUserDetailsServerList } from "../sdk/models/operations/getuserdetails.js"; -import * as operations from "../sdk/models/operations/index.js"; -import { Result } from "../sdk/types/fp.js"; - -/** - * Get User Data By Token - * - * @remarks - * Get the User data from the provided X-Plex-Token - */ -export async function authenticationGetUserDetails( - client$: PlexAPICore, - xPlexToken: string, - options?: RequestOptions & { serverURL?: string } -): Promise< - Result< - operations.GetUserDetailsResponse, - | errors.GetUserDetailsResponseBody - | errors.GetUserDetailsAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > -> { - const input$: operations.GetUserDetailsRequest = { - xPlexToken: xPlexToken, - }; - - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetUserDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; - - const baseURL$ = - options?.serverURL || - pathToFunc(GetUserDetailsServerList[0], { charEncoding: "percent" })(); - - const path$ = pathToFunc("/user")(); - - const query$ = encodeFormQuery$({ - "X-Plex-Token": payload$["X-Plex-Token"], - }); - - const headers$ = new Headers({ - Accept: "application/json", - }); - - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getUserDetails", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); - - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; - - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; - - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetUserDetailsResponse, - | errors.GetUserDetailsResponseBody - | errors.GetUserDetailsAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetUserDetailsResponse$inboundSchema, { key: "UserPlexAccount" }), - m$.jsonErr(400, errors.GetUserDetailsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetUserDetailsAuthenticationResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } - - return result$; -} diff --git a/src/funcs/authenticationPostUsersSignInData.ts b/src/funcs/authenticationPostUsersSignInData.ts index ce2ad539..629798e9 100644 --- a/src/funcs/authenticationPostUsersSignInData.ts +++ b/src/funcs/authenticationPostUsersSignInData.ts @@ -4,19 +4,19 @@ import { PlexAPICore } from "../core.js"; import { - encodeBodyForm as encodeBodyForm$, - encodeFormQuery as encodeFormQuery$, + encodeBodyForm as encodeBodyForm$, + encodeFormQuery as encodeFormQuery$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -32,124 +32,122 @@ import { Result } from "../sdk/types/fp.js"; * Sign in user with username and password and return user data with Plex authentication token */ export async function authenticationPostUsersSignInData( - client$: PlexAPICore, - xPlexClientIdentifier?: string | undefined, - requestBody?: operations.PostUsersSignInDataRequestBody | undefined, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + xPlexClientIdentifier?: string | undefined, + requestBody?: operations.PostUsersSignInDataRequestBody | undefined, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.PostUsersSignInDataResponse, - | errors.PostUsersSignInDataResponseBody - | errors.PostUsersSignInDataAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PostUsersSignInDataResponse, + | errors.PostUsersSignInDataBadRequest + | errors.PostUsersSignInDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.PostUsersSignInDataRequest = { - xPlexClientIdentifier: xPlexClientIdentifier, - requestBody: requestBody, - }; + const input$: operations.PostUsersSignInDataRequest = { + xPlexClientIdentifier: xPlexClientIdentifier, + requestBody: requestBody, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PostUsersSignInDataRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = Object.entries(payload$.RequestBody || {}) - .map(([k, v]) => { - return encodeBodyForm$(k, v, { charEncoding: "percent" }); - }) - .join("&"); + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PostUsersSignInDataRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = Object.entries(payload$.RequestBody || {}).map(([k, v]) => { + return encodeBodyForm$(k, v, { charEncoding: "percent" }); + }).join("&"); - const baseURL$ = - options?.serverURL || - pathToFunc(PostUsersSignInDataServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(PostUsersSignInDataServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/users/signin")(); + const path$ = pathToFunc("/users/signin")(); - const query$ = encodeFormQuery$({ - "X-Plex-Client-Identifier": - payload$["X-Plex-Client-Identifier"] ?? client$.options$.xPlexClientIdentifier, - }); + const query$ = encodeFormQuery$({ + "X-Plex-Client-Identifier": payload$["X-Plex-Client-Identifier"] + ?? client$.options$.xPlexClientIdentifier, + }); - const headers$ = new Headers({ - "Content-Type": "application/x-www-form-urlencoded", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "application/x-www-form-urlencoded", + Accept: "application/json", + }); - const context = { - operationID: "post-users-sign-in-data", - oAuth2Scopes: [], - securitySource: null, - }; + const context = { + operationID: "post-users-sign-in-data", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PostUsersSignInDataResponse, - | errors.PostUsersSignInDataResponseBody - | errors.PostUsersSignInDataAuthenticationResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(201, operations.PostUsersSignInDataResponse$inboundSchema, { - key: "UserPlexAccount", - }), - m$.jsonErr(400, errors.PostUsersSignInDataResponseBody$inboundSchema), - m$.jsonErr(401, errors.PostUsersSignInDataAuthenticationResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PostUsersSignInDataResponse, + | errors.PostUsersSignInDataBadRequest + | errors.PostUsersSignInDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(201, operations.PostUsersSignInDataResponse$inboundSchema, { + key: "UserPlexAccount", + }), + m$.jsonErr(400, errors.PostUsersSignInDataBadRequest$inboundSchema), + m$.jsonErr(401, errors.PostUsersSignInDataUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/butlerGetButlerTasks.ts b/src/funcs/butlerGetButlerTasks.ts index 3ce74fa8..2c0819e9 100644 --- a/src/funcs/butlerGetButlerTasks.ts +++ b/src/funcs/butlerGetButlerTasks.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Returns a list of butler tasks */ export async function butlerGetButlerTasks( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetButlerTasksResponse, - | errors.GetButlerTasksResponseBody - | errors.GetButlerTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetButlerTasksResponse, + | errors.GetButlerTasksBadRequest + | errors.GetButlerTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/butler")(); + const path$ = pathToFunc("/butler")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getButlerTasks", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getButlerTasks", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetButlerTasksResponse, - | errors.GetButlerTasksResponseBody - | errors.GetButlerTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetButlerTasksResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetButlerTasksResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetButlerTasksButlerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetButlerTasksResponse, + | errors.GetButlerTasksBadRequest + | errors.GetButlerTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetButlerTasksResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetButlerTasksBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetButlerTasksUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/butlerStartAllTasks.ts b/src/funcs/butlerStartAllTasks.ts index 2bf6cb80..08b1f85f 100644 --- a/src/funcs/butlerStartAllTasks.ts +++ b/src/funcs/butlerStartAllTasks.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,94 +29,91 @@ import { Result } from "../sdk/types/fp.js"; * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. * 4. If we are outside the configured window, the task will start immediately. - * */ export async function butlerStartAllTasks( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.StartAllTasksResponse, - | errors.StartAllTasksResponseBody - | errors.StartAllTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StartAllTasksResponse, + | errors.StartAllTasksBadRequest + | errors.StartAllTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/butler")(); + const path$ = pathToFunc("/butler")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "startAllTasks", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "startAllTasks", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StartAllTasksResponse, - | errors.StartAllTasksResponseBody - | errors.StartAllTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.StartAllTasksResponse$inboundSchema), - m$.jsonErr(400, errors.StartAllTasksResponseBody$inboundSchema), - m$.jsonErr(401, errors.StartAllTasksButlerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StartAllTasksResponse, + | errors.StartAllTasksBadRequest + | errors.StartAllTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.StartAllTasksResponse$inboundSchema), + m$.jsonErr(400, errors.StartAllTasksBadRequest$inboundSchema), + m$.jsonErr(401, errors.StartAllTasksUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/butlerStartTask.ts b/src/funcs/butlerStartTask.ts index c5b8caa8..f07c3cf5 100644 --- a/src/funcs/butlerStartTask.ts +++ b/src/funcs/butlerStartTask.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -31,118 +31,115 @@ import { Result } from "../sdk/types/fp.js"; * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. * 4. If we are outside the configured window, the task will start immediately. - * */ export async function butlerStartTask( - client$: PlexAPICore, - taskName: operations.TaskName, - options?: RequestOptions + client$: PlexAPICore, + taskName: operations.TaskName, + options?: RequestOptions, ): Promise< - Result< - operations.StartTaskResponse, - | errors.StartTaskResponseBody - | errors.StartTaskButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StartTaskResponse, + | errors.StartTaskBadRequest + | errors.StartTaskUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.StartTaskRequest = { - taskName: taskName, - }; + const input$: operations.StartTaskRequest = { + taskName: taskName, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.StartTaskRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.StartTaskRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - taskName: encodeSimple$("taskName", payload$.taskName, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + taskName: encodeSimple$("taskName", payload$.taskName, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/butler/{taskName}")(pathParams$); + const path$ = pathToFunc("/butler/{taskName}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "startTask", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "startTask", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StartTaskResponse, - | errors.StartTaskResponseBody - | errors.StartTaskButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil([200, 202], operations.StartTaskResponse$inboundSchema), - m$.jsonErr(400, errors.StartTaskResponseBody$inboundSchema), - m$.jsonErr(401, errors.StartTaskButlerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StartTaskResponse, + | errors.StartTaskBadRequest + | errors.StartTaskUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil([200, 202], operations.StartTaskResponse$inboundSchema), + m$.jsonErr(400, errors.StartTaskBadRequest$inboundSchema), + m$.jsonErr(401, errors.StartTaskUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/butlerStopAllTasks.ts b/src/funcs/butlerStopAllTasks.ts index e4244dcf..b59c86f3 100644 --- a/src/funcs/butlerStopAllTasks.ts +++ b/src/funcs/butlerStopAllTasks.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -25,94 +25,91 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - * */ export async function butlerStopAllTasks( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.StopAllTasksResponse, - | errors.StopAllTasksResponseBody - | errors.StopAllTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StopAllTasksResponse, + | errors.StopAllTasksBadRequest + | errors.StopAllTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/butler")(); + const path$ = pathToFunc("/butler")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "stopAllTasks", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "stopAllTasks", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StopAllTasksResponse, - | errors.StopAllTasksResponseBody - | errors.StopAllTasksButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.StopAllTasksResponse$inboundSchema), - m$.jsonErr(400, errors.StopAllTasksResponseBody$inboundSchema), - m$.jsonErr(401, errors.StopAllTasksButlerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StopAllTasksResponse, + | errors.StopAllTasksBadRequest + | errors.StopAllTasksUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.StopAllTasksResponse$inboundSchema), + m$.jsonErr(400, errors.StopAllTasksBadRequest$inboundSchema), + m$.jsonErr(401, errors.StopAllTasksUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/butlerStopTask.ts b/src/funcs/butlerStopTask.ts index d06d667e..25199e3a 100644 --- a/src/funcs/butlerStopTask.ts +++ b/src/funcs/butlerStopTask.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,118 +27,115 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. - * */ export async function butlerStopTask( - client$: PlexAPICore, - taskName: operations.PathParamTaskName, - options?: RequestOptions + client$: PlexAPICore, + taskName: operations.PathParamTaskName, + options?: RequestOptions, ): Promise< - Result< - operations.StopTaskResponse, - | errors.StopTaskResponseBody - | errors.StopTaskButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StopTaskResponse, + | errors.StopTaskBadRequest + | errors.StopTaskUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.StopTaskRequest = { - taskName: taskName, - }; + const input$: operations.StopTaskRequest = { + taskName: taskName, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.StopTaskRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.StopTaskRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - taskName: encodeSimple$("taskName", payload$.taskName, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + taskName: encodeSimple$("taskName", payload$.taskName, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/butler/{taskName}")(pathParams$); + const path$ = pathToFunc("/butler/{taskName}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "stopTask", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "stopTask", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "404", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "404", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StopTaskResponse, - | errors.StopTaskResponseBody - | errors.StopTaskButlerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.StopTaskResponse$inboundSchema), - m$.jsonErr(400, errors.StopTaskResponseBody$inboundSchema), - m$.jsonErr(401, errors.StopTaskButlerResponseBody$inboundSchema), - m$.fail([404, "4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StopTaskResponse, + | errors.StopTaskBadRequest + | errors.StopTaskUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.StopTaskResponse$inboundSchema), + m$.jsonErr(400, errors.StopTaskBadRequest$inboundSchema), + m$.jsonErr(401, errors.StopTaskUnauthorized$inboundSchema), + m$.fail([404, "4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/hubsGetGlobalHubs.ts b/src/funcs/hubsGetGlobalHubs.ts index 4018d0ba..5970b387 100644 --- a/src/funcs/hubsGetGlobalHubs.ts +++ b/src/funcs/hubsGetGlobalHubs.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,116 +29,116 @@ import { Result } from "../sdk/types/fp.js"; * Get Global Hubs filtered by the parameters provided. */ export async function hubsGetGlobalHubs( - client$: PlexAPICore, - count?: number | undefined, - onlyTransient?: operations.OnlyTransient | undefined, - options?: RequestOptions + client$: PlexAPICore, + count?: number | undefined, + onlyTransient?: operations.OnlyTransient | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetGlobalHubsResponse, - | errors.GetGlobalHubsResponseBody - | errors.GetGlobalHubsHubsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetGlobalHubsResponse, + | errors.GetGlobalHubsBadRequest + | errors.GetGlobalHubsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetGlobalHubsRequest = { - count: count, - onlyTransient: onlyTransient, - }; + const input$: operations.GetGlobalHubsRequest = { + count: count, + onlyTransient: onlyTransient, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetGlobalHubsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetGlobalHubsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/hubs")(); + const path$ = pathToFunc("/hubs")(); - const query$ = encodeFormQuery$({ - count: payload$.count, - onlyTransient: payload$.onlyTransient, - }); + const query$ = encodeFormQuery$({ + "count": payload$.count, + "onlyTransient": payload$.onlyTransient, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getGlobalHubs", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getGlobalHubs", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetGlobalHubsResponse, - | errors.GetGlobalHubsResponseBody - | errors.GetGlobalHubsHubsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetGlobalHubsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetGlobalHubsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetGlobalHubsHubsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetGlobalHubsResponse, + | errors.GetGlobalHubsBadRequest + | errors.GetGlobalHubsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetGlobalHubsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetGlobalHubsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetGlobalHubsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/hubsGetLibraryHubs.ts b/src/funcs/hubsGetLibraryHubs.ts index 315b94fc..0a4b59c1 100644 --- a/src/funcs/hubsGetLibraryHubs.ts +++ b/src/funcs/hubsGetLibraryHubs.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,128 +30,127 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return a list of library specific hubs - * */ export async function hubsGetLibraryHubs( - client$: PlexAPICore, - sectionId: number, - count?: number | undefined, - onlyTransient?: operations.QueryParamOnlyTransient | undefined, - options?: RequestOptions + client$: PlexAPICore, + sectionId: number, + count?: number | undefined, + onlyTransient?: operations.QueryParamOnlyTransient | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetLibraryHubsResponse, - | errors.GetLibraryHubsResponseBody - | errors.GetLibraryHubsHubsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetLibraryHubsResponse, + | errors.GetLibraryHubsBadRequest + | errors.GetLibraryHubsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetLibraryHubsRequest = { - sectionId: sectionId, - count: count, - onlyTransient: onlyTransient, - }; + const input$: operations.GetLibraryHubsRequest = { + sectionId: sectionId, + count: count, + onlyTransient: onlyTransient, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetLibraryHubsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetLibraryHubsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionId: encodeSimple$("sectionId", payload$.sectionId, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sectionId: encodeSimple$("sectionId", payload$.sectionId, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/hubs/sections/{sectionId}")(pathParams$); + const path$ = pathToFunc("/hubs/sections/{sectionId}")(pathParams$); - const query$ = encodeFormQuery$({ - count: payload$.count, - onlyTransient: payload$.onlyTransient, - }); + const query$ = encodeFormQuery$({ + "count": payload$.count, + "onlyTransient": payload$.onlyTransient, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getLibraryHubs", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getLibraryHubs", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetLibraryHubsResponse, - | errors.GetLibraryHubsResponseBody - | errors.GetLibraryHubsHubsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetLibraryHubsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetLibraryHubsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetLibraryHubsHubsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetLibraryHubsResponse, + | errors.GetLibraryHubsBadRequest + | errors.GetLibraryHubsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetLibraryHubsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetLibraryHubsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetLibraryHubsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryDeleteLibrary.ts b/src/funcs/libraryDeleteLibrary.ts index 4836c97f..463a3889 100644 --- a/src/funcs/libraryDeleteLibrary.ts +++ b/src/funcs/libraryDeleteLibrary.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,115 +29,113 @@ import { Result } from "../sdk/types/fp.js"; * Delete a library using a specific section id */ export async function libraryDeleteLibrary( - client$: PlexAPICore, - sectionKey: number, - options?: RequestOptions + client$: PlexAPICore, + sectionKey: number, + options?: RequestOptions, ): Promise< - Result< - operations.DeleteLibraryResponse, - | errors.DeleteLibraryResponseBody - | errors.DeleteLibraryLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeleteLibraryResponse, + | errors.DeleteLibraryBadRequest + | errors.DeleteLibraryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeleteLibraryRequest = { - sectionKey: sectionKey, - }; + const input$: operations.DeleteLibraryRequest = { + sectionKey: sectionKey, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeleteLibraryRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteLibraryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/{sectionKey}")(pathParams$); + const path$ = pathToFunc("/library/sections/{sectionKey}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "deleteLibrary", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "deleteLibrary", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeleteLibraryResponse, - | errors.DeleteLibraryResponseBody - | errors.DeleteLibraryLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.DeleteLibraryResponse$inboundSchema), - m$.jsonErr(400, errors.DeleteLibraryResponseBody$inboundSchema), - m$.jsonErr(401, errors.DeleteLibraryLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeleteLibraryResponse, + | errors.DeleteLibraryBadRequest + | errors.DeleteLibraryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.DeleteLibraryResponse$inboundSchema), + m$.jsonErr(400, errors.DeleteLibraryBadRequest$inboundSchema), + m$.jsonErr(401, errors.DeleteLibraryUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetAllLibraries.ts b/src/funcs/libraryGetAllLibraries.ts index 52ddc5d5..62135a30 100644 --- a/src/funcs/libraryGetAllLibraries.ts +++ b/src/funcs/libraryGetAllLibraries.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,94 +30,93 @@ import { Result } from "../sdk/types/fp.js"; * * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * */ export async function libraryGetAllLibraries( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetAllLibrariesResponse, - | errors.GetAllLibrariesResponseBody - | errors.GetAllLibrariesLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetAllLibrariesResponse, + | errors.GetAllLibrariesBadRequest + | errors.GetAllLibrariesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/library/sections")(); + const path$ = pathToFunc("/library/sections")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-all-libraries", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-all-libraries", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetAllLibrariesResponse, - | errors.GetAllLibrariesResponseBody - | errors.GetAllLibrariesLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetAllLibrariesResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetAllLibrariesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetAllLibrariesLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetAllLibrariesResponse, + | errors.GetAllLibrariesBadRequest + | errors.GetAllLibrariesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetAllLibrariesResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetAllLibrariesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetAllLibrariesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetFileHash.ts b/src/funcs/libraryGetFileHash.ts index 5c0a4f3c..1d37b765 100644 --- a/src/funcs/libraryGetFileHash.ts +++ b/src/funcs/libraryGetFileHash.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,116 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * This resource returns hash values for local files */ export async function libraryGetFileHash( - client$: PlexAPICore, - url: string, - type?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + url: string, + type?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetFileHashResponse, - | errors.GetFileHashResponseBody - | errors.GetFileHashLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetFileHashResponse, + | errors.GetFileHashBadRequest + | errors.GetFileHashUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetFileHashRequest = { - url: url, - type: type, - }; + const input$: operations.GetFileHashRequest = { + url: url, + type: type, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetFileHashRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetFileHashRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/library/hashes")(); + const path$ = pathToFunc("/library/hashes")(); - const query$ = encodeFormQuery$({ - type: payload$.type, - url: payload$.url, - }); + const query$ = encodeFormQuery$({ + "type": payload$.type, + "url": payload$.url, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getFileHash", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getFileHash", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetFileHashResponse, - | errors.GetFileHashResponseBody - | errors.GetFileHashLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetFileHashResponse$inboundSchema), - m$.jsonErr(400, errors.GetFileHashResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetFileHashLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetFileHashResponse, + | errors.GetFileHashBadRequest + | errors.GetFileHashUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.GetFileHashResponse$inboundSchema), + m$.jsonErr(400, errors.GetFileHashBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetFileHashUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetLibraryDetails.ts b/src/funcs/libraryGetLibraryDetails.ts index 9dcf5a1f..dd8c0c37 100644 --- a/src/funcs/libraryGetLibraryDetails.ts +++ b/src/funcs/libraryGetLibraryDetails.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -68,125 +68,125 @@ import { Result } from "../sdk/types/fp.js"; * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. * * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * */ export async function libraryGetLibraryDetails( - client$: PlexAPICore, - sectionKey: number, - includeDetails?: operations.IncludeDetails | undefined, - options?: RequestOptions + client$: PlexAPICore, + sectionKey: number, + includeDetails?: operations.IncludeDetails | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetLibraryDetailsResponse, - | errors.GetLibraryDetailsResponseBody - | errors.GetLibraryDetailsLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetLibraryDetailsResponse, + | errors.GetLibraryDetailsBadRequest + | errors.GetLibraryDetailsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetLibraryDetailsRequest = { - sectionKey: sectionKey, - includeDetails: includeDetails, - }; + const input$: operations.GetLibraryDetailsRequest = { + sectionKey: sectionKey, + includeDetails: includeDetails, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetLibraryDetailsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetLibraryDetailsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/{sectionKey}")(pathParams$); + const path$ = pathToFunc("/library/sections/{sectionKey}")(pathParams$); - const query$ = encodeFormQuery$({ - includeDetails: payload$.includeDetails, - }); + const query$ = encodeFormQuery$({ + "includeDetails": payload$.includeDetails, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-library-details", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-library-details", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetLibraryDetailsResponse, - | errors.GetLibraryDetailsResponseBody - | errors.GetLibraryDetailsLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetLibraryDetailsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetLibraryDetailsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetLibraryDetailsLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetLibraryDetailsResponse, + | errors.GetLibraryDetailsBadRequest + | errors.GetLibraryDetailsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetLibraryDetailsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetLibraryDetailsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetLibraryDetailsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetLibraryItems.ts b/src/funcs/libraryGetLibraryItems.ts index 321718fb..acaa10dc 100644 --- a/src/funcs/libraryGetLibraryItems.ts +++ b/src/funcs/libraryGetLibraryItems.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -49,126 +49,128 @@ import { Result } from "../sdk/types/fp.js"; * - `resolution`: Items categorized by resolution. * - `firstCharacter`: Items categorized by the first letter. * - `folder`: Items categorized by folder. - * */ export async function libraryGetLibraryItems( - client$: PlexAPICore, - request: operations.GetLibraryItemsRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.GetLibraryItemsRequest, + options?: RequestOptions, ): Promise< - Result< - operations.GetLibraryItemsResponse, - | errors.GetLibraryItemsResponseBody - | errors.GetLibraryItemsLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetLibraryItemsResponse, + | errors.GetLibraryItemsBadRequest + | errors.GetLibraryItemsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetLibraryItemsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetLibraryItemsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { - explode: false, - charEncoding: "percent", - }), - tag: encodeSimple$("tag", payload$.tag, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { + explode: false, + charEncoding: "percent", + }), + tag: encodeSimple$("tag", payload$.tag, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/{sectionKey}/{tag}")(pathParams$); + const path$ = pathToFunc("/library/sections/{sectionKey}/{tag}")(pathParams$); - const query$ = encodeFormQuery$({ - includeGuids: payload$.includeGuids, - includeMeta: payload$.includeMeta, - type: payload$.type, - "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], - "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], - }); + const query$ = encodeFormQuery$({ + "includeGuids": payload$.includeGuids, + "includeMeta": payload$.includeMeta, + "type": payload$.type, + "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], + "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-library-items", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-library-items", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetLibraryItemsResponse, - | errors.GetLibraryItemsResponseBody - | errors.GetLibraryItemsLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetLibraryItemsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetLibraryItemsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetLibraryItemsLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetLibraryItemsResponse, + | errors.GetLibraryItemsBadRequest + | errors.GetLibraryItemsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetLibraryItemsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetLibraryItemsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetLibraryItemsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetMetaDataByRatingKey.ts b/src/funcs/libraryGetMetaDataByRatingKey.ts index 38db8508..ac1e2003 100644 --- a/src/funcs/libraryGetMetaDataByRatingKey.ts +++ b/src/funcs/libraryGetMetaDataByRatingKey.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,118 +27,118 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return the metadata of a library item specified with the ratingKey. - * */ export async function libraryGetMetaDataByRatingKey( - client$: PlexAPICore, - ratingKey: number, - options?: RequestOptions + client$: PlexAPICore, + ratingKey: number, + options?: RequestOptions, ): Promise< - Result< - operations.GetMetaDataByRatingKeyResponse, - | errors.GetMetaDataByRatingKeyResponseBody - | errors.GetMetaDataByRatingKeyLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetMetaDataByRatingKeyResponse, + | errors.GetMetaDataByRatingKeyBadRequest + | errors.GetMetaDataByRatingKeyUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetMetaDataByRatingKeyRequest = { - ratingKey: ratingKey, - }; + const input$: operations.GetMetaDataByRatingKeyRequest = { + ratingKey: ratingKey, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetMetaDataByRatingKeyRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetMetaDataByRatingKeyRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/metadata/{ratingKey}")(pathParams$); + const path$ = pathToFunc("/library/metadata/{ratingKey}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-meta-data-by-rating-key", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-meta-data-by-rating-key", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetMetaDataByRatingKeyResponse, - | errors.GetMetaDataByRatingKeyResponseBody - | errors.GetMetaDataByRatingKeyLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetMetaDataByRatingKeyResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetMetaDataByRatingKeyResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetMetaDataByRatingKeyLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetMetaDataByRatingKeyResponse, + | errors.GetMetaDataByRatingKeyBadRequest + | errors.GetMetaDataByRatingKeyUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetMetaDataByRatingKeyResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetMetaDataByRatingKeyBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetMetaDataByRatingKeyUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetMetadataChildren.ts b/src/funcs/libraryGetMetadataChildren.ts index 0570bfab..86ddc4ec 100644 --- a/src/funcs/libraryGetMetadataChildren.ts +++ b/src/funcs/libraryGetMetadataChildren.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,125 +30,127 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return the children of of a library item specified with the ratingKey. - * */ export async function libraryGetMetadataChildren( - client$: PlexAPICore, - ratingKey: number, - includeElements?: string | undefined, - options?: RequestOptions + client$: PlexAPICore, + ratingKey: number, + includeElements?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetMetadataChildrenResponse, - | errors.GetMetadataChildrenResponseBody - | errors.GetMetadataChildrenLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetMetadataChildrenResponse, + | errors.GetMetadataChildrenBadRequest + | errors.GetMetadataChildrenUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetMetadataChildrenRequest = { - ratingKey: ratingKey, - includeElements: includeElements, - }; + const input$: operations.GetMetadataChildrenRequest = { + ratingKey: ratingKey, + includeElements: includeElements, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetMetadataChildrenRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetMetadataChildrenRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/metadata/{ratingKey}/children")(pathParams$); + const path$ = pathToFunc("/library/metadata/{ratingKey}/children")( + pathParams$, + ); - const query$ = encodeFormQuery$({ - includeElements: payload$.includeElements, - }); + const query$ = encodeFormQuery$({ + "includeElements": payload$.includeElements, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getMetadataChildren", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getMetadataChildren", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetMetadataChildrenResponse, - | errors.GetMetadataChildrenResponseBody - | errors.GetMetadataChildrenLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetMetadataChildrenResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetMetadataChildrenResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetMetadataChildrenLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetMetadataChildrenResponse, + | errors.GetMetadataChildrenBadRequest + | errors.GetMetadataChildrenUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetMetadataChildrenResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetMetadataChildrenBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetMetadataChildrenUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetOnDeck.ts b/src/funcs/libraryGetOnDeck.ts index 6c9a15f8..23043dad 100644 --- a/src/funcs/libraryGetOnDeck.ts +++ b/src/funcs/libraryGetOnDeck.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -25,94 +25,91 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return the on deck content. - * */ export async function libraryGetOnDeck( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetOnDeckResponse, - | errors.GetOnDeckResponseBody - | errors.GetOnDeckLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetOnDeckResponse, + | errors.GetOnDeckBadRequest + | errors.GetOnDeckUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/library/onDeck")(); + const path$ = pathToFunc("/library/onDeck")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getOnDeck", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getOnDeck", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetOnDeckResponse, - | errors.GetOnDeckResponseBody - | errors.GetOnDeckLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetOnDeckResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetOnDeckResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetOnDeckLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetOnDeckResponse, + | errors.GetOnDeckBadRequest + | errors.GetOnDeckUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetOnDeckResponse$inboundSchema, { key: "object" }), + m$.jsonErr(400, errors.GetOnDeckBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetOnDeckUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetRecentlyAdded.ts b/src/funcs/libraryGetRecentlyAdded.ts index bc8525e0..136e1055 100644 --- a/src/funcs/libraryGetRecentlyAdded.ts +++ b/src/funcs/libraryGetRecentlyAdded.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,119 +27,118 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return the recently added content. - * */ export async function libraryGetRecentlyAdded( - client$: PlexAPICore, - xPlexContainerStart?: number | undefined, - xPlexContainerSize?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + xPlexContainerStart?: number | undefined, + xPlexContainerSize?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetRecentlyAddedResponse, - | errors.GetRecentlyAddedResponseBody - | errors.GetRecentlyAddedLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetRecentlyAddedResponse, + | errors.GetRecentlyAddedBadRequest + | errors.GetRecentlyAddedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetRecentlyAddedRequest = { - xPlexContainerStart: xPlexContainerStart, - xPlexContainerSize: xPlexContainerSize, - }; + const input$: operations.GetRecentlyAddedRequest = { + xPlexContainerStart: xPlexContainerStart, + xPlexContainerSize: xPlexContainerSize, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetRecentlyAddedRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetRecentlyAddedRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/library/recentlyAdded")(); + const path$ = pathToFunc("/library/recentlyAdded")(); - const query$ = encodeFormQuery$({ - "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], - "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], - }); + const query$ = encodeFormQuery$({ + "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], + "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getRecentlyAdded", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getRecentlyAdded", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetRecentlyAddedResponse, - | errors.GetRecentlyAddedResponseBody - | errors.GetRecentlyAddedLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetRecentlyAddedResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetRecentlyAddedResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetRecentlyAddedLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetRecentlyAddedResponse, + | errors.GetRecentlyAddedBadRequest + | errors.GetRecentlyAddedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetRecentlyAddedResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetRecentlyAddedBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetRecentlyAddedUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetRefreshLibraryMetadata.ts b/src/funcs/libraryGetRefreshLibraryMetadata.ts index 5a4bd7cd..48e5a2a7 100644 --- a/src/funcs/libraryGetRefreshLibraryMetadata.ts +++ b/src/funcs/libraryGetRefreshLibraryMetadata.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,125 +30,125 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint Refreshes all the Metadata of the library. - * */ export async function libraryGetRefreshLibraryMetadata( - client$: PlexAPICore, - sectionKey: number, - force?: operations.Force | undefined, - options?: RequestOptions + client$: PlexAPICore, + sectionKey: number, + force?: operations.Force | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetRefreshLibraryMetadataResponse, - | errors.GetRefreshLibraryMetadataResponseBody - | errors.GetRefreshLibraryMetadataLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetRefreshLibraryMetadataResponse, + | errors.GetRefreshLibraryMetadataBadRequest + | errors.GetRefreshLibraryMetadataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetRefreshLibraryMetadataRequest = { - sectionKey: sectionKey, - force: force, - }; + const input$: operations.GetRefreshLibraryMetadataRequest = { + sectionKey: sectionKey, + force: force, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetRefreshLibraryMetadataRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetRefreshLibraryMetadataRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/{sectionKey}/refresh")(pathParams$); + const path$ = pathToFunc("/library/sections/{sectionKey}/refresh")( + pathParams$, + ); - const query$ = encodeFormQuery$({ - force: payload$.force, - }); + const query$ = encodeFormQuery$({ + "force": payload$.force, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-refresh-library-metadata", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-refresh-library-metadata", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetRefreshLibraryMetadataResponse, - | errors.GetRefreshLibraryMetadataResponseBody - | errors.GetRefreshLibraryMetadataLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetRefreshLibraryMetadataResponse$inboundSchema), - m$.jsonErr(400, errors.GetRefreshLibraryMetadataResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetRefreshLibraryMetadataLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetRefreshLibraryMetadataResponse, + | errors.GetRefreshLibraryMetadataBadRequest + | errors.GetRefreshLibraryMetadataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.GetRefreshLibraryMetadataResponse$inboundSchema), + m$.jsonErr(400, errors.GetRefreshLibraryMetadataBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetRefreshLibraryMetadataUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetSearchLibrary.ts b/src/funcs/libraryGetSearchLibrary.ts index 697ddaa7..9645fb40 100644 --- a/src/funcs/libraryGetSearchLibrary.ts +++ b/src/funcs/libraryGetSearchLibrary.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -47,125 +47,126 @@ import { Result } from "../sdk/types/fp.js"; * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. * * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * */ export async function libraryGetSearchLibrary( - client$: PlexAPICore, - sectionKey: number, - type: operations.QueryParamType, - options?: RequestOptions + client$: PlexAPICore, + sectionKey: number, + type: operations.QueryParamType, + options?: RequestOptions, ): Promise< - Result< - operations.GetSearchLibraryResponse, - | errors.GetSearchLibraryResponseBody - | errors.GetSearchLibraryLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSearchLibraryResponse, + | errors.GetSearchLibraryBadRequest + | errors.GetSearchLibraryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetSearchLibraryRequest = { - sectionKey: sectionKey, - type: type, - }; + const input$: operations.GetSearchLibraryRequest = { + sectionKey: sectionKey, + type: type, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSearchLibraryRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetSearchLibraryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sectionKey: encodeSimple$("sectionKey", payload$.sectionKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/{sectionKey}/search")(pathParams$); + const path$ = pathToFunc("/library/sections/{sectionKey}/search")( + pathParams$, + ); - const query$ = encodeFormQuery$({ - type: payload$.type, - }); + const query$ = encodeFormQuery$({ + "type": payload$.type, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-search-library", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-search-library", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetSearchLibraryResponse, - | errors.GetSearchLibraryResponseBody - | errors.GetSearchLibraryLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetSearchLibraryResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetSearchLibraryResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetSearchLibraryLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetSearchLibraryResponse, + | errors.GetSearchLibraryBadRequest + | errors.GetSearchLibraryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSearchLibraryResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetSearchLibraryBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetSearchLibraryUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/libraryGetTopWatchedContent.ts b/src/funcs/libraryGetTopWatchedContent.ts index e75143e6..2226ca90 100644 --- a/src/funcs/libraryGetTopWatchedContent.ts +++ b/src/funcs/libraryGetTopWatchedContent.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,119 +27,119 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will return the top watched content from libraries of a certain type - * */ export async function libraryGetTopWatchedContent( - client$: PlexAPICore, - type: operations.GetTopWatchedContentQueryParamType, - includeGuids?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + type: operations.GetTopWatchedContentQueryParamType, + includeGuids?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetTopWatchedContentResponse, - | errors.GetTopWatchedContentResponseBody - | errors.GetTopWatchedContentLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTopWatchedContentResponse, + | errors.GetTopWatchedContentBadRequest + | errors.GetTopWatchedContentUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTopWatchedContentRequest = { - type: type, - includeGuids: includeGuids, - }; + const input$: operations.GetTopWatchedContentRequest = { + type: type, + includeGuids: includeGuids, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTopWatchedContentRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTopWatchedContentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/library/all/top")(); + const path$ = pathToFunc("/library/all/top")(); - const query$ = encodeFormQuery$({ - includeGuids: payload$.includeGuids, - type: payload$.type, - }); + const query$ = encodeFormQuery$({ + "includeGuids": payload$.includeGuids, + "type": payload$.type, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getTopWatchedContent", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getTopWatchedContent", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetTopWatchedContentResponse, - | errors.GetTopWatchedContentResponseBody - | errors.GetTopWatchedContentLibraryResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTopWatchedContentResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetTopWatchedContentResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetTopWatchedContentLibraryResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetTopWatchedContentResponse, + | errors.GetTopWatchedContentBadRequest + | errors.GetTopWatchedContentUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTopWatchedContentResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetTopWatchedContentBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetTopWatchedContentUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/logEnablePaperTrail.ts b/src/funcs/logEnablePaperTrail.ts index e17f143b..c4c78aae 100644 --- a/src/funcs/logEnablePaperTrail.ts +++ b/src/funcs/logEnablePaperTrail.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -25,94 +25,91 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. - * */ export async function logEnablePaperTrail( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.EnablePaperTrailResponse, - | errors.EnablePaperTrailResponseBody - | errors.EnablePaperTrailLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.EnablePaperTrailResponse, + | errors.EnablePaperTrailBadRequest + | errors.EnablePaperTrailUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/log/networked")(); + const path$ = pathToFunc("/log/networked")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "enablePaperTrail", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "enablePaperTrail", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "403", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "403", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.EnablePaperTrailResponse, - | errors.EnablePaperTrailResponseBody - | errors.EnablePaperTrailLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.EnablePaperTrailResponse$inboundSchema), - m$.jsonErr(400, errors.EnablePaperTrailResponseBody$inboundSchema), - m$.jsonErr(401, errors.EnablePaperTrailLogResponseBody$inboundSchema), - m$.fail([403, "4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.EnablePaperTrailResponse, + | errors.EnablePaperTrailBadRequest + | errors.EnablePaperTrailUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.EnablePaperTrailResponse$inboundSchema), + m$.jsonErr(400, errors.EnablePaperTrailBadRequest$inboundSchema), + m$.jsonErr(401, errors.EnablePaperTrailUnauthorized$inboundSchema), + m$.fail([403, "4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/logLogLine.ts b/src/funcs/logLogLine.ts index 5ca3cdb2..f8ff8a41 100644 --- a/src/funcs/logLogLine.ts +++ b/src/funcs/logLogLine.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,122 +27,119 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - * */ export async function logLogLine( - client$: PlexAPICore, - level: operations.Level, - message: string, - source: string, - options?: RequestOptions + client$: PlexAPICore, + level: operations.Level, + message: string, + source: string, + options?: RequestOptions, ): Promise< - Result< - operations.LogLineResponse, - | errors.LogLineResponseBody - | errors.LogLineLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.LogLineResponse, + | errors.LogLineBadRequest + | errors.LogLineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.LogLineRequest = { - level: level, - message: message, - source: source, - }; + const input$: operations.LogLineRequest = { + level: level, + message: message, + source: source, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.LogLineRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.LogLineRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/log")(); + const path$ = pathToFunc("/log")(); - const query$ = encodeFormQuery$({ - level: payload$.level, - message: payload$.message, - source: payload$.source, - }); + const query$ = encodeFormQuery$({ + "level": payload$.level, + "message": payload$.message, + "source": payload$.source, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "logLine", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "logLine", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.LogLineResponse, - | errors.LogLineResponseBody - | errors.LogLineLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.LogLineResponse$inboundSchema), - m$.jsonErr(400, errors.LogLineResponseBody$inboundSchema), - m$.jsonErr(401, errors.LogLineLogResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.LogLineResponse, + | errors.LogLineBadRequest + | errors.LogLineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.LogLineResponse$inboundSchema), + m$.jsonErr(400, errors.LogLineBadRequest$inboundSchema), + m$.jsonErr(401, errors.LogLineUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/logLogMultiLine.ts b/src/funcs/logLogMultiLine.ts index 00eff7b8..067fddaa 100644 --- a/src/funcs/logLogMultiLine.ts +++ b/src/funcs/logLogMultiLine.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { PlexAPICore } from "../core.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -9,18 +10,17 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import { Result } from "../sdk/types/fp.js"; -import * as z from "zod"; /** * Logging a multi-line message @@ -47,110 +47,107 @@ import * as z from "zod"; * `level=4&message=Sample%20log%20entry&source=applicationName` * * Ensure each parameter is properly URL-encoded to avoid interpretation issues. - * */ export async function logLogMultiLine( - client$: PlexAPICore, - request: string, - options?: RequestOptions + client$: PlexAPICore, + request: string, + options?: RequestOptions, ): Promise< - Result< - operations.LogMultiLineResponse, - | errors.LogMultiLineResponseBody - | errors.LogMultiLineLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.LogMultiLineResponse, + | errors.LogMultiLineBadRequest + | errors.LogMultiLineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => z.string().parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = payload$; + const parsed$ = schemas$.safeParse( + input$, + (value$) => z.string().parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$; - const path$ = pathToFunc("/log")(); + const path$ = pathToFunc("/log")(); - const headers$ = new Headers({ - "Content-Type": "text/plain", - Accept: "application/json", - }); + const headers$ = new Headers({ + "Content-Type": "text/plain", + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "logMultiLine", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "logMultiLine", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.LogMultiLineResponse, - | errors.LogMultiLineResponseBody - | errors.LogMultiLineLogResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.LogMultiLineResponse$inboundSchema), - m$.jsonErr(400, errors.LogMultiLineResponseBody$inboundSchema), - m$.jsonErr(401, errors.LogMultiLineLogResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.LogMultiLineResponse, + | errors.LogMultiLineBadRequest + | errors.LogMultiLineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.LogMultiLineResponse$inboundSchema), + m$.jsonErr(400, errors.LogMultiLineBadRequest$inboundSchema), + m$.jsonErr(401, errors.LogMultiLineUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/mediaGetBannerImage.ts b/src/funcs/mediaGetBannerImage.ts index 64bccdc3..ac25608f 100644 --- a/src/funcs/mediaGetBannerImage.ts +++ b/src/funcs/mediaGetBannerImage.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -32,126 +32,124 @@ import { Result } from "../sdk/types/fp.js"; * Gets the banner image of the media item */ export async function mediaGetBannerImage( - client$: PlexAPICore, - request: operations.GetBannerImageRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.GetBannerImageRequest, + options?: RequestOptions, ): Promise< - Result< - operations.GetBannerImageResponse, - | errors.GetBannerImageResponseBody - | errors.GetBannerImageMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetBannerImageResponse, + | errors.GetBannerImageBadRequest + | errors.GetBannerImageUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetBannerImageRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetBannerImageRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/metadata/{ratingKey}/banner")(pathParams$); + const path$ = pathToFunc("/library/metadata/{ratingKey}/banner")(pathParams$); - const query$ = encodeFormQuery$({ - height: payload$.height, - minSize: payload$.minSize, - upscale: payload$.upscale, - width: payload$.width, - "X-Plex-Token": payload$["X-Plex-Token"], - }); + const query$ = encodeFormQuery$({ + "height": payload$.height, + "minSize": payload$.minSize, + "upscale": payload$.upscale, + "width": payload$.width, + "X-Plex-Token": payload$["X-Plex-Token"], + }); - const headers$ = new Headers({ - Accept: "image/jpeg", - }); + const headers$ = new Headers({ + Accept: "image/jpeg", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-banner-image", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-banner-image", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetBannerImageResponse, - | errors.GetBannerImageResponseBody - | errors.GetBannerImageMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.stream(200, operations.GetBannerImageResponse$inboundSchema, { - ctype: "image/jpeg", - hdrs: true, - key: "response-stream", - }), - m$.jsonErr(400, errors.GetBannerImageResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetBannerImageMediaResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetBannerImageResponse, + | errors.GetBannerImageBadRequest + | errors.GetBannerImageUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.stream(200, operations.GetBannerImageResponse$inboundSchema, { + ctype: "image/jpeg", + hdrs: true, + key: "response-stream", + }), + m$.jsonErr(400, errors.GetBannerImageBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetBannerImageUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/mediaGetThumbImage.ts b/src/funcs/mediaGetThumbImage.ts index cc830070..6f57dc2a 100644 --- a/src/funcs/mediaGetThumbImage.ts +++ b/src/funcs/mediaGetThumbImage.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -32,126 +32,124 @@ import { Result } from "../sdk/types/fp.js"; * Gets the thumbnail image of the media item */ export async function mediaGetThumbImage( - client$: PlexAPICore, - request: operations.GetThumbImageRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.GetThumbImageRequest, + options?: RequestOptions, ): Promise< - Result< - operations.GetThumbImageResponse, - | errors.GetThumbImageResponseBody - | errors.GetThumbImageMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetThumbImageResponse, + | errors.GetThumbImageBadRequest + | errors.GetThumbImageUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetThumbImageRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetThumbImageRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + ratingKey: encodeSimple$("ratingKey", payload$.ratingKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/metadata/{ratingKey}/thumb")(pathParams$); + const path$ = pathToFunc("/library/metadata/{ratingKey}/thumb")(pathParams$); - const query$ = encodeFormQuery$({ - height: payload$.height, - minSize: payload$.minSize, - upscale: payload$.upscale, - width: payload$.width, - "X-Plex-Token": payload$["X-Plex-Token"], - }); + const query$ = encodeFormQuery$({ + "height": payload$.height, + "minSize": payload$.minSize, + "upscale": payload$.upscale, + "width": payload$.width, + "X-Plex-Token": payload$["X-Plex-Token"], + }); - const headers$ = new Headers({ - Accept: "image/jpeg", - }); + const headers$ = new Headers({ + Accept: "image/jpeg", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-thumb-image", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-thumb-image", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetThumbImageResponse, - | errors.GetThumbImageResponseBody - | errors.GetThumbImageMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.stream(200, operations.GetThumbImageResponse$inboundSchema, { - ctype: "image/jpeg", - hdrs: true, - key: "response-stream", - }), - m$.jsonErr(400, errors.GetThumbImageResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetThumbImageMediaResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetThumbImageResponse, + | errors.GetThumbImageBadRequest + | errors.GetThumbImageUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.stream(200, operations.GetThumbImageResponse$inboundSchema, { + ctype: "image/jpeg", + hdrs: true, + key: "response-stream", + }), + m$.jsonErr(400, errors.GetThumbImageBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetThumbImageUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/mediaMarkPlayed.ts b/src/funcs/mediaMarkPlayed.ts index e1faa113..213b1c61 100644 --- a/src/funcs/mediaMarkPlayed.ts +++ b/src/funcs/mediaMarkPlayed.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,111 @@ import { Result } from "../sdk/types/fp.js"; * This will mark the provided media key as Played. */ export async function mediaMarkPlayed( - client$: PlexAPICore, - key: number, - options?: RequestOptions + client$: PlexAPICore, + key: number, + options?: RequestOptions, ): Promise< - Result< - operations.MarkPlayedResponse, - | errors.MarkPlayedResponseBody - | errors.MarkPlayedMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.MarkPlayedResponse, + | errors.MarkPlayedBadRequest + | errors.MarkPlayedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.MarkPlayedRequest = { - key: key, - }; + const input$: operations.MarkPlayedRequest = { + key: key, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.MarkPlayedRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.MarkPlayedRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/:/scrobble")(); + const path$ = pathToFunc("/:/scrobble")(); - const query$ = encodeFormQuery$({ - key: payload$.key, - }); + const query$ = encodeFormQuery$({ + "key": payload$.key, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "markPlayed", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "markPlayed", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.MarkPlayedResponse, - | errors.MarkPlayedResponseBody - | errors.MarkPlayedMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.MarkPlayedResponse$inboundSchema), - m$.jsonErr(400, errors.MarkPlayedResponseBody$inboundSchema), - m$.jsonErr(401, errors.MarkPlayedMediaResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.MarkPlayedResponse, + | errors.MarkPlayedBadRequest + | errors.MarkPlayedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.MarkPlayedResponse$inboundSchema), + m$.jsonErr(400, errors.MarkPlayedBadRequest$inboundSchema), + m$.jsonErr(401, errors.MarkPlayedUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/mediaMarkUnplayed.ts b/src/funcs/mediaMarkUnplayed.ts index 4508eb36..bd72b3f3 100644 --- a/src/funcs/mediaMarkUnplayed.ts +++ b/src/funcs/mediaMarkUnplayed.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,111 @@ import { Result } from "../sdk/types/fp.js"; * This will mark the provided media key as Unplayed. */ export async function mediaMarkUnplayed( - client$: PlexAPICore, - key: number, - options?: RequestOptions + client$: PlexAPICore, + key: number, + options?: RequestOptions, ): Promise< - Result< - operations.MarkUnplayedResponse, - | errors.MarkUnplayedResponseBody - | errors.MarkUnplayedMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.MarkUnplayedResponse, + | errors.MarkUnplayedBadRequest + | errors.MarkUnplayedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.MarkUnplayedRequest = { - key: key, - }; + const input$: operations.MarkUnplayedRequest = { + key: key, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.MarkUnplayedRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.MarkUnplayedRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/:/unscrobble")(); + const path$ = pathToFunc("/:/unscrobble")(); - const query$ = encodeFormQuery$({ - key: payload$.key, - }); + const query$ = encodeFormQuery$({ + "key": payload$.key, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "markUnplayed", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "markUnplayed", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.MarkUnplayedResponse, - | errors.MarkUnplayedResponseBody - | errors.MarkUnplayedMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.MarkUnplayedResponse$inboundSchema), - m$.jsonErr(400, errors.MarkUnplayedResponseBody$inboundSchema), - m$.jsonErr(401, errors.MarkUnplayedMediaResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.MarkUnplayedResponse, + | errors.MarkUnplayedBadRequest + | errors.MarkUnplayedUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.MarkUnplayedResponse$inboundSchema), + m$.jsonErr(400, errors.MarkUnplayedBadRequest$inboundSchema), + m$.jsonErr(401, errors.MarkUnplayedUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/mediaUpdatePlayProgress.ts b/src/funcs/mediaUpdatePlayProgress.ts index e11ed9ae..5753fbd7 100644 --- a/src/funcs/mediaUpdatePlayProgress.ts +++ b/src/funcs/mediaUpdatePlayProgress.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,122 +27,120 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This API command can be used to update the play progress of a media item. - * */ export async function mediaUpdatePlayProgress( - client$: PlexAPICore, - key: string, - time: number, - state: string, - options?: RequestOptions + client$: PlexAPICore, + key: string, + time: number, + state: string, + options?: RequestOptions, ): Promise< - Result< - operations.UpdatePlayProgressResponse, - | errors.UpdatePlayProgressResponseBody - | errors.UpdatePlayProgressMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdatePlayProgressResponse, + | errors.UpdatePlayProgressBadRequest + | errors.UpdatePlayProgressUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdatePlayProgressRequest = { - key: key, - time: time, - state: state, - }; + const input$: operations.UpdatePlayProgressRequest = { + key: key, + time: time, + state: state, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdatePlayProgressRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UpdatePlayProgressRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/:/progress")(); + const path$ = pathToFunc("/:/progress")(); - const query$ = encodeFormQuery$({ - key: payload$.key, - state: payload$.state, - time: payload$.time, - }); + const query$ = encodeFormQuery$({ + "key": payload$.key, + "state": payload$.state, + "time": payload$.time, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "updatePlayProgress", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "updatePlayProgress", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UpdatePlayProgressResponse, - | errors.UpdatePlayProgressResponseBody - | errors.UpdatePlayProgressMediaResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.UpdatePlayProgressResponse$inboundSchema), - m$.jsonErr(400, errors.UpdatePlayProgressResponseBody$inboundSchema), - m$.jsonErr(401, errors.UpdatePlayProgressMediaResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UpdatePlayProgressResponse, + | errors.UpdatePlayProgressBadRequest + | errors.UpdatePlayProgressUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.UpdatePlayProgressResponse$inboundSchema), + m$.jsonErr(400, errors.UpdatePlayProgressBadRequest$inboundSchema), + m$.jsonErr(401, errors.UpdatePlayProgressUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsAddPlaylistContents.ts b/src/funcs/playlistsAddPlaylistContents.ts index 031db76f..95c440d5 100644 --- a/src/funcs/playlistsAddPlaylistContents.ts +++ b/src/funcs/playlistsAddPlaylistContents.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -31,128 +31,128 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * */ export async function playlistsAddPlaylistContents( - client$: PlexAPICore, - playlistID: number, - uri: string, - playQueueID?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + uri: string, + playQueueID?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.AddPlaylistContentsResponse, - | errors.AddPlaylistContentsResponseBody - | errors.AddPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.AddPlaylistContentsResponse, + | errors.AddPlaylistContentsBadRequest + | errors.AddPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.AddPlaylistContentsRequest = { - playlistID: playlistID, - uri: uri, - playQueueID: playQueueID, - }; + const input$: operations.AddPlaylistContentsRequest = { + playlistID: playlistID, + uri: uri, + playQueueID: playQueueID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.AddPlaylistContentsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.AddPlaylistContentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); - const query$ = encodeFormQuery$({ - playQueueID: payload$.playQueueID, - uri: payload$.uri, - }); + const query$ = encodeFormQuery$({ + "playQueueID": payload$.playQueueID, + "uri": payload$.uri, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "addPlaylistContents", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "addPlaylistContents", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.AddPlaylistContentsResponse, - | errors.AddPlaylistContentsResponseBody - | errors.AddPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.AddPlaylistContentsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.AddPlaylistContentsResponseBody$inboundSchema), - m$.jsonErr(401, errors.AddPlaylistContentsPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.AddPlaylistContentsResponse, + | errors.AddPlaylistContentsBadRequest + | errors.AddPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.AddPlaylistContentsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.AddPlaylistContentsBadRequest$inboundSchema), + m$.jsonErr(401, errors.AddPlaylistContentsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsClearPlaylistContents.ts b/src/funcs/playlistsClearPlaylistContents.ts index cdb4bb4d..bc562e34 100644 --- a/src/funcs/playlistsClearPlaylistContents.ts +++ b/src/funcs/playlistsClearPlaylistContents.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,118 +27,116 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * Clears a playlist, only works with dumb playlists. Returns the playlist. - * */ export async function playlistsClearPlaylistContents( - client$: PlexAPICore, - playlistID: number, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + options?: RequestOptions, ): Promise< - Result< - operations.ClearPlaylistContentsResponse, - | errors.ClearPlaylistContentsResponseBody - | errors.ClearPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ClearPlaylistContentsResponse, + | errors.ClearPlaylistContentsBadRequest + | errors.ClearPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ClearPlaylistContentsRequest = { - playlistID: playlistID, - }; + const input$: operations.ClearPlaylistContentsRequest = { + playlistID: playlistID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ClearPlaylistContentsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ClearPlaylistContentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "clearPlaylistContents", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "clearPlaylistContents", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.ClearPlaylistContentsResponse, - | errors.ClearPlaylistContentsResponseBody - | errors.ClearPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.ClearPlaylistContentsResponse$inboundSchema), - m$.jsonErr(400, errors.ClearPlaylistContentsResponseBody$inboundSchema), - m$.jsonErr(401, errors.ClearPlaylistContentsPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.ClearPlaylistContentsResponse, + | errors.ClearPlaylistContentsBadRequest + | errors.ClearPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.ClearPlaylistContentsResponse$inboundSchema), + m$.jsonErr(400, errors.ClearPlaylistContentsBadRequest$inboundSchema), + m$.jsonErr(401, errors.ClearPlaylistContentsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsCreatePlaylist.ts b/src/funcs/playlistsCreatePlaylist.ts index b599d808..2920cd6f 100644 --- a/src/funcs/playlistsCreatePlaylist.ts +++ b/src/funcs/playlistsCreatePlaylist.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,118 +29,117 @@ import { Result } from "../sdk/types/fp.js"; * Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). * - `playQueueID` - To create a playlist from an existing play queue. - * */ export async function playlistsCreatePlaylist( - client$: PlexAPICore, - request: operations.CreatePlaylistRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.CreatePlaylistRequest, + options?: RequestOptions, ): Promise< - Result< - operations.CreatePlaylistResponse, - | errors.CreatePlaylistResponseBody - | errors.CreatePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CreatePlaylistResponse, + | errors.CreatePlaylistBadRequest + | errors.CreatePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CreatePlaylistRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreatePlaylistRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/playlists")(); + const path$ = pathToFunc("/playlists")(); - const query$ = encodeFormQuery$({ - playQueueID: payload$.playQueueID, - smart: payload$.smart, - title: payload$.title, - type: payload$.type, - uri: payload$.uri, - }); + const query$ = encodeFormQuery$({ + "playQueueID": payload$.playQueueID, + "smart": payload$.smart, + "title": payload$.title, + "type": payload$.type, + "uri": payload$.uri, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "createPlaylist", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "createPlaylist", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CreatePlaylistResponse, - | errors.CreatePlaylistResponseBody - | errors.CreatePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.CreatePlaylistResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.CreatePlaylistResponseBody$inboundSchema), - m$.jsonErr(401, errors.CreatePlaylistPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CreatePlaylistResponse, + | errors.CreatePlaylistBadRequest + | errors.CreatePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.CreatePlaylistResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.CreatePlaylistBadRequest$inboundSchema), + m$.jsonErr(401, errors.CreatePlaylistUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsDeletePlaylist.ts b/src/funcs/playlistsDeletePlaylist.ts index 4ea9698c..46773242 100644 --- a/src/funcs/playlistsDeletePlaylist.ts +++ b/src/funcs/playlistsDeletePlaylist.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,118 +27,115 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * This endpoint will delete a playlist - * */ export async function playlistsDeletePlaylist( - client$: PlexAPICore, - playlistID: number, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + options?: RequestOptions, ): Promise< - Result< - operations.DeletePlaylistResponse, - | errors.DeletePlaylistResponseBody - | errors.DeletePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.DeletePlaylistResponse, + | errors.DeletePlaylistBadRequest + | errors.DeletePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.DeletePlaylistRequest = { - playlistID: playlistID, - }; + const input$: operations.DeletePlaylistRequest = { + playlistID: playlistID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.DeletePlaylistRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeletePlaylistRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "deletePlaylist", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "deletePlaylist", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.DeletePlaylistResponse, - | errors.DeletePlaylistResponseBody - | errors.DeletePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, operations.DeletePlaylistResponse$inboundSchema), - m$.jsonErr(400, errors.DeletePlaylistResponseBody$inboundSchema), - m$.jsonErr(401, errors.DeletePlaylistPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.DeletePlaylistResponse, + | errors.DeletePlaylistBadRequest + | errors.DeletePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, operations.DeletePlaylistResponse$inboundSchema), + m$.jsonErr(400, errors.DeletePlaylistBadRequest$inboundSchema), + m$.jsonErr(401, errors.DeletePlaylistUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsGetPlaylist.ts b/src/funcs/playlistsGetPlaylist.ts index 72bad46e..1a935edf 100644 --- a/src/funcs/playlistsGetPlaylist.ts +++ b/src/funcs/playlistsGetPlaylist.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -28,118 +28,117 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * */ export async function playlistsGetPlaylist( - client$: PlexAPICore, - playlistID: number, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + options?: RequestOptions, ): Promise< - Result< - operations.GetPlaylistResponse, - | errors.GetPlaylistResponseBody - | errors.GetPlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetPlaylistResponse, + | errors.GetPlaylistBadRequest + | errors.GetPlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetPlaylistRequest = { - playlistID: playlistID, - }; + const input$: operations.GetPlaylistRequest = { + playlistID: playlistID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetPlaylistRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPlaylistRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getPlaylist", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getPlaylist", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetPlaylistResponse, - | errors.GetPlaylistResponseBody - | errors.GetPlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetPlaylistResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetPlaylistResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetPlaylistPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetPlaylistResponse, + | errors.GetPlaylistBadRequest + | errors.GetPlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetPlaylistResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetPlaylistBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetPlaylistUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsGetPlaylistContents.ts b/src/funcs/playlistsGetPlaylistContents.ts index fdc19e63..cba739fc 100644 --- a/src/funcs/playlistsGetPlaylistContents.ts +++ b/src/funcs/playlistsGetPlaylistContents.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -33,125 +33,125 @@ import { Result } from "../sdk/types/fp.js"; * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. * For example, you could use this to display a list of recently added albums vis a smart playlist. * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * */ export async function playlistsGetPlaylistContents( - client$: PlexAPICore, - playlistID: number, - type: operations.GetPlaylistContentsQueryParamType, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + type: operations.GetPlaylistContentsQueryParamType, + options?: RequestOptions, ): Promise< - Result< - operations.GetPlaylistContentsResponse, - | errors.GetPlaylistContentsResponseBody - | errors.GetPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetPlaylistContentsResponse, + | errors.GetPlaylistContentsBadRequest + | errors.GetPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetPlaylistContentsRequest = { - playlistID: playlistID, - type: type, - }; + const input$: operations.GetPlaylistContentsRequest = { + playlistID: playlistID, + type: type, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetPlaylistContentsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetPlaylistContentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}/items")(pathParams$); - const query$ = encodeFormQuery$({ - type: payload$.type, - }); + const query$ = encodeFormQuery$({ + "type": payload$.type, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getPlaylistContents", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getPlaylistContents", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetPlaylistContentsResponse, - | errors.GetPlaylistContentsResponseBody - | errors.GetPlaylistContentsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetPlaylistContentsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetPlaylistContentsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetPlaylistContentsPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetPlaylistContentsResponse, + | errors.GetPlaylistContentsBadRequest + | errors.GetPlaylistContentsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetPlaylistContentsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetPlaylistContentsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetPlaylistContentsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsGetPlaylists.ts b/src/funcs/playlistsGetPlaylists.ts index f7f37de3..ed02112f 100644 --- a/src/funcs/playlistsGetPlaylists.ts +++ b/src/funcs/playlistsGetPlaylists.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,116 +29,116 @@ import { Result } from "../sdk/types/fp.js"; * Get All Playlists given the specified filters. */ export async function playlistsGetPlaylists( - client$: PlexAPICore, - playlistType?: operations.PlaylistType | undefined, - smart?: operations.QueryParamSmart | undefined, - options?: RequestOptions + client$: PlexAPICore, + playlistType?: operations.PlaylistType | undefined, + smart?: operations.QueryParamSmart | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetPlaylistsResponse, - | errors.GetPlaylistsResponseBody - | errors.GetPlaylistsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetPlaylistsResponse, + | errors.GetPlaylistsBadRequest + | errors.GetPlaylistsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetPlaylistsRequest = { - playlistType: playlistType, - smart: smart, - }; + const input$: operations.GetPlaylistsRequest = { + playlistType: playlistType, + smart: smart, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetPlaylistsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPlaylistsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/playlists")(); + const path$ = pathToFunc("/playlists")(); - const query$ = encodeFormQuery$({ - playlistType: payload$.playlistType, - smart: payload$.smart, - }); + const query$ = encodeFormQuery$({ + "playlistType": payload$.playlistType, + "smart": payload$.smart, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getPlaylists", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getPlaylists", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetPlaylistsResponse, - | errors.GetPlaylistsResponseBody - | errors.GetPlaylistsPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetPlaylistsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetPlaylistsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetPlaylistsPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetPlaylistsResponse, + | errors.GetPlaylistsBadRequest + | errors.GetPlaylistsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetPlaylistsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetPlaylistsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetPlaylistsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsUpdatePlaylist.ts b/src/funcs/playlistsUpdatePlaylist.ts index 5ba0029c..9554e5ae 100644 --- a/src/funcs/playlistsUpdatePlaylist.ts +++ b/src/funcs/playlistsUpdatePlaylist.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,128 +30,125 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * */ export async function playlistsUpdatePlaylist( - client$: PlexAPICore, - playlistID: number, - title?: string | undefined, - summary?: string | undefined, - options?: RequestOptions + client$: PlexAPICore, + playlistID: number, + title?: string | undefined, + summary?: string | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.UpdatePlaylistResponse, - | errors.UpdatePlaylistResponseBody - | errors.UpdatePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UpdatePlaylistResponse, + | errors.UpdatePlaylistBadRequest + | errors.UpdatePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UpdatePlaylistRequest = { - playlistID: playlistID, - title: title, - summary: summary, - }; + const input$: operations.UpdatePlaylistRequest = { + playlistID: playlistID, + title: title, + summary: summary, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UpdatePlaylistRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdatePlaylistRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - playlistID: encodeSimple$("playlistID", payload$.playlistID, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + playlistID: encodeSimple$("playlistID", payload$.playlistID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); + const path$ = pathToFunc("/playlists/{playlistID}")(pathParams$); - const query$ = encodeFormQuery$({ - summary: payload$.summary, - title: payload$.title, - }); + const query$ = encodeFormQuery$({ + "summary": payload$.summary, + "title": payload$.title, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "updatePlaylist", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "updatePlaylist", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UpdatePlaylistResponse, - | errors.UpdatePlaylistResponseBody - | errors.UpdatePlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.UpdatePlaylistResponse$inboundSchema), - m$.jsonErr(400, errors.UpdatePlaylistResponseBody$inboundSchema), - m$.jsonErr(401, errors.UpdatePlaylistPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UpdatePlaylistResponse, + | errors.UpdatePlaylistBadRequest + | errors.UpdatePlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.UpdatePlaylistResponse$inboundSchema), + m$.jsonErr(400, errors.UpdatePlaylistBadRequest$inboundSchema), + m$.jsonErr(401, errors.UpdatePlaylistUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/playlistsUploadPlaylist.ts b/src/funcs/playlistsUploadPlaylist.ts index 7e997d7e..5a03a7cd 100644 --- a/src/funcs/playlistsUploadPlaylist.ts +++ b/src/funcs/playlistsUploadPlaylist.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,119 +27,116 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * */ export async function playlistsUploadPlaylist( - client$: PlexAPICore, - path: string, - force: operations.QueryParamForce, - options?: RequestOptions + client$: PlexAPICore, + path: string, + force: operations.QueryParamForce, + options?: RequestOptions, ): Promise< - Result< - operations.UploadPlaylistResponse, - | errors.UploadPlaylistResponseBody - | errors.UploadPlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.UploadPlaylistResponse, + | errors.UploadPlaylistBadRequest + | errors.UploadPlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.UploadPlaylistRequest = { - path: path, - force: force, - }; + const input$: operations.UploadPlaylistRequest = { + path: path, + force: force, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.UploadPlaylistRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UploadPlaylistRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/playlists/upload")(); + const path$ = pathToFunc("/playlists/upload")(); - const query$ = encodeFormQuery$({ - force: payload$.force, - path: payload$.path, - }); + const query$ = encodeFormQuery$({ + "force": payload$.force, + "path": payload$.path, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "uploadPlaylist", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "uploadPlaylist", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "POST", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.UploadPlaylistResponse, - | errors.UploadPlaylistResponseBody - | errors.UploadPlaylistPlaylistsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.UploadPlaylistResponse$inboundSchema), - m$.jsonErr(400, errors.UploadPlaylistResponseBody$inboundSchema), - m$.jsonErr(401, errors.UploadPlaylistPlaylistsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.UploadPlaylistResponse, + | errors.UploadPlaylistBadRequest + | errors.UploadPlaylistUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.UploadPlaylistResponse$inboundSchema), + m$.jsonErr(400, errors.UploadPlaylistBadRequest$inboundSchema), + m$.jsonErr(401, errors.UploadPlaylistUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetCompanionsData.ts b/src/funcs/plexGetCompanionsData.ts index e8331009..bae1f5f1 100644 --- a/src/funcs/plexGetCompanionsData.ts +++ b/src/funcs/plexGetCompanionsData.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -28,96 +28,97 @@ import { Result } from "../sdk/types/fp.js"; * Get Companions Data */ export async function plexGetCompanionsData( - client$: PlexAPICore, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetCompanionsDataResponse, - | errors.GetCompanionsDataResponseBody - | errors.GetCompanionsDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetCompanionsDataResponse, + | errors.GetCompanionsDataBadRequest + | errors.GetCompanionsDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(GetCompanionsDataServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetCompanionsDataServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/companions")(); + const path$ = pathToFunc("/companions")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getCompanionsData", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getCompanionsData", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetCompanionsDataResponse, - | errors.GetCompanionsDataResponseBody - | errors.GetCompanionsDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetCompanionsDataResponse$inboundSchema, { key: "responseBodies" }), - m$.jsonErr(400, errors.GetCompanionsDataResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetCompanionsDataPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetCompanionsDataResponse, + | errors.GetCompanionsDataBadRequest + | errors.GetCompanionsDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetCompanionsDataResponse$inboundSchema, { + key: "responseBodies", + }), + m$.jsonErr(400, errors.GetCompanionsDataBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetCompanionsDataUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetGeoData.ts b/src/funcs/plexGetGeoData.ts index 1ba5c616..f9da2e47 100644 --- a/src/funcs/plexGetGeoData.ts +++ b/src/funcs/plexGetGeoData.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,87 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Returns the geolocation and locale data of the caller */ export async function plexGetGeoData( - client$: PlexAPICore, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetGeoDataResponse, - | errors.GetGeoDataResponseBody - | errors.GetGeoDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetGeoDataResponse, + | errors.GetGeoDataBadRequest + | errors.GetGeoDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || pathToFunc(GetGeoDataServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetGeoDataServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/geoip")(); + const path$ = pathToFunc("/geoip")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getGeoData", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getGeoData", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetGeoDataResponse, - | errors.GetGeoDataResponseBody - | errors.GetGeoDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetGeoDataResponse$inboundSchema, { key: "GeoData" }), - m$.jsonErr(400, errors.GetGeoDataResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetGeoDataPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetGeoDataResponse, + | errors.GetGeoDataBadRequest + | errors.GetGeoDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetGeoDataResponse$inboundSchema, { + key: "GeoData", + }), + m$.jsonErr(400, errors.GetGeoDataBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetGeoDataUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetHomeData.ts b/src/funcs/plexGetHomeData.ts index e34affd8..ae3ea47f 100644 --- a/src/funcs/plexGetHomeData.ts +++ b/src/funcs/plexGetHomeData.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. */ export async function plexGetHomeData( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetHomeDataResponse, - | errors.GetHomeDataResponseBody - | errors.GetHomeDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetHomeDataResponse, + | errors.GetHomeDataBadRequest + | errors.GetHomeDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/home")(); + const path$ = pathToFunc("/home")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getHomeData", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getHomeData", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetHomeDataResponse, - | errors.GetHomeDataResponseBody - | errors.GetHomeDataPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetHomeDataResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetHomeDataResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetHomeDataPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetHomeDataResponse, + | errors.GetHomeDataBadRequest + | errors.GetHomeDataUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetHomeDataResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetHomeDataBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetHomeDataUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetPin.ts b/src/funcs/plexGetPin.ts index fb1928b8..09fea415 100644 --- a/src/funcs/plexGetPin.ts +++ b/src/funcs/plexGetPin.ts @@ -9,11 +9,11 @@ import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,117 @@ import { Result } from "../sdk/types/fp.js"; * Retrieve a Pin from Plex.tv for authentication flows */ export async function plexGetPin( - client$: PlexAPICore, - strong?: boolean | undefined, - xPlexClientIdentifier?: string | undefined, - xPlexProduct?: string | undefined, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + strong?: boolean | undefined, + xPlexClientIdentifier?: string | undefined, + xPlexProduct?: string | undefined, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetPinResponse, - | errors.GetPinResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetPinResponse, + | errors.GetPinBadRequest + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetPinRequest = { - strong: strong, - xPlexClientIdentifier: xPlexClientIdentifier, - xPlexProduct: xPlexProduct, - }; + const input$: operations.GetPinRequest = { + strong: strong, + xPlexClientIdentifier: xPlexClientIdentifier, + xPlexProduct: xPlexProduct, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetPinRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPinRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetPinServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetPinServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/pins")(); + const path$ = pathToFunc("/pins")(); - const query$ = encodeFormQuery$({ - strong: payload$.strong, - "X-Plex-Client-Identifier": - payload$["X-Plex-Client-Identifier"] ?? client$.options$.xPlexClientIdentifier, - "X-Plex-Product": payload$["X-Plex-Product"], - }); + const query$ = encodeFormQuery$({ + "strong": payload$.strong, + "X-Plex-Client-Identifier": payload$["X-Plex-Client-Identifier"] + ?? client$.options$.xPlexClientIdentifier, + "X-Plex-Product": payload$["X-Plex-Product"], + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getPin", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getPin", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "POST", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "POST", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetPinResponse, - | errors.GetPinResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetPinResponse$inboundSchema, { key: "AuthPinContainer" }), - m$.jsonErr(400, errors.GetPinResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetPinResponse, + | errors.GetPinBadRequest + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetPinResponse$inboundSchema, { + key: "AuthPinContainer", + }), + m$.jsonErr(400, errors.GetPinBadRequest$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetServerResources.ts b/src/funcs/plexGetServerResources.ts index a19916e6..f1867770 100644 --- a/src/funcs/plexGetServerResources.ts +++ b/src/funcs/plexGetServerResources.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,121 +30,130 @@ import { Result } from "../sdk/types/fp.js"; * Get Plex server access tokens and server connections */ export async function plexGetServerResources( - client$: PlexAPICore, - request: operations.GetServerResourcesRequest, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + xPlexClientIdentifier?: string | undefined, + includeHttps?: operations.IncludeHttps | undefined, + includeRelay?: operations.IncludeRelay | undefined, + includeIPv6?: operations.IncludeIPv6 | undefined, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetServerResourcesResponse, - | errors.GetServerResourcesResponseBody - | errors.GetServerResourcesPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerResourcesResponse, + | errors.GetServerResourcesBadRequest + | errors.GetServerResourcesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$: operations.GetServerResourcesRequest = { + xPlexClientIdentifier: xPlexClientIdentifier, + includeHttps: includeHttps, + includeRelay: includeRelay, + includeIPv6: includeIPv6, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetServerResourcesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetServerResourcesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetServerResourcesServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetServerResourcesServerList[0], { + charEncoding: "percent", + })(); - const path$ = pathToFunc("/resources")(); + const path$ = pathToFunc("/resources")(); - const query$ = encodeFormQuery$({ - includeHttps: payload$.includeHttps, - includeIPv6: payload$.includeIPv6, - includeRelay: payload$.includeRelay, - "X-Plex-Client-Identifier": - payload$["X-Plex-Client-Identifier"] ?? client$.options$.xPlexClientIdentifier, - "X-Plex-Token": payload$["X-Plex-Token"], - }); + const query$ = encodeFormQuery$({ + "includeHttps": payload$.includeHttps, + "includeIPv6": payload$.includeIPv6, + "includeRelay": payload$.includeRelay, + "X-Plex-Client-Identifier": payload$["X-Plex-Client-Identifier"] + ?? client$.options$.xPlexClientIdentifier, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-server-resources", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-server-resources", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerResourcesResponse, - | errors.GetServerResourcesResponseBody - | errors.GetServerResourcesPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerResourcesResponse$inboundSchema, { key: "PlexDevices" }), - m$.jsonErr(400, errors.GetServerResourcesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetServerResourcesPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerResourcesResponse, + | errors.GetServerResourcesBadRequest + | errors.GetServerResourcesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerResourcesResponse$inboundSchema, { + key: "PlexDevices", + }), + m$.jsonErr(400, errors.GetServerResourcesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetServerResourcesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetTokenByPinId.ts b/src/funcs/plexGetTokenByPinId.ts index a5fcee61..07d645cd 100644 --- a/src/funcs/plexGetTokenByPinId.ts +++ b/src/funcs/plexGetTokenByPinId.ts @@ -4,19 +4,19 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -32,117 +32,123 @@ import { Result } from "../sdk/types/fp.js"; * Retrieve an Access Token from Plex.tv after the Pin has been authenticated */ export async function plexGetTokenByPinId( - client$: PlexAPICore, - pinID: number, - xPlexClientIdentifier?: string | undefined, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + pinID: number, + xPlexClientIdentifier?: string | undefined, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetTokenByPinIdResponse, - | errors.GetTokenByPinIdResponseBody - | errors.GetTokenByPinIdPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTokenByPinIdResponse, + | errors.GetTokenByPinIdBadRequest + | errors.GetTokenByPinIdResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetTokenByPinIdRequest = { - xPlexClientIdentifier: xPlexClientIdentifier, - pinID: pinID, - }; + const input$: operations.GetTokenByPinIdRequest = { + xPlexClientIdentifier: xPlexClientIdentifier, + pinID: pinID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTokenByPinIdRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTokenByPinIdRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || - pathToFunc(GetTokenByPinIdServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetTokenByPinIdServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - pinID: encodeSimple$("pinID", payload$.pinID, { explode: false, charEncoding: "percent" }), - }; + const pathParams$ = { + pinID: encodeSimple$("pinID", payload$.pinID, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/pins/{pinID}")(pathParams$); + const path$ = pathToFunc("/pins/{pinID}")(pathParams$); - const query$ = encodeFormQuery$({ - "X-Plex-Client-Identifier": - payload$["X-Plex-Client-Identifier"] ?? client$.options$.xPlexClientIdentifier, - }); + const query$ = encodeFormQuery$({ + "X-Plex-Client-Identifier": payload$["X-Plex-Client-Identifier"] + ?? client$.options$.xPlexClientIdentifier, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "getTokenByPinId", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "getTokenByPinId", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "404", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "404", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetTokenByPinIdResponse, - | errors.GetTokenByPinIdResponseBody - | errors.GetTokenByPinIdPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTokenByPinIdResponse$inboundSchema, { key: "AuthPinContainer" }), - m$.jsonErr(400, errors.GetTokenByPinIdResponseBody$inboundSchema), - m$.jsonErr(404, errors.GetTokenByPinIdPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetTokenByPinIdResponse, + | errors.GetTokenByPinIdBadRequest + | errors.GetTokenByPinIdResponseBody + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTokenByPinIdResponse$inboundSchema, { + key: "AuthPinContainer", + }), + m$.jsonErr(400, errors.GetTokenByPinIdBadRequest$inboundSchema), + m$.jsonErr(404, errors.GetTokenByPinIdResponseBody$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/plexGetUserFriends.ts b/src/funcs/plexGetUserFriends.ts index 861ebfc9..f9953349 100644 --- a/src/funcs/plexGetUserFriends.ts +++ b/src/funcs/plexGetUserFriends.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -28,96 +28,95 @@ import { Result } from "../sdk/types/fp.js"; * Get friends of provided auth token. */ export async function plexGetUserFriends( - client$: PlexAPICore, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetUserFriendsResponse, - | errors.GetUserFriendsResponseBody - | errors.GetUserFriendsPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUserFriendsResponse, + | errors.GetUserFriendsBadRequest + | errors.GetUserFriendsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const baseURL$ = - options?.serverURL || - pathToFunc(GetUserFriendsServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetUserFriendsServerList[0], { charEncoding: "percent" })(); - const path$ = pathToFunc("/friends")(); + const path$ = pathToFunc("/friends")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getUserFriends", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getUserFriends", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetUserFriendsResponse, - | errors.GetUserFriendsResponseBody - | errors.GetUserFriendsPlexResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetUserFriendsResponse$inboundSchema, { key: "Friends" }), - m$.jsonErr(400, errors.GetUserFriendsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetUserFriendsPlexResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetUserFriendsResponse, + | errors.GetUserFriendsBadRequest + | errors.GetUserFriendsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUserFriendsResponse$inboundSchema, { + key: "Friends", + }), + m$.jsonErr(400, errors.GetUserFriendsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetUserFriendsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/searchGetSearchResults.ts b/src/funcs/searchGetSearchResults.ts index 9b93300f..81e656c6 100644 --- a/src/funcs/searchGetSearchResults.ts +++ b/src/funcs/searchGetSearchResults.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,113 @@ import { Result } from "../sdk/types/fp.js"; * This will search the database for the string provided. */ export async function searchGetSearchResults( - client$: PlexAPICore, - query: string, - options?: RequestOptions + client$: PlexAPICore, + query: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetSearchResultsResponse, - | errors.GetSearchResultsResponseBody - | errors.GetSearchResultsSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSearchResultsResponse, + | errors.GetSearchResultsBadRequest + | errors.GetSearchResultsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetSearchResultsRequest = { - query: query, - }; + const input$: operations.GetSearchResultsRequest = { + query: query, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSearchResultsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetSearchResultsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/search")(); + const path$ = pathToFunc("/search")(); - const query$ = encodeFormQuery$({ - query: payload$.query, - }); + const query$ = encodeFormQuery$({ + "query": payload$.query, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getSearchResults", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getSearchResults", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetSearchResultsResponse, - | errors.GetSearchResultsResponseBody - | errors.GetSearchResultsSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetSearchResultsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetSearchResultsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetSearchResultsSearchResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetSearchResultsResponse, + | errors.GetSearchResultsBadRequest + | errors.GetSearchResultsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSearchResultsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetSearchResultsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetSearchResultsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/searchPerformSearch.ts b/src/funcs/searchPerformSearch.ts index e2bc927a..5dec2fff 100644 --- a/src/funcs/searchPerformSearch.ts +++ b/src/funcs/searchPerformSearch.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -38,122 +38,119 @@ import { Result } from "../sdk/types/fp.js"; * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. * * This request is intended to be very fast, and called as the user types. - * */ export async function searchPerformSearch( - client$: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformSearchResponse, - | errors.PerformSearchResponseBody - | errors.PerformSearchSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformSearchResponse, + | errors.PerformSearchBadRequest + | errors.PerformSearchUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.PerformSearchRequest = { - query: query, - sectionId: sectionId, - limit: limit, - }; + const input$: operations.PerformSearchRequest = { + query: query, + sectionId: sectionId, + limit: limit, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PerformSearchRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.PerformSearchRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/hubs/search")(); + const path$ = pathToFunc("/hubs/search")(); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - query: payload$.query, - sectionId: payload$.sectionId, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "query": payload$.query, + "sectionId": payload$.sectionId, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "performSearch", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "performSearch", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PerformSearchResponse, - | errors.PerformSearchResponseBody - | errors.PerformSearchSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.PerformSearchResponse$inboundSchema), - m$.jsonErr(400, errors.PerformSearchResponseBody$inboundSchema), - m$.jsonErr(401, errors.PerformSearchSearchResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PerformSearchResponse, + | errors.PerformSearchBadRequest + | errors.PerformSearchUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.PerformSearchResponse$inboundSchema), + m$.jsonErr(400, errors.PerformSearchBadRequest$inboundSchema), + m$.jsonErr(401, errors.PerformSearchUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/searchPerformVoiceSearch.ts b/src/funcs/searchPerformVoiceSearch.ts index 299cd626..738aff15 100644 --- a/src/funcs/searchPerformVoiceSearch.ts +++ b/src/funcs/searchPerformVoiceSearch.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -30,122 +30,120 @@ import { Result } from "../sdk/types/fp.js"; * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. * Whenever possible, clients should limit the search to the appropriate type. * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - * */ export async function searchPerformVoiceSearch( - client$: PlexAPICore, - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.PerformVoiceSearchResponse, - | errors.PerformVoiceSearchResponseBody - | errors.PerformVoiceSearchSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.PerformVoiceSearchResponse, + | errors.PerformVoiceSearchBadRequest + | errors.PerformVoiceSearchUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.PerformVoiceSearchRequest = { - query: query, - sectionId: sectionId, - limit: limit, - }; + const input$: operations.PerformVoiceSearchRequest = { + query: query, + sectionId: sectionId, + limit: limit, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.PerformVoiceSearchRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.PerformVoiceSearchRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/hubs/search/voice")(); + const path$ = pathToFunc("/hubs/search/voice")(); - const query$ = encodeFormQuery$({ - limit: payload$.limit, - query: payload$.query, - sectionId: payload$.sectionId, - }); + const query$ = encodeFormQuery$({ + "limit": payload$.limit, + "query": payload$.query, + "sectionId": payload$.sectionId, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "performVoiceSearch", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "performVoiceSearch", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.PerformVoiceSearchResponse, - | errors.PerformVoiceSearchResponseBody - | errors.PerformVoiceSearchSearchResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.PerformVoiceSearchResponse$inboundSchema), - m$.jsonErr(400, errors.PerformVoiceSearchResponseBody$inboundSchema), - m$.jsonErr(401, errors.PerformVoiceSearchSearchResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.PerformVoiceSearchResponse, + | errors.PerformVoiceSearchBadRequest + | errors.PerformVoiceSearchUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.PerformVoiceSearchResponse$inboundSchema), + m$.jsonErr(400, errors.PerformVoiceSearchBadRequest$inboundSchema), + m$.jsonErr(401, errors.PerformVoiceSearchUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetAvailableClients.ts b/src/funcs/serverGetAvailableClients.ts index 85a2093a..ebf88936 100644 --- a/src/funcs/serverGetAvailableClients.ts +++ b/src/funcs/serverGetAvailableClients.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Available Clients */ export async function serverGetAvailableClients( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetAvailableClientsResponse, - | errors.GetAvailableClientsResponseBody - | errors.GetAvailableClientsServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetAvailableClientsResponse, + | errors.GetAvailableClientsBadRequest + | errors.GetAvailableClientsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/clients")(); + const path$ = pathToFunc("/clients")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getAvailableClients", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getAvailableClients", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetAvailableClientsResponse, - | errors.GetAvailableClientsResponseBody - | errors.GetAvailableClientsServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetAvailableClientsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetAvailableClientsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetAvailableClientsServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetAvailableClientsResponse, + | errors.GetAvailableClientsBadRequest + | errors.GetAvailableClientsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetAvailableClientsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetAvailableClientsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetAvailableClientsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetDevices.ts b/src/funcs/serverGetDevices.ts index e6f9698a..cd043fe5 100644 --- a/src/funcs/serverGetDevices.ts +++ b/src/funcs/serverGetDevices.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Devices */ export async function serverGetDevices( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetDevicesResponse, - | errors.GetDevicesResponseBody - | errors.GetDevicesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetDevicesResponse, + | errors.GetDevicesBadRequest + | errors.GetDevicesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/devices")(); + const path$ = pathToFunc("/devices")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getDevices", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getDevices", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetDevicesResponse, - | errors.GetDevicesResponseBody - | errors.GetDevicesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetDevicesResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetDevicesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetDevicesServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetDevicesResponse, + | errors.GetDevicesBadRequest + | errors.GetDevicesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetDevicesResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetDevicesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetDevicesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetMediaProviders.ts b/src/funcs/serverGetMediaProviders.ts index b126b018..80258c65 100644 --- a/src/funcs/serverGetMediaProviders.ts +++ b/src/funcs/serverGetMediaProviders.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * Retrieves media providers and their features from the Plex server. */ export async function serverGetMediaProviders( - client$: PlexAPICore, - xPlexToken: string, - options?: RequestOptions + client$: PlexAPICore, + xPlexToken: string, + options?: RequestOptions, ): Promise< - Result< - operations.GetMediaProvidersResponse, - | errors.GetMediaProvidersResponseBody - | errors.GetMediaProvidersServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetMediaProvidersResponse, + | errors.GetMediaProvidersBadRequest + | errors.GetMediaProvidersUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetMediaProvidersRequest = { - xPlexToken: xPlexToken, - }; + const input$: operations.GetMediaProvidersRequest = { + xPlexToken: xPlexToken, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetMediaProvidersRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetMediaProvidersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/media/providers")(); + const path$ = pathToFunc("/media/providers")(); - const query$ = encodeFormQuery$({ - "X-Plex-Token": payload$["X-Plex-Token"], - }); + const query$ = encodeFormQuery$({ + "X-Plex-Token": payload$["X-Plex-Token"], + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-media-providers", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-media-providers", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetMediaProvidersResponse, - | errors.GetMediaProvidersResponseBody - | errors.GetMediaProvidersServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetMediaProvidersResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetMediaProvidersResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetMediaProvidersServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetMediaProvidersResponse, + | errors.GetMediaProvidersBadRequest + | errors.GetMediaProvidersUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetMediaProvidersResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetMediaProvidersBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetMediaProvidersUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetMyPlexAccount.ts b/src/funcs/serverGetMyPlexAccount.ts index b4469cf7..3adca75c 100644 --- a/src/funcs/serverGetMyPlexAccount.ts +++ b/src/funcs/serverGetMyPlexAccount.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Returns MyPlex Account Information */ export async function serverGetMyPlexAccount( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetMyPlexAccountResponse, - | errors.GetMyPlexAccountResponseBody - | errors.GetMyPlexAccountServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetMyPlexAccountResponse, + | errors.GetMyPlexAccountBadRequest + | errors.GetMyPlexAccountUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/myplex/account")(); + const path$ = pathToFunc("/myplex/account")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getMyPlexAccount", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getMyPlexAccount", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetMyPlexAccountResponse, - | errors.GetMyPlexAccountResponseBody - | errors.GetMyPlexAccountServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetMyPlexAccountResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetMyPlexAccountResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetMyPlexAccountServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetMyPlexAccountResponse, + | errors.GetMyPlexAccountBadRequest + | errors.GetMyPlexAccountUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetMyPlexAccountResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetMyPlexAccountBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetMyPlexAccountUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetResizedPhoto.ts b/src/funcs/serverGetResizedPhoto.ts index 236f99cd..0466df0f 100644 --- a/src/funcs/serverGetResizedPhoto.ts +++ b/src/funcs/serverGetResizedPhoto.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,120 +27,117 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * */ export async function serverGetResizedPhoto( - client$: PlexAPICore, - request: operations.GetResizedPhotoRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.GetResizedPhotoRequest, + options?: RequestOptions, ): Promise< - Result< - operations.GetResizedPhotoResponse, - | errors.GetResizedPhotoResponseBody - | errors.GetResizedPhotoServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetResizedPhotoResponse, + | errors.GetResizedPhotoBadRequest + | errors.GetResizedPhotoUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetResizedPhotoRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetResizedPhotoRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/photo/:/transcode")(); + const path$ = pathToFunc("/photo/:/transcode")(); - const query$ = encodeFormQuery$({ - blur: payload$.blur, - height: payload$.height, - minSize: payload$.minSize, - opacity: payload$.opacity, - upscale: payload$.upscale, - url: payload$.url, - width: payload$.width, - }); + const query$ = encodeFormQuery$({ + "blur": payload$.blur, + "height": payload$.height, + "minSize": payload$.minSize, + "opacity": payload$.opacity, + "upscale": payload$.upscale, + "url": payload$.url, + "width": payload$.width, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getResizedPhoto", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getResizedPhoto", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetResizedPhotoResponse, - | errors.GetResizedPhotoResponseBody - | errors.GetResizedPhotoServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetResizedPhotoResponse$inboundSchema), - m$.jsonErr(400, errors.GetResizedPhotoResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetResizedPhotoServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetResizedPhotoResponse, + | errors.GetResizedPhotoBadRequest + | errors.GetResizedPhotoUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.GetResizedPhotoResponse$inboundSchema), + m$.jsonErr(400, errors.GetResizedPhotoBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetResizedPhotoUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetServerCapabilities.ts b/src/funcs/serverGetServerCapabilities.ts index af5ae6c1..c4fa5c85 100644 --- a/src/funcs/serverGetServerCapabilities.ts +++ b/src/funcs/serverGetServerCapabilities.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Server Capabilities */ export async function serverGetServerCapabilities( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetServerCapabilitiesResponse, - | errors.GetServerCapabilitiesResponseBody - | errors.GetServerCapabilitiesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerCapabilitiesResponse, + | errors.GetServerCapabilitiesBadRequest + | errors.GetServerCapabilitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/")(); + const path$ = pathToFunc("/")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getServerCapabilities", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getServerCapabilities", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerCapabilitiesResponse, - | errors.GetServerCapabilitiesResponseBody - | errors.GetServerCapabilitiesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerCapabilitiesResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetServerCapabilitiesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetServerCapabilitiesServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerCapabilitiesResponse, + | errors.GetServerCapabilitiesBadRequest + | errors.GetServerCapabilitiesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerCapabilitiesResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetServerCapabilitiesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetServerCapabilitiesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetServerIdentity.ts b/src/funcs/serverGetServerIdentity.ts index 4db721ba..7602915c 100644 --- a/src/funcs/serverGetServerIdentity.ts +++ b/src/funcs/serverGetServerIdentity.ts @@ -7,11 +7,11 @@ import * as m$ from "../lib/matchers.js"; import { RequestOptions } from "../lib/sdks.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -26,80 +26,84 @@ import { Result } from "../sdk/types/fp.js"; * This request is useful to determine if the server is online or offline */ export async function serverGetServerIdentity( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetServerIdentityResponse, - | errors.GetServerIdentityResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerIdentityResponse, + | errors.GetServerIdentityRequestTimeout + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/identity")(); + const path$ = pathToFunc("/identity")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const context = { operationID: "get-server-identity", oAuth2Scopes: [], securitySource: null }; + const context = { + operationID: "get-server-identity", + oAuth2Scopes: [], + securitySource: null, + }; - const requestRes = client$.createRequest$( - context, - { - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["408", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["408", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerIdentityResponse, - | errors.GetServerIdentityResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerIdentityResponse$inboundSchema, { key: "object" }), - m$.jsonErr(408, errors.GetServerIdentityResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerIdentityResponse, + | errors.GetServerIdentityRequestTimeout + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerIdentityResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(408, errors.GetServerIdentityRequestTimeout$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetServerList.ts b/src/funcs/serverGetServerList.ts index 8145fe45..7d23ba1e 100644 --- a/src/funcs/serverGetServerList.ts +++ b/src/funcs/serverGetServerList.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Server List */ export async function serverGetServerList( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetServerListResponse, - | errors.GetServerListResponseBody - | errors.GetServerListServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerListResponse, + | errors.GetServerListBadRequest + | errors.GetServerListUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/servers")(); + const path$ = pathToFunc("/servers")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getServerList", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getServerList", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerListResponse, - | errors.GetServerListResponseBody - | errors.GetServerListServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerListResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetServerListResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetServerListServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerListResponse, + | errors.GetServerListBadRequest + | errors.GetServerListUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerListResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetServerListBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetServerListUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/serverGetServerPreferences.ts b/src/funcs/serverGetServerPreferences.ts index 8215b6ec..4e1be1ff 100644 --- a/src/funcs/serverGetServerPreferences.ts +++ b/src/funcs/serverGetServerPreferences.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Server Preferences */ export async function serverGetServerPreferences( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetServerPreferencesResponse, - | errors.GetServerPreferencesResponseBody - | errors.GetServerPreferencesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetServerPreferencesResponse, + | errors.GetServerPreferencesBadRequest + | errors.GetServerPreferencesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/:/prefs")(); + const path$ = pathToFunc("/:/prefs")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getServerPreferences", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getServerPreferences", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetServerPreferencesResponse, - | errors.GetServerPreferencesResponseBody - | errors.GetServerPreferencesServerResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetServerPreferencesResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetServerPreferencesResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetServerPreferencesServerResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetServerPreferencesResponse, + | errors.GetServerPreferencesBadRequest + | errors.GetServerPreferencesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetServerPreferencesResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetServerPreferencesBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetServerPreferencesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/sessionsGetSessionHistory.ts b/src/funcs/sessionsGetSessionHistory.ts index 86a3b42a..4d46fe62 100644 --- a/src/funcs/sessionsGetSessionHistory.ts +++ b/src/funcs/sessionsGetSessionHistory.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,122 +29,123 @@ import { Result } from "../sdk/types/fp.js"; * This will Retrieve a listing of all history views. */ export async function sessionsGetSessionHistory( - client$: PlexAPICore, - sort?: string | undefined, - accountId?: number | undefined, - filter?: operations.QueryParamFilter | undefined, - librarySectionID?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + sort?: string | undefined, + accountId?: number | undefined, + filter?: operations.QueryParamFilter | undefined, + librarySectionID?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetSessionHistoryResponse, - | errors.GetSessionHistoryResponseBody - | errors.GetSessionHistorySessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSessionHistoryResponse, + | errors.GetSessionHistoryBadRequest + | errors.GetSessionHistoryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetSessionHistoryRequest = { - sort: sort, - accountId: accountId, - filter: filter, - librarySectionID: librarySectionID, - }; + const input$: operations.GetSessionHistoryRequest = { + sort: sort, + accountId: accountId, + filter: filter, + librarySectionID: librarySectionID, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetSessionHistoryRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetSessionHistoryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/status/sessions/history/all")(); + const path$ = pathToFunc("/status/sessions/history/all")(); - const query$ = encodeFormQuery$({ - accountId: payload$.accountId, - filter: payload$.filter, - librarySectionID: payload$.librarySectionID, - sort: payload$.sort, - }); + const query$ = encodeFormQuery$({ + "accountId": payload$.accountId, + "filter": payload$.filter, + "librarySectionID": payload$.librarySectionID, + "sort": payload$.sort, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getSessionHistory", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getSessionHistory", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetSessionHistoryResponse, - | errors.GetSessionHistoryResponseBody - | errors.GetSessionHistorySessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetSessionHistoryResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetSessionHistoryResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetSessionHistorySessionsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetSessionHistoryResponse, + | errors.GetSessionHistoryBadRequest + | errors.GetSessionHistoryUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSessionHistoryResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetSessionHistoryBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetSessionHistoryUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/sessionsGetSessions.ts b/src/funcs/sessionsGetSessions.ts index 384fc777..c1976dc7 100644 --- a/src/funcs/sessionsGetSessions.ts +++ b/src/funcs/sessionsGetSessions.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * This will retrieve the "Now Playing" Information of the PMS. */ export async function sessionsGetSessions( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetSessionsResponse, - | errors.GetSessionsResponseBody - | errors.GetSessionsSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetSessionsResponse, + | errors.GetSessionsBadRequest + | errors.GetSessionsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/status/sessions")(); + const path$ = pathToFunc("/status/sessions")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getSessions", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getSessions", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetSessionsResponse, - | errors.GetSessionsResponseBody - | errors.GetSessionsSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetSessionsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetSessionsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetSessionsSessionsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetSessionsResponse, + | errors.GetSessionsBadRequest + | errors.GetSessionsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetSessionsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetSessionsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetSessionsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/sessionsGetTranscodeSessions.ts b/src/funcs/sessionsGetTranscodeSessions.ts index 12541b27..01a22c3f 100644 --- a/src/funcs/sessionsGetTranscodeSessions.ts +++ b/src/funcs/sessionsGetTranscodeSessions.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Get Transcode Sessions */ export async function sessionsGetTranscodeSessions( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetTranscodeSessionsResponse, - | errors.GetTranscodeSessionsResponseBody - | errors.GetTranscodeSessionsSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTranscodeSessionsResponse, + | errors.GetTranscodeSessionsBadRequest + | errors.GetTranscodeSessionsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/transcode/sessions")(); + const path$ = pathToFunc("/transcode/sessions")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getTranscodeSessions", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getTranscodeSessions", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetTranscodeSessionsResponse, - | errors.GetTranscodeSessionsResponseBody - | errors.GetTranscodeSessionsSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetTranscodeSessionsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetTranscodeSessionsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetTranscodeSessionsSessionsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetTranscodeSessionsResponse, + | errors.GetTranscodeSessionsBadRequest + | errors.GetTranscodeSessionsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetTranscodeSessionsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetTranscodeSessionsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetTranscodeSessionsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/sessionsStopTranscodeSession.ts b/src/funcs/sessionsStopTranscodeSession.ts index fa19ce8e..c8b47a00 100644 --- a/src/funcs/sessionsStopTranscodeSession.ts +++ b/src/funcs/sessionsStopTranscodeSession.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,115 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * Stop a Transcode Session */ export async function sessionsStopTranscodeSession( - client$: PlexAPICore, - sessionKey: string, - options?: RequestOptions + client$: PlexAPICore, + sessionKey: string, + options?: RequestOptions, ): Promise< - Result< - operations.StopTranscodeSessionResponse, - | errors.StopTranscodeSessionResponseBody - | errors.StopTranscodeSessionSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StopTranscodeSessionResponse, + | errors.StopTranscodeSessionBadRequest + | errors.StopTranscodeSessionUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.StopTranscodeSessionRequest = { - sessionKey: sessionKey, - }; + const input$: operations.StopTranscodeSessionRequest = { + sessionKey: sessionKey, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.StopTranscodeSessionRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.StopTranscodeSessionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const pathParams$ = { - sessionKey: encodeSimple$("sessionKey", payload$.sessionKey, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + sessionKey: encodeSimple$("sessionKey", payload$.sessionKey, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/transcode/sessions/{sessionKey}")(pathParams$); + const path$ = pathToFunc("/transcode/sessions/{sessionKey}")(pathParams$); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "stopTranscodeSession", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "stopTranscodeSession", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "DELETE", - path: path$, - headers: headers$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StopTranscodeSessionResponse, - | errors.StopTranscodeSessionResponseBody - | errors.StopTranscodeSessionSessionsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(204, operations.StopTranscodeSessionResponse$inboundSchema), - m$.jsonErr(400, errors.StopTranscodeSessionResponseBody$inboundSchema), - m$.jsonErr(401, errors.StopTranscodeSessionSessionsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StopTranscodeSessionResponse, + | errors.StopTranscodeSessionBadRequest + | errors.StopTranscodeSessionUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, operations.StopTranscodeSessionResponse$inboundSchema), + m$.jsonErr(400, errors.StopTranscodeSessionBadRequest$inboundSchema), + m$.jsonErr(401, errors.StopTranscodeSessionUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/statisticsGetBandwidthStatistics.ts b/src/funcs/statisticsGetBandwidthStatistics.ts index 5d2a9ba2..207c6659 100644 --- a/src/funcs/statisticsGetBandwidthStatistics.ts +++ b/src/funcs/statisticsGetBandwidthStatistics.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * This will return the bandwidth statistics for the server */ export async function statisticsGetBandwidthStatistics( - client$: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + timespan?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetBandwidthStatisticsResponse, - | errors.GetBandwidthStatisticsResponseBody - | errors.GetBandwidthStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetBandwidthStatisticsResponse, + | errors.GetBandwidthStatisticsBadRequest + | errors.GetBandwidthStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetBandwidthStatisticsRequest = { - timespan: timespan, - }; + const input$: operations.GetBandwidthStatisticsRequest = { + timespan: timespan, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetBandwidthStatisticsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetBandwidthStatisticsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/statistics/bandwidth")(); + const path$ = pathToFunc("/statistics/bandwidth")(); - const query$ = encodeFormQuery$({ - Timespan: payload$.Timespan, - }); + const query$ = encodeFormQuery$({ + "Timespan": payload$.Timespan, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getBandwidthStatistics", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getBandwidthStatistics", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetBandwidthStatisticsResponse, - | errors.GetBandwidthStatisticsResponseBody - | errors.GetBandwidthStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetBandwidthStatisticsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetBandwidthStatisticsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetBandwidthStatisticsStatisticsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetBandwidthStatisticsResponse, + | errors.GetBandwidthStatisticsBadRequest + | errors.GetBandwidthStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetBandwidthStatisticsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetBandwidthStatisticsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetBandwidthStatisticsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/statisticsGetResourcesStatistics.ts b/src/funcs/statisticsGetResourcesStatistics.ts index 80e3de63..5ebd6b38 100644 --- a/src/funcs/statisticsGetResourcesStatistics.ts +++ b/src/funcs/statisticsGetResourcesStatistics.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,114 @@ import { Result } from "../sdk/types/fp.js"; * This will return the resources for the server */ export async function statisticsGetResourcesStatistics( - client$: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + timespan?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetResourcesStatisticsResponse, - | errors.GetResourcesStatisticsResponseBody - | errors.GetResourcesStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetResourcesStatisticsResponse, + | errors.GetResourcesStatisticsBadRequest + | errors.GetResourcesStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetResourcesStatisticsRequest = { - timespan: timespan, - }; + const input$: operations.GetResourcesStatisticsRequest = { + timespan: timespan, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetResourcesStatisticsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetResourcesStatisticsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/statistics/resources")(); + const path$ = pathToFunc("/statistics/resources")(); - const query$ = encodeFormQuery$({ - Timespan: payload$.Timespan, - }); + const query$ = encodeFormQuery$({ + "Timespan": payload$.Timespan, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getResourcesStatistics", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getResourcesStatistics", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetResourcesStatisticsResponse, - | errors.GetResourcesStatisticsResponseBody - | errors.GetResourcesStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetResourcesStatisticsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetResourcesStatisticsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetResourcesStatisticsStatisticsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetResourcesStatisticsResponse, + | errors.GetResourcesStatisticsBadRequest + | errors.GetResourcesStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetResourcesStatisticsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetResourcesStatisticsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetResourcesStatisticsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/statisticsGetStatistics.ts b/src/funcs/statisticsGetStatistics.ts index 47f146a2..3c411d55 100644 --- a/src/funcs/statisticsGetStatistics.ts +++ b/src/funcs/statisticsGetStatistics.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,113 @@ import { Result } from "../sdk/types/fp.js"; * This will return the media statistics for the server */ export async function statisticsGetStatistics( - client$: PlexAPICore, - timespan?: number | undefined, - options?: RequestOptions + client$: PlexAPICore, + timespan?: number | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.GetStatisticsResponse, - | errors.GetStatisticsResponseBody - | errors.GetStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetStatisticsResponse, + | errors.GetStatisticsBadRequest + | errors.GetStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.GetStatisticsRequest = { - timespan: timespan, - }; + const input$: operations.GetStatisticsRequest = { + timespan: timespan, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetStatisticsRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetStatisticsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/statistics/media")(); + const path$ = pathToFunc("/statistics/media")(); - const query$ = encodeFormQuery$({ - Timespan: payload$.Timespan, - }); + const query$ = encodeFormQuery$({ + "Timespan": payload$.Timespan, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getStatistics", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getStatistics", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetStatisticsResponse, - | errors.GetStatisticsResponseBody - | errors.GetStatisticsStatisticsResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetStatisticsResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetStatisticsResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetStatisticsStatisticsResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetStatisticsResponse, + | errors.GetStatisticsBadRequest + | errors.GetStatisticsUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetStatisticsResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetStatisticsBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetStatisticsUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/updaterApplyUpdates.ts b/src/funcs/updaterApplyUpdates.ts index 34f814a4..296cddbf 100644 --- a/src/funcs/updaterApplyUpdates.ts +++ b/src/funcs/updaterApplyUpdates.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,119 +27,116 @@ import { Result } from "../sdk/types/fp.js"; * * @remarks * Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - * */ export async function updaterApplyUpdates( - client$: PlexAPICore, - tonight?: operations.Tonight | undefined, - skip?: operations.Skip | undefined, - options?: RequestOptions + client$: PlexAPICore, + tonight?: operations.Tonight | undefined, + skip?: operations.Skip | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.ApplyUpdatesResponse, - | errors.ApplyUpdatesResponseBody - | errors.ApplyUpdatesUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.ApplyUpdatesResponse, + | errors.ApplyUpdatesBadRequest + | errors.ApplyUpdatesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.ApplyUpdatesRequest = { - tonight: tonight, - skip: skip, - }; + const input$: operations.ApplyUpdatesRequest = { + tonight: tonight, + skip: skip, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.ApplyUpdatesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ApplyUpdatesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/updater/apply")(); + const path$ = pathToFunc("/updater/apply")(); - const query$ = encodeFormQuery$({ - skip: payload$.skip, - tonight: payload$.tonight, - }); + const query$ = encodeFormQuery$({ + "skip": payload$.skip, + "tonight": payload$.tonight, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "applyUpdates", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "applyUpdates", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "500", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "500", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.ApplyUpdatesResponse, - | errors.ApplyUpdatesResponseBody - | errors.ApplyUpdatesUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.ApplyUpdatesResponse$inboundSchema), - m$.jsonErr(400, errors.ApplyUpdatesResponseBody$inboundSchema), - m$.jsonErr(401, errors.ApplyUpdatesUpdaterResponseBody$inboundSchema), - m$.fail(["4XX", 500, "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.ApplyUpdatesResponse, + | errors.ApplyUpdatesBadRequest + | errors.ApplyUpdatesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.ApplyUpdatesResponse$inboundSchema), + m$.jsonErr(400, errors.ApplyUpdatesBadRequest$inboundSchema), + m$.jsonErr(401, errors.ApplyUpdatesUnauthorized$inboundSchema), + m$.fail(["4XX", 500, "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/updaterCheckForUpdates.ts b/src/funcs/updaterCheckForUpdates.ts index 912d6e8a..cc4d2814 100644 --- a/src/funcs/updaterCheckForUpdates.ts +++ b/src/funcs/updaterCheckForUpdates.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,113 +29,111 @@ import { Result } from "../sdk/types/fp.js"; * Checking for updates */ export async function updaterCheckForUpdates( - client$: PlexAPICore, - download?: operations.Download | undefined, - options?: RequestOptions + client$: PlexAPICore, + download?: operations.Download | undefined, + options?: RequestOptions, ): Promise< - Result< - operations.CheckForUpdatesResponse, - | errors.CheckForUpdatesResponseBody - | errors.CheckForUpdatesUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.CheckForUpdatesResponse, + | errors.CheckForUpdatesBadRequest + | errors.CheckForUpdatesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$: operations.CheckForUpdatesRequest = { - download: download, - }; + const input$: operations.CheckForUpdatesRequest = { + download: download, + }; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.CheckForUpdatesRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CheckForUpdatesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/updater/check")(); + const path$ = pathToFunc("/updater/check")(); - const query$ = encodeFormQuery$({ - download: payload$.download, - }); + const query$ = encodeFormQuery$({ + "download": payload$.download, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "checkForUpdates", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "checkForUpdates", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "PUT", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.CheckForUpdatesResponse, - | errors.CheckForUpdatesResponseBody - | errors.CheckForUpdatesUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.CheckForUpdatesResponse$inboundSchema), - m$.jsonErr(400, errors.CheckForUpdatesResponseBody$inboundSchema), - m$.jsonErr(401, errors.CheckForUpdatesUpdaterResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.CheckForUpdatesResponse, + | errors.CheckForUpdatesBadRequest + | errors.CheckForUpdatesUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.CheckForUpdatesResponse$inboundSchema), + m$.jsonErr(400, errors.CheckForUpdatesBadRequest$inboundSchema), + m$.jsonErr(401, errors.CheckForUpdatesUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/updaterGetUpdateStatus.ts b/src/funcs/updaterGetUpdateStatus.ts index a403adf0..aa8214a0 100644 --- a/src/funcs/updaterGetUpdateStatus.ts +++ b/src/funcs/updaterGetUpdateStatus.ts @@ -8,11 +8,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -27,91 +27,91 @@ import { Result } from "../sdk/types/fp.js"; * Querying status of updates */ export async function updaterGetUpdateStatus( - client$: PlexAPICore, - options?: RequestOptions + client$: PlexAPICore, + options?: RequestOptions, ): Promise< - Result< - operations.GetUpdateStatusResponse, - | errors.GetUpdateStatusResponseBody - | errors.GetUpdateStatusUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetUpdateStatusResponse, + | errors.GetUpdateStatusBadRequest + | errors.GetUpdateStatusUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const path$ = pathToFunc("/updater/status")(); + const path$ = pathToFunc("/updater/status")(); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getUpdateStatus", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getUpdateStatus", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetUpdateStatusResponse, - | errors.GetUpdateStatusResponseBody - | errors.GetUpdateStatusUpdaterResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetUpdateStatusResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetUpdateStatusResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetUpdateStatusUpdaterResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetUpdateStatusResponse, + | errors.GetUpdateStatusBadRequest + | errors.GetUpdateStatusUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetUpdateStatusResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetUpdateStatusBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetUpdateStatusUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/videoGetTimeline.ts b/src/funcs/videoGetTimeline.ts index 14764018..f2d151ac 100644 --- a/src/funcs/videoGetTimeline.ts +++ b/src/funcs/videoGetTimeline.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,120 +29,118 @@ import { Result } from "../sdk/types/fp.js"; * Get the timeline for a media item */ export async function videoGetTimeline( - client$: PlexAPICore, - request: operations.GetTimelineRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.GetTimelineRequest, + options?: RequestOptions, ): Promise< - Result< - operations.GetTimelineResponse, - | errors.GetTimelineResponseBody - | errors.GetTimelineVideoResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetTimelineResponse, + | errors.GetTimelineBadRequest + | errors.GetTimelineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetTimelineRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTimelineRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/:/timeline")(); + const path$ = pathToFunc("/:/timeline")(); - const query$ = encodeFormQuery$({ - context: payload$.context, - duration: payload$.duration, - hasMDE: payload$.hasMDE, - key: payload$.key, - playBackTime: payload$.playBackTime, - playQueueItemID: payload$.playQueueItemID, - ratingKey: payload$.ratingKey, - row: payload$.row, - state: payload$.state, - time: payload$.time, - }); + const query$ = encodeFormQuery$({ + "context": payload$.context, + "duration": payload$.duration, + "hasMDE": payload$.hasMDE, + "key": payload$.key, + "playBackTime": payload$.playBackTime, + "playQueueItemID": payload$.playQueueItemID, + "ratingKey": payload$.ratingKey, + "row": payload$.row, + "state": payload$.state, + "time": payload$.time, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "getTimeline", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "getTimeline", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetTimelineResponse, - | errors.GetTimelineResponseBody - | errors.GetTimelineVideoResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.GetTimelineResponse$inboundSchema), - m$.jsonErr(400, errors.GetTimelineResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetTimelineVideoResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetTimelineResponse, + | errors.GetTimelineBadRequest + | errors.GetTimelineUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.GetTimelineResponse$inboundSchema), + m$.jsonErr(400, errors.GetTimelineBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetTimelineUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/videoStartUniversalTranscode.ts b/src/funcs/videoStartUniversalTranscode.ts index a82a0ea4..45a6194b 100644 --- a/src/funcs/videoStartUniversalTranscode.ts +++ b/src/funcs/videoStartUniversalTranscode.ts @@ -10,11 +10,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -29,126 +29,125 @@ import { Result } from "../sdk/types/fp.js"; * Begin a Universal Transcode Session */ export async function videoStartUniversalTranscode( - client$: PlexAPICore, - request: operations.StartUniversalTranscodeRequest, - options?: RequestOptions + client$: PlexAPICore, + request: operations.StartUniversalTranscodeRequest, + options?: RequestOptions, ): Promise< - Result< - operations.StartUniversalTranscodeResponse, - | errors.StartUniversalTranscodeResponseBody - | errors.StartUniversalTranscodeVideoResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.StartUniversalTranscodeResponse, + | errors.StartUniversalTranscodeBadRequest + | errors.StartUniversalTranscodeUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.StartUniversalTranscodeRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.StartUniversalTranscodeRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const path$ = pathToFunc("/video/:/transcode/universal/start.mpd")(); + const path$ = pathToFunc("/video/:/transcode/universal/start.mpd")(); - const query$ = encodeFormQuery$({ - addDebugOverlay: payload$.addDebugOverlay, - audioBoost: payload$.audioBoost, - autoAdjustQuality: payload$.autoAdjustQuality, - directPlay: payload$.directPlay, - directStream: payload$.directStream, - fastSeek: payload$.fastSeek, - hasMDE: payload$.hasMDE, - location: payload$.location, - mediaBufferSize: payload$.mediaBufferSize, - mediaIndex: payload$.mediaIndex, - partIndex: payload$.partIndex, - path: payload$.path, - protocol: payload$.protocol, - session: payload$.session, - subtites: payload$.subtites, - subtitleSize: payload$.subtitleSize, - }); + const query$ = encodeFormQuery$({ + "addDebugOverlay": payload$.addDebugOverlay, + "audioBoost": payload$.audioBoost, + "autoAdjustQuality": payload$.autoAdjustQuality, + "directPlay": payload$.directPlay, + "directStream": payload$.directStream, + "fastSeek": payload$.fastSeek, + "hasMDE": payload$.hasMDE, + "location": payload$.location, + "mediaBufferSize": payload$.mediaBufferSize, + "mediaIndex": payload$.mediaIndex, + "partIndex": payload$.partIndex, + "path": payload$.path, + "protocol": payload$.protocol, + "session": payload$.session, + "subtites": payload$.subtites, + "subtitleSize": payload$.subtitleSize, + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "startUniversalTranscode", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "startUniversalTranscode", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.StartUniversalTranscodeResponse, - | errors.StartUniversalTranscodeResponseBody - | errors.StartUniversalTranscodeVideoResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.nil(200, operations.StartUniversalTranscodeResponse$inboundSchema), - m$.jsonErr(400, errors.StartUniversalTranscodeResponseBody$inboundSchema), - m$.jsonErr(401, errors.StartUniversalTranscodeVideoResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.StartUniversalTranscodeResponse, + | errors.StartUniversalTranscodeBadRequest + | errors.StartUniversalTranscodeUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, operations.StartUniversalTranscodeResponse$inboundSchema), + m$.jsonErr(400, errors.StartUniversalTranscodeBadRequest$inboundSchema), + m$.jsonErr(401, errors.StartUniversalTranscodeUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/funcs/watchlistGetWatchList.ts b/src/funcs/watchlistGetWatchList.ts index 0b5b24da..fb0fc7d9 100644 --- a/src/funcs/watchlistGetWatchList.ts +++ b/src/funcs/watchlistGetWatchList.ts @@ -4,8 +4,8 @@ import { PlexAPICore } from "../core.js"; import { - encodeFormQuery as encodeFormQuery$, - encodeSimple as encodeSimple$, + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, } from "../lib/encodings.js"; import * as m$ from "../lib/matchers.js"; import * as schemas$ from "../lib/schemas.js"; @@ -13,11 +13,11 @@ import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; @@ -33,129 +33,129 @@ import { Result } from "../sdk/types/fp.js"; * Get User Watchlist */ export async function watchlistGetWatchList( - client$: PlexAPICore, - request: operations.GetWatchListRequest, - options?: RequestOptions & { serverURL?: string } + client$: PlexAPICore, + request: operations.GetWatchListRequest, + options?: RequestOptions & { serverURL?: string }, ): Promise< - Result< - operations.GetWatchListResponse, - | errors.GetWatchListResponseBody - | errors.GetWatchListWatchlistResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - > + Result< + operations.GetWatchListResponse, + | errors.GetWatchListBadRequest + | errors.GetWatchListUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > > { - const input$ = request; + const input$ = request; - const parsed$ = schemas$.safeParse( - input$, - (value$) => operations.GetWatchListRequest$outboundSchema.parse(value$), - "Input validation failed" - ); - if (!parsed$.ok) { - return parsed$; - } - const payload$ = parsed$.value; - const body$ = null; + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetWatchListRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; - const baseURL$ = - options?.serverURL || pathToFunc(GetWatchListServerList[0], { charEncoding: "percent" })(); + const baseURL$ = options?.serverURL + || pathToFunc(GetWatchListServerList[0], { charEncoding: "percent" })(); - const pathParams$ = { - filter: encodeSimple$("filter", payload$.filter, { - explode: false, - charEncoding: "percent", - }), - }; + const pathParams$ = { + filter: encodeSimple$("filter", payload$.filter, { + explode: false, + charEncoding: "percent", + }), + }; - const path$ = pathToFunc("/library/sections/watchlist/{filter}")(pathParams$); + const path$ = pathToFunc("/library/sections/watchlist/{filter}")(pathParams$); - const query$ = encodeFormQuery$({ - includeCollections: payload$.includeCollections, - includeExternalMedia: payload$.includeExternalMedia, - libtype: payload$.libtype, - maxresults: payload$.maxresults, - sort: payload$.sort, - "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], - "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], - "X-Plex-Token": payload$["X-Plex-Token"], - }); + const query$ = encodeFormQuery$({ + "includeCollections": payload$.includeCollections, + "includeExternalMedia": payload$.includeExternalMedia, + "libtype": payload$.libtype, + "maxresults": payload$.maxresults, + "sort": payload$.sort, + "X-Plex-Container-Size": payload$["X-Plex-Container-Size"], + "X-Plex-Container-Start": payload$["X-Plex-Container-Start"], + "X-Plex-Token": payload$["X-Plex-Token"], + }); - const headers$ = new Headers({ - Accept: "application/json", - }); + const headers$ = new Headers({ + Accept: "application/json", + }); - const accessToken$ = await extractSecurity(client$.options$.accessToken); - const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; - const context = { - operationID: "get-watch-list", - oAuth2Scopes: [], - securitySource: client$.options$.accessToken, - }; - const securitySettings$ = resolveGlobalSecurity(security$); + const accessToken$ = await extractSecurity(client$.options$.accessToken); + const security$ = accessToken$ == null ? {} : { accessToken: accessToken$ }; + const context = { + operationID: "get-watch-list", + oAuth2Scopes: [], + securitySource: client$.options$.accessToken, + }; + const securitySettings$ = resolveGlobalSecurity(security$); - const requestRes = client$.createRequest$( - context, - { - security: securitySettings$, - method: "GET", - baseURL: baseURL$, - path: path$, - headers: headers$, - query: query$, - body: body$, - timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, - }, - options - ); - if (!requestRes.ok) { - return requestRes; - } - const request$ = requestRes.value; + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + baseURL: baseURL$, + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; - const doResult = await client$.do$(request$, { - context, - errorCodes: ["400", "401", "4XX", "5XX"], - retryConfig: options?.retries || client$.options$.retryConfig, - retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], - }); - if (!doResult.ok) { - return doResult; - } - const response = doResult.value; + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "4XX", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; - const responseFields$ = { - ContentType: response.headers.get("content-type") ?? "application/octet-stream", - StatusCode: response.status, - RawResponse: response, - Headers: {}, - }; - - const [result$] = await m$.match< - operations.GetWatchListResponse, - | errors.GetWatchListResponseBody - | errors.GetWatchListWatchlistResponseBody - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError - | RequestAbortedError - | RequestTimeoutError - | ConnectionError - >( - m$.json(200, operations.GetWatchListResponse$inboundSchema, { key: "object" }), - m$.jsonErr(400, errors.GetWatchListResponseBody$inboundSchema), - m$.jsonErr(401, errors.GetWatchListWatchlistResponseBody$inboundSchema), - m$.fail(["4XX", "5XX"]) - )(response, { extraFields: responseFields$ }); - if (!result$.ok) { - return result$; - } + const responseFields$ = { + ContentType: response.headers.get("content-type") + ?? "application/octet-stream", + StatusCode: response.status, + RawResponse: response, + Headers: {}, + }; + const [result$] = await m$.match< + operations.GetWatchListResponse, + | errors.GetWatchListBadRequest + | errors.GetWatchListUnauthorized + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, operations.GetWatchListResponse$inboundSchema, { + key: "object", + }), + m$.jsonErr(400, errors.GetWatchListBadRequest$inboundSchema), + m$.jsonErr(401, errors.GetWatchListUnauthorized$inboundSchema), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { return result$; + } + + return result$; } diff --git a/src/hooks/hooks.ts b/src/hooks/hooks.ts index a6b6e17a..d1b3396f 100644 --- a/src/hooks/hooks.ts +++ b/src/hooks/hooks.ts @@ -4,100 +4,109 @@ import { RequestInput } from "../lib/http.js"; import { - AfterErrorContext, - AfterErrorHook, - AfterSuccessContext, - AfterSuccessHook, - BeforeRequestContext, - BeforeRequestHook, - BeforeCreateRequestHook, - BeforeCreateRequestContext, - Hooks, - SDKInitHook, - SDKInitOptions, + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, } from "./types.js"; import { initHooks } from "./registration.js"; export class SDKHooks implements Hooks { - sdkInitHooks: SDKInitHook[] = []; - beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; - beforeRequestHooks: BeforeRequestHook[] = []; - afterSuccessHooks: AfterSuccessHook[] = []; - afterErrorHooks: AfterErrorHook[] = []; + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; - constructor() { - initHooks(this); + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); } - registerSDKInitHook(hook: SDKInitHook) { - this.sdkInitHooks.push(hook); + return inp; + } + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); } - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { - this.beforeCreateRequestHooks.push(hook); + return req; + } + + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); } - registerBeforeRequestHook(hook: BeforeRequestHook) { - this.beforeRequestHooks.push(hook); + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; } - registerAfterSuccessHook(hook: AfterSuccessHook) { - this.afterSuccessHooks.push(hook); - } - - registerAfterErrorHook(hook: AfterErrorHook) { - this.afterErrorHooks.push(hook); - } - - sdkInit(opts: SDKInitOptions): SDKInitOptions { - return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); - } - - beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput { - let inp = input; - - for (const hook of this.beforeCreateRequestHooks) { - inp = hook.beforeCreateRequest(hookCtx, inp); - } - - return inp; - } - - async beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise { - let req = request; - - for (const hook of this.beforeRequestHooks) { - req = await hook.beforeRequest(hookCtx, req); - } - - return req; - } - - async afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise { - let res = response; - - for (const hook of this.afterSuccessHooks) { - res = await hook.afterSuccess(hookCtx, res); - } - - return res; - } - - async afterError( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ): Promise<{ response: Response | null; error: unknown }> { - let res = response; - let err = error; - - for (const hook of this.afterErrorHooks) { - const result = await hook.afterError(hookCtx, res, err); - res = result.response; - err = result.error; - } - - return { response: res, error: err }; - } + return { response: res, error: err }; + } } diff --git a/src/hooks/index.ts b/src/hooks/index.ts index 8f0e4dbf..f60ec7ac 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -2,5 +2,5 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./types.js"; export * from "./hooks.js"; +export * from "./types.js"; diff --git a/src/hooks/types.ts b/src/hooks/types.ts index 3a31914a..656b9e37 100644 --- a/src/hooks/types.ts +++ b/src/hooks/types.ts @@ -5,16 +5,16 @@ import { HTTPClient, RequestInput } from "../lib/http.js"; export type HookContext = { - operationID: string; - oAuth2Scopes?: string[]; - securitySource?: any | (() => Promise); + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); }; export type Awaitable = T | Promise; export type SDKInitOptions = { - baseURL: URL | null; - client: HTTPClient; + baseURL: URL | null; + client: HTTPClient; }; export type BeforeCreateRequestContext = HookContext & {}; @@ -27,63 +27,72 @@ export type AfterErrorContext = HookContext & {}; * hook can return a new baseURL and HTTP client to be used by the SDK. */ export interface SDKInitHook { - sdkInit: (opts: SDKInitOptions) => SDKInitOptions; + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; } export interface BeforeCreateRequestHook { - /** - * A hook that is called before the SDK creates a `Request` object. The hook - * can modify how a request is constructed since certain modifications, like - * changing the request URL, cannot be done on a request object directly. - */ - beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput; + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; } export interface BeforeRequestHook { - /** - * A hook that is called before the SDK sends a request. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * replace the request before it is sent or throw an error to stop the - * request from being sent. - */ - beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable; + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; } export interface AfterSuccessHook { - /** - * A hook that is called after the SDK receives a response. The hook can - * introduce instrumentation code such as logging, tracing and metrics or - * modify the response before it is handled or throw an error to stop the - * response from being handled. - */ - afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable; + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; } export interface AfterErrorHook { - /** - * A hook that is called after the SDK encounters an error, or a - * non-successful response. The hook can introduce instrumentation code such - * as logging, tracing and metrics or modify the response or error values. - */ - afterError: ( - hookCtx: AfterErrorContext, - response: Response | null, - error: unknown - ) => Awaitable<{ - response: Response | null; - error: unknown; - }>; + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; } export interface Hooks { - /** Registers a hook to be used by the SDK for initialization event. */ - registerSDKInitHook(hook: SDKInitHook): void; - /** Registers a hook to be used by the SDK for to modify `Request` construction. */ - registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; - /** Registers a hook to be used by the SDK for the before request event. */ - registerBeforeRequestHook(hook: BeforeRequestHook): void; - /** Registers a hook to be used by the SDK for the after success event. */ - registerAfterSuccessHook(hook: AfterSuccessHook): void; - /** Registers a hook to be used by the SDK for the after error event. */ - registerAfterErrorHook(hook: AfterErrorHook): void; + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; } diff --git a/src/index.ts b/src/index.ts index c6fc7f02..5ddc765e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,6 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk/sdk.js"; export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/src/lib/config.ts b/src/lib/config.ts index 13a5bc13..d6a48761 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -12,84 +12,90 @@ import { Params, pathToFunc } from "./url.js"; * Contains the list of servers available to the SDK */ export const ServerList = [ - /** - * The full address of your Plex Server - */ - "{protocol}://{ip}:{port}", + /** + * The full address of your Plex Server + */ + "{protocol}://{ip}:{port}", ] as const; +/** + * The protocol to use for the server connection + */ export const ServerProtocol = { - Http: "http", - Https: "https", + Http: "http", + Https: "https", } as const; +/** + * The protocol to use for the server connection + */ export type ServerProtocol = ClosedEnum; export type SDKOptions = { - accessToken?: string | (() => Promise); + accessToken?: string | (() => Promise); - /** - * Allows setting the xPlexClientIdentifier parameter for all supported operations - */ - xPlexClientIdentifier?: string | undefined; + /** + * Allows setting the xPlexClientIdentifier parameter for all supported operations + */ + xPlexClientIdentifier?: string | undefined; - httpClient?: HTTPClient; - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number; - /** - * Sets the protocol variable for url substitution - */ - protocol?: ServerProtocol; - /** - * Sets the ip variable for url substitution - */ - ip?: string; - /** - * Sets the port variable for url substitution - */ - port?: string; - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: RetryConfig; - timeoutMs?: number; - debugLogger?: Logger; + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Sets the protocol variable for url substitution + */ + protocol?: ServerProtocol; + /** + * Sets the ip variable for url substitution + */ + ip?: string; + /** + * Sets the port variable for url substitution + */ + port?: string; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; }; export function serverURLFromOptions(options: SDKOptions): URL | null { - let serverURL = options.serverURL; + let serverURL = options.serverURL; - const serverParams: Params[] = [ - { - protocol: options.protocol ?? "https", - ip: options.ip ?? "10.10.10.47", - port: options.port ?? "32400", - }, - ]; - let params: Params = {}; + const serverParams: Params[] = [ + { + "protocol": options.protocol ?? "https", + "ip": options.ip ?? "10.10.10.47", + "port": options.port ?? "32400", + }, + ]; + let params: Params = {}; - if (!serverURL) { - const serverIdx = options.serverIdx ?? 0; - if (serverIdx < 0 || serverIdx >= ServerList.length) { - throw new Error(`Invalid server index ${serverIdx}`); - } - serverURL = ServerList[serverIdx] || ""; - params = serverParams[serverIdx] || {}; + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); } + serverURL = ServerList[serverIdx] || ""; + params = serverParams[serverIdx] || {}; + } - const u = pathToFunc(serverURL)(params); - return new URL(u); + const u = pathToFunc(serverURL)(params); + return new URL(u); } export const SDK_METADATA = { - language: "typescript", - openapiDocVersion: "0.0.3", - sdkVersion: "0.21.1", - genVersion: "2.411.9", - userAgent: "speakeasy-sdk/typescript 0.21.1 2.411.9 0.0.3 @lukehagar/plexjs", + language: "typescript", + openapiDocVersion: "0.0.3", + sdkVersion: "0.22.0", + genVersion: "2.413.0", + userAgent: "speakeasy-sdk/typescript 0.22.0 2.413.0 0.0.3 @lukehagar/plexjs", } as const; diff --git a/src/lib/matchers.ts b/src/lib/matchers.ts index 923764e7..1ff641e4 100644 --- a/src/lib/matchers.ts +++ b/src/lib/matchers.ts @@ -2,268 +2,282 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { safeParse } from "./schemas.js"; -import { StatusCodePredicate, matchResponse, matchStatusCode } from "./http.js"; -import { isPlainObject } from "./is-plain-object.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { Result } from "../sdk/types/fp.js"; +import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; +import { isPlainObject } from "./is-plain-object.js"; +import { safeParse } from "./schemas.js"; -export type Encoding = "json" | "text" | "bytes" | "stream" | "sse" | "nil" | "fail"; +export type Encoding = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; const DEFAULT_CONTENT_TYPES: Record = { - json: "application/json", - text: "text/plain", - bytes: "application/octet-stream", - stream: "application/octet-stream", - sse: "text/event-stream", - nil: "*", - fail: "*", + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", }; type Schema = { parse(raw: unknown): T }; -type MatchOptions = { ctype?: string; hdrs?: boolean; key?: string; sseSentinel?: string }; +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; export type ValueMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; }; export type ErrorMatcher = MatchOptions & { - enc: Encoding; - codes: StatusCodePredicate; - schema: Schema; - err: true; + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; }; export type FailMatcher = { - enc: "fail"; - codes: StatusCodePredicate; + enc: "fail"; + codes: StatusCodePredicate; }; export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; export function jsonErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "json", codes, schema }; + return { ...options, err: true, enc: "json", codes, schema }; } export function json( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "json", codes, schema }; + return { ...options, enc: "json", codes, schema }; } export function textErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "text", codes, schema }; + return { ...options, err: true, enc: "text", codes, schema }; } export function text( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "text", codes, schema }; + return { ...options, enc: "text", codes, schema }; } export function bytesErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "bytes", codes, schema }; + return { ...options, err: true, enc: "bytes", codes, schema }; } export function bytes( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "bytes", codes, schema }; + return { ...options, enc: "bytes", codes, schema }; } export function streamErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "stream", codes, schema }; + return { ...options, err: true, enc: "stream", codes, schema }; } export function stream( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "stream", codes, schema }; + return { ...options, enc: "stream", codes, schema }; } export function sseErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "sse", codes, schema }; + return { ...options, err: true, enc: "sse", codes, schema }; } export function sse( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "sse", codes, schema }; + return { ...options, enc: "sse", codes, schema }; } export function nilErr( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ErrorMatcher { - return { ...options, err: true, enc: "nil", codes, schema }; + return { ...options, err: true, enc: "nil", codes, schema }; } export function nil( - codes: StatusCodePredicate, - schema: Schema, - options?: MatchOptions + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, ): ValueMatcher { - return { ...options, enc: "nil", codes, schema }; + return { ...options, enc: "nil", codes, schema }; } export function fail(codes: StatusCodePredicate): FailMatcher { - return { enc: "fail", codes }; + return { enc: "fail", codes }; } -export type MatchedValue = Matchers extends Matcher[] ? T : never; -export type MatchedError = Matchers extends Matcher[] ? E : never; +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; export type MatchFunc = ( - response: Response, - options?: { resultKey?: string; extraFields?: Record } + response: Response, + options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( - ...matchers: Array> + ...matchers: Array> ): MatchFunc { - return async function matchFunc( - response: Response, - options?: { resultKey?: string; extraFields?: Record } - ): Promise<[result: Result, raw: unknown]> { - let raw: unknown; - let matcher: Matcher | undefined; - for (const match of matchers) { - const { codes } = match; - const ctpattern = "ctype" in match ? match.ctype : DEFAULT_CONTENT_TYPES[match.enc]; - if (ctpattern && matchResponse(response, codes, ctpattern)) { - matcher = match; - break; - } else if (!ctpattern && matchStatusCode(response, codes)) { - matcher = match; - break; - } - } + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } - if (!matcher) { - const responseBody = await response.text(); - return [ - { - ok: false, - error: new SDKError( - "Unexpected API response status or content-type", - response, - responseBody - ), - }, - responseBody, - ]; - } + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } - const encoding = matcher.enc; - switch (encoding) { - case "json": - raw = await response.json(); - break; - case "bytes": - raw = await response.arrayBuffer(); - break; - case "stream": - raw = response.body; - break; - case "text": - raw = await response.text(); - break; - case "sse": - raw = response.body; - break; - case "nil": - raw = await discardResponseBody(response); - break; - case "fail": - raw = await response.text(); - break; - default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); - } + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } - if (matcher.enc === "fail") { - return [ - { - ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "" - ), - }, - raw, - ]; - } + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } - const resultKey = matcher.key || options?.resultKey; - let data: unknown; + const resultKey = matcher.key || options?.resultKey; + let data: unknown; - if ("err" in matcher) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - ...(isPlainObject(raw) ? raw : null), - }; - } else if (resultKey) { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - [resultKey]: raw, - }; - } else { - data = { - ...options?.extraFields, - ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), - }; - } + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + }; + } - if ("err" in matcher) { - const result = safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ); - return [result.ok ? { ok: false, error: result.value } : result, raw]; - } else { - return [ - safeParse( - data, - (v: unknown) => matcher.schema.parse(v), - "Response validation failed" - ), - raw, - ]; - } - }; + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; } const headerValRE = /, */; @@ -272,13 +286,13 @@ const headerValRE = /, */; * entries. Values are represented as an array to account for repeated headers. */ export function unpackHeaders(headers: Headers): Record { - const out: Record = {}; + const out: Record = {}; - for (const [k, v] of headers.entries()) { - out[k] = v.split(headerValRE); - } + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } - return out; + return out; } /** @@ -288,18 +302,18 @@ export function unpackHeaders(headers: Headers): Record { * https://undici.nodejs.org/#/?id=garbage-collection */ export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } + const reader = res.body?.getReader(); + if (reader == null) { + return; + } - try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; } + } finally { + reader.releaseLock(); + } } diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index 3eda5117..a2ad30da 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -2,7 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { output, ZodEffects, ZodError, ZodObject, ZodRawShape, ZodTypeAny } from "zod"; +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; @@ -11,15 +18,19 @@ import { ERR, OK, Result } from "../sdk/types/fp.js"; * intercepts this error and converts it to an SDKValidationError so as to not * leak Zod implementation details to user code. */ -export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMessage: string): Out { - try { - return fn(rawValue); - } catch (err) { - if (err instanceof ZodError) { - throw new SDKValidationError(errorMessage, err, rawValue); - } - throw err; +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); } + throw err; + } } /** @@ -28,47 +39,48 @@ export function parse(rawValue: Inp, fn: (value: Inp) => Out, errorMes * leak Zod implementation details to user code. */ export function safeParse( - rawValue: Inp, - fn: (value: Inp) => Out, - errorMessage: string + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, ): Result { - try { - return OK(fn(rawValue)); - } catch (err) { - return ERR(new SDKValidationError(errorMessage, err, rawValue)); - } + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } } export function collectExtraKeys< - Shape extends ZodRawShape, - Catchall extends ZodTypeAny, - K extends string + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, >( - obj: ZodObject, - extrasKey: K + obj: ZodObject, + extrasKey: K, ): ZodEffects< - typeof obj, - output> & { - [k in K]: Record>; - } + typeof obj, + & output> + & { + [k in K]: Record>; + } > { - return obj.transform((val) => { - const extras: Record> = {}; - const { shape } = obj; - for (const [key] of Object.entries(val)) { - if (key in shape) { - continue; - } + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } - const v = val[key]; - if (typeof v === "undefined") { - continue; - } + const v = val[key]; + if (typeof v === "undefined") { + continue; + } - extras[key] = v; - delete val[key]; - } + extras[key] = v; + delete val[key]; + } - return { ...val, [extrasKey]: extras }; - }); + return { ...val, [extrasKey]: extras }; + }); } diff --git a/src/lib/sdks.ts b/src/lib/sdks.ts index 4a53181a..dc42cb99 100644 --- a/src/lib/sdks.ts +++ b/src/lib/sdks.ts @@ -2,368 +2,383 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { - HTTPClient, - matchContentType, - matchStatusCode, - isAbortError, - isTimeoutError, - isConnectionError, -} from "./http.js"; -import { SecurityState } from "./security.js"; -import { retry, RetryConfig } from "./retries.js"; -import { Logger } from "./logger.js"; -import { encodeForm } from "./encodings.js"; -import { stringToBase64 } from "./base64.js"; -import { SDKOptions, SDK_METADATA, serverURLFromOptions } from "./config.js"; import { SDKHooks } from "../hooks/hooks.js"; import { HookContext } from "../hooks/types.js"; import { - ConnectionError, - InvalidRequestError, - RequestAbortedError, - RequestTimeoutError, - UnexpectedClientError, + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; export type RequestOptions = { - /** - * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If - * `fetchOptions.signal` is set then it will take precedence over this option. - */ - timeoutMs?: number; - /** - * Set or override a retry policy on HTTP calls. - */ - retries?: RetryConfig; - /** - * Specifies the status codes which should be retried using the given retry policy. - */ - retryCodes?: string[]; - /** - * Sets various request options on the `fetch` call made by an SDK method. - * - * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} - */ - fetchOptions?: Omit; + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * Sets various request options on the `fetch` call made by an SDK method. + * + * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} + */ + fetchOptions?: Omit; }; type RequestConfig = { - method: string; - path: string; - baseURL?: string | URL; - query?: string; - body?: RequestInit["body"]; - headers?: HeadersInit; - security?: SecurityState | null; - uaHeader?: string; - timeoutMs?: number; + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; }; const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; -const webWorkerLike = - typeof gt === "object" && - gt != null && - "importScripts" in gt && - typeof gt["importScripts"] === "function"; -const isBrowserLike = - webWorkerLike || - (typeof navigator !== "undefined" && "serviceWorker" in navigator) || - (typeof window === "object" && typeof window.document !== "undefined"); +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); export class ClientSDK { - private readonly httpClient: HTTPClient; - protected readonly baseURL: URL | null; - protected readonly hooks$: SDKHooks; - protected readonly logger?: Logger | undefined; - public readonly options$: SDKOptions & { hooks?: SDKHooks }; + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; - constructor(options: SDKOptions = {}) { - const opt = options as unknown; - if ( - typeof opt === "object" && - opt != null && - "hooks" in opt && - opt.hooks instanceof SDKHooks - ) { - this.hooks$ = opt.hooks; - } else { - this.hooks$ = new SDKHooks(); - } - this.options$ = { ...options, hooks: this.hooks$ }; + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } else { + this.hooks$ = new SDKHooks(); + } + this.options$ = { ...options, hooks: this.hooks$ }; - const url = serverURLFromOptions(options); - if (url) { - url.pathname = url.pathname.replace(/\/+$/, "") + "/"; - } - const { baseURL, client } = this.hooks$.sdkInit({ - baseURL: url, - client: options.httpClient || new HTTPClient(), - }); - this.baseURL = baseURL; - this.httpClient = client; - this.logger = options.debugLogger; + const url = serverURLFromOptions(options); + if (url) { + url.pathname = url.pathname.replace(/\/+$/, "") + "/"; + } + const { baseURL, client } = this.hooks$.sdkInit({ + baseURL: url, + client: options.httpClient || new HTTPClient(), + }); + this.baseURL = baseURL; + this.httpClient = client; + this.logger = options.debugLogger; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); } - public createRequest$( - context: HookContext, - conf: RequestConfig, - options?: RequestOptions - ): Result { - const { method, path, query, headers: opHeaders, security } = conf; + let finalQuery = query || ""; - const base = conf.baseURL ?? this.baseURL; - if (!base) { - return ERR(new InvalidRequestError("No base URL provided for operation")); - } - const reqURL = new URL(base); - const inputURL = new URL(path, reqURL); + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } - if (path) { - reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + // Only set user agent header in non-browser-like environments since CORS + // policy disallows setting it in browsers e.g. Chrome throws an error. + if (!isBrowserLike) { + headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + } + + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + fetchOptions.signal = timeoutSignal; + } + } + + if (conf.body instanceof ReadableStream) { + if (!fetchOptions) { + fetchOptions = { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + duplex: "half", + }; + } else { + // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 + fetchOptions.duplex = "half"; + } + } + + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = await this.hooks$.beforeRequest(context, request.clone()); + await logRequest(this.logger, req).catch((e) => + this.logger?.log("Failed to log request:", e) + ); + + let response = await this.httpClient.request(req); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); } - let finalQuery = query || ""; + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); - const secQuery: string[] = []; - for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); - } - if (secQuery.length) { - finalQuery += `&${secQuery.join("&")}`; - } - - if (finalQuery) { - const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; - reqURL.search = `?${q}`; - } - - const headers = new Headers(opHeaders); - - const username = security?.basic.username; - const password = security?.basic.password; - if (username != null || password != null) { - const encoded = stringToBase64([username || "", password || ""].join(":")); - headers.set("Authorization", `Basic ${encoded}`); - } - - const securityHeaders = new Headers(security?.headers || {}); - for (const [k, v] of securityHeaders) { - headers.set(k, v); - } - - let cookie = headers.get("cookie") || ""; - for (const [k, v] of Object.entries(security?.cookies || {})) { - cookie += `; ${k}=${v}`; - } - cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; - headers.set("cookie", cookie); - - const userHeaders = new Headers(options?.fetchOptions?.headers); - for (const [k, v] of userHeaders) { - headers.set(k, v); - } - - // Only set user agent header in non-browser-like environments since CORS - // policy disallows setting it in browsers e.g. Chrome throws an error. - if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); - } - - let fetchOptions = options?.fetchOptions; - if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { - const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } - } - - if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } - } - - let input; - try { - input = this.hooks$.beforeCreateRequest(context, { - url: reqURL, - options: { - ...fetchOptions, - body: conf.body ?? null, - headers, - method, - }, - }); - } catch (err: unknown) { + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): return ERR( - new UnexpectedClientError("Create request hook failed to execute", { cause: err }) + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), ); } - - return OK(new Request(input.url, input.options)); - } - - public async do$( - request: Request, - options: { - context: HookContext; - errorCodes: number | string | (number | string)[]; - retryConfig?: RetryConfig | undefined; - retryCodes?: string[] | undefined; - } - ): Promise< - Result< - Response, - RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError - > - > { - const { context, errorCodes } = options; - const retryConfig = options.retryConfig || { strategy: "none" }; - const retryCodes = options.retryCodes || []; - - return retry( - async () => { - const req = await this.hooks$.beforeRequest(context, request.clone()); - await logRequest(this.logger, req).catch((e) => - this.logger?.log("Failed to log request:", e) - ); - - let response = await this.httpClient.request(req); - - if (matchStatusCode(response, errorCodes)) { - const result = await this.hooks$.afterError(context, response, null); - if (result.error) { - throw result.error; - } - response = result.response || response; - } else { - response = await this.hooks$.afterSuccess(context, response); - } - - await logResponse(this.logger, response, req).catch((e) => - this.logger?.log("Failed to log response:", e) - ); - - return response; - }, - { config: retryConfig, statusCodes: retryCodes } - ).then( - (r) => OK(r), - (err) => { - switch (true) { - case isAbortError(err): - return ERR( - new RequestAbortedError("Request aborted by client", { cause: err }) - ); - case isTimeoutError(err): - return ERR(new RequestTimeoutError("Request timed out", { cause: err })); - case isConnectionError(err): - return ERR(new ConnectionError("Unable to make request", { cause: err })); - default: - return ERR( - new UnexpectedClientError("Unexpected HTTP client error", { - cause: err, - }) - ); - } - } - ); - } + }, + ); + } } const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; async function logRequest(logger: Logger | undefined, req: Request) { - if (!logger) { - return; + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - const contentType = req.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`> Request: ${req.method} ${req.url}`); - - logger.group("Headers:"); - for (const [k, v] of req.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case jsonLikeContentTypeRE.test(ct): - logger.log(await req.clone().json()); - break; - case ct.startsWith("text/"): - logger.log(await req.clone().text()); - break; - case ct === "multipart/form-data": { - const body = await req.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); + logger.groupEnd(); } -async function logResponse(logger: Logger | undefined, res: Response, req: Request) { - if (!logger) { - return; +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); - const contentType = res.headers.get("content-type"); - const ct = contentType?.split(";")[0] || ""; - - logger.group(`< Response: ${req.method} ${req.url}`); - logger.log("Status Code:", res.status, res.statusText); - - logger.group("Headers:"); - for (const [k, v] of res.headers.entries()) { - logger.log(`${k}: ${v}`); - } - logger.groupEnd(); - - logger.group("Body:"); - switch (true) { - case matchContentType(res, "application/json") || jsonLikeContentTypeRE.test(ct): - logger.log(await res.clone().json()); - break; - case matchContentType(res, "text/event-stream"): - logger.log(`<${contentType}>`); - break; - case matchContentType(res, "text/*"): - logger.log(await res.clone().text()); - break; - case matchContentType(res, "multipart/form-data"): { - const body = await res.clone().formData(); - for (const [k, v] of body) { - const vlabel = v instanceof Blob ? "" : v; - logger.log(`${k}: ${vlabel}`); - } - break; - } - default: - logger.log(`<${contentType}>`); - break; - } - logger.groupEnd(); - - logger.groupEnd(); + logger.groupEnd(); } diff --git a/src/lib/security.ts b/src/lib/security.ts index 3b6cf83a..7c28360e 100644 --- a/src/lib/security.ts +++ b/src/lib/security.ts @@ -5,199 +5,213 @@ import * as shared from "../sdk/models/shared/index.js"; export enum SecurityErrorCode { - Incomplete = "incomplete", - UnrecognisedSecurityType = "unrecognized_security_type", + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", } export class SecurityError extends Error { - constructor(public code: SecurityErrorCode, message: string) { - super(message); - this.name = "SecurityError"; - } + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } - static incomplete(): SecurityError { - return new SecurityError( - SecurityErrorCode.Incomplete, - "Security requirements not met in order to perform the operation" - ); - } - static unrecognizedType(type: string): SecurityError { - return new SecurityError( - SecurityErrorCode.UnrecognisedSecurityType, - `Unrecognised security type: ${type}` - ); - } + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } } export type SecurityState = { - basic: { username?: string | undefined; password?: string | undefined }; - headers: Record; - queryParams: Record; - cookies: Record; + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; }; type SecurityInputBasic = { - type: "http:basic"; - value: { username?: string | undefined; password?: string | undefined } | null | undefined; + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; }; type SecurityInputBearer = { - type: "http:bearer"; - value: string | null | undefined; - fieldName: string; + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputAPIKey = { - type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; - value: string | null | undefined; - fieldName: string; + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOIDC = { - type: "openIdConnect"; - value: string | null | undefined; - fieldName: string; + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2 = { - type: "oauth2"; - value: string | null | undefined; - fieldName: string; + type: "oauth2"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputOAuth2ClientCredentials = { - type: "oauth2:client_credentials"; - value: string | null | undefined; - fieldName: string; + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: string; }; type SecurityInputCustom = { - type: "http:custom"; - value: any | null | undefined; - fieldName: string; + type: "http:custom"; + value: any | null | undefined; + fieldName: string; }; export type SecurityInput = - | SecurityInputBasic - | SecurityInputBearer - | SecurityInputAPIKey - | SecurityInputOAuth2 - | SecurityInputOAuth2ClientCredentials - | SecurityInputOIDC - | SecurityInputCustom; + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; -export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null { - const state: SecurityState = { - basic: { username: "", password: "" }, - headers: {}, - queryParams: {}, - cookies: {}, - }; +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; - const option = options.find((opts) => { - return opts.every((o) => { - if (o.value == null) { - return false; - } else if (o.type === "http:basic") { - return o.value.username != null || o.value.password != null; - } else if (o.type === "http:custom") { - return null; - } else if (typeof o.value === "string") { - return !!o.value; - } else { - throw new Error( - `Unrecognized security type: ${o.type} (value type: ${typeof o.value})` - ); - } - }); - }); - if (option == null) { + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { return null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; } - option.forEach((spec) => { - if (spec.value == null) { - return; - } + const { type } = spec; - const { type } = spec; + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); - switch (type) { - case "apiKey:header": - state.headers[spec.fieldName] = spec.value; - break; - case "apiKey:query": - state.queryParams[spec.fieldName] = spec.value; - break; - case "apiKey:cookie": - state.cookies[spec.fieldName] = spec.value; - break; - case "http:basic": - applyBasic(state, spec); - break; - case "http:custom": - break; - case "http:bearer": - applyBearer(state, spec); - break; - case "oauth2": - applyBearer(state, spec); - break; - case "oauth2:client_credentials": - break; - case "openIdConnect": - applyBearer(state, spec); - break; - default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); - } - }); - - return state; + return state; } -function applyBasic(state: SecurityState, spec: SecurityInputBasic) { - if (spec.value == null) { - return; - } +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } - state.basic = spec.value; + state.basic = spec.value; } function applyBearer( - state: SecurityState, - spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, ) { - if (spec.value == null) { - return; - } + if (spec.value == null) { + return; + } - let value = spec.value; - if (value.slice(0, 7).toLowerCase() !== "bearer ") { - value = `Bearer ${value}`; - } + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } - state.headers[spec.fieldName] = value; + state.headers[spec.fieldName] = value; } export function resolveGlobalSecurity( - security: Partial | null | undefined + security: Partial | null | undefined, ): SecurityState | null { - return resolveSecurity([ - { - fieldName: "X-Plex-Token", - type: "apiKey:query", - value: security?.accessToken, - }, - ]); + return resolveSecurity( + [ + { + fieldName: "X-Plex-Token", + type: "apiKey:query", + value: security?.accessToken, + }, + ], + ); } -export async function extractSecurity>( - sec: T | (() => Promise) | undefined -): Promise { - if (sec == null) { - return; - } +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } - return typeof sec === "function" ? sec() : sec; + return typeof sec === "function" ? sec() : sec; } diff --git a/src/sdk/activities.ts b/src/sdk/activities.ts index e7f16ce3..d9d0d5c2 100644 --- a/src/sdk/activities.ts +++ b/src/sdk/activities.ts @@ -9,28 +9,35 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Activities extends ClientSDK { - /** - * Get Server Activities - * - * @remarks - * Get Server Activities - */ - async getServerActivities( - options?: RequestOptions - ): Promise { - return unwrapAsync(activitiesGetServerActivities(this, options)); - } + /** + * Get Server Activities + * + * @remarks + * Get Server Activities + */ + async getServerActivities( + options?: RequestOptions, + ): Promise { + return unwrapAsync(activitiesGetServerActivities( + this, + options, + )); + } - /** - * Cancel Server Activities - * - * @remarks - * Cancel Server Activities - */ - async cancelServerActivities( - activityUUID: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(activitiesCancelServerActivities(this, activityUUID, options)); - } + /** + * Cancel Server Activities + * + * @remarks + * Cancel Server Activities + */ + async cancelServerActivities( + activityUUID: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(activitiesCancelServerActivities( + this, + activityUUID, + options, + )); + } } diff --git a/src/sdk/authentication.ts b/src/sdk/authentication.ts index 935aaae1..337f45b7 100644 --- a/src/sdk/authentication.ts +++ b/src/sdk/authentication.ts @@ -3,70 +3,82 @@ */ import { authenticationGetSourceConnectionInformation } from "../funcs/authenticationGetSourceConnectionInformation.js"; +import { authenticationGetTokenDetails } from "../funcs/authenticationGetTokenDetails.js"; import { authenticationGetTransientToken } from "../funcs/authenticationGetTransientToken.js"; -import { authenticationGetUserDetails } from "../funcs/authenticationGetUserDetails.js"; import { authenticationPostUsersSignInData } from "../funcs/authenticationPostUsersSignInData.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Authentication extends ClientSDK { - /** - * Get a Transient Token. - * - * @remarks - * This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. - * - */ - async getTransientToken( - type: operations.GetTransientTokenQueryParamType, - scope: operations.Scope, - options?: RequestOptions - ): Promise { - return unwrapAsync(authenticationGetTransientToken(this, type, scope, options)); - } + /** + * Get a Transient Token + * + * @remarks + * This endpoint provides the caller with a temporary token with the same access level as the caller's token. These tokens are valid for up to 48 hours and are destroyed if the server instance is restarted. + */ + async getTransientToken( + type: operations.GetTransientTokenQueryParamType, + scope: operations.Scope, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authenticationGetTransientToken( + this, + type, + scope, + options, + )); + } - /** - * Get Source Connection Information - * - * @remarks - * If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. - * Note: requires Plex Media Server >= 1.15.4. - * - */ - async getSourceConnectionInformation( - source: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(authenticationGetSourceConnectionInformation(this, source, options)); - } + /** + * Get Source Connection Information + * + * @remarks + * If a caller requires connection details and a transient token for a source that is known to the server, for example a cloud media provider or shared PMS, then this endpoint can be called. This endpoint is only accessible with either an admin token or a valid transient token generated from an admin token. + * Note: requires Plex Media Server >= 1.15.4. + */ + async getSourceConnectionInformation( + source: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(authenticationGetSourceConnectionInformation( + this, + source, + options, + )); + } - /** - * Get User Data By Token - * - * @remarks - * Get the User data from the provided X-Plex-Token - */ - async getUserDetails( - xPlexToken: string, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(authenticationGetUserDetails(this, xPlexToken, options)); - } + /** + * Get Token Details + * + * @remarks + * Get the User data from the provided X-Plex-Token + */ + async getTokenDetails( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(authenticationGetTokenDetails( + this, + options, + )); + } - /** - * Get User Sign In Data - * - * @remarks - * Sign in user with username and password and return user data with Plex authentication token - */ - async postUsersSignInData( - xPlexClientIdentifier?: string | undefined, - requestBody?: operations.PostUsersSignInDataRequestBody | undefined, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync( - authenticationPostUsersSignInData(this, xPlexClientIdentifier, requestBody, options) - ); - } + /** + * Get User Sign In Data + * + * @remarks + * Sign in user with username and password and return user data with Plex authentication token + */ + async postUsersSignInData( + xPlexClientIdentifier?: string | undefined, + requestBody?: operations.PostUsersSignInDataRequestBody | undefined, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(authenticationPostUsersSignInData( + this, + xPlexClientIdentifier, + requestBody, + options, + )); + } } diff --git a/src/sdk/butler.ts b/src/sdk/butler.ts index 5ec4f888..cec10dc1 100644 --- a/src/sdk/butler.ts +++ b/src/sdk/butler.ts @@ -12,71 +12,90 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Butler extends ClientSDK { - /** - * Get Butler tasks - * - * @remarks - * Returns a list of butler tasks - */ - async getButlerTasks(options?: RequestOptions): Promise { - return unwrapAsync(butlerGetButlerTasks(this, options)); - } + /** + * Get Butler tasks + * + * @remarks + * Returns a list of butler tasks + */ + async getButlerTasks( + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerGetButlerTasks( + this, + options, + )); + } - /** - * Start all Butler tasks - * - * @remarks - * This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - */ - async startAllTasks(options?: RequestOptions): Promise { - return unwrapAsync(butlerStartAllTasks(this, options)); - } + /** + * Start all Butler tasks + * + * @remarks + * This endpoint will attempt to start all Butler tasks that are enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + */ + async startAllTasks( + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerStartAllTasks( + this, + options, + )); + } - /** - * Stop all Butler tasks - * - * @remarks - * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. - * - */ - async stopAllTasks(options?: RequestOptions): Promise { - return unwrapAsync(butlerStopAllTasks(this, options)); - } + /** + * Stop all Butler tasks + * + * @remarks + * This endpoint will stop all currently running tasks and remove any scheduled tasks from the queue. + */ + async stopAllTasks( + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerStopAllTasks( + this, + options, + )); + } - /** - * Start a single Butler task - * - * @remarks - * This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: - * 1. Any tasks not scheduled to run on the current day will be skipped. - * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. - * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. - * 4. If we are outside the configured window, the task will start immediately. - * - */ - async startTask( - taskName: operations.TaskName, - options?: RequestOptions - ): Promise { - return unwrapAsync(butlerStartTask(this, taskName, options)); - } + /** + * Start a single Butler task + * + * @remarks + * This endpoint will attempt to start a single Butler task that is enabled in the settings. Butler tasks normally run automatically during a time window configured on the server's Settings page but can be manually started using this endpoint. Tasks will run with the following criteria: + * 1. Any tasks not scheduled to run on the current day will be skipped. + * 2. If a task is configured to run at a random time during the configured window and we are outside that window, the task will start immediately. + * 3. If a task is configured to run at a random time during the configured window and we are within that window, the task will be scheduled at a random time within the window. + * 4. If we are outside the configured window, the task will start immediately. + */ + async startTask( + taskName: operations.TaskName, + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerStartTask( + this, + taskName, + options, + )); + } - /** - * Stop a single Butler task - * - * @remarks - * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. - * - */ - async stopTask( - taskName: operations.PathParamTaskName, - options?: RequestOptions - ): Promise { - return unwrapAsync(butlerStopTask(this, taskName, options)); - } + /** + * Stop a single Butler task + * + * @remarks + * This endpoint will stop a currently running task by name, or remove it from the list of scheduled tasks if it exists. See the section above for a list of task names for this endpoint. + */ + async stopTask( + taskName: operations.PathParamTaskName, + options?: RequestOptions, + ): Promise { + return unwrapAsync(butlerStopTask( + this, + taskName, + options, + )); + } } diff --git a/src/sdk/hubs.ts b/src/sdk/hubs.ts index 930a2812..be448fa2 100644 --- a/src/sdk/hubs.ts +++ b/src/sdk/hubs.ts @@ -9,33 +9,43 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Hubs extends ClientSDK { - /** - * Get Global Hubs - * - * @remarks - * Get Global Hubs filtered by the parameters provided. - */ - async getGlobalHubs( - count?: number | undefined, - onlyTransient?: operations.OnlyTransient | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(hubsGetGlobalHubs(this, count, onlyTransient, options)); - } + /** + * Get Global Hubs + * + * @remarks + * Get Global Hubs filtered by the parameters provided. + */ + async getGlobalHubs( + count?: number | undefined, + onlyTransient?: operations.OnlyTransient | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetGlobalHubs( + this, + count, + onlyTransient, + options, + )); + } - /** - * Get library specific hubs - * - * @remarks - * This endpoint will return a list of library specific hubs - * - */ - async getLibraryHubs( - sectionId: number, - count?: number | undefined, - onlyTransient?: operations.QueryParamOnlyTransient | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(hubsGetLibraryHubs(this, sectionId, count, onlyTransient, options)); - } + /** + * Get library specific hubs + * + * @remarks + * This endpoint will return a list of library specific hubs + */ + async getLibraryHubs( + sectionId: number, + count?: number | undefined, + onlyTransient?: operations.QueryParamOnlyTransient | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(hubsGetLibraryHubs( + this, + sectionId, + count, + onlyTransient, + options, + )); + } } diff --git a/src/sdk/library.ts b/src/sdk/library.ts index 4ce04109..00a7bcee 100644 --- a/src/sdk/library.ts +++ b/src/sdk/library.ts @@ -19,251 +19,296 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Library extends ClientSDK { - /** - * Get Hash Value - * - * @remarks - * This resource returns hash values for local files - */ - async getFileHash( - url: string, - type?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetFileHash(this, url, type, options)); - } + /** + * Get Hash Value + * + * @remarks + * This resource returns hash values for local files + */ + async getFileHash( + url: string, + type?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetFileHash( + this, + url, + type, + options, + )); + } - /** - * Get Recently Added - * - * @remarks - * This endpoint will return the recently added content. - * - */ - async getRecentlyAdded( - xPlexContainerStart?: number | undefined, - xPlexContainerSize?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - libraryGetRecentlyAdded(this, xPlexContainerStart, xPlexContainerSize, options) - ); - } + /** + * Get Recently Added + * + * @remarks + * This endpoint will return the recently added content. + */ + async getRecentlyAdded( + xPlexContainerStart?: number | undefined, + xPlexContainerSize?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetRecentlyAdded( + this, + xPlexContainerStart, + xPlexContainerSize, + options, + )); + } - /** - * Get All Libraries - * - * @remarks - * A library section (commonly referred to as just a library) is a collection of media. - * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. - * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. - * - * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. - * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). - * - */ - async getAllLibraries(options?: RequestOptions): Promise { - return unwrapAsync(libraryGetAllLibraries(this, options)); - } + /** + * Get All Libraries + * + * @remarks + * A library section (commonly referred to as just a library) is a collection of media. + * Libraries are typed, and depending on their type provide either a flat or a hierarchical view of the media. + * For example, a music library has an artist > albums > tracks structure, whereas a movie library is flat. + * + * Libraries have features beyond just being a collection of media; for starters, they include information about supported types, filters and sorts. + * This allows a client to provide a rich interface around the media (e.g. allow sorting movies by release year). + */ + async getAllLibraries( + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetAllLibraries( + this, + options, + )); + } - /** - * Get Library Details - * - * @remarks - * ## Library Details Endpoint - * - * This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. - * - * The details include: - * - * ### Directories - * Organized into three categories: - * - * - **Primary Directories**: - * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). - * - Most can be replicated via media queries. - * - Customizable by users. - * - * - **Secondary Directories**: - * - Marked with `secondary="1"`. - * - Used in older clients for structured navigation. - * - * - **Special Directories**: - * - Includes a "By Folder" entry for filesystem-based browsing. - * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. - * - * ### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - * - **Type Object Attributes**: - * - `key`: Endpoint for the media list of this type. - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - * - **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - * - **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - */ - async getLibraryDetails( - sectionKey: number, - includeDetails?: operations.IncludeDetails | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetLibraryDetails(this, sectionKey, includeDetails, options)); - } + /** + * Get Library Details + * + * @remarks + * ## Library Details Endpoint + * + * This endpoint provides comprehensive details about the library, focusing on organizational aspects rather than the content itself. + * + * The details include: + * + * ### Directories + * Organized into three categories: + * + * - **Primary Directories**: + * - Used in some clients for quick access to media subsets (e.g., "All", "On Deck"). + * - Most can be replicated via media queries. + * - Customizable by users. + * + * - **Secondary Directories**: + * - Marked with `secondary="1"`. + * - Used in older clients for structured navigation. + * + * - **Special Directories**: + * - Includes a "By Folder" entry for filesystem-based browsing. + * - Contains an obsolete `search="1"` entry for on-the-fly search dialog creation. + * + * ### Types + * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + * + * - **Type Object Attributes**: + * - `key`: Endpoint for the media list of this type. + * - `type`: Metadata type (if standard Plex type). + * - `title`: Title for this content type (e.g., "Movies"). + * + * - **Filter Objects**: + * - Subset of the media query language. + * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + * + * - **Sort Objects**: + * - Description of sort fields. + * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + * + * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + */ + async getLibraryDetails( + sectionKey: number, + includeDetails?: operations.IncludeDetails | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetLibraryDetails( + this, + sectionKey, + includeDetails, + options, + )); + } - /** - * Delete Library Section - * - * @remarks - * Delete a library using a specific section id - */ - async deleteLibrary( - sectionKey: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryDeleteLibrary(this, sectionKey, options)); - } + /** + * Delete Library Section + * + * @remarks + * Delete a library using a specific section id + */ + async deleteLibrary( + sectionKey: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryDeleteLibrary( + this, + sectionKey, + options, + )); + } - /** - * Get Library Items - * - * @remarks - * Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: - * - `all`: All items in the section. - * - `unwatched`: Items that have not been played. - * - `newest`: Items that are recently released. - * - `recentlyAdded`: Items that are recently added to the library. - * - `recentlyViewed`: Items that were recently viewed. - * - `onDeck`: Items to continue watching. - * - `collection`: Items categorized by collection. - * - `edition`: Items categorized by edition. - * - `genre`: Items categorized by genre. - * - `year`: Items categorized by year of release. - * - `decade`: Items categorized by decade. - * - `director`: Items categorized by director. - * - `actor`: Items categorized by starring actor. - * - `country`: Items categorized by country of origin. - * - `contentRating`: Items categorized by content rating. - * - `rating`: Items categorized by rating. - * - `resolution`: Items categorized by resolution. - * - `firstCharacter`: Items categorized by the first letter. - * - `folder`: Items categorized by folder. - * - */ - async getLibraryItems( - request: operations.GetLibraryItemsRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetLibraryItems(this, request, options)); - } + /** + * Get Library Items + * + * @remarks + * Fetches details from a specific section of the library identified by a section key and a tag. The tag parameter accepts the following values: + * - `all`: All items in the section. + * - `unwatched`: Items that have not been played. + * - `newest`: Items that are recently released. + * - `recentlyAdded`: Items that are recently added to the library. + * - `recentlyViewed`: Items that were recently viewed. + * - `onDeck`: Items to continue watching. + * - `collection`: Items categorized by collection. + * - `edition`: Items categorized by edition. + * - `genre`: Items categorized by genre. + * - `year`: Items categorized by year of release. + * - `decade`: Items categorized by decade. + * - `director`: Items categorized by director. + * - `actor`: Items categorized by starring actor. + * - `country`: Items categorized by country of origin. + * - `contentRating`: Items categorized by content rating. + * - `rating`: Items categorized by rating. + * - `resolution`: Items categorized by resolution. + * - `firstCharacter`: Items categorized by the first letter. + * - `folder`: Items categorized by folder. + */ + async getLibraryItems( + request: operations.GetLibraryItemsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetLibraryItems( + this, + request, + options, + )); + } - /** - * Refresh Metadata Of The Library - * - * @remarks - * This endpoint Refreshes all the Metadata of the library. - * - */ - async getRefreshLibraryMetadata( - sectionKey: number, - force?: operations.Force | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetRefreshLibraryMetadata(this, sectionKey, force, options)); - } + /** + * Refresh Metadata Of The Library + * + * @remarks + * This endpoint Refreshes all the Metadata of the library. + */ + async getRefreshLibraryMetadata( + sectionKey: number, + force?: operations.Force | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetRefreshLibraryMetadata( + this, + sectionKey, + force, + options, + )); + } - /** - * Search Library - * - * @remarks - * Search for content within a specific section of the library. - * - * ### Types - * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: - * - * - **Type Object Attributes**: - * - `type`: Metadata type (if standard Plex type). - * - `title`: Title for this content type (e.g., "Movies"). - * - * - **Filter Objects**: - * - Subset of the media query language. - * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. - * - * - **Sort Objects**: - * - Description of sort fields. - * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. - * - * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. - * - */ - async getSearchLibrary( - sectionKey: number, - type: operations.QueryParamType, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetSearchLibrary(this, sectionKey, type, options)); - } + /** + * Search Library + * + * @remarks + * Search for content within a specific section of the library. + * + * ### Types + * Each type in the library comes with a set of filters and sorts, aiding in building dynamic media controls: + * + * - **Type Object Attributes**: + * - `type`: Metadata type (if standard Plex type). + * - `title`: Title for this content type (e.g., "Movies"). + * + * - **Filter Objects**: + * - Subset of the media query language. + * - Attributes include `filter` (name), `filterType` (data type), `key` (endpoint for value range), and `title`. + * + * - **Sort Objects**: + * - Description of sort fields. + * - Attributes include `defaultDirection` (asc/desc), `descKey` and `key` (sort parameters), and `title`. + * + * > **Note**: Filters and sorts are optional; without them, no filtering controls are rendered. + */ + async getSearchLibrary( + sectionKey: number, + type: operations.QueryParamType, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetSearchLibrary( + this, + sectionKey, + type, + options, + )); + } - /** - * Get Metadata by RatingKey - * - * @remarks - * This endpoint will return the metadata of a library item specified with the ratingKey. - * - */ - async getMetaDataByRatingKey( - ratingKey: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetMetaDataByRatingKey(this, ratingKey, options)); - } + /** + * Get Metadata by RatingKey + * + * @remarks + * This endpoint will return the metadata of a library item specified with the ratingKey. + */ + async getMetaDataByRatingKey( + ratingKey: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetMetaDataByRatingKey( + this, + ratingKey, + options, + )); + } - /** - * Get Items Children - * - * @remarks - * This endpoint will return the children of of a library item specified with the ratingKey. - * - */ - async getMetadataChildren( - ratingKey: number, - includeElements?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetMetadataChildren(this, ratingKey, includeElements, options)); - } + /** + * Get Items Children + * + * @remarks + * This endpoint will return the children of of a library item specified with the ratingKey. + */ + async getMetadataChildren( + ratingKey: number, + includeElements?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetMetadataChildren( + this, + ratingKey, + includeElements, + options, + )); + } - /** - * Get Top Watched Content - * - * @remarks - * This endpoint will return the top watched content from libraries of a certain type - * - */ - async getTopWatchedContent( - type: operations.GetTopWatchedContentQueryParamType, - includeGuids?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(libraryGetTopWatchedContent(this, type, includeGuids, options)); - } + /** + * Get Top Watched Content + * + * @remarks + * This endpoint will return the top watched content from libraries of a certain type + */ + async getTopWatchedContent( + type: operations.GetTopWatchedContentQueryParamType, + includeGuids?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetTopWatchedContent( + this, + type, + includeGuids, + options, + )); + } - /** - * Get On Deck - * - * @remarks - * This endpoint will return the on deck content. - * - */ - async getOnDeck(options?: RequestOptions): Promise { - return unwrapAsync(libraryGetOnDeck(this, options)); - } + /** + * Get On Deck + * + * @remarks + * This endpoint will return the on deck content. + */ + async getOnDeck( + options?: RequestOptions, + ): Promise { + return unwrapAsync(libraryGetOnDeck( + this, + options, + )); + } } diff --git a/src/sdk/log.ts b/src/sdk/log.ts index 423cce39..1fcf9719 100644 --- a/src/sdk/log.ts +++ b/src/sdk/log.ts @@ -10,64 +10,76 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Log extends ClientSDK { - /** - * Logging a single line message. - * - * @remarks - * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. - * - */ - async logLine( - level: operations.Level, - message: string, - source: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(logLogLine(this, level, message, source, options)); - } + /** + * Logging a single line message. + * + * @remarks + * This endpoint will write a single-line log message, including a level and source to the main Plex Media Server log. + */ + async logLine( + level: operations.Level, + message: string, + source: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(logLogLine( + this, + level, + message, + source, + options, + )); + } - /** - * Logging a multi-line message - * - * @remarks - * This endpoint allows for the batch addition of log entries to the main Plex Media Server log. - * It accepts a text/plain request body, where each line represents a distinct log entry. - * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. - * - * Log entries are separated by a newline character (`\n`). - * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. - * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. - * - * The 'level' parameter specifies the log entry's severity or importance, with the following integer values: - * - `0`: Error - Critical issues that require immediate attention. - * - `1`: Warning - Important events that are not critical but may indicate potential issues. - * - `2`: Info - General informational messages about system operation. - * - `3`: Debug - Detailed information useful for debugging purposes. - * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. - * - * The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). - * - * Example of a single log entry format: - * `level=4&message=Sample%20log%20entry&source=applicationName` - * - * Ensure each parameter is properly URL-encoded to avoid interpretation issues. - * - */ - async logMultiLine( - request: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(logLogMultiLine(this, request, options)); - } + /** + * Logging a multi-line message + * + * @remarks + * This endpoint allows for the batch addition of log entries to the main Plex Media Server log. + * It accepts a text/plain request body, where each line represents a distinct log entry. + * Each log entry consists of URL-encoded key-value pairs, specifying log attributes such as 'level', 'message', and 'source'. + * + * Log entries are separated by a newline character (`\n`). + * Each entry's parameters should be URL-encoded to ensure accurate parsing and handling of special characters. + * This method is efficient for logging multiple entries in a single API call, reducing the overhead of multiple individual requests. + * + * The 'level' parameter specifies the log entry's severity or importance, with the following integer values: + * - `0`: Error - Critical issues that require immediate attention. + * - `1`: Warning - Important events that are not critical but may indicate potential issues. + * - `2`: Info - General informational messages about system operation. + * - `3`: Debug - Detailed information useful for debugging purposes. + * - `4`: Verbose - Highly detailed diagnostic information for in-depth analysis. + * + * The 'message' parameter contains the log text, and 'source' identifies the log message's origin (e.g., an application name or module). + * + * Example of a single log entry format: + * `level=4&message=Sample%20log%20entry&source=applicationName` + * + * Ensure each parameter is properly URL-encoded to avoid interpretation issues. + */ + async logMultiLine( + request: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(logLogMultiLine( + this, + request, + options, + )); + } - /** - * Enabling Papertrail - * - * @remarks - * This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. - * - */ - async enablePaperTrail(options?: RequestOptions): Promise { - return unwrapAsync(logEnablePaperTrail(this, options)); - } + /** + * Enabling Papertrail + * + * @remarks + * This endpoint will enable all Plex Media Serverlogs to be sent to the Papertrail networked logging site for a period of time. + */ + async enablePaperTrail( + options?: RequestOptions, + ): Promise { + return unwrapAsync(logEnablePaperTrail( + this, + options, + )); + } } diff --git a/src/sdk/media.ts b/src/sdk/media.ts index bf09d555..6b957d67 100644 --- a/src/sdk/media.ts +++ b/src/sdk/media.ts @@ -12,71 +12,92 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Media extends ClientSDK { - /** - * Mark Media Played - * - * @remarks - * This will mark the provided media key as Played. - */ - async markPlayed( - key: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(mediaMarkPlayed(this, key, options)); - } + /** + * Mark Media Played + * + * @remarks + * This will mark the provided media key as Played. + */ + async markPlayed( + key: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mediaMarkPlayed( + this, + key, + options, + )); + } - /** - * Mark Media Unplayed - * - * @remarks - * This will mark the provided media key as Unplayed. - */ - async markUnplayed( - key: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(mediaMarkUnplayed(this, key, options)); - } + /** + * Mark Media Unplayed + * + * @remarks + * This will mark the provided media key as Unplayed. + */ + async markUnplayed( + key: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mediaMarkUnplayed( + this, + key, + options, + )); + } - /** - * Update Media Play Progress - * - * @remarks - * This API command can be used to update the play progress of a media item. - * - */ - async updatePlayProgress( - key: string, - time: number, - state: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(mediaUpdatePlayProgress(this, key, time, state, options)); - } + /** + * Update Media Play Progress + * + * @remarks + * This API command can be used to update the play progress of a media item. + */ + async updatePlayProgress( + key: string, + time: number, + state: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mediaUpdatePlayProgress( + this, + key, + time, + state, + options, + )); + } - /** - * Get Banner Image - * - * @remarks - * Gets the banner image of the media item - */ - async getBannerImage( - request: operations.GetBannerImageRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(mediaGetBannerImage(this, request, options)); - } + /** + * Get Banner Image + * + * @remarks + * Gets the banner image of the media item + */ + async getBannerImage( + request: operations.GetBannerImageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mediaGetBannerImage( + this, + request, + options, + )); + } - /** - * Get Thumb Image - * - * @remarks - * Gets the thumbnail image of the media item - */ - async getThumbImage( - request: operations.GetThumbImageRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(mediaGetThumbImage(this, request, options)); - } + /** + * Get Thumb Image + * + * @remarks + * Gets the thumbnail image of the media item + */ + async getThumbImage( + request: operations.GetThumbImageRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(mediaGetThumbImage( + this, + request, + options, + )); + } } diff --git a/src/sdk/models/errors/addplaylistcontents.ts b/src/sdk/models/errors/addplaylistcontents.ts index 821220b5..fd7f9949 100644 --- a/src/sdk/models/errors/addplaylistcontents.ts +++ b/src/sdk/models/errors/addplaylistcontents.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type AddPlaylistContentsPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type AddPlaylistContentsPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type AddPlaylistContentsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class AddPlaylistContentsPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class AddPlaylistContentsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: AddPlaylistContentsPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: AddPlaylistContentsUnauthorizedData; - constructor(err: AddPlaylistContentsPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: AddPlaylistContentsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "AddPlaylistContentsPlaylistsResponseBody"; - } + this.name = "AddPlaylistContentsUnauthorized"; + } } export type AddPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type AddPlaylistContentsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type AddPlaylistContentsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class AddPlaylistContentsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class AddPlaylistContentsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: AddPlaylistContentsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: AddPlaylistContentsBadRequestData; - constructor(err: AddPlaylistContentsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: AddPlaylistContentsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "AddPlaylistContentsResponseBody"; - } + this.name = "AddPlaylistContentsBadRequest"; + } } /** @internal */ export const AddPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown + AddPlaylistContentsPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type AddPlaylistContentsPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const AddPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - AddPlaylistContentsPlaylistsErrors + AddPlaylistContentsPlaylistsErrors$Outbound, + z.ZodTypeDef, + AddPlaylistContentsPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,102 @@ export const AddPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsPlaylistsErrors$ { - /** @deprecated use `AddPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsPlaylistsErrors$inboundSchema; - /** @deprecated use `AddPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsPlaylistsErrors$outboundSchema; - /** @deprecated use `AddPlaylistContentsPlaylistsErrors$Outbound` instead. */ - export type Outbound = AddPlaylistContentsPlaylistsErrors$Outbound; + /** @deprecated use `AddPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsPlaylistsErrors$inboundSchema; + /** @deprecated use `AddPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = + AddPlaylistContentsPlaylistsErrors$outboundSchema; + /** @deprecated use `AddPlaylistContentsPlaylistsErrors$Outbound` instead. */ + export type Outbound = AddPlaylistContentsPlaylistsErrors$Outbound; } /** @internal */ -export const AddPlaylistContentsPlaylistsResponseBody$inboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => AddPlaylistContentsPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new AddPlaylistContentsPlaylistsResponseBody(remapped); +export const AddPlaylistContentsUnauthorized$inboundSchema: z.ZodType< + AddPlaylistContentsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => AddPlaylistContentsPlaylistsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new AddPlaylistContentsUnauthorized(remapped); + }); + /** @internal */ -export type AddPlaylistContentsPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type AddPlaylistContentsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const AddPlaylistContentsPlaylistsResponseBody$outboundSchema: z.ZodType< - AddPlaylistContentsPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - AddPlaylistContentsPlaylistsResponseBody -> = z - .instanceof(AddPlaylistContentsPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => AddPlaylistContentsPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const AddPlaylistContentsUnauthorized$outboundSchema: z.ZodType< + AddPlaylistContentsUnauthorized$Outbound, + z.ZodTypeDef, + AddPlaylistContentsUnauthorized +> = z.instanceof(AddPlaylistContentsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => AddPlaylistContentsPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace AddPlaylistContentsPlaylistsResponseBody$ { - /** @deprecated use `AddPlaylistContentsPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsPlaylistsResponseBody$inboundSchema; - /** @deprecated use `AddPlaylistContentsPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsPlaylistsResponseBody$outboundSchema; - /** @deprecated use `AddPlaylistContentsPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = AddPlaylistContentsPlaylistsResponseBody$Outbound; +export namespace AddPlaylistContentsUnauthorized$ { + /** @deprecated use `AddPlaylistContentsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsUnauthorized$inboundSchema; + /** @deprecated use `AddPlaylistContentsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsUnauthorized$outboundSchema; + /** @deprecated use `AddPlaylistContentsUnauthorized$Outbound` instead. */ + export type Outbound = AddPlaylistContentsUnauthorized$Outbound; } /** @internal */ export const AddPlaylistContentsErrors$inboundSchema: z.ZodType< - AddPlaylistContentsErrors, - z.ZodTypeDef, - unknown + AddPlaylistContentsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type AddPlaylistContentsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const AddPlaylistContentsErrors$outboundSchema: z.ZodType< - AddPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - AddPlaylistContentsErrors + AddPlaylistContentsErrors$Outbound, + z.ZodTypeDef, + AddPlaylistContentsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +230,68 @@ export const AddPlaylistContentsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsErrors$ { - /** @deprecated use `AddPlaylistContentsErrors$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsErrors$inboundSchema; - /** @deprecated use `AddPlaylistContentsErrors$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsErrors$outboundSchema; - /** @deprecated use `AddPlaylistContentsErrors$Outbound` instead. */ - export type Outbound = AddPlaylistContentsErrors$Outbound; + /** @deprecated use `AddPlaylistContentsErrors$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsErrors$inboundSchema; + /** @deprecated use `AddPlaylistContentsErrors$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsErrors$outboundSchema; + /** @deprecated use `AddPlaylistContentsErrors$Outbound` instead. */ + export type Outbound = AddPlaylistContentsErrors$Outbound; } /** @internal */ -export const AddPlaylistContentsResponseBody$inboundSchema: z.ZodType< - AddPlaylistContentsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => AddPlaylistContentsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new AddPlaylistContentsResponseBody(remapped); +export const AddPlaylistContentsBadRequest$inboundSchema: z.ZodType< + AddPlaylistContentsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => AddPlaylistContentsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new AddPlaylistContentsBadRequest(remapped); + }); + /** @internal */ -export type AddPlaylistContentsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type AddPlaylistContentsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const AddPlaylistContentsResponseBody$outboundSchema: z.ZodType< - AddPlaylistContentsResponseBody$Outbound, - z.ZodTypeDef, - AddPlaylistContentsResponseBody -> = z - .instanceof(AddPlaylistContentsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => AddPlaylistContentsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const AddPlaylistContentsBadRequest$outboundSchema: z.ZodType< + AddPlaylistContentsBadRequest$Outbound, + z.ZodTypeDef, + AddPlaylistContentsBadRequest +> = z.instanceof(AddPlaylistContentsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => AddPlaylistContentsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace AddPlaylistContentsResponseBody$ { - /** @deprecated use `AddPlaylistContentsResponseBody$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsResponseBody$inboundSchema; - /** @deprecated use `AddPlaylistContentsResponseBody$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsResponseBody$outboundSchema; - /** @deprecated use `AddPlaylistContentsResponseBody$Outbound` instead. */ - export type Outbound = AddPlaylistContentsResponseBody$Outbound; +export namespace AddPlaylistContentsBadRequest$ { + /** @deprecated use `AddPlaylistContentsBadRequest$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsBadRequest$inboundSchema; + /** @deprecated use `AddPlaylistContentsBadRequest$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsBadRequest$outboundSchema; + /** @deprecated use `AddPlaylistContentsBadRequest$Outbound` instead. */ + export type Outbound = AddPlaylistContentsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/applyupdates.ts b/src/sdk/models/errors/applyupdates.ts index 104ce913..573b1c52 100644 --- a/src/sdk/models/errors/applyupdates.ts +++ b/src/sdk/models/errors/applyupdates.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ApplyUpdatesUpdaterErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type ApplyUpdatesUpdaterResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type ApplyUpdatesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class ApplyUpdatesUpdaterResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class ApplyUpdatesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: ApplyUpdatesUpdaterResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: ApplyUpdatesUnauthorizedData; - constructor(err: ApplyUpdatesUpdaterResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: ApplyUpdatesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "ApplyUpdatesUpdaterResponseBody"; - } + this.name = "ApplyUpdatesUnauthorized"; + } } export type ApplyUpdatesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type ApplyUpdatesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type ApplyUpdatesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class ApplyUpdatesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class ApplyUpdatesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: ApplyUpdatesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: ApplyUpdatesBadRequestData; - constructor(err: ApplyUpdatesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: ApplyUpdatesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "ApplyUpdatesResponseBody"; - } + this.name = "ApplyUpdatesBadRequest"; + } } /** @internal */ export const ApplyUpdatesUpdaterErrors$inboundSchema: z.ZodType< - ApplyUpdatesUpdaterErrors, - z.ZodTypeDef, - unknown + ApplyUpdatesUpdaterErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type ApplyUpdatesUpdaterErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const ApplyUpdatesUpdaterErrors$outboundSchema: z.ZodType< - ApplyUpdatesUpdaterErrors$Outbound, - z.ZodTypeDef, - ApplyUpdatesUpdaterErrors + ApplyUpdatesUpdaterErrors$Outbound, + z.ZodTypeDef, + ApplyUpdatesUpdaterErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const ApplyUpdatesUpdaterErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApplyUpdatesUpdaterErrors$ { - /** @deprecated use `ApplyUpdatesUpdaterErrors$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesUpdaterErrors$inboundSchema; - /** @deprecated use `ApplyUpdatesUpdaterErrors$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesUpdaterErrors$outboundSchema; - /** @deprecated use `ApplyUpdatesUpdaterErrors$Outbound` instead. */ - export type Outbound = ApplyUpdatesUpdaterErrors$Outbound; + /** @deprecated use `ApplyUpdatesUpdaterErrors$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesUpdaterErrors$inboundSchema; + /** @deprecated use `ApplyUpdatesUpdaterErrors$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesUpdaterErrors$outboundSchema; + /** @deprecated use `ApplyUpdatesUpdaterErrors$Outbound` instead. */ + export type Outbound = ApplyUpdatesUpdaterErrors$Outbound; } /** @internal */ -export const ApplyUpdatesUpdaterResponseBody$inboundSchema: z.ZodType< - ApplyUpdatesUpdaterResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => ApplyUpdatesUpdaterErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new ApplyUpdatesUpdaterResponseBody(remapped); +export const ApplyUpdatesUnauthorized$inboundSchema: z.ZodType< + ApplyUpdatesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => ApplyUpdatesUpdaterErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new ApplyUpdatesUnauthorized(remapped); + }); + /** @internal */ -export type ApplyUpdatesUpdaterResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type ApplyUpdatesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const ApplyUpdatesUpdaterResponseBody$outboundSchema: z.ZodType< - ApplyUpdatesUpdaterResponseBody$Outbound, - z.ZodTypeDef, - ApplyUpdatesUpdaterResponseBody -> = z - .instanceof(ApplyUpdatesUpdaterResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => ApplyUpdatesUpdaterErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const ApplyUpdatesUnauthorized$outboundSchema: z.ZodType< + ApplyUpdatesUnauthorized$Outbound, + z.ZodTypeDef, + ApplyUpdatesUnauthorized +> = z.instanceof(ApplyUpdatesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => ApplyUpdatesUpdaterErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ApplyUpdatesUpdaterResponseBody$ { - /** @deprecated use `ApplyUpdatesUpdaterResponseBody$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesUpdaterResponseBody$inboundSchema; - /** @deprecated use `ApplyUpdatesUpdaterResponseBody$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesUpdaterResponseBody$outboundSchema; - /** @deprecated use `ApplyUpdatesUpdaterResponseBody$Outbound` instead. */ - export type Outbound = ApplyUpdatesUpdaterResponseBody$Outbound; +export namespace ApplyUpdatesUnauthorized$ { + /** @deprecated use `ApplyUpdatesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesUnauthorized$inboundSchema; + /** @deprecated use `ApplyUpdatesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesUnauthorized$outboundSchema; + /** @deprecated use `ApplyUpdatesUnauthorized$Outbound` instead. */ + export type Outbound = ApplyUpdatesUnauthorized$Outbound; } /** @internal */ export const ApplyUpdatesErrors$inboundSchema: z.ZodType< - ApplyUpdatesErrors, - z.ZodTypeDef, - unknown + ApplyUpdatesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type ApplyUpdatesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const ApplyUpdatesErrors$outboundSchema: z.ZodType< - ApplyUpdatesErrors$Outbound, - z.ZodTypeDef, - ApplyUpdatesErrors + ApplyUpdatesErrors$Outbound, + z.ZodTypeDef, + ApplyUpdatesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const ApplyUpdatesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApplyUpdatesErrors$ { - /** @deprecated use `ApplyUpdatesErrors$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesErrors$inboundSchema; - /** @deprecated use `ApplyUpdatesErrors$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesErrors$outboundSchema; - /** @deprecated use `ApplyUpdatesErrors$Outbound` instead. */ - export type Outbound = ApplyUpdatesErrors$Outbound; + /** @deprecated use `ApplyUpdatesErrors$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesErrors$inboundSchema; + /** @deprecated use `ApplyUpdatesErrors$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesErrors$outboundSchema; + /** @deprecated use `ApplyUpdatesErrors$Outbound` instead. */ + export type Outbound = ApplyUpdatesErrors$Outbound; } /** @internal */ -export const ApplyUpdatesResponseBody$inboundSchema: z.ZodType< - ApplyUpdatesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => ApplyUpdatesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new ApplyUpdatesResponseBody(remapped); +export const ApplyUpdatesBadRequest$inboundSchema: z.ZodType< + ApplyUpdatesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => ApplyUpdatesErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new ApplyUpdatesBadRequest(remapped); + }); + /** @internal */ -export type ApplyUpdatesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type ApplyUpdatesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const ApplyUpdatesResponseBody$outboundSchema: z.ZodType< - ApplyUpdatesResponseBody$Outbound, - z.ZodTypeDef, - ApplyUpdatesResponseBody -> = z - .instanceof(ApplyUpdatesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => ApplyUpdatesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const ApplyUpdatesBadRequest$outboundSchema: z.ZodType< + ApplyUpdatesBadRequest$Outbound, + z.ZodTypeDef, + ApplyUpdatesBadRequest +> = z.instanceof(ApplyUpdatesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => ApplyUpdatesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ApplyUpdatesResponseBody$ { - /** @deprecated use `ApplyUpdatesResponseBody$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesResponseBody$inboundSchema; - /** @deprecated use `ApplyUpdatesResponseBody$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesResponseBody$outboundSchema; - /** @deprecated use `ApplyUpdatesResponseBody$Outbound` instead. */ - export type Outbound = ApplyUpdatesResponseBody$Outbound; +export namespace ApplyUpdatesBadRequest$ { + /** @deprecated use `ApplyUpdatesBadRequest$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesBadRequest$inboundSchema; + /** @deprecated use `ApplyUpdatesBadRequest$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesBadRequest$outboundSchema; + /** @deprecated use `ApplyUpdatesBadRequest$Outbound` instead. */ + export type Outbound = ApplyUpdatesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/cancelserveractivities.ts b/src/sdk/models/errors/cancelserveractivities.ts index 3651ff0b..9c238bcb 100644 --- a/src/sdk/models/errors/cancelserveractivities.ts +++ b/src/sdk/models/errors/cancelserveractivities.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CancelServerActivitiesActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type CancelServerActivitiesActivitiesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CancelServerActivitiesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class CancelServerActivitiesActivitiesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CancelServerActivitiesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CancelServerActivitiesActivitiesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CancelServerActivitiesUnauthorizedData; - constructor(err: CancelServerActivitiesActivitiesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CancelServerActivitiesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CancelServerActivitiesActivitiesResponseBody"; - } + this.name = "CancelServerActivitiesUnauthorized"; + } } export type CancelServerActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type CancelServerActivitiesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CancelServerActivitiesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class CancelServerActivitiesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CancelServerActivitiesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CancelServerActivitiesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CancelServerActivitiesBadRequestData; - constructor(err: CancelServerActivitiesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CancelServerActivitiesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CancelServerActivitiesResponseBody"; - } + this.name = "CancelServerActivitiesBadRequest"; + } } /** @internal */ export const CancelServerActivitiesActivitiesErrors$inboundSchema: z.ZodType< - CancelServerActivitiesActivitiesErrors, - z.ZodTypeDef, - unknown + CancelServerActivitiesActivitiesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CancelServerActivitiesActivitiesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CancelServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< - CancelServerActivitiesActivitiesErrors$Outbound, - z.ZodTypeDef, - CancelServerActivitiesActivitiesErrors + CancelServerActivitiesActivitiesErrors$Outbound, + z.ZodTypeDef, + CancelServerActivitiesActivitiesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,104 @@ export const CancelServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelServerActivitiesActivitiesErrors$ { - /** @deprecated use `CancelServerActivitiesActivitiesErrors$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesActivitiesErrors$inboundSchema; - /** @deprecated use `CancelServerActivitiesActivitiesErrors$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesActivitiesErrors$outboundSchema; - /** @deprecated use `CancelServerActivitiesActivitiesErrors$Outbound` instead. */ - export type Outbound = CancelServerActivitiesActivitiesErrors$Outbound; + /** @deprecated use `CancelServerActivitiesActivitiesErrors$inboundSchema` instead. */ + export const inboundSchema = + CancelServerActivitiesActivitiesErrors$inboundSchema; + /** @deprecated use `CancelServerActivitiesActivitiesErrors$outboundSchema` instead. */ + export const outboundSchema = + CancelServerActivitiesActivitiesErrors$outboundSchema; + /** @deprecated use `CancelServerActivitiesActivitiesErrors$Outbound` instead. */ + export type Outbound = CancelServerActivitiesActivitiesErrors$Outbound; } /** @internal */ -export const CancelServerActivitiesActivitiesResponseBody$inboundSchema: z.ZodType< - CancelServerActivitiesActivitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => CancelServerActivitiesActivitiesErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CancelServerActivitiesActivitiesResponseBody(remapped); +export const CancelServerActivitiesUnauthorized$inboundSchema: z.ZodType< + CancelServerActivitiesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => CancelServerActivitiesActivitiesErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CancelServerActivitiesUnauthorized(remapped); + }); + /** @internal */ -export type CancelServerActivitiesActivitiesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CancelServerActivitiesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CancelServerActivitiesActivitiesResponseBody$outboundSchema: z.ZodType< - CancelServerActivitiesActivitiesResponseBody$Outbound, - z.ZodTypeDef, - CancelServerActivitiesActivitiesResponseBody -> = z - .instanceof(CancelServerActivitiesActivitiesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => CancelServerActivitiesActivitiesErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CancelServerActivitiesUnauthorized$outboundSchema: z.ZodType< + CancelServerActivitiesUnauthorized$Outbound, + z.ZodTypeDef, + CancelServerActivitiesUnauthorized +> = z.instanceof(CancelServerActivitiesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => CancelServerActivitiesActivitiesErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CancelServerActivitiesActivitiesResponseBody$ { - /** @deprecated use `CancelServerActivitiesActivitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesActivitiesResponseBody$inboundSchema; - /** @deprecated use `CancelServerActivitiesActivitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesActivitiesResponseBody$outboundSchema; - /** @deprecated use `CancelServerActivitiesActivitiesResponseBody$Outbound` instead. */ - export type Outbound = CancelServerActivitiesActivitiesResponseBody$Outbound; +export namespace CancelServerActivitiesUnauthorized$ { + /** @deprecated use `CancelServerActivitiesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = CancelServerActivitiesUnauthorized$inboundSchema; + /** @deprecated use `CancelServerActivitiesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + CancelServerActivitiesUnauthorized$outboundSchema; + /** @deprecated use `CancelServerActivitiesUnauthorized$Outbound` instead. */ + export type Outbound = CancelServerActivitiesUnauthorized$Outbound; } /** @internal */ export const CancelServerActivitiesErrors$inboundSchema: z.ZodType< - CancelServerActivitiesErrors, - z.ZodTypeDef, - unknown + CancelServerActivitiesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CancelServerActivitiesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CancelServerActivitiesErrors$outboundSchema: z.ZodType< - CancelServerActivitiesErrors$Outbound, - z.ZodTypeDef, - CancelServerActivitiesErrors + CancelServerActivitiesErrors$Outbound, + z.ZodTypeDef, + CancelServerActivitiesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,75 +232,68 @@ export const CancelServerActivitiesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelServerActivitiesErrors$ { - /** @deprecated use `CancelServerActivitiesErrors$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesErrors$inboundSchema; - /** @deprecated use `CancelServerActivitiesErrors$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesErrors$outboundSchema; - /** @deprecated use `CancelServerActivitiesErrors$Outbound` instead. */ - export type Outbound = CancelServerActivitiesErrors$Outbound; + /** @deprecated use `CancelServerActivitiesErrors$inboundSchema` instead. */ + export const inboundSchema = CancelServerActivitiesErrors$inboundSchema; + /** @deprecated use `CancelServerActivitiesErrors$outboundSchema` instead. */ + export const outboundSchema = CancelServerActivitiesErrors$outboundSchema; + /** @deprecated use `CancelServerActivitiesErrors$Outbound` instead. */ + export type Outbound = CancelServerActivitiesErrors$Outbound; } /** @internal */ -export const CancelServerActivitiesResponseBody$inboundSchema: z.ZodType< - CancelServerActivitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => CancelServerActivitiesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CancelServerActivitiesResponseBody(remapped); +export const CancelServerActivitiesBadRequest$inboundSchema: z.ZodType< + CancelServerActivitiesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => CancelServerActivitiesErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CancelServerActivitiesBadRequest(remapped); + }); + /** @internal */ -export type CancelServerActivitiesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CancelServerActivitiesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CancelServerActivitiesResponseBody$outboundSchema: z.ZodType< - CancelServerActivitiesResponseBody$Outbound, - z.ZodTypeDef, - CancelServerActivitiesResponseBody -> = z - .instanceof(CancelServerActivitiesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => CancelServerActivitiesErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CancelServerActivitiesBadRequest$outboundSchema: z.ZodType< + CancelServerActivitiesBadRequest$Outbound, + z.ZodTypeDef, + CancelServerActivitiesBadRequest +> = z.instanceof(CancelServerActivitiesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => CancelServerActivitiesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CancelServerActivitiesResponseBody$ { - /** @deprecated use `CancelServerActivitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesResponseBody$inboundSchema; - /** @deprecated use `CancelServerActivitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesResponseBody$outboundSchema; - /** @deprecated use `CancelServerActivitiesResponseBody$Outbound` instead. */ - export type Outbound = CancelServerActivitiesResponseBody$Outbound; +export namespace CancelServerActivitiesBadRequest$ { + /** @deprecated use `CancelServerActivitiesBadRequest$inboundSchema` instead. */ + export const inboundSchema = CancelServerActivitiesBadRequest$inboundSchema; + /** @deprecated use `CancelServerActivitiesBadRequest$outboundSchema` instead. */ + export const outboundSchema = CancelServerActivitiesBadRequest$outboundSchema; + /** @deprecated use `CancelServerActivitiesBadRequest$Outbound` instead. */ + export type Outbound = CancelServerActivitiesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/checkforupdates.ts b/src/sdk/models/errors/checkforupdates.ts index c6ec6aef..9e743dc6 100644 --- a/src/sdk/models/errors/checkforupdates.ts +++ b/src/sdk/models/errors/checkforupdates.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CheckForUpdatesUpdaterErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type CheckForUpdatesUpdaterResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CheckForUpdatesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class CheckForUpdatesUpdaterResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CheckForUpdatesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CheckForUpdatesUpdaterResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CheckForUpdatesUnauthorizedData; - constructor(err: CheckForUpdatesUpdaterResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CheckForUpdatesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CheckForUpdatesUpdaterResponseBody"; - } + this.name = "CheckForUpdatesUnauthorized"; + } } export type CheckForUpdatesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type CheckForUpdatesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CheckForUpdatesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class CheckForUpdatesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CheckForUpdatesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CheckForUpdatesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CheckForUpdatesBadRequestData; - constructor(err: CheckForUpdatesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CheckForUpdatesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CheckForUpdatesResponseBody"; - } + this.name = "CheckForUpdatesBadRequest"; + } } /** @internal */ export const CheckForUpdatesUpdaterErrors$inboundSchema: z.ZodType< - CheckForUpdatesUpdaterErrors, - z.ZodTypeDef, - unknown + CheckForUpdatesUpdaterErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CheckForUpdatesUpdaterErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CheckForUpdatesUpdaterErrors$outboundSchema: z.ZodType< - CheckForUpdatesUpdaterErrors$Outbound, - z.ZodTypeDef, - CheckForUpdatesUpdaterErrors + CheckForUpdatesUpdaterErrors$Outbound, + z.ZodTypeDef, + CheckForUpdatesUpdaterErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const CheckForUpdatesUpdaterErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckForUpdatesUpdaterErrors$ { - /** @deprecated use `CheckForUpdatesUpdaterErrors$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesUpdaterErrors$inboundSchema; - /** @deprecated use `CheckForUpdatesUpdaterErrors$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesUpdaterErrors$outboundSchema; - /** @deprecated use `CheckForUpdatesUpdaterErrors$Outbound` instead. */ - export type Outbound = CheckForUpdatesUpdaterErrors$Outbound; + /** @deprecated use `CheckForUpdatesUpdaterErrors$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesUpdaterErrors$inboundSchema; + /** @deprecated use `CheckForUpdatesUpdaterErrors$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesUpdaterErrors$outboundSchema; + /** @deprecated use `CheckForUpdatesUpdaterErrors$Outbound` instead. */ + export type Outbound = CheckForUpdatesUpdaterErrors$Outbound; } /** @internal */ -export const CheckForUpdatesUpdaterResponseBody$inboundSchema: z.ZodType< - CheckForUpdatesUpdaterResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => CheckForUpdatesUpdaterErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CheckForUpdatesUpdaterResponseBody(remapped); +export const CheckForUpdatesUnauthorized$inboundSchema: z.ZodType< + CheckForUpdatesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => CheckForUpdatesUpdaterErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CheckForUpdatesUnauthorized(remapped); + }); + /** @internal */ -export type CheckForUpdatesUpdaterResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CheckForUpdatesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CheckForUpdatesUpdaterResponseBody$outboundSchema: z.ZodType< - CheckForUpdatesUpdaterResponseBody$Outbound, - z.ZodTypeDef, - CheckForUpdatesUpdaterResponseBody -> = z - .instanceof(CheckForUpdatesUpdaterResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => CheckForUpdatesUpdaterErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CheckForUpdatesUnauthorized$outboundSchema: z.ZodType< + CheckForUpdatesUnauthorized$Outbound, + z.ZodTypeDef, + CheckForUpdatesUnauthorized +> = z.instanceof(CheckForUpdatesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => CheckForUpdatesUpdaterErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CheckForUpdatesUpdaterResponseBody$ { - /** @deprecated use `CheckForUpdatesUpdaterResponseBody$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesUpdaterResponseBody$inboundSchema; - /** @deprecated use `CheckForUpdatesUpdaterResponseBody$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesUpdaterResponseBody$outboundSchema; - /** @deprecated use `CheckForUpdatesUpdaterResponseBody$Outbound` instead. */ - export type Outbound = CheckForUpdatesUpdaterResponseBody$Outbound; +export namespace CheckForUpdatesUnauthorized$ { + /** @deprecated use `CheckForUpdatesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesUnauthorized$inboundSchema; + /** @deprecated use `CheckForUpdatesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesUnauthorized$outboundSchema; + /** @deprecated use `CheckForUpdatesUnauthorized$Outbound` instead. */ + export type Outbound = CheckForUpdatesUnauthorized$Outbound; } /** @internal */ export const CheckForUpdatesErrors$inboundSchema: z.ZodType< - CheckForUpdatesErrors, - z.ZodTypeDef, - unknown + CheckForUpdatesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CheckForUpdatesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CheckForUpdatesErrors$outboundSchema: z.ZodType< - CheckForUpdatesErrors$Outbound, - z.ZodTypeDef, - CheckForUpdatesErrors + CheckForUpdatesErrors$Outbound, + z.ZodTypeDef, + CheckForUpdatesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const CheckForUpdatesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckForUpdatesErrors$ { - /** @deprecated use `CheckForUpdatesErrors$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesErrors$inboundSchema; - /** @deprecated use `CheckForUpdatesErrors$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesErrors$outboundSchema; - /** @deprecated use `CheckForUpdatesErrors$Outbound` instead. */ - export type Outbound = CheckForUpdatesErrors$Outbound; + /** @deprecated use `CheckForUpdatesErrors$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesErrors$inboundSchema; + /** @deprecated use `CheckForUpdatesErrors$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesErrors$outboundSchema; + /** @deprecated use `CheckForUpdatesErrors$Outbound` instead. */ + export type Outbound = CheckForUpdatesErrors$Outbound; } /** @internal */ -export const CheckForUpdatesResponseBody$inboundSchema: z.ZodType< - CheckForUpdatesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => CheckForUpdatesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CheckForUpdatesResponseBody(remapped); +export const CheckForUpdatesBadRequest$inboundSchema: z.ZodType< + CheckForUpdatesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => CheckForUpdatesErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CheckForUpdatesBadRequest(remapped); + }); + /** @internal */ -export type CheckForUpdatesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CheckForUpdatesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CheckForUpdatesResponseBody$outboundSchema: z.ZodType< - CheckForUpdatesResponseBody$Outbound, - z.ZodTypeDef, - CheckForUpdatesResponseBody -> = z - .instanceof(CheckForUpdatesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => CheckForUpdatesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CheckForUpdatesBadRequest$outboundSchema: z.ZodType< + CheckForUpdatesBadRequest$Outbound, + z.ZodTypeDef, + CheckForUpdatesBadRequest +> = z.instanceof(CheckForUpdatesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => CheckForUpdatesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CheckForUpdatesResponseBody$ { - /** @deprecated use `CheckForUpdatesResponseBody$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesResponseBody$inboundSchema; - /** @deprecated use `CheckForUpdatesResponseBody$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesResponseBody$outboundSchema; - /** @deprecated use `CheckForUpdatesResponseBody$Outbound` instead. */ - export type Outbound = CheckForUpdatesResponseBody$Outbound; +export namespace CheckForUpdatesBadRequest$ { + /** @deprecated use `CheckForUpdatesBadRequest$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesBadRequest$inboundSchema; + /** @deprecated use `CheckForUpdatesBadRequest$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesBadRequest$outboundSchema; + /** @deprecated use `CheckForUpdatesBadRequest$Outbound` instead. */ + export type Outbound = CheckForUpdatesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/clearplaylistcontents.ts b/src/sdk/models/errors/clearplaylistcontents.ts index e54fc499..1d18924d 100644 --- a/src/sdk/models/errors/clearplaylistcontents.ts +++ b/src/sdk/models/errors/clearplaylistcontents.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ClearPlaylistContentsPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type ClearPlaylistContentsPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type ClearPlaylistContentsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class ClearPlaylistContentsPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class ClearPlaylistContentsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: ClearPlaylistContentsPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: ClearPlaylistContentsUnauthorizedData; - constructor(err: ClearPlaylistContentsPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: ClearPlaylistContentsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "ClearPlaylistContentsPlaylistsResponseBody"; - } + this.name = "ClearPlaylistContentsUnauthorized"; + } } export type ClearPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type ClearPlaylistContentsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type ClearPlaylistContentsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class ClearPlaylistContentsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class ClearPlaylistContentsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: ClearPlaylistContentsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: ClearPlaylistContentsBadRequestData; - constructor(err: ClearPlaylistContentsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: ClearPlaylistContentsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "ClearPlaylistContentsResponseBody"; - } + this.name = "ClearPlaylistContentsBadRequest"; + } } /** @internal */ export const ClearPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown + ClearPlaylistContentsPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type ClearPlaylistContentsPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const ClearPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsPlaylistsErrors + ClearPlaylistContentsPlaylistsErrors$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,104 @@ export const ClearPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ClearPlaylistContentsPlaylistsErrors$ { - /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsPlaylistsErrors$inboundSchema; - /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsPlaylistsErrors$outboundSchema; - /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsPlaylistsErrors$Outbound; + /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = + ClearPlaylistContentsPlaylistsErrors$inboundSchema; + /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = + ClearPlaylistContentsPlaylistsErrors$outboundSchema; + /** @deprecated use `ClearPlaylistContentsPlaylistsErrors$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsPlaylistsErrors$Outbound; } /** @internal */ -export const ClearPlaylistContentsPlaylistsResponseBody$inboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => ClearPlaylistContentsPlaylistsErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new ClearPlaylistContentsPlaylistsResponseBody(remapped); +export const ClearPlaylistContentsUnauthorized$inboundSchema: z.ZodType< + ClearPlaylistContentsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => ClearPlaylistContentsPlaylistsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new ClearPlaylistContentsUnauthorized(remapped); + }); + /** @internal */ -export type ClearPlaylistContentsPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type ClearPlaylistContentsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const ClearPlaylistContentsPlaylistsResponseBody$outboundSchema: z.ZodType< - ClearPlaylistContentsPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsPlaylistsResponseBody -> = z - .instanceof(ClearPlaylistContentsPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => ClearPlaylistContentsPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const ClearPlaylistContentsUnauthorized$outboundSchema: z.ZodType< + ClearPlaylistContentsUnauthorized$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsUnauthorized +> = z.instanceof(ClearPlaylistContentsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => ClearPlaylistContentsPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ClearPlaylistContentsPlaylistsResponseBody$ { - /** @deprecated use `ClearPlaylistContentsPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsPlaylistsResponseBody$inboundSchema; - /** @deprecated use `ClearPlaylistContentsPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsPlaylistsResponseBody$outboundSchema; - /** @deprecated use `ClearPlaylistContentsPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsPlaylistsResponseBody$Outbound; +export namespace ClearPlaylistContentsUnauthorized$ { + /** @deprecated use `ClearPlaylistContentsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistContentsUnauthorized$inboundSchema; + /** @deprecated use `ClearPlaylistContentsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + ClearPlaylistContentsUnauthorized$outboundSchema; + /** @deprecated use `ClearPlaylistContentsUnauthorized$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsUnauthorized$Outbound; } /** @internal */ export const ClearPlaylistContentsErrors$inboundSchema: z.ZodType< - ClearPlaylistContentsErrors, - z.ZodTypeDef, - unknown + ClearPlaylistContentsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type ClearPlaylistContentsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const ClearPlaylistContentsErrors$outboundSchema: z.ZodType< - ClearPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsErrors + ClearPlaylistContentsErrors$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,75 +232,68 @@ export const ClearPlaylistContentsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ClearPlaylistContentsErrors$ { - /** @deprecated use `ClearPlaylistContentsErrors$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsErrors$inboundSchema; - /** @deprecated use `ClearPlaylistContentsErrors$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsErrors$outboundSchema; - /** @deprecated use `ClearPlaylistContentsErrors$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsErrors$Outbound; + /** @deprecated use `ClearPlaylistContentsErrors$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistContentsErrors$inboundSchema; + /** @deprecated use `ClearPlaylistContentsErrors$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistContentsErrors$outboundSchema; + /** @deprecated use `ClearPlaylistContentsErrors$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsErrors$Outbound; } /** @internal */ -export const ClearPlaylistContentsResponseBody$inboundSchema: z.ZodType< - ClearPlaylistContentsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new ClearPlaylistContentsResponseBody(remapped); +export const ClearPlaylistContentsBadRequest$inboundSchema: z.ZodType< + ClearPlaylistContentsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new ClearPlaylistContentsBadRequest(remapped); + }); + /** @internal */ -export type ClearPlaylistContentsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type ClearPlaylistContentsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const ClearPlaylistContentsResponseBody$outboundSchema: z.ZodType< - ClearPlaylistContentsResponseBody$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsResponseBody -> = z - .instanceof(ClearPlaylistContentsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => ClearPlaylistContentsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const ClearPlaylistContentsBadRequest$outboundSchema: z.ZodType< + ClearPlaylistContentsBadRequest$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsBadRequest +> = z.instanceof(ClearPlaylistContentsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => ClearPlaylistContentsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace ClearPlaylistContentsResponseBody$ { - /** @deprecated use `ClearPlaylistContentsResponseBody$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsResponseBody$inboundSchema; - /** @deprecated use `ClearPlaylistContentsResponseBody$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsResponseBody$outboundSchema; - /** @deprecated use `ClearPlaylistContentsResponseBody$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsResponseBody$Outbound; +export namespace ClearPlaylistContentsBadRequest$ { + /** @deprecated use `ClearPlaylistContentsBadRequest$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistContentsBadRequest$inboundSchema; + /** @deprecated use `ClearPlaylistContentsBadRequest$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistContentsBadRequest$outboundSchema; + /** @deprecated use `ClearPlaylistContentsBadRequest$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/createplaylist.ts b/src/sdk/models/errors/createplaylist.ts index 739f46e9..d919689a 100644 --- a/src/sdk/models/errors/createplaylist.ts +++ b/src/sdk/models/errors/createplaylist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CreatePlaylistPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type CreatePlaylistPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CreatePlaylistUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class CreatePlaylistPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CreatePlaylistUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CreatePlaylistPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CreatePlaylistUnauthorizedData; - constructor(err: CreatePlaylistPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CreatePlaylistUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CreatePlaylistPlaylistsResponseBody"; - } + this.name = "CreatePlaylistUnauthorized"; + } } export type CreatePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type CreatePlaylistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type CreatePlaylistBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class CreatePlaylistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class CreatePlaylistBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: CreatePlaylistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: CreatePlaylistBadRequestData; - constructor(err: CreatePlaylistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: CreatePlaylistBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "CreatePlaylistResponseBody"; - } + this.name = "CreatePlaylistBadRequest"; + } } /** @internal */ export const CreatePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - CreatePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown + CreatePlaylistPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CreatePlaylistPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CreatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - CreatePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - CreatePlaylistPlaylistsErrors + CreatePlaylistPlaylistsErrors$Outbound, + z.ZodTypeDef, + CreatePlaylistPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const CreatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistPlaylistsErrors$ { - /** @deprecated use `CreatePlaylistPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistPlaylistsErrors$inboundSchema; - /** @deprecated use `CreatePlaylistPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistPlaylistsErrors$outboundSchema; - /** @deprecated use `CreatePlaylistPlaylistsErrors$Outbound` instead. */ - export type Outbound = CreatePlaylistPlaylistsErrors$Outbound; + /** @deprecated use `CreatePlaylistPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistPlaylistsErrors$inboundSchema; + /** @deprecated use `CreatePlaylistPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistPlaylistsErrors$outboundSchema; + /** @deprecated use `CreatePlaylistPlaylistsErrors$Outbound` instead. */ + export type Outbound = CreatePlaylistPlaylistsErrors$Outbound; } /** @internal */ -export const CreatePlaylistPlaylistsResponseBody$inboundSchema: z.ZodType< - CreatePlaylistPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => CreatePlaylistPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CreatePlaylistPlaylistsResponseBody(remapped); +export const CreatePlaylistUnauthorized$inboundSchema: z.ZodType< + CreatePlaylistUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => CreatePlaylistPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CreatePlaylistUnauthorized(remapped); + }); + /** @internal */ -export type CreatePlaylistPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CreatePlaylistUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CreatePlaylistPlaylistsResponseBody$outboundSchema: z.ZodType< - CreatePlaylistPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - CreatePlaylistPlaylistsResponseBody -> = z - .instanceof(CreatePlaylistPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => CreatePlaylistPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CreatePlaylistUnauthorized$outboundSchema: z.ZodType< + CreatePlaylistUnauthorized$Outbound, + z.ZodTypeDef, + CreatePlaylistUnauthorized +> = z.instanceof(CreatePlaylistUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => CreatePlaylistPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CreatePlaylistPlaylistsResponseBody$ { - /** @deprecated use `CreatePlaylistPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistPlaylistsResponseBody$inboundSchema; - /** @deprecated use `CreatePlaylistPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistPlaylistsResponseBody$outboundSchema; - /** @deprecated use `CreatePlaylistPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = CreatePlaylistPlaylistsResponseBody$Outbound; +export namespace CreatePlaylistUnauthorized$ { + /** @deprecated use `CreatePlaylistUnauthorized$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistUnauthorized$inboundSchema; + /** @deprecated use `CreatePlaylistUnauthorized$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistUnauthorized$outboundSchema; + /** @deprecated use `CreatePlaylistUnauthorized$Outbound` instead. */ + export type Outbound = CreatePlaylistUnauthorized$Outbound; } /** @internal */ export const CreatePlaylistErrors$inboundSchema: z.ZodType< - CreatePlaylistErrors, - z.ZodTypeDef, - unknown + CreatePlaylistErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type CreatePlaylistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const CreatePlaylistErrors$outboundSchema: z.ZodType< - CreatePlaylistErrors$Outbound, - z.ZodTypeDef, - CreatePlaylistErrors + CreatePlaylistErrors$Outbound, + z.ZodTypeDef, + CreatePlaylistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,67 @@ export const CreatePlaylistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistErrors$ { - /** @deprecated use `CreatePlaylistErrors$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistErrors$inboundSchema; - /** @deprecated use `CreatePlaylistErrors$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistErrors$outboundSchema; - /** @deprecated use `CreatePlaylistErrors$Outbound` instead. */ - export type Outbound = CreatePlaylistErrors$Outbound; + /** @deprecated use `CreatePlaylistErrors$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistErrors$inboundSchema; + /** @deprecated use `CreatePlaylistErrors$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistErrors$outboundSchema; + /** @deprecated use `CreatePlaylistErrors$Outbound` instead. */ + export type Outbound = CreatePlaylistErrors$Outbound; } /** @internal */ -export const CreatePlaylistResponseBody$inboundSchema: z.ZodType< - CreatePlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => CreatePlaylistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new CreatePlaylistResponseBody(remapped); +export const CreatePlaylistBadRequest$inboundSchema: z.ZodType< + CreatePlaylistBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => CreatePlaylistErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new CreatePlaylistBadRequest(remapped); + }); + /** @internal */ -export type CreatePlaylistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type CreatePlaylistBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const CreatePlaylistResponseBody$outboundSchema: z.ZodType< - CreatePlaylistResponseBody$Outbound, - z.ZodTypeDef, - CreatePlaylistResponseBody -> = z - .instanceof(CreatePlaylistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => CreatePlaylistErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const CreatePlaylistBadRequest$outboundSchema: z.ZodType< + CreatePlaylistBadRequest$Outbound, + z.ZodTypeDef, + CreatePlaylistBadRequest +> = z.instanceof(CreatePlaylistBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => CreatePlaylistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace CreatePlaylistResponseBody$ { - /** @deprecated use `CreatePlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistResponseBody$inboundSchema; - /** @deprecated use `CreatePlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistResponseBody$outboundSchema; - /** @deprecated use `CreatePlaylistResponseBody$Outbound` instead. */ - export type Outbound = CreatePlaylistResponseBody$Outbound; +export namespace CreatePlaylistBadRequest$ { + /** @deprecated use `CreatePlaylistBadRequest$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistBadRequest$inboundSchema; + /** @deprecated use `CreatePlaylistBadRequest$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistBadRequest$outboundSchema; + /** @deprecated use `CreatePlaylistBadRequest$Outbound` instead. */ + export type Outbound = CreatePlaylistBadRequest$Outbound; } diff --git a/src/sdk/models/errors/deletelibrary.ts b/src/sdk/models/errors/deletelibrary.ts index 2bee4000..7cc53d00 100644 --- a/src/sdk/models/errors/deletelibrary.ts +++ b/src/sdk/models/errors/deletelibrary.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteLibraryLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type DeleteLibraryLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type DeleteLibraryUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class DeleteLibraryLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class DeleteLibraryUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: DeleteLibraryLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: DeleteLibraryUnauthorizedData; - constructor(err: DeleteLibraryLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: DeleteLibraryUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "DeleteLibraryLibraryResponseBody"; - } + this.name = "DeleteLibraryUnauthorized"; + } } export type DeleteLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type DeleteLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type DeleteLibraryBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class DeleteLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class DeleteLibraryBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: DeleteLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: DeleteLibraryBadRequestData; - constructor(err: DeleteLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: DeleteLibraryBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "DeleteLibraryResponseBody"; - } + this.name = "DeleteLibraryBadRequest"; + } } /** @internal */ export const DeleteLibraryLibraryErrors$inboundSchema: z.ZodType< - DeleteLibraryLibraryErrors, - z.ZodTypeDef, - unknown + DeleteLibraryLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type DeleteLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const DeleteLibraryLibraryErrors$outboundSchema: z.ZodType< - DeleteLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - DeleteLibraryLibraryErrors + DeleteLibraryLibraryErrors$Outbound, + z.ZodTypeDef, + DeleteLibraryLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const DeleteLibraryLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteLibraryLibraryErrors$ { - /** @deprecated use `DeleteLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryLibraryErrors$inboundSchema; - /** @deprecated use `DeleteLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryLibraryErrors$outboundSchema; - /** @deprecated use `DeleteLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = DeleteLibraryLibraryErrors$Outbound; + /** @deprecated use `DeleteLibraryLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryLibraryErrors$inboundSchema; + /** @deprecated use `DeleteLibraryLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryLibraryErrors$outboundSchema; + /** @deprecated use `DeleteLibraryLibraryErrors$Outbound` instead. */ + export type Outbound = DeleteLibraryLibraryErrors$Outbound; } /** @internal */ -export const DeleteLibraryLibraryResponseBody$inboundSchema: z.ZodType< - DeleteLibraryLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => DeleteLibraryLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new DeleteLibraryLibraryResponseBody(remapped); +export const DeleteLibraryUnauthorized$inboundSchema: z.ZodType< + DeleteLibraryUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => DeleteLibraryLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new DeleteLibraryUnauthorized(remapped); + }); + /** @internal */ -export type DeleteLibraryLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type DeleteLibraryUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const DeleteLibraryLibraryResponseBody$outboundSchema: z.ZodType< - DeleteLibraryLibraryResponseBody$Outbound, - z.ZodTypeDef, - DeleteLibraryLibraryResponseBody -> = z - .instanceof(DeleteLibraryLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => DeleteLibraryLibraryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const DeleteLibraryUnauthorized$outboundSchema: z.ZodType< + DeleteLibraryUnauthorized$Outbound, + z.ZodTypeDef, + DeleteLibraryUnauthorized +> = z.instanceof(DeleteLibraryUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => DeleteLibraryLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeleteLibraryLibraryResponseBody$ { - /** @deprecated use `DeleteLibraryLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryLibraryResponseBody$inboundSchema; - /** @deprecated use `DeleteLibraryLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryLibraryResponseBody$outboundSchema; - /** @deprecated use `DeleteLibraryLibraryResponseBody$Outbound` instead. */ - export type Outbound = DeleteLibraryLibraryResponseBody$Outbound; +export namespace DeleteLibraryUnauthorized$ { + /** @deprecated use `DeleteLibraryUnauthorized$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryUnauthorized$inboundSchema; + /** @deprecated use `DeleteLibraryUnauthorized$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryUnauthorized$outboundSchema; + /** @deprecated use `DeleteLibraryUnauthorized$Outbound` instead. */ + export type Outbound = DeleteLibraryUnauthorized$Outbound; } /** @internal */ export const DeleteLibraryErrors$inboundSchema: z.ZodType< - DeleteLibraryErrors, - z.ZodTypeDef, - unknown + DeleteLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type DeleteLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const DeleteLibraryErrors$outboundSchema: z.ZodType< - DeleteLibraryErrors$Outbound, - z.ZodTypeDef, - DeleteLibraryErrors + DeleteLibraryErrors$Outbound, + z.ZodTypeDef, + DeleteLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const DeleteLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteLibraryErrors$ { - /** @deprecated use `DeleteLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryErrors$inboundSchema; - /** @deprecated use `DeleteLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryErrors$outboundSchema; - /** @deprecated use `DeleteLibraryErrors$Outbound` instead. */ - export type Outbound = DeleteLibraryErrors$Outbound; + /** @deprecated use `DeleteLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryErrors$inboundSchema; + /** @deprecated use `DeleteLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryErrors$outboundSchema; + /** @deprecated use `DeleteLibraryErrors$Outbound` instead. */ + export type Outbound = DeleteLibraryErrors$Outbound; } /** @internal */ -export const DeleteLibraryResponseBody$inboundSchema: z.ZodType< - DeleteLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => DeleteLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new DeleteLibraryResponseBody(remapped); +export const DeleteLibraryBadRequest$inboundSchema: z.ZodType< + DeleteLibraryBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => DeleteLibraryErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new DeleteLibraryBadRequest(remapped); + }); + /** @internal */ -export type DeleteLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type DeleteLibraryBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const DeleteLibraryResponseBody$outboundSchema: z.ZodType< - DeleteLibraryResponseBody$Outbound, - z.ZodTypeDef, - DeleteLibraryResponseBody -> = z - .instanceof(DeleteLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => DeleteLibraryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const DeleteLibraryBadRequest$outboundSchema: z.ZodType< + DeleteLibraryBadRequest$Outbound, + z.ZodTypeDef, + DeleteLibraryBadRequest +> = z.instanceof(DeleteLibraryBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => DeleteLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeleteLibraryResponseBody$ { - /** @deprecated use `DeleteLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryResponseBody$inboundSchema; - /** @deprecated use `DeleteLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryResponseBody$outboundSchema; - /** @deprecated use `DeleteLibraryResponseBody$Outbound` instead. */ - export type Outbound = DeleteLibraryResponseBody$Outbound; +export namespace DeleteLibraryBadRequest$ { + /** @deprecated use `DeleteLibraryBadRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryBadRequest$inboundSchema; + /** @deprecated use `DeleteLibraryBadRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryBadRequest$outboundSchema; + /** @deprecated use `DeleteLibraryBadRequest$Outbound` instead. */ + export type Outbound = DeleteLibraryBadRequest$Outbound; } diff --git a/src/sdk/models/errors/deleteplaylist.ts b/src/sdk/models/errors/deleteplaylist.ts index 42e09ed1..bce0ab8c 100644 --- a/src/sdk/models/errors/deleteplaylist.ts +++ b/src/sdk/models/errors/deleteplaylist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeletePlaylistPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type DeletePlaylistPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type DeletePlaylistUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class DeletePlaylistPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class DeletePlaylistUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: DeletePlaylistPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: DeletePlaylistUnauthorizedData; - constructor(err: DeletePlaylistPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: DeletePlaylistUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "DeletePlaylistPlaylistsResponseBody"; - } + this.name = "DeletePlaylistUnauthorized"; + } } export type DeletePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type DeletePlaylistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type DeletePlaylistBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class DeletePlaylistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class DeletePlaylistBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: DeletePlaylistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: DeletePlaylistBadRequestData; - constructor(err: DeletePlaylistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: DeletePlaylistBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "DeletePlaylistResponseBody"; - } + this.name = "DeletePlaylistBadRequest"; + } } /** @internal */ export const DeletePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - DeletePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown + DeletePlaylistPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type DeletePlaylistPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const DeletePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - DeletePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - DeletePlaylistPlaylistsErrors + DeletePlaylistPlaylistsErrors$Outbound, + z.ZodTypeDef, + DeletePlaylistPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const DeletePlaylistPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePlaylistPlaylistsErrors$ { - /** @deprecated use `DeletePlaylistPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistPlaylistsErrors$inboundSchema; - /** @deprecated use `DeletePlaylistPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistPlaylistsErrors$outboundSchema; - /** @deprecated use `DeletePlaylistPlaylistsErrors$Outbound` instead. */ - export type Outbound = DeletePlaylistPlaylistsErrors$Outbound; + /** @deprecated use `DeletePlaylistPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistPlaylistsErrors$inboundSchema; + /** @deprecated use `DeletePlaylistPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistPlaylistsErrors$outboundSchema; + /** @deprecated use `DeletePlaylistPlaylistsErrors$Outbound` instead. */ + export type Outbound = DeletePlaylistPlaylistsErrors$Outbound; } /** @internal */ -export const DeletePlaylistPlaylistsResponseBody$inboundSchema: z.ZodType< - DeletePlaylistPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => DeletePlaylistPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new DeletePlaylistPlaylistsResponseBody(remapped); +export const DeletePlaylistUnauthorized$inboundSchema: z.ZodType< + DeletePlaylistUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => DeletePlaylistPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new DeletePlaylistUnauthorized(remapped); + }); + /** @internal */ -export type DeletePlaylistPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type DeletePlaylistUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const DeletePlaylistPlaylistsResponseBody$outboundSchema: z.ZodType< - DeletePlaylistPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - DeletePlaylistPlaylistsResponseBody -> = z - .instanceof(DeletePlaylistPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => DeletePlaylistPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const DeletePlaylistUnauthorized$outboundSchema: z.ZodType< + DeletePlaylistUnauthorized$Outbound, + z.ZodTypeDef, + DeletePlaylistUnauthorized +> = z.instanceof(DeletePlaylistUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => DeletePlaylistPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeletePlaylistPlaylistsResponseBody$ { - /** @deprecated use `DeletePlaylistPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistPlaylistsResponseBody$inboundSchema; - /** @deprecated use `DeletePlaylistPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistPlaylistsResponseBody$outboundSchema; - /** @deprecated use `DeletePlaylistPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = DeletePlaylistPlaylistsResponseBody$Outbound; +export namespace DeletePlaylistUnauthorized$ { + /** @deprecated use `DeletePlaylistUnauthorized$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistUnauthorized$inboundSchema; + /** @deprecated use `DeletePlaylistUnauthorized$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistUnauthorized$outboundSchema; + /** @deprecated use `DeletePlaylistUnauthorized$Outbound` instead. */ + export type Outbound = DeletePlaylistUnauthorized$Outbound; } /** @internal */ export const DeletePlaylistErrors$inboundSchema: z.ZodType< - DeletePlaylistErrors, - z.ZodTypeDef, - unknown + DeletePlaylistErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type DeletePlaylistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const DeletePlaylistErrors$outboundSchema: z.ZodType< - DeletePlaylistErrors$Outbound, - z.ZodTypeDef, - DeletePlaylistErrors + DeletePlaylistErrors$Outbound, + z.ZodTypeDef, + DeletePlaylistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,67 @@ export const DeletePlaylistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePlaylistErrors$ { - /** @deprecated use `DeletePlaylistErrors$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistErrors$inboundSchema; - /** @deprecated use `DeletePlaylistErrors$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistErrors$outboundSchema; - /** @deprecated use `DeletePlaylistErrors$Outbound` instead. */ - export type Outbound = DeletePlaylistErrors$Outbound; + /** @deprecated use `DeletePlaylistErrors$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistErrors$inboundSchema; + /** @deprecated use `DeletePlaylistErrors$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistErrors$outboundSchema; + /** @deprecated use `DeletePlaylistErrors$Outbound` instead. */ + export type Outbound = DeletePlaylistErrors$Outbound; } /** @internal */ -export const DeletePlaylistResponseBody$inboundSchema: z.ZodType< - DeletePlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => DeletePlaylistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new DeletePlaylistResponseBody(remapped); +export const DeletePlaylistBadRequest$inboundSchema: z.ZodType< + DeletePlaylistBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => DeletePlaylistErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new DeletePlaylistBadRequest(remapped); + }); + /** @internal */ -export type DeletePlaylistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type DeletePlaylistBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const DeletePlaylistResponseBody$outboundSchema: z.ZodType< - DeletePlaylistResponseBody$Outbound, - z.ZodTypeDef, - DeletePlaylistResponseBody -> = z - .instanceof(DeletePlaylistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => DeletePlaylistErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const DeletePlaylistBadRequest$outboundSchema: z.ZodType< + DeletePlaylistBadRequest$Outbound, + z.ZodTypeDef, + DeletePlaylistBadRequest +> = z.instanceof(DeletePlaylistBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => DeletePlaylistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace DeletePlaylistResponseBody$ { - /** @deprecated use `DeletePlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistResponseBody$inboundSchema; - /** @deprecated use `DeletePlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistResponseBody$outboundSchema; - /** @deprecated use `DeletePlaylistResponseBody$Outbound` instead. */ - export type Outbound = DeletePlaylistResponseBody$Outbound; +export namespace DeletePlaylistBadRequest$ { + /** @deprecated use `DeletePlaylistBadRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistBadRequest$inboundSchema; + /** @deprecated use `DeletePlaylistBadRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistBadRequest$outboundSchema; + /** @deprecated use `DeletePlaylistBadRequest$Outbound` instead. */ + export type Outbound = DeletePlaylistBadRequest$Outbound; } diff --git a/src/sdk/models/errors/enablepapertrail.ts b/src/sdk/models/errors/enablepapertrail.ts index a68216a0..5c0b3866 100644 --- a/src/sdk/models/errors/enablepapertrail.ts +++ b/src/sdk/models/errors/enablepapertrail.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type EnablePaperTrailLogErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type EnablePaperTrailLogResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type EnablePaperTrailUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class EnablePaperTrailLogResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class EnablePaperTrailUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: EnablePaperTrailLogResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: EnablePaperTrailUnauthorizedData; - constructor(err: EnablePaperTrailLogResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: EnablePaperTrailUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "EnablePaperTrailLogResponseBody"; - } + this.name = "EnablePaperTrailUnauthorized"; + } } export type EnablePaperTrailErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type EnablePaperTrailResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type EnablePaperTrailBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class EnablePaperTrailResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class EnablePaperTrailBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: EnablePaperTrailResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: EnablePaperTrailBadRequestData; - constructor(err: EnablePaperTrailResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: EnablePaperTrailBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "EnablePaperTrailResponseBody"; - } + this.name = "EnablePaperTrailBadRequest"; + } } /** @internal */ export const EnablePaperTrailLogErrors$inboundSchema: z.ZodType< - EnablePaperTrailLogErrors, - z.ZodTypeDef, - unknown + EnablePaperTrailLogErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type EnablePaperTrailLogErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const EnablePaperTrailLogErrors$outboundSchema: z.ZodType< - EnablePaperTrailLogErrors$Outbound, - z.ZodTypeDef, - EnablePaperTrailLogErrors + EnablePaperTrailLogErrors$Outbound, + z.ZodTypeDef, + EnablePaperTrailLogErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const EnablePaperTrailLogErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EnablePaperTrailLogErrors$ { - /** @deprecated use `EnablePaperTrailLogErrors$inboundSchema` instead. */ - export const inboundSchema = EnablePaperTrailLogErrors$inboundSchema; - /** @deprecated use `EnablePaperTrailLogErrors$outboundSchema` instead. */ - export const outboundSchema = EnablePaperTrailLogErrors$outboundSchema; - /** @deprecated use `EnablePaperTrailLogErrors$Outbound` instead. */ - export type Outbound = EnablePaperTrailLogErrors$Outbound; + /** @deprecated use `EnablePaperTrailLogErrors$inboundSchema` instead. */ + export const inboundSchema = EnablePaperTrailLogErrors$inboundSchema; + /** @deprecated use `EnablePaperTrailLogErrors$outboundSchema` instead. */ + export const outboundSchema = EnablePaperTrailLogErrors$outboundSchema; + /** @deprecated use `EnablePaperTrailLogErrors$Outbound` instead. */ + export type Outbound = EnablePaperTrailLogErrors$Outbound; } /** @internal */ -export const EnablePaperTrailLogResponseBody$inboundSchema: z.ZodType< - EnablePaperTrailLogResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => EnablePaperTrailLogErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new EnablePaperTrailLogResponseBody(remapped); +export const EnablePaperTrailUnauthorized$inboundSchema: z.ZodType< + EnablePaperTrailUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => EnablePaperTrailLogErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new EnablePaperTrailUnauthorized(remapped); + }); + /** @internal */ -export type EnablePaperTrailLogResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type EnablePaperTrailUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const EnablePaperTrailLogResponseBody$outboundSchema: z.ZodType< - EnablePaperTrailLogResponseBody$Outbound, - z.ZodTypeDef, - EnablePaperTrailLogResponseBody -> = z - .instanceof(EnablePaperTrailLogResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => EnablePaperTrailLogErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const EnablePaperTrailUnauthorized$outboundSchema: z.ZodType< + EnablePaperTrailUnauthorized$Outbound, + z.ZodTypeDef, + EnablePaperTrailUnauthorized +> = z.instanceof(EnablePaperTrailUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => EnablePaperTrailLogErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace EnablePaperTrailLogResponseBody$ { - /** @deprecated use `EnablePaperTrailLogResponseBody$inboundSchema` instead. */ - export const inboundSchema = EnablePaperTrailLogResponseBody$inboundSchema; - /** @deprecated use `EnablePaperTrailLogResponseBody$outboundSchema` instead. */ - export const outboundSchema = EnablePaperTrailLogResponseBody$outboundSchema; - /** @deprecated use `EnablePaperTrailLogResponseBody$Outbound` instead. */ - export type Outbound = EnablePaperTrailLogResponseBody$Outbound; +export namespace EnablePaperTrailUnauthorized$ { + /** @deprecated use `EnablePaperTrailUnauthorized$inboundSchema` instead. */ + export const inboundSchema = EnablePaperTrailUnauthorized$inboundSchema; + /** @deprecated use `EnablePaperTrailUnauthorized$outboundSchema` instead. */ + export const outboundSchema = EnablePaperTrailUnauthorized$outboundSchema; + /** @deprecated use `EnablePaperTrailUnauthorized$Outbound` instead. */ + export type Outbound = EnablePaperTrailUnauthorized$Outbound; } /** @internal */ export const EnablePaperTrailErrors$inboundSchema: z.ZodType< - EnablePaperTrailErrors, - z.ZodTypeDef, - unknown + EnablePaperTrailErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type EnablePaperTrailErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const EnablePaperTrailErrors$outboundSchema: z.ZodType< - EnablePaperTrailErrors$Outbound, - z.ZodTypeDef, - EnablePaperTrailErrors + EnablePaperTrailErrors$Outbound, + z.ZodTypeDef, + EnablePaperTrailErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,68 @@ export const EnablePaperTrailErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EnablePaperTrailErrors$ { - /** @deprecated use `EnablePaperTrailErrors$inboundSchema` instead. */ - export const inboundSchema = EnablePaperTrailErrors$inboundSchema; - /** @deprecated use `EnablePaperTrailErrors$outboundSchema` instead. */ - export const outboundSchema = EnablePaperTrailErrors$outboundSchema; - /** @deprecated use `EnablePaperTrailErrors$Outbound` instead. */ - export type Outbound = EnablePaperTrailErrors$Outbound; + /** @deprecated use `EnablePaperTrailErrors$inboundSchema` instead. */ + export const inboundSchema = EnablePaperTrailErrors$inboundSchema; + /** @deprecated use `EnablePaperTrailErrors$outboundSchema` instead. */ + export const outboundSchema = EnablePaperTrailErrors$outboundSchema; + /** @deprecated use `EnablePaperTrailErrors$Outbound` instead. */ + export type Outbound = EnablePaperTrailErrors$Outbound; } /** @internal */ -export const EnablePaperTrailResponseBody$inboundSchema: z.ZodType< - EnablePaperTrailResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => EnablePaperTrailErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new EnablePaperTrailResponseBody(remapped); +export const EnablePaperTrailBadRequest$inboundSchema: z.ZodType< + EnablePaperTrailBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => EnablePaperTrailErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new EnablePaperTrailBadRequest(remapped); + }); + /** @internal */ -export type EnablePaperTrailResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type EnablePaperTrailBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const EnablePaperTrailResponseBody$outboundSchema: z.ZodType< - EnablePaperTrailResponseBody$Outbound, - z.ZodTypeDef, - EnablePaperTrailResponseBody -> = z - .instanceof(EnablePaperTrailResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => EnablePaperTrailErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const EnablePaperTrailBadRequest$outboundSchema: z.ZodType< + EnablePaperTrailBadRequest$Outbound, + z.ZodTypeDef, + EnablePaperTrailBadRequest +> = z.instanceof(EnablePaperTrailBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => EnablePaperTrailErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace EnablePaperTrailResponseBody$ { - /** @deprecated use `EnablePaperTrailResponseBody$inboundSchema` instead. */ - export const inboundSchema = EnablePaperTrailResponseBody$inboundSchema; - /** @deprecated use `EnablePaperTrailResponseBody$outboundSchema` instead. */ - export const outboundSchema = EnablePaperTrailResponseBody$outboundSchema; - /** @deprecated use `EnablePaperTrailResponseBody$Outbound` instead. */ - export type Outbound = EnablePaperTrailResponseBody$Outbound; +export namespace EnablePaperTrailBadRequest$ { + /** @deprecated use `EnablePaperTrailBadRequest$inboundSchema` instead. */ + export const inboundSchema = EnablePaperTrailBadRequest$inboundSchema; + /** @deprecated use `EnablePaperTrailBadRequest$outboundSchema` instead. */ + export const outboundSchema = EnablePaperTrailBadRequest$outboundSchema; + /** @deprecated use `EnablePaperTrailBadRequest$Outbound` instead. */ + export type Outbound = EnablePaperTrailBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getalllibraries.ts b/src/sdk/models/errors/getalllibraries.ts index 79ab7c28..5207d802 100644 --- a/src/sdk/models/errors/getalllibraries.ts +++ b/src/sdk/models/errors/getalllibraries.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetAllLibrariesLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetAllLibrariesLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetAllLibrariesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetAllLibrariesLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetAllLibrariesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetAllLibrariesLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetAllLibrariesUnauthorizedData; - constructor(err: GetAllLibrariesLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetAllLibrariesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetAllLibrariesLibraryResponseBody"; - } + this.name = "GetAllLibrariesUnauthorized"; + } } export type GetAllLibrariesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetAllLibrariesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetAllLibrariesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetAllLibrariesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetAllLibrariesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetAllLibrariesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetAllLibrariesBadRequestData; - constructor(err: GetAllLibrariesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetAllLibrariesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetAllLibrariesResponseBody"; - } + this.name = "GetAllLibrariesBadRequest"; + } } /** @internal */ export const GetAllLibrariesLibraryErrors$inboundSchema: z.ZodType< - GetAllLibrariesLibraryErrors, - z.ZodTypeDef, - unknown + GetAllLibrariesLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetAllLibrariesLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetAllLibrariesLibraryErrors$outboundSchema: z.ZodType< - GetAllLibrariesLibraryErrors$Outbound, - z.ZodTypeDef, - GetAllLibrariesLibraryErrors + GetAllLibrariesLibraryErrors$Outbound, + z.ZodTypeDef, + GetAllLibrariesLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetAllLibrariesLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesLibraryErrors$ { - /** @deprecated use `GetAllLibrariesLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesLibraryErrors$inboundSchema; - /** @deprecated use `GetAllLibrariesLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesLibraryErrors$outboundSchema; - /** @deprecated use `GetAllLibrariesLibraryErrors$Outbound` instead. */ - export type Outbound = GetAllLibrariesLibraryErrors$Outbound; + /** @deprecated use `GetAllLibrariesLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesLibraryErrors$inboundSchema; + /** @deprecated use `GetAllLibrariesLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesLibraryErrors$outboundSchema; + /** @deprecated use `GetAllLibrariesLibraryErrors$Outbound` instead. */ + export type Outbound = GetAllLibrariesLibraryErrors$Outbound; } /** @internal */ -export const GetAllLibrariesLibraryResponseBody$inboundSchema: z.ZodType< - GetAllLibrariesLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetAllLibrariesLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetAllLibrariesLibraryResponseBody(remapped); +export const GetAllLibrariesUnauthorized$inboundSchema: z.ZodType< + GetAllLibrariesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetAllLibrariesLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetAllLibrariesUnauthorized(remapped); + }); + /** @internal */ -export type GetAllLibrariesLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetAllLibrariesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetAllLibrariesLibraryResponseBody$outboundSchema: z.ZodType< - GetAllLibrariesLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetAllLibrariesLibraryResponseBody -> = z - .instanceof(GetAllLibrariesLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetAllLibrariesLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetAllLibrariesUnauthorized$outboundSchema: z.ZodType< + GetAllLibrariesUnauthorized$Outbound, + z.ZodTypeDef, + GetAllLibrariesUnauthorized +> = z.instanceof(GetAllLibrariesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetAllLibrariesLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetAllLibrariesLibraryResponseBody$ { - /** @deprecated use `GetAllLibrariesLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesLibraryResponseBody$inboundSchema; - /** @deprecated use `GetAllLibrariesLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesLibraryResponseBody$outboundSchema; - /** @deprecated use `GetAllLibrariesLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetAllLibrariesLibraryResponseBody$Outbound; +export namespace GetAllLibrariesUnauthorized$ { + /** @deprecated use `GetAllLibrariesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesUnauthorized$inboundSchema; + /** @deprecated use `GetAllLibrariesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesUnauthorized$outboundSchema; + /** @deprecated use `GetAllLibrariesUnauthorized$Outbound` instead. */ + export type Outbound = GetAllLibrariesUnauthorized$Outbound; } /** @internal */ export const GetAllLibrariesErrors$inboundSchema: z.ZodType< - GetAllLibrariesErrors, - z.ZodTypeDef, - unknown + GetAllLibrariesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetAllLibrariesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetAllLibrariesErrors$outboundSchema: z.ZodType< - GetAllLibrariesErrors$Outbound, - z.ZodTypeDef, - GetAllLibrariesErrors + GetAllLibrariesErrors$Outbound, + z.ZodTypeDef, + GetAllLibrariesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetAllLibrariesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesErrors$ { - /** @deprecated use `GetAllLibrariesErrors$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesErrors$inboundSchema; - /** @deprecated use `GetAllLibrariesErrors$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesErrors$outboundSchema; - /** @deprecated use `GetAllLibrariesErrors$Outbound` instead. */ - export type Outbound = GetAllLibrariesErrors$Outbound; + /** @deprecated use `GetAllLibrariesErrors$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesErrors$inboundSchema; + /** @deprecated use `GetAllLibrariesErrors$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesErrors$outboundSchema; + /** @deprecated use `GetAllLibrariesErrors$Outbound` instead. */ + export type Outbound = GetAllLibrariesErrors$Outbound; } /** @internal */ -export const GetAllLibrariesResponseBody$inboundSchema: z.ZodType< - GetAllLibrariesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetAllLibrariesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetAllLibrariesResponseBody(remapped); +export const GetAllLibrariesBadRequest$inboundSchema: z.ZodType< + GetAllLibrariesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetAllLibrariesErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetAllLibrariesBadRequest(remapped); + }); + /** @internal */ -export type GetAllLibrariesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetAllLibrariesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetAllLibrariesResponseBody$outboundSchema: z.ZodType< - GetAllLibrariesResponseBody$Outbound, - z.ZodTypeDef, - GetAllLibrariesResponseBody -> = z - .instanceof(GetAllLibrariesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetAllLibrariesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetAllLibrariesBadRequest$outboundSchema: z.ZodType< + GetAllLibrariesBadRequest$Outbound, + z.ZodTypeDef, + GetAllLibrariesBadRequest +> = z.instanceof(GetAllLibrariesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetAllLibrariesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetAllLibrariesResponseBody$ { - /** @deprecated use `GetAllLibrariesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesResponseBody$inboundSchema; - /** @deprecated use `GetAllLibrariesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesResponseBody$outboundSchema; - /** @deprecated use `GetAllLibrariesResponseBody$Outbound` instead. */ - export type Outbound = GetAllLibrariesResponseBody$Outbound; +export namespace GetAllLibrariesBadRequest$ { + /** @deprecated use `GetAllLibrariesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesBadRequest$inboundSchema; + /** @deprecated use `GetAllLibrariesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesBadRequest$outboundSchema; + /** @deprecated use `GetAllLibrariesBadRequest$Outbound` instead. */ + export type Outbound = GetAllLibrariesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getavailableclients.ts b/src/sdk/models/errors/getavailableclients.ts index 68865f55..d5125e9c 100644 --- a/src/sdk/models/errors/getavailableclients.ts +++ b/src/sdk/models/errors/getavailableclients.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetAvailableClientsServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetAvailableClientsServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetAvailableClientsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetAvailableClientsServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetAvailableClientsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetAvailableClientsServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetAvailableClientsUnauthorizedData; - constructor(err: GetAvailableClientsServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetAvailableClientsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetAvailableClientsServerResponseBody"; - } + this.name = "GetAvailableClientsUnauthorized"; + } } export type GetAvailableClientsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetAvailableClientsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetAvailableClientsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetAvailableClientsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetAvailableClientsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetAvailableClientsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetAvailableClientsBadRequestData; - constructor(err: GetAvailableClientsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetAvailableClientsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetAvailableClientsResponseBody"; - } + this.name = "GetAvailableClientsBadRequest"; + } } /** @internal */ export const GetAvailableClientsServerErrors$inboundSchema: z.ZodType< - GetAvailableClientsServerErrors, - z.ZodTypeDef, - unknown + GetAvailableClientsServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetAvailableClientsServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetAvailableClientsServerErrors$outboundSchema: z.ZodType< - GetAvailableClientsServerErrors$Outbound, - z.ZodTypeDef, - GetAvailableClientsServerErrors + GetAvailableClientsServerErrors$Outbound, + z.ZodTypeDef, + GetAvailableClientsServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetAvailableClientsServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableClientsServerErrors$ { - /** @deprecated use `GetAvailableClientsServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsServerErrors$inboundSchema; - /** @deprecated use `GetAvailableClientsServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsServerErrors$outboundSchema; - /** @deprecated use `GetAvailableClientsServerErrors$Outbound` instead. */ - export type Outbound = GetAvailableClientsServerErrors$Outbound; + /** @deprecated use `GetAvailableClientsServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsServerErrors$inboundSchema; + /** @deprecated use `GetAvailableClientsServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsServerErrors$outboundSchema; + /** @deprecated use `GetAvailableClientsServerErrors$Outbound` instead. */ + export type Outbound = GetAvailableClientsServerErrors$Outbound; } /** @internal */ -export const GetAvailableClientsServerResponseBody$inboundSchema: z.ZodType< - GetAvailableClientsServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetAvailableClientsServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetAvailableClientsServerResponseBody(remapped); +export const GetAvailableClientsUnauthorized$inboundSchema: z.ZodType< + GetAvailableClientsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetAvailableClientsServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetAvailableClientsUnauthorized(remapped); + }); + /** @internal */ -export type GetAvailableClientsServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetAvailableClientsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetAvailableClientsServerResponseBody$outboundSchema: z.ZodType< - GetAvailableClientsServerResponseBody$Outbound, - z.ZodTypeDef, - GetAvailableClientsServerResponseBody -> = z - .instanceof(GetAvailableClientsServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetAvailableClientsServerErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetAvailableClientsUnauthorized$outboundSchema: z.ZodType< + GetAvailableClientsUnauthorized$Outbound, + z.ZodTypeDef, + GetAvailableClientsUnauthorized +> = z.instanceof(GetAvailableClientsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetAvailableClientsServerErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetAvailableClientsServerResponseBody$ { - /** @deprecated use `GetAvailableClientsServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsServerResponseBody$inboundSchema; - /** @deprecated use `GetAvailableClientsServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsServerResponseBody$outboundSchema; - /** @deprecated use `GetAvailableClientsServerResponseBody$Outbound` instead. */ - export type Outbound = GetAvailableClientsServerResponseBody$Outbound; +export namespace GetAvailableClientsUnauthorized$ { + /** @deprecated use `GetAvailableClientsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsUnauthorized$inboundSchema; + /** @deprecated use `GetAvailableClientsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsUnauthorized$outboundSchema; + /** @deprecated use `GetAvailableClientsUnauthorized$Outbound` instead. */ + export type Outbound = GetAvailableClientsUnauthorized$Outbound; } /** @internal */ export const GetAvailableClientsErrors$inboundSchema: z.ZodType< - GetAvailableClientsErrors, - z.ZodTypeDef, - unknown + GetAvailableClientsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetAvailableClientsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetAvailableClientsErrors$outboundSchema: z.ZodType< - GetAvailableClientsErrors$Outbound, - z.ZodTypeDef, - GetAvailableClientsErrors + GetAvailableClientsErrors$Outbound, + z.ZodTypeDef, + GetAvailableClientsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetAvailableClientsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableClientsErrors$ { - /** @deprecated use `GetAvailableClientsErrors$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsErrors$inboundSchema; - /** @deprecated use `GetAvailableClientsErrors$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsErrors$outboundSchema; - /** @deprecated use `GetAvailableClientsErrors$Outbound` instead. */ - export type Outbound = GetAvailableClientsErrors$Outbound; + /** @deprecated use `GetAvailableClientsErrors$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsErrors$inboundSchema; + /** @deprecated use `GetAvailableClientsErrors$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsErrors$outboundSchema; + /** @deprecated use `GetAvailableClientsErrors$Outbound` instead. */ + export type Outbound = GetAvailableClientsErrors$Outbound; } /** @internal */ -export const GetAvailableClientsResponseBody$inboundSchema: z.ZodType< - GetAvailableClientsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetAvailableClientsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetAvailableClientsResponseBody(remapped); +export const GetAvailableClientsBadRequest$inboundSchema: z.ZodType< + GetAvailableClientsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetAvailableClientsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetAvailableClientsBadRequest(remapped); + }); + /** @internal */ -export type GetAvailableClientsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetAvailableClientsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetAvailableClientsResponseBody$outboundSchema: z.ZodType< - GetAvailableClientsResponseBody$Outbound, - z.ZodTypeDef, - GetAvailableClientsResponseBody -> = z - .instanceof(GetAvailableClientsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetAvailableClientsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetAvailableClientsBadRequest$outboundSchema: z.ZodType< + GetAvailableClientsBadRequest$Outbound, + z.ZodTypeDef, + GetAvailableClientsBadRequest +> = z.instanceof(GetAvailableClientsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetAvailableClientsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetAvailableClientsResponseBody$ { - /** @deprecated use `GetAvailableClientsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsResponseBody$inboundSchema; - /** @deprecated use `GetAvailableClientsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsResponseBody$outboundSchema; - /** @deprecated use `GetAvailableClientsResponseBody$Outbound` instead. */ - export type Outbound = GetAvailableClientsResponseBody$Outbound; +export namespace GetAvailableClientsBadRequest$ { + /** @deprecated use `GetAvailableClientsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsBadRequest$inboundSchema; + /** @deprecated use `GetAvailableClientsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsBadRequest$outboundSchema; + /** @deprecated use `GetAvailableClientsBadRequest$Outbound` instead. */ + export type Outbound = GetAvailableClientsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getbandwidthstatistics.ts b/src/sdk/models/errors/getbandwidthstatistics.ts index baaf62ad..9dbf3cee 100644 --- a/src/sdk/models/errors/getbandwidthstatistics.ts +++ b/src/sdk/models/errors/getbandwidthstatistics.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetBandwidthStatisticsStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetBandwidthStatisticsStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetBandwidthStatisticsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetBandwidthStatisticsStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetBandwidthStatisticsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetBandwidthStatisticsStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetBandwidthStatisticsUnauthorizedData; - constructor(err: GetBandwidthStatisticsStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetBandwidthStatisticsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetBandwidthStatisticsStatisticsResponseBody"; - } + this.name = "GetBandwidthStatisticsUnauthorized"; + } } export type GetBandwidthStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetBandwidthStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetBandwidthStatisticsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetBandwidthStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetBandwidthStatisticsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetBandwidthStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetBandwidthStatisticsBadRequestData; - constructor(err: GetBandwidthStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetBandwidthStatisticsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetBandwidthStatisticsResponseBody"; - } + this.name = "GetBandwidthStatisticsBadRequest"; + } } /** @internal */ export const GetBandwidthStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown + GetBandwidthStatisticsStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetBandwidthStatisticsStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetBandwidthStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsStatisticsErrors + GetBandwidthStatisticsStatisticsErrors$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,104 @@ export const GetBandwidthStatisticsStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsStatisticsErrors$ { - /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsStatisticsErrors$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsStatisticsErrors$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsStatisticsErrors$Outbound; + /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = + GetBandwidthStatisticsStatisticsErrors$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = + GetBandwidthStatisticsStatisticsErrors$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsStatisticsErrors$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsStatisticsErrors$Outbound; } /** @internal */ -export const GetBandwidthStatisticsStatisticsResponseBody$inboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetBandwidthStatisticsStatisticsErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetBandwidthStatisticsStatisticsResponseBody(remapped); +export const GetBandwidthStatisticsUnauthorized$inboundSchema: z.ZodType< + GetBandwidthStatisticsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetBandwidthStatisticsStatisticsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetBandwidthStatisticsUnauthorized(remapped); + }); + /** @internal */ -export type GetBandwidthStatisticsStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetBandwidthStatisticsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetBandwidthStatisticsStatisticsResponseBody$outboundSchema: z.ZodType< - GetBandwidthStatisticsStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsStatisticsResponseBody -> = z - .instanceof(GetBandwidthStatisticsStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetBandwidthStatisticsStatisticsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetBandwidthStatisticsUnauthorized$outboundSchema: z.ZodType< + GetBandwidthStatisticsUnauthorized$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsUnauthorized +> = z.instanceof(GetBandwidthStatisticsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetBandwidthStatisticsStatisticsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetBandwidthStatisticsStatisticsResponseBody$ { - /** @deprecated use `GetBandwidthStatisticsStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsStatisticsResponseBody$Outbound; +export namespace GetBandwidthStatisticsUnauthorized$ { + /** @deprecated use `GetBandwidthStatisticsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsUnauthorized$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetBandwidthStatisticsUnauthorized$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsUnauthorized$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsUnauthorized$Outbound; } /** @internal */ export const GetBandwidthStatisticsErrors$inboundSchema: z.ZodType< - GetBandwidthStatisticsErrors, - z.ZodTypeDef, - unknown + GetBandwidthStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetBandwidthStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetBandwidthStatisticsErrors$outboundSchema: z.ZodType< - GetBandwidthStatisticsErrors$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsErrors + GetBandwidthStatisticsErrors$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,75 +232,68 @@ export const GetBandwidthStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsErrors$ { - /** @deprecated use `GetBandwidthStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsErrors$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsErrors$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsErrors$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsErrors$Outbound; + /** @deprecated use `GetBandwidthStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsErrors$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsErrors$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsErrors$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsErrors$Outbound; } /** @internal */ -export const GetBandwidthStatisticsResponseBody$inboundSchema: z.ZodType< - GetBandwidthStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetBandwidthStatisticsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetBandwidthStatisticsResponseBody(remapped); +export const GetBandwidthStatisticsBadRequest$inboundSchema: z.ZodType< + GetBandwidthStatisticsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetBandwidthStatisticsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetBandwidthStatisticsBadRequest(remapped); + }); + /** @internal */ -export type GetBandwidthStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetBandwidthStatisticsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetBandwidthStatisticsResponseBody$outboundSchema: z.ZodType< - GetBandwidthStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsResponseBody -> = z - .instanceof(GetBandwidthStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetBandwidthStatisticsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetBandwidthStatisticsBadRequest$outboundSchema: z.ZodType< + GetBandwidthStatisticsBadRequest$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsBadRequest +> = z.instanceof(GetBandwidthStatisticsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetBandwidthStatisticsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetBandwidthStatisticsResponseBody$ { - /** @deprecated use `GetBandwidthStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsResponseBody$Outbound; +export namespace GetBandwidthStatisticsBadRequest$ { + /** @deprecated use `GetBandwidthStatisticsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsBadRequest$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsBadRequest$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsBadRequest$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getbannerimage.ts b/src/sdk/models/errors/getbannerimage.ts index d488936c..358113bd 100644 --- a/src/sdk/models/errors/getbannerimage.ts +++ b/src/sdk/models/errors/getbannerimage.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetBannerImageMediaErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetBannerImageMediaResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetBannerImageUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetBannerImageMediaResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetBannerImageUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetBannerImageMediaResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetBannerImageUnauthorizedData; - constructor(err: GetBannerImageMediaResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetBannerImageUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetBannerImageMediaResponseBody"; - } + this.name = "GetBannerImageUnauthorized"; + } } export type GetBannerImageErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetBannerImageResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetBannerImageBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetBannerImageResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetBannerImageBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetBannerImageResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetBannerImageBadRequestData; - constructor(err: GetBannerImageResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetBannerImageBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetBannerImageResponseBody"; - } + this.name = "GetBannerImageBadRequest"; + } } /** @internal */ export const GetBannerImageMediaErrors$inboundSchema: z.ZodType< - GetBannerImageMediaErrors, - z.ZodTypeDef, - unknown + GetBannerImageMediaErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetBannerImageMediaErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetBannerImageMediaErrors$outboundSchema: z.ZodType< - GetBannerImageMediaErrors$Outbound, - z.ZodTypeDef, - GetBannerImageMediaErrors + GetBannerImageMediaErrors$Outbound, + z.ZodTypeDef, + GetBannerImageMediaErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetBannerImageMediaErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBannerImageMediaErrors$ { - /** @deprecated use `GetBannerImageMediaErrors$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageMediaErrors$inboundSchema; - /** @deprecated use `GetBannerImageMediaErrors$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageMediaErrors$outboundSchema; - /** @deprecated use `GetBannerImageMediaErrors$Outbound` instead. */ - export type Outbound = GetBannerImageMediaErrors$Outbound; + /** @deprecated use `GetBannerImageMediaErrors$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageMediaErrors$inboundSchema; + /** @deprecated use `GetBannerImageMediaErrors$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageMediaErrors$outboundSchema; + /** @deprecated use `GetBannerImageMediaErrors$Outbound` instead. */ + export type Outbound = GetBannerImageMediaErrors$Outbound; } /** @internal */ -export const GetBannerImageMediaResponseBody$inboundSchema: z.ZodType< - GetBannerImageMediaResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetBannerImageMediaErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetBannerImageMediaResponseBody(remapped); +export const GetBannerImageUnauthorized$inboundSchema: z.ZodType< + GetBannerImageUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetBannerImageMediaErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetBannerImageUnauthorized(remapped); + }); + /** @internal */ -export type GetBannerImageMediaResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetBannerImageUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetBannerImageMediaResponseBody$outboundSchema: z.ZodType< - GetBannerImageMediaResponseBody$Outbound, - z.ZodTypeDef, - GetBannerImageMediaResponseBody -> = z - .instanceof(GetBannerImageMediaResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetBannerImageMediaErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetBannerImageUnauthorized$outboundSchema: z.ZodType< + GetBannerImageUnauthorized$Outbound, + z.ZodTypeDef, + GetBannerImageUnauthorized +> = z.instanceof(GetBannerImageUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetBannerImageMediaErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetBannerImageMediaResponseBody$ { - /** @deprecated use `GetBannerImageMediaResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageMediaResponseBody$inboundSchema; - /** @deprecated use `GetBannerImageMediaResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageMediaResponseBody$outboundSchema; - /** @deprecated use `GetBannerImageMediaResponseBody$Outbound` instead. */ - export type Outbound = GetBannerImageMediaResponseBody$Outbound; +export namespace GetBannerImageUnauthorized$ { + /** @deprecated use `GetBannerImageUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageUnauthorized$inboundSchema; + /** @deprecated use `GetBannerImageUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageUnauthorized$outboundSchema; + /** @deprecated use `GetBannerImageUnauthorized$Outbound` instead. */ + export type Outbound = GetBannerImageUnauthorized$Outbound; } /** @internal */ export const GetBannerImageErrors$inboundSchema: z.ZodType< - GetBannerImageErrors, - z.ZodTypeDef, - unknown + GetBannerImageErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetBannerImageErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetBannerImageErrors$outboundSchema: z.ZodType< - GetBannerImageErrors$Outbound, - z.ZodTypeDef, - GetBannerImageErrors + GetBannerImageErrors$Outbound, + z.ZodTypeDef, + GetBannerImageErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetBannerImageErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBannerImageErrors$ { - /** @deprecated use `GetBannerImageErrors$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageErrors$inboundSchema; - /** @deprecated use `GetBannerImageErrors$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageErrors$outboundSchema; - /** @deprecated use `GetBannerImageErrors$Outbound` instead. */ - export type Outbound = GetBannerImageErrors$Outbound; + /** @deprecated use `GetBannerImageErrors$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageErrors$inboundSchema; + /** @deprecated use `GetBannerImageErrors$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageErrors$outboundSchema; + /** @deprecated use `GetBannerImageErrors$Outbound` instead. */ + export type Outbound = GetBannerImageErrors$Outbound; } /** @internal */ -export const GetBannerImageResponseBody$inboundSchema: z.ZodType< - GetBannerImageResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetBannerImageErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetBannerImageResponseBody(remapped); +export const GetBannerImageBadRequest$inboundSchema: z.ZodType< + GetBannerImageBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetBannerImageErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetBannerImageBadRequest(remapped); + }); + /** @internal */ -export type GetBannerImageResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetBannerImageBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetBannerImageResponseBody$outboundSchema: z.ZodType< - GetBannerImageResponseBody$Outbound, - z.ZodTypeDef, - GetBannerImageResponseBody -> = z - .instanceof(GetBannerImageResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetBannerImageErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetBannerImageBadRequest$outboundSchema: z.ZodType< + GetBannerImageBadRequest$Outbound, + z.ZodTypeDef, + GetBannerImageBadRequest +> = z.instanceof(GetBannerImageBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetBannerImageErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetBannerImageResponseBody$ { - /** @deprecated use `GetBannerImageResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageResponseBody$inboundSchema; - /** @deprecated use `GetBannerImageResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageResponseBody$outboundSchema; - /** @deprecated use `GetBannerImageResponseBody$Outbound` instead. */ - export type Outbound = GetBannerImageResponseBody$Outbound; +export namespace GetBannerImageBadRequest$ { + /** @deprecated use `GetBannerImageBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageBadRequest$inboundSchema; + /** @deprecated use `GetBannerImageBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageBadRequest$outboundSchema; + /** @deprecated use `GetBannerImageBadRequest$Outbound` instead. */ + export type Outbound = GetBannerImageBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getbutlertasks.ts b/src/sdk/models/errors/getbutlertasks.ts index aef14173..845b1a0c 100644 --- a/src/sdk/models/errors/getbutlertasks.ts +++ b/src/sdk/models/errors/getbutlertasks.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetButlerTasksButlerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetButlerTasksButlerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetButlerTasksUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetButlerTasksButlerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetButlerTasksUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetButlerTasksButlerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetButlerTasksUnauthorizedData; - constructor(err: GetButlerTasksButlerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetButlerTasksUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetButlerTasksButlerResponseBody"; - } + this.name = "GetButlerTasksUnauthorized"; + } } export type GetButlerTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetButlerTasksResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetButlerTasksBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetButlerTasksResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetButlerTasksBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetButlerTasksResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetButlerTasksBadRequestData; - constructor(err: GetButlerTasksResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetButlerTasksBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetButlerTasksResponseBody"; - } + this.name = "GetButlerTasksBadRequest"; + } } /** @internal */ export const GetButlerTasksButlerErrors$inboundSchema: z.ZodType< - GetButlerTasksButlerErrors, - z.ZodTypeDef, - unknown + GetButlerTasksButlerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetButlerTasksButlerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetButlerTasksButlerErrors$outboundSchema: z.ZodType< - GetButlerTasksButlerErrors$Outbound, - z.ZodTypeDef, - GetButlerTasksButlerErrors + GetButlerTasksButlerErrors$Outbound, + z.ZodTypeDef, + GetButlerTasksButlerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetButlerTasksButlerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetButlerTasksButlerErrors$ { - /** @deprecated use `GetButlerTasksButlerErrors$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksButlerErrors$inboundSchema; - /** @deprecated use `GetButlerTasksButlerErrors$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksButlerErrors$outboundSchema; - /** @deprecated use `GetButlerTasksButlerErrors$Outbound` instead. */ - export type Outbound = GetButlerTasksButlerErrors$Outbound; + /** @deprecated use `GetButlerTasksButlerErrors$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksButlerErrors$inboundSchema; + /** @deprecated use `GetButlerTasksButlerErrors$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksButlerErrors$outboundSchema; + /** @deprecated use `GetButlerTasksButlerErrors$Outbound` instead. */ + export type Outbound = GetButlerTasksButlerErrors$Outbound; } /** @internal */ -export const GetButlerTasksButlerResponseBody$inboundSchema: z.ZodType< - GetButlerTasksButlerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetButlerTasksButlerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetButlerTasksButlerResponseBody(remapped); +export const GetButlerTasksUnauthorized$inboundSchema: z.ZodType< + GetButlerTasksUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetButlerTasksButlerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetButlerTasksUnauthorized(remapped); + }); + /** @internal */ -export type GetButlerTasksButlerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetButlerTasksUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetButlerTasksButlerResponseBody$outboundSchema: z.ZodType< - GetButlerTasksButlerResponseBody$Outbound, - z.ZodTypeDef, - GetButlerTasksButlerResponseBody -> = z - .instanceof(GetButlerTasksButlerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetButlerTasksButlerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetButlerTasksUnauthorized$outboundSchema: z.ZodType< + GetButlerTasksUnauthorized$Outbound, + z.ZodTypeDef, + GetButlerTasksUnauthorized +> = z.instanceof(GetButlerTasksUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetButlerTasksButlerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetButlerTasksButlerResponseBody$ { - /** @deprecated use `GetButlerTasksButlerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksButlerResponseBody$inboundSchema; - /** @deprecated use `GetButlerTasksButlerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksButlerResponseBody$outboundSchema; - /** @deprecated use `GetButlerTasksButlerResponseBody$Outbound` instead. */ - export type Outbound = GetButlerTasksButlerResponseBody$Outbound; +export namespace GetButlerTasksUnauthorized$ { + /** @deprecated use `GetButlerTasksUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksUnauthorized$inboundSchema; + /** @deprecated use `GetButlerTasksUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksUnauthorized$outboundSchema; + /** @deprecated use `GetButlerTasksUnauthorized$Outbound` instead. */ + export type Outbound = GetButlerTasksUnauthorized$Outbound; } /** @internal */ export const GetButlerTasksErrors$inboundSchema: z.ZodType< - GetButlerTasksErrors, - z.ZodTypeDef, - unknown + GetButlerTasksErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetButlerTasksErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetButlerTasksErrors$outboundSchema: z.ZodType< - GetButlerTasksErrors$Outbound, - z.ZodTypeDef, - GetButlerTasksErrors + GetButlerTasksErrors$Outbound, + z.ZodTypeDef, + GetButlerTasksErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetButlerTasksErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetButlerTasksErrors$ { - /** @deprecated use `GetButlerTasksErrors$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksErrors$inboundSchema; - /** @deprecated use `GetButlerTasksErrors$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksErrors$outboundSchema; - /** @deprecated use `GetButlerTasksErrors$Outbound` instead. */ - export type Outbound = GetButlerTasksErrors$Outbound; + /** @deprecated use `GetButlerTasksErrors$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksErrors$inboundSchema; + /** @deprecated use `GetButlerTasksErrors$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksErrors$outboundSchema; + /** @deprecated use `GetButlerTasksErrors$Outbound` instead. */ + export type Outbound = GetButlerTasksErrors$Outbound; } /** @internal */ -export const GetButlerTasksResponseBody$inboundSchema: z.ZodType< - GetButlerTasksResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetButlerTasksErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetButlerTasksResponseBody(remapped); +export const GetButlerTasksBadRequest$inboundSchema: z.ZodType< + GetButlerTasksBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetButlerTasksErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetButlerTasksBadRequest(remapped); + }); + /** @internal */ -export type GetButlerTasksResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetButlerTasksBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetButlerTasksResponseBody$outboundSchema: z.ZodType< - GetButlerTasksResponseBody$Outbound, - z.ZodTypeDef, - GetButlerTasksResponseBody -> = z - .instanceof(GetButlerTasksResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetButlerTasksErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetButlerTasksBadRequest$outboundSchema: z.ZodType< + GetButlerTasksBadRequest$Outbound, + z.ZodTypeDef, + GetButlerTasksBadRequest +> = z.instanceof(GetButlerTasksBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetButlerTasksErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetButlerTasksResponseBody$ { - /** @deprecated use `GetButlerTasksResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksResponseBody$inboundSchema; - /** @deprecated use `GetButlerTasksResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksResponseBody$outboundSchema; - /** @deprecated use `GetButlerTasksResponseBody$Outbound` instead. */ - export type Outbound = GetButlerTasksResponseBody$Outbound; +export namespace GetButlerTasksBadRequest$ { + /** @deprecated use `GetButlerTasksBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksBadRequest$inboundSchema; + /** @deprecated use `GetButlerTasksBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksBadRequest$outboundSchema; + /** @deprecated use `GetButlerTasksBadRequest$Outbound` instead. */ + export type Outbound = GetButlerTasksBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getcompanionsdata.ts b/src/sdk/models/errors/getcompanionsdata.ts index 5d3fb810..d02a4bb0 100644 --- a/src/sdk/models/errors/getcompanionsdata.ts +++ b/src/sdk/models/errors/getcompanionsdata.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetCompanionsDataPlexErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetCompanionsDataPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetCompanionsDataUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetCompanionsDataPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetCompanionsDataUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetCompanionsDataPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetCompanionsDataUnauthorizedData; - constructor(err: GetCompanionsDataPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetCompanionsDataUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetCompanionsDataPlexResponseBody"; - } + this.name = "GetCompanionsDataUnauthorized"; + } } export type GetCompanionsDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetCompanionsDataResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetCompanionsDataBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetCompanionsDataResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetCompanionsDataBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetCompanionsDataResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetCompanionsDataBadRequestData; - constructor(err: GetCompanionsDataResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetCompanionsDataBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetCompanionsDataResponseBody"; - } + this.name = "GetCompanionsDataBadRequest"; + } } /** @internal */ export const GetCompanionsDataPlexErrors$inboundSchema: z.ZodType< - GetCompanionsDataPlexErrors, - z.ZodTypeDef, - unknown + GetCompanionsDataPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetCompanionsDataPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetCompanionsDataPlexErrors$outboundSchema: z.ZodType< - GetCompanionsDataPlexErrors$Outbound, - z.ZodTypeDef, - GetCompanionsDataPlexErrors + GetCompanionsDataPlexErrors$Outbound, + z.ZodTypeDef, + GetCompanionsDataPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetCompanionsDataPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCompanionsDataPlexErrors$ { - /** @deprecated use `GetCompanionsDataPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetCompanionsDataPlexErrors$inboundSchema; - /** @deprecated use `GetCompanionsDataPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetCompanionsDataPlexErrors$outboundSchema; - /** @deprecated use `GetCompanionsDataPlexErrors$Outbound` instead. */ - export type Outbound = GetCompanionsDataPlexErrors$Outbound; + /** @deprecated use `GetCompanionsDataPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetCompanionsDataPlexErrors$inboundSchema; + /** @deprecated use `GetCompanionsDataPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetCompanionsDataPlexErrors$outboundSchema; + /** @deprecated use `GetCompanionsDataPlexErrors$Outbound` instead. */ + export type Outbound = GetCompanionsDataPlexErrors$Outbound; } /** @internal */ -export const GetCompanionsDataPlexResponseBody$inboundSchema: z.ZodType< - GetCompanionsDataPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetCompanionsDataPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetCompanionsDataPlexResponseBody(remapped); +export const GetCompanionsDataUnauthorized$inboundSchema: z.ZodType< + GetCompanionsDataUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetCompanionsDataPlexErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetCompanionsDataUnauthorized(remapped); + }); + /** @internal */ -export type GetCompanionsDataPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetCompanionsDataUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetCompanionsDataPlexResponseBody$outboundSchema: z.ZodType< - GetCompanionsDataPlexResponseBody$Outbound, - z.ZodTypeDef, - GetCompanionsDataPlexResponseBody -> = z - .instanceof(GetCompanionsDataPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetCompanionsDataPlexErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetCompanionsDataUnauthorized$outboundSchema: z.ZodType< + GetCompanionsDataUnauthorized$Outbound, + z.ZodTypeDef, + GetCompanionsDataUnauthorized +> = z.instanceof(GetCompanionsDataUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetCompanionsDataPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetCompanionsDataPlexResponseBody$ { - /** @deprecated use `GetCompanionsDataPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetCompanionsDataPlexResponseBody$inboundSchema; - /** @deprecated use `GetCompanionsDataPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetCompanionsDataPlexResponseBody$outboundSchema; - /** @deprecated use `GetCompanionsDataPlexResponseBody$Outbound` instead. */ - export type Outbound = GetCompanionsDataPlexResponseBody$Outbound; +export namespace GetCompanionsDataUnauthorized$ { + /** @deprecated use `GetCompanionsDataUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetCompanionsDataUnauthorized$inboundSchema; + /** @deprecated use `GetCompanionsDataUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetCompanionsDataUnauthorized$outboundSchema; + /** @deprecated use `GetCompanionsDataUnauthorized$Outbound` instead. */ + export type Outbound = GetCompanionsDataUnauthorized$Outbound; } /** @internal */ export const GetCompanionsDataErrors$inboundSchema: z.ZodType< - GetCompanionsDataErrors, - z.ZodTypeDef, - unknown + GetCompanionsDataErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetCompanionsDataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetCompanionsDataErrors$outboundSchema: z.ZodType< - GetCompanionsDataErrors$Outbound, - z.ZodTypeDef, - GetCompanionsDataErrors + GetCompanionsDataErrors$Outbound, + z.ZodTypeDef, + GetCompanionsDataErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,68 @@ export const GetCompanionsDataErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCompanionsDataErrors$ { - /** @deprecated use `GetCompanionsDataErrors$inboundSchema` instead. */ - export const inboundSchema = GetCompanionsDataErrors$inboundSchema; - /** @deprecated use `GetCompanionsDataErrors$outboundSchema` instead. */ - export const outboundSchema = GetCompanionsDataErrors$outboundSchema; - /** @deprecated use `GetCompanionsDataErrors$Outbound` instead. */ - export type Outbound = GetCompanionsDataErrors$Outbound; + /** @deprecated use `GetCompanionsDataErrors$inboundSchema` instead. */ + export const inboundSchema = GetCompanionsDataErrors$inboundSchema; + /** @deprecated use `GetCompanionsDataErrors$outboundSchema` instead. */ + export const outboundSchema = GetCompanionsDataErrors$outboundSchema; + /** @deprecated use `GetCompanionsDataErrors$Outbound` instead. */ + export type Outbound = GetCompanionsDataErrors$Outbound; } /** @internal */ -export const GetCompanionsDataResponseBody$inboundSchema: z.ZodType< - GetCompanionsDataResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetCompanionsDataErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetCompanionsDataResponseBody(remapped); +export const GetCompanionsDataBadRequest$inboundSchema: z.ZodType< + GetCompanionsDataBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetCompanionsDataErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetCompanionsDataBadRequest(remapped); + }); + /** @internal */ -export type GetCompanionsDataResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetCompanionsDataBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetCompanionsDataResponseBody$outboundSchema: z.ZodType< - GetCompanionsDataResponseBody$Outbound, - z.ZodTypeDef, - GetCompanionsDataResponseBody -> = z - .instanceof(GetCompanionsDataResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetCompanionsDataErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetCompanionsDataBadRequest$outboundSchema: z.ZodType< + GetCompanionsDataBadRequest$Outbound, + z.ZodTypeDef, + GetCompanionsDataBadRequest +> = z.instanceof(GetCompanionsDataBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetCompanionsDataErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetCompanionsDataResponseBody$ { - /** @deprecated use `GetCompanionsDataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetCompanionsDataResponseBody$inboundSchema; - /** @deprecated use `GetCompanionsDataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetCompanionsDataResponseBody$outboundSchema; - /** @deprecated use `GetCompanionsDataResponseBody$Outbound` instead. */ - export type Outbound = GetCompanionsDataResponseBody$Outbound; +export namespace GetCompanionsDataBadRequest$ { + /** @deprecated use `GetCompanionsDataBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetCompanionsDataBadRequest$inboundSchema; + /** @deprecated use `GetCompanionsDataBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetCompanionsDataBadRequest$outboundSchema; + /** @deprecated use `GetCompanionsDataBadRequest$Outbound` instead. */ + export type Outbound = GetCompanionsDataBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getdevices.ts b/src/sdk/models/errors/getdevices.ts index 8aa4f08d..de3426a2 100644 --- a/src/sdk/models/errors/getdevices.ts +++ b/src/sdk/models/errors/getdevices.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetDevicesServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetDevicesServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetDevicesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetDevicesServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetDevicesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetDevicesServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetDevicesUnauthorizedData; - constructor(err: GetDevicesServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetDevicesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetDevicesServerResponseBody"; - } + this.name = "GetDevicesUnauthorized"; + } } export type GetDevicesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetDevicesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetDevicesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetDevicesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetDevicesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetDevicesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetDevicesBadRequestData; - constructor(err: GetDevicesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetDevicesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetDevicesResponseBody"; - } + this.name = "GetDevicesBadRequest"; + } } /** @internal */ export const GetDevicesServerErrors$inboundSchema: z.ZodType< - GetDevicesServerErrors, - z.ZodTypeDef, - unknown + GetDevicesServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetDevicesServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetDevicesServerErrors$outboundSchema: z.ZodType< - GetDevicesServerErrors$Outbound, - z.ZodTypeDef, - GetDevicesServerErrors + GetDevicesServerErrors$Outbound, + z.ZodTypeDef, + GetDevicesServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetDevicesServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDevicesServerErrors$ { - /** @deprecated use `GetDevicesServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetDevicesServerErrors$inboundSchema; - /** @deprecated use `GetDevicesServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetDevicesServerErrors$outboundSchema; - /** @deprecated use `GetDevicesServerErrors$Outbound` instead. */ - export type Outbound = GetDevicesServerErrors$Outbound; + /** @deprecated use `GetDevicesServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetDevicesServerErrors$inboundSchema; + /** @deprecated use `GetDevicesServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetDevicesServerErrors$outboundSchema; + /** @deprecated use `GetDevicesServerErrors$Outbound` instead. */ + export type Outbound = GetDevicesServerErrors$Outbound; } /** @internal */ -export const GetDevicesServerResponseBody$inboundSchema: z.ZodType< - GetDevicesServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetDevicesServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetDevicesServerResponseBody(remapped); +export const GetDevicesUnauthorized$inboundSchema: z.ZodType< + GetDevicesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetDevicesServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetDevicesUnauthorized(remapped); + }); + /** @internal */ -export type GetDevicesServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetDevicesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetDevicesServerResponseBody$outboundSchema: z.ZodType< - GetDevicesServerResponseBody$Outbound, - z.ZodTypeDef, - GetDevicesServerResponseBody -> = z - .instanceof(GetDevicesServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetDevicesServerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetDevicesUnauthorized$outboundSchema: z.ZodType< + GetDevicesUnauthorized$Outbound, + z.ZodTypeDef, + GetDevicesUnauthorized +> = z.instanceof(GetDevicesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetDevicesServerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetDevicesServerResponseBody$ { - /** @deprecated use `GetDevicesServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetDevicesServerResponseBody$inboundSchema; - /** @deprecated use `GetDevicesServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetDevicesServerResponseBody$outboundSchema; - /** @deprecated use `GetDevicesServerResponseBody$Outbound` instead. */ - export type Outbound = GetDevicesServerResponseBody$Outbound; +export namespace GetDevicesUnauthorized$ { + /** @deprecated use `GetDevicesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetDevicesUnauthorized$inboundSchema; + /** @deprecated use `GetDevicesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetDevicesUnauthorized$outboundSchema; + /** @deprecated use `GetDevicesUnauthorized$Outbound` instead. */ + export type Outbound = GetDevicesUnauthorized$Outbound; } /** @internal */ -export const GetDevicesErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetDevicesErrors$inboundSchema: z.ZodType< + GetDevicesErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetDevicesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetDevicesErrors$outboundSchema: z.ZodType< - GetDevicesErrors$Outbound, - z.ZodTypeDef, - GetDevicesErrors + GetDevicesErrors$Outbound, + z.ZodTypeDef, + GetDevicesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,66 @@ export const GetDevicesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDevicesErrors$ { - /** @deprecated use `GetDevicesErrors$inboundSchema` instead. */ - export const inboundSchema = GetDevicesErrors$inboundSchema; - /** @deprecated use `GetDevicesErrors$outboundSchema` instead. */ - export const outboundSchema = GetDevicesErrors$outboundSchema; - /** @deprecated use `GetDevicesErrors$Outbound` instead. */ - export type Outbound = GetDevicesErrors$Outbound; + /** @deprecated use `GetDevicesErrors$inboundSchema` instead. */ + export const inboundSchema = GetDevicesErrors$inboundSchema; + /** @deprecated use `GetDevicesErrors$outboundSchema` instead. */ + export const outboundSchema = GetDevicesErrors$outboundSchema; + /** @deprecated use `GetDevicesErrors$Outbound` instead. */ + export type Outbound = GetDevicesErrors$Outbound; } /** @internal */ -export const GetDevicesResponseBody$inboundSchema: z.ZodType< - GetDevicesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetDevicesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetDevicesResponseBody(remapped); +export const GetDevicesBadRequest$inboundSchema: z.ZodType< + GetDevicesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetDevicesErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetDevicesBadRequest(remapped); + }); + /** @internal */ -export type GetDevicesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetDevicesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetDevicesResponseBody$outboundSchema: z.ZodType< - GetDevicesResponseBody$Outbound, - z.ZodTypeDef, - GetDevicesResponseBody -> = z - .instanceof(GetDevicesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetDevicesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetDevicesBadRequest$outboundSchema: z.ZodType< + GetDevicesBadRequest$Outbound, + z.ZodTypeDef, + GetDevicesBadRequest +> = z.instanceof(GetDevicesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetDevicesErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetDevicesResponseBody$ { - /** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetDevicesResponseBody$inboundSchema; - /** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetDevicesResponseBody$outboundSchema; - /** @deprecated use `GetDevicesResponseBody$Outbound` instead. */ - export type Outbound = GetDevicesResponseBody$Outbound; +export namespace GetDevicesBadRequest$ { + /** @deprecated use `GetDevicesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetDevicesBadRequest$inboundSchema; + /** @deprecated use `GetDevicesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetDevicesBadRequest$outboundSchema; + /** @deprecated use `GetDevicesBadRequest$Outbound` instead. */ + export type Outbound = GetDevicesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getfilehash.ts b/src/sdk/models/errors/getfilehash.ts index bc3ae4f8..6bb2cdba 100644 --- a/src/sdk/models/errors/getfilehash.ts +++ b/src/sdk/models/errors/getfilehash.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetFileHashLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetFileHashLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetFileHashUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetFileHashLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetFileHashUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetFileHashLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetFileHashUnauthorizedData; - constructor(err: GetFileHashLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetFileHashUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetFileHashLibraryResponseBody"; - } + this.name = "GetFileHashUnauthorized"; + } } export type GetFileHashErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetFileHashResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetFileHashBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetFileHashResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetFileHashBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetFileHashResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetFileHashBadRequestData; - constructor(err: GetFileHashResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetFileHashBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetFileHashResponseBody"; - } + this.name = "GetFileHashBadRequest"; + } } /** @internal */ export const GetFileHashLibraryErrors$inboundSchema: z.ZodType< - GetFileHashLibraryErrors, - z.ZodTypeDef, - unknown + GetFileHashLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetFileHashLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetFileHashLibraryErrors$outboundSchema: z.ZodType< - GetFileHashLibraryErrors$Outbound, - z.ZodTypeDef, - GetFileHashLibraryErrors + GetFileHashLibraryErrors$Outbound, + z.ZodTypeDef, + GetFileHashLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetFileHashLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetFileHashLibraryErrors$ { - /** @deprecated use `GetFileHashLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetFileHashLibraryErrors$inboundSchema; - /** @deprecated use `GetFileHashLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetFileHashLibraryErrors$outboundSchema; - /** @deprecated use `GetFileHashLibraryErrors$Outbound` instead. */ - export type Outbound = GetFileHashLibraryErrors$Outbound; + /** @deprecated use `GetFileHashLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetFileHashLibraryErrors$inboundSchema; + /** @deprecated use `GetFileHashLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetFileHashLibraryErrors$outboundSchema; + /** @deprecated use `GetFileHashLibraryErrors$Outbound` instead. */ + export type Outbound = GetFileHashLibraryErrors$Outbound; } /** @internal */ -export const GetFileHashLibraryResponseBody$inboundSchema: z.ZodType< - GetFileHashLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetFileHashLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetFileHashLibraryResponseBody(remapped); +export const GetFileHashUnauthorized$inboundSchema: z.ZodType< + GetFileHashUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetFileHashLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetFileHashUnauthorized(remapped); + }); + /** @internal */ -export type GetFileHashLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetFileHashUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetFileHashLibraryResponseBody$outboundSchema: z.ZodType< - GetFileHashLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetFileHashLibraryResponseBody -> = z - .instanceof(GetFileHashLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetFileHashLibraryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetFileHashUnauthorized$outboundSchema: z.ZodType< + GetFileHashUnauthorized$Outbound, + z.ZodTypeDef, + GetFileHashUnauthorized +> = z.instanceof(GetFileHashUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetFileHashLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetFileHashLibraryResponseBody$ { - /** @deprecated use `GetFileHashLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetFileHashLibraryResponseBody$inboundSchema; - /** @deprecated use `GetFileHashLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetFileHashLibraryResponseBody$outboundSchema; - /** @deprecated use `GetFileHashLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetFileHashLibraryResponseBody$Outbound; +export namespace GetFileHashUnauthorized$ { + /** @deprecated use `GetFileHashUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetFileHashUnauthorized$inboundSchema; + /** @deprecated use `GetFileHashUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetFileHashUnauthorized$outboundSchema; + /** @deprecated use `GetFileHashUnauthorized$Outbound` instead. */ + export type Outbound = GetFileHashUnauthorized$Outbound; } /** @internal */ -export const GetFileHashErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetFileHashErrors$inboundSchema: z.ZodType< + GetFileHashErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetFileHashErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetFileHashErrors$outboundSchema: z.ZodType< - GetFileHashErrors$Outbound, - z.ZodTypeDef, - GetFileHashErrors + GetFileHashErrors$Outbound, + z.ZodTypeDef, + GetFileHashErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,67 @@ export const GetFileHashErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetFileHashErrors$ { - /** @deprecated use `GetFileHashErrors$inboundSchema` instead. */ - export const inboundSchema = GetFileHashErrors$inboundSchema; - /** @deprecated use `GetFileHashErrors$outboundSchema` instead. */ - export const outboundSchema = GetFileHashErrors$outboundSchema; - /** @deprecated use `GetFileHashErrors$Outbound` instead. */ - export type Outbound = GetFileHashErrors$Outbound; + /** @deprecated use `GetFileHashErrors$inboundSchema` instead. */ + export const inboundSchema = GetFileHashErrors$inboundSchema; + /** @deprecated use `GetFileHashErrors$outboundSchema` instead. */ + export const outboundSchema = GetFileHashErrors$outboundSchema; + /** @deprecated use `GetFileHashErrors$Outbound` instead. */ + export type Outbound = GetFileHashErrors$Outbound; } /** @internal */ -export const GetFileHashResponseBody$inboundSchema: z.ZodType< - GetFileHashResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetFileHashErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetFileHashResponseBody(remapped); +export const GetFileHashBadRequest$inboundSchema: z.ZodType< + GetFileHashBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetFileHashErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetFileHashBadRequest(remapped); + }); + /** @internal */ -export type GetFileHashResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetFileHashBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetFileHashResponseBody$outboundSchema: z.ZodType< - GetFileHashResponseBody$Outbound, - z.ZodTypeDef, - GetFileHashResponseBody -> = z - .instanceof(GetFileHashResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetFileHashErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetFileHashBadRequest$outboundSchema: z.ZodType< + GetFileHashBadRequest$Outbound, + z.ZodTypeDef, + GetFileHashBadRequest +> = z.instanceof(GetFileHashBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetFileHashErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetFileHashResponseBody$ { - /** @deprecated use `GetFileHashResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetFileHashResponseBody$inboundSchema; - /** @deprecated use `GetFileHashResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetFileHashResponseBody$outboundSchema; - /** @deprecated use `GetFileHashResponseBody$Outbound` instead. */ - export type Outbound = GetFileHashResponseBody$Outbound; +export namespace GetFileHashBadRequest$ { + /** @deprecated use `GetFileHashBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetFileHashBadRequest$inboundSchema; + /** @deprecated use `GetFileHashBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetFileHashBadRequest$outboundSchema; + /** @deprecated use `GetFileHashBadRequest$Outbound` instead. */ + export type Outbound = GetFileHashBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getgeodata.ts b/src/sdk/models/errors/getgeodata.ts index 940189cc..03622aa0 100644 --- a/src/sdk/models/errors/getgeodata.ts +++ b/src/sdk/models/errors/getgeodata.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetGeoDataPlexErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetGeoDataPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetGeoDataUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetGeoDataPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetGeoDataUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetGeoDataPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetGeoDataUnauthorizedData; - constructor(err: GetGeoDataPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetGeoDataUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetGeoDataPlexResponseBody"; - } + this.name = "GetGeoDataUnauthorized"; + } } export type GetGeoDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetGeoDataResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetGeoDataBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetGeoDataResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetGeoDataBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetGeoDataResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetGeoDataBadRequestData; - constructor(err: GetGeoDataResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetGeoDataBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetGeoDataResponseBody"; - } + this.name = "GetGeoDataBadRequest"; + } } /** @internal */ export const GetGeoDataPlexErrors$inboundSchema: z.ZodType< - GetGeoDataPlexErrors, - z.ZodTypeDef, - unknown + GetGeoDataPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetGeoDataPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetGeoDataPlexErrors$outboundSchema: z.ZodType< - GetGeoDataPlexErrors$Outbound, - z.ZodTypeDef, - GetGeoDataPlexErrors + GetGeoDataPlexErrors$Outbound, + z.ZodTypeDef, + GetGeoDataPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,98 @@ export const GetGeoDataPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGeoDataPlexErrors$ { - /** @deprecated use `GetGeoDataPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataPlexErrors$inboundSchema; - /** @deprecated use `GetGeoDataPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataPlexErrors$outboundSchema; - /** @deprecated use `GetGeoDataPlexErrors$Outbound` instead. */ - export type Outbound = GetGeoDataPlexErrors$Outbound; + /** @deprecated use `GetGeoDataPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataPlexErrors$inboundSchema; + /** @deprecated use `GetGeoDataPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataPlexErrors$outboundSchema; + /** @deprecated use `GetGeoDataPlexErrors$Outbound` instead. */ + export type Outbound = GetGeoDataPlexErrors$Outbound; } /** @internal */ -export const GetGeoDataPlexResponseBody$inboundSchema: z.ZodType< - GetGeoDataPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetGeoDataPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetGeoDataPlexResponseBody(remapped); +export const GetGeoDataUnauthorized$inboundSchema: z.ZodType< + GetGeoDataUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetGeoDataPlexErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetGeoDataUnauthorized(remapped); + }); + /** @internal */ -export type GetGeoDataPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetGeoDataUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetGeoDataPlexResponseBody$outboundSchema: z.ZodType< - GetGeoDataPlexResponseBody$Outbound, - z.ZodTypeDef, - GetGeoDataPlexResponseBody -> = z - .instanceof(GetGeoDataPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetGeoDataPlexErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetGeoDataUnauthorized$outboundSchema: z.ZodType< + GetGeoDataUnauthorized$Outbound, + z.ZodTypeDef, + GetGeoDataUnauthorized +> = z.instanceof(GetGeoDataUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetGeoDataPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetGeoDataPlexResponseBody$ { - /** @deprecated use `GetGeoDataPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataPlexResponseBody$inboundSchema; - /** @deprecated use `GetGeoDataPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataPlexResponseBody$outboundSchema; - /** @deprecated use `GetGeoDataPlexResponseBody$Outbound` instead. */ - export type Outbound = GetGeoDataPlexResponseBody$Outbound; +export namespace GetGeoDataUnauthorized$ { + /** @deprecated use `GetGeoDataUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataUnauthorized$inboundSchema; + /** @deprecated use `GetGeoDataUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataUnauthorized$outboundSchema; + /** @deprecated use `GetGeoDataUnauthorized$Outbound` instead. */ + export type Outbound = GetGeoDataUnauthorized$Outbound; } /** @internal */ -export const GetGeoDataErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetGeoDataErrors$inboundSchema: z.ZodType< + GetGeoDataErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetGeoDataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetGeoDataErrors$outboundSchema: z.ZodType< - GetGeoDataErrors$Outbound, - z.ZodTypeDef, - GetGeoDataErrors + GetGeoDataErrors$Outbound, + z.ZodTypeDef, + GetGeoDataErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +226,66 @@ export const GetGeoDataErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGeoDataErrors$ { - /** @deprecated use `GetGeoDataErrors$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataErrors$inboundSchema; - /** @deprecated use `GetGeoDataErrors$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataErrors$outboundSchema; - /** @deprecated use `GetGeoDataErrors$Outbound` instead. */ - export type Outbound = GetGeoDataErrors$Outbound; + /** @deprecated use `GetGeoDataErrors$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataErrors$inboundSchema; + /** @deprecated use `GetGeoDataErrors$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataErrors$outboundSchema; + /** @deprecated use `GetGeoDataErrors$Outbound` instead. */ + export type Outbound = GetGeoDataErrors$Outbound; } /** @internal */ -export const GetGeoDataResponseBody$inboundSchema: z.ZodType< - GetGeoDataResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetGeoDataErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetGeoDataResponseBody(remapped); +export const GetGeoDataBadRequest$inboundSchema: z.ZodType< + GetGeoDataBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetGeoDataErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetGeoDataBadRequest(remapped); + }); + /** @internal */ -export type GetGeoDataResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetGeoDataBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetGeoDataResponseBody$outboundSchema: z.ZodType< - GetGeoDataResponseBody$Outbound, - z.ZodTypeDef, - GetGeoDataResponseBody -> = z - .instanceof(GetGeoDataResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetGeoDataErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetGeoDataBadRequest$outboundSchema: z.ZodType< + GetGeoDataBadRequest$Outbound, + z.ZodTypeDef, + GetGeoDataBadRequest +> = z.instanceof(GetGeoDataBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetGeoDataErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetGeoDataResponseBody$ { - /** @deprecated use `GetGeoDataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataResponseBody$inboundSchema; - /** @deprecated use `GetGeoDataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataResponseBody$outboundSchema; - /** @deprecated use `GetGeoDataResponseBody$Outbound` instead. */ - export type Outbound = GetGeoDataResponseBody$Outbound; +export namespace GetGeoDataBadRequest$ { + /** @deprecated use `GetGeoDataBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataBadRequest$inboundSchema; + /** @deprecated use `GetGeoDataBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataBadRequest$outboundSchema; + /** @deprecated use `GetGeoDataBadRequest$Outbound` instead. */ + export type Outbound = GetGeoDataBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getglobalhubs.ts b/src/sdk/models/errors/getglobalhubs.ts index c11d998e..bbc0f6bd 100644 --- a/src/sdk/models/errors/getglobalhubs.ts +++ b/src/sdk/models/errors/getglobalhubs.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetGlobalHubsHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetGlobalHubsHubsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetGlobalHubsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetGlobalHubsHubsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetGlobalHubsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetGlobalHubsHubsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetGlobalHubsUnauthorizedData; - constructor(err: GetGlobalHubsHubsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetGlobalHubsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetGlobalHubsHubsResponseBody"; - } + this.name = "GetGlobalHubsUnauthorized"; + } } export type GetGlobalHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetGlobalHubsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetGlobalHubsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetGlobalHubsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetGlobalHubsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetGlobalHubsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetGlobalHubsBadRequestData; - constructor(err: GetGlobalHubsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetGlobalHubsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetGlobalHubsResponseBody"; - } + this.name = "GetGlobalHubsBadRequest"; + } } /** @internal */ export const GetGlobalHubsHubsErrors$inboundSchema: z.ZodType< - GetGlobalHubsHubsErrors, - z.ZodTypeDef, - unknown + GetGlobalHubsHubsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetGlobalHubsHubsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetGlobalHubsHubsErrors$outboundSchema: z.ZodType< - GetGlobalHubsHubsErrors$Outbound, - z.ZodTypeDef, - GetGlobalHubsHubsErrors + GetGlobalHubsHubsErrors$Outbound, + z.ZodTypeDef, + GetGlobalHubsHubsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetGlobalHubsHubsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsHubsErrors$ { - /** @deprecated use `GetGlobalHubsHubsErrors$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsHubsErrors$inboundSchema; - /** @deprecated use `GetGlobalHubsHubsErrors$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsHubsErrors$outboundSchema; - /** @deprecated use `GetGlobalHubsHubsErrors$Outbound` instead. */ - export type Outbound = GetGlobalHubsHubsErrors$Outbound; + /** @deprecated use `GetGlobalHubsHubsErrors$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsHubsErrors$inboundSchema; + /** @deprecated use `GetGlobalHubsHubsErrors$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsHubsErrors$outboundSchema; + /** @deprecated use `GetGlobalHubsHubsErrors$Outbound` instead. */ + export type Outbound = GetGlobalHubsHubsErrors$Outbound; } /** @internal */ -export const GetGlobalHubsHubsResponseBody$inboundSchema: z.ZodType< - GetGlobalHubsHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetGlobalHubsHubsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetGlobalHubsHubsResponseBody(remapped); +export const GetGlobalHubsUnauthorized$inboundSchema: z.ZodType< + GetGlobalHubsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetGlobalHubsHubsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetGlobalHubsUnauthorized(remapped); + }); + /** @internal */ -export type GetGlobalHubsHubsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetGlobalHubsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetGlobalHubsHubsResponseBody$outboundSchema: z.ZodType< - GetGlobalHubsHubsResponseBody$Outbound, - z.ZodTypeDef, - GetGlobalHubsHubsResponseBody -> = z - .instanceof(GetGlobalHubsHubsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetGlobalHubsHubsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetGlobalHubsUnauthorized$outboundSchema: z.ZodType< + GetGlobalHubsUnauthorized$Outbound, + z.ZodTypeDef, + GetGlobalHubsUnauthorized +> = z.instanceof(GetGlobalHubsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetGlobalHubsHubsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetGlobalHubsHubsResponseBody$ { - /** @deprecated use `GetGlobalHubsHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsHubsResponseBody$inboundSchema; - /** @deprecated use `GetGlobalHubsHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsHubsResponseBody$outboundSchema; - /** @deprecated use `GetGlobalHubsHubsResponseBody$Outbound` instead. */ - export type Outbound = GetGlobalHubsHubsResponseBody$Outbound; +export namespace GetGlobalHubsUnauthorized$ { + /** @deprecated use `GetGlobalHubsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsUnauthorized$inboundSchema; + /** @deprecated use `GetGlobalHubsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsUnauthorized$outboundSchema; + /** @deprecated use `GetGlobalHubsUnauthorized$Outbound` instead. */ + export type Outbound = GetGlobalHubsUnauthorized$Outbound; } /** @internal */ export const GetGlobalHubsErrors$inboundSchema: z.ZodType< - GetGlobalHubsErrors, - z.ZodTypeDef, - unknown + GetGlobalHubsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetGlobalHubsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetGlobalHubsErrors$outboundSchema: z.ZodType< - GetGlobalHubsErrors$Outbound, - z.ZodTypeDef, - GetGlobalHubsErrors + GetGlobalHubsErrors$Outbound, + z.ZodTypeDef, + GetGlobalHubsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetGlobalHubsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsErrors$ { - /** @deprecated use `GetGlobalHubsErrors$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsErrors$inboundSchema; - /** @deprecated use `GetGlobalHubsErrors$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsErrors$outboundSchema; - /** @deprecated use `GetGlobalHubsErrors$Outbound` instead. */ - export type Outbound = GetGlobalHubsErrors$Outbound; + /** @deprecated use `GetGlobalHubsErrors$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsErrors$inboundSchema; + /** @deprecated use `GetGlobalHubsErrors$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsErrors$outboundSchema; + /** @deprecated use `GetGlobalHubsErrors$Outbound` instead. */ + export type Outbound = GetGlobalHubsErrors$Outbound; } /** @internal */ -export const GetGlobalHubsResponseBody$inboundSchema: z.ZodType< - GetGlobalHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetGlobalHubsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetGlobalHubsResponseBody(remapped); +export const GetGlobalHubsBadRequest$inboundSchema: z.ZodType< + GetGlobalHubsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetGlobalHubsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetGlobalHubsBadRequest(remapped); + }); + /** @internal */ -export type GetGlobalHubsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetGlobalHubsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetGlobalHubsResponseBody$outboundSchema: z.ZodType< - GetGlobalHubsResponseBody$Outbound, - z.ZodTypeDef, - GetGlobalHubsResponseBody -> = z - .instanceof(GetGlobalHubsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetGlobalHubsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetGlobalHubsBadRequest$outboundSchema: z.ZodType< + GetGlobalHubsBadRequest$Outbound, + z.ZodTypeDef, + GetGlobalHubsBadRequest +> = z.instanceof(GetGlobalHubsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetGlobalHubsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetGlobalHubsResponseBody$ { - /** @deprecated use `GetGlobalHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsResponseBody$inboundSchema; - /** @deprecated use `GetGlobalHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsResponseBody$outboundSchema; - /** @deprecated use `GetGlobalHubsResponseBody$Outbound` instead. */ - export type Outbound = GetGlobalHubsResponseBody$Outbound; +export namespace GetGlobalHubsBadRequest$ { + /** @deprecated use `GetGlobalHubsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsBadRequest$inboundSchema; + /** @deprecated use `GetGlobalHubsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsBadRequest$outboundSchema; + /** @deprecated use `GetGlobalHubsBadRequest$Outbound` instead. */ + export type Outbound = GetGlobalHubsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gethomedata.ts b/src/sdk/models/errors/gethomedata.ts index 68c8fbb9..1106b59b 100644 --- a/src/sdk/models/errors/gethomedata.ts +++ b/src/sdk/models/errors/gethomedata.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetHomeDataPlexErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetHomeDataPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetHomeDataUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetHomeDataPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetHomeDataUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetHomeDataPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetHomeDataUnauthorizedData; - constructor(err: GetHomeDataPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetHomeDataUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetHomeDataPlexResponseBody"; - } + this.name = "GetHomeDataUnauthorized"; + } } export type GetHomeDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetHomeDataResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetHomeDataBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetHomeDataResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetHomeDataBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetHomeDataResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetHomeDataBadRequestData; - constructor(err: GetHomeDataResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetHomeDataBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetHomeDataResponseBody"; - } + this.name = "GetHomeDataBadRequest"; + } } /** @internal */ export const GetHomeDataPlexErrors$inboundSchema: z.ZodType< - GetHomeDataPlexErrors, - z.ZodTypeDef, - unknown + GetHomeDataPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetHomeDataPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetHomeDataPlexErrors$outboundSchema: z.ZodType< - GetHomeDataPlexErrors$Outbound, - z.ZodTypeDef, - GetHomeDataPlexErrors + GetHomeDataPlexErrors$Outbound, + z.ZodTypeDef, + GetHomeDataPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,98 @@ export const GetHomeDataPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetHomeDataPlexErrors$ { - /** @deprecated use `GetHomeDataPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataPlexErrors$inboundSchema; - /** @deprecated use `GetHomeDataPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataPlexErrors$outboundSchema; - /** @deprecated use `GetHomeDataPlexErrors$Outbound` instead. */ - export type Outbound = GetHomeDataPlexErrors$Outbound; + /** @deprecated use `GetHomeDataPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataPlexErrors$inboundSchema; + /** @deprecated use `GetHomeDataPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataPlexErrors$outboundSchema; + /** @deprecated use `GetHomeDataPlexErrors$Outbound` instead. */ + export type Outbound = GetHomeDataPlexErrors$Outbound; } /** @internal */ -export const GetHomeDataPlexResponseBody$inboundSchema: z.ZodType< - GetHomeDataPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetHomeDataPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetHomeDataPlexResponseBody(remapped); +export const GetHomeDataUnauthorized$inboundSchema: z.ZodType< + GetHomeDataUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetHomeDataPlexErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetHomeDataUnauthorized(remapped); + }); + /** @internal */ -export type GetHomeDataPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetHomeDataUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetHomeDataPlexResponseBody$outboundSchema: z.ZodType< - GetHomeDataPlexResponseBody$Outbound, - z.ZodTypeDef, - GetHomeDataPlexResponseBody -> = z - .instanceof(GetHomeDataPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetHomeDataPlexErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetHomeDataUnauthorized$outboundSchema: z.ZodType< + GetHomeDataUnauthorized$Outbound, + z.ZodTypeDef, + GetHomeDataUnauthorized +> = z.instanceof(GetHomeDataUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetHomeDataPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetHomeDataPlexResponseBody$ { - /** @deprecated use `GetHomeDataPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataPlexResponseBody$inboundSchema; - /** @deprecated use `GetHomeDataPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataPlexResponseBody$outboundSchema; - /** @deprecated use `GetHomeDataPlexResponseBody$Outbound` instead. */ - export type Outbound = GetHomeDataPlexResponseBody$Outbound; +export namespace GetHomeDataUnauthorized$ { + /** @deprecated use `GetHomeDataUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataUnauthorized$inboundSchema; + /** @deprecated use `GetHomeDataUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataUnauthorized$outboundSchema; + /** @deprecated use `GetHomeDataUnauthorized$Outbound` instead. */ + export type Outbound = GetHomeDataUnauthorized$Outbound; } /** @internal */ -export const GetHomeDataErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetHomeDataErrors$inboundSchema: z.ZodType< + GetHomeDataErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetHomeDataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetHomeDataErrors$outboundSchema: z.ZodType< - GetHomeDataErrors$Outbound, - z.ZodTypeDef, - GetHomeDataErrors + GetHomeDataErrors$Outbound, + z.ZodTypeDef, + GetHomeDataErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +226,67 @@ export const GetHomeDataErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetHomeDataErrors$ { - /** @deprecated use `GetHomeDataErrors$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataErrors$inboundSchema; - /** @deprecated use `GetHomeDataErrors$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataErrors$outboundSchema; - /** @deprecated use `GetHomeDataErrors$Outbound` instead. */ - export type Outbound = GetHomeDataErrors$Outbound; + /** @deprecated use `GetHomeDataErrors$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataErrors$inboundSchema; + /** @deprecated use `GetHomeDataErrors$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataErrors$outboundSchema; + /** @deprecated use `GetHomeDataErrors$Outbound` instead. */ + export type Outbound = GetHomeDataErrors$Outbound; } /** @internal */ -export const GetHomeDataResponseBody$inboundSchema: z.ZodType< - GetHomeDataResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetHomeDataErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetHomeDataResponseBody(remapped); +export const GetHomeDataBadRequest$inboundSchema: z.ZodType< + GetHomeDataBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetHomeDataErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetHomeDataBadRequest(remapped); + }); + /** @internal */ -export type GetHomeDataResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetHomeDataBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetHomeDataResponseBody$outboundSchema: z.ZodType< - GetHomeDataResponseBody$Outbound, - z.ZodTypeDef, - GetHomeDataResponseBody -> = z - .instanceof(GetHomeDataResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetHomeDataErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetHomeDataBadRequest$outboundSchema: z.ZodType< + GetHomeDataBadRequest$Outbound, + z.ZodTypeDef, + GetHomeDataBadRequest +> = z.instanceof(GetHomeDataBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetHomeDataErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetHomeDataResponseBody$ { - /** @deprecated use `GetHomeDataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataResponseBody$inboundSchema; - /** @deprecated use `GetHomeDataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataResponseBody$outboundSchema; - /** @deprecated use `GetHomeDataResponseBody$Outbound` instead. */ - export type Outbound = GetHomeDataResponseBody$Outbound; +export namespace GetHomeDataBadRequest$ { + /** @deprecated use `GetHomeDataBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataBadRequest$inboundSchema; + /** @deprecated use `GetHomeDataBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataBadRequest$outboundSchema; + /** @deprecated use `GetHomeDataBadRequest$Outbound` instead. */ + export type Outbound = GetHomeDataBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getlibrarydetails.ts b/src/sdk/models/errors/getlibrarydetails.ts index ac61e21b..198cd352 100644 --- a/src/sdk/models/errors/getlibrarydetails.ts +++ b/src/sdk/models/errors/getlibrarydetails.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetLibraryDetailsLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetLibraryDetailsLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryDetailsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetLibraryDetailsLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryDetailsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryDetailsLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryDetailsUnauthorizedData; - constructor(err: GetLibraryDetailsLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryDetailsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryDetailsLibraryResponseBody"; - } + this.name = "GetLibraryDetailsUnauthorized"; + } } export type GetLibraryDetailsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetLibraryDetailsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryDetailsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetLibraryDetailsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryDetailsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryDetailsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryDetailsBadRequestData; - constructor(err: GetLibraryDetailsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryDetailsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryDetailsResponseBody"; - } + this.name = "GetLibraryDetailsBadRequest"; + } } /** @internal */ export const GetLibraryDetailsLibraryErrors$inboundSchema: z.ZodType< - GetLibraryDetailsLibraryErrors, - z.ZodTypeDef, - unknown + GetLibraryDetailsLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryDetailsLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryDetailsLibraryErrors$outboundSchema: z.ZodType< - GetLibraryDetailsLibraryErrors$Outbound, - z.ZodTypeDef, - GetLibraryDetailsLibraryErrors + GetLibraryDetailsLibraryErrors$Outbound, + z.ZodTypeDef, + GetLibraryDetailsLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetLibraryDetailsLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsLibraryErrors$ { - /** @deprecated use `GetLibraryDetailsLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsLibraryErrors$inboundSchema; - /** @deprecated use `GetLibraryDetailsLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsLibraryErrors$outboundSchema; - /** @deprecated use `GetLibraryDetailsLibraryErrors$Outbound` instead. */ - export type Outbound = GetLibraryDetailsLibraryErrors$Outbound; + /** @deprecated use `GetLibraryDetailsLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsLibraryErrors$inboundSchema; + /** @deprecated use `GetLibraryDetailsLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsLibraryErrors$outboundSchema; + /** @deprecated use `GetLibraryDetailsLibraryErrors$Outbound` instead. */ + export type Outbound = GetLibraryDetailsLibraryErrors$Outbound; } /** @internal */ -export const GetLibraryDetailsLibraryResponseBody$inboundSchema: z.ZodType< - GetLibraryDetailsLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryDetailsLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryDetailsLibraryResponseBody(remapped); +export const GetLibraryDetailsUnauthorized$inboundSchema: z.ZodType< + GetLibraryDetailsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryDetailsLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryDetailsUnauthorized(remapped); + }); + /** @internal */ -export type GetLibraryDetailsLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryDetailsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryDetailsLibraryResponseBody$outboundSchema: z.ZodType< - GetLibraryDetailsLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryDetailsLibraryResponseBody -> = z - .instanceof(GetLibraryDetailsLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetLibraryDetailsLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryDetailsUnauthorized$outboundSchema: z.ZodType< + GetLibraryDetailsUnauthorized$Outbound, + z.ZodTypeDef, + GetLibraryDetailsUnauthorized +> = z.instanceof(GetLibraryDetailsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetLibraryDetailsLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryDetailsLibraryResponseBody$ { - /** @deprecated use `GetLibraryDetailsLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsLibraryResponseBody$inboundSchema; - /** @deprecated use `GetLibraryDetailsLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsLibraryResponseBody$outboundSchema; - /** @deprecated use `GetLibraryDetailsLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryDetailsLibraryResponseBody$Outbound; +export namespace GetLibraryDetailsUnauthorized$ { + /** @deprecated use `GetLibraryDetailsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsUnauthorized$inboundSchema; + /** @deprecated use `GetLibraryDetailsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsUnauthorized$outboundSchema; + /** @deprecated use `GetLibraryDetailsUnauthorized$Outbound` instead. */ + export type Outbound = GetLibraryDetailsUnauthorized$Outbound; } /** @internal */ export const GetLibraryDetailsErrors$inboundSchema: z.ZodType< - GetLibraryDetailsErrors, - z.ZodTypeDef, - unknown + GetLibraryDetailsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryDetailsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryDetailsErrors$outboundSchema: z.ZodType< - GetLibraryDetailsErrors$Outbound, - z.ZodTypeDef, - GetLibraryDetailsErrors + GetLibraryDetailsErrors$Outbound, + z.ZodTypeDef, + GetLibraryDetailsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetLibraryDetailsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsErrors$ { - /** @deprecated use `GetLibraryDetailsErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsErrors$inboundSchema; - /** @deprecated use `GetLibraryDetailsErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsErrors$outboundSchema; - /** @deprecated use `GetLibraryDetailsErrors$Outbound` instead. */ - export type Outbound = GetLibraryDetailsErrors$Outbound; + /** @deprecated use `GetLibraryDetailsErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsErrors$inboundSchema; + /** @deprecated use `GetLibraryDetailsErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsErrors$outboundSchema; + /** @deprecated use `GetLibraryDetailsErrors$Outbound` instead. */ + export type Outbound = GetLibraryDetailsErrors$Outbound; } /** @internal */ -export const GetLibraryDetailsResponseBody$inboundSchema: z.ZodType< - GetLibraryDetailsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryDetailsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryDetailsResponseBody(remapped); +export const GetLibraryDetailsBadRequest$inboundSchema: z.ZodType< + GetLibraryDetailsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryDetailsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryDetailsBadRequest(remapped); + }); + /** @internal */ -export type GetLibraryDetailsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryDetailsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryDetailsResponseBody$outboundSchema: z.ZodType< - GetLibraryDetailsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryDetailsResponseBody -> = z - .instanceof(GetLibraryDetailsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetLibraryDetailsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryDetailsBadRequest$outboundSchema: z.ZodType< + GetLibraryDetailsBadRequest$Outbound, + z.ZodTypeDef, + GetLibraryDetailsBadRequest +> = z.instanceof(GetLibraryDetailsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetLibraryDetailsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryDetailsResponseBody$ { - /** @deprecated use `GetLibraryDetailsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryDetailsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryDetailsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryDetailsResponseBody$Outbound; +export namespace GetLibraryDetailsBadRequest$ { + /** @deprecated use `GetLibraryDetailsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsBadRequest$inboundSchema; + /** @deprecated use `GetLibraryDetailsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsBadRequest$outboundSchema; + /** @deprecated use `GetLibraryDetailsBadRequest$Outbound` instead. */ + export type Outbound = GetLibraryDetailsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getlibraryhubs.ts b/src/sdk/models/errors/getlibraryhubs.ts index 449d1bea..9d37a84d 100644 --- a/src/sdk/models/errors/getlibraryhubs.ts +++ b/src/sdk/models/errors/getlibraryhubs.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetLibraryHubsHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetLibraryHubsHubsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryHubsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetLibraryHubsHubsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryHubsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryHubsHubsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryHubsUnauthorizedData; - constructor(err: GetLibraryHubsHubsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryHubsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryHubsHubsResponseBody"; - } + this.name = "GetLibraryHubsUnauthorized"; + } } export type GetLibraryHubsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetLibraryHubsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryHubsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetLibraryHubsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryHubsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryHubsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryHubsBadRequestData; - constructor(err: GetLibraryHubsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryHubsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryHubsResponseBody"; - } + this.name = "GetLibraryHubsBadRequest"; + } } /** @internal */ export const GetLibraryHubsHubsErrors$inboundSchema: z.ZodType< - GetLibraryHubsHubsErrors, - z.ZodTypeDef, - unknown + GetLibraryHubsHubsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryHubsHubsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryHubsHubsErrors$outboundSchema: z.ZodType< - GetLibraryHubsHubsErrors$Outbound, - z.ZodTypeDef, - GetLibraryHubsHubsErrors + GetLibraryHubsHubsErrors$Outbound, + z.ZodTypeDef, + GetLibraryHubsHubsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetLibraryHubsHubsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsHubsErrors$ { - /** @deprecated use `GetLibraryHubsHubsErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsHubsErrors$inboundSchema; - /** @deprecated use `GetLibraryHubsHubsErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsHubsErrors$outboundSchema; - /** @deprecated use `GetLibraryHubsHubsErrors$Outbound` instead. */ - export type Outbound = GetLibraryHubsHubsErrors$Outbound; + /** @deprecated use `GetLibraryHubsHubsErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsHubsErrors$inboundSchema; + /** @deprecated use `GetLibraryHubsHubsErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsHubsErrors$outboundSchema; + /** @deprecated use `GetLibraryHubsHubsErrors$Outbound` instead. */ + export type Outbound = GetLibraryHubsHubsErrors$Outbound; } /** @internal */ -export const GetLibraryHubsHubsResponseBody$inboundSchema: z.ZodType< - GetLibraryHubsHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryHubsHubsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryHubsHubsResponseBody(remapped); +export const GetLibraryHubsUnauthorized$inboundSchema: z.ZodType< + GetLibraryHubsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryHubsHubsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryHubsUnauthorized(remapped); + }); + /** @internal */ -export type GetLibraryHubsHubsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryHubsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryHubsHubsResponseBody$outboundSchema: z.ZodType< - GetLibraryHubsHubsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryHubsHubsResponseBody -> = z - .instanceof(GetLibraryHubsHubsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetLibraryHubsHubsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryHubsUnauthorized$outboundSchema: z.ZodType< + GetLibraryHubsUnauthorized$Outbound, + z.ZodTypeDef, + GetLibraryHubsUnauthorized +> = z.instanceof(GetLibraryHubsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetLibraryHubsHubsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryHubsHubsResponseBody$ { - /** @deprecated use `GetLibraryHubsHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsHubsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryHubsHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsHubsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryHubsHubsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryHubsHubsResponseBody$Outbound; +export namespace GetLibraryHubsUnauthorized$ { + /** @deprecated use `GetLibraryHubsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsUnauthorized$inboundSchema; + /** @deprecated use `GetLibraryHubsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsUnauthorized$outboundSchema; + /** @deprecated use `GetLibraryHubsUnauthorized$Outbound` instead. */ + export type Outbound = GetLibraryHubsUnauthorized$Outbound; } /** @internal */ export const GetLibraryHubsErrors$inboundSchema: z.ZodType< - GetLibraryHubsErrors, - z.ZodTypeDef, - unknown + GetLibraryHubsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryHubsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryHubsErrors$outboundSchema: z.ZodType< - GetLibraryHubsErrors$Outbound, - z.ZodTypeDef, - GetLibraryHubsErrors + GetLibraryHubsErrors$Outbound, + z.ZodTypeDef, + GetLibraryHubsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetLibraryHubsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsErrors$ { - /** @deprecated use `GetLibraryHubsErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsErrors$inboundSchema; - /** @deprecated use `GetLibraryHubsErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsErrors$outboundSchema; - /** @deprecated use `GetLibraryHubsErrors$Outbound` instead. */ - export type Outbound = GetLibraryHubsErrors$Outbound; + /** @deprecated use `GetLibraryHubsErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsErrors$inboundSchema; + /** @deprecated use `GetLibraryHubsErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsErrors$outboundSchema; + /** @deprecated use `GetLibraryHubsErrors$Outbound` instead. */ + export type Outbound = GetLibraryHubsErrors$Outbound; } /** @internal */ -export const GetLibraryHubsResponseBody$inboundSchema: z.ZodType< - GetLibraryHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryHubsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryHubsResponseBody(remapped); +export const GetLibraryHubsBadRequest$inboundSchema: z.ZodType< + GetLibraryHubsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryHubsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryHubsBadRequest(remapped); + }); + /** @internal */ -export type GetLibraryHubsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryHubsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryHubsResponseBody$outboundSchema: z.ZodType< - GetLibraryHubsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryHubsResponseBody -> = z - .instanceof(GetLibraryHubsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetLibraryHubsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryHubsBadRequest$outboundSchema: z.ZodType< + GetLibraryHubsBadRequest$Outbound, + z.ZodTypeDef, + GetLibraryHubsBadRequest +> = z.instanceof(GetLibraryHubsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetLibraryHubsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryHubsResponseBody$ { - /** @deprecated use `GetLibraryHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryHubsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryHubsResponseBody$Outbound; +export namespace GetLibraryHubsBadRequest$ { + /** @deprecated use `GetLibraryHubsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsBadRequest$inboundSchema; + /** @deprecated use `GetLibraryHubsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsBadRequest$outboundSchema; + /** @deprecated use `GetLibraryHubsBadRequest$Outbound` instead. */ + export type Outbound = GetLibraryHubsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getlibraryitems.ts b/src/sdk/models/errors/getlibraryitems.ts index b84d0c89..7026699d 100644 --- a/src/sdk/models/errors/getlibraryitems.ts +++ b/src/sdk/models/errors/getlibraryitems.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetLibraryItemsLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetLibraryItemsLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryItemsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetLibraryItemsLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryItemsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryItemsLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryItemsUnauthorizedData; - constructor(err: GetLibraryItemsLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryItemsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryItemsLibraryResponseBody"; - } + this.name = "GetLibraryItemsUnauthorized"; + } } export type GetLibraryItemsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetLibraryItemsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetLibraryItemsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetLibraryItemsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetLibraryItemsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetLibraryItemsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetLibraryItemsBadRequestData; - constructor(err: GetLibraryItemsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetLibraryItemsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetLibraryItemsResponseBody"; - } + this.name = "GetLibraryItemsBadRequest"; + } } /** @internal */ export const GetLibraryItemsLibraryErrors$inboundSchema: z.ZodType< - GetLibraryItemsLibraryErrors, - z.ZodTypeDef, - unknown + GetLibraryItemsLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryItemsLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryItemsLibraryErrors$outboundSchema: z.ZodType< - GetLibraryItemsLibraryErrors$Outbound, - z.ZodTypeDef, - GetLibraryItemsLibraryErrors + GetLibraryItemsLibraryErrors$Outbound, + z.ZodTypeDef, + GetLibraryItemsLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetLibraryItemsLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsLibraryErrors$ { - /** @deprecated use `GetLibraryItemsLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsLibraryErrors$inboundSchema; - /** @deprecated use `GetLibraryItemsLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsLibraryErrors$outboundSchema; - /** @deprecated use `GetLibraryItemsLibraryErrors$Outbound` instead. */ - export type Outbound = GetLibraryItemsLibraryErrors$Outbound; + /** @deprecated use `GetLibraryItemsLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsLibraryErrors$inboundSchema; + /** @deprecated use `GetLibraryItemsLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsLibraryErrors$outboundSchema; + /** @deprecated use `GetLibraryItemsLibraryErrors$Outbound` instead. */ + export type Outbound = GetLibraryItemsLibraryErrors$Outbound; } /** @internal */ -export const GetLibraryItemsLibraryResponseBody$inboundSchema: z.ZodType< - GetLibraryItemsLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryItemsLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryItemsLibraryResponseBody(remapped); +export const GetLibraryItemsUnauthorized$inboundSchema: z.ZodType< + GetLibraryItemsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryItemsLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryItemsUnauthorized(remapped); + }); + /** @internal */ -export type GetLibraryItemsLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryItemsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryItemsLibraryResponseBody$outboundSchema: z.ZodType< - GetLibraryItemsLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryItemsLibraryResponseBody -> = z - .instanceof(GetLibraryItemsLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetLibraryItemsLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryItemsUnauthorized$outboundSchema: z.ZodType< + GetLibraryItemsUnauthorized$Outbound, + z.ZodTypeDef, + GetLibraryItemsUnauthorized +> = z.instanceof(GetLibraryItemsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetLibraryItemsLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryItemsLibraryResponseBody$ { - /** @deprecated use `GetLibraryItemsLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsLibraryResponseBody$inboundSchema; - /** @deprecated use `GetLibraryItemsLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsLibraryResponseBody$outboundSchema; - /** @deprecated use `GetLibraryItemsLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryItemsLibraryResponseBody$Outbound; +export namespace GetLibraryItemsUnauthorized$ { + /** @deprecated use `GetLibraryItemsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsUnauthorized$inboundSchema; + /** @deprecated use `GetLibraryItemsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsUnauthorized$outboundSchema; + /** @deprecated use `GetLibraryItemsUnauthorized$Outbound` instead. */ + export type Outbound = GetLibraryItemsUnauthorized$Outbound; } /** @internal */ export const GetLibraryItemsErrors$inboundSchema: z.ZodType< - GetLibraryItemsErrors, - z.ZodTypeDef, - unknown + GetLibraryItemsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetLibraryItemsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetLibraryItemsErrors$outboundSchema: z.ZodType< - GetLibraryItemsErrors$Outbound, - z.ZodTypeDef, - GetLibraryItemsErrors + GetLibraryItemsErrors$Outbound, + z.ZodTypeDef, + GetLibraryItemsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetLibraryItemsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsErrors$ { - /** @deprecated use `GetLibraryItemsErrors$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsErrors$inboundSchema; - /** @deprecated use `GetLibraryItemsErrors$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsErrors$outboundSchema; - /** @deprecated use `GetLibraryItemsErrors$Outbound` instead. */ - export type Outbound = GetLibraryItemsErrors$Outbound; + /** @deprecated use `GetLibraryItemsErrors$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsErrors$inboundSchema; + /** @deprecated use `GetLibraryItemsErrors$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsErrors$outboundSchema; + /** @deprecated use `GetLibraryItemsErrors$Outbound` instead. */ + export type Outbound = GetLibraryItemsErrors$Outbound; } /** @internal */ -export const GetLibraryItemsResponseBody$inboundSchema: z.ZodType< - GetLibraryItemsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetLibraryItemsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetLibraryItemsResponseBody(remapped); +export const GetLibraryItemsBadRequest$inboundSchema: z.ZodType< + GetLibraryItemsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetLibraryItemsBadRequest(remapped); + }); + /** @internal */ -export type GetLibraryItemsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetLibraryItemsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetLibraryItemsResponseBody$outboundSchema: z.ZodType< - GetLibraryItemsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryItemsResponseBody -> = z - .instanceof(GetLibraryItemsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetLibraryItemsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetLibraryItemsBadRequest$outboundSchema: z.ZodType< + GetLibraryItemsBadRequest$Outbound, + z.ZodTypeDef, + GetLibraryItemsBadRequest +> = z.instanceof(GetLibraryItemsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetLibraryItemsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetLibraryItemsResponseBody$ { - /** @deprecated use `GetLibraryItemsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryItemsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryItemsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryItemsResponseBody$Outbound; +export namespace GetLibraryItemsBadRequest$ { + /** @deprecated use `GetLibraryItemsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsBadRequest$inboundSchema; + /** @deprecated use `GetLibraryItemsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsBadRequest$outboundSchema; + /** @deprecated use `GetLibraryItemsBadRequest$Outbound` instead. */ + export type Outbound = GetLibraryItemsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getmediaproviders.ts b/src/sdk/models/errors/getmediaproviders.ts index 3e1ec109..ee1cb2f8 100644 --- a/src/sdk/models/errors/getmediaproviders.ts +++ b/src/sdk/models/errors/getmediaproviders.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMediaProvidersServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetMediaProvidersServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMediaProvidersUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetMediaProvidersServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMediaProvidersUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMediaProvidersServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMediaProvidersUnauthorizedData; - constructor(err: GetMediaProvidersServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMediaProvidersUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMediaProvidersServerResponseBody"; - } + this.name = "GetMediaProvidersUnauthorized"; + } } export type GetMediaProvidersErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetMediaProvidersResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMediaProvidersBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetMediaProvidersResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMediaProvidersBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMediaProvidersResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMediaProvidersBadRequestData; - constructor(err: GetMediaProvidersResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMediaProvidersBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMediaProvidersResponseBody"; - } + this.name = "GetMediaProvidersBadRequest"; + } } /** @internal */ export const GetMediaProvidersServerErrors$inboundSchema: z.ZodType< - GetMediaProvidersServerErrors, - z.ZodTypeDef, - unknown + GetMediaProvidersServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMediaProvidersServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMediaProvidersServerErrors$outboundSchema: z.ZodType< - GetMediaProvidersServerErrors$Outbound, - z.ZodTypeDef, - GetMediaProvidersServerErrors + GetMediaProvidersServerErrors$Outbound, + z.ZodTypeDef, + GetMediaProvidersServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetMediaProvidersServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersServerErrors$ { - /** @deprecated use `GetMediaProvidersServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersServerErrors$inboundSchema; - /** @deprecated use `GetMediaProvidersServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersServerErrors$outboundSchema; - /** @deprecated use `GetMediaProvidersServerErrors$Outbound` instead. */ - export type Outbound = GetMediaProvidersServerErrors$Outbound; + /** @deprecated use `GetMediaProvidersServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersServerErrors$inboundSchema; + /** @deprecated use `GetMediaProvidersServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersServerErrors$outboundSchema; + /** @deprecated use `GetMediaProvidersServerErrors$Outbound` instead. */ + export type Outbound = GetMediaProvidersServerErrors$Outbound; } /** @internal */ -export const GetMediaProvidersServerResponseBody$inboundSchema: z.ZodType< - GetMediaProvidersServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMediaProvidersServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMediaProvidersServerResponseBody(remapped); +export const GetMediaProvidersUnauthorized$inboundSchema: z.ZodType< + GetMediaProvidersUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMediaProvidersServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMediaProvidersUnauthorized(remapped); + }); + /** @internal */ -export type GetMediaProvidersServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMediaProvidersUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMediaProvidersServerResponseBody$outboundSchema: z.ZodType< - GetMediaProvidersServerResponseBody$Outbound, - z.ZodTypeDef, - GetMediaProvidersServerResponseBody -> = z - .instanceof(GetMediaProvidersServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetMediaProvidersServerErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMediaProvidersUnauthorized$outboundSchema: z.ZodType< + GetMediaProvidersUnauthorized$Outbound, + z.ZodTypeDef, + GetMediaProvidersUnauthorized +> = z.instanceof(GetMediaProvidersUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetMediaProvidersServerErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMediaProvidersServerResponseBody$ { - /** @deprecated use `GetMediaProvidersServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersServerResponseBody$inboundSchema; - /** @deprecated use `GetMediaProvidersServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersServerResponseBody$outboundSchema; - /** @deprecated use `GetMediaProvidersServerResponseBody$Outbound` instead. */ - export type Outbound = GetMediaProvidersServerResponseBody$Outbound; +export namespace GetMediaProvidersUnauthorized$ { + /** @deprecated use `GetMediaProvidersUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersUnauthorized$inboundSchema; + /** @deprecated use `GetMediaProvidersUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersUnauthorized$outboundSchema; + /** @deprecated use `GetMediaProvidersUnauthorized$Outbound` instead. */ + export type Outbound = GetMediaProvidersUnauthorized$Outbound; } /** @internal */ export const GetMediaProvidersErrors$inboundSchema: z.ZodType< - GetMediaProvidersErrors, - z.ZodTypeDef, - unknown + GetMediaProvidersErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMediaProvidersErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMediaProvidersErrors$outboundSchema: z.ZodType< - GetMediaProvidersErrors$Outbound, - z.ZodTypeDef, - GetMediaProvidersErrors + GetMediaProvidersErrors$Outbound, + z.ZodTypeDef, + GetMediaProvidersErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetMediaProvidersErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersErrors$ { - /** @deprecated use `GetMediaProvidersErrors$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersErrors$inboundSchema; - /** @deprecated use `GetMediaProvidersErrors$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersErrors$outboundSchema; - /** @deprecated use `GetMediaProvidersErrors$Outbound` instead. */ - export type Outbound = GetMediaProvidersErrors$Outbound; + /** @deprecated use `GetMediaProvidersErrors$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersErrors$inboundSchema; + /** @deprecated use `GetMediaProvidersErrors$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersErrors$outboundSchema; + /** @deprecated use `GetMediaProvidersErrors$Outbound` instead. */ + export type Outbound = GetMediaProvidersErrors$Outbound; } /** @internal */ -export const GetMediaProvidersResponseBody$inboundSchema: z.ZodType< - GetMediaProvidersResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMediaProvidersErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMediaProvidersResponseBody(remapped); +export const GetMediaProvidersBadRequest$inboundSchema: z.ZodType< + GetMediaProvidersBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMediaProvidersErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMediaProvidersBadRequest(remapped); + }); + /** @internal */ -export type GetMediaProvidersResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMediaProvidersBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMediaProvidersResponseBody$outboundSchema: z.ZodType< - GetMediaProvidersResponseBody$Outbound, - z.ZodTypeDef, - GetMediaProvidersResponseBody -> = z - .instanceof(GetMediaProvidersResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetMediaProvidersErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMediaProvidersBadRequest$outboundSchema: z.ZodType< + GetMediaProvidersBadRequest$Outbound, + z.ZodTypeDef, + GetMediaProvidersBadRequest +> = z.instanceof(GetMediaProvidersBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetMediaProvidersErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMediaProvidersResponseBody$ { - /** @deprecated use `GetMediaProvidersResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersResponseBody$inboundSchema; - /** @deprecated use `GetMediaProvidersResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersResponseBody$outboundSchema; - /** @deprecated use `GetMediaProvidersResponseBody$Outbound` instead. */ - export type Outbound = GetMediaProvidersResponseBody$Outbound; +export namespace GetMediaProvidersBadRequest$ { + /** @deprecated use `GetMediaProvidersBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersBadRequest$inboundSchema; + /** @deprecated use `GetMediaProvidersBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersBadRequest$outboundSchema; + /** @deprecated use `GetMediaProvidersBadRequest$Outbound` instead. */ + export type Outbound = GetMediaProvidersBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getmetadatabyratingkey.ts b/src/sdk/models/errors/getmetadatabyratingkey.ts index 4897b274..91f800d1 100644 --- a/src/sdk/models/errors/getmetadatabyratingkey.ts +++ b/src/sdk/models/errors/getmetadatabyratingkey.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMetaDataByRatingKeyLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetMetaDataByRatingKeyLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMetaDataByRatingKeyUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetMetaDataByRatingKeyLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMetaDataByRatingKeyUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMetaDataByRatingKeyLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMetaDataByRatingKeyUnauthorizedData; - constructor(err: GetMetaDataByRatingKeyLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMetaDataByRatingKeyUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMetaDataByRatingKeyLibraryResponseBody"; - } + this.name = "GetMetaDataByRatingKeyUnauthorized"; + } } export type GetMetaDataByRatingKeyErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetMetaDataByRatingKeyResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMetaDataByRatingKeyBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetMetaDataByRatingKeyResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMetaDataByRatingKeyBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMetaDataByRatingKeyResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMetaDataByRatingKeyBadRequestData; - constructor(err: GetMetaDataByRatingKeyResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMetaDataByRatingKeyBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMetaDataByRatingKeyResponseBody"; - } + this.name = "GetMetaDataByRatingKeyBadRequest"; + } } /** @internal */ export const GetMetaDataByRatingKeyLibraryErrors$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyLibraryErrors, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyLibraryErrors$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyLibraryErrors$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyLibraryErrors + GetMetaDataByRatingKeyLibraryErrors$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,104 @@ export const GetMetaDataByRatingKeyLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyLibraryErrors$ { - /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyLibraryErrors$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyLibraryErrors$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyLibraryErrors$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = + GetMetaDataByRatingKeyLibraryErrors$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = + GetMetaDataByRatingKeyLibraryErrors$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyLibraryErrors$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyLibraryErrors$Outbound; } /** @internal */ -export const GetMetaDataByRatingKeyLibraryResponseBody$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMetaDataByRatingKeyLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMetaDataByRatingKeyLibraryResponseBody(remapped); +export const GetMetaDataByRatingKeyUnauthorized$inboundSchema: z.ZodType< + GetMetaDataByRatingKeyUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetMetaDataByRatingKeyLibraryErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMetaDataByRatingKeyUnauthorized(remapped); + }); + /** @internal */ -export type GetMetaDataByRatingKeyLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMetaDataByRatingKeyUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMetaDataByRatingKeyLibraryResponseBody$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyLibraryResponseBody -> = z - .instanceof(GetMetaDataByRatingKeyLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetMetaDataByRatingKeyLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMetaDataByRatingKeyUnauthorized$outboundSchema: z.ZodType< + GetMetaDataByRatingKeyUnauthorized$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyUnauthorized +> = z.instanceof(GetMetaDataByRatingKeyUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetMetaDataByRatingKeyLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMetaDataByRatingKeyLibraryResponseBody$ { - /** @deprecated use `GetMetaDataByRatingKeyLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyLibraryResponseBody$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyLibraryResponseBody$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyLibraryResponseBody$Outbound; +export namespace GetMetaDataByRatingKeyUnauthorized$ { + /** @deprecated use `GetMetaDataByRatingKeyUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyUnauthorized$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetMetaDataByRatingKeyUnauthorized$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyUnauthorized$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyUnauthorized$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyErrors$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyErrors, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyErrors$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyErrors$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyErrors + GetMetaDataByRatingKeyErrors$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,75 +232,68 @@ export const GetMetaDataByRatingKeyErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyErrors$ { - /** @deprecated use `GetMetaDataByRatingKeyErrors$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyErrors$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyErrors$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyErrors$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyErrors$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyErrors$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyErrors$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyErrors$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyErrors$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyErrors$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyErrors$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyErrors$Outbound; } /** @internal */ -export const GetMetaDataByRatingKeyResponseBody$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMetaDataByRatingKeyErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMetaDataByRatingKeyResponseBody(remapped); +export const GetMetaDataByRatingKeyBadRequest$inboundSchema: z.ZodType< + GetMetaDataByRatingKeyBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMetaDataByRatingKeyErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMetaDataByRatingKeyBadRequest(remapped); + }); + /** @internal */ -export type GetMetaDataByRatingKeyResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMetaDataByRatingKeyBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMetaDataByRatingKeyResponseBody$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponseBody$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyResponseBody -> = z - .instanceof(GetMetaDataByRatingKeyResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetMetaDataByRatingKeyErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMetaDataByRatingKeyBadRequest$outboundSchema: z.ZodType< + GetMetaDataByRatingKeyBadRequest$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyBadRequest +> = z.instanceof(GetMetaDataByRatingKeyBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetMetaDataByRatingKeyErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMetaDataByRatingKeyResponseBody$ { - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyResponseBody$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyResponseBody$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyResponseBody$Outbound; +export namespace GetMetaDataByRatingKeyBadRequest$ { + /** @deprecated use `GetMetaDataByRatingKeyBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyBadRequest$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyBadRequest$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyBadRequest$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getmetadatachildren.ts b/src/sdk/models/errors/getmetadatachildren.ts index 349ad42c..8b66b40c 100644 --- a/src/sdk/models/errors/getmetadatachildren.ts +++ b/src/sdk/models/errors/getmetadatachildren.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMetadataChildrenLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetMetadataChildrenLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMetadataChildrenUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetMetadataChildrenLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMetadataChildrenUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMetadataChildrenLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMetadataChildrenUnauthorizedData; - constructor(err: GetMetadataChildrenLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMetadataChildrenUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMetadataChildrenLibraryResponseBody"; - } + this.name = "GetMetadataChildrenUnauthorized"; + } } export type GetMetadataChildrenErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetMetadataChildrenResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMetadataChildrenBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetMetadataChildrenResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMetadataChildrenBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMetadataChildrenResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMetadataChildrenBadRequestData; - constructor(err: GetMetadataChildrenResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMetadataChildrenBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMetadataChildrenResponseBody"; - } + this.name = "GetMetadataChildrenBadRequest"; + } } /** @internal */ export const GetMetadataChildrenLibraryErrors$inboundSchema: z.ZodType< - GetMetadataChildrenLibraryErrors, - z.ZodTypeDef, - unknown + GetMetadataChildrenLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMetadataChildrenLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMetadataChildrenLibraryErrors$outboundSchema: z.ZodType< - GetMetadataChildrenLibraryErrors$Outbound, - z.ZodTypeDef, - GetMetadataChildrenLibraryErrors + GetMetadataChildrenLibraryErrors$Outbound, + z.ZodTypeDef, + GetMetadataChildrenLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetMetadataChildrenLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenLibraryErrors$ { - /** @deprecated use `GetMetadataChildrenLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenLibraryErrors$inboundSchema; - /** @deprecated use `GetMetadataChildrenLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenLibraryErrors$outboundSchema; - /** @deprecated use `GetMetadataChildrenLibraryErrors$Outbound` instead. */ - export type Outbound = GetMetadataChildrenLibraryErrors$Outbound; + /** @deprecated use `GetMetadataChildrenLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenLibraryErrors$inboundSchema; + /** @deprecated use `GetMetadataChildrenLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenLibraryErrors$outboundSchema; + /** @deprecated use `GetMetadataChildrenLibraryErrors$Outbound` instead. */ + export type Outbound = GetMetadataChildrenLibraryErrors$Outbound; } /** @internal */ -export const GetMetadataChildrenLibraryResponseBody$inboundSchema: z.ZodType< - GetMetadataChildrenLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMetadataChildrenLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMetadataChildrenLibraryResponseBody(remapped); +export const GetMetadataChildrenUnauthorized$inboundSchema: z.ZodType< + GetMetadataChildrenUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMetadataChildrenLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMetadataChildrenUnauthorized(remapped); + }); + /** @internal */ -export type GetMetadataChildrenLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMetadataChildrenUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMetadataChildrenLibraryResponseBody$outboundSchema: z.ZodType< - GetMetadataChildrenLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetMetadataChildrenLibraryResponseBody -> = z - .instanceof(GetMetadataChildrenLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetMetadataChildrenLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMetadataChildrenUnauthorized$outboundSchema: z.ZodType< + GetMetadataChildrenUnauthorized$Outbound, + z.ZodTypeDef, + GetMetadataChildrenUnauthorized +> = z.instanceof(GetMetadataChildrenUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetMetadataChildrenLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMetadataChildrenLibraryResponseBody$ { - /** @deprecated use `GetMetadataChildrenLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenLibraryResponseBody$inboundSchema; - /** @deprecated use `GetMetadataChildrenLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenLibraryResponseBody$outboundSchema; - /** @deprecated use `GetMetadataChildrenLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetMetadataChildrenLibraryResponseBody$Outbound; +export namespace GetMetadataChildrenUnauthorized$ { + /** @deprecated use `GetMetadataChildrenUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenUnauthorized$inboundSchema; + /** @deprecated use `GetMetadataChildrenUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenUnauthorized$outboundSchema; + /** @deprecated use `GetMetadataChildrenUnauthorized$Outbound` instead. */ + export type Outbound = GetMetadataChildrenUnauthorized$Outbound; } /** @internal */ export const GetMetadataChildrenErrors$inboundSchema: z.ZodType< - GetMetadataChildrenErrors, - z.ZodTypeDef, - unknown + GetMetadataChildrenErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMetadataChildrenErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMetadataChildrenErrors$outboundSchema: z.ZodType< - GetMetadataChildrenErrors$Outbound, - z.ZodTypeDef, - GetMetadataChildrenErrors + GetMetadataChildrenErrors$Outbound, + z.ZodTypeDef, + GetMetadataChildrenErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetMetadataChildrenErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenErrors$ { - /** @deprecated use `GetMetadataChildrenErrors$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenErrors$inboundSchema; - /** @deprecated use `GetMetadataChildrenErrors$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenErrors$outboundSchema; - /** @deprecated use `GetMetadataChildrenErrors$Outbound` instead. */ - export type Outbound = GetMetadataChildrenErrors$Outbound; + /** @deprecated use `GetMetadataChildrenErrors$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenErrors$inboundSchema; + /** @deprecated use `GetMetadataChildrenErrors$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenErrors$outboundSchema; + /** @deprecated use `GetMetadataChildrenErrors$Outbound` instead. */ + export type Outbound = GetMetadataChildrenErrors$Outbound; } /** @internal */ -export const GetMetadataChildrenResponseBody$inboundSchema: z.ZodType< - GetMetadataChildrenResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMetadataChildrenErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMetadataChildrenResponseBody(remapped); +export const GetMetadataChildrenBadRequest$inboundSchema: z.ZodType< + GetMetadataChildrenBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMetadataChildrenErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMetadataChildrenBadRequest(remapped); + }); + /** @internal */ -export type GetMetadataChildrenResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMetadataChildrenBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMetadataChildrenResponseBody$outboundSchema: z.ZodType< - GetMetadataChildrenResponseBody$Outbound, - z.ZodTypeDef, - GetMetadataChildrenResponseBody -> = z - .instanceof(GetMetadataChildrenResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetMetadataChildrenErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMetadataChildrenBadRequest$outboundSchema: z.ZodType< + GetMetadataChildrenBadRequest$Outbound, + z.ZodTypeDef, + GetMetadataChildrenBadRequest +> = z.instanceof(GetMetadataChildrenBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetMetadataChildrenErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMetadataChildrenResponseBody$ { - /** @deprecated use `GetMetadataChildrenResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenResponseBody$inboundSchema; - /** @deprecated use `GetMetadataChildrenResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenResponseBody$outboundSchema; - /** @deprecated use `GetMetadataChildrenResponseBody$Outbound` instead. */ - export type Outbound = GetMetadataChildrenResponseBody$Outbound; +export namespace GetMetadataChildrenBadRequest$ { + /** @deprecated use `GetMetadataChildrenBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenBadRequest$inboundSchema; + /** @deprecated use `GetMetadataChildrenBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenBadRequest$outboundSchema; + /** @deprecated use `GetMetadataChildrenBadRequest$Outbound` instead. */ + export type Outbound = GetMetadataChildrenBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getmyplexaccount.ts b/src/sdk/models/errors/getmyplexaccount.ts index fe75dd8b..b23574f2 100644 --- a/src/sdk/models/errors/getmyplexaccount.ts +++ b/src/sdk/models/errors/getmyplexaccount.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMyPlexAccountServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetMyPlexAccountServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMyPlexAccountUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetMyPlexAccountServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMyPlexAccountUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMyPlexAccountServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMyPlexAccountUnauthorizedData; - constructor(err: GetMyPlexAccountServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMyPlexAccountUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMyPlexAccountServerResponseBody"; - } + this.name = "GetMyPlexAccountUnauthorized"; + } } export type GetMyPlexAccountErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetMyPlexAccountResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetMyPlexAccountBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetMyPlexAccountResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetMyPlexAccountBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetMyPlexAccountResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetMyPlexAccountBadRequestData; - constructor(err: GetMyPlexAccountResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetMyPlexAccountBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetMyPlexAccountResponseBody"; - } + this.name = "GetMyPlexAccountBadRequest"; + } } /** @internal */ export const GetMyPlexAccountServerErrors$inboundSchema: z.ZodType< - GetMyPlexAccountServerErrors, - z.ZodTypeDef, - unknown + GetMyPlexAccountServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMyPlexAccountServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMyPlexAccountServerErrors$outboundSchema: z.ZodType< - GetMyPlexAccountServerErrors$Outbound, - z.ZodTypeDef, - GetMyPlexAccountServerErrors + GetMyPlexAccountServerErrors$Outbound, + z.ZodTypeDef, + GetMyPlexAccountServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetMyPlexAccountServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMyPlexAccountServerErrors$ { - /** @deprecated use `GetMyPlexAccountServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountServerErrors$inboundSchema; - /** @deprecated use `GetMyPlexAccountServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountServerErrors$outboundSchema; - /** @deprecated use `GetMyPlexAccountServerErrors$Outbound` instead. */ - export type Outbound = GetMyPlexAccountServerErrors$Outbound; + /** @deprecated use `GetMyPlexAccountServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountServerErrors$inboundSchema; + /** @deprecated use `GetMyPlexAccountServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountServerErrors$outboundSchema; + /** @deprecated use `GetMyPlexAccountServerErrors$Outbound` instead. */ + export type Outbound = GetMyPlexAccountServerErrors$Outbound; } /** @internal */ -export const GetMyPlexAccountServerResponseBody$inboundSchema: z.ZodType< - GetMyPlexAccountServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMyPlexAccountServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMyPlexAccountServerResponseBody(remapped); +export const GetMyPlexAccountUnauthorized$inboundSchema: z.ZodType< + GetMyPlexAccountUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMyPlexAccountServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMyPlexAccountUnauthorized(remapped); + }); + /** @internal */ -export type GetMyPlexAccountServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMyPlexAccountUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMyPlexAccountServerResponseBody$outboundSchema: z.ZodType< - GetMyPlexAccountServerResponseBody$Outbound, - z.ZodTypeDef, - GetMyPlexAccountServerResponseBody -> = z - .instanceof(GetMyPlexAccountServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetMyPlexAccountServerErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMyPlexAccountUnauthorized$outboundSchema: z.ZodType< + GetMyPlexAccountUnauthorized$Outbound, + z.ZodTypeDef, + GetMyPlexAccountUnauthorized +> = z.instanceof(GetMyPlexAccountUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetMyPlexAccountServerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMyPlexAccountServerResponseBody$ { - /** @deprecated use `GetMyPlexAccountServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountServerResponseBody$inboundSchema; - /** @deprecated use `GetMyPlexAccountServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountServerResponseBody$outboundSchema; - /** @deprecated use `GetMyPlexAccountServerResponseBody$Outbound` instead. */ - export type Outbound = GetMyPlexAccountServerResponseBody$Outbound; +export namespace GetMyPlexAccountUnauthorized$ { + /** @deprecated use `GetMyPlexAccountUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountUnauthorized$inboundSchema; + /** @deprecated use `GetMyPlexAccountUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountUnauthorized$outboundSchema; + /** @deprecated use `GetMyPlexAccountUnauthorized$Outbound` instead. */ + export type Outbound = GetMyPlexAccountUnauthorized$Outbound; } /** @internal */ export const GetMyPlexAccountErrors$inboundSchema: z.ZodType< - GetMyPlexAccountErrors, - z.ZodTypeDef, - unknown + GetMyPlexAccountErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetMyPlexAccountErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetMyPlexAccountErrors$outboundSchema: z.ZodType< - GetMyPlexAccountErrors$Outbound, - z.ZodTypeDef, - GetMyPlexAccountErrors + GetMyPlexAccountErrors$Outbound, + z.ZodTypeDef, + GetMyPlexAccountErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,68 @@ export const GetMyPlexAccountErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMyPlexAccountErrors$ { - /** @deprecated use `GetMyPlexAccountErrors$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountErrors$inboundSchema; - /** @deprecated use `GetMyPlexAccountErrors$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountErrors$outboundSchema; - /** @deprecated use `GetMyPlexAccountErrors$Outbound` instead. */ - export type Outbound = GetMyPlexAccountErrors$Outbound; + /** @deprecated use `GetMyPlexAccountErrors$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountErrors$inboundSchema; + /** @deprecated use `GetMyPlexAccountErrors$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountErrors$outboundSchema; + /** @deprecated use `GetMyPlexAccountErrors$Outbound` instead. */ + export type Outbound = GetMyPlexAccountErrors$Outbound; } /** @internal */ -export const GetMyPlexAccountResponseBody$inboundSchema: z.ZodType< - GetMyPlexAccountResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetMyPlexAccountErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetMyPlexAccountResponseBody(remapped); +export const GetMyPlexAccountBadRequest$inboundSchema: z.ZodType< + GetMyPlexAccountBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetMyPlexAccountErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetMyPlexAccountBadRequest(remapped); + }); + /** @internal */ -export type GetMyPlexAccountResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetMyPlexAccountBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetMyPlexAccountResponseBody$outboundSchema: z.ZodType< - GetMyPlexAccountResponseBody$Outbound, - z.ZodTypeDef, - GetMyPlexAccountResponseBody -> = z - .instanceof(GetMyPlexAccountResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetMyPlexAccountErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetMyPlexAccountBadRequest$outboundSchema: z.ZodType< + GetMyPlexAccountBadRequest$Outbound, + z.ZodTypeDef, + GetMyPlexAccountBadRequest +> = z.instanceof(GetMyPlexAccountBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetMyPlexAccountErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetMyPlexAccountResponseBody$ { - /** @deprecated use `GetMyPlexAccountResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountResponseBody$inboundSchema; - /** @deprecated use `GetMyPlexAccountResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountResponseBody$outboundSchema; - /** @deprecated use `GetMyPlexAccountResponseBody$Outbound` instead. */ - export type Outbound = GetMyPlexAccountResponseBody$Outbound; +export namespace GetMyPlexAccountBadRequest$ { + /** @deprecated use `GetMyPlexAccountBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountBadRequest$inboundSchema; + /** @deprecated use `GetMyPlexAccountBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountBadRequest$outboundSchema; + /** @deprecated use `GetMyPlexAccountBadRequest$Outbound` instead. */ + export type Outbound = GetMyPlexAccountBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getondeck.ts b/src/sdk/models/errors/getondeck.ts index cb639b9c..0bced3d0 100644 --- a/src/sdk/models/errors/getondeck.ts +++ b/src/sdk/models/errors/getondeck.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetOnDeckLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetOnDeckLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetOnDeckUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetOnDeckLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetOnDeckUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetOnDeckLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetOnDeckUnauthorizedData; - constructor(err: GetOnDeckLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetOnDeckUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetOnDeckLibraryResponseBody"; - } + this.name = "GetOnDeckUnauthorized"; + } } export type GetOnDeckErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetOnDeckResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetOnDeckBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetOnDeckResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetOnDeckBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetOnDeckResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetOnDeckBadRequestData; - constructor(err: GetOnDeckResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetOnDeckBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetOnDeckResponseBody"; - } + this.name = "GetOnDeckBadRequest"; + } } /** @internal */ export const GetOnDeckLibraryErrors$inboundSchema: z.ZodType< - GetOnDeckLibraryErrors, - z.ZodTypeDef, - unknown + GetOnDeckLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetOnDeckLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetOnDeckLibraryErrors$outboundSchema: z.ZodType< - GetOnDeckLibraryErrors$Outbound, - z.ZodTypeDef, - GetOnDeckLibraryErrors + GetOnDeckLibraryErrors$Outbound, + z.ZodTypeDef, + GetOnDeckLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetOnDeckLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckLibraryErrors$ { - /** @deprecated use `GetOnDeckLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckLibraryErrors$inboundSchema; - /** @deprecated use `GetOnDeckLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckLibraryErrors$outboundSchema; - /** @deprecated use `GetOnDeckLibraryErrors$Outbound` instead. */ - export type Outbound = GetOnDeckLibraryErrors$Outbound; + /** @deprecated use `GetOnDeckLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckLibraryErrors$inboundSchema; + /** @deprecated use `GetOnDeckLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckLibraryErrors$outboundSchema; + /** @deprecated use `GetOnDeckLibraryErrors$Outbound` instead. */ + export type Outbound = GetOnDeckLibraryErrors$Outbound; } /** @internal */ -export const GetOnDeckLibraryResponseBody$inboundSchema: z.ZodType< - GetOnDeckLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetOnDeckLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetOnDeckLibraryResponseBody(remapped); +export const GetOnDeckUnauthorized$inboundSchema: z.ZodType< + GetOnDeckUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetOnDeckLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetOnDeckUnauthorized(remapped); + }); + /** @internal */ -export type GetOnDeckLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetOnDeckUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetOnDeckLibraryResponseBody$outboundSchema: z.ZodType< - GetOnDeckLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetOnDeckLibraryResponseBody -> = z - .instanceof(GetOnDeckLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetOnDeckLibraryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetOnDeckUnauthorized$outboundSchema: z.ZodType< + GetOnDeckUnauthorized$Outbound, + z.ZodTypeDef, + GetOnDeckUnauthorized +> = z.instanceof(GetOnDeckUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetOnDeckLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetOnDeckLibraryResponseBody$ { - /** @deprecated use `GetOnDeckLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckLibraryResponseBody$inboundSchema; - /** @deprecated use `GetOnDeckLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckLibraryResponseBody$outboundSchema; - /** @deprecated use `GetOnDeckLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetOnDeckLibraryResponseBody$Outbound; +export namespace GetOnDeckUnauthorized$ { + /** @deprecated use `GetOnDeckUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckUnauthorized$inboundSchema; + /** @deprecated use `GetOnDeckUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckUnauthorized$outboundSchema; + /** @deprecated use `GetOnDeckUnauthorized$Outbound` instead. */ + export type Outbound = GetOnDeckUnauthorized$Outbound; } /** @internal */ -export const GetOnDeckErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetOnDeckErrors$inboundSchema: z.ZodType< + GetOnDeckErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetOnDeckErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetOnDeckErrors$outboundSchema: z.ZodType< - GetOnDeckErrors$Outbound, - z.ZodTypeDef, - GetOnDeckErrors + GetOnDeckErrors$Outbound, + z.ZodTypeDef, + GetOnDeckErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,66 @@ export const GetOnDeckErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckErrors$ { - /** @deprecated use `GetOnDeckErrors$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckErrors$inboundSchema; - /** @deprecated use `GetOnDeckErrors$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckErrors$outboundSchema; - /** @deprecated use `GetOnDeckErrors$Outbound` instead. */ - export type Outbound = GetOnDeckErrors$Outbound; + /** @deprecated use `GetOnDeckErrors$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckErrors$inboundSchema; + /** @deprecated use `GetOnDeckErrors$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckErrors$outboundSchema; + /** @deprecated use `GetOnDeckErrors$Outbound` instead. */ + export type Outbound = GetOnDeckErrors$Outbound; } /** @internal */ -export const GetOnDeckResponseBody$inboundSchema: z.ZodType< - GetOnDeckResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetOnDeckErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetOnDeckResponseBody(remapped); +export const GetOnDeckBadRequest$inboundSchema: z.ZodType< + GetOnDeckBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetOnDeckErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetOnDeckBadRequest(remapped); + }); + /** @internal */ -export type GetOnDeckResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetOnDeckBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetOnDeckResponseBody$outboundSchema: z.ZodType< - GetOnDeckResponseBody$Outbound, - z.ZodTypeDef, - GetOnDeckResponseBody -> = z - .instanceof(GetOnDeckResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetOnDeckErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetOnDeckBadRequest$outboundSchema: z.ZodType< + GetOnDeckBadRequest$Outbound, + z.ZodTypeDef, + GetOnDeckBadRequest +> = z.instanceof(GetOnDeckBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetOnDeckErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetOnDeckResponseBody$ { - /** @deprecated use `GetOnDeckResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckResponseBody$inboundSchema; - /** @deprecated use `GetOnDeckResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckResponseBody$outboundSchema; - /** @deprecated use `GetOnDeckResponseBody$Outbound` instead. */ - export type Outbound = GetOnDeckResponseBody$Outbound; +export namespace GetOnDeckBadRequest$ { + /** @deprecated use `GetOnDeckBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckBadRequest$inboundSchema; + /** @deprecated use `GetOnDeckBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckBadRequest$outboundSchema; + /** @deprecated use `GetOnDeckBadRequest$Outbound` instead. */ + export type Outbound = GetOnDeckBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getpin.ts b/src/sdk/models/errors/getpin.ts index 1874d6cb..484acdbc 100644 --- a/src/sdk/models/errors/getpin.ts +++ b/src/sdk/models/errors/getpin.ts @@ -2,81 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetPinErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** - * Bad Request response when the X-Plex-Client-Identifier is missing + * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetPinResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPinBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** - * Bad Request response when the X-Plex-Client-Identifier is missing + * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetPinResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPinBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPinResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPinBadRequestData; - constructor(err: GetPinResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPinBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPinResponseBody"; - } + this.name = "GetPinBadRequest"; + } } /** @internal */ -export const GetPinErrors$inboundSchema: z.ZodType = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), +export const GetPinErrors$inboundSchema: z.ZodType< + GetPinErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPinErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPinErrors$outboundSchema: z.ZodType< - GetPinErrors$Outbound, - z.ZodTypeDef, - GetPinErrors + GetPinErrors$Outbound, + z.ZodTypeDef, + GetPinErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -84,73 +83,66 @@ export const GetPinErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPinErrors$ { - /** @deprecated use `GetPinErrors$inboundSchema` instead. */ - export const inboundSchema = GetPinErrors$inboundSchema; - /** @deprecated use `GetPinErrors$outboundSchema` instead. */ - export const outboundSchema = GetPinErrors$outboundSchema; - /** @deprecated use `GetPinErrors$Outbound` instead. */ - export type Outbound = GetPinErrors$Outbound; + /** @deprecated use `GetPinErrors$inboundSchema` instead. */ + export const inboundSchema = GetPinErrors$inboundSchema; + /** @deprecated use `GetPinErrors$outboundSchema` instead. */ + export const outboundSchema = GetPinErrors$outboundSchema; + /** @deprecated use `GetPinErrors$Outbound` instead. */ + export type Outbound = GetPinErrors$Outbound; } /** @internal */ -export const GetPinResponseBody$inboundSchema: z.ZodType< - GetPinResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPinErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPinResponseBody(remapped); +export const GetPinBadRequest$inboundSchema: z.ZodType< + GetPinBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPinErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPinBadRequest(remapped); + }); + /** @internal */ -export type GetPinResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPinBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPinResponseBody$outboundSchema: z.ZodType< - GetPinResponseBody$Outbound, - z.ZodTypeDef, - GetPinResponseBody -> = z - .instanceof(GetPinResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetPinErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPinBadRequest$outboundSchema: z.ZodType< + GetPinBadRequest$Outbound, + z.ZodTypeDef, + GetPinBadRequest +> = z.instanceof(GetPinBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPinErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPinResponseBody$ { - /** @deprecated use `GetPinResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPinResponseBody$inboundSchema; - /** @deprecated use `GetPinResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPinResponseBody$outboundSchema; - /** @deprecated use `GetPinResponseBody$Outbound` instead. */ - export type Outbound = GetPinResponseBody$Outbound; +export namespace GetPinBadRequest$ { + /** @deprecated use `GetPinBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetPinBadRequest$inboundSchema; + /** @deprecated use `GetPinBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetPinBadRequest$outboundSchema; + /** @deprecated use `GetPinBadRequest$Outbound` instead. */ + export type Outbound = GetPinBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getplaylist.ts b/src/sdk/models/errors/getplaylist.ts index 0489983e..90085494 100644 --- a/src/sdk/models/errors/getplaylist.ts +++ b/src/sdk/models/errors/getplaylist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetPlaylistPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetPlaylistPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetPlaylistPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistUnauthorizedData; - constructor(err: GetPlaylistPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistPlaylistsResponseBody"; - } + this.name = "GetPlaylistUnauthorized"; + } } export type GetPlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetPlaylistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetPlaylistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistBadRequestData; - constructor(err: GetPlaylistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistResponseBody"; - } + this.name = "GetPlaylistBadRequest"; + } } /** @internal */ export const GetPlaylistPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown + GetPlaylistPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPlaylistPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistPlaylistsErrors + GetPlaylistPlaylistsErrors$Outbound, + z.ZodTypeDef, + GetPlaylistPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetPlaylistPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistPlaylistsErrors$ { - /** @deprecated use `GetPlaylistPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistPlaylistsErrors$inboundSchema; - /** @deprecated use `GetPlaylistPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistPlaylistsErrors$outboundSchema; - /** @deprecated use `GetPlaylistPlaylistsErrors$Outbound` instead. */ - export type Outbound = GetPlaylistPlaylistsErrors$Outbound; + /** @deprecated use `GetPlaylistPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistPlaylistsErrors$inboundSchema; + /** @deprecated use `GetPlaylistPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistPlaylistsErrors$outboundSchema; + /** @deprecated use `GetPlaylistPlaylistsErrors$Outbound` instead. */ + export type Outbound = GetPlaylistPlaylistsErrors$Outbound; } /** @internal */ -export const GetPlaylistPlaylistsResponseBody$inboundSchema: z.ZodType< - GetPlaylistPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistPlaylistsResponseBody(remapped); +export const GetPlaylistUnauthorized$inboundSchema: z.ZodType< + GetPlaylistUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPlaylistPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistUnauthorized(remapped); + }); + /** @internal */ -export type GetPlaylistPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistPlaylistsResponseBody$outboundSchema: z.ZodType< - GetPlaylistPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistPlaylistsResponseBody -> = z - .instanceof(GetPlaylistPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetPlaylistPlaylistsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistUnauthorized$outboundSchema: z.ZodType< + GetPlaylistUnauthorized$Outbound, + z.ZodTypeDef, + GetPlaylistUnauthorized +> = z.instanceof(GetPlaylistUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPlaylistPlaylistsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistPlaylistsResponseBody$ { - /** @deprecated use `GetPlaylistPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistPlaylistsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistPlaylistsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistPlaylistsResponseBody$Outbound; +export namespace GetPlaylistUnauthorized$ { + /** @deprecated use `GetPlaylistUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistUnauthorized$inboundSchema; + /** @deprecated use `GetPlaylistUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistUnauthorized$outboundSchema; + /** @deprecated use `GetPlaylistUnauthorized$Outbound` instead. */ + export type Outbound = GetPlaylistUnauthorized$Outbound; } /** @internal */ -export const GetPlaylistErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetPlaylistErrors$inboundSchema: z.ZodType< + GetPlaylistErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetPlaylistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistErrors$outboundSchema: z.ZodType< - GetPlaylistErrors$Outbound, - z.ZodTypeDef, - GetPlaylistErrors + GetPlaylistErrors$Outbound, + z.ZodTypeDef, + GetPlaylistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,67 @@ export const GetPlaylistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistErrors$ { - /** @deprecated use `GetPlaylistErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistErrors$inboundSchema; - /** @deprecated use `GetPlaylistErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistErrors$outboundSchema; - /** @deprecated use `GetPlaylistErrors$Outbound` instead. */ - export type Outbound = GetPlaylistErrors$Outbound; + /** @deprecated use `GetPlaylistErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistErrors$inboundSchema; + /** @deprecated use `GetPlaylistErrors$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistErrors$outboundSchema; + /** @deprecated use `GetPlaylistErrors$Outbound` instead. */ + export type Outbound = GetPlaylistErrors$Outbound; } /** @internal */ -export const GetPlaylistResponseBody$inboundSchema: z.ZodType< - GetPlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistResponseBody(remapped); +export const GetPlaylistBadRequest$inboundSchema: z.ZodType< + GetPlaylistBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPlaylistErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistBadRequest(remapped); + }); + /** @internal */ -export type GetPlaylistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistResponseBody$outboundSchema: z.ZodType< - GetPlaylistResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistResponseBody -> = z - .instanceof(GetPlaylistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetPlaylistErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistBadRequest$outboundSchema: z.ZodType< + GetPlaylistBadRequest$Outbound, + z.ZodTypeDef, + GetPlaylistBadRequest +> = z.instanceof(GetPlaylistBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPlaylistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistResponseBody$ { - /** @deprecated use `GetPlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistResponseBody$Outbound; +export namespace GetPlaylistBadRequest$ { + /** @deprecated use `GetPlaylistBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistBadRequest$inboundSchema; + /** @deprecated use `GetPlaylistBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistBadRequest$outboundSchema; + /** @deprecated use `GetPlaylistBadRequest$Outbound` instead. */ + export type Outbound = GetPlaylistBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getplaylistcontents.ts b/src/sdk/models/errors/getplaylistcontents.ts index 44dadcd7..9a3b8afa 100644 --- a/src/sdk/models/errors/getplaylistcontents.ts +++ b/src/sdk/models/errors/getplaylistcontents.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetPlaylistContentsPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetPlaylistContentsPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistContentsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetPlaylistContentsPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistContentsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistContentsPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistContentsUnauthorizedData; - constructor(err: GetPlaylistContentsPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistContentsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistContentsPlaylistsResponseBody"; - } + this.name = "GetPlaylistContentsUnauthorized"; + } } export type GetPlaylistContentsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetPlaylistContentsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistContentsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetPlaylistContentsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistContentsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistContentsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistContentsBadRequestData; - constructor(err: GetPlaylistContentsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistContentsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistContentsResponseBody"; - } + this.name = "GetPlaylistContentsBadRequest"; + } } /** @internal */ export const GetPlaylistContentsPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsErrors, - z.ZodTypeDef, - unknown + GetPlaylistContentsPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPlaylistContentsPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistContentsPlaylistsErrors + GetPlaylistContentsPlaylistsErrors$Outbound, + z.ZodTypeDef, + GetPlaylistContentsPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,102 @@ export const GetPlaylistContentsPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsPlaylistsErrors$ { - /** @deprecated use `GetPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsPlaylistsErrors$inboundSchema; - /** @deprecated use `GetPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsPlaylistsErrors$outboundSchema; - /** @deprecated use `GetPlaylistContentsPlaylistsErrors$Outbound` instead. */ - export type Outbound = GetPlaylistContentsPlaylistsErrors$Outbound; + /** @deprecated use `GetPlaylistContentsPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsPlaylistsErrors$inboundSchema; + /** @deprecated use `GetPlaylistContentsPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = + GetPlaylistContentsPlaylistsErrors$outboundSchema; + /** @deprecated use `GetPlaylistContentsPlaylistsErrors$Outbound` instead. */ + export type Outbound = GetPlaylistContentsPlaylistsErrors$Outbound; } /** @internal */ -export const GetPlaylistContentsPlaylistsResponseBody$inboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistContentsPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistContentsPlaylistsResponseBody(remapped); +export const GetPlaylistContentsUnauthorized$inboundSchema: z.ZodType< + GetPlaylistContentsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetPlaylistContentsPlaylistsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistContentsUnauthorized(remapped); + }); + /** @internal */ -export type GetPlaylistContentsPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistContentsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistContentsPlaylistsResponseBody$outboundSchema: z.ZodType< - GetPlaylistContentsPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistContentsPlaylistsResponseBody -> = z - .instanceof(GetPlaylistContentsPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetPlaylistContentsPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistContentsUnauthorized$outboundSchema: z.ZodType< + GetPlaylistContentsUnauthorized$Outbound, + z.ZodTypeDef, + GetPlaylistContentsUnauthorized +> = z.instanceof(GetPlaylistContentsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetPlaylistContentsPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistContentsPlaylistsResponseBody$ { - /** @deprecated use `GetPlaylistContentsPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsPlaylistsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistContentsPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsPlaylistsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistContentsPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistContentsPlaylistsResponseBody$Outbound; +export namespace GetPlaylistContentsUnauthorized$ { + /** @deprecated use `GetPlaylistContentsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsUnauthorized$inboundSchema; + /** @deprecated use `GetPlaylistContentsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsUnauthorized$outboundSchema; + /** @deprecated use `GetPlaylistContentsUnauthorized$Outbound` instead. */ + export type Outbound = GetPlaylistContentsUnauthorized$Outbound; } /** @internal */ export const GetPlaylistContentsErrors$inboundSchema: z.ZodType< - GetPlaylistContentsErrors, - z.ZodTypeDef, - unknown + GetPlaylistContentsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPlaylistContentsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistContentsErrors$outboundSchema: z.ZodType< - GetPlaylistContentsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistContentsErrors + GetPlaylistContentsErrors$Outbound, + z.ZodTypeDef, + GetPlaylistContentsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +230,68 @@ export const GetPlaylistContentsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsErrors$ { - /** @deprecated use `GetPlaylistContentsErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsErrors$inboundSchema; - /** @deprecated use `GetPlaylistContentsErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsErrors$outboundSchema; - /** @deprecated use `GetPlaylistContentsErrors$Outbound` instead. */ - export type Outbound = GetPlaylistContentsErrors$Outbound; + /** @deprecated use `GetPlaylistContentsErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsErrors$inboundSchema; + /** @deprecated use `GetPlaylistContentsErrors$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsErrors$outboundSchema; + /** @deprecated use `GetPlaylistContentsErrors$Outbound` instead. */ + export type Outbound = GetPlaylistContentsErrors$Outbound; } /** @internal */ -export const GetPlaylistContentsResponseBody$inboundSchema: z.ZodType< - GetPlaylistContentsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistContentsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistContentsResponseBody(remapped); +export const GetPlaylistContentsBadRequest$inboundSchema: z.ZodType< + GetPlaylistContentsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPlaylistContentsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistContentsBadRequest(remapped); + }); + /** @internal */ -export type GetPlaylistContentsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistContentsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistContentsResponseBody$outboundSchema: z.ZodType< - GetPlaylistContentsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistContentsResponseBody -> = z - .instanceof(GetPlaylistContentsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetPlaylistContentsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistContentsBadRequest$outboundSchema: z.ZodType< + GetPlaylistContentsBadRequest$Outbound, + z.ZodTypeDef, + GetPlaylistContentsBadRequest +> = z.instanceof(GetPlaylistContentsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPlaylistContentsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistContentsResponseBody$ { - /** @deprecated use `GetPlaylistContentsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistContentsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistContentsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistContentsResponseBody$Outbound; +export namespace GetPlaylistContentsBadRequest$ { + /** @deprecated use `GetPlaylistContentsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsBadRequest$inboundSchema; + /** @deprecated use `GetPlaylistContentsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsBadRequest$outboundSchema; + /** @deprecated use `GetPlaylistContentsBadRequest$Outbound` instead. */ + export type Outbound = GetPlaylistContentsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getplaylists.ts b/src/sdk/models/errors/getplaylists.ts index dd18e586..efcafa35 100644 --- a/src/sdk/models/errors/getplaylists.ts +++ b/src/sdk/models/errors/getplaylists.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetPlaylistsPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetPlaylistsPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetPlaylistsPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistsPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistsUnauthorizedData; - constructor(err: GetPlaylistsPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistsPlaylistsResponseBody"; - } + this.name = "GetPlaylistsUnauthorized"; + } } export type GetPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetPlaylistsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetPlaylistsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetPlaylistsBadRequestData; - constructor(err: GetPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetPlaylistsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetPlaylistsResponseBody"; - } + this.name = "GetPlaylistsBadRequest"; + } } /** @internal */ export const GetPlaylistsPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistsPlaylistsErrors, - z.ZodTypeDef, - unknown + GetPlaylistsPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPlaylistsPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistsPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistsPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistsPlaylistsErrors + GetPlaylistsPlaylistsErrors$Outbound, + z.ZodTypeDef, + GetPlaylistsPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetPlaylistsPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsPlaylistsErrors$ { - /** @deprecated use `GetPlaylistsPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsPlaylistsErrors$inboundSchema; - /** @deprecated use `GetPlaylistsPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsPlaylistsErrors$outboundSchema; - /** @deprecated use `GetPlaylistsPlaylistsErrors$Outbound` instead. */ - export type Outbound = GetPlaylistsPlaylistsErrors$Outbound; + /** @deprecated use `GetPlaylistsPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsPlaylistsErrors$inboundSchema; + /** @deprecated use `GetPlaylistsPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsPlaylistsErrors$outboundSchema; + /** @deprecated use `GetPlaylistsPlaylistsErrors$Outbound` instead. */ + export type Outbound = GetPlaylistsPlaylistsErrors$Outbound; } /** @internal */ -export const GetPlaylistsPlaylistsResponseBody$inboundSchema: z.ZodType< - GetPlaylistsPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistsPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistsPlaylistsResponseBody(remapped); +export const GetPlaylistsUnauthorized$inboundSchema: z.ZodType< + GetPlaylistsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPlaylistsPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistsUnauthorized(remapped); + }); + /** @internal */ -export type GetPlaylistsPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistsPlaylistsResponseBody$outboundSchema: z.ZodType< - GetPlaylistsPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistsPlaylistsResponseBody -> = z - .instanceof(GetPlaylistsPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetPlaylistsPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistsUnauthorized$outboundSchema: z.ZodType< + GetPlaylistsUnauthorized$Outbound, + z.ZodTypeDef, + GetPlaylistsUnauthorized +> = z.instanceof(GetPlaylistsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPlaylistsPlaylistsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistsPlaylistsResponseBody$ { - /** @deprecated use `GetPlaylistsPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsPlaylistsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistsPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsPlaylistsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistsPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistsPlaylistsResponseBody$Outbound; +export namespace GetPlaylistsUnauthorized$ { + /** @deprecated use `GetPlaylistsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsUnauthorized$inboundSchema; + /** @deprecated use `GetPlaylistsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsUnauthorized$outboundSchema; + /** @deprecated use `GetPlaylistsUnauthorized$Outbound` instead. */ + export type Outbound = GetPlaylistsUnauthorized$Outbound; } /** @internal */ export const GetPlaylistsErrors$inboundSchema: z.ZodType< - GetPlaylistsErrors, - z.ZodTypeDef, - unknown + GetPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetPlaylistsErrors$outboundSchema: z.ZodType< - GetPlaylistsErrors$Outbound, - z.ZodTypeDef, - GetPlaylistsErrors + GetPlaylistsErrors$Outbound, + z.ZodTypeDef, + GetPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsErrors$ { - /** @deprecated use `GetPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsErrors$inboundSchema; - /** @deprecated use `GetPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsErrors$outboundSchema; - /** @deprecated use `GetPlaylistsErrors$Outbound` instead. */ - export type Outbound = GetPlaylistsErrors$Outbound; + /** @deprecated use `GetPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsErrors$inboundSchema; + /** @deprecated use `GetPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsErrors$outboundSchema; + /** @deprecated use `GetPlaylistsErrors$Outbound` instead. */ + export type Outbound = GetPlaylistsErrors$Outbound; } /** @internal */ -export const GetPlaylistsResponseBody$inboundSchema: z.ZodType< - GetPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetPlaylistsResponseBody(remapped); +export const GetPlaylistsBadRequest$inboundSchema: z.ZodType< + GetPlaylistsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetPlaylistsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetPlaylistsBadRequest(remapped); + }); + /** @internal */ -export type GetPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetPlaylistsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetPlaylistsResponseBody$outboundSchema: z.ZodType< - GetPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistsResponseBody -> = z - .instanceof(GetPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetPlaylistsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetPlaylistsBadRequest$outboundSchema: z.ZodType< + GetPlaylistsBadRequest$Outbound, + z.ZodTypeDef, + GetPlaylistsBadRequest +> = z.instanceof(GetPlaylistsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetPlaylistsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetPlaylistsResponseBody$ { - /** @deprecated use `GetPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistsResponseBody$Outbound; +export namespace GetPlaylistsBadRequest$ { + /** @deprecated use `GetPlaylistsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsBadRequest$inboundSchema; + /** @deprecated use `GetPlaylistsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsBadRequest$outboundSchema; + /** @deprecated use `GetPlaylistsBadRequest$Outbound` instead. */ + export type Outbound = GetPlaylistsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getrecentlyadded.ts b/src/sdk/models/errors/getrecentlyadded.ts index db4a6ff2..2494d8c8 100644 --- a/src/sdk/models/errors/getrecentlyadded.ts +++ b/src/sdk/models/errors/getrecentlyadded.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetRecentlyAddedLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetRecentlyAddedLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetRecentlyAddedUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetRecentlyAddedLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetRecentlyAddedUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetRecentlyAddedLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetRecentlyAddedUnauthorizedData; - constructor(err: GetRecentlyAddedLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetRecentlyAddedUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetRecentlyAddedLibraryResponseBody"; - } + this.name = "GetRecentlyAddedUnauthorized"; + } } export type GetRecentlyAddedErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetRecentlyAddedResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetRecentlyAddedBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetRecentlyAddedResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetRecentlyAddedBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetRecentlyAddedResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetRecentlyAddedBadRequestData; - constructor(err: GetRecentlyAddedResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetRecentlyAddedBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetRecentlyAddedResponseBody"; - } + this.name = "GetRecentlyAddedBadRequest"; + } } /** @internal */ export const GetRecentlyAddedLibraryErrors$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryErrors, - z.ZodTypeDef, - unknown + GetRecentlyAddedLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetRecentlyAddedLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetRecentlyAddedLibraryErrors$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryErrors$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryErrors + GetRecentlyAddedLibraryErrors$Outbound, + z.ZodTypeDef, + GetRecentlyAddedLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetRecentlyAddedLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedLibraryErrors$ { - /** @deprecated use `GetRecentlyAddedLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedLibraryErrors$inboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedLibraryErrors$outboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryErrors$Outbound` instead. */ - export type Outbound = GetRecentlyAddedLibraryErrors$Outbound; + /** @deprecated use `GetRecentlyAddedLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedLibraryErrors$inboundSchema; + /** @deprecated use `GetRecentlyAddedLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedLibraryErrors$outboundSchema; + /** @deprecated use `GetRecentlyAddedLibraryErrors$Outbound` instead. */ + export type Outbound = GetRecentlyAddedLibraryErrors$Outbound; } /** @internal */ -export const GetRecentlyAddedLibraryResponseBody$inboundSchema: z.ZodType< - GetRecentlyAddedLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetRecentlyAddedLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetRecentlyAddedLibraryResponseBody(remapped); +export const GetRecentlyAddedUnauthorized$inboundSchema: z.ZodType< + GetRecentlyAddedUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetRecentlyAddedLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetRecentlyAddedUnauthorized(remapped); + }); + /** @internal */ -export type GetRecentlyAddedLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetRecentlyAddedUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetRecentlyAddedLibraryResponseBody$outboundSchema: z.ZodType< - GetRecentlyAddedLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetRecentlyAddedLibraryResponseBody -> = z - .instanceof(GetRecentlyAddedLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetRecentlyAddedLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetRecentlyAddedUnauthorized$outboundSchema: z.ZodType< + GetRecentlyAddedUnauthorized$Outbound, + z.ZodTypeDef, + GetRecentlyAddedUnauthorized +> = z.instanceof(GetRecentlyAddedUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetRecentlyAddedLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetRecentlyAddedLibraryResponseBody$ { - /** @deprecated use `GetRecentlyAddedLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedLibraryResponseBody$inboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedLibraryResponseBody$outboundSchema; - /** @deprecated use `GetRecentlyAddedLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetRecentlyAddedLibraryResponseBody$Outbound; +export namespace GetRecentlyAddedUnauthorized$ { + /** @deprecated use `GetRecentlyAddedUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedUnauthorized$inboundSchema; + /** @deprecated use `GetRecentlyAddedUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedUnauthorized$outboundSchema; + /** @deprecated use `GetRecentlyAddedUnauthorized$Outbound` instead. */ + export type Outbound = GetRecentlyAddedUnauthorized$Outbound; } /** @internal */ export const GetRecentlyAddedErrors$inboundSchema: z.ZodType< - GetRecentlyAddedErrors, - z.ZodTypeDef, - unknown + GetRecentlyAddedErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetRecentlyAddedErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetRecentlyAddedErrors$outboundSchema: z.ZodType< - GetRecentlyAddedErrors$Outbound, - z.ZodTypeDef, - GetRecentlyAddedErrors + GetRecentlyAddedErrors$Outbound, + z.ZodTypeDef, + GetRecentlyAddedErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetRecentlyAddedErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedErrors$ { - /** @deprecated use `GetRecentlyAddedErrors$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedErrors$inboundSchema; - /** @deprecated use `GetRecentlyAddedErrors$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedErrors$outboundSchema; - /** @deprecated use `GetRecentlyAddedErrors$Outbound` instead. */ - export type Outbound = GetRecentlyAddedErrors$Outbound; + /** @deprecated use `GetRecentlyAddedErrors$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedErrors$inboundSchema; + /** @deprecated use `GetRecentlyAddedErrors$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedErrors$outboundSchema; + /** @deprecated use `GetRecentlyAddedErrors$Outbound` instead. */ + export type Outbound = GetRecentlyAddedErrors$Outbound; } /** @internal */ -export const GetRecentlyAddedResponseBody$inboundSchema: z.ZodType< - GetRecentlyAddedResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetRecentlyAddedErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetRecentlyAddedResponseBody(remapped); +export const GetRecentlyAddedBadRequest$inboundSchema: z.ZodType< + GetRecentlyAddedBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetRecentlyAddedErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetRecentlyAddedBadRequest(remapped); + }); + /** @internal */ -export type GetRecentlyAddedResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetRecentlyAddedBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetRecentlyAddedResponseBody$outboundSchema: z.ZodType< - GetRecentlyAddedResponseBody$Outbound, - z.ZodTypeDef, - GetRecentlyAddedResponseBody -> = z - .instanceof(GetRecentlyAddedResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetRecentlyAddedErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetRecentlyAddedBadRequest$outboundSchema: z.ZodType< + GetRecentlyAddedBadRequest$Outbound, + z.ZodTypeDef, + GetRecentlyAddedBadRequest +> = z.instanceof(GetRecentlyAddedBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetRecentlyAddedErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetRecentlyAddedResponseBody$ { - /** @deprecated use `GetRecentlyAddedResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedResponseBody$inboundSchema; - /** @deprecated use `GetRecentlyAddedResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedResponseBody$outboundSchema; - /** @deprecated use `GetRecentlyAddedResponseBody$Outbound` instead. */ - export type Outbound = GetRecentlyAddedResponseBody$Outbound; +export namespace GetRecentlyAddedBadRequest$ { + /** @deprecated use `GetRecentlyAddedBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedBadRequest$inboundSchema; + /** @deprecated use `GetRecentlyAddedBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedBadRequest$outboundSchema; + /** @deprecated use `GetRecentlyAddedBadRequest$Outbound` instead. */ + export type Outbound = GetRecentlyAddedBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getrefreshlibrarymetadata.ts b/src/sdk/models/errors/getrefreshlibrarymetadata.ts index b22b7574..eb187724 100644 --- a/src/sdk/models/errors/getrefreshlibrarymetadata.ts +++ b/src/sdk/models/errors/getrefreshlibrarymetadata.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetRefreshLibraryMetadataLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetRefreshLibraryMetadataLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetRefreshLibraryMetadataUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetRefreshLibraryMetadataLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetRefreshLibraryMetadataUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetRefreshLibraryMetadataLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetRefreshLibraryMetadataUnauthorizedData; - constructor(err: GetRefreshLibraryMetadataLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetRefreshLibraryMetadataUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetRefreshLibraryMetadataLibraryResponseBody"; - } + this.name = "GetRefreshLibraryMetadataUnauthorized"; + } } export type GetRefreshLibraryMetadataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetRefreshLibraryMetadataResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetRefreshLibraryMetadataBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetRefreshLibraryMetadataResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetRefreshLibraryMetadataBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetRefreshLibraryMetadataResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetRefreshLibraryMetadataBadRequestData; - constructor(err: GetRefreshLibraryMetadataResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetRefreshLibraryMetadataBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetRefreshLibraryMetadataResponseBody"; - } + this.name = "GetRefreshLibraryMetadataBadRequest"; + } } /** @internal */ export const GetRefreshLibraryMetadataLibraryErrors$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryErrors, - z.ZodTypeDef, - unknown + GetRefreshLibraryMetadataLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetRefreshLibraryMetadataLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetRefreshLibraryMetadataLibraryErrors$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryErrors$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataLibraryErrors + GetRefreshLibraryMetadataLibraryErrors$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,105 @@ export const GetRefreshLibraryMetadataLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRefreshLibraryMetadataLibraryErrors$ { - /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataLibraryErrors$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataLibraryErrors$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataLibraryErrors$Outbound; + /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = + GetRefreshLibraryMetadataLibraryErrors$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = + GetRefreshLibraryMetadataLibraryErrors$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataLibraryErrors$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataLibraryErrors$Outbound; } /** @internal */ -export const GetRefreshLibraryMetadataLibraryResponseBody$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetRefreshLibraryMetadataLibraryErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetRefreshLibraryMetadataLibraryResponseBody(remapped); +export const GetRefreshLibraryMetadataUnauthorized$inboundSchema: z.ZodType< + GetRefreshLibraryMetadataUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetRefreshLibraryMetadataLibraryErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetRefreshLibraryMetadataUnauthorized(remapped); + }); + /** @internal */ -export type GetRefreshLibraryMetadataLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetRefreshLibraryMetadataUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetRefreshLibraryMetadataLibraryResponseBody$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataLibraryResponseBody -> = z - .instanceof(GetRefreshLibraryMetadataLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetRefreshLibraryMetadataLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetRefreshLibraryMetadataUnauthorized$outboundSchema: z.ZodType< + GetRefreshLibraryMetadataUnauthorized$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataUnauthorized +> = z.instanceof(GetRefreshLibraryMetadataUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetRefreshLibraryMetadataLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetRefreshLibraryMetadataLibraryResponseBody$ { - /** @deprecated use `GetRefreshLibraryMetadataLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataLibraryResponseBody$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataLibraryResponseBody$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataLibraryResponseBody$Outbound; +export namespace GetRefreshLibraryMetadataUnauthorized$ { + /** @deprecated use `GetRefreshLibraryMetadataUnauthorized$inboundSchema` instead. */ + export const inboundSchema = + GetRefreshLibraryMetadataUnauthorized$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetRefreshLibraryMetadataUnauthorized$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataUnauthorized$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataUnauthorized$Outbound; } /** @internal */ export const GetRefreshLibraryMetadataErrors$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataErrors, - z.ZodTypeDef, - unknown + GetRefreshLibraryMetadataErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetRefreshLibraryMetadataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetRefreshLibraryMetadataErrors$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataErrors$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataErrors + GetRefreshLibraryMetadataErrors$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,75 +233,71 @@ export const GetRefreshLibraryMetadataErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRefreshLibraryMetadataErrors$ { - /** @deprecated use `GetRefreshLibraryMetadataErrors$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataErrors$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataErrors$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataErrors$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataErrors$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataErrors$Outbound; + /** @deprecated use `GetRefreshLibraryMetadataErrors$inboundSchema` instead. */ + export const inboundSchema = GetRefreshLibraryMetadataErrors$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataErrors$outboundSchema` instead. */ + export const outboundSchema = GetRefreshLibraryMetadataErrors$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataErrors$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataErrors$Outbound; } /** @internal */ -export const GetRefreshLibraryMetadataResponseBody$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetRefreshLibraryMetadataErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetRefreshLibraryMetadataResponseBody(remapped); +export const GetRefreshLibraryMetadataBadRequest$inboundSchema: z.ZodType< + GetRefreshLibraryMetadataBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetRefreshLibraryMetadataErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetRefreshLibraryMetadataBadRequest(remapped); + }); + /** @internal */ -export type GetRefreshLibraryMetadataResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetRefreshLibraryMetadataBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetRefreshLibraryMetadataResponseBody$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataResponseBody$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataResponseBody -> = z - .instanceof(GetRefreshLibraryMetadataResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetRefreshLibraryMetadataErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetRefreshLibraryMetadataBadRequest$outboundSchema: z.ZodType< + GetRefreshLibraryMetadataBadRequest$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataBadRequest +> = z.instanceof(GetRefreshLibraryMetadataBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetRefreshLibraryMetadataErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetRefreshLibraryMetadataResponseBody$ { - /** @deprecated use `GetRefreshLibraryMetadataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataResponseBody$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataResponseBody$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataResponseBody$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataResponseBody$Outbound; +export namespace GetRefreshLibraryMetadataBadRequest$ { + /** @deprecated use `GetRefreshLibraryMetadataBadRequest$inboundSchema` instead. */ + export const inboundSchema = + GetRefreshLibraryMetadataBadRequest$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataBadRequest$outboundSchema` instead. */ + export const outboundSchema = + GetRefreshLibraryMetadataBadRequest$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataBadRequest$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getresizedphoto.ts b/src/sdk/models/errors/getresizedphoto.ts index bf4912eb..b3617cbf 100644 --- a/src/sdk/models/errors/getresizedphoto.ts +++ b/src/sdk/models/errors/getresizedphoto.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetResizedPhotoServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetResizedPhotoServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetResizedPhotoUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetResizedPhotoServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetResizedPhotoUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetResizedPhotoServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetResizedPhotoUnauthorizedData; - constructor(err: GetResizedPhotoServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetResizedPhotoUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetResizedPhotoServerResponseBody"; - } + this.name = "GetResizedPhotoUnauthorized"; + } } export type GetResizedPhotoErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetResizedPhotoResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetResizedPhotoBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetResizedPhotoResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetResizedPhotoBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetResizedPhotoResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetResizedPhotoBadRequestData; - constructor(err: GetResizedPhotoResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetResizedPhotoBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetResizedPhotoResponseBody"; - } + this.name = "GetResizedPhotoBadRequest"; + } } /** @internal */ export const GetResizedPhotoServerErrors$inboundSchema: z.ZodType< - GetResizedPhotoServerErrors, - z.ZodTypeDef, - unknown + GetResizedPhotoServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetResizedPhotoServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetResizedPhotoServerErrors$outboundSchema: z.ZodType< - GetResizedPhotoServerErrors$Outbound, - z.ZodTypeDef, - GetResizedPhotoServerErrors + GetResizedPhotoServerErrors$Outbound, + z.ZodTypeDef, + GetResizedPhotoServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetResizedPhotoServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResizedPhotoServerErrors$ { - /** @deprecated use `GetResizedPhotoServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoServerErrors$inboundSchema; - /** @deprecated use `GetResizedPhotoServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoServerErrors$outboundSchema; - /** @deprecated use `GetResizedPhotoServerErrors$Outbound` instead. */ - export type Outbound = GetResizedPhotoServerErrors$Outbound; + /** @deprecated use `GetResizedPhotoServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoServerErrors$inboundSchema; + /** @deprecated use `GetResizedPhotoServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoServerErrors$outboundSchema; + /** @deprecated use `GetResizedPhotoServerErrors$Outbound` instead. */ + export type Outbound = GetResizedPhotoServerErrors$Outbound; } /** @internal */ -export const GetResizedPhotoServerResponseBody$inboundSchema: z.ZodType< - GetResizedPhotoServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetResizedPhotoServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetResizedPhotoServerResponseBody(remapped); +export const GetResizedPhotoUnauthorized$inboundSchema: z.ZodType< + GetResizedPhotoUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetResizedPhotoServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetResizedPhotoUnauthorized(remapped); + }); + /** @internal */ -export type GetResizedPhotoServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetResizedPhotoUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetResizedPhotoServerResponseBody$outboundSchema: z.ZodType< - GetResizedPhotoServerResponseBody$Outbound, - z.ZodTypeDef, - GetResizedPhotoServerResponseBody -> = z - .instanceof(GetResizedPhotoServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetResizedPhotoServerErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetResizedPhotoUnauthorized$outboundSchema: z.ZodType< + GetResizedPhotoUnauthorized$Outbound, + z.ZodTypeDef, + GetResizedPhotoUnauthorized +> = z.instanceof(GetResizedPhotoUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetResizedPhotoServerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetResizedPhotoServerResponseBody$ { - /** @deprecated use `GetResizedPhotoServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoServerResponseBody$inboundSchema; - /** @deprecated use `GetResizedPhotoServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoServerResponseBody$outboundSchema; - /** @deprecated use `GetResizedPhotoServerResponseBody$Outbound` instead. */ - export type Outbound = GetResizedPhotoServerResponseBody$Outbound; +export namespace GetResizedPhotoUnauthorized$ { + /** @deprecated use `GetResizedPhotoUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoUnauthorized$inboundSchema; + /** @deprecated use `GetResizedPhotoUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoUnauthorized$outboundSchema; + /** @deprecated use `GetResizedPhotoUnauthorized$Outbound` instead. */ + export type Outbound = GetResizedPhotoUnauthorized$Outbound; } /** @internal */ export const GetResizedPhotoErrors$inboundSchema: z.ZodType< - GetResizedPhotoErrors, - z.ZodTypeDef, - unknown + GetResizedPhotoErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetResizedPhotoErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetResizedPhotoErrors$outboundSchema: z.ZodType< - GetResizedPhotoErrors$Outbound, - z.ZodTypeDef, - GetResizedPhotoErrors + GetResizedPhotoErrors$Outbound, + z.ZodTypeDef, + GetResizedPhotoErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetResizedPhotoErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResizedPhotoErrors$ { - /** @deprecated use `GetResizedPhotoErrors$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoErrors$inboundSchema; - /** @deprecated use `GetResizedPhotoErrors$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoErrors$outboundSchema; - /** @deprecated use `GetResizedPhotoErrors$Outbound` instead. */ - export type Outbound = GetResizedPhotoErrors$Outbound; + /** @deprecated use `GetResizedPhotoErrors$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoErrors$inboundSchema; + /** @deprecated use `GetResizedPhotoErrors$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoErrors$outboundSchema; + /** @deprecated use `GetResizedPhotoErrors$Outbound` instead. */ + export type Outbound = GetResizedPhotoErrors$Outbound; } /** @internal */ -export const GetResizedPhotoResponseBody$inboundSchema: z.ZodType< - GetResizedPhotoResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetResizedPhotoErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetResizedPhotoResponseBody(remapped); +export const GetResizedPhotoBadRequest$inboundSchema: z.ZodType< + GetResizedPhotoBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetResizedPhotoErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetResizedPhotoBadRequest(remapped); + }); + /** @internal */ -export type GetResizedPhotoResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetResizedPhotoBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetResizedPhotoResponseBody$outboundSchema: z.ZodType< - GetResizedPhotoResponseBody$Outbound, - z.ZodTypeDef, - GetResizedPhotoResponseBody -> = z - .instanceof(GetResizedPhotoResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetResizedPhotoErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetResizedPhotoBadRequest$outboundSchema: z.ZodType< + GetResizedPhotoBadRequest$Outbound, + z.ZodTypeDef, + GetResizedPhotoBadRequest +> = z.instanceof(GetResizedPhotoBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetResizedPhotoErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetResizedPhotoResponseBody$ { - /** @deprecated use `GetResizedPhotoResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoResponseBody$inboundSchema; - /** @deprecated use `GetResizedPhotoResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoResponseBody$outboundSchema; - /** @deprecated use `GetResizedPhotoResponseBody$Outbound` instead. */ - export type Outbound = GetResizedPhotoResponseBody$Outbound; +export namespace GetResizedPhotoBadRequest$ { + /** @deprecated use `GetResizedPhotoBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoBadRequest$inboundSchema; + /** @deprecated use `GetResizedPhotoBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoBadRequest$outboundSchema; + /** @deprecated use `GetResizedPhotoBadRequest$Outbound` instead. */ + export type Outbound = GetResizedPhotoBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getresourcesstatistics.ts b/src/sdk/models/errors/getresourcesstatistics.ts index 71efaa26..57361d4a 100644 --- a/src/sdk/models/errors/getresourcesstatistics.ts +++ b/src/sdk/models/errors/getresourcesstatistics.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetResourcesStatisticsStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetResourcesStatisticsStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetResourcesStatisticsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetResourcesStatisticsStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetResourcesStatisticsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetResourcesStatisticsStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetResourcesStatisticsUnauthorizedData; - constructor(err: GetResourcesStatisticsStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetResourcesStatisticsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetResourcesStatisticsStatisticsResponseBody"; - } + this.name = "GetResourcesStatisticsUnauthorized"; + } } export type GetResourcesStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetResourcesStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetResourcesStatisticsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetResourcesStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetResourcesStatisticsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetResourcesStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetResourcesStatisticsBadRequestData; - constructor(err: GetResourcesStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetResourcesStatisticsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetResourcesStatisticsResponseBody"; - } + this.name = "GetResourcesStatisticsBadRequest"; + } } /** @internal */ export const GetResourcesStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown + GetResourcesStatisticsStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetResourcesStatisticsStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetResourcesStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsStatisticsErrors + GetResourcesStatisticsStatisticsErrors$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,104 @@ export const GetResourcesStatisticsStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsStatisticsErrors$ { - /** @deprecated use `GetResourcesStatisticsStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsStatisticsErrors$inboundSchema; - /** @deprecated use `GetResourcesStatisticsStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsStatisticsErrors$outboundSchema; - /** @deprecated use `GetResourcesStatisticsStatisticsErrors$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsStatisticsErrors$Outbound; + /** @deprecated use `GetResourcesStatisticsStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = + GetResourcesStatisticsStatisticsErrors$inboundSchema; + /** @deprecated use `GetResourcesStatisticsStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = + GetResourcesStatisticsStatisticsErrors$outboundSchema; + /** @deprecated use `GetResourcesStatisticsStatisticsErrors$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsStatisticsErrors$Outbound; } /** @internal */ -export const GetResourcesStatisticsStatisticsResponseBody$inboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetResourcesStatisticsStatisticsErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetResourcesStatisticsStatisticsResponseBody(remapped); +export const GetResourcesStatisticsUnauthorized$inboundSchema: z.ZodType< + GetResourcesStatisticsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetResourcesStatisticsStatisticsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetResourcesStatisticsUnauthorized(remapped); + }); + /** @internal */ -export type GetResourcesStatisticsStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetResourcesStatisticsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetResourcesStatisticsStatisticsResponseBody$outboundSchema: z.ZodType< - GetResourcesStatisticsStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsStatisticsResponseBody -> = z - .instanceof(GetResourcesStatisticsStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetResourcesStatisticsStatisticsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetResourcesStatisticsUnauthorized$outboundSchema: z.ZodType< + GetResourcesStatisticsUnauthorized$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsUnauthorized +> = z.instanceof(GetResourcesStatisticsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetResourcesStatisticsStatisticsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetResourcesStatisticsStatisticsResponseBody$ { - /** @deprecated use `GetResourcesStatisticsStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetResourcesStatisticsStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetResourcesStatisticsStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsStatisticsResponseBody$Outbound; +export namespace GetResourcesStatisticsUnauthorized$ { + /** @deprecated use `GetResourcesStatisticsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsUnauthorized$inboundSchema; + /** @deprecated use `GetResourcesStatisticsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetResourcesStatisticsUnauthorized$outboundSchema; + /** @deprecated use `GetResourcesStatisticsUnauthorized$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsUnauthorized$Outbound; } /** @internal */ export const GetResourcesStatisticsErrors$inboundSchema: z.ZodType< - GetResourcesStatisticsErrors, - z.ZodTypeDef, - unknown + GetResourcesStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetResourcesStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetResourcesStatisticsErrors$outboundSchema: z.ZodType< - GetResourcesStatisticsErrors$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsErrors + GetResourcesStatisticsErrors$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,75 +232,68 @@ export const GetResourcesStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsErrors$ { - /** @deprecated use `GetResourcesStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsErrors$inboundSchema; - /** @deprecated use `GetResourcesStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsErrors$outboundSchema; - /** @deprecated use `GetResourcesStatisticsErrors$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsErrors$Outbound; + /** @deprecated use `GetResourcesStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsErrors$inboundSchema; + /** @deprecated use `GetResourcesStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = GetResourcesStatisticsErrors$outboundSchema; + /** @deprecated use `GetResourcesStatisticsErrors$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsErrors$Outbound; } /** @internal */ -export const GetResourcesStatisticsResponseBody$inboundSchema: z.ZodType< - GetResourcesStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetResourcesStatisticsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetResourcesStatisticsResponseBody(remapped); +export const GetResourcesStatisticsBadRequest$inboundSchema: z.ZodType< + GetResourcesStatisticsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetResourcesStatisticsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetResourcesStatisticsBadRequest(remapped); + }); + /** @internal */ -export type GetResourcesStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetResourcesStatisticsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetResourcesStatisticsResponseBody$outboundSchema: z.ZodType< - GetResourcesStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsResponseBody -> = z - .instanceof(GetResourcesStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetResourcesStatisticsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetResourcesStatisticsBadRequest$outboundSchema: z.ZodType< + GetResourcesStatisticsBadRequest$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsBadRequest +> = z.instanceof(GetResourcesStatisticsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetResourcesStatisticsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetResourcesStatisticsResponseBody$ { - /** @deprecated use `GetResourcesStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetResourcesStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetResourcesStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsResponseBody$Outbound; +export namespace GetResourcesStatisticsBadRequest$ { + /** @deprecated use `GetResourcesStatisticsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsBadRequest$inboundSchema; + /** @deprecated use `GetResourcesStatisticsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetResourcesStatisticsBadRequest$outboundSchema; + /** @deprecated use `GetResourcesStatisticsBadRequest$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getsearchlibrary.ts b/src/sdk/models/errors/getsearchlibrary.ts index 444232a4..4fcde493 100644 --- a/src/sdk/models/errors/getsearchlibrary.ts +++ b/src/sdk/models/errors/getsearchlibrary.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSearchLibraryLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetSearchLibraryLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSearchLibraryUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetSearchLibraryLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSearchLibraryUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSearchLibraryLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSearchLibraryUnauthorizedData; - constructor(err: GetSearchLibraryLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSearchLibraryUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSearchLibraryLibraryResponseBody"; - } + this.name = "GetSearchLibraryUnauthorized"; + } } export type GetSearchLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetSearchLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSearchLibraryBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetSearchLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSearchLibraryBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSearchLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSearchLibraryBadRequestData; - constructor(err: GetSearchLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSearchLibraryBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSearchLibraryResponseBody"; - } + this.name = "GetSearchLibraryBadRequest"; + } } /** @internal */ export const GetSearchLibraryLibraryErrors$inboundSchema: z.ZodType< - GetSearchLibraryLibraryErrors, - z.ZodTypeDef, - unknown + GetSearchLibraryLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSearchLibraryLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSearchLibraryLibraryErrors$outboundSchema: z.ZodType< - GetSearchLibraryLibraryErrors$Outbound, - z.ZodTypeDef, - GetSearchLibraryLibraryErrors + GetSearchLibraryLibraryErrors$Outbound, + z.ZodTypeDef, + GetSearchLibraryLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetSearchLibraryLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryLibraryErrors$ { - /** @deprecated use `GetSearchLibraryLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryLibraryErrors$inboundSchema; - /** @deprecated use `GetSearchLibraryLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryLibraryErrors$outboundSchema; - /** @deprecated use `GetSearchLibraryLibraryErrors$Outbound` instead. */ - export type Outbound = GetSearchLibraryLibraryErrors$Outbound; + /** @deprecated use `GetSearchLibraryLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryLibraryErrors$inboundSchema; + /** @deprecated use `GetSearchLibraryLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryLibraryErrors$outboundSchema; + /** @deprecated use `GetSearchLibraryLibraryErrors$Outbound` instead. */ + export type Outbound = GetSearchLibraryLibraryErrors$Outbound; } /** @internal */ -export const GetSearchLibraryLibraryResponseBody$inboundSchema: z.ZodType< - GetSearchLibraryLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSearchLibraryLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSearchLibraryLibraryResponseBody(remapped); +export const GetSearchLibraryUnauthorized$inboundSchema: z.ZodType< + GetSearchLibraryUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSearchLibraryLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSearchLibraryUnauthorized(remapped); + }); + /** @internal */ -export type GetSearchLibraryLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSearchLibraryUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSearchLibraryLibraryResponseBody$outboundSchema: z.ZodType< - GetSearchLibraryLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetSearchLibraryLibraryResponseBody -> = z - .instanceof(GetSearchLibraryLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetSearchLibraryLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSearchLibraryUnauthorized$outboundSchema: z.ZodType< + GetSearchLibraryUnauthorized$Outbound, + z.ZodTypeDef, + GetSearchLibraryUnauthorized +> = z.instanceof(GetSearchLibraryUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetSearchLibraryLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSearchLibraryLibraryResponseBody$ { - /** @deprecated use `GetSearchLibraryLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryLibraryResponseBody$inboundSchema; - /** @deprecated use `GetSearchLibraryLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryLibraryResponseBody$outboundSchema; - /** @deprecated use `GetSearchLibraryLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetSearchLibraryLibraryResponseBody$Outbound; +export namespace GetSearchLibraryUnauthorized$ { + /** @deprecated use `GetSearchLibraryUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryUnauthorized$inboundSchema; + /** @deprecated use `GetSearchLibraryUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryUnauthorized$outboundSchema; + /** @deprecated use `GetSearchLibraryUnauthorized$Outbound` instead. */ + export type Outbound = GetSearchLibraryUnauthorized$Outbound; } /** @internal */ export const GetSearchLibraryErrors$inboundSchema: z.ZodType< - GetSearchLibraryErrors, - z.ZodTypeDef, - unknown + GetSearchLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSearchLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSearchLibraryErrors$outboundSchema: z.ZodType< - GetSearchLibraryErrors$Outbound, - z.ZodTypeDef, - GetSearchLibraryErrors + GetSearchLibraryErrors$Outbound, + z.ZodTypeDef, + GetSearchLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetSearchLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryErrors$ { - /** @deprecated use `GetSearchLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryErrors$inboundSchema; - /** @deprecated use `GetSearchLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryErrors$outboundSchema; - /** @deprecated use `GetSearchLibraryErrors$Outbound` instead. */ - export type Outbound = GetSearchLibraryErrors$Outbound; + /** @deprecated use `GetSearchLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryErrors$inboundSchema; + /** @deprecated use `GetSearchLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryErrors$outboundSchema; + /** @deprecated use `GetSearchLibraryErrors$Outbound` instead. */ + export type Outbound = GetSearchLibraryErrors$Outbound; } /** @internal */ -export const GetSearchLibraryResponseBody$inboundSchema: z.ZodType< - GetSearchLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSearchLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSearchLibraryResponseBody(remapped); +export const GetSearchLibraryBadRequest$inboundSchema: z.ZodType< + GetSearchLibraryBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSearchLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSearchLibraryBadRequest(remapped); + }); + /** @internal */ -export type GetSearchLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSearchLibraryBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSearchLibraryResponseBody$outboundSchema: z.ZodType< - GetSearchLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetSearchLibraryResponseBody -> = z - .instanceof(GetSearchLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetSearchLibraryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSearchLibraryBadRequest$outboundSchema: z.ZodType< + GetSearchLibraryBadRequest$Outbound, + z.ZodTypeDef, + GetSearchLibraryBadRequest +> = z.instanceof(GetSearchLibraryBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSearchLibraryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSearchLibraryResponseBody$ { - /** @deprecated use `GetSearchLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryResponseBody$inboundSchema; - /** @deprecated use `GetSearchLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryResponseBody$outboundSchema; - /** @deprecated use `GetSearchLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetSearchLibraryResponseBody$Outbound; +export namespace GetSearchLibraryBadRequest$ { + /** @deprecated use `GetSearchLibraryBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryBadRequest$inboundSchema; + /** @deprecated use `GetSearchLibraryBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryBadRequest$outboundSchema; + /** @deprecated use `GetSearchLibraryBadRequest$Outbound` instead. */ + export type Outbound = GetSearchLibraryBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getsearchresults.ts b/src/sdk/models/errors/getsearchresults.ts index 57362d21..c42976cb 100644 --- a/src/sdk/models/errors/getsearchresults.ts +++ b/src/sdk/models/errors/getsearchresults.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSearchResultsSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetSearchResultsSearchResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSearchResultsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetSearchResultsSearchResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSearchResultsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSearchResultsSearchResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSearchResultsUnauthorizedData; - constructor(err: GetSearchResultsSearchResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSearchResultsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSearchResultsSearchResponseBody"; - } + this.name = "GetSearchResultsUnauthorized"; + } } export type GetSearchResultsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetSearchResultsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSearchResultsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetSearchResultsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSearchResultsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSearchResultsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSearchResultsBadRequestData; - constructor(err: GetSearchResultsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSearchResultsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSearchResultsResponseBody"; - } + this.name = "GetSearchResultsBadRequest"; + } } /** @internal */ export const GetSearchResultsSearchErrors$inboundSchema: z.ZodType< - GetSearchResultsSearchErrors, - z.ZodTypeDef, - unknown + GetSearchResultsSearchErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSearchResultsSearchErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSearchResultsSearchErrors$outboundSchema: z.ZodType< - GetSearchResultsSearchErrors$Outbound, - z.ZodTypeDef, - GetSearchResultsSearchErrors + GetSearchResultsSearchErrors$Outbound, + z.ZodTypeDef, + GetSearchResultsSearchErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetSearchResultsSearchErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsSearchErrors$ { - /** @deprecated use `GetSearchResultsSearchErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsSearchErrors$inboundSchema; - /** @deprecated use `GetSearchResultsSearchErrors$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsSearchErrors$outboundSchema; - /** @deprecated use `GetSearchResultsSearchErrors$Outbound` instead. */ - export type Outbound = GetSearchResultsSearchErrors$Outbound; + /** @deprecated use `GetSearchResultsSearchErrors$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsSearchErrors$inboundSchema; + /** @deprecated use `GetSearchResultsSearchErrors$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsSearchErrors$outboundSchema; + /** @deprecated use `GetSearchResultsSearchErrors$Outbound` instead. */ + export type Outbound = GetSearchResultsSearchErrors$Outbound; } /** @internal */ -export const GetSearchResultsSearchResponseBody$inboundSchema: z.ZodType< - GetSearchResultsSearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSearchResultsSearchErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSearchResultsSearchResponseBody(remapped); +export const GetSearchResultsUnauthorized$inboundSchema: z.ZodType< + GetSearchResultsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSearchResultsSearchErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSearchResultsUnauthorized(remapped); + }); + /** @internal */ -export type GetSearchResultsSearchResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSearchResultsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSearchResultsSearchResponseBody$outboundSchema: z.ZodType< - GetSearchResultsSearchResponseBody$Outbound, - z.ZodTypeDef, - GetSearchResultsSearchResponseBody -> = z - .instanceof(GetSearchResultsSearchResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetSearchResultsSearchErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSearchResultsUnauthorized$outboundSchema: z.ZodType< + GetSearchResultsUnauthorized$Outbound, + z.ZodTypeDef, + GetSearchResultsUnauthorized +> = z.instanceof(GetSearchResultsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSearchResultsSearchErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSearchResultsSearchResponseBody$ { - /** @deprecated use `GetSearchResultsSearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsSearchResponseBody$inboundSchema; - /** @deprecated use `GetSearchResultsSearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsSearchResponseBody$outboundSchema; - /** @deprecated use `GetSearchResultsSearchResponseBody$Outbound` instead. */ - export type Outbound = GetSearchResultsSearchResponseBody$Outbound; +export namespace GetSearchResultsUnauthorized$ { + /** @deprecated use `GetSearchResultsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsUnauthorized$inboundSchema; + /** @deprecated use `GetSearchResultsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsUnauthorized$outboundSchema; + /** @deprecated use `GetSearchResultsUnauthorized$Outbound` instead. */ + export type Outbound = GetSearchResultsUnauthorized$Outbound; } /** @internal */ export const GetSearchResultsErrors$inboundSchema: z.ZodType< - GetSearchResultsErrors, - z.ZodTypeDef, - unknown + GetSearchResultsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSearchResultsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSearchResultsErrors$outboundSchema: z.ZodType< - GetSearchResultsErrors$Outbound, - z.ZodTypeDef, - GetSearchResultsErrors + GetSearchResultsErrors$Outbound, + z.ZodTypeDef, + GetSearchResultsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,68 @@ export const GetSearchResultsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsErrors$ { - /** @deprecated use `GetSearchResultsErrors$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsErrors$inboundSchema; - /** @deprecated use `GetSearchResultsErrors$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsErrors$outboundSchema; - /** @deprecated use `GetSearchResultsErrors$Outbound` instead. */ - export type Outbound = GetSearchResultsErrors$Outbound; + /** @deprecated use `GetSearchResultsErrors$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsErrors$inboundSchema; + /** @deprecated use `GetSearchResultsErrors$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsErrors$outboundSchema; + /** @deprecated use `GetSearchResultsErrors$Outbound` instead. */ + export type Outbound = GetSearchResultsErrors$Outbound; } /** @internal */ -export const GetSearchResultsResponseBody$inboundSchema: z.ZodType< - GetSearchResultsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSearchResultsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSearchResultsResponseBody(remapped); +export const GetSearchResultsBadRequest$inboundSchema: z.ZodType< + GetSearchResultsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSearchResultsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSearchResultsBadRequest(remapped); + }); + /** @internal */ -export type GetSearchResultsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSearchResultsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSearchResultsResponseBody$outboundSchema: z.ZodType< - GetSearchResultsResponseBody$Outbound, - z.ZodTypeDef, - GetSearchResultsResponseBody -> = z - .instanceof(GetSearchResultsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetSearchResultsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSearchResultsBadRequest$outboundSchema: z.ZodType< + GetSearchResultsBadRequest$Outbound, + z.ZodTypeDef, + GetSearchResultsBadRequest +> = z.instanceof(GetSearchResultsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSearchResultsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSearchResultsResponseBody$ { - /** @deprecated use `GetSearchResultsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsResponseBody$inboundSchema; - /** @deprecated use `GetSearchResultsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsResponseBody$outboundSchema; - /** @deprecated use `GetSearchResultsResponseBody$Outbound` instead. */ - export type Outbound = GetSearchResultsResponseBody$Outbound; +export namespace GetSearchResultsBadRequest$ { + /** @deprecated use `GetSearchResultsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsBadRequest$inboundSchema; + /** @deprecated use `GetSearchResultsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsBadRequest$outboundSchema; + /** @deprecated use `GetSearchResultsBadRequest$Outbound` instead. */ + export type Outbound = GetSearchResultsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getserveractivities.ts b/src/sdk/models/errors/getserveractivities.ts index d90c4fab..6a06e9a6 100644 --- a/src/sdk/models/errors/getserveractivities.ts +++ b/src/sdk/models/errors/getserveractivities.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerActivitiesActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetServerActivitiesActivitiesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerActivitiesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetServerActivitiesActivitiesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerActivitiesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerActivitiesActivitiesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerActivitiesUnauthorizedData; - constructor(err: GetServerActivitiesActivitiesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerActivitiesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerActivitiesActivitiesResponseBody"; - } + this.name = "GetServerActivitiesUnauthorized"; + } } export type GetServerActivitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetServerActivitiesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerActivitiesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetServerActivitiesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerActivitiesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerActivitiesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerActivitiesBadRequestData; - constructor(err: GetServerActivitiesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerActivitiesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerActivitiesResponseBody"; - } + this.name = "GetServerActivitiesBadRequest"; + } } /** @internal */ export const GetServerActivitiesActivitiesErrors$inboundSchema: z.ZodType< - GetServerActivitiesActivitiesErrors, - z.ZodTypeDef, - unknown + GetServerActivitiesActivitiesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerActivitiesActivitiesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< - GetServerActivitiesActivitiesErrors$Outbound, - z.ZodTypeDef, - GetServerActivitiesActivitiesErrors + GetServerActivitiesActivitiesErrors$Outbound, + z.ZodTypeDef, + GetServerActivitiesActivitiesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,103 @@ export const GetServerActivitiesActivitiesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerActivitiesActivitiesErrors$ { - /** @deprecated use `GetServerActivitiesActivitiesErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesActivitiesErrors$inboundSchema; - /** @deprecated use `GetServerActivitiesActivitiesErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesActivitiesErrors$outboundSchema; - /** @deprecated use `GetServerActivitiesActivitiesErrors$Outbound` instead. */ - export type Outbound = GetServerActivitiesActivitiesErrors$Outbound; + /** @deprecated use `GetServerActivitiesActivitiesErrors$inboundSchema` instead. */ + export const inboundSchema = + GetServerActivitiesActivitiesErrors$inboundSchema; + /** @deprecated use `GetServerActivitiesActivitiesErrors$outboundSchema` instead. */ + export const outboundSchema = + GetServerActivitiesActivitiesErrors$outboundSchema; + /** @deprecated use `GetServerActivitiesActivitiesErrors$Outbound` instead. */ + export type Outbound = GetServerActivitiesActivitiesErrors$Outbound; } /** @internal */ -export const GetServerActivitiesActivitiesResponseBody$inboundSchema: z.ZodType< - GetServerActivitiesActivitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerActivitiesActivitiesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerActivitiesActivitiesResponseBody(remapped); +export const GetServerActivitiesUnauthorized$inboundSchema: z.ZodType< + GetServerActivitiesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetServerActivitiesActivitiesErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerActivitiesUnauthorized(remapped); + }); + /** @internal */ -export type GetServerActivitiesActivitiesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerActivitiesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerActivitiesActivitiesResponseBody$outboundSchema: z.ZodType< - GetServerActivitiesActivitiesResponseBody$Outbound, - z.ZodTypeDef, - GetServerActivitiesActivitiesResponseBody -> = z - .instanceof(GetServerActivitiesActivitiesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetServerActivitiesActivitiesErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerActivitiesUnauthorized$outboundSchema: z.ZodType< + GetServerActivitiesUnauthorized$Outbound, + z.ZodTypeDef, + GetServerActivitiesUnauthorized +> = z.instanceof(GetServerActivitiesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetServerActivitiesActivitiesErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerActivitiesActivitiesResponseBody$ { - /** @deprecated use `GetServerActivitiesActivitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesActivitiesResponseBody$inboundSchema; - /** @deprecated use `GetServerActivitiesActivitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesActivitiesResponseBody$outboundSchema; - /** @deprecated use `GetServerActivitiesActivitiesResponseBody$Outbound` instead. */ - export type Outbound = GetServerActivitiesActivitiesResponseBody$Outbound; +export namespace GetServerActivitiesUnauthorized$ { + /** @deprecated use `GetServerActivitiesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesUnauthorized$inboundSchema; + /** @deprecated use `GetServerActivitiesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetServerActivitiesUnauthorized$outboundSchema; + /** @deprecated use `GetServerActivitiesUnauthorized$Outbound` instead. */ + export type Outbound = GetServerActivitiesUnauthorized$Outbound; } /** @internal */ export const GetServerActivitiesErrors$inboundSchema: z.ZodType< - GetServerActivitiesErrors, - z.ZodTypeDef, - unknown + GetServerActivitiesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerActivitiesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerActivitiesErrors$outboundSchema: z.ZodType< - GetServerActivitiesErrors$Outbound, - z.ZodTypeDef, - GetServerActivitiesErrors + GetServerActivitiesErrors$Outbound, + z.ZodTypeDef, + GetServerActivitiesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +231,68 @@ export const GetServerActivitiesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerActivitiesErrors$ { - /** @deprecated use `GetServerActivitiesErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesErrors$inboundSchema; - /** @deprecated use `GetServerActivitiesErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesErrors$outboundSchema; - /** @deprecated use `GetServerActivitiesErrors$Outbound` instead. */ - export type Outbound = GetServerActivitiesErrors$Outbound; + /** @deprecated use `GetServerActivitiesErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesErrors$inboundSchema; + /** @deprecated use `GetServerActivitiesErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerActivitiesErrors$outboundSchema; + /** @deprecated use `GetServerActivitiesErrors$Outbound` instead. */ + export type Outbound = GetServerActivitiesErrors$Outbound; } /** @internal */ -export const GetServerActivitiesResponseBody$inboundSchema: z.ZodType< - GetServerActivitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerActivitiesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerActivitiesResponseBody(remapped); +export const GetServerActivitiesBadRequest$inboundSchema: z.ZodType< + GetServerActivitiesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerActivitiesErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerActivitiesBadRequest(remapped); + }); + /** @internal */ -export type GetServerActivitiesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerActivitiesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerActivitiesResponseBody$outboundSchema: z.ZodType< - GetServerActivitiesResponseBody$Outbound, - z.ZodTypeDef, - GetServerActivitiesResponseBody -> = z - .instanceof(GetServerActivitiesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetServerActivitiesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerActivitiesBadRequest$outboundSchema: z.ZodType< + GetServerActivitiesBadRequest$Outbound, + z.ZodTypeDef, + GetServerActivitiesBadRequest +> = z.instanceof(GetServerActivitiesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerActivitiesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerActivitiesResponseBody$ { - /** @deprecated use `GetServerActivitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesResponseBody$inboundSchema; - /** @deprecated use `GetServerActivitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesResponseBody$outboundSchema; - /** @deprecated use `GetServerActivitiesResponseBody$Outbound` instead. */ - export type Outbound = GetServerActivitiesResponseBody$Outbound; +export namespace GetServerActivitiesBadRequest$ { + /** @deprecated use `GetServerActivitiesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesBadRequest$inboundSchema; + /** @deprecated use `GetServerActivitiesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerActivitiesBadRequest$outboundSchema; + /** @deprecated use `GetServerActivitiesBadRequest$Outbound` instead. */ + export type Outbound = GetServerActivitiesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getservercapabilities.ts b/src/sdk/models/errors/getservercapabilities.ts index 32bdc746..6f9b7486 100644 --- a/src/sdk/models/errors/getservercapabilities.ts +++ b/src/sdk/models/errors/getservercapabilities.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerCapabilitiesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetServerCapabilitiesServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerCapabilitiesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetServerCapabilitiesServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerCapabilitiesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerCapabilitiesServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerCapabilitiesUnauthorizedData; - constructor(err: GetServerCapabilitiesServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerCapabilitiesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerCapabilitiesServerResponseBody"; - } + this.name = "GetServerCapabilitiesUnauthorized"; + } } export type Errors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetServerCapabilitiesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerCapabilitiesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetServerCapabilitiesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerCapabilitiesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerCapabilitiesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerCapabilitiesBadRequestData; - constructor(err: GetServerCapabilitiesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerCapabilitiesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerCapabilitiesResponseBody"; - } + this.name = "GetServerCapabilitiesBadRequest"; + } } /** @internal */ export const GetServerCapabilitiesErrors$inboundSchema: z.ZodType< - GetServerCapabilitiesErrors, - z.ZodTypeDef, - unknown + GetServerCapabilitiesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerCapabilitiesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerCapabilitiesErrors$outboundSchema: z.ZodType< - GetServerCapabilitiesErrors$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesErrors + GetServerCapabilitiesErrors$Outbound, + z.ZodTypeDef, + GetServerCapabilitiesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,98 +127,97 @@ export const GetServerCapabilitiesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerCapabilitiesErrors$ { - /** @deprecated use `GetServerCapabilitiesErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerCapabilitiesErrors$inboundSchema; - /** @deprecated use `GetServerCapabilitiesErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerCapabilitiesErrors$outboundSchema; - /** @deprecated use `GetServerCapabilitiesErrors$Outbound` instead. */ - export type Outbound = GetServerCapabilitiesErrors$Outbound; + /** @deprecated use `GetServerCapabilitiesErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerCapabilitiesErrors$inboundSchema; + /** @deprecated use `GetServerCapabilitiesErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerCapabilitiesErrors$outboundSchema; + /** @deprecated use `GetServerCapabilitiesErrors$Outbound` instead. */ + export type Outbound = GetServerCapabilitiesErrors$Outbound; } /** @internal */ -export const GetServerCapabilitiesServerResponseBody$inboundSchema: z.ZodType< - GetServerCapabilitiesServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerCapabilitiesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerCapabilitiesServerResponseBody(remapped); +export const GetServerCapabilitiesUnauthorized$inboundSchema: z.ZodType< + GetServerCapabilitiesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerCapabilitiesErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerCapabilitiesUnauthorized(remapped); + }); + /** @internal */ -export type GetServerCapabilitiesServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerCapabilitiesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerCapabilitiesServerResponseBody$outboundSchema: z.ZodType< - GetServerCapabilitiesServerResponseBody$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesServerResponseBody -> = z - .instanceof(GetServerCapabilitiesServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetServerCapabilitiesErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerCapabilitiesUnauthorized$outboundSchema: z.ZodType< + GetServerCapabilitiesUnauthorized$Outbound, + z.ZodTypeDef, + GetServerCapabilitiesUnauthorized +> = z.instanceof(GetServerCapabilitiesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerCapabilitiesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerCapabilitiesServerResponseBody$ { - /** @deprecated use `GetServerCapabilitiesServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerCapabilitiesServerResponseBody$inboundSchema; - /** @deprecated use `GetServerCapabilitiesServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerCapabilitiesServerResponseBody$outboundSchema; - /** @deprecated use `GetServerCapabilitiesServerResponseBody$Outbound` instead. */ - export type Outbound = GetServerCapabilitiesServerResponseBody$Outbound; +export namespace GetServerCapabilitiesUnauthorized$ { + /** @deprecated use `GetServerCapabilitiesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetServerCapabilitiesUnauthorized$inboundSchema; + /** @deprecated use `GetServerCapabilitiesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetServerCapabilitiesUnauthorized$outboundSchema; + /** @deprecated use `GetServerCapabilitiesUnauthorized$Outbound` instead. */ + export type Outbound = GetServerCapabilitiesUnauthorized$Outbound; } /** @internal */ -export const Errors$inboundSchema: z.ZodType = z.object({ +export const Errors$inboundSchema: z.ZodType = z + .object({ code: z.number().int().optional(), message: z.string().optional(), status: z.number().int().optional(), -}); + }); /** @internal */ export type Errors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ -export const Errors$outboundSchema: z.ZodType = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), +export const Errors$outboundSchema: z.ZodType< + Errors$Outbound, + z.ZodTypeDef, + Errors +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -236,73 +225,66 @@ export const Errors$outboundSchema: z.ZodType = z - .object({ - errors: z.array(z.lazy(() => Errors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerCapabilitiesResponseBody(remapped); +export const GetServerCapabilitiesBadRequest$inboundSchema: z.ZodType< + GetServerCapabilitiesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => Errors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerCapabilitiesBadRequest(remapped); + }); + /** @internal */ -export type GetServerCapabilitiesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerCapabilitiesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerCapabilitiesResponseBody$outboundSchema: z.ZodType< - GetServerCapabilitiesResponseBody$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesResponseBody -> = z - .instanceof(GetServerCapabilitiesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => Errors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerCapabilitiesBadRequest$outboundSchema: z.ZodType< + GetServerCapabilitiesBadRequest$Outbound, + z.ZodTypeDef, + GetServerCapabilitiesBadRequest +> = z.instanceof(GetServerCapabilitiesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => Errors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerCapabilitiesResponseBody$ { - /** @deprecated use `GetServerCapabilitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerCapabilitiesResponseBody$inboundSchema; - /** @deprecated use `GetServerCapabilitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerCapabilitiesResponseBody$outboundSchema; - /** @deprecated use `GetServerCapabilitiesResponseBody$Outbound` instead. */ - export type Outbound = GetServerCapabilitiesResponseBody$Outbound; +export namespace GetServerCapabilitiesBadRequest$ { + /** @deprecated use `GetServerCapabilitiesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerCapabilitiesBadRequest$inboundSchema; + /** @deprecated use `GetServerCapabilitiesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerCapabilitiesBadRequest$outboundSchema; + /** @deprecated use `GetServerCapabilitiesBadRequest$Outbound` instead. */ + export type Outbound = GetServerCapabilitiesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getserveridentity.ts b/src/sdk/models/errors/getserveridentity.ts index 82c3846b..7ee42528 100644 --- a/src/sdk/models/errors/getserveridentity.ts +++ b/src/sdk/models/errors/getserveridentity.ts @@ -2,112 +2,101 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Request Timeout */ -export type GetServerIdentityResponseBodyData = { - code?: number | undefined; - message?: string | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerIdentityRequestTimeoutData = { + code?: number | undefined; + message?: string | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Request Timeout */ -export class GetServerIdentityResponseBody extends Error { - code?: number | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerIdentityRequestTimeout extends Error { + code?: number | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerIdentityResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerIdentityRequestTimeoutData; - constructor(err: GetServerIdentityResponseBodyData) { - const message = err.message || "API error occurred"; - super(message); - this.data$ = err; + constructor(err: GetServerIdentityRequestTimeoutData) { + const message = err.message || "API error occurred"; + super(message); + this.data$ = err; - if (err.code != null) { - this.code = err.code; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.code != null) this.code = err.code; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerIdentityResponseBody"; - } + this.name = "GetServerIdentityRequestTimeout"; + } } /** @internal */ -export const GetServerIdentityResponseBody$inboundSchema: z.ZodType< - GetServerIdentityResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - code: z.number().int().optional(), - message: z.string().optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerIdentityResponseBody(remapped); +export const GetServerIdentityRequestTimeout$inboundSchema: z.ZodType< + GetServerIdentityRequestTimeout, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerIdentityRequestTimeout(remapped); + }); + /** @internal */ -export type GetServerIdentityResponseBody$Outbound = { - code?: number | undefined; - message?: string | undefined; - RawResponse?: never | undefined; +export type GetServerIdentityRequestTimeout$Outbound = { + code?: number | undefined; + message?: string | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerIdentityResponseBody$outboundSchema: z.ZodType< - GetServerIdentityResponseBody$Outbound, - z.ZodTypeDef, - GetServerIdentityResponseBody -> = z - .instanceof(GetServerIdentityResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - code: z.number().int().optional(), - message: z.string().optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerIdentityRequestTimeout$outboundSchema: z.ZodType< + GetServerIdentityRequestTimeout$Outbound, + z.ZodTypeDef, + GetServerIdentityRequestTimeout +> = z.instanceof(GetServerIdentityRequestTimeout) + .transform(v => v.data$) + .pipe( + z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerIdentityResponseBody$ { - /** @deprecated use `GetServerIdentityResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerIdentityResponseBody$inboundSchema; - /** @deprecated use `GetServerIdentityResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerIdentityResponseBody$outboundSchema; - /** @deprecated use `GetServerIdentityResponseBody$Outbound` instead. */ - export type Outbound = GetServerIdentityResponseBody$Outbound; +export namespace GetServerIdentityRequestTimeout$ { + /** @deprecated use `GetServerIdentityRequestTimeout$inboundSchema` instead. */ + export const inboundSchema = GetServerIdentityRequestTimeout$inboundSchema; + /** @deprecated use `GetServerIdentityRequestTimeout$outboundSchema` instead. */ + export const outboundSchema = GetServerIdentityRequestTimeout$outboundSchema; + /** @deprecated use `GetServerIdentityRequestTimeout$Outbound` instead. */ + export type Outbound = GetServerIdentityRequestTimeout$Outbound; } diff --git a/src/sdk/models/errors/getserverlist.ts b/src/sdk/models/errors/getserverlist.ts index 2a768a1b..e4baac1a 100644 --- a/src/sdk/models/errors/getserverlist.ts +++ b/src/sdk/models/errors/getserverlist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerListServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetServerListServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerListUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetServerListServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerListUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerListServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerListUnauthorizedData; - constructor(err: GetServerListServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerListUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerListServerResponseBody"; - } + this.name = "GetServerListUnauthorized"; + } } export type GetServerListErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetServerListResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerListBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetServerListResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerListBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerListResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerListBadRequestData; - constructor(err: GetServerListResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerListBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerListResponseBody"; - } + this.name = "GetServerListBadRequest"; + } } /** @internal */ export const GetServerListServerErrors$inboundSchema: z.ZodType< - GetServerListServerErrors, - z.ZodTypeDef, - unknown + GetServerListServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerListServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerListServerErrors$outboundSchema: z.ZodType< - GetServerListServerErrors$Outbound, - z.ZodTypeDef, - GetServerListServerErrors + GetServerListServerErrors$Outbound, + z.ZodTypeDef, + GetServerListServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetServerListServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListServerErrors$ { - /** @deprecated use `GetServerListServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerListServerErrors$inboundSchema; - /** @deprecated use `GetServerListServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerListServerErrors$outboundSchema; - /** @deprecated use `GetServerListServerErrors$Outbound` instead. */ - export type Outbound = GetServerListServerErrors$Outbound; + /** @deprecated use `GetServerListServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerListServerErrors$inboundSchema; + /** @deprecated use `GetServerListServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerListServerErrors$outboundSchema; + /** @deprecated use `GetServerListServerErrors$Outbound` instead. */ + export type Outbound = GetServerListServerErrors$Outbound; } /** @internal */ -export const GetServerListServerResponseBody$inboundSchema: z.ZodType< - GetServerListServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerListServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerListServerResponseBody(remapped); +export const GetServerListUnauthorized$inboundSchema: z.ZodType< + GetServerListUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerListServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerListUnauthorized(remapped); + }); + /** @internal */ -export type GetServerListServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerListUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerListServerResponseBody$outboundSchema: z.ZodType< - GetServerListServerResponseBody$Outbound, - z.ZodTypeDef, - GetServerListServerResponseBody -> = z - .instanceof(GetServerListServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetServerListServerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerListUnauthorized$outboundSchema: z.ZodType< + GetServerListUnauthorized$Outbound, + z.ZodTypeDef, + GetServerListUnauthorized +> = z.instanceof(GetServerListUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerListServerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerListServerResponseBody$ { - /** @deprecated use `GetServerListServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerListServerResponseBody$inboundSchema; - /** @deprecated use `GetServerListServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerListServerResponseBody$outboundSchema; - /** @deprecated use `GetServerListServerResponseBody$Outbound` instead. */ - export type Outbound = GetServerListServerResponseBody$Outbound; +export namespace GetServerListUnauthorized$ { + /** @deprecated use `GetServerListUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetServerListUnauthorized$inboundSchema; + /** @deprecated use `GetServerListUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetServerListUnauthorized$outboundSchema; + /** @deprecated use `GetServerListUnauthorized$Outbound` instead. */ + export type Outbound = GetServerListUnauthorized$Outbound; } /** @internal */ export const GetServerListErrors$inboundSchema: z.ZodType< - GetServerListErrors, - z.ZodTypeDef, - unknown + GetServerListErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerListErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerListErrors$outboundSchema: z.ZodType< - GetServerListErrors$Outbound, - z.ZodTypeDef, - GetServerListErrors + GetServerListErrors$Outbound, + z.ZodTypeDef, + GetServerListErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetServerListErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListErrors$ { - /** @deprecated use `GetServerListErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerListErrors$inboundSchema; - /** @deprecated use `GetServerListErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerListErrors$outboundSchema; - /** @deprecated use `GetServerListErrors$Outbound` instead. */ - export type Outbound = GetServerListErrors$Outbound; + /** @deprecated use `GetServerListErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerListErrors$inboundSchema; + /** @deprecated use `GetServerListErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerListErrors$outboundSchema; + /** @deprecated use `GetServerListErrors$Outbound` instead. */ + export type Outbound = GetServerListErrors$Outbound; } /** @internal */ -export const GetServerListResponseBody$inboundSchema: z.ZodType< - GetServerListResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerListErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerListResponseBody(remapped); +export const GetServerListBadRequest$inboundSchema: z.ZodType< + GetServerListBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerListErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerListBadRequest(remapped); + }); + /** @internal */ -export type GetServerListResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerListBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerListResponseBody$outboundSchema: z.ZodType< - GetServerListResponseBody$Outbound, - z.ZodTypeDef, - GetServerListResponseBody -> = z - .instanceof(GetServerListResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetServerListErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerListBadRequest$outboundSchema: z.ZodType< + GetServerListBadRequest$Outbound, + z.ZodTypeDef, + GetServerListBadRequest +> = z.instanceof(GetServerListBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerListErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerListResponseBody$ { - /** @deprecated use `GetServerListResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerListResponseBody$inboundSchema; - /** @deprecated use `GetServerListResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerListResponseBody$outboundSchema; - /** @deprecated use `GetServerListResponseBody$Outbound` instead. */ - export type Outbound = GetServerListResponseBody$Outbound; +export namespace GetServerListBadRequest$ { + /** @deprecated use `GetServerListBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerListBadRequest$inboundSchema; + /** @deprecated use `GetServerListBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerListBadRequest$outboundSchema; + /** @deprecated use `GetServerListBadRequest$Outbound` instead. */ + export type Outbound = GetServerListBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getserverpreferences.ts b/src/sdk/models/errors/getserverpreferences.ts index 0df1033b..e6495436 100644 --- a/src/sdk/models/errors/getserverpreferences.ts +++ b/src/sdk/models/errors/getserverpreferences.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerPreferencesServerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetServerPreferencesServerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerPreferencesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetServerPreferencesServerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerPreferencesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerPreferencesServerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerPreferencesUnauthorizedData; - constructor(err: GetServerPreferencesServerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerPreferencesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerPreferencesServerResponseBody"; - } + this.name = "GetServerPreferencesUnauthorized"; + } } export type GetServerPreferencesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetServerPreferencesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerPreferencesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetServerPreferencesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerPreferencesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerPreferencesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerPreferencesBadRequestData; - constructor(err: GetServerPreferencesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerPreferencesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerPreferencesResponseBody"; - } + this.name = "GetServerPreferencesBadRequest"; + } } /** @internal */ export const GetServerPreferencesServerErrors$inboundSchema: z.ZodType< - GetServerPreferencesServerErrors, - z.ZodTypeDef, - unknown + GetServerPreferencesServerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerPreferencesServerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerPreferencesServerErrors$outboundSchema: z.ZodType< - GetServerPreferencesServerErrors$Outbound, - z.ZodTypeDef, - GetServerPreferencesServerErrors + GetServerPreferencesServerErrors$Outbound, + z.ZodTypeDef, + GetServerPreferencesServerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetServerPreferencesServerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerPreferencesServerErrors$ { - /** @deprecated use `GetServerPreferencesServerErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesServerErrors$inboundSchema; - /** @deprecated use `GetServerPreferencesServerErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesServerErrors$outboundSchema; - /** @deprecated use `GetServerPreferencesServerErrors$Outbound` instead. */ - export type Outbound = GetServerPreferencesServerErrors$Outbound; + /** @deprecated use `GetServerPreferencesServerErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesServerErrors$inboundSchema; + /** @deprecated use `GetServerPreferencesServerErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesServerErrors$outboundSchema; + /** @deprecated use `GetServerPreferencesServerErrors$Outbound` instead. */ + export type Outbound = GetServerPreferencesServerErrors$Outbound; } /** @internal */ -export const GetServerPreferencesServerResponseBody$inboundSchema: z.ZodType< - GetServerPreferencesServerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerPreferencesServerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerPreferencesServerResponseBody(remapped); +export const GetServerPreferencesUnauthorized$inboundSchema: z.ZodType< + GetServerPreferencesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerPreferencesServerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerPreferencesUnauthorized(remapped); + }); + /** @internal */ -export type GetServerPreferencesServerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerPreferencesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerPreferencesServerResponseBody$outboundSchema: z.ZodType< - GetServerPreferencesServerResponseBody$Outbound, - z.ZodTypeDef, - GetServerPreferencesServerResponseBody -> = z - .instanceof(GetServerPreferencesServerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetServerPreferencesServerErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerPreferencesUnauthorized$outboundSchema: z.ZodType< + GetServerPreferencesUnauthorized$Outbound, + z.ZodTypeDef, + GetServerPreferencesUnauthorized +> = z.instanceof(GetServerPreferencesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetServerPreferencesServerErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerPreferencesServerResponseBody$ { - /** @deprecated use `GetServerPreferencesServerResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesServerResponseBody$inboundSchema; - /** @deprecated use `GetServerPreferencesServerResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesServerResponseBody$outboundSchema; - /** @deprecated use `GetServerPreferencesServerResponseBody$Outbound` instead. */ - export type Outbound = GetServerPreferencesServerResponseBody$Outbound; +export namespace GetServerPreferencesUnauthorized$ { + /** @deprecated use `GetServerPreferencesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesUnauthorized$inboundSchema; + /** @deprecated use `GetServerPreferencesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesUnauthorized$outboundSchema; + /** @deprecated use `GetServerPreferencesUnauthorized$Outbound` instead. */ + export type Outbound = GetServerPreferencesUnauthorized$Outbound; } /** @internal */ export const GetServerPreferencesErrors$inboundSchema: z.ZodType< - GetServerPreferencesErrors, - z.ZodTypeDef, - unknown + GetServerPreferencesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerPreferencesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerPreferencesErrors$outboundSchema: z.ZodType< - GetServerPreferencesErrors$Outbound, - z.ZodTypeDef, - GetServerPreferencesErrors + GetServerPreferencesErrors$Outbound, + z.ZodTypeDef, + GetServerPreferencesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetServerPreferencesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerPreferencesErrors$ { - /** @deprecated use `GetServerPreferencesErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesErrors$inboundSchema; - /** @deprecated use `GetServerPreferencesErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesErrors$outboundSchema; - /** @deprecated use `GetServerPreferencesErrors$Outbound` instead. */ - export type Outbound = GetServerPreferencesErrors$Outbound; + /** @deprecated use `GetServerPreferencesErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesErrors$inboundSchema; + /** @deprecated use `GetServerPreferencesErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesErrors$outboundSchema; + /** @deprecated use `GetServerPreferencesErrors$Outbound` instead. */ + export type Outbound = GetServerPreferencesErrors$Outbound; } /** @internal */ -export const GetServerPreferencesResponseBody$inboundSchema: z.ZodType< - GetServerPreferencesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerPreferencesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerPreferencesResponseBody(remapped); +export const GetServerPreferencesBadRequest$inboundSchema: z.ZodType< + GetServerPreferencesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerPreferencesErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerPreferencesBadRequest(remapped); + }); + /** @internal */ -export type GetServerPreferencesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerPreferencesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerPreferencesResponseBody$outboundSchema: z.ZodType< - GetServerPreferencesResponseBody$Outbound, - z.ZodTypeDef, - GetServerPreferencesResponseBody -> = z - .instanceof(GetServerPreferencesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetServerPreferencesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerPreferencesBadRequest$outboundSchema: z.ZodType< + GetServerPreferencesBadRequest$Outbound, + z.ZodTypeDef, + GetServerPreferencesBadRequest +> = z.instanceof(GetServerPreferencesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerPreferencesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerPreferencesResponseBody$ { - /** @deprecated use `GetServerPreferencesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesResponseBody$inboundSchema; - /** @deprecated use `GetServerPreferencesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesResponseBody$outboundSchema; - /** @deprecated use `GetServerPreferencesResponseBody$Outbound` instead. */ - export type Outbound = GetServerPreferencesResponseBody$Outbound; +export namespace GetServerPreferencesBadRequest$ { + /** @deprecated use `GetServerPreferencesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesBadRequest$inboundSchema; + /** @deprecated use `GetServerPreferencesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesBadRequest$outboundSchema; + /** @deprecated use `GetServerPreferencesBadRequest$Outbound` instead. */ + export type Outbound = GetServerPreferencesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getserverresources.ts b/src/sdk/models/errors/getserverresources.ts index d6c2fd7b..e302d403 100644 --- a/src/sdk/models/errors/getserverresources.ts +++ b/src/sdk/models/errors/getserverresources.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerResourcesPlexErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetServerResourcesPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerResourcesUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetServerResourcesPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerResourcesUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerResourcesPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerResourcesUnauthorizedData; - constructor(err: GetServerResourcesPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerResourcesUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerResourcesPlexResponseBody"; - } + this.name = "GetServerResourcesUnauthorized"; + } } export type GetServerResourcesErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetServerResourcesResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetServerResourcesBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetServerResourcesResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetServerResourcesBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetServerResourcesResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetServerResourcesBadRequestData; - constructor(err: GetServerResourcesResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetServerResourcesBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetServerResourcesResponseBody"; - } + this.name = "GetServerResourcesBadRequest"; + } } /** @internal */ export const GetServerResourcesPlexErrors$inboundSchema: z.ZodType< - GetServerResourcesPlexErrors, - z.ZodTypeDef, - unknown + GetServerResourcesPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerResourcesPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerResourcesPlexErrors$outboundSchema: z.ZodType< - GetServerResourcesPlexErrors$Outbound, - z.ZodTypeDef, - GetServerResourcesPlexErrors + GetServerResourcesPlexErrors$Outbound, + z.ZodTypeDef, + GetServerResourcesPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetServerResourcesPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerResourcesPlexErrors$ { - /** @deprecated use `GetServerResourcesPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesPlexErrors$inboundSchema; - /** @deprecated use `GetServerResourcesPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesPlexErrors$outboundSchema; - /** @deprecated use `GetServerResourcesPlexErrors$Outbound` instead. */ - export type Outbound = GetServerResourcesPlexErrors$Outbound; + /** @deprecated use `GetServerResourcesPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesPlexErrors$inboundSchema; + /** @deprecated use `GetServerResourcesPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesPlexErrors$outboundSchema; + /** @deprecated use `GetServerResourcesPlexErrors$Outbound` instead. */ + export type Outbound = GetServerResourcesPlexErrors$Outbound; } /** @internal */ -export const GetServerResourcesPlexResponseBody$inboundSchema: z.ZodType< - GetServerResourcesPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerResourcesPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerResourcesPlexResponseBody(remapped); +export const GetServerResourcesUnauthorized$inboundSchema: z.ZodType< + GetServerResourcesUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerResourcesPlexErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerResourcesUnauthorized(remapped); + }); + /** @internal */ -export type GetServerResourcesPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerResourcesUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerResourcesPlexResponseBody$outboundSchema: z.ZodType< - GetServerResourcesPlexResponseBody$Outbound, - z.ZodTypeDef, - GetServerResourcesPlexResponseBody -> = z - .instanceof(GetServerResourcesPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetServerResourcesPlexErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerResourcesUnauthorized$outboundSchema: z.ZodType< + GetServerResourcesUnauthorized$Outbound, + z.ZodTypeDef, + GetServerResourcesUnauthorized +> = z.instanceof(GetServerResourcesUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerResourcesPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerResourcesPlexResponseBody$ { - /** @deprecated use `GetServerResourcesPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesPlexResponseBody$inboundSchema; - /** @deprecated use `GetServerResourcesPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesPlexResponseBody$outboundSchema; - /** @deprecated use `GetServerResourcesPlexResponseBody$Outbound` instead. */ - export type Outbound = GetServerResourcesPlexResponseBody$Outbound; +export namespace GetServerResourcesUnauthorized$ { + /** @deprecated use `GetServerResourcesUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesUnauthorized$inboundSchema; + /** @deprecated use `GetServerResourcesUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesUnauthorized$outboundSchema; + /** @deprecated use `GetServerResourcesUnauthorized$Outbound` instead. */ + export type Outbound = GetServerResourcesUnauthorized$Outbound; } /** @internal */ export const GetServerResourcesErrors$inboundSchema: z.ZodType< - GetServerResourcesErrors, - z.ZodTypeDef, - unknown + GetServerResourcesErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetServerResourcesErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetServerResourcesErrors$outboundSchema: z.ZodType< - GetServerResourcesErrors$Outbound, - z.ZodTypeDef, - GetServerResourcesErrors + GetServerResourcesErrors$Outbound, + z.ZodTypeDef, + GetServerResourcesErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,68 @@ export const GetServerResourcesErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerResourcesErrors$ { - /** @deprecated use `GetServerResourcesErrors$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesErrors$inboundSchema; - /** @deprecated use `GetServerResourcesErrors$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesErrors$outboundSchema; - /** @deprecated use `GetServerResourcesErrors$Outbound` instead. */ - export type Outbound = GetServerResourcesErrors$Outbound; + /** @deprecated use `GetServerResourcesErrors$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesErrors$inboundSchema; + /** @deprecated use `GetServerResourcesErrors$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesErrors$outboundSchema; + /** @deprecated use `GetServerResourcesErrors$Outbound` instead. */ + export type Outbound = GetServerResourcesErrors$Outbound; } /** @internal */ -export const GetServerResourcesResponseBody$inboundSchema: z.ZodType< - GetServerResourcesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetServerResourcesErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetServerResourcesResponseBody(remapped); +export const GetServerResourcesBadRequest$inboundSchema: z.ZodType< + GetServerResourcesBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetServerResourcesErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetServerResourcesBadRequest(remapped); + }); + /** @internal */ -export type GetServerResourcesResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetServerResourcesBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetServerResourcesResponseBody$outboundSchema: z.ZodType< - GetServerResourcesResponseBody$Outbound, - z.ZodTypeDef, - GetServerResourcesResponseBody -> = z - .instanceof(GetServerResourcesResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetServerResourcesErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetServerResourcesBadRequest$outboundSchema: z.ZodType< + GetServerResourcesBadRequest$Outbound, + z.ZodTypeDef, + GetServerResourcesBadRequest +> = z.instanceof(GetServerResourcesBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetServerResourcesErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetServerResourcesResponseBody$ { - /** @deprecated use `GetServerResourcesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesResponseBody$inboundSchema; - /** @deprecated use `GetServerResourcesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesResponseBody$outboundSchema; - /** @deprecated use `GetServerResourcesResponseBody$Outbound` instead. */ - export type Outbound = GetServerResourcesResponseBody$Outbound; +export namespace GetServerResourcesBadRequest$ { + /** @deprecated use `GetServerResourcesBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesBadRequest$inboundSchema; + /** @deprecated use `GetServerResourcesBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesBadRequest$outboundSchema; + /** @deprecated use `GetServerResourcesBadRequest$Outbound` instead. */ + export type Outbound = GetServerResourcesBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getsessionhistory.ts b/src/sdk/models/errors/getsessionhistory.ts index 5f8a9824..dd12c18f 100644 --- a/src/sdk/models/errors/getsessionhistory.ts +++ b/src/sdk/models/errors/getsessionhistory.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSessionHistorySessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetSessionHistorySessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSessionHistoryUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetSessionHistorySessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSessionHistoryUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSessionHistorySessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSessionHistoryUnauthorizedData; - constructor(err: GetSessionHistorySessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSessionHistoryUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSessionHistorySessionsResponseBody"; - } + this.name = "GetSessionHistoryUnauthorized"; + } } export type GetSessionHistoryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetSessionHistoryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSessionHistoryBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetSessionHistoryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSessionHistoryBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSessionHistoryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSessionHistoryBadRequestData; - constructor(err: GetSessionHistoryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSessionHistoryBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSessionHistoryResponseBody"; - } + this.name = "GetSessionHistoryBadRequest"; + } } /** @internal */ export const GetSessionHistorySessionsErrors$inboundSchema: z.ZodType< - GetSessionHistorySessionsErrors, - z.ZodTypeDef, - unknown + GetSessionHistorySessionsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSessionHistorySessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSessionHistorySessionsErrors$outboundSchema: z.ZodType< - GetSessionHistorySessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionHistorySessionsErrors + GetSessionHistorySessionsErrors$Outbound, + z.ZodTypeDef, + GetSessionHistorySessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetSessionHistorySessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistorySessionsErrors$ { - /** @deprecated use `GetSessionHistorySessionsErrors$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistorySessionsErrors$inboundSchema; - /** @deprecated use `GetSessionHistorySessionsErrors$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistorySessionsErrors$outboundSchema; - /** @deprecated use `GetSessionHistorySessionsErrors$Outbound` instead. */ - export type Outbound = GetSessionHistorySessionsErrors$Outbound; + /** @deprecated use `GetSessionHistorySessionsErrors$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistorySessionsErrors$inboundSchema; + /** @deprecated use `GetSessionHistorySessionsErrors$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistorySessionsErrors$outboundSchema; + /** @deprecated use `GetSessionHistorySessionsErrors$Outbound` instead. */ + export type Outbound = GetSessionHistorySessionsErrors$Outbound; } /** @internal */ -export const GetSessionHistorySessionsResponseBody$inboundSchema: z.ZodType< - GetSessionHistorySessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSessionHistorySessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSessionHistorySessionsResponseBody(remapped); +export const GetSessionHistoryUnauthorized$inboundSchema: z.ZodType< + GetSessionHistoryUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSessionHistorySessionsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSessionHistoryUnauthorized(remapped); + }); + /** @internal */ -export type GetSessionHistorySessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSessionHistoryUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSessionHistorySessionsResponseBody$outboundSchema: z.ZodType< - GetSessionHistorySessionsResponseBody$Outbound, - z.ZodTypeDef, - GetSessionHistorySessionsResponseBody -> = z - .instanceof(GetSessionHistorySessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetSessionHistorySessionsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSessionHistoryUnauthorized$outboundSchema: z.ZodType< + GetSessionHistoryUnauthorized$Outbound, + z.ZodTypeDef, + GetSessionHistoryUnauthorized +> = z.instanceof(GetSessionHistoryUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetSessionHistorySessionsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSessionHistorySessionsResponseBody$ { - /** @deprecated use `GetSessionHistorySessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistorySessionsResponseBody$inboundSchema; - /** @deprecated use `GetSessionHistorySessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistorySessionsResponseBody$outboundSchema; - /** @deprecated use `GetSessionHistorySessionsResponseBody$Outbound` instead. */ - export type Outbound = GetSessionHistorySessionsResponseBody$Outbound; +export namespace GetSessionHistoryUnauthorized$ { + /** @deprecated use `GetSessionHistoryUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryUnauthorized$inboundSchema; + /** @deprecated use `GetSessionHistoryUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryUnauthorized$outboundSchema; + /** @deprecated use `GetSessionHistoryUnauthorized$Outbound` instead. */ + export type Outbound = GetSessionHistoryUnauthorized$Outbound; } /** @internal */ export const GetSessionHistoryErrors$inboundSchema: z.ZodType< - GetSessionHistoryErrors, - z.ZodTypeDef, - unknown + GetSessionHistoryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSessionHistoryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSessionHistoryErrors$outboundSchema: z.ZodType< - GetSessionHistoryErrors$Outbound, - z.ZodTypeDef, - GetSessionHistoryErrors + GetSessionHistoryErrors$Outbound, + z.ZodTypeDef, + GetSessionHistoryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const GetSessionHistoryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryErrors$ { - /** @deprecated use `GetSessionHistoryErrors$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryErrors$inboundSchema; - /** @deprecated use `GetSessionHistoryErrors$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryErrors$outboundSchema; - /** @deprecated use `GetSessionHistoryErrors$Outbound` instead. */ - export type Outbound = GetSessionHistoryErrors$Outbound; + /** @deprecated use `GetSessionHistoryErrors$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryErrors$inboundSchema; + /** @deprecated use `GetSessionHistoryErrors$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryErrors$outboundSchema; + /** @deprecated use `GetSessionHistoryErrors$Outbound` instead. */ + export type Outbound = GetSessionHistoryErrors$Outbound; } /** @internal */ -export const GetSessionHistoryResponseBody$inboundSchema: z.ZodType< - GetSessionHistoryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSessionHistoryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSessionHistoryResponseBody(remapped); +export const GetSessionHistoryBadRequest$inboundSchema: z.ZodType< + GetSessionHistoryBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSessionHistoryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSessionHistoryBadRequest(remapped); + }); + /** @internal */ -export type GetSessionHistoryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSessionHistoryBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSessionHistoryResponseBody$outboundSchema: z.ZodType< - GetSessionHistoryResponseBody$Outbound, - z.ZodTypeDef, - GetSessionHistoryResponseBody -> = z - .instanceof(GetSessionHistoryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetSessionHistoryErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSessionHistoryBadRequest$outboundSchema: z.ZodType< + GetSessionHistoryBadRequest$Outbound, + z.ZodTypeDef, + GetSessionHistoryBadRequest +> = z.instanceof(GetSessionHistoryBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSessionHistoryErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSessionHistoryResponseBody$ { - /** @deprecated use `GetSessionHistoryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryResponseBody$inboundSchema; - /** @deprecated use `GetSessionHistoryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryResponseBody$outboundSchema; - /** @deprecated use `GetSessionHistoryResponseBody$Outbound` instead. */ - export type Outbound = GetSessionHistoryResponseBody$Outbound; +export namespace GetSessionHistoryBadRequest$ { + /** @deprecated use `GetSessionHistoryBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryBadRequest$inboundSchema; + /** @deprecated use `GetSessionHistoryBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryBadRequest$outboundSchema; + /** @deprecated use `GetSessionHistoryBadRequest$Outbound` instead. */ + export type Outbound = GetSessionHistoryBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getsessions.ts b/src/sdk/models/errors/getsessions.ts index 6d63f26b..e367a021 100644 --- a/src/sdk/models/errors/getsessions.ts +++ b/src/sdk/models/errors/getsessions.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSessionsSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetSessionsSessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSessionsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetSessionsSessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSessionsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSessionsSessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSessionsUnauthorizedData; - constructor(err: GetSessionsSessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSessionsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSessionsSessionsResponseBody"; - } + this.name = "GetSessionsUnauthorized"; + } } export type GetSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetSessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSessionsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetSessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSessionsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSessionsBadRequestData; - constructor(err: GetSessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSessionsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSessionsResponseBody"; - } + this.name = "GetSessionsBadRequest"; + } } /** @internal */ export const GetSessionsSessionsErrors$inboundSchema: z.ZodType< - GetSessionsSessionsErrors, - z.ZodTypeDef, - unknown + GetSessionsSessionsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSessionsSessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSessionsSessionsErrors$outboundSchema: z.ZodType< - GetSessionsSessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionsSessionsErrors + GetSessionsSessionsErrors$Outbound, + z.ZodTypeDef, + GetSessionsSessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetSessionsSessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsSessionsErrors$ { - /** @deprecated use `GetSessionsSessionsErrors$inboundSchema` instead. */ - export const inboundSchema = GetSessionsSessionsErrors$inboundSchema; - /** @deprecated use `GetSessionsSessionsErrors$outboundSchema` instead. */ - export const outboundSchema = GetSessionsSessionsErrors$outboundSchema; - /** @deprecated use `GetSessionsSessionsErrors$Outbound` instead. */ - export type Outbound = GetSessionsSessionsErrors$Outbound; + /** @deprecated use `GetSessionsSessionsErrors$inboundSchema` instead. */ + export const inboundSchema = GetSessionsSessionsErrors$inboundSchema; + /** @deprecated use `GetSessionsSessionsErrors$outboundSchema` instead. */ + export const outboundSchema = GetSessionsSessionsErrors$outboundSchema; + /** @deprecated use `GetSessionsSessionsErrors$Outbound` instead. */ + export type Outbound = GetSessionsSessionsErrors$Outbound; } /** @internal */ -export const GetSessionsSessionsResponseBody$inboundSchema: z.ZodType< - GetSessionsSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSessionsSessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSessionsSessionsResponseBody(remapped); +export const GetSessionsUnauthorized$inboundSchema: z.ZodType< + GetSessionsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSessionsSessionsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSessionsUnauthorized(remapped); + }); + /** @internal */ -export type GetSessionsSessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSessionsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSessionsSessionsResponseBody$outboundSchema: z.ZodType< - GetSessionsSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetSessionsSessionsResponseBody -> = z - .instanceof(GetSessionsSessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetSessionsSessionsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSessionsUnauthorized$outboundSchema: z.ZodType< + GetSessionsUnauthorized$Outbound, + z.ZodTypeDef, + GetSessionsUnauthorized +> = z.instanceof(GetSessionsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSessionsSessionsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSessionsSessionsResponseBody$ { - /** @deprecated use `GetSessionsSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionsSessionsResponseBody$inboundSchema; - /** @deprecated use `GetSessionsSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionsSessionsResponseBody$outboundSchema; - /** @deprecated use `GetSessionsSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetSessionsSessionsResponseBody$Outbound; +export namespace GetSessionsUnauthorized$ { + /** @deprecated use `GetSessionsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetSessionsUnauthorized$inboundSchema; + /** @deprecated use `GetSessionsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetSessionsUnauthorized$outboundSchema; + /** @deprecated use `GetSessionsUnauthorized$Outbound` instead. */ + export type Outbound = GetSessionsUnauthorized$Outbound; } /** @internal */ -export const GetSessionsErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetSessionsErrors$inboundSchema: z.ZodType< + GetSessionsErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetSessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSessionsErrors$outboundSchema: z.ZodType< - GetSessionsErrors$Outbound, - z.ZodTypeDef, - GetSessionsErrors + GetSessionsErrors$Outbound, + z.ZodTypeDef, + GetSessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,67 @@ export const GetSessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsErrors$ { - /** @deprecated use `GetSessionsErrors$inboundSchema` instead. */ - export const inboundSchema = GetSessionsErrors$inboundSchema; - /** @deprecated use `GetSessionsErrors$outboundSchema` instead. */ - export const outboundSchema = GetSessionsErrors$outboundSchema; - /** @deprecated use `GetSessionsErrors$Outbound` instead. */ - export type Outbound = GetSessionsErrors$Outbound; + /** @deprecated use `GetSessionsErrors$inboundSchema` instead. */ + export const inboundSchema = GetSessionsErrors$inboundSchema; + /** @deprecated use `GetSessionsErrors$outboundSchema` instead. */ + export const outboundSchema = GetSessionsErrors$outboundSchema; + /** @deprecated use `GetSessionsErrors$Outbound` instead. */ + export type Outbound = GetSessionsErrors$Outbound; } /** @internal */ -export const GetSessionsResponseBody$inboundSchema: z.ZodType< - GetSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetSessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSessionsResponseBody(remapped); +export const GetSessionsBadRequest$inboundSchema: z.ZodType< + GetSessionsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetSessionsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSessionsBadRequest(remapped); + }); + /** @internal */ -export type GetSessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSessionsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSessionsResponseBody$outboundSchema: z.ZodType< - GetSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetSessionsResponseBody -> = z - .instanceof(GetSessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetSessionsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSessionsBadRequest$outboundSchema: z.ZodType< + GetSessionsBadRequest$Outbound, + z.ZodTypeDef, + GetSessionsBadRequest +> = z.instanceof(GetSessionsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetSessionsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSessionsResponseBody$ { - /** @deprecated use `GetSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionsResponseBody$inboundSchema; - /** @deprecated use `GetSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionsResponseBody$outboundSchema; - /** @deprecated use `GetSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetSessionsResponseBody$Outbound; +export namespace GetSessionsBadRequest$ { + /** @deprecated use `GetSessionsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetSessionsBadRequest$inboundSchema; + /** @deprecated use `GetSessionsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetSessionsBadRequest$outboundSchema; + /** @deprecated use `GetSessionsBadRequest$Outbound` instead. */ + export type Outbound = GetSessionsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getsourceconnectioninformation.ts b/src/sdk/models/errors/getsourceconnectioninformation.ts index 6fea7ae3..884f0509 100644 --- a/src/sdk/models/errors/getsourceconnectioninformation.ts +++ b/src/sdk/models/errors/getsourceconnectioninformation.ts @@ -2,249 +2,240 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSourceConnectionInformationAuthenticationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetSourceConnectionInformationAuthenticationResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSourceConnectionInformationUnauthorizedData = { + errors?: + | Array + | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetSourceConnectionInformationAuthenticationResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSourceConnectionInformationUnauthorized extends Error { + errors?: + | Array + | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSourceConnectionInformationAuthenticationResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSourceConnectionInformationUnauthorizedData; - constructor(err: GetSourceConnectionInformationAuthenticationResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSourceConnectionInformationUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSourceConnectionInformationAuthenticationResponseBody"; - } + this.name = "GetSourceConnectionInformationUnauthorized"; + } } export type GetSourceConnectionInformationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetSourceConnectionInformationResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetSourceConnectionInformationBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetSourceConnectionInformationResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetSourceConnectionInformationBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetSourceConnectionInformationResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetSourceConnectionInformationBadRequestData; - constructor(err: GetSourceConnectionInformationResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetSourceConnectionInformationBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetSourceConnectionInformationResponseBody"; - } + this.name = "GetSourceConnectionInformationBadRequest"; + } } /** @internal */ -export const GetSourceConnectionInformationAuthenticationErrors$inboundSchema: z.ZodType< +export const GetSourceConnectionInformationAuthenticationErrors$inboundSchema: + z.ZodType< GetSourceConnectionInformationAuthenticationErrors, z.ZodTypeDef, unknown -> = z.object({ + > = z.object({ code: z.number().int().optional(), message: z.string().optional(), status: z.number().int().optional(), -}); + }); /** @internal */ export type GetSourceConnectionInformationAuthenticationErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ -export const GetSourceConnectionInformationAuthenticationErrors$outboundSchema: z.ZodType< +export const GetSourceConnectionInformationAuthenticationErrors$outboundSchema: + z.ZodType< GetSourceConnectionInformationAuthenticationErrors$Outbound, z.ZodTypeDef, GetSourceConnectionInformationAuthenticationErrors -> = z.object({ + > = z.object({ code: z.number().int().optional(), message: z.string().optional(), status: z.number().int().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSourceConnectionInformationAuthenticationErrors$ { - /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$inboundSchema` instead. */ - export const inboundSchema = GetSourceConnectionInformationAuthenticationErrors$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$outboundSchema` instead. */ - export const outboundSchema = GetSourceConnectionInformationAuthenticationErrors$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationAuthenticationErrors$Outbound; + /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationAuthenticationErrors$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationAuthenticationErrors$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationAuthenticationErrors$Outbound` instead. */ + export type Outbound = + GetSourceConnectionInformationAuthenticationErrors$Outbound; } /** @internal */ -export const GetSourceConnectionInformationAuthenticationResponseBody$inboundSchema: z.ZodType< - GetSourceConnectionInformationAuthenticationResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetSourceConnectionInformationAuthenticationErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), +export const GetSourceConnectionInformationUnauthorized$inboundSchema: + z.ZodType = + z.object({ + errors: z.array( + z.lazy(() => + GetSourceConnectionInformationAuthenticationErrors$inboundSchema + ), + ).optional(), + RawResponse: z.instanceof(Response).optional(), }) - .transform((v) => { + .transform((v) => { const remapped = remap$(v, { - RawResponse: "rawResponse", + "RawResponse": "rawResponse", }); - return new GetSourceConnectionInformationAuthenticationResponseBody(remapped); - }); + return new GetSourceConnectionInformationUnauthorized(remapped); + }); /** @internal */ -export type GetSourceConnectionInformationAuthenticationResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSourceConnectionInformationUnauthorized$Outbound = { + errors?: + | Array + | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSourceConnectionInformationAuthenticationResponseBody$outboundSchema: z.ZodType< - GetSourceConnectionInformationAuthenticationResponseBody$Outbound, +export const GetSourceConnectionInformationUnauthorized$outboundSchema: + z.ZodType< + GetSourceConnectionInformationUnauthorized$Outbound, z.ZodTypeDef, - GetSourceConnectionInformationAuthenticationResponseBody -> = z - .instanceof(GetSourceConnectionInformationAuthenticationResponseBody) - .transform((v) => v.data$) + GetSourceConnectionInformationUnauthorized + > = z.instanceof(GetSourceConnectionInformationUnauthorized) + .transform(v => v.data$) .pipe( - z - .object({ - errors: z - .array( - z.lazy( - () => GetSourceConnectionInformationAuthenticationErrors$outboundSchema - ) - ) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) + z.object({ + errors: z.array(z.lazy(() => + GetSourceConnectionInformationAuthenticationErrors$outboundSchema + )).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSourceConnectionInformationAuthenticationResponseBody$ { - /** @deprecated use `GetSourceConnectionInformationAuthenticationResponseBody$inboundSchema` instead. */ - export const inboundSchema = - GetSourceConnectionInformationAuthenticationResponseBody$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationAuthenticationResponseBody$outboundSchema` instead. */ - export const outboundSchema = - GetSourceConnectionInformationAuthenticationResponseBody$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationAuthenticationResponseBody$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationAuthenticationResponseBody$Outbound; +export namespace GetSourceConnectionInformationUnauthorized$ { + /** @deprecated use `GetSourceConnectionInformationUnauthorized$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationUnauthorized$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationUnauthorized$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationUnauthorized$Outbound` instead. */ + export type Outbound = GetSourceConnectionInformationUnauthorized$Outbound; } /** @internal */ export const GetSourceConnectionInformationErrors$inboundSchema: z.ZodType< - GetSourceConnectionInformationErrors, - z.ZodTypeDef, - unknown + GetSourceConnectionInformationErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetSourceConnectionInformationErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetSourceConnectionInformationErrors$outboundSchema: z.ZodType< - GetSourceConnectionInformationErrors$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationErrors + GetSourceConnectionInformationErrors$Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -252,77 +243,74 @@ export const GetSourceConnectionInformationErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSourceConnectionInformationErrors$ { - /** @deprecated use `GetSourceConnectionInformationErrors$inboundSchema` instead. */ - export const inboundSchema = GetSourceConnectionInformationErrors$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationErrors$outboundSchema` instead. */ - export const outboundSchema = GetSourceConnectionInformationErrors$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationErrors$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationErrors$Outbound; + /** @deprecated use `GetSourceConnectionInformationErrors$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationErrors$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationErrors$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationErrors$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationErrors$Outbound` instead. */ + export type Outbound = GetSourceConnectionInformationErrors$Outbound; } /** @internal */ -export const GetSourceConnectionInformationResponseBody$inboundSchema: z.ZodType< - GetSourceConnectionInformationResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetSourceConnectionInformationErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetSourceConnectionInformationResponseBody(remapped); +export const GetSourceConnectionInformationBadRequest$inboundSchema: z.ZodType< + GetSourceConnectionInformationBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetSourceConnectionInformationErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetSourceConnectionInformationBadRequest(remapped); + }); + /** @internal */ -export type GetSourceConnectionInformationResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetSourceConnectionInformationBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetSourceConnectionInformationResponseBody$outboundSchema: z.ZodType< - GetSourceConnectionInformationResponseBody$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationResponseBody -> = z - .instanceof(GetSourceConnectionInformationResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetSourceConnectionInformationErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetSourceConnectionInformationBadRequest$outboundSchema: z.ZodType< + GetSourceConnectionInformationBadRequest$Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationBadRequest +> = z.instanceof(GetSourceConnectionInformationBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetSourceConnectionInformationErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetSourceConnectionInformationResponseBody$ { - /** @deprecated use `GetSourceConnectionInformationResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSourceConnectionInformationResponseBody$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSourceConnectionInformationResponseBody$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationResponseBody$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationResponseBody$Outbound; +export namespace GetSourceConnectionInformationBadRequest$ { + /** @deprecated use `GetSourceConnectionInformationBadRequest$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationBadRequest$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationBadRequest$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationBadRequest$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationBadRequest$Outbound` instead. */ + export type Outbound = GetSourceConnectionInformationBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getstatistics.ts b/src/sdk/models/errors/getstatistics.ts index 1fc4eddf..600e5e08 100644 --- a/src/sdk/models/errors/getstatistics.ts +++ b/src/sdk/models/errors/getstatistics.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetStatisticsStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetStatisticsStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetStatisticsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetStatisticsStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetStatisticsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetStatisticsStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetStatisticsUnauthorizedData; - constructor(err: GetStatisticsStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetStatisticsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetStatisticsStatisticsResponseBody"; - } + this.name = "GetStatisticsUnauthorized"; + } } export type GetStatisticsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetStatisticsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetStatisticsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetStatisticsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetStatisticsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetStatisticsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetStatisticsBadRequestData; - constructor(err: GetStatisticsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetStatisticsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetStatisticsResponseBody"; - } + this.name = "GetStatisticsBadRequest"; + } } /** @internal */ export const GetStatisticsStatisticsErrors$inboundSchema: z.ZodType< - GetStatisticsStatisticsErrors, - z.ZodTypeDef, - unknown + GetStatisticsStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetStatisticsStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetStatisticsStatisticsErrors$outboundSchema: z.ZodType< - GetStatisticsStatisticsErrors$Outbound, - z.ZodTypeDef, - GetStatisticsStatisticsErrors + GetStatisticsStatisticsErrors$Outbound, + z.ZodTypeDef, + GetStatisticsStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const GetStatisticsStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsStatisticsErrors$ { - /** @deprecated use `GetStatisticsStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsStatisticsErrors$inboundSchema; - /** @deprecated use `GetStatisticsStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsStatisticsErrors$outboundSchema; - /** @deprecated use `GetStatisticsStatisticsErrors$Outbound` instead. */ - export type Outbound = GetStatisticsStatisticsErrors$Outbound; + /** @deprecated use `GetStatisticsStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsStatisticsErrors$inboundSchema; + /** @deprecated use `GetStatisticsStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsStatisticsErrors$outboundSchema; + /** @deprecated use `GetStatisticsStatisticsErrors$Outbound` instead. */ + export type Outbound = GetStatisticsStatisticsErrors$Outbound; } /** @internal */ -export const GetStatisticsStatisticsResponseBody$inboundSchema: z.ZodType< - GetStatisticsStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetStatisticsStatisticsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetStatisticsStatisticsResponseBody(remapped); +export const GetStatisticsUnauthorized$inboundSchema: z.ZodType< + GetStatisticsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetStatisticsStatisticsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetStatisticsUnauthorized(remapped); + }); + /** @internal */ -export type GetStatisticsStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetStatisticsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetStatisticsStatisticsResponseBody$outboundSchema: z.ZodType< - GetStatisticsStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetStatisticsStatisticsResponseBody -> = z - .instanceof(GetStatisticsStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetStatisticsStatisticsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetStatisticsUnauthorized$outboundSchema: z.ZodType< + GetStatisticsUnauthorized$Outbound, + z.ZodTypeDef, + GetStatisticsUnauthorized +> = z.instanceof(GetStatisticsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetStatisticsStatisticsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetStatisticsStatisticsResponseBody$ { - /** @deprecated use `GetStatisticsStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetStatisticsStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetStatisticsStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetStatisticsStatisticsResponseBody$Outbound; +export namespace GetStatisticsUnauthorized$ { + /** @deprecated use `GetStatisticsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsUnauthorized$inboundSchema; + /** @deprecated use `GetStatisticsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsUnauthorized$outboundSchema; + /** @deprecated use `GetStatisticsUnauthorized$Outbound` instead. */ + export type Outbound = GetStatisticsUnauthorized$Outbound; } /** @internal */ export const GetStatisticsErrors$inboundSchema: z.ZodType< - GetStatisticsErrors, - z.ZodTypeDef, - unknown + GetStatisticsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetStatisticsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetStatisticsErrors$outboundSchema: z.ZodType< - GetStatisticsErrors$Outbound, - z.ZodTypeDef, - GetStatisticsErrors + GetStatisticsErrors$Outbound, + z.ZodTypeDef, + GetStatisticsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,67 @@ export const GetStatisticsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsErrors$ { - /** @deprecated use `GetStatisticsErrors$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsErrors$inboundSchema; - /** @deprecated use `GetStatisticsErrors$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsErrors$outboundSchema; - /** @deprecated use `GetStatisticsErrors$Outbound` instead. */ - export type Outbound = GetStatisticsErrors$Outbound; + /** @deprecated use `GetStatisticsErrors$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsErrors$inboundSchema; + /** @deprecated use `GetStatisticsErrors$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsErrors$outboundSchema; + /** @deprecated use `GetStatisticsErrors$Outbound` instead. */ + export type Outbound = GetStatisticsErrors$Outbound; } /** @internal */ -export const GetStatisticsResponseBody$inboundSchema: z.ZodType< - GetStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetStatisticsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetStatisticsResponseBody(remapped); +export const GetStatisticsBadRequest$inboundSchema: z.ZodType< + GetStatisticsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetStatisticsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetStatisticsBadRequest(remapped); + }); + /** @internal */ -export type GetStatisticsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetStatisticsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetStatisticsResponseBody$outboundSchema: z.ZodType< - GetStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetStatisticsResponseBody -> = z - .instanceof(GetStatisticsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetStatisticsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetStatisticsBadRequest$outboundSchema: z.ZodType< + GetStatisticsBadRequest$Outbound, + z.ZodTypeDef, + GetStatisticsBadRequest +> = z.instanceof(GetStatisticsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetStatisticsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetStatisticsResponseBody$ { - /** @deprecated use `GetStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetStatisticsResponseBody$Outbound; +export namespace GetStatisticsBadRequest$ { + /** @deprecated use `GetStatisticsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsBadRequest$inboundSchema; + /** @deprecated use `GetStatisticsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsBadRequest$outboundSchema; + /** @deprecated use `GetStatisticsBadRequest$Outbound` instead. */ + export type Outbound = GetStatisticsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getthumbimage.ts b/src/sdk/models/errors/getthumbimage.ts index 80c2263d..ecdf423c 100644 --- a/src/sdk/models/errors/getthumbimage.ts +++ b/src/sdk/models/errors/getthumbimage.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetThumbImageMediaErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetThumbImageMediaResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetThumbImageUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetThumbImageMediaResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetThumbImageUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetThumbImageMediaResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetThumbImageUnauthorizedData; - constructor(err: GetThumbImageMediaResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetThumbImageUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetThumbImageMediaResponseBody"; - } + this.name = "GetThumbImageUnauthorized"; + } } export type GetThumbImageErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetThumbImageResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetThumbImageBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetThumbImageResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetThumbImageBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetThumbImageResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetThumbImageBadRequestData; - constructor(err: GetThumbImageResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetThumbImageBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetThumbImageResponseBody"; - } + this.name = "GetThumbImageBadRequest"; + } } /** @internal */ export const GetThumbImageMediaErrors$inboundSchema: z.ZodType< - GetThumbImageMediaErrors, - z.ZodTypeDef, - unknown + GetThumbImageMediaErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetThumbImageMediaErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetThumbImageMediaErrors$outboundSchema: z.ZodType< - GetThumbImageMediaErrors$Outbound, - z.ZodTypeDef, - GetThumbImageMediaErrors + GetThumbImageMediaErrors$Outbound, + z.ZodTypeDef, + GetThumbImageMediaErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetThumbImageMediaErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetThumbImageMediaErrors$ { - /** @deprecated use `GetThumbImageMediaErrors$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageMediaErrors$inboundSchema; - /** @deprecated use `GetThumbImageMediaErrors$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageMediaErrors$outboundSchema; - /** @deprecated use `GetThumbImageMediaErrors$Outbound` instead. */ - export type Outbound = GetThumbImageMediaErrors$Outbound; + /** @deprecated use `GetThumbImageMediaErrors$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageMediaErrors$inboundSchema; + /** @deprecated use `GetThumbImageMediaErrors$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageMediaErrors$outboundSchema; + /** @deprecated use `GetThumbImageMediaErrors$Outbound` instead. */ + export type Outbound = GetThumbImageMediaErrors$Outbound; } /** @internal */ -export const GetThumbImageMediaResponseBody$inboundSchema: z.ZodType< - GetThumbImageMediaResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetThumbImageMediaErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetThumbImageMediaResponseBody(remapped); +export const GetThumbImageUnauthorized$inboundSchema: z.ZodType< + GetThumbImageUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetThumbImageMediaErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetThumbImageUnauthorized(remapped); + }); + /** @internal */ -export type GetThumbImageMediaResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetThumbImageUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetThumbImageMediaResponseBody$outboundSchema: z.ZodType< - GetThumbImageMediaResponseBody$Outbound, - z.ZodTypeDef, - GetThumbImageMediaResponseBody -> = z - .instanceof(GetThumbImageMediaResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetThumbImageMediaErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetThumbImageUnauthorized$outboundSchema: z.ZodType< + GetThumbImageUnauthorized$Outbound, + z.ZodTypeDef, + GetThumbImageUnauthorized +> = z.instanceof(GetThumbImageUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetThumbImageMediaErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetThumbImageMediaResponseBody$ { - /** @deprecated use `GetThumbImageMediaResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageMediaResponseBody$inboundSchema; - /** @deprecated use `GetThumbImageMediaResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageMediaResponseBody$outboundSchema; - /** @deprecated use `GetThumbImageMediaResponseBody$Outbound` instead. */ - export type Outbound = GetThumbImageMediaResponseBody$Outbound; +export namespace GetThumbImageUnauthorized$ { + /** @deprecated use `GetThumbImageUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageUnauthorized$inboundSchema; + /** @deprecated use `GetThumbImageUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageUnauthorized$outboundSchema; + /** @deprecated use `GetThumbImageUnauthorized$Outbound` instead. */ + export type Outbound = GetThumbImageUnauthorized$Outbound; } /** @internal */ export const GetThumbImageErrors$inboundSchema: z.ZodType< - GetThumbImageErrors, - z.ZodTypeDef, - unknown + GetThumbImageErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetThumbImageErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetThumbImageErrors$outboundSchema: z.ZodType< - GetThumbImageErrors$Outbound, - z.ZodTypeDef, - GetThumbImageErrors + GetThumbImageErrors$Outbound, + z.ZodTypeDef, + GetThumbImageErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetThumbImageErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetThumbImageErrors$ { - /** @deprecated use `GetThumbImageErrors$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageErrors$inboundSchema; - /** @deprecated use `GetThumbImageErrors$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageErrors$outboundSchema; - /** @deprecated use `GetThumbImageErrors$Outbound` instead. */ - export type Outbound = GetThumbImageErrors$Outbound; + /** @deprecated use `GetThumbImageErrors$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageErrors$inboundSchema; + /** @deprecated use `GetThumbImageErrors$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageErrors$outboundSchema; + /** @deprecated use `GetThumbImageErrors$Outbound` instead. */ + export type Outbound = GetThumbImageErrors$Outbound; } /** @internal */ -export const GetThumbImageResponseBody$inboundSchema: z.ZodType< - GetThumbImageResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetThumbImageErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetThumbImageResponseBody(remapped); +export const GetThumbImageBadRequest$inboundSchema: z.ZodType< + GetThumbImageBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetThumbImageErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetThumbImageBadRequest(remapped); + }); + /** @internal */ -export type GetThumbImageResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetThumbImageBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetThumbImageResponseBody$outboundSchema: z.ZodType< - GetThumbImageResponseBody$Outbound, - z.ZodTypeDef, - GetThumbImageResponseBody -> = z - .instanceof(GetThumbImageResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetThumbImageErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetThumbImageBadRequest$outboundSchema: z.ZodType< + GetThumbImageBadRequest$Outbound, + z.ZodTypeDef, + GetThumbImageBadRequest +> = z.instanceof(GetThumbImageBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetThumbImageErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetThumbImageResponseBody$ { - /** @deprecated use `GetThumbImageResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageResponseBody$inboundSchema; - /** @deprecated use `GetThumbImageResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageResponseBody$outboundSchema; - /** @deprecated use `GetThumbImageResponseBody$Outbound` instead. */ - export type Outbound = GetThumbImageResponseBody$Outbound; +export namespace GetThumbImageBadRequest$ { + /** @deprecated use `GetThumbImageBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageBadRequest$inboundSchema; + /** @deprecated use `GetThumbImageBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageBadRequest$outboundSchema; + /** @deprecated use `GetThumbImageBadRequest$Outbound` instead. */ + export type Outbound = GetThumbImageBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gettimeline.ts b/src/sdk/models/errors/gettimeline.ts index 5234cd50..d4ab7974 100644 --- a/src/sdk/models/errors/gettimeline.ts +++ b/src/sdk/models/errors/gettimeline.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTimelineVideoErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetTimelineVideoResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTimelineUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetTimelineVideoResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTimelineUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTimelineVideoResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTimelineUnauthorizedData; - constructor(err: GetTimelineVideoResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTimelineUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTimelineVideoResponseBody"; - } + this.name = "GetTimelineUnauthorized"; + } } export type GetTimelineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetTimelineResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTimelineBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetTimelineResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTimelineBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTimelineResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTimelineBadRequestData; - constructor(err: GetTimelineResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTimelineBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTimelineResponseBody"; - } + this.name = "GetTimelineBadRequest"; + } } /** @internal */ export const GetTimelineVideoErrors$inboundSchema: z.ZodType< - GetTimelineVideoErrors, - z.ZodTypeDef, - unknown + GetTimelineVideoErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTimelineVideoErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTimelineVideoErrors$outboundSchema: z.ZodType< - GetTimelineVideoErrors$Outbound, - z.ZodTypeDef, - GetTimelineVideoErrors + GetTimelineVideoErrors$Outbound, + z.ZodTypeDef, + GetTimelineVideoErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,99 @@ export const GetTimelineVideoErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTimelineVideoErrors$ { - /** @deprecated use `GetTimelineVideoErrors$inboundSchema` instead. */ - export const inboundSchema = GetTimelineVideoErrors$inboundSchema; - /** @deprecated use `GetTimelineVideoErrors$outboundSchema` instead. */ - export const outboundSchema = GetTimelineVideoErrors$outboundSchema; - /** @deprecated use `GetTimelineVideoErrors$Outbound` instead. */ - export type Outbound = GetTimelineVideoErrors$Outbound; + /** @deprecated use `GetTimelineVideoErrors$inboundSchema` instead. */ + export const inboundSchema = GetTimelineVideoErrors$inboundSchema; + /** @deprecated use `GetTimelineVideoErrors$outboundSchema` instead. */ + export const outboundSchema = GetTimelineVideoErrors$outboundSchema; + /** @deprecated use `GetTimelineVideoErrors$Outbound` instead. */ + export type Outbound = GetTimelineVideoErrors$Outbound; } /** @internal */ -export const GetTimelineVideoResponseBody$inboundSchema: z.ZodType< - GetTimelineVideoResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTimelineVideoErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTimelineVideoResponseBody(remapped); +export const GetTimelineUnauthorized$inboundSchema: z.ZodType< + GetTimelineUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTimelineVideoErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTimelineUnauthorized(remapped); + }); + /** @internal */ -export type GetTimelineVideoResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTimelineUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTimelineVideoResponseBody$outboundSchema: z.ZodType< - GetTimelineVideoResponseBody$Outbound, - z.ZodTypeDef, - GetTimelineVideoResponseBody -> = z - .instanceof(GetTimelineVideoResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTimelineVideoErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTimelineUnauthorized$outboundSchema: z.ZodType< + GetTimelineUnauthorized$Outbound, + z.ZodTypeDef, + GetTimelineUnauthorized +> = z.instanceof(GetTimelineUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTimelineVideoErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTimelineVideoResponseBody$ { - /** @deprecated use `GetTimelineVideoResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTimelineVideoResponseBody$inboundSchema; - /** @deprecated use `GetTimelineVideoResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTimelineVideoResponseBody$outboundSchema; - /** @deprecated use `GetTimelineVideoResponseBody$Outbound` instead. */ - export type Outbound = GetTimelineVideoResponseBody$Outbound; +export namespace GetTimelineUnauthorized$ { + /** @deprecated use `GetTimelineUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetTimelineUnauthorized$inboundSchema; + /** @deprecated use `GetTimelineUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetTimelineUnauthorized$outboundSchema; + /** @deprecated use `GetTimelineUnauthorized$Outbound` instead. */ + export type Outbound = GetTimelineUnauthorized$Outbound; } /** @internal */ -export const GetTimelineErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const GetTimelineErrors$inboundSchema: z.ZodType< + GetTimelineErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type GetTimelineErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTimelineErrors$outboundSchema: z.ZodType< - GetTimelineErrors$Outbound, - z.ZodTypeDef, - GetTimelineErrors + GetTimelineErrors$Outbound, + z.ZodTypeDef, + GetTimelineErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +227,67 @@ export const GetTimelineErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTimelineErrors$ { - /** @deprecated use `GetTimelineErrors$inboundSchema` instead. */ - export const inboundSchema = GetTimelineErrors$inboundSchema; - /** @deprecated use `GetTimelineErrors$outboundSchema` instead. */ - export const outboundSchema = GetTimelineErrors$outboundSchema; - /** @deprecated use `GetTimelineErrors$Outbound` instead. */ - export type Outbound = GetTimelineErrors$Outbound; + /** @deprecated use `GetTimelineErrors$inboundSchema` instead. */ + export const inboundSchema = GetTimelineErrors$inboundSchema; + /** @deprecated use `GetTimelineErrors$outboundSchema` instead. */ + export const outboundSchema = GetTimelineErrors$outboundSchema; + /** @deprecated use `GetTimelineErrors$Outbound` instead. */ + export type Outbound = GetTimelineErrors$Outbound; } /** @internal */ -export const GetTimelineResponseBody$inboundSchema: z.ZodType< - GetTimelineResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTimelineErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTimelineResponseBody(remapped); +export const GetTimelineBadRequest$inboundSchema: z.ZodType< + GetTimelineBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTimelineErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTimelineBadRequest(remapped); + }); + /** @internal */ -export type GetTimelineResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTimelineBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTimelineResponseBody$outboundSchema: z.ZodType< - GetTimelineResponseBody$Outbound, - z.ZodTypeDef, - GetTimelineResponseBody -> = z - .instanceof(GetTimelineResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTimelineErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTimelineBadRequest$outboundSchema: z.ZodType< + GetTimelineBadRequest$Outbound, + z.ZodTypeDef, + GetTimelineBadRequest +> = z.instanceof(GetTimelineBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTimelineErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTimelineResponseBody$ { - /** @deprecated use `GetTimelineResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTimelineResponseBody$inboundSchema; - /** @deprecated use `GetTimelineResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTimelineResponseBody$outboundSchema; - /** @deprecated use `GetTimelineResponseBody$Outbound` instead. */ - export type Outbound = GetTimelineResponseBody$Outbound; +export namespace GetTimelineBadRequest$ { + /** @deprecated use `GetTimelineBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTimelineBadRequest$inboundSchema; + /** @deprecated use `GetTimelineBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTimelineBadRequest$outboundSchema; + /** @deprecated use `GetTimelineBadRequest$Outbound` instead. */ + export type Outbound = GetTimelineBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gettokenbypinid.ts b/src/sdk/models/errors/gettokenbypinid.ts index ed972f35..1b920462 100644 --- a/src/sdk/models/errors/gettokenbypinid.ts +++ b/src/sdk/models/errors/gettokenbypinid.ts @@ -2,130 +2,120 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTokenByPinIdPlexErrors = { - code?: number | undefined; - message?: string | undefined; + code?: number | undefined; + message?: string | undefined; }; /** * Not Found or Expired */ -export type GetTokenByPinIdPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTokenByPinIdResponseBodyData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Not Found or Expired */ -export class GetTokenByPinIdPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTokenByPinIdResponseBody extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTokenByPinIdPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTokenByPinIdResponseBodyData; - constructor(err: GetTokenByPinIdPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTokenByPinIdResponseBodyData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTokenByPinIdPlexResponseBody"; - } + this.name = "GetTokenByPinIdResponseBody"; + } } export type GetTokenByPinIdErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** - * Bad Request response when the X-Plex-Client-Identifier is missing + * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetTokenByPinIdResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTokenByPinIdBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** - * Bad Request response when the X-Plex-Client-Identifier is missing + * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetTokenByPinIdResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTokenByPinIdBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTokenByPinIdResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTokenByPinIdBadRequestData; - constructor(err: GetTokenByPinIdResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTokenByPinIdBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTokenByPinIdResponseBody"; - } + this.name = "GetTokenByPinIdBadRequest"; + } } /** @internal */ export const GetTokenByPinIdPlexErrors$inboundSchema: z.ZodType< - GetTokenByPinIdPlexErrors, - z.ZodTypeDef, - unknown + GetTokenByPinIdPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), + code: z.number().int().optional(), + message: z.string().optional(), }); /** @internal */ export type GetTokenByPinIdPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; + code?: number | undefined; + message?: string | undefined; }; /** @internal */ export const GetTokenByPinIdPlexErrors$outboundSchema: z.ZodType< - GetTokenByPinIdPlexErrors$Outbound, - z.ZodTypeDef, - GetTokenByPinIdPlexErrors + GetTokenByPinIdPlexErrors$Outbound, + z.ZodTypeDef, + GetTokenByPinIdPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), + code: z.number().int().optional(), + message: z.string().optional(), }); /** @@ -133,104 +123,99 @@ export const GetTokenByPinIdPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdPlexErrors$ { - /** @deprecated use `GetTokenByPinIdPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdPlexErrors$inboundSchema; - /** @deprecated use `GetTokenByPinIdPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdPlexErrors$outboundSchema; - /** @deprecated use `GetTokenByPinIdPlexErrors$Outbound` instead. */ - export type Outbound = GetTokenByPinIdPlexErrors$Outbound; + /** @deprecated use `GetTokenByPinIdPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdPlexErrors$inboundSchema; + /** @deprecated use `GetTokenByPinIdPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdPlexErrors$outboundSchema; + /** @deprecated use `GetTokenByPinIdPlexErrors$Outbound` instead. */ + export type Outbound = GetTokenByPinIdPlexErrors$Outbound; } /** @internal */ -export const GetTokenByPinIdPlexResponseBody$inboundSchema: z.ZodType< - GetTokenByPinIdPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTokenByPinIdPlexResponseBody(remapped); +export const GetTokenByPinIdResponseBody$inboundSchema: z.ZodType< + GetTokenByPinIdResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTokenByPinIdResponseBody(remapped); + }); + /** @internal */ -export type GetTokenByPinIdPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTokenByPinIdResponseBody$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTokenByPinIdPlexResponseBody$outboundSchema: z.ZodType< - GetTokenByPinIdPlexResponseBody$Outbound, - z.ZodTypeDef, - GetTokenByPinIdPlexResponseBody -> = z - .instanceof(GetTokenByPinIdPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTokenByPinIdResponseBody$outboundSchema: z.ZodType< + GetTokenByPinIdResponseBody$Outbound, + z.ZodTypeDef, + GetTokenByPinIdResponseBody +> = z.instanceof(GetTokenByPinIdResponseBody) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTokenByPinIdPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTokenByPinIdPlexResponseBody$ { - /** @deprecated use `GetTokenByPinIdPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdPlexResponseBody$inboundSchema; - /** @deprecated use `GetTokenByPinIdPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdPlexResponseBody$outboundSchema; - /** @deprecated use `GetTokenByPinIdPlexResponseBody$Outbound` instead. */ - export type Outbound = GetTokenByPinIdPlexResponseBody$Outbound; +export namespace GetTokenByPinIdResponseBody$ { + /** @deprecated use `GetTokenByPinIdResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdResponseBody$inboundSchema; + /** @deprecated use `GetTokenByPinIdResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdResponseBody$outboundSchema; + /** @deprecated use `GetTokenByPinIdResponseBody$Outbound` instead. */ + export type Outbound = GetTokenByPinIdResponseBody$Outbound; } /** @internal */ export const GetTokenByPinIdErrors$inboundSchema: z.ZodType< - GetTokenByPinIdErrors, - z.ZodTypeDef, - unknown + GetTokenByPinIdErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTokenByPinIdErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTokenByPinIdErrors$outboundSchema: z.ZodType< - GetTokenByPinIdErrors$Outbound, - z.ZodTypeDef, - GetTokenByPinIdErrors + GetTokenByPinIdErrors$Outbound, + z.ZodTypeDef, + GetTokenByPinIdErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -238,73 +223,67 @@ export const GetTokenByPinIdErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdErrors$ { - /** @deprecated use `GetTokenByPinIdErrors$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdErrors$inboundSchema; - /** @deprecated use `GetTokenByPinIdErrors$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdErrors$outboundSchema; - /** @deprecated use `GetTokenByPinIdErrors$Outbound` instead. */ - export type Outbound = GetTokenByPinIdErrors$Outbound; + /** @deprecated use `GetTokenByPinIdErrors$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdErrors$inboundSchema; + /** @deprecated use `GetTokenByPinIdErrors$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdErrors$outboundSchema; + /** @deprecated use `GetTokenByPinIdErrors$Outbound` instead. */ + export type Outbound = GetTokenByPinIdErrors$Outbound; } /** @internal */ -export const GetTokenByPinIdResponseBody$inboundSchema: z.ZodType< - GetTokenByPinIdResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTokenByPinIdErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTokenByPinIdResponseBody(remapped); +export const GetTokenByPinIdBadRequest$inboundSchema: z.ZodType< + GetTokenByPinIdBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTokenByPinIdErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTokenByPinIdBadRequest(remapped); + }); + /** @internal */ -export type GetTokenByPinIdResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTokenByPinIdBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTokenByPinIdResponseBody$outboundSchema: z.ZodType< - GetTokenByPinIdResponseBody$Outbound, - z.ZodTypeDef, - GetTokenByPinIdResponseBody -> = z - .instanceof(GetTokenByPinIdResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTokenByPinIdErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTokenByPinIdBadRequest$outboundSchema: z.ZodType< + GetTokenByPinIdBadRequest$Outbound, + z.ZodTypeDef, + GetTokenByPinIdBadRequest +> = z.instanceof(GetTokenByPinIdBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTokenByPinIdErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTokenByPinIdResponseBody$ { - /** @deprecated use `GetTokenByPinIdResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdResponseBody$inboundSchema; - /** @deprecated use `GetTokenByPinIdResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdResponseBody$outboundSchema; - /** @deprecated use `GetTokenByPinIdResponseBody$Outbound` instead. */ - export type Outbound = GetTokenByPinIdResponseBody$Outbound; +export namespace GetTokenByPinIdBadRequest$ { + /** @deprecated use `GetTokenByPinIdBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdBadRequest$inboundSchema; + /** @deprecated use `GetTokenByPinIdBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdBadRequest$outboundSchema; + /** @deprecated use `GetTokenByPinIdBadRequest$Outbound` instead. */ + export type Outbound = GetTokenByPinIdBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gettokendetails.ts b/src/sdk/models/errors/gettokendetails.ts new file mode 100644 index 00000000..35834971 --- /dev/null +++ b/src/sdk/models/errors/gettokendetails.ts @@ -0,0 +1,297 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; + +export type GetTokenDetailsAuthenticationErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export type GetTokenDetailsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. + */ +export class GetTokenDetailsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetTokenDetailsUnauthorizedData; + + constructor(err: GetTokenDetailsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; + + this.name = "GetTokenDetailsUnauthorized"; + } +} + +export type GetTokenDetailsErrors = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** + * Bad Request - A parameter was not specified, or was specified incorrectly. + */ +export type GetTokenDetailsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; +}; + +/** + * Bad Request - A parameter was not specified, or was specified incorrectly. + */ +export class GetTokenDetailsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; + + /** The original data that was passed to this error instance. */ + data$: GetTokenDetailsBadRequestData; + + constructor(err: GetTokenDetailsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; + + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; + + this.name = "GetTokenDetailsBadRequest"; + } +} + +/** @internal */ +export const GetTokenDetailsAuthenticationErrors$inboundSchema: z.ZodType< + GetTokenDetailsAuthenticationErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); + +/** @internal */ +export type GetTokenDetailsAuthenticationErrors$Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** @internal */ +export const GetTokenDetailsAuthenticationErrors$outboundSchema: z.ZodType< + GetTokenDetailsAuthenticationErrors$Outbound, + z.ZodTypeDef, + GetTokenDetailsAuthenticationErrors +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsAuthenticationErrors$ { + /** @deprecated use `GetTokenDetailsAuthenticationErrors$inboundSchema` instead. */ + export const inboundSchema = + GetTokenDetailsAuthenticationErrors$inboundSchema; + /** @deprecated use `GetTokenDetailsAuthenticationErrors$outboundSchema` instead. */ + export const outboundSchema = + GetTokenDetailsAuthenticationErrors$outboundSchema; + /** @deprecated use `GetTokenDetailsAuthenticationErrors$Outbound` instead. */ + export type Outbound = GetTokenDetailsAuthenticationErrors$Outbound; +} + +/** @internal */ +export const GetTokenDetailsUnauthorized$inboundSchema: z.ZodType< + GetTokenDetailsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetTokenDetailsAuthenticationErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", + }); + + return new GetTokenDetailsUnauthorized(remapped); + }); + +/** @internal */ +export type GetTokenDetailsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; +}; + +/** @internal */ +export const GetTokenDetailsUnauthorized$outboundSchema: z.ZodType< + GetTokenDetailsUnauthorized$Outbound, + z.ZodTypeDef, + GetTokenDetailsUnauthorized +> = z.instanceof(GetTokenDetailsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetTokenDetailsAuthenticationErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsUnauthorized$ { + /** @deprecated use `GetTokenDetailsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsUnauthorized$inboundSchema; + /** @deprecated use `GetTokenDetailsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsUnauthorized$outboundSchema; + /** @deprecated use `GetTokenDetailsUnauthorized$Outbound` instead. */ + export type Outbound = GetTokenDetailsUnauthorized$Outbound; +} + +/** @internal */ +export const GetTokenDetailsErrors$inboundSchema: z.ZodType< + GetTokenDetailsErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); + +/** @internal */ +export type GetTokenDetailsErrors$Outbound = { + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; +}; + +/** @internal */ +export const GetTokenDetailsErrors$outboundSchema: z.ZodType< + GetTokenDetailsErrors$Outbound, + z.ZodTypeDef, + GetTokenDetailsErrors +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsErrors$ { + /** @deprecated use `GetTokenDetailsErrors$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsErrors$inboundSchema; + /** @deprecated use `GetTokenDetailsErrors$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsErrors$outboundSchema; + /** @deprecated use `GetTokenDetailsErrors$Outbound` instead. */ + export type Outbound = GetTokenDetailsErrors$Outbound; +} + +/** @internal */ +export const GetTokenDetailsBadRequest$inboundSchema: z.ZodType< + GetTokenDetailsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTokenDetailsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", + }); + + return new GetTokenDetailsBadRequest(remapped); + }); + +/** @internal */ +export type GetTokenDetailsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; +}; + +/** @internal */ +export const GetTokenDetailsBadRequest$outboundSchema: z.ZodType< + GetTokenDetailsBadRequest$Outbound, + z.ZodTypeDef, + GetTokenDetailsBadRequest +> = z.instanceof(GetTokenDetailsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTokenDetailsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsBadRequest$ { + /** @deprecated use `GetTokenDetailsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsBadRequest$inboundSchema; + /** @deprecated use `GetTokenDetailsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsBadRequest$outboundSchema; + /** @deprecated use `GetTokenDetailsBadRequest$Outbound` instead. */ + export type Outbound = GetTokenDetailsBadRequest$Outbound; +} diff --git a/src/sdk/models/errors/gettopwatchedcontent.ts b/src/sdk/models/errors/gettopwatchedcontent.ts index e60b54dd..39d6193f 100644 --- a/src/sdk/models/errors/gettopwatchedcontent.ts +++ b/src/sdk/models/errors/gettopwatchedcontent.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTopWatchedContentLibraryErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetTopWatchedContentLibraryResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTopWatchedContentUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetTopWatchedContentLibraryResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTopWatchedContentUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTopWatchedContentLibraryResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTopWatchedContentUnauthorizedData; - constructor(err: GetTopWatchedContentLibraryResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTopWatchedContentUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTopWatchedContentLibraryResponseBody"; - } + this.name = "GetTopWatchedContentUnauthorized"; + } } export type GetTopWatchedContentErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetTopWatchedContentResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTopWatchedContentBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetTopWatchedContentResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTopWatchedContentBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTopWatchedContentResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTopWatchedContentBadRequestData; - constructor(err: GetTopWatchedContentResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTopWatchedContentBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTopWatchedContentResponseBody"; - } + this.name = "GetTopWatchedContentBadRequest"; + } } /** @internal */ export const GetTopWatchedContentLibraryErrors$inboundSchema: z.ZodType< - GetTopWatchedContentLibraryErrors, - z.ZodTypeDef, - unknown + GetTopWatchedContentLibraryErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTopWatchedContentLibraryErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTopWatchedContentLibraryErrors$outboundSchema: z.ZodType< - GetTopWatchedContentLibraryErrors$Outbound, - z.ZodTypeDef, - GetTopWatchedContentLibraryErrors + GetTopWatchedContentLibraryErrors$Outbound, + z.ZodTypeDef, + GetTopWatchedContentLibraryErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,101 @@ export const GetTopWatchedContentLibraryErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentLibraryErrors$ { - /** @deprecated use `GetTopWatchedContentLibraryErrors$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentLibraryErrors$inboundSchema; - /** @deprecated use `GetTopWatchedContentLibraryErrors$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentLibraryErrors$outboundSchema; - /** @deprecated use `GetTopWatchedContentLibraryErrors$Outbound` instead. */ - export type Outbound = GetTopWatchedContentLibraryErrors$Outbound; + /** @deprecated use `GetTopWatchedContentLibraryErrors$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentLibraryErrors$inboundSchema; + /** @deprecated use `GetTopWatchedContentLibraryErrors$outboundSchema` instead. */ + export const outboundSchema = + GetTopWatchedContentLibraryErrors$outboundSchema; + /** @deprecated use `GetTopWatchedContentLibraryErrors$Outbound` instead. */ + export type Outbound = GetTopWatchedContentLibraryErrors$Outbound; } /** @internal */ -export const GetTopWatchedContentLibraryResponseBody$inboundSchema: z.ZodType< - GetTopWatchedContentLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTopWatchedContentLibraryErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTopWatchedContentLibraryResponseBody(remapped); +export const GetTopWatchedContentUnauthorized$inboundSchema: z.ZodType< + GetTopWatchedContentUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTopWatchedContentLibraryErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTopWatchedContentUnauthorized(remapped); + }); + /** @internal */ -export type GetTopWatchedContentLibraryResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTopWatchedContentUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTopWatchedContentLibraryResponseBody$outboundSchema: z.ZodType< - GetTopWatchedContentLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetTopWatchedContentLibraryResponseBody -> = z - .instanceof(GetTopWatchedContentLibraryResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetTopWatchedContentLibraryErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTopWatchedContentUnauthorized$outboundSchema: z.ZodType< + GetTopWatchedContentUnauthorized$Outbound, + z.ZodTypeDef, + GetTopWatchedContentUnauthorized +> = z.instanceof(GetTopWatchedContentUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetTopWatchedContentLibraryErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTopWatchedContentLibraryResponseBody$ { - /** @deprecated use `GetTopWatchedContentLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentLibraryResponseBody$inboundSchema; - /** @deprecated use `GetTopWatchedContentLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentLibraryResponseBody$outboundSchema; - /** @deprecated use `GetTopWatchedContentLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetTopWatchedContentLibraryResponseBody$Outbound; +export namespace GetTopWatchedContentUnauthorized$ { + /** @deprecated use `GetTopWatchedContentUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentUnauthorized$inboundSchema; + /** @deprecated use `GetTopWatchedContentUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentUnauthorized$outboundSchema; + /** @deprecated use `GetTopWatchedContentUnauthorized$Outbound` instead. */ + export type Outbound = GetTopWatchedContentUnauthorized$Outbound; } /** @internal */ export const GetTopWatchedContentErrors$inboundSchema: z.ZodType< - GetTopWatchedContentErrors, - z.ZodTypeDef, - unknown + GetTopWatchedContentErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTopWatchedContentErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTopWatchedContentErrors$outboundSchema: z.ZodType< - GetTopWatchedContentErrors$Outbound, - z.ZodTypeDef, - GetTopWatchedContentErrors + GetTopWatchedContentErrors$Outbound, + z.ZodTypeDef, + GetTopWatchedContentErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +229,68 @@ export const GetTopWatchedContentErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentErrors$ { - /** @deprecated use `GetTopWatchedContentErrors$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentErrors$inboundSchema; - /** @deprecated use `GetTopWatchedContentErrors$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentErrors$outboundSchema; - /** @deprecated use `GetTopWatchedContentErrors$Outbound` instead. */ - export type Outbound = GetTopWatchedContentErrors$Outbound; + /** @deprecated use `GetTopWatchedContentErrors$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentErrors$inboundSchema; + /** @deprecated use `GetTopWatchedContentErrors$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentErrors$outboundSchema; + /** @deprecated use `GetTopWatchedContentErrors$Outbound` instead. */ + export type Outbound = GetTopWatchedContentErrors$Outbound; } /** @internal */ -export const GetTopWatchedContentResponseBody$inboundSchema: z.ZodType< - GetTopWatchedContentResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTopWatchedContentErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTopWatchedContentResponseBody(remapped); +export const GetTopWatchedContentBadRequest$inboundSchema: z.ZodType< + GetTopWatchedContentBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTopWatchedContentErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTopWatchedContentBadRequest(remapped); + }); + /** @internal */ -export type GetTopWatchedContentResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTopWatchedContentBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTopWatchedContentResponseBody$outboundSchema: z.ZodType< - GetTopWatchedContentResponseBody$Outbound, - z.ZodTypeDef, - GetTopWatchedContentResponseBody -> = z - .instanceof(GetTopWatchedContentResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTopWatchedContentErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTopWatchedContentBadRequest$outboundSchema: z.ZodType< + GetTopWatchedContentBadRequest$Outbound, + z.ZodTypeDef, + GetTopWatchedContentBadRequest +> = z.instanceof(GetTopWatchedContentBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTopWatchedContentErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTopWatchedContentResponseBody$ { - /** @deprecated use `GetTopWatchedContentResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentResponseBody$inboundSchema; - /** @deprecated use `GetTopWatchedContentResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentResponseBody$outboundSchema; - /** @deprecated use `GetTopWatchedContentResponseBody$Outbound` instead. */ - export type Outbound = GetTopWatchedContentResponseBody$Outbound; +export namespace GetTopWatchedContentBadRequest$ { + /** @deprecated use `GetTopWatchedContentBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentBadRequest$inboundSchema; + /** @deprecated use `GetTopWatchedContentBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentBadRequest$outboundSchema; + /** @deprecated use `GetTopWatchedContentBadRequest$Outbound` instead. */ + export type Outbound = GetTopWatchedContentBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gettranscodesessions.ts b/src/sdk/models/errors/gettranscodesessions.ts index b22e7a98..52df5146 100644 --- a/src/sdk/models/errors/gettranscodesessions.ts +++ b/src/sdk/models/errors/gettranscodesessions.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTranscodeSessionsSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetTranscodeSessionsSessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTranscodeSessionsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetTranscodeSessionsSessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTranscodeSessionsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTranscodeSessionsSessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTranscodeSessionsUnauthorizedData; - constructor(err: GetTranscodeSessionsSessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTranscodeSessionsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTranscodeSessionsSessionsResponseBody"; - } + this.name = "GetTranscodeSessionsUnauthorized"; + } } export type GetTranscodeSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetTranscodeSessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTranscodeSessionsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetTranscodeSessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTranscodeSessionsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTranscodeSessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTranscodeSessionsBadRequestData; - constructor(err: GetTranscodeSessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTranscodeSessionsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTranscodeSessionsResponseBody"; - } + this.name = "GetTranscodeSessionsBadRequest"; + } } /** @internal */ export const GetTranscodeSessionsSessionsErrors$inboundSchema: z.ZodType< - GetTranscodeSessionsSessionsErrors, - z.ZodTypeDef, - unknown + GetTranscodeSessionsSessionsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTranscodeSessionsSessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTranscodeSessionsSessionsErrors$outboundSchema: z.ZodType< - GetTranscodeSessionsSessionsErrors$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsSessionsErrors + GetTranscodeSessionsSessionsErrors$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsSessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,102 @@ export const GetTranscodeSessionsSessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTranscodeSessionsSessionsErrors$ { - /** @deprecated use `GetTranscodeSessionsSessionsErrors$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsSessionsErrors$inboundSchema; - /** @deprecated use `GetTranscodeSessionsSessionsErrors$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsSessionsErrors$outboundSchema; - /** @deprecated use `GetTranscodeSessionsSessionsErrors$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsSessionsErrors$Outbound; + /** @deprecated use `GetTranscodeSessionsSessionsErrors$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsSessionsErrors$inboundSchema; + /** @deprecated use `GetTranscodeSessionsSessionsErrors$outboundSchema` instead. */ + export const outboundSchema = + GetTranscodeSessionsSessionsErrors$outboundSchema; + /** @deprecated use `GetTranscodeSessionsSessionsErrors$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsSessionsErrors$Outbound; } /** @internal */ -export const GetTranscodeSessionsSessionsResponseBody$inboundSchema: z.ZodType< - GetTranscodeSessionsSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTranscodeSessionsSessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTranscodeSessionsSessionsResponseBody(remapped); +export const GetTranscodeSessionsUnauthorized$inboundSchema: z.ZodType< + GetTranscodeSessionsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetTranscodeSessionsSessionsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTranscodeSessionsUnauthorized(remapped); + }); + /** @internal */ -export type GetTranscodeSessionsSessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTranscodeSessionsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTranscodeSessionsSessionsResponseBody$outboundSchema: z.ZodType< - GetTranscodeSessionsSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsSessionsResponseBody -> = z - .instanceof(GetTranscodeSessionsSessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetTranscodeSessionsSessionsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTranscodeSessionsUnauthorized$outboundSchema: z.ZodType< + GetTranscodeSessionsUnauthorized$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsUnauthorized +> = z.instanceof(GetTranscodeSessionsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetTranscodeSessionsSessionsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTranscodeSessionsSessionsResponseBody$ { - /** @deprecated use `GetTranscodeSessionsSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsSessionsResponseBody$inboundSchema; - /** @deprecated use `GetTranscodeSessionsSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsSessionsResponseBody$outboundSchema; - /** @deprecated use `GetTranscodeSessionsSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsSessionsResponseBody$Outbound; +export namespace GetTranscodeSessionsUnauthorized$ { + /** @deprecated use `GetTranscodeSessionsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsUnauthorized$inboundSchema; + /** @deprecated use `GetTranscodeSessionsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetTranscodeSessionsUnauthorized$outboundSchema; + /** @deprecated use `GetTranscodeSessionsUnauthorized$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsUnauthorized$Outbound; } /** @internal */ export const GetTranscodeSessionsErrors$inboundSchema: z.ZodType< - GetTranscodeSessionsErrors, - z.ZodTypeDef, - unknown + GetTranscodeSessionsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTranscodeSessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTranscodeSessionsErrors$outboundSchema: z.ZodType< - GetTranscodeSessionsErrors$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsErrors + GetTranscodeSessionsErrors$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +230,68 @@ export const GetTranscodeSessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTranscodeSessionsErrors$ { - /** @deprecated use `GetTranscodeSessionsErrors$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsErrors$inboundSchema; - /** @deprecated use `GetTranscodeSessionsErrors$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsErrors$outboundSchema; - /** @deprecated use `GetTranscodeSessionsErrors$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsErrors$Outbound; + /** @deprecated use `GetTranscodeSessionsErrors$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsErrors$inboundSchema; + /** @deprecated use `GetTranscodeSessionsErrors$outboundSchema` instead. */ + export const outboundSchema = GetTranscodeSessionsErrors$outboundSchema; + /** @deprecated use `GetTranscodeSessionsErrors$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsErrors$Outbound; } /** @internal */ -export const GetTranscodeSessionsResponseBody$inboundSchema: z.ZodType< - GetTranscodeSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTranscodeSessionsResponseBody(remapped); +export const GetTranscodeSessionsBadRequest$inboundSchema: z.ZodType< + GetTranscodeSessionsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTranscodeSessionsBadRequest(remapped); + }); + /** @internal */ -export type GetTranscodeSessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTranscodeSessionsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTranscodeSessionsResponseBody$outboundSchema: z.ZodType< - GetTranscodeSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsResponseBody -> = z - .instanceof(GetTranscodeSessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTranscodeSessionsBadRequest$outboundSchema: z.ZodType< + GetTranscodeSessionsBadRequest$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsBadRequest +> = z.instanceof(GetTranscodeSessionsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTranscodeSessionsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTranscodeSessionsResponseBody$ { - /** @deprecated use `GetTranscodeSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsResponseBody$inboundSchema; - /** @deprecated use `GetTranscodeSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsResponseBody$outboundSchema; - /** @deprecated use `GetTranscodeSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsResponseBody$Outbound; +export namespace GetTranscodeSessionsBadRequest$ { + /** @deprecated use `GetTranscodeSessionsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsBadRequest$inboundSchema; + /** @deprecated use `GetTranscodeSessionsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTranscodeSessionsBadRequest$outboundSchema; + /** @deprecated use `GetTranscodeSessionsBadRequest$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/gettransienttoken.ts b/src/sdk/models/errors/gettransienttoken.ts index e28f2ee2..6b8a635b 100644 --- a/src/sdk/models/errors/gettransienttoken.ts +++ b/src/sdk/models/errors/gettransienttoken.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetTransientTokenAuthenticationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetTransientTokenAuthenticationResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTransientTokenUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetTransientTokenAuthenticationResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTransientTokenUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTransientTokenAuthenticationResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTransientTokenUnauthorizedData; - constructor(err: GetTransientTokenAuthenticationResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTransientTokenUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTransientTokenAuthenticationResponseBody"; - } + this.name = "GetTransientTokenUnauthorized"; + } } export type GetTransientTokenErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetTransientTokenResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetTransientTokenBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetTransientTokenResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetTransientTokenBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetTransientTokenResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetTransientTokenBadRequestData; - constructor(err: GetTransientTokenResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetTransientTokenBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetTransientTokenResponseBody"; - } + this.name = "GetTransientTokenBadRequest"; + } } /** @internal */ export const GetTransientTokenAuthenticationErrors$inboundSchema: z.ZodType< - GetTransientTokenAuthenticationErrors, - z.ZodTypeDef, - unknown + GetTransientTokenAuthenticationErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTransientTokenAuthenticationErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTransientTokenAuthenticationErrors$outboundSchema: z.ZodType< - GetTransientTokenAuthenticationErrors$Outbound, - z.ZodTypeDef, - GetTransientTokenAuthenticationErrors + GetTransientTokenAuthenticationErrors$Outbound, + z.ZodTypeDef, + GetTransientTokenAuthenticationErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,103 @@ export const GetTransientTokenAuthenticationErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransientTokenAuthenticationErrors$ { - /** @deprecated use `GetTransientTokenAuthenticationErrors$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenAuthenticationErrors$inboundSchema; - /** @deprecated use `GetTransientTokenAuthenticationErrors$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenAuthenticationErrors$outboundSchema; - /** @deprecated use `GetTransientTokenAuthenticationErrors$Outbound` instead. */ - export type Outbound = GetTransientTokenAuthenticationErrors$Outbound; + /** @deprecated use `GetTransientTokenAuthenticationErrors$inboundSchema` instead. */ + export const inboundSchema = + GetTransientTokenAuthenticationErrors$inboundSchema; + /** @deprecated use `GetTransientTokenAuthenticationErrors$outboundSchema` instead. */ + export const outboundSchema = + GetTransientTokenAuthenticationErrors$outboundSchema; + /** @deprecated use `GetTransientTokenAuthenticationErrors$Outbound` instead. */ + export type Outbound = GetTransientTokenAuthenticationErrors$Outbound; } /** @internal */ -export const GetTransientTokenAuthenticationResponseBody$inboundSchema: z.ZodType< - GetTransientTokenAuthenticationResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => GetTransientTokenAuthenticationErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTransientTokenAuthenticationResponseBody(remapped); +export const GetTransientTokenUnauthorized$inboundSchema: z.ZodType< + GetTransientTokenUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => GetTransientTokenAuthenticationErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTransientTokenUnauthorized(remapped); + }); + /** @internal */ -export type GetTransientTokenAuthenticationResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTransientTokenUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTransientTokenAuthenticationResponseBody$outboundSchema: z.ZodType< - GetTransientTokenAuthenticationResponseBody$Outbound, - z.ZodTypeDef, - GetTransientTokenAuthenticationResponseBody -> = z - .instanceof(GetTransientTokenAuthenticationResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetTransientTokenAuthenticationErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTransientTokenUnauthorized$outboundSchema: z.ZodType< + GetTransientTokenUnauthorized$Outbound, + z.ZodTypeDef, + GetTransientTokenUnauthorized +> = z.instanceof(GetTransientTokenUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => GetTransientTokenAuthenticationErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTransientTokenAuthenticationResponseBody$ { - /** @deprecated use `GetTransientTokenAuthenticationResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenAuthenticationResponseBody$inboundSchema; - /** @deprecated use `GetTransientTokenAuthenticationResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenAuthenticationResponseBody$outboundSchema; - /** @deprecated use `GetTransientTokenAuthenticationResponseBody$Outbound` instead. */ - export type Outbound = GetTransientTokenAuthenticationResponseBody$Outbound; +export namespace GetTransientTokenUnauthorized$ { + /** @deprecated use `GetTransientTokenUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenUnauthorized$inboundSchema; + /** @deprecated use `GetTransientTokenUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenUnauthorized$outboundSchema; + /** @deprecated use `GetTransientTokenUnauthorized$Outbound` instead. */ + export type Outbound = GetTransientTokenUnauthorized$Outbound; } /** @internal */ export const GetTransientTokenErrors$inboundSchema: z.ZodType< - GetTransientTokenErrors, - z.ZodTypeDef, - unknown + GetTransientTokenErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetTransientTokenErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetTransientTokenErrors$outboundSchema: z.ZodType< - GetTransientTokenErrors$Outbound, - z.ZodTypeDef, - GetTransientTokenErrors + GetTransientTokenErrors$Outbound, + z.ZodTypeDef, + GetTransientTokenErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,73 +231,68 @@ export const GetTransientTokenErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransientTokenErrors$ { - /** @deprecated use `GetTransientTokenErrors$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenErrors$inboundSchema; - /** @deprecated use `GetTransientTokenErrors$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenErrors$outboundSchema; - /** @deprecated use `GetTransientTokenErrors$Outbound` instead. */ - export type Outbound = GetTransientTokenErrors$Outbound; + /** @deprecated use `GetTransientTokenErrors$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenErrors$inboundSchema; + /** @deprecated use `GetTransientTokenErrors$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenErrors$outboundSchema; + /** @deprecated use `GetTransientTokenErrors$Outbound` instead. */ + export type Outbound = GetTransientTokenErrors$Outbound; } /** @internal */ -export const GetTransientTokenResponseBody$inboundSchema: z.ZodType< - GetTransientTokenResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetTransientTokenErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetTransientTokenResponseBody(remapped); +export const GetTransientTokenBadRequest$inboundSchema: z.ZodType< + GetTransientTokenBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetTransientTokenErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetTransientTokenBadRequest(remapped); + }); + /** @internal */ -export type GetTransientTokenResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetTransientTokenBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetTransientTokenResponseBody$outboundSchema: z.ZodType< - GetTransientTokenResponseBody$Outbound, - z.ZodTypeDef, - GetTransientTokenResponseBody -> = z - .instanceof(GetTransientTokenResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetTransientTokenErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetTransientTokenBadRequest$outboundSchema: z.ZodType< + GetTransientTokenBadRequest$Outbound, + z.ZodTypeDef, + GetTransientTokenBadRequest +> = z.instanceof(GetTransientTokenBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetTransientTokenErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetTransientTokenResponseBody$ { - /** @deprecated use `GetTransientTokenResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenResponseBody$inboundSchema; - /** @deprecated use `GetTransientTokenResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenResponseBody$outboundSchema; - /** @deprecated use `GetTransientTokenResponseBody$Outbound` instead. */ - export type Outbound = GetTransientTokenResponseBody$Outbound; +export namespace GetTransientTokenBadRequest$ { + /** @deprecated use `GetTransientTokenBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenBadRequest$inboundSchema; + /** @deprecated use `GetTransientTokenBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenBadRequest$outboundSchema; + /** @deprecated use `GetTransientTokenBadRequest$Outbound` instead. */ + export type Outbound = GetTransientTokenBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getupdatestatus.ts b/src/sdk/models/errors/getupdatestatus.ts index e4b052c3..f1d33375 100644 --- a/src/sdk/models/errors/getupdatestatus.ts +++ b/src/sdk/models/errors/getupdatestatus.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUpdateStatusUpdaterErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetUpdateStatusUpdaterResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetUpdateStatusUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetUpdateStatusUpdaterResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetUpdateStatusUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetUpdateStatusUpdaterResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetUpdateStatusUnauthorizedData; - constructor(err: GetUpdateStatusUpdaterResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetUpdateStatusUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetUpdateStatusUpdaterResponseBody"; - } + this.name = "GetUpdateStatusUnauthorized"; + } } export type GetUpdateStatusErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetUpdateStatusResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetUpdateStatusBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetUpdateStatusResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetUpdateStatusBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetUpdateStatusResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetUpdateStatusBadRequestData; - constructor(err: GetUpdateStatusResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetUpdateStatusBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetUpdateStatusResponseBody"; - } + this.name = "GetUpdateStatusBadRequest"; + } } /** @internal */ export const GetUpdateStatusUpdaterErrors$inboundSchema: z.ZodType< - GetUpdateStatusUpdaterErrors, - z.ZodTypeDef, - unknown + GetUpdateStatusUpdaterErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetUpdateStatusUpdaterErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetUpdateStatusUpdaterErrors$outboundSchema: z.ZodType< - GetUpdateStatusUpdaterErrors$Outbound, - z.ZodTypeDef, - GetUpdateStatusUpdaterErrors + GetUpdateStatusUpdaterErrors$Outbound, + z.ZodTypeDef, + GetUpdateStatusUpdaterErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetUpdateStatusUpdaterErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUpdateStatusUpdaterErrors$ { - /** @deprecated use `GetUpdateStatusUpdaterErrors$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusUpdaterErrors$inboundSchema; - /** @deprecated use `GetUpdateStatusUpdaterErrors$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusUpdaterErrors$outboundSchema; - /** @deprecated use `GetUpdateStatusUpdaterErrors$Outbound` instead. */ - export type Outbound = GetUpdateStatusUpdaterErrors$Outbound; + /** @deprecated use `GetUpdateStatusUpdaterErrors$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusUpdaterErrors$inboundSchema; + /** @deprecated use `GetUpdateStatusUpdaterErrors$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusUpdaterErrors$outboundSchema; + /** @deprecated use `GetUpdateStatusUpdaterErrors$Outbound` instead. */ + export type Outbound = GetUpdateStatusUpdaterErrors$Outbound; } /** @internal */ -export const GetUpdateStatusUpdaterResponseBody$inboundSchema: z.ZodType< - GetUpdateStatusUpdaterResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUpdateStatusUpdaterErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUpdateStatusUpdaterResponseBody(remapped); +export const GetUpdateStatusUnauthorized$inboundSchema: z.ZodType< + GetUpdateStatusUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetUpdateStatusUpdaterErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetUpdateStatusUnauthorized(remapped); + }); + /** @internal */ -export type GetUpdateStatusUpdaterResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetUpdateStatusUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetUpdateStatusUpdaterResponseBody$outboundSchema: z.ZodType< - GetUpdateStatusUpdaterResponseBody$Outbound, - z.ZodTypeDef, - GetUpdateStatusUpdaterResponseBody -> = z - .instanceof(GetUpdateStatusUpdaterResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetUpdateStatusUpdaterErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetUpdateStatusUnauthorized$outboundSchema: z.ZodType< + GetUpdateStatusUnauthorized$Outbound, + z.ZodTypeDef, + GetUpdateStatusUnauthorized +> = z.instanceof(GetUpdateStatusUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetUpdateStatusUpdaterErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetUpdateStatusUpdaterResponseBody$ { - /** @deprecated use `GetUpdateStatusUpdaterResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusUpdaterResponseBody$inboundSchema; - /** @deprecated use `GetUpdateStatusUpdaterResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusUpdaterResponseBody$outboundSchema; - /** @deprecated use `GetUpdateStatusUpdaterResponseBody$Outbound` instead. */ - export type Outbound = GetUpdateStatusUpdaterResponseBody$Outbound; +export namespace GetUpdateStatusUnauthorized$ { + /** @deprecated use `GetUpdateStatusUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusUnauthorized$inboundSchema; + /** @deprecated use `GetUpdateStatusUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusUnauthorized$outboundSchema; + /** @deprecated use `GetUpdateStatusUnauthorized$Outbound` instead. */ + export type Outbound = GetUpdateStatusUnauthorized$Outbound; } /** @internal */ export const GetUpdateStatusErrors$inboundSchema: z.ZodType< - GetUpdateStatusErrors, - z.ZodTypeDef, - unknown + GetUpdateStatusErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetUpdateStatusErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetUpdateStatusErrors$outboundSchema: z.ZodType< - GetUpdateStatusErrors$Outbound, - z.ZodTypeDef, - GetUpdateStatusErrors + GetUpdateStatusErrors$Outbound, + z.ZodTypeDef, + GetUpdateStatusErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetUpdateStatusErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUpdateStatusErrors$ { - /** @deprecated use `GetUpdateStatusErrors$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusErrors$inboundSchema; - /** @deprecated use `GetUpdateStatusErrors$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusErrors$outboundSchema; - /** @deprecated use `GetUpdateStatusErrors$Outbound` instead. */ - export type Outbound = GetUpdateStatusErrors$Outbound; + /** @deprecated use `GetUpdateStatusErrors$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusErrors$inboundSchema; + /** @deprecated use `GetUpdateStatusErrors$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusErrors$outboundSchema; + /** @deprecated use `GetUpdateStatusErrors$Outbound` instead. */ + export type Outbound = GetUpdateStatusErrors$Outbound; } /** @internal */ -export const GetUpdateStatusResponseBody$inboundSchema: z.ZodType< - GetUpdateStatusResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUpdateStatusErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUpdateStatusResponseBody(remapped); +export const GetUpdateStatusBadRequest$inboundSchema: z.ZodType< + GetUpdateStatusBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetUpdateStatusErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetUpdateStatusBadRequest(remapped); + }); + /** @internal */ -export type GetUpdateStatusResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetUpdateStatusBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetUpdateStatusResponseBody$outboundSchema: z.ZodType< - GetUpdateStatusResponseBody$Outbound, - z.ZodTypeDef, - GetUpdateStatusResponseBody -> = z - .instanceof(GetUpdateStatusResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetUpdateStatusErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetUpdateStatusBadRequest$outboundSchema: z.ZodType< + GetUpdateStatusBadRequest$Outbound, + z.ZodTypeDef, + GetUpdateStatusBadRequest +> = z.instanceof(GetUpdateStatusBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetUpdateStatusErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetUpdateStatusResponseBody$ { - /** @deprecated use `GetUpdateStatusResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusResponseBody$inboundSchema; - /** @deprecated use `GetUpdateStatusResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusResponseBody$outboundSchema; - /** @deprecated use `GetUpdateStatusResponseBody$Outbound` instead. */ - export type Outbound = GetUpdateStatusResponseBody$Outbound; +export namespace GetUpdateStatusBadRequest$ { + /** @deprecated use `GetUpdateStatusBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusBadRequest$inboundSchema; + /** @deprecated use `GetUpdateStatusBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusBadRequest$outboundSchema; + /** @deprecated use `GetUpdateStatusBadRequest$Outbound` instead. */ + export type Outbound = GetUpdateStatusBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getuserdetails.ts b/src/sdk/models/errors/getuserdetails.ts deleted file mode 100644 index b9f413b8..00000000 --- a/src/sdk/models/errors/getuserdetails.ts +++ /dev/null @@ -1,316 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as z from "zod"; - -export type GetUserDetailsAuthenticationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -export type GetUserDetailsAuthenticationResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; -}; - -/** - * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. - */ -export class GetUserDetailsAuthenticationResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUserDetailsAuthenticationResponseBodyData; - - constructor(err: GetUserDetailsAuthenticationResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } - - this.name = "GetUserDetailsAuthenticationResponseBody"; - } -} - -export type GetUserDetailsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export type GetUserDetailsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; -}; - -/** - * Bad Request - A parameter was not specified, or was specified incorrectly. - */ -export class GetUserDetailsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; - - /** The original data that was passed to this error instance. */ - data$: GetUserDetailsResponseBodyData; - - constructor(err: GetUserDetailsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; - - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } - - this.name = "GetUserDetailsResponseBody"; - } -} - -/** @internal */ -export const GetUserDetailsAuthenticationErrors$inboundSchema: z.ZodType< - GetUserDetailsAuthenticationErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetUserDetailsAuthenticationErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetUserDetailsAuthenticationErrors$outboundSchema: z.ZodType< - GetUserDetailsAuthenticationErrors$Outbound, - z.ZodTypeDef, - GetUserDetailsAuthenticationErrors -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsAuthenticationErrors$ { - /** @deprecated use `GetUserDetailsAuthenticationErrors$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsAuthenticationErrors$inboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationErrors$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsAuthenticationErrors$outboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationErrors$Outbound` instead. */ - export type Outbound = GetUserDetailsAuthenticationErrors$Outbound; -} - -/** @internal */ -export const GetUserDetailsAuthenticationResponseBody$inboundSchema: z.ZodType< - GetUserDetailsAuthenticationResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUserDetailsAuthenticationErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUserDetailsAuthenticationResponseBody(remapped); - }); - -/** @internal */ -export type GetUserDetailsAuthenticationResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetUserDetailsAuthenticationResponseBody$outboundSchema: z.ZodType< - GetUserDetailsAuthenticationResponseBody$Outbound, - z.ZodTypeDef, - GetUserDetailsAuthenticationResponseBody -> = z - .instanceof(GetUserDetailsAuthenticationResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetUserDetailsAuthenticationErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsAuthenticationResponseBody$ { - /** @deprecated use `GetUserDetailsAuthenticationResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsAuthenticationResponseBody$inboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsAuthenticationResponseBody$outboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationResponseBody$Outbound` instead. */ - export type Outbound = GetUserDetailsAuthenticationResponseBody$Outbound; -} - -/** @internal */ -export const GetUserDetailsErrors$inboundSchema: z.ZodType< - GetUserDetailsErrors, - z.ZodTypeDef, - unknown -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** @internal */ -export type GetUserDetailsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; -}; - -/** @internal */ -export const GetUserDetailsErrors$outboundSchema: z.ZodType< - GetUserDetailsErrors$Outbound, - z.ZodTypeDef, - GetUserDetailsErrors -> = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsErrors$ { - /** @deprecated use `GetUserDetailsErrors$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsErrors$inboundSchema; - /** @deprecated use `GetUserDetailsErrors$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsErrors$outboundSchema; - /** @deprecated use `GetUserDetailsErrors$Outbound` instead. */ - export type Outbound = GetUserDetailsErrors$Outbound; -} - -/** @internal */ -export const GetUserDetailsResponseBody$inboundSchema: z.ZodType< - GetUserDetailsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUserDetailsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUserDetailsResponseBody(remapped); - }); - -/** @internal */ -export type GetUserDetailsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; -}; - -/** @internal */ -export const GetUserDetailsResponseBody$outboundSchema: z.ZodType< - GetUserDetailsResponseBody$Outbound, - z.ZodTypeDef, - GetUserDetailsResponseBody -> = z - .instanceof(GetUserDetailsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetUserDetailsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsResponseBody$ { - /** @deprecated use `GetUserDetailsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsResponseBody$inboundSchema; - /** @deprecated use `GetUserDetailsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsResponseBody$outboundSchema; - /** @deprecated use `GetUserDetailsResponseBody$Outbound` instead. */ - export type Outbound = GetUserDetailsResponseBody$Outbound; -} diff --git a/src/sdk/models/errors/getuserfriends.ts b/src/sdk/models/errors/getuserfriends.ts index 9b82e558..78fbcb08 100644 --- a/src/sdk/models/errors/getuserfriends.ts +++ b/src/sdk/models/errors/getuserfriends.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetUserFriendsPlexErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetUserFriendsPlexResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetUserFriendsUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetUserFriendsPlexResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetUserFriendsUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetUserFriendsPlexResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetUserFriendsUnauthorizedData; - constructor(err: GetUserFriendsPlexResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetUserFriendsUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetUserFriendsPlexResponseBody"; - } + this.name = "GetUserFriendsUnauthorized"; + } } export type GetUserFriendsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetUserFriendsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetUserFriendsBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetUserFriendsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetUserFriendsBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetUserFriendsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetUserFriendsBadRequestData; - constructor(err: GetUserFriendsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetUserFriendsBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetUserFriendsResponseBody"; - } + this.name = "GetUserFriendsBadRequest"; + } } /** @internal */ export const GetUserFriendsPlexErrors$inboundSchema: z.ZodType< - GetUserFriendsPlexErrors, - z.ZodTypeDef, - unknown + GetUserFriendsPlexErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetUserFriendsPlexErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetUserFriendsPlexErrors$outboundSchema: z.ZodType< - GetUserFriendsPlexErrors$Outbound, - z.ZodTypeDef, - GetUserFriendsPlexErrors + GetUserFriendsPlexErrors$Outbound, + z.ZodTypeDef, + GetUserFriendsPlexErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const GetUserFriendsPlexErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserFriendsPlexErrors$ { - /** @deprecated use `GetUserFriendsPlexErrors$inboundSchema` instead. */ - export const inboundSchema = GetUserFriendsPlexErrors$inboundSchema; - /** @deprecated use `GetUserFriendsPlexErrors$outboundSchema` instead. */ - export const outboundSchema = GetUserFriendsPlexErrors$outboundSchema; - /** @deprecated use `GetUserFriendsPlexErrors$Outbound` instead. */ - export type Outbound = GetUserFriendsPlexErrors$Outbound; + /** @deprecated use `GetUserFriendsPlexErrors$inboundSchema` instead. */ + export const inboundSchema = GetUserFriendsPlexErrors$inboundSchema; + /** @deprecated use `GetUserFriendsPlexErrors$outboundSchema` instead. */ + export const outboundSchema = GetUserFriendsPlexErrors$outboundSchema; + /** @deprecated use `GetUserFriendsPlexErrors$Outbound` instead. */ + export type Outbound = GetUserFriendsPlexErrors$Outbound; } /** @internal */ -export const GetUserFriendsPlexResponseBody$inboundSchema: z.ZodType< - GetUserFriendsPlexResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUserFriendsPlexErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUserFriendsPlexResponseBody(remapped); +export const GetUserFriendsUnauthorized$inboundSchema: z.ZodType< + GetUserFriendsUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetUserFriendsPlexErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetUserFriendsUnauthorized(remapped); + }); + /** @internal */ -export type GetUserFriendsPlexResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetUserFriendsUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetUserFriendsPlexResponseBody$outboundSchema: z.ZodType< - GetUserFriendsPlexResponseBody$Outbound, - z.ZodTypeDef, - GetUserFriendsPlexResponseBody -> = z - .instanceof(GetUserFriendsPlexResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetUserFriendsPlexErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetUserFriendsUnauthorized$outboundSchema: z.ZodType< + GetUserFriendsUnauthorized$Outbound, + z.ZodTypeDef, + GetUserFriendsUnauthorized +> = z.instanceof(GetUserFriendsUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetUserFriendsPlexErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetUserFriendsPlexResponseBody$ { - /** @deprecated use `GetUserFriendsPlexResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserFriendsPlexResponseBody$inboundSchema; - /** @deprecated use `GetUserFriendsPlexResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserFriendsPlexResponseBody$outboundSchema; - /** @deprecated use `GetUserFriendsPlexResponseBody$Outbound` instead. */ - export type Outbound = GetUserFriendsPlexResponseBody$Outbound; +export namespace GetUserFriendsUnauthorized$ { + /** @deprecated use `GetUserFriendsUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetUserFriendsUnauthorized$inboundSchema; + /** @deprecated use `GetUserFriendsUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetUserFriendsUnauthorized$outboundSchema; + /** @deprecated use `GetUserFriendsUnauthorized$Outbound` instead. */ + export type Outbound = GetUserFriendsUnauthorized$Outbound; } /** @internal */ export const GetUserFriendsErrors$inboundSchema: z.ZodType< - GetUserFriendsErrors, - z.ZodTypeDef, - unknown + GetUserFriendsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetUserFriendsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetUserFriendsErrors$outboundSchema: z.ZodType< - GetUserFriendsErrors$Outbound, - z.ZodTypeDef, - GetUserFriendsErrors + GetUserFriendsErrors$Outbound, + z.ZodTypeDef, + GetUserFriendsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const GetUserFriendsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserFriendsErrors$ { - /** @deprecated use `GetUserFriendsErrors$inboundSchema` instead. */ - export const inboundSchema = GetUserFriendsErrors$inboundSchema; - /** @deprecated use `GetUserFriendsErrors$outboundSchema` instead. */ - export const outboundSchema = GetUserFriendsErrors$outboundSchema; - /** @deprecated use `GetUserFriendsErrors$Outbound` instead. */ - export type Outbound = GetUserFriendsErrors$Outbound; + /** @deprecated use `GetUserFriendsErrors$inboundSchema` instead. */ + export const inboundSchema = GetUserFriendsErrors$inboundSchema; + /** @deprecated use `GetUserFriendsErrors$outboundSchema` instead. */ + export const outboundSchema = GetUserFriendsErrors$outboundSchema; + /** @deprecated use `GetUserFriendsErrors$Outbound` instead. */ + export type Outbound = GetUserFriendsErrors$Outbound; } /** @internal */ -export const GetUserFriendsResponseBody$inboundSchema: z.ZodType< - GetUserFriendsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetUserFriendsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetUserFriendsResponseBody(remapped); +export const GetUserFriendsBadRequest$inboundSchema: z.ZodType< + GetUserFriendsBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetUserFriendsErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetUserFriendsBadRequest(remapped); + }); + /** @internal */ -export type GetUserFriendsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetUserFriendsBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetUserFriendsResponseBody$outboundSchema: z.ZodType< - GetUserFriendsResponseBody$Outbound, - z.ZodTypeDef, - GetUserFriendsResponseBody -> = z - .instanceof(GetUserFriendsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetUserFriendsErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetUserFriendsBadRequest$outboundSchema: z.ZodType< + GetUserFriendsBadRequest$Outbound, + z.ZodTypeDef, + GetUserFriendsBadRequest +> = z.instanceof(GetUserFriendsBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetUserFriendsErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetUserFriendsResponseBody$ { - /** @deprecated use `GetUserFriendsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUserFriendsResponseBody$inboundSchema; - /** @deprecated use `GetUserFriendsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUserFriendsResponseBody$outboundSchema; - /** @deprecated use `GetUserFriendsResponseBody$Outbound` instead. */ - export type Outbound = GetUserFriendsResponseBody$Outbound; +export namespace GetUserFriendsBadRequest$ { + /** @deprecated use `GetUserFriendsBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetUserFriendsBadRequest$inboundSchema; + /** @deprecated use `GetUserFriendsBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetUserFriendsBadRequest$outboundSchema; + /** @deprecated use `GetUserFriendsBadRequest$Outbound` instead. */ + export type Outbound = GetUserFriendsBadRequest$Outbound; } diff --git a/src/sdk/models/errors/getwatchlist.ts b/src/sdk/models/errors/getwatchlist.ts index 96b51c4a..ecfca2c4 100644 --- a/src/sdk/models/errors/getwatchlist.ts +++ b/src/sdk/models/errors/getwatchlist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetWatchListWatchlistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type GetWatchListWatchlistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetWatchListUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class GetWatchListWatchlistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetWatchListUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetWatchListWatchlistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetWatchListUnauthorizedData; - constructor(err: GetWatchListWatchlistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetWatchListUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetWatchListWatchlistResponseBody"; - } + this.name = "GetWatchListUnauthorized"; + } } export type GetWatchListErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type GetWatchListResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type GetWatchListBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class GetWatchListResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class GetWatchListBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: GetWatchListResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: GetWatchListBadRequestData; - constructor(err: GetWatchListResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: GetWatchListBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "GetWatchListResponseBody"; - } + this.name = "GetWatchListBadRequest"; + } } /** @internal */ export const GetWatchListWatchlistErrors$inboundSchema: z.ZodType< - GetWatchListWatchlistErrors, - z.ZodTypeDef, - unknown + GetWatchListWatchlistErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetWatchListWatchlistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetWatchListWatchlistErrors$outboundSchema: z.ZodType< - GetWatchListWatchlistErrors$Outbound, - z.ZodTypeDef, - GetWatchListWatchlistErrors + GetWatchListWatchlistErrors$Outbound, + z.ZodTypeDef, + GetWatchListWatchlistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,99 @@ export const GetWatchListWatchlistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWatchListWatchlistErrors$ { - /** @deprecated use `GetWatchListWatchlistErrors$inboundSchema` instead. */ - export const inboundSchema = GetWatchListWatchlistErrors$inboundSchema; - /** @deprecated use `GetWatchListWatchlistErrors$outboundSchema` instead. */ - export const outboundSchema = GetWatchListWatchlistErrors$outboundSchema; - /** @deprecated use `GetWatchListWatchlistErrors$Outbound` instead. */ - export type Outbound = GetWatchListWatchlistErrors$Outbound; + /** @deprecated use `GetWatchListWatchlistErrors$inboundSchema` instead. */ + export const inboundSchema = GetWatchListWatchlistErrors$inboundSchema; + /** @deprecated use `GetWatchListWatchlistErrors$outboundSchema` instead. */ + export const outboundSchema = GetWatchListWatchlistErrors$outboundSchema; + /** @deprecated use `GetWatchListWatchlistErrors$Outbound` instead. */ + export type Outbound = GetWatchListWatchlistErrors$Outbound; } /** @internal */ -export const GetWatchListWatchlistResponseBody$inboundSchema: z.ZodType< - GetWatchListWatchlistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetWatchListWatchlistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetWatchListWatchlistResponseBody(remapped); +export const GetWatchListUnauthorized$inboundSchema: z.ZodType< + GetWatchListUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetWatchListWatchlistErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetWatchListUnauthorized(remapped); + }); + /** @internal */ -export type GetWatchListWatchlistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetWatchListUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetWatchListWatchlistResponseBody$outboundSchema: z.ZodType< - GetWatchListWatchlistResponseBody$Outbound, - z.ZodTypeDef, - GetWatchListWatchlistResponseBody -> = z - .instanceof(GetWatchListWatchlistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => GetWatchListWatchlistErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetWatchListUnauthorized$outboundSchema: z.ZodType< + GetWatchListUnauthorized$Outbound, + z.ZodTypeDef, + GetWatchListUnauthorized +> = z.instanceof(GetWatchListUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetWatchListWatchlistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetWatchListWatchlistResponseBody$ { - /** @deprecated use `GetWatchListWatchlistResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetWatchListWatchlistResponseBody$inboundSchema; - /** @deprecated use `GetWatchListWatchlistResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetWatchListWatchlistResponseBody$outboundSchema; - /** @deprecated use `GetWatchListWatchlistResponseBody$Outbound` instead. */ - export type Outbound = GetWatchListWatchlistResponseBody$Outbound; +export namespace GetWatchListUnauthorized$ { + /** @deprecated use `GetWatchListUnauthorized$inboundSchema` instead. */ + export const inboundSchema = GetWatchListUnauthorized$inboundSchema; + /** @deprecated use `GetWatchListUnauthorized$outboundSchema` instead. */ + export const outboundSchema = GetWatchListUnauthorized$outboundSchema; + /** @deprecated use `GetWatchListUnauthorized$Outbound` instead. */ + export type Outbound = GetWatchListUnauthorized$Outbound; } /** @internal */ export const GetWatchListErrors$inboundSchema: z.ZodType< - GetWatchListErrors, - z.ZodTypeDef, - unknown + GetWatchListErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type GetWatchListErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const GetWatchListErrors$outboundSchema: z.ZodType< - GetWatchListErrors$Outbound, - z.ZodTypeDef, - GetWatchListErrors + GetWatchListErrors$Outbound, + z.ZodTypeDef, + GetWatchListErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +227,67 @@ export const GetWatchListErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWatchListErrors$ { - /** @deprecated use `GetWatchListErrors$inboundSchema` instead. */ - export const inboundSchema = GetWatchListErrors$inboundSchema; - /** @deprecated use `GetWatchListErrors$outboundSchema` instead. */ - export const outboundSchema = GetWatchListErrors$outboundSchema; - /** @deprecated use `GetWatchListErrors$Outbound` instead. */ - export type Outbound = GetWatchListErrors$Outbound; + /** @deprecated use `GetWatchListErrors$inboundSchema` instead. */ + export const inboundSchema = GetWatchListErrors$inboundSchema; + /** @deprecated use `GetWatchListErrors$outboundSchema` instead. */ + export const outboundSchema = GetWatchListErrors$outboundSchema; + /** @deprecated use `GetWatchListErrors$Outbound` instead. */ + export type Outbound = GetWatchListErrors$Outbound; } /** @internal */ -export const GetWatchListResponseBody$inboundSchema: z.ZodType< - GetWatchListResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => GetWatchListErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new GetWatchListResponseBody(remapped); +export const GetWatchListBadRequest$inboundSchema: z.ZodType< + GetWatchListBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => GetWatchListErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new GetWatchListBadRequest(remapped); + }); + /** @internal */ -export type GetWatchListResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type GetWatchListBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const GetWatchListResponseBody$outboundSchema: z.ZodType< - GetWatchListResponseBody$Outbound, - z.ZodTypeDef, - GetWatchListResponseBody -> = z - .instanceof(GetWatchListResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => GetWatchListErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const GetWatchListBadRequest$outboundSchema: z.ZodType< + GetWatchListBadRequest$Outbound, + z.ZodTypeDef, + GetWatchListBadRequest +> = z.instanceof(GetWatchListBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => GetWatchListErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace GetWatchListResponseBody$ { - /** @deprecated use `GetWatchListResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetWatchListResponseBody$inboundSchema; - /** @deprecated use `GetWatchListResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetWatchListResponseBody$outboundSchema; - /** @deprecated use `GetWatchListResponseBody$Outbound` instead. */ - export type Outbound = GetWatchListResponseBody$Outbound; +export namespace GetWatchListBadRequest$ { + /** @deprecated use `GetWatchListBadRequest$inboundSchema` instead. */ + export const inboundSchema = GetWatchListBadRequest$inboundSchema; + /** @deprecated use `GetWatchListBadRequest$outboundSchema` instead. */ + export const outboundSchema = GetWatchListBadRequest$outboundSchema; + /** @deprecated use `GetWatchListBadRequest$Outbound` instead. */ + export type Outbound = GetWatchListBadRequest$Outbound; } diff --git a/src/sdk/models/errors/httpclienterrors.ts b/src/sdk/models/errors/httpclienterrors.ts index cdb2995f..b34f6121 100644 --- a/src/sdk/models/errors/httpclienterrors.ts +++ b/src/sdk/models/errors/httpclienterrors.ts @@ -6,43 +6,43 @@ * Base class for all HTTP errors. */ export class HTTPClientError extends Error { - /** The underlying cause of the error. */ - override readonly cause: unknown; - override name = "HTTPClientError"; - constructor(message: string, opts?: { cause?: unknown }) { - let msg = message; - if (opts?.cause) { - msg += `: ${opts.cause}`; - } - - super(msg, opts); - // In older runtimes, the cause field would not have been assigned through - // the super() call. - if (typeof this.cause === "undefined") { - this.cause = opts?.cause; - } + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; } + + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; + } + } } /** * An error to capture unrecognised or unexpected errors when making HTTP calls. */ export class UnexpectedClientError extends HTTPClientError { - override name = "UnexpectedClientError"; + override name = "UnexpectedClientError"; } /** * An error that is raised when any inputs used to create a request are invalid. */ export class InvalidRequestError extends HTTPClientError { - override name = "InvalidRequestError"; + override name = "InvalidRequestError"; } /** * An error that is raised when a HTTP request was aborted by the client error. */ export class RequestAbortedError extends HTTPClientError { - override readonly name = "RequestAbortedError"; + override readonly name = "RequestAbortedError"; } /** @@ -50,7 +50,7 @@ export class RequestAbortedError extends HTTPClientError { * signal timeout. */ export class RequestTimeoutError extends HTTPClientError { - override readonly name = "RequestTimeoutError"; + override readonly name = "RequestTimeoutError"; } /** @@ -58,5 +58,5 @@ export class RequestTimeoutError extends HTTPClientError { * a server. */ export class ConnectionError extends HTTPClientError { - override readonly name = "ConnectionError"; + override readonly name = "ConnectionError"; } diff --git a/src/sdk/models/errors/index.ts b/src/sdk/models/errors/index.ts index 82e878af..e8c00b19 100644 --- a/src/sdk/models/errors/index.ts +++ b/src/sdk/models/errors/index.ts @@ -53,11 +53,11 @@ export * from "./getstatistics.js"; export * from "./getthumbimage.js"; export * from "./gettimeline.js"; export * from "./gettokenbypinid.js"; +export * from "./gettokendetails.js"; export * from "./gettopwatchedcontent.js"; export * from "./gettranscodesessions.js"; export * from "./gettransienttoken.js"; export * from "./getupdatestatus.js"; -export * from "./getuserdetails.js"; export * from "./getuserfriends.js"; export * from "./getwatchlist.js"; export * from "./httpclienterrors.js"; diff --git a/src/sdk/models/errors/logline.ts b/src/sdk/models/errors/logline.ts index a267c0ad..1fed1e6d 100644 --- a/src/sdk/models/errors/logline.ts +++ b/src/sdk/models/errors/logline.ts @@ -2,131 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type LogLineLogErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type LogLineLogResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type LogLineUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class LogLineLogResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class LogLineUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: LogLineLogResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: LogLineUnauthorizedData; - constructor(err: LogLineLogResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: LogLineUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "LogLineLogResponseBody"; - } + this.name = "LogLineUnauthorized"; + } } export type LogLineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type LogLineResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type LogLineBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class LogLineResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class LogLineBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: LogLineResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: LogLineBadRequestData; - constructor(err: LogLineResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: LogLineBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "LogLineResponseBody"; - } + this.name = "LogLineBadRequest"; + } } /** @internal */ -export const LogLineLogErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const LogLineLogErrors$inboundSchema: z.ZodType< + LogLineLogErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type LogLineLogErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const LogLineLogErrors$outboundSchema: z.ZodType< - LogLineLogErrors$Outbound, - z.ZodTypeDef, - LogLineLogErrors + LogLineLogErrors$Outbound, + z.ZodTypeDef, + LogLineLogErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -134,101 +127,97 @@ export const LogLineLogErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogLineLogErrors$ { - /** @deprecated use `LogLineLogErrors$inboundSchema` instead. */ - export const inboundSchema = LogLineLogErrors$inboundSchema; - /** @deprecated use `LogLineLogErrors$outboundSchema` instead. */ - export const outboundSchema = LogLineLogErrors$outboundSchema; - /** @deprecated use `LogLineLogErrors$Outbound` instead. */ - export type Outbound = LogLineLogErrors$Outbound; + /** @deprecated use `LogLineLogErrors$inboundSchema` instead. */ + export const inboundSchema = LogLineLogErrors$inboundSchema; + /** @deprecated use `LogLineLogErrors$outboundSchema` instead. */ + export const outboundSchema = LogLineLogErrors$outboundSchema; + /** @deprecated use `LogLineLogErrors$Outbound` instead. */ + export type Outbound = LogLineLogErrors$Outbound; } /** @internal */ -export const LogLineLogResponseBody$inboundSchema: z.ZodType< - LogLineLogResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => LogLineLogErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new LogLineLogResponseBody(remapped); +export const LogLineUnauthorized$inboundSchema: z.ZodType< + LogLineUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => LogLineLogErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new LogLineUnauthorized(remapped); + }); + /** @internal */ -export type LogLineLogResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type LogLineUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const LogLineLogResponseBody$outboundSchema: z.ZodType< - LogLineLogResponseBody$Outbound, - z.ZodTypeDef, - LogLineLogResponseBody -> = z - .instanceof(LogLineLogResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => LogLineLogErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const LogLineUnauthorized$outboundSchema: z.ZodType< + LogLineUnauthorized$Outbound, + z.ZodTypeDef, + LogLineUnauthorized +> = z.instanceof(LogLineUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => LogLineLogErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace LogLineLogResponseBody$ { - /** @deprecated use `LogLineLogResponseBody$inboundSchema` instead. */ - export const inboundSchema = LogLineLogResponseBody$inboundSchema; - /** @deprecated use `LogLineLogResponseBody$outboundSchema` instead. */ - export const outboundSchema = LogLineLogResponseBody$outboundSchema; - /** @deprecated use `LogLineLogResponseBody$Outbound` instead. */ - export type Outbound = LogLineLogResponseBody$Outbound; +export namespace LogLineUnauthorized$ { + /** @deprecated use `LogLineUnauthorized$inboundSchema` instead. */ + export const inboundSchema = LogLineUnauthorized$inboundSchema; + /** @deprecated use `LogLineUnauthorized$outboundSchema` instead. */ + export const outboundSchema = LogLineUnauthorized$outboundSchema; + /** @deprecated use `LogLineUnauthorized$Outbound` instead. */ + export type Outbound = LogLineUnauthorized$Outbound; } /** @internal */ -export const LogLineErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const LogLineErrors$inboundSchema: z.ZodType< + LogLineErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type LogLineErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const LogLineErrors$outboundSchema: z.ZodType< - LogLineErrors$Outbound, - z.ZodTypeDef, - LogLineErrors + LogLineErrors$Outbound, + z.ZodTypeDef, + LogLineErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -236,73 +225,66 @@ export const LogLineErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogLineErrors$ { - /** @deprecated use `LogLineErrors$inboundSchema` instead. */ - export const inboundSchema = LogLineErrors$inboundSchema; - /** @deprecated use `LogLineErrors$outboundSchema` instead. */ - export const outboundSchema = LogLineErrors$outboundSchema; - /** @deprecated use `LogLineErrors$Outbound` instead. */ - export type Outbound = LogLineErrors$Outbound; + /** @deprecated use `LogLineErrors$inboundSchema` instead. */ + export const inboundSchema = LogLineErrors$inboundSchema; + /** @deprecated use `LogLineErrors$outboundSchema` instead. */ + export const outboundSchema = LogLineErrors$outboundSchema; + /** @deprecated use `LogLineErrors$Outbound` instead. */ + export type Outbound = LogLineErrors$Outbound; } /** @internal */ -export const LogLineResponseBody$inboundSchema: z.ZodType< - LogLineResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => LogLineErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new LogLineResponseBody(remapped); +export const LogLineBadRequest$inboundSchema: z.ZodType< + LogLineBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => LogLineErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new LogLineBadRequest(remapped); + }); + /** @internal */ -export type LogLineResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type LogLineBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const LogLineResponseBody$outboundSchema: z.ZodType< - LogLineResponseBody$Outbound, - z.ZodTypeDef, - LogLineResponseBody -> = z - .instanceof(LogLineResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => LogLineErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const LogLineBadRequest$outboundSchema: z.ZodType< + LogLineBadRequest$Outbound, + z.ZodTypeDef, + LogLineBadRequest +> = z.instanceof(LogLineBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => LogLineErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace LogLineResponseBody$ { - /** @deprecated use `LogLineResponseBody$inboundSchema` instead. */ - export const inboundSchema = LogLineResponseBody$inboundSchema; - /** @deprecated use `LogLineResponseBody$outboundSchema` instead. */ - export const outboundSchema = LogLineResponseBody$outboundSchema; - /** @deprecated use `LogLineResponseBody$Outbound` instead. */ - export type Outbound = LogLineResponseBody$Outbound; +export namespace LogLineBadRequest$ { + /** @deprecated use `LogLineBadRequest$inboundSchema` instead. */ + export const inboundSchema = LogLineBadRequest$inboundSchema; + /** @deprecated use `LogLineBadRequest$outboundSchema` instead. */ + export const outboundSchema = LogLineBadRequest$outboundSchema; + /** @deprecated use `LogLineBadRequest$Outbound` instead. */ + export type Outbound = LogLineBadRequest$Outbound; } diff --git a/src/sdk/models/errors/logmultiline.ts b/src/sdk/models/errors/logmultiline.ts index a72c93ba..e176f09a 100644 --- a/src/sdk/models/errors/logmultiline.ts +++ b/src/sdk/models/errors/logmultiline.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type LogMultiLineLogErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type LogMultiLineLogResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type LogMultiLineUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class LogMultiLineLogResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class LogMultiLineUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: LogMultiLineLogResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: LogMultiLineUnauthorizedData; - constructor(err: LogMultiLineLogResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: LogMultiLineUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "LogMultiLineLogResponseBody"; - } + this.name = "LogMultiLineUnauthorized"; + } } export type LogMultiLineErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type LogMultiLineResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type LogMultiLineBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class LogMultiLineResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class LogMultiLineBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: LogMultiLineResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: LogMultiLineBadRequestData; - constructor(err: LogMultiLineResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: LogMultiLineBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "LogMultiLineResponseBody"; - } + this.name = "LogMultiLineBadRequest"; + } } /** @internal */ export const LogMultiLineLogErrors$inboundSchema: z.ZodType< - LogMultiLineLogErrors, - z.ZodTypeDef, - unknown + LogMultiLineLogErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type LogMultiLineLogErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const LogMultiLineLogErrors$outboundSchema: z.ZodType< - LogMultiLineLogErrors$Outbound, - z.ZodTypeDef, - LogMultiLineLogErrors + LogMultiLineLogErrors$Outbound, + z.ZodTypeDef, + LogMultiLineLogErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,98 @@ export const LogMultiLineLogErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogMultiLineLogErrors$ { - /** @deprecated use `LogMultiLineLogErrors$inboundSchema` instead. */ - export const inboundSchema = LogMultiLineLogErrors$inboundSchema; - /** @deprecated use `LogMultiLineLogErrors$outboundSchema` instead. */ - export const outboundSchema = LogMultiLineLogErrors$outboundSchema; - /** @deprecated use `LogMultiLineLogErrors$Outbound` instead. */ - export type Outbound = LogMultiLineLogErrors$Outbound; + /** @deprecated use `LogMultiLineLogErrors$inboundSchema` instead. */ + export const inboundSchema = LogMultiLineLogErrors$inboundSchema; + /** @deprecated use `LogMultiLineLogErrors$outboundSchema` instead. */ + export const outboundSchema = LogMultiLineLogErrors$outboundSchema; + /** @deprecated use `LogMultiLineLogErrors$Outbound` instead. */ + export type Outbound = LogMultiLineLogErrors$Outbound; } /** @internal */ -export const LogMultiLineLogResponseBody$inboundSchema: z.ZodType< - LogMultiLineLogResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => LogMultiLineLogErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new LogMultiLineLogResponseBody(remapped); +export const LogMultiLineUnauthorized$inboundSchema: z.ZodType< + LogMultiLineUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => LogMultiLineLogErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new LogMultiLineUnauthorized(remapped); + }); + /** @internal */ -export type LogMultiLineLogResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type LogMultiLineUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const LogMultiLineLogResponseBody$outboundSchema: z.ZodType< - LogMultiLineLogResponseBody$Outbound, - z.ZodTypeDef, - LogMultiLineLogResponseBody -> = z - .instanceof(LogMultiLineLogResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => LogMultiLineLogErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const LogMultiLineUnauthorized$outboundSchema: z.ZodType< + LogMultiLineUnauthorized$Outbound, + z.ZodTypeDef, + LogMultiLineUnauthorized +> = z.instanceof(LogMultiLineUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => LogMultiLineLogErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace LogMultiLineLogResponseBody$ { - /** @deprecated use `LogMultiLineLogResponseBody$inboundSchema` instead. */ - export const inboundSchema = LogMultiLineLogResponseBody$inboundSchema; - /** @deprecated use `LogMultiLineLogResponseBody$outboundSchema` instead. */ - export const outboundSchema = LogMultiLineLogResponseBody$outboundSchema; - /** @deprecated use `LogMultiLineLogResponseBody$Outbound` instead. */ - export type Outbound = LogMultiLineLogResponseBody$Outbound; +export namespace LogMultiLineUnauthorized$ { + /** @deprecated use `LogMultiLineUnauthorized$inboundSchema` instead. */ + export const inboundSchema = LogMultiLineUnauthorized$inboundSchema; + /** @deprecated use `LogMultiLineUnauthorized$outboundSchema` instead. */ + export const outboundSchema = LogMultiLineUnauthorized$outboundSchema; + /** @deprecated use `LogMultiLineUnauthorized$Outbound` instead. */ + export type Outbound = LogMultiLineUnauthorized$Outbound; } /** @internal */ export const LogMultiLineErrors$inboundSchema: z.ZodType< - LogMultiLineErrors, - z.ZodTypeDef, - unknown + LogMultiLineErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type LogMultiLineErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const LogMultiLineErrors$outboundSchema: z.ZodType< - LogMultiLineErrors$Outbound, - z.ZodTypeDef, - LogMultiLineErrors + LogMultiLineErrors$Outbound, + z.ZodTypeDef, + LogMultiLineErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +226,67 @@ export const LogMultiLineErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogMultiLineErrors$ { - /** @deprecated use `LogMultiLineErrors$inboundSchema` instead. */ - export const inboundSchema = LogMultiLineErrors$inboundSchema; - /** @deprecated use `LogMultiLineErrors$outboundSchema` instead. */ - export const outboundSchema = LogMultiLineErrors$outboundSchema; - /** @deprecated use `LogMultiLineErrors$Outbound` instead. */ - export type Outbound = LogMultiLineErrors$Outbound; + /** @deprecated use `LogMultiLineErrors$inboundSchema` instead. */ + export const inboundSchema = LogMultiLineErrors$inboundSchema; + /** @deprecated use `LogMultiLineErrors$outboundSchema` instead. */ + export const outboundSchema = LogMultiLineErrors$outboundSchema; + /** @deprecated use `LogMultiLineErrors$Outbound` instead. */ + export type Outbound = LogMultiLineErrors$Outbound; } /** @internal */ -export const LogMultiLineResponseBody$inboundSchema: z.ZodType< - LogMultiLineResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => LogMultiLineErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new LogMultiLineResponseBody(remapped); +export const LogMultiLineBadRequest$inboundSchema: z.ZodType< + LogMultiLineBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => LogMultiLineErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new LogMultiLineBadRequest(remapped); + }); + /** @internal */ -export type LogMultiLineResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type LogMultiLineBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const LogMultiLineResponseBody$outboundSchema: z.ZodType< - LogMultiLineResponseBody$Outbound, - z.ZodTypeDef, - LogMultiLineResponseBody -> = z - .instanceof(LogMultiLineResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => LogMultiLineErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const LogMultiLineBadRequest$outboundSchema: z.ZodType< + LogMultiLineBadRequest$Outbound, + z.ZodTypeDef, + LogMultiLineBadRequest +> = z.instanceof(LogMultiLineBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => LogMultiLineErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace LogMultiLineResponseBody$ { - /** @deprecated use `LogMultiLineResponseBody$inboundSchema` instead. */ - export const inboundSchema = LogMultiLineResponseBody$inboundSchema; - /** @deprecated use `LogMultiLineResponseBody$outboundSchema` instead. */ - export const outboundSchema = LogMultiLineResponseBody$outboundSchema; - /** @deprecated use `LogMultiLineResponseBody$Outbound` instead. */ - export type Outbound = LogMultiLineResponseBody$Outbound; +export namespace LogMultiLineBadRequest$ { + /** @deprecated use `LogMultiLineBadRequest$inboundSchema` instead. */ + export const inboundSchema = LogMultiLineBadRequest$inboundSchema; + /** @deprecated use `LogMultiLineBadRequest$outboundSchema` instead. */ + export const outboundSchema = LogMultiLineBadRequest$outboundSchema; + /** @deprecated use `LogMultiLineBadRequest$Outbound` instead. */ + export type Outbound = LogMultiLineBadRequest$Outbound; } diff --git a/src/sdk/models/errors/markplayed.ts b/src/sdk/models/errors/markplayed.ts index 859cf452..bafc4e85 100644 --- a/src/sdk/models/errors/markplayed.ts +++ b/src/sdk/models/errors/markplayed.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type MarkPlayedMediaErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type MarkPlayedMediaResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type MarkPlayedUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class MarkPlayedMediaResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class MarkPlayedUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: MarkPlayedMediaResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: MarkPlayedUnauthorizedData; - constructor(err: MarkPlayedMediaResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: MarkPlayedUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "MarkPlayedMediaResponseBody"; - } + this.name = "MarkPlayedUnauthorized"; + } } export type MarkPlayedErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type MarkPlayedResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type MarkPlayedBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class MarkPlayedResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class MarkPlayedBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: MarkPlayedResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: MarkPlayedBadRequestData; - constructor(err: MarkPlayedResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: MarkPlayedBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "MarkPlayedResponseBody"; - } + this.name = "MarkPlayedBadRequest"; + } } /** @internal */ export const MarkPlayedMediaErrors$inboundSchema: z.ZodType< - MarkPlayedMediaErrors, - z.ZodTypeDef, - unknown + MarkPlayedMediaErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type MarkPlayedMediaErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const MarkPlayedMediaErrors$outboundSchema: z.ZodType< - MarkPlayedMediaErrors$Outbound, - z.ZodTypeDef, - MarkPlayedMediaErrors + MarkPlayedMediaErrors$Outbound, + z.ZodTypeDef, + MarkPlayedMediaErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,98 @@ export const MarkPlayedMediaErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkPlayedMediaErrors$ { - /** @deprecated use `MarkPlayedMediaErrors$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedMediaErrors$inboundSchema; - /** @deprecated use `MarkPlayedMediaErrors$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedMediaErrors$outboundSchema; - /** @deprecated use `MarkPlayedMediaErrors$Outbound` instead. */ - export type Outbound = MarkPlayedMediaErrors$Outbound; + /** @deprecated use `MarkPlayedMediaErrors$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedMediaErrors$inboundSchema; + /** @deprecated use `MarkPlayedMediaErrors$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedMediaErrors$outboundSchema; + /** @deprecated use `MarkPlayedMediaErrors$Outbound` instead. */ + export type Outbound = MarkPlayedMediaErrors$Outbound; } /** @internal */ -export const MarkPlayedMediaResponseBody$inboundSchema: z.ZodType< - MarkPlayedMediaResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => MarkPlayedMediaErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new MarkPlayedMediaResponseBody(remapped); +export const MarkPlayedUnauthorized$inboundSchema: z.ZodType< + MarkPlayedUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => MarkPlayedMediaErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new MarkPlayedUnauthorized(remapped); + }); + /** @internal */ -export type MarkPlayedMediaResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type MarkPlayedUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const MarkPlayedMediaResponseBody$outboundSchema: z.ZodType< - MarkPlayedMediaResponseBody$Outbound, - z.ZodTypeDef, - MarkPlayedMediaResponseBody -> = z - .instanceof(MarkPlayedMediaResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => MarkPlayedMediaErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const MarkPlayedUnauthorized$outboundSchema: z.ZodType< + MarkPlayedUnauthorized$Outbound, + z.ZodTypeDef, + MarkPlayedUnauthorized +> = z.instanceof(MarkPlayedUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => MarkPlayedMediaErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MarkPlayedMediaResponseBody$ { - /** @deprecated use `MarkPlayedMediaResponseBody$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedMediaResponseBody$inboundSchema; - /** @deprecated use `MarkPlayedMediaResponseBody$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedMediaResponseBody$outboundSchema; - /** @deprecated use `MarkPlayedMediaResponseBody$Outbound` instead. */ - export type Outbound = MarkPlayedMediaResponseBody$Outbound; +export namespace MarkPlayedUnauthorized$ { + /** @deprecated use `MarkPlayedUnauthorized$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedUnauthorized$inboundSchema; + /** @deprecated use `MarkPlayedUnauthorized$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedUnauthorized$outboundSchema; + /** @deprecated use `MarkPlayedUnauthorized$Outbound` instead. */ + export type Outbound = MarkPlayedUnauthorized$Outbound; } /** @internal */ -export const MarkPlayedErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const MarkPlayedErrors$inboundSchema: z.ZodType< + MarkPlayedErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type MarkPlayedErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const MarkPlayedErrors$outboundSchema: z.ZodType< - MarkPlayedErrors$Outbound, - z.ZodTypeDef, - MarkPlayedErrors + MarkPlayedErrors$Outbound, + z.ZodTypeDef, + MarkPlayedErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +226,66 @@ export const MarkPlayedErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkPlayedErrors$ { - /** @deprecated use `MarkPlayedErrors$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedErrors$inboundSchema; - /** @deprecated use `MarkPlayedErrors$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedErrors$outboundSchema; - /** @deprecated use `MarkPlayedErrors$Outbound` instead. */ - export type Outbound = MarkPlayedErrors$Outbound; + /** @deprecated use `MarkPlayedErrors$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedErrors$inboundSchema; + /** @deprecated use `MarkPlayedErrors$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedErrors$outboundSchema; + /** @deprecated use `MarkPlayedErrors$Outbound` instead. */ + export type Outbound = MarkPlayedErrors$Outbound; } /** @internal */ -export const MarkPlayedResponseBody$inboundSchema: z.ZodType< - MarkPlayedResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => MarkPlayedErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new MarkPlayedResponseBody(remapped); +export const MarkPlayedBadRequest$inboundSchema: z.ZodType< + MarkPlayedBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => MarkPlayedErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new MarkPlayedBadRequest(remapped); + }); + /** @internal */ -export type MarkPlayedResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type MarkPlayedBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const MarkPlayedResponseBody$outboundSchema: z.ZodType< - MarkPlayedResponseBody$Outbound, - z.ZodTypeDef, - MarkPlayedResponseBody -> = z - .instanceof(MarkPlayedResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => MarkPlayedErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const MarkPlayedBadRequest$outboundSchema: z.ZodType< + MarkPlayedBadRequest$Outbound, + z.ZodTypeDef, + MarkPlayedBadRequest +> = z.instanceof(MarkPlayedBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => MarkPlayedErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MarkPlayedResponseBody$ { - /** @deprecated use `MarkPlayedResponseBody$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedResponseBody$inboundSchema; - /** @deprecated use `MarkPlayedResponseBody$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedResponseBody$outboundSchema; - /** @deprecated use `MarkPlayedResponseBody$Outbound` instead. */ - export type Outbound = MarkPlayedResponseBody$Outbound; +export namespace MarkPlayedBadRequest$ { + /** @deprecated use `MarkPlayedBadRequest$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedBadRequest$inboundSchema; + /** @deprecated use `MarkPlayedBadRequest$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedBadRequest$outboundSchema; + /** @deprecated use `MarkPlayedBadRequest$Outbound` instead. */ + export type Outbound = MarkPlayedBadRequest$Outbound; } diff --git a/src/sdk/models/errors/markunplayed.ts b/src/sdk/models/errors/markunplayed.ts index 759b7f10..2a5ecbde 100644 --- a/src/sdk/models/errors/markunplayed.ts +++ b/src/sdk/models/errors/markunplayed.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type MarkUnplayedMediaErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type MarkUnplayedMediaResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type MarkUnplayedUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class MarkUnplayedMediaResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class MarkUnplayedUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: MarkUnplayedMediaResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: MarkUnplayedUnauthorizedData; - constructor(err: MarkUnplayedMediaResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: MarkUnplayedUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "MarkUnplayedMediaResponseBody"; - } + this.name = "MarkUnplayedUnauthorized"; + } } export type MarkUnplayedErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type MarkUnplayedResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type MarkUnplayedBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class MarkUnplayedResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class MarkUnplayedBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: MarkUnplayedResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: MarkUnplayedBadRequestData; - constructor(err: MarkUnplayedResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: MarkUnplayedBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "MarkUnplayedResponseBody"; - } + this.name = "MarkUnplayedBadRequest"; + } } /** @internal */ export const MarkUnplayedMediaErrors$inboundSchema: z.ZodType< - MarkUnplayedMediaErrors, - z.ZodTypeDef, - unknown + MarkUnplayedMediaErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type MarkUnplayedMediaErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const MarkUnplayedMediaErrors$outboundSchema: z.ZodType< - MarkUnplayedMediaErrors$Outbound, - z.ZodTypeDef, - MarkUnplayedMediaErrors + MarkUnplayedMediaErrors$Outbound, + z.ZodTypeDef, + MarkUnplayedMediaErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const MarkUnplayedMediaErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkUnplayedMediaErrors$ { - /** @deprecated use `MarkUnplayedMediaErrors$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedMediaErrors$inboundSchema; - /** @deprecated use `MarkUnplayedMediaErrors$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedMediaErrors$outboundSchema; - /** @deprecated use `MarkUnplayedMediaErrors$Outbound` instead. */ - export type Outbound = MarkUnplayedMediaErrors$Outbound; + /** @deprecated use `MarkUnplayedMediaErrors$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedMediaErrors$inboundSchema; + /** @deprecated use `MarkUnplayedMediaErrors$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedMediaErrors$outboundSchema; + /** @deprecated use `MarkUnplayedMediaErrors$Outbound` instead. */ + export type Outbound = MarkUnplayedMediaErrors$Outbound; } /** @internal */ -export const MarkUnplayedMediaResponseBody$inboundSchema: z.ZodType< - MarkUnplayedMediaResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => MarkUnplayedMediaErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new MarkUnplayedMediaResponseBody(remapped); +export const MarkUnplayedUnauthorized$inboundSchema: z.ZodType< + MarkUnplayedUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => MarkUnplayedMediaErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new MarkUnplayedUnauthorized(remapped); + }); + /** @internal */ -export type MarkUnplayedMediaResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type MarkUnplayedUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const MarkUnplayedMediaResponseBody$outboundSchema: z.ZodType< - MarkUnplayedMediaResponseBody$Outbound, - z.ZodTypeDef, - MarkUnplayedMediaResponseBody -> = z - .instanceof(MarkUnplayedMediaResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => MarkUnplayedMediaErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const MarkUnplayedUnauthorized$outboundSchema: z.ZodType< + MarkUnplayedUnauthorized$Outbound, + z.ZodTypeDef, + MarkUnplayedUnauthorized +> = z.instanceof(MarkUnplayedUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => MarkUnplayedMediaErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MarkUnplayedMediaResponseBody$ { - /** @deprecated use `MarkUnplayedMediaResponseBody$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedMediaResponseBody$inboundSchema; - /** @deprecated use `MarkUnplayedMediaResponseBody$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedMediaResponseBody$outboundSchema; - /** @deprecated use `MarkUnplayedMediaResponseBody$Outbound` instead. */ - export type Outbound = MarkUnplayedMediaResponseBody$Outbound; +export namespace MarkUnplayedUnauthorized$ { + /** @deprecated use `MarkUnplayedUnauthorized$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedUnauthorized$inboundSchema; + /** @deprecated use `MarkUnplayedUnauthorized$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedUnauthorized$outboundSchema; + /** @deprecated use `MarkUnplayedUnauthorized$Outbound` instead. */ + export type Outbound = MarkUnplayedUnauthorized$Outbound; } /** @internal */ export const MarkUnplayedErrors$inboundSchema: z.ZodType< - MarkUnplayedErrors, - z.ZodTypeDef, - unknown + MarkUnplayedErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type MarkUnplayedErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const MarkUnplayedErrors$outboundSchema: z.ZodType< - MarkUnplayedErrors$Outbound, - z.ZodTypeDef, - MarkUnplayedErrors + MarkUnplayedErrors$Outbound, + z.ZodTypeDef, + MarkUnplayedErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const MarkUnplayedErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkUnplayedErrors$ { - /** @deprecated use `MarkUnplayedErrors$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedErrors$inboundSchema; - /** @deprecated use `MarkUnplayedErrors$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedErrors$outboundSchema; - /** @deprecated use `MarkUnplayedErrors$Outbound` instead. */ - export type Outbound = MarkUnplayedErrors$Outbound; + /** @deprecated use `MarkUnplayedErrors$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedErrors$inboundSchema; + /** @deprecated use `MarkUnplayedErrors$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedErrors$outboundSchema; + /** @deprecated use `MarkUnplayedErrors$Outbound` instead. */ + export type Outbound = MarkUnplayedErrors$Outbound; } /** @internal */ -export const MarkUnplayedResponseBody$inboundSchema: z.ZodType< - MarkUnplayedResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => MarkUnplayedErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new MarkUnplayedResponseBody(remapped); +export const MarkUnplayedBadRequest$inboundSchema: z.ZodType< + MarkUnplayedBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => MarkUnplayedErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new MarkUnplayedBadRequest(remapped); + }); + /** @internal */ -export type MarkUnplayedResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type MarkUnplayedBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const MarkUnplayedResponseBody$outboundSchema: z.ZodType< - MarkUnplayedResponseBody$Outbound, - z.ZodTypeDef, - MarkUnplayedResponseBody -> = z - .instanceof(MarkUnplayedResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => MarkUnplayedErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const MarkUnplayedBadRequest$outboundSchema: z.ZodType< + MarkUnplayedBadRequest$Outbound, + z.ZodTypeDef, + MarkUnplayedBadRequest +> = z.instanceof(MarkUnplayedBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => MarkUnplayedErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace MarkUnplayedResponseBody$ { - /** @deprecated use `MarkUnplayedResponseBody$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedResponseBody$inboundSchema; - /** @deprecated use `MarkUnplayedResponseBody$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedResponseBody$outboundSchema; - /** @deprecated use `MarkUnplayedResponseBody$Outbound` instead. */ - export type Outbound = MarkUnplayedResponseBody$Outbound; +export namespace MarkUnplayedBadRequest$ { + /** @deprecated use `MarkUnplayedBadRequest$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedBadRequest$inboundSchema; + /** @deprecated use `MarkUnplayedBadRequest$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedBadRequest$outboundSchema; + /** @deprecated use `MarkUnplayedBadRequest$Outbound` instead. */ + export type Outbound = MarkUnplayedBadRequest$Outbound; } diff --git a/src/sdk/models/errors/performsearch.ts b/src/sdk/models/errors/performsearch.ts index 889fa95b..8c39410d 100644 --- a/src/sdk/models/errors/performsearch.ts +++ b/src/sdk/models/errors/performsearch.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PerformSearchSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type PerformSearchSearchResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PerformSearchUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class PerformSearchSearchResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PerformSearchUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PerformSearchSearchResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PerformSearchUnauthorizedData; - constructor(err: PerformSearchSearchResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PerformSearchUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PerformSearchSearchResponseBody"; - } + this.name = "PerformSearchUnauthorized"; + } } export type PerformSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type PerformSearchResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PerformSearchBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class PerformSearchResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PerformSearchBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PerformSearchResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PerformSearchBadRequestData; - constructor(err: PerformSearchResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PerformSearchBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PerformSearchResponseBody"; - } + this.name = "PerformSearchBadRequest"; + } } /** @internal */ export const PerformSearchSearchErrors$inboundSchema: z.ZodType< - PerformSearchSearchErrors, - z.ZodTypeDef, - unknown + PerformSearchSearchErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PerformSearchSearchErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PerformSearchSearchErrors$outboundSchema: z.ZodType< - PerformSearchSearchErrors$Outbound, - z.ZodTypeDef, - PerformSearchSearchErrors + PerformSearchSearchErrors$Outbound, + z.ZodTypeDef, + PerformSearchSearchErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const PerformSearchSearchErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformSearchSearchErrors$ { - /** @deprecated use `PerformSearchSearchErrors$inboundSchema` instead. */ - export const inboundSchema = PerformSearchSearchErrors$inboundSchema; - /** @deprecated use `PerformSearchSearchErrors$outboundSchema` instead. */ - export const outboundSchema = PerformSearchSearchErrors$outboundSchema; - /** @deprecated use `PerformSearchSearchErrors$Outbound` instead. */ - export type Outbound = PerformSearchSearchErrors$Outbound; + /** @deprecated use `PerformSearchSearchErrors$inboundSchema` instead. */ + export const inboundSchema = PerformSearchSearchErrors$inboundSchema; + /** @deprecated use `PerformSearchSearchErrors$outboundSchema` instead. */ + export const outboundSchema = PerformSearchSearchErrors$outboundSchema; + /** @deprecated use `PerformSearchSearchErrors$Outbound` instead. */ + export type Outbound = PerformSearchSearchErrors$Outbound; } /** @internal */ -export const PerformSearchSearchResponseBody$inboundSchema: z.ZodType< - PerformSearchSearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => PerformSearchSearchErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PerformSearchSearchResponseBody(remapped); +export const PerformSearchUnauthorized$inboundSchema: z.ZodType< + PerformSearchUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => PerformSearchSearchErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PerformSearchUnauthorized(remapped); + }); + /** @internal */ -export type PerformSearchSearchResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PerformSearchUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PerformSearchSearchResponseBody$outboundSchema: z.ZodType< - PerformSearchSearchResponseBody$Outbound, - z.ZodTypeDef, - PerformSearchSearchResponseBody -> = z - .instanceof(PerformSearchSearchResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => PerformSearchSearchErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PerformSearchUnauthorized$outboundSchema: z.ZodType< + PerformSearchUnauthorized$Outbound, + z.ZodTypeDef, + PerformSearchUnauthorized +> = z.instanceof(PerformSearchUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => PerformSearchSearchErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PerformSearchSearchResponseBody$ { - /** @deprecated use `PerformSearchSearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformSearchSearchResponseBody$inboundSchema; - /** @deprecated use `PerformSearchSearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformSearchSearchResponseBody$outboundSchema; - /** @deprecated use `PerformSearchSearchResponseBody$Outbound` instead. */ - export type Outbound = PerformSearchSearchResponseBody$Outbound; +export namespace PerformSearchUnauthorized$ { + /** @deprecated use `PerformSearchUnauthorized$inboundSchema` instead. */ + export const inboundSchema = PerformSearchUnauthorized$inboundSchema; + /** @deprecated use `PerformSearchUnauthorized$outboundSchema` instead. */ + export const outboundSchema = PerformSearchUnauthorized$outboundSchema; + /** @deprecated use `PerformSearchUnauthorized$Outbound` instead. */ + export type Outbound = PerformSearchUnauthorized$Outbound; } /** @internal */ export const PerformSearchErrors$inboundSchema: z.ZodType< - PerformSearchErrors, - z.ZodTypeDef, - unknown + PerformSearchErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PerformSearchErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PerformSearchErrors$outboundSchema: z.ZodType< - PerformSearchErrors$Outbound, - z.ZodTypeDef, - PerformSearchErrors + PerformSearchErrors$Outbound, + z.ZodTypeDef, + PerformSearchErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const PerformSearchErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformSearchErrors$ { - /** @deprecated use `PerformSearchErrors$inboundSchema` instead. */ - export const inboundSchema = PerformSearchErrors$inboundSchema; - /** @deprecated use `PerformSearchErrors$outboundSchema` instead. */ - export const outboundSchema = PerformSearchErrors$outboundSchema; - /** @deprecated use `PerformSearchErrors$Outbound` instead. */ - export type Outbound = PerformSearchErrors$Outbound; + /** @deprecated use `PerformSearchErrors$inboundSchema` instead. */ + export const inboundSchema = PerformSearchErrors$inboundSchema; + /** @deprecated use `PerformSearchErrors$outboundSchema` instead. */ + export const outboundSchema = PerformSearchErrors$outboundSchema; + /** @deprecated use `PerformSearchErrors$Outbound` instead. */ + export type Outbound = PerformSearchErrors$Outbound; } /** @internal */ -export const PerformSearchResponseBody$inboundSchema: z.ZodType< - PerformSearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => PerformSearchErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PerformSearchResponseBody(remapped); +export const PerformSearchBadRequest$inboundSchema: z.ZodType< + PerformSearchBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => PerformSearchErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PerformSearchBadRequest(remapped); + }); + /** @internal */ -export type PerformSearchResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PerformSearchBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PerformSearchResponseBody$outboundSchema: z.ZodType< - PerformSearchResponseBody$Outbound, - z.ZodTypeDef, - PerformSearchResponseBody -> = z - .instanceof(PerformSearchResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => PerformSearchErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PerformSearchBadRequest$outboundSchema: z.ZodType< + PerformSearchBadRequest$Outbound, + z.ZodTypeDef, + PerformSearchBadRequest +> = z.instanceof(PerformSearchBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => PerformSearchErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PerformSearchResponseBody$ { - /** @deprecated use `PerformSearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformSearchResponseBody$inboundSchema; - /** @deprecated use `PerformSearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformSearchResponseBody$outboundSchema; - /** @deprecated use `PerformSearchResponseBody$Outbound` instead. */ - export type Outbound = PerformSearchResponseBody$Outbound; +export namespace PerformSearchBadRequest$ { + /** @deprecated use `PerformSearchBadRequest$inboundSchema` instead. */ + export const inboundSchema = PerformSearchBadRequest$inboundSchema; + /** @deprecated use `PerformSearchBadRequest$outboundSchema` instead. */ + export const outboundSchema = PerformSearchBadRequest$outboundSchema; + /** @deprecated use `PerformSearchBadRequest$Outbound` instead. */ + export type Outbound = PerformSearchBadRequest$Outbound; } diff --git a/src/sdk/models/errors/performvoicesearch.ts b/src/sdk/models/errors/performvoicesearch.ts index 9c173077..934190fd 100644 --- a/src/sdk/models/errors/performvoicesearch.ts +++ b/src/sdk/models/errors/performvoicesearch.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PerformVoiceSearchSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type PerformVoiceSearchSearchResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PerformVoiceSearchUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class PerformVoiceSearchSearchResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PerformVoiceSearchUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PerformVoiceSearchSearchResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PerformVoiceSearchUnauthorizedData; - constructor(err: PerformVoiceSearchSearchResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PerformVoiceSearchUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PerformVoiceSearchSearchResponseBody"; - } + this.name = "PerformVoiceSearchUnauthorized"; + } } export type PerformVoiceSearchErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type PerformVoiceSearchResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PerformVoiceSearchBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class PerformVoiceSearchResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PerformVoiceSearchBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PerformVoiceSearchResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PerformVoiceSearchBadRequestData; - constructor(err: PerformVoiceSearchResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PerformVoiceSearchBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PerformVoiceSearchResponseBody"; - } + this.name = "PerformVoiceSearchBadRequest"; + } } /** @internal */ export const PerformVoiceSearchSearchErrors$inboundSchema: z.ZodType< - PerformVoiceSearchSearchErrors, - z.ZodTypeDef, - unknown + PerformVoiceSearchSearchErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PerformVoiceSearchSearchErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PerformVoiceSearchSearchErrors$outboundSchema: z.ZodType< - PerformVoiceSearchSearchErrors$Outbound, - z.ZodTypeDef, - PerformVoiceSearchSearchErrors + PerformVoiceSearchSearchErrors$Outbound, + z.ZodTypeDef, + PerformVoiceSearchSearchErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const PerformVoiceSearchSearchErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformVoiceSearchSearchErrors$ { - /** @deprecated use `PerformVoiceSearchSearchErrors$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchSearchErrors$inboundSchema; - /** @deprecated use `PerformVoiceSearchSearchErrors$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchSearchErrors$outboundSchema; - /** @deprecated use `PerformVoiceSearchSearchErrors$Outbound` instead. */ - export type Outbound = PerformVoiceSearchSearchErrors$Outbound; + /** @deprecated use `PerformVoiceSearchSearchErrors$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchSearchErrors$inboundSchema; + /** @deprecated use `PerformVoiceSearchSearchErrors$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchSearchErrors$outboundSchema; + /** @deprecated use `PerformVoiceSearchSearchErrors$Outbound` instead. */ + export type Outbound = PerformVoiceSearchSearchErrors$Outbound; } /** @internal */ -export const PerformVoiceSearchSearchResponseBody$inboundSchema: z.ZodType< - PerformVoiceSearchSearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => PerformVoiceSearchSearchErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PerformVoiceSearchSearchResponseBody(remapped); +export const PerformVoiceSearchUnauthorized$inboundSchema: z.ZodType< + PerformVoiceSearchUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => PerformVoiceSearchSearchErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PerformVoiceSearchUnauthorized(remapped); + }); + /** @internal */ -export type PerformVoiceSearchSearchResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PerformVoiceSearchUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PerformVoiceSearchSearchResponseBody$outboundSchema: z.ZodType< - PerformVoiceSearchSearchResponseBody$Outbound, - z.ZodTypeDef, - PerformVoiceSearchSearchResponseBody -> = z - .instanceof(PerformVoiceSearchSearchResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => PerformVoiceSearchSearchErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PerformVoiceSearchUnauthorized$outboundSchema: z.ZodType< + PerformVoiceSearchUnauthorized$Outbound, + z.ZodTypeDef, + PerformVoiceSearchUnauthorized +> = z.instanceof(PerformVoiceSearchUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => PerformVoiceSearchSearchErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PerformVoiceSearchSearchResponseBody$ { - /** @deprecated use `PerformVoiceSearchSearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchSearchResponseBody$inboundSchema; - /** @deprecated use `PerformVoiceSearchSearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchSearchResponseBody$outboundSchema; - /** @deprecated use `PerformVoiceSearchSearchResponseBody$Outbound` instead. */ - export type Outbound = PerformVoiceSearchSearchResponseBody$Outbound; +export namespace PerformVoiceSearchUnauthorized$ { + /** @deprecated use `PerformVoiceSearchUnauthorized$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchUnauthorized$inboundSchema; + /** @deprecated use `PerformVoiceSearchUnauthorized$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchUnauthorized$outboundSchema; + /** @deprecated use `PerformVoiceSearchUnauthorized$Outbound` instead. */ + export type Outbound = PerformVoiceSearchUnauthorized$Outbound; } /** @internal */ export const PerformVoiceSearchErrors$inboundSchema: z.ZodType< - PerformVoiceSearchErrors, - z.ZodTypeDef, - unknown + PerformVoiceSearchErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PerformVoiceSearchErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PerformVoiceSearchErrors$outboundSchema: z.ZodType< - PerformVoiceSearchErrors$Outbound, - z.ZodTypeDef, - PerformVoiceSearchErrors + PerformVoiceSearchErrors$Outbound, + z.ZodTypeDef, + PerformVoiceSearchErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const PerformVoiceSearchErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformVoiceSearchErrors$ { - /** @deprecated use `PerformVoiceSearchErrors$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchErrors$inboundSchema; - /** @deprecated use `PerformVoiceSearchErrors$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchErrors$outboundSchema; - /** @deprecated use `PerformVoiceSearchErrors$Outbound` instead. */ - export type Outbound = PerformVoiceSearchErrors$Outbound; + /** @deprecated use `PerformVoiceSearchErrors$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchErrors$inboundSchema; + /** @deprecated use `PerformVoiceSearchErrors$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchErrors$outboundSchema; + /** @deprecated use `PerformVoiceSearchErrors$Outbound` instead. */ + export type Outbound = PerformVoiceSearchErrors$Outbound; } /** @internal */ -export const PerformVoiceSearchResponseBody$inboundSchema: z.ZodType< - PerformVoiceSearchResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => PerformVoiceSearchErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PerformVoiceSearchResponseBody(remapped); +export const PerformVoiceSearchBadRequest$inboundSchema: z.ZodType< + PerformVoiceSearchBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => PerformVoiceSearchErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PerformVoiceSearchBadRequest(remapped); + }); + /** @internal */ -export type PerformVoiceSearchResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PerformVoiceSearchBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PerformVoiceSearchResponseBody$outboundSchema: z.ZodType< - PerformVoiceSearchResponseBody$Outbound, - z.ZodTypeDef, - PerformVoiceSearchResponseBody -> = z - .instanceof(PerformVoiceSearchResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => PerformVoiceSearchErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PerformVoiceSearchBadRequest$outboundSchema: z.ZodType< + PerformVoiceSearchBadRequest$Outbound, + z.ZodTypeDef, + PerformVoiceSearchBadRequest +> = z.instanceof(PerformVoiceSearchBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => PerformVoiceSearchErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PerformVoiceSearchResponseBody$ { - /** @deprecated use `PerformVoiceSearchResponseBody$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchResponseBody$inboundSchema; - /** @deprecated use `PerformVoiceSearchResponseBody$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchResponseBody$outboundSchema; - /** @deprecated use `PerformVoiceSearchResponseBody$Outbound` instead. */ - export type Outbound = PerformVoiceSearchResponseBody$Outbound; +export namespace PerformVoiceSearchBadRequest$ { + /** @deprecated use `PerformVoiceSearchBadRequest$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchBadRequest$inboundSchema; + /** @deprecated use `PerformVoiceSearchBadRequest$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchBadRequest$outboundSchema; + /** @deprecated use `PerformVoiceSearchBadRequest$Outbound` instead. */ + export type Outbound = PerformVoiceSearchBadRequest$Outbound; } diff --git a/src/sdk/models/errors/postuserssignindata.ts b/src/sdk/models/errors/postuserssignindata.ts index 8ea88e11..3df22df6 100644 --- a/src/sdk/models/errors/postuserssignindata.ts +++ b/src/sdk/models/errors/postuserssignindata.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PostUsersSignInDataAuthenticationErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type PostUsersSignInDataAuthenticationResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PostUsersSignInDataUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class PostUsersSignInDataAuthenticationResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PostUsersSignInDataUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PostUsersSignInDataAuthenticationResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PostUsersSignInDataUnauthorizedData; - constructor(err: PostUsersSignInDataAuthenticationResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PostUsersSignInDataUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PostUsersSignInDataAuthenticationResponseBody"; - } + this.name = "PostUsersSignInDataUnauthorized"; + } } export type PostUsersSignInDataErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type PostUsersSignInDataResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type PostUsersSignInDataBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class PostUsersSignInDataResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class PostUsersSignInDataBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: PostUsersSignInDataResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: PostUsersSignInDataBadRequestData; - constructor(err: PostUsersSignInDataResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: PostUsersSignInDataBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "PostUsersSignInDataResponseBody"; - } + this.name = "PostUsersSignInDataBadRequest"; + } } /** @internal */ export const PostUsersSignInDataAuthenticationErrors$inboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationErrors, - z.ZodTypeDef, - unknown + PostUsersSignInDataAuthenticationErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PostUsersSignInDataAuthenticationErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PostUsersSignInDataAuthenticationErrors$outboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationErrors$Outbound, - z.ZodTypeDef, - PostUsersSignInDataAuthenticationErrors + PostUsersSignInDataAuthenticationErrors$Outbound, + z.ZodTypeDef, + PostUsersSignInDataAuthenticationErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,108 +127,103 @@ export const PostUsersSignInDataAuthenticationErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAuthenticationErrors$ { - /** @deprecated use `PostUsersSignInDataAuthenticationErrors$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationErrors$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationErrors$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationErrors$outboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationErrors$Outbound` instead. */ - export type Outbound = PostUsersSignInDataAuthenticationErrors$Outbound; + /** @deprecated use `PostUsersSignInDataAuthenticationErrors$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAuthenticationErrors$inboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationErrors$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAuthenticationErrors$outboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationErrors$Outbound` instead. */ + export type Outbound = PostUsersSignInDataAuthenticationErrors$Outbound; } /** @internal */ -export const PostUsersSignInDataAuthenticationResponseBody$inboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z - .array(z.lazy(() => PostUsersSignInDataAuthenticationErrors$inboundSchema)) - .optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PostUsersSignInDataAuthenticationResponseBody(remapped); +export const PostUsersSignInDataUnauthorized$inboundSchema: z.ZodType< + PostUsersSignInDataUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => PostUsersSignInDataAuthenticationErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PostUsersSignInDataUnauthorized(remapped); + }); + /** @internal */ -export type PostUsersSignInDataAuthenticationResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PostUsersSignInDataUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PostUsersSignInDataAuthenticationResponseBody$outboundSchema: z.ZodType< - PostUsersSignInDataAuthenticationResponseBody$Outbound, - z.ZodTypeDef, - PostUsersSignInDataAuthenticationResponseBody -> = z - .instanceof(PostUsersSignInDataAuthenticationResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => PostUsersSignInDataAuthenticationErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PostUsersSignInDataUnauthorized$outboundSchema: z.ZodType< + PostUsersSignInDataUnauthorized$Outbound, + z.ZodTypeDef, + PostUsersSignInDataUnauthorized +> = z.instanceof(PostUsersSignInDataUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => PostUsersSignInDataAuthenticationErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PostUsersSignInDataAuthenticationResponseBody$ { - /** @deprecated use `PostUsersSignInDataAuthenticationResponseBody$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationResponseBody$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationResponseBody$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationResponseBody$outboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationResponseBody$Outbound` instead. */ - export type Outbound = PostUsersSignInDataAuthenticationResponseBody$Outbound; +export namespace PostUsersSignInDataUnauthorized$ { + /** @deprecated use `PostUsersSignInDataUnauthorized$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataUnauthorized$inboundSchema; + /** @deprecated use `PostUsersSignInDataUnauthorized$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataUnauthorized$outboundSchema; + /** @deprecated use `PostUsersSignInDataUnauthorized$Outbound` instead. */ + export type Outbound = PostUsersSignInDataUnauthorized$Outbound; } /** @internal */ export const PostUsersSignInDataErrors$inboundSchema: z.ZodType< - PostUsersSignInDataErrors, - z.ZodTypeDef, - unknown + PostUsersSignInDataErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type PostUsersSignInDataErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const PostUsersSignInDataErrors$outboundSchema: z.ZodType< - PostUsersSignInDataErrors$Outbound, - z.ZodTypeDef, - PostUsersSignInDataErrors + PostUsersSignInDataErrors$Outbound, + z.ZodTypeDef, + PostUsersSignInDataErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -246,73 +231,68 @@ export const PostUsersSignInDataErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataErrors$ { - /** @deprecated use `PostUsersSignInDataErrors$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataErrors$inboundSchema; - /** @deprecated use `PostUsersSignInDataErrors$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataErrors$outboundSchema; - /** @deprecated use `PostUsersSignInDataErrors$Outbound` instead. */ - export type Outbound = PostUsersSignInDataErrors$Outbound; + /** @deprecated use `PostUsersSignInDataErrors$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataErrors$inboundSchema; + /** @deprecated use `PostUsersSignInDataErrors$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataErrors$outboundSchema; + /** @deprecated use `PostUsersSignInDataErrors$Outbound` instead. */ + export type Outbound = PostUsersSignInDataErrors$Outbound; } /** @internal */ -export const PostUsersSignInDataResponseBody$inboundSchema: z.ZodType< - PostUsersSignInDataResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => PostUsersSignInDataErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new PostUsersSignInDataResponseBody(remapped); +export const PostUsersSignInDataBadRequest$inboundSchema: z.ZodType< + PostUsersSignInDataBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => PostUsersSignInDataErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new PostUsersSignInDataBadRequest(remapped); + }); + /** @internal */ -export type PostUsersSignInDataResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type PostUsersSignInDataBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const PostUsersSignInDataResponseBody$outboundSchema: z.ZodType< - PostUsersSignInDataResponseBody$Outbound, - z.ZodTypeDef, - PostUsersSignInDataResponseBody -> = z - .instanceof(PostUsersSignInDataResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => PostUsersSignInDataErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const PostUsersSignInDataBadRequest$outboundSchema: z.ZodType< + PostUsersSignInDataBadRequest$Outbound, + z.ZodTypeDef, + PostUsersSignInDataBadRequest +> = z.instanceof(PostUsersSignInDataBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => PostUsersSignInDataErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace PostUsersSignInDataResponseBody$ { - /** @deprecated use `PostUsersSignInDataResponseBody$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataResponseBody$inboundSchema; - /** @deprecated use `PostUsersSignInDataResponseBody$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataResponseBody$outboundSchema; - /** @deprecated use `PostUsersSignInDataResponseBody$Outbound` instead. */ - export type Outbound = PostUsersSignInDataResponseBody$Outbound; +export namespace PostUsersSignInDataBadRequest$ { + /** @deprecated use `PostUsersSignInDataBadRequest$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataBadRequest$inboundSchema; + /** @deprecated use `PostUsersSignInDataBadRequest$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataBadRequest$outboundSchema; + /** @deprecated use `PostUsersSignInDataBadRequest$Outbound` instead. */ + export type Outbound = PostUsersSignInDataBadRequest$Outbound; } diff --git a/src/sdk/models/errors/sdkerror.ts b/src/sdk/models/errors/sdkerror.ts index 80e3aa42..001f4659 100644 --- a/src/sdk/models/errors/sdkerror.ts +++ b/src/sdk/models/errors/sdkerror.ts @@ -3,23 +3,25 @@ */ export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; + public readonly statusCode: number; + public readonly contentType: string; - constructor( - message: string, - public readonly rawResponse: Response, - public readonly body: string = "" - ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; + constructor( + message: string, + public readonly rawResponse: Response, + public readonly body: string = "", + ) { + const statusCode = rawResponse.status; + const contentType = rawResponse.headers.get("content-type") || ""; + const bodyString = body.length > 0 ? `\n${body}` : ""; - super(`${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`); + super( + `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, + ); - this.statusCode = statusCode; - this.contentType = contentType; + this.statusCode = statusCode; + this.contentType = contentType; - this.name = "SDKError"; - } + this.name = "SDKError"; + } } diff --git a/src/sdk/models/errors/startalltasks.ts b/src/sdk/models/errors/startalltasks.ts index dbea477f..e734bbd7 100644 --- a/src/sdk/models/errors/startalltasks.ts +++ b/src/sdk/models/errors/startalltasks.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StartAllTasksButlerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StartAllTasksButlerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartAllTasksUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StartAllTasksButlerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartAllTasksUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartAllTasksButlerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartAllTasksUnauthorizedData; - constructor(err: StartAllTasksButlerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartAllTasksUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartAllTasksButlerResponseBody"; - } + this.name = "StartAllTasksUnauthorized"; + } } export type StartAllTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StartAllTasksResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartAllTasksBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StartAllTasksResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartAllTasksBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartAllTasksResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartAllTasksBadRequestData; - constructor(err: StartAllTasksResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartAllTasksBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartAllTasksResponseBody"; - } + this.name = "StartAllTasksBadRequest"; + } } /** @internal */ export const StartAllTasksButlerErrors$inboundSchema: z.ZodType< - StartAllTasksButlerErrors, - z.ZodTypeDef, - unknown + StartAllTasksButlerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StartAllTasksButlerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartAllTasksButlerErrors$outboundSchema: z.ZodType< - StartAllTasksButlerErrors$Outbound, - z.ZodTypeDef, - StartAllTasksButlerErrors + StartAllTasksButlerErrors$Outbound, + z.ZodTypeDef, + StartAllTasksButlerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const StartAllTasksButlerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartAllTasksButlerErrors$ { - /** @deprecated use `StartAllTasksButlerErrors$inboundSchema` instead. */ - export const inboundSchema = StartAllTasksButlerErrors$inboundSchema; - /** @deprecated use `StartAllTasksButlerErrors$outboundSchema` instead. */ - export const outboundSchema = StartAllTasksButlerErrors$outboundSchema; - /** @deprecated use `StartAllTasksButlerErrors$Outbound` instead. */ - export type Outbound = StartAllTasksButlerErrors$Outbound; + /** @deprecated use `StartAllTasksButlerErrors$inboundSchema` instead. */ + export const inboundSchema = StartAllTasksButlerErrors$inboundSchema; + /** @deprecated use `StartAllTasksButlerErrors$outboundSchema` instead. */ + export const outboundSchema = StartAllTasksButlerErrors$outboundSchema; + /** @deprecated use `StartAllTasksButlerErrors$Outbound` instead. */ + export type Outbound = StartAllTasksButlerErrors$Outbound; } /** @internal */ -export const StartAllTasksButlerResponseBody$inboundSchema: z.ZodType< - StartAllTasksButlerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartAllTasksButlerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartAllTasksButlerResponseBody(remapped); +export const StartAllTasksUnauthorized$inboundSchema: z.ZodType< + StartAllTasksUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StartAllTasksButlerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartAllTasksUnauthorized(remapped); + }); + /** @internal */ -export type StartAllTasksButlerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartAllTasksUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartAllTasksButlerResponseBody$outboundSchema: z.ZodType< - StartAllTasksButlerResponseBody$Outbound, - z.ZodTypeDef, - StartAllTasksButlerResponseBody -> = z - .instanceof(StartAllTasksButlerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StartAllTasksButlerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartAllTasksUnauthorized$outboundSchema: z.ZodType< + StartAllTasksUnauthorized$Outbound, + z.ZodTypeDef, + StartAllTasksUnauthorized +> = z.instanceof(StartAllTasksUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StartAllTasksButlerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartAllTasksButlerResponseBody$ { - /** @deprecated use `StartAllTasksButlerResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartAllTasksButlerResponseBody$inboundSchema; - /** @deprecated use `StartAllTasksButlerResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartAllTasksButlerResponseBody$outboundSchema; - /** @deprecated use `StartAllTasksButlerResponseBody$Outbound` instead. */ - export type Outbound = StartAllTasksButlerResponseBody$Outbound; +export namespace StartAllTasksUnauthorized$ { + /** @deprecated use `StartAllTasksUnauthorized$inboundSchema` instead. */ + export const inboundSchema = StartAllTasksUnauthorized$inboundSchema; + /** @deprecated use `StartAllTasksUnauthorized$outboundSchema` instead. */ + export const outboundSchema = StartAllTasksUnauthorized$outboundSchema; + /** @deprecated use `StartAllTasksUnauthorized$Outbound` instead. */ + export type Outbound = StartAllTasksUnauthorized$Outbound; } /** @internal */ export const StartAllTasksErrors$inboundSchema: z.ZodType< - StartAllTasksErrors, - z.ZodTypeDef, - unknown + StartAllTasksErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StartAllTasksErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartAllTasksErrors$outboundSchema: z.ZodType< - StartAllTasksErrors$Outbound, - z.ZodTypeDef, - StartAllTasksErrors + StartAllTasksErrors$Outbound, + z.ZodTypeDef, + StartAllTasksErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const StartAllTasksErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartAllTasksErrors$ { - /** @deprecated use `StartAllTasksErrors$inboundSchema` instead. */ - export const inboundSchema = StartAllTasksErrors$inboundSchema; - /** @deprecated use `StartAllTasksErrors$outboundSchema` instead. */ - export const outboundSchema = StartAllTasksErrors$outboundSchema; - /** @deprecated use `StartAllTasksErrors$Outbound` instead. */ - export type Outbound = StartAllTasksErrors$Outbound; + /** @deprecated use `StartAllTasksErrors$inboundSchema` instead. */ + export const inboundSchema = StartAllTasksErrors$inboundSchema; + /** @deprecated use `StartAllTasksErrors$outboundSchema` instead. */ + export const outboundSchema = StartAllTasksErrors$outboundSchema; + /** @deprecated use `StartAllTasksErrors$Outbound` instead. */ + export type Outbound = StartAllTasksErrors$Outbound; } /** @internal */ -export const StartAllTasksResponseBody$inboundSchema: z.ZodType< - StartAllTasksResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartAllTasksErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartAllTasksResponseBody(remapped); +export const StartAllTasksBadRequest$inboundSchema: z.ZodType< + StartAllTasksBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StartAllTasksErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartAllTasksBadRequest(remapped); + }); + /** @internal */ -export type StartAllTasksResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartAllTasksBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartAllTasksResponseBody$outboundSchema: z.ZodType< - StartAllTasksResponseBody$Outbound, - z.ZodTypeDef, - StartAllTasksResponseBody -> = z - .instanceof(StartAllTasksResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StartAllTasksErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartAllTasksBadRequest$outboundSchema: z.ZodType< + StartAllTasksBadRequest$Outbound, + z.ZodTypeDef, + StartAllTasksBadRequest +> = z.instanceof(StartAllTasksBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StartAllTasksErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartAllTasksResponseBody$ { - /** @deprecated use `StartAllTasksResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartAllTasksResponseBody$inboundSchema; - /** @deprecated use `StartAllTasksResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartAllTasksResponseBody$outboundSchema; - /** @deprecated use `StartAllTasksResponseBody$Outbound` instead. */ - export type Outbound = StartAllTasksResponseBody$Outbound; +export namespace StartAllTasksBadRequest$ { + /** @deprecated use `StartAllTasksBadRequest$inboundSchema` instead. */ + export const inboundSchema = StartAllTasksBadRequest$inboundSchema; + /** @deprecated use `StartAllTasksBadRequest$outboundSchema` instead. */ + export const outboundSchema = StartAllTasksBadRequest$outboundSchema; + /** @deprecated use `StartAllTasksBadRequest$Outbound` instead. */ + export type Outbound = StartAllTasksBadRequest$Outbound; } diff --git a/src/sdk/models/errors/starttask.ts b/src/sdk/models/errors/starttask.ts index faaad4cd..9dce80c8 100644 --- a/src/sdk/models/errors/starttask.ts +++ b/src/sdk/models/errors/starttask.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StartTaskButlerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StartTaskButlerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartTaskUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StartTaskButlerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartTaskUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartTaskButlerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartTaskUnauthorizedData; - constructor(err: StartTaskButlerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartTaskUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartTaskButlerResponseBody"; - } + this.name = "StartTaskUnauthorized"; + } } export type StartTaskErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StartTaskResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartTaskBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StartTaskResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartTaskBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartTaskResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartTaskBadRequestData; - constructor(err: StartTaskResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartTaskBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartTaskResponseBody"; - } + this.name = "StartTaskBadRequest"; + } } /** @internal */ export const StartTaskButlerErrors$inboundSchema: z.ZodType< - StartTaskButlerErrors, - z.ZodTypeDef, - unknown + StartTaskButlerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StartTaskButlerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartTaskButlerErrors$outboundSchema: z.ZodType< - StartTaskButlerErrors$Outbound, - z.ZodTypeDef, - StartTaskButlerErrors + StartTaskButlerErrors$Outbound, + z.ZodTypeDef, + StartTaskButlerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,98 @@ export const StartTaskButlerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartTaskButlerErrors$ { - /** @deprecated use `StartTaskButlerErrors$inboundSchema` instead. */ - export const inboundSchema = StartTaskButlerErrors$inboundSchema; - /** @deprecated use `StartTaskButlerErrors$outboundSchema` instead. */ - export const outboundSchema = StartTaskButlerErrors$outboundSchema; - /** @deprecated use `StartTaskButlerErrors$Outbound` instead. */ - export type Outbound = StartTaskButlerErrors$Outbound; + /** @deprecated use `StartTaskButlerErrors$inboundSchema` instead. */ + export const inboundSchema = StartTaskButlerErrors$inboundSchema; + /** @deprecated use `StartTaskButlerErrors$outboundSchema` instead. */ + export const outboundSchema = StartTaskButlerErrors$outboundSchema; + /** @deprecated use `StartTaskButlerErrors$Outbound` instead. */ + export type Outbound = StartTaskButlerErrors$Outbound; } /** @internal */ -export const StartTaskButlerResponseBody$inboundSchema: z.ZodType< - StartTaskButlerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartTaskButlerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartTaskButlerResponseBody(remapped); +export const StartTaskUnauthorized$inboundSchema: z.ZodType< + StartTaskUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StartTaskButlerErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartTaskUnauthorized(remapped); + }); + /** @internal */ -export type StartTaskButlerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartTaskUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartTaskButlerResponseBody$outboundSchema: z.ZodType< - StartTaskButlerResponseBody$Outbound, - z.ZodTypeDef, - StartTaskButlerResponseBody -> = z - .instanceof(StartTaskButlerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StartTaskButlerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartTaskUnauthorized$outboundSchema: z.ZodType< + StartTaskUnauthorized$Outbound, + z.ZodTypeDef, + StartTaskUnauthorized +> = z.instanceof(StartTaskUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StartTaskButlerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartTaskButlerResponseBody$ { - /** @deprecated use `StartTaskButlerResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartTaskButlerResponseBody$inboundSchema; - /** @deprecated use `StartTaskButlerResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartTaskButlerResponseBody$outboundSchema; - /** @deprecated use `StartTaskButlerResponseBody$Outbound` instead. */ - export type Outbound = StartTaskButlerResponseBody$Outbound; +export namespace StartTaskUnauthorized$ { + /** @deprecated use `StartTaskUnauthorized$inboundSchema` instead. */ + export const inboundSchema = StartTaskUnauthorized$inboundSchema; + /** @deprecated use `StartTaskUnauthorized$outboundSchema` instead. */ + export const outboundSchema = StartTaskUnauthorized$outboundSchema; + /** @deprecated use `StartTaskUnauthorized$Outbound` instead. */ + export type Outbound = StartTaskUnauthorized$Outbound; } /** @internal */ -export const StartTaskErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const StartTaskErrors$inboundSchema: z.ZodType< + StartTaskErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type StartTaskErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartTaskErrors$outboundSchema: z.ZodType< - StartTaskErrors$Outbound, - z.ZodTypeDef, - StartTaskErrors + StartTaskErrors$Outbound, + z.ZodTypeDef, + StartTaskErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +226,66 @@ export const StartTaskErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartTaskErrors$ { - /** @deprecated use `StartTaskErrors$inboundSchema` instead. */ - export const inboundSchema = StartTaskErrors$inboundSchema; - /** @deprecated use `StartTaskErrors$outboundSchema` instead. */ - export const outboundSchema = StartTaskErrors$outboundSchema; - /** @deprecated use `StartTaskErrors$Outbound` instead. */ - export type Outbound = StartTaskErrors$Outbound; + /** @deprecated use `StartTaskErrors$inboundSchema` instead. */ + export const inboundSchema = StartTaskErrors$inboundSchema; + /** @deprecated use `StartTaskErrors$outboundSchema` instead. */ + export const outboundSchema = StartTaskErrors$outboundSchema; + /** @deprecated use `StartTaskErrors$Outbound` instead. */ + export type Outbound = StartTaskErrors$Outbound; } /** @internal */ -export const StartTaskResponseBody$inboundSchema: z.ZodType< - StartTaskResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartTaskErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartTaskResponseBody(remapped); +export const StartTaskBadRequest$inboundSchema: z.ZodType< + StartTaskBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StartTaskErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartTaskBadRequest(remapped); + }); + /** @internal */ -export type StartTaskResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartTaskBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartTaskResponseBody$outboundSchema: z.ZodType< - StartTaskResponseBody$Outbound, - z.ZodTypeDef, - StartTaskResponseBody -> = z - .instanceof(StartTaskResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StartTaskErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartTaskBadRequest$outboundSchema: z.ZodType< + StartTaskBadRequest$Outbound, + z.ZodTypeDef, + StartTaskBadRequest +> = z.instanceof(StartTaskBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StartTaskErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartTaskResponseBody$ { - /** @deprecated use `StartTaskResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartTaskResponseBody$inboundSchema; - /** @deprecated use `StartTaskResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartTaskResponseBody$outboundSchema; - /** @deprecated use `StartTaskResponseBody$Outbound` instead. */ - export type Outbound = StartTaskResponseBody$Outbound; +export namespace StartTaskBadRequest$ { + /** @deprecated use `StartTaskBadRequest$inboundSchema` instead. */ + export const inboundSchema = StartTaskBadRequest$inboundSchema; + /** @deprecated use `StartTaskBadRequest$outboundSchema` instead. */ + export const outboundSchema = StartTaskBadRequest$outboundSchema; + /** @deprecated use `StartTaskBadRequest$Outbound` instead. */ + export type Outbound = StartTaskBadRequest$Outbound; } diff --git a/src/sdk/models/errors/startuniversaltranscode.ts b/src/sdk/models/errors/startuniversaltranscode.ts index e8f9ecb6..0df24ff2 100644 --- a/src/sdk/models/errors/startuniversaltranscode.ts +++ b/src/sdk/models/errors/startuniversaltranscode.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StartUniversalTranscodeVideoErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StartUniversalTranscodeVideoResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartUniversalTranscodeUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StartUniversalTranscodeVideoResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartUniversalTranscodeUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartUniversalTranscodeVideoResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartUniversalTranscodeUnauthorizedData; - constructor(err: StartUniversalTranscodeVideoResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartUniversalTranscodeUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartUniversalTranscodeVideoResponseBody"; - } + this.name = "StartUniversalTranscodeUnauthorized"; + } } export type StartUniversalTranscodeErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StartUniversalTranscodeResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StartUniversalTranscodeBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StartUniversalTranscodeResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StartUniversalTranscodeBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StartUniversalTranscodeResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StartUniversalTranscodeBadRequestData; - constructor(err: StartUniversalTranscodeResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StartUniversalTranscodeBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StartUniversalTranscodeResponseBody"; - } + this.name = "StartUniversalTranscodeBadRequest"; + } } /** @internal */ export const StartUniversalTranscodeVideoErrors$inboundSchema: z.ZodType< - StartUniversalTranscodeVideoErrors, - z.ZodTypeDef, - unknown + StartUniversalTranscodeVideoErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StartUniversalTranscodeVideoErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartUniversalTranscodeVideoErrors$outboundSchema: z.ZodType< - StartUniversalTranscodeVideoErrors$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeVideoErrors + StartUniversalTranscodeVideoErrors$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeVideoErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,104 @@ export const StartUniversalTranscodeVideoErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartUniversalTranscodeVideoErrors$ { - /** @deprecated use `StartUniversalTranscodeVideoErrors$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeVideoErrors$inboundSchema; - /** @deprecated use `StartUniversalTranscodeVideoErrors$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeVideoErrors$outboundSchema; - /** @deprecated use `StartUniversalTranscodeVideoErrors$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeVideoErrors$Outbound; + /** @deprecated use `StartUniversalTranscodeVideoErrors$inboundSchema` instead. */ + export const inboundSchema = StartUniversalTranscodeVideoErrors$inboundSchema; + /** @deprecated use `StartUniversalTranscodeVideoErrors$outboundSchema` instead. */ + export const outboundSchema = + StartUniversalTranscodeVideoErrors$outboundSchema; + /** @deprecated use `StartUniversalTranscodeVideoErrors$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeVideoErrors$Outbound; } /** @internal */ -export const StartUniversalTranscodeVideoResponseBody$inboundSchema: z.ZodType< - StartUniversalTranscodeVideoResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartUniversalTranscodeVideoErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartUniversalTranscodeVideoResponseBody(remapped); +export const StartUniversalTranscodeUnauthorized$inboundSchema: z.ZodType< + StartUniversalTranscodeUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => StartUniversalTranscodeVideoErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartUniversalTranscodeUnauthorized(remapped); + }); + /** @internal */ -export type StartUniversalTranscodeVideoResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartUniversalTranscodeUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartUniversalTranscodeVideoResponseBody$outboundSchema: z.ZodType< - StartUniversalTranscodeVideoResponseBody$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeVideoResponseBody -> = z - .instanceof(StartUniversalTranscodeVideoResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => StartUniversalTranscodeVideoErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartUniversalTranscodeUnauthorized$outboundSchema: z.ZodType< + StartUniversalTranscodeUnauthorized$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeUnauthorized +> = z.instanceof(StartUniversalTranscodeUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => StartUniversalTranscodeVideoErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartUniversalTranscodeVideoResponseBody$ { - /** @deprecated use `StartUniversalTranscodeVideoResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeVideoResponseBody$inboundSchema; - /** @deprecated use `StartUniversalTranscodeVideoResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeVideoResponseBody$outboundSchema; - /** @deprecated use `StartUniversalTranscodeVideoResponseBody$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeVideoResponseBody$Outbound; +export namespace StartUniversalTranscodeUnauthorized$ { + /** @deprecated use `StartUniversalTranscodeUnauthorized$inboundSchema` instead. */ + export const inboundSchema = + StartUniversalTranscodeUnauthorized$inboundSchema; + /** @deprecated use `StartUniversalTranscodeUnauthorized$outboundSchema` instead. */ + export const outboundSchema = + StartUniversalTranscodeUnauthorized$outboundSchema; + /** @deprecated use `StartUniversalTranscodeUnauthorized$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeUnauthorized$Outbound; } /** @internal */ export const StartUniversalTranscodeErrors$inboundSchema: z.ZodType< - StartUniversalTranscodeErrors, - z.ZodTypeDef, - unknown + StartUniversalTranscodeErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StartUniversalTranscodeErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StartUniversalTranscodeErrors$outboundSchema: z.ZodType< - StartUniversalTranscodeErrors$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeErrors + StartUniversalTranscodeErrors$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,75 +232,70 @@ export const StartUniversalTranscodeErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartUniversalTranscodeErrors$ { - /** @deprecated use `StartUniversalTranscodeErrors$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeErrors$inboundSchema; - /** @deprecated use `StartUniversalTranscodeErrors$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeErrors$outboundSchema; - /** @deprecated use `StartUniversalTranscodeErrors$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeErrors$Outbound; + /** @deprecated use `StartUniversalTranscodeErrors$inboundSchema` instead. */ + export const inboundSchema = StartUniversalTranscodeErrors$inboundSchema; + /** @deprecated use `StartUniversalTranscodeErrors$outboundSchema` instead. */ + export const outboundSchema = StartUniversalTranscodeErrors$outboundSchema; + /** @deprecated use `StartUniversalTranscodeErrors$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeErrors$Outbound; } /** @internal */ -export const StartUniversalTranscodeResponseBody$inboundSchema: z.ZodType< - StartUniversalTranscodeResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StartUniversalTranscodeErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StartUniversalTranscodeResponseBody(remapped); +export const StartUniversalTranscodeBadRequest$inboundSchema: z.ZodType< + StartUniversalTranscodeBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StartUniversalTranscodeErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StartUniversalTranscodeBadRequest(remapped); + }); + /** @internal */ -export type StartUniversalTranscodeResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StartUniversalTranscodeBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StartUniversalTranscodeResponseBody$outboundSchema: z.ZodType< - StartUniversalTranscodeResponseBody$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeResponseBody -> = z - .instanceof(StartUniversalTranscodeResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => StartUniversalTranscodeErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StartUniversalTranscodeBadRequest$outboundSchema: z.ZodType< + StartUniversalTranscodeBadRequest$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeBadRequest +> = z.instanceof(StartUniversalTranscodeBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => StartUniversalTranscodeErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StartUniversalTranscodeResponseBody$ { - /** @deprecated use `StartUniversalTranscodeResponseBody$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeResponseBody$inboundSchema; - /** @deprecated use `StartUniversalTranscodeResponseBody$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeResponseBody$outboundSchema; - /** @deprecated use `StartUniversalTranscodeResponseBody$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeResponseBody$Outbound; +export namespace StartUniversalTranscodeBadRequest$ { + /** @deprecated use `StartUniversalTranscodeBadRequest$inboundSchema` instead. */ + export const inboundSchema = StartUniversalTranscodeBadRequest$inboundSchema; + /** @deprecated use `StartUniversalTranscodeBadRequest$outboundSchema` instead. */ + export const outboundSchema = + StartUniversalTranscodeBadRequest$outboundSchema; + /** @deprecated use `StartUniversalTranscodeBadRequest$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeBadRequest$Outbound; } diff --git a/src/sdk/models/errors/stopalltasks.ts b/src/sdk/models/errors/stopalltasks.ts index 6d0dbbba..90ce9246 100644 --- a/src/sdk/models/errors/stopalltasks.ts +++ b/src/sdk/models/errors/stopalltasks.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StopAllTasksButlerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StopAllTasksButlerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopAllTasksUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StopAllTasksButlerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopAllTasksUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopAllTasksButlerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopAllTasksUnauthorizedData; - constructor(err: StopAllTasksButlerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopAllTasksUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopAllTasksButlerResponseBody"; - } + this.name = "StopAllTasksUnauthorized"; + } } export type StopAllTasksErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StopAllTasksResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopAllTasksBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StopAllTasksResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopAllTasksBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopAllTasksResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopAllTasksBadRequestData; - constructor(err: StopAllTasksResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopAllTasksBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopAllTasksResponseBody"; - } + this.name = "StopAllTasksBadRequest"; + } } /** @internal */ export const StopAllTasksButlerErrors$inboundSchema: z.ZodType< - StopAllTasksButlerErrors, - z.ZodTypeDef, - unknown + StopAllTasksButlerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StopAllTasksButlerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopAllTasksButlerErrors$outboundSchema: z.ZodType< - StopAllTasksButlerErrors$Outbound, - z.ZodTypeDef, - StopAllTasksButlerErrors + StopAllTasksButlerErrors$Outbound, + z.ZodTypeDef, + StopAllTasksButlerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,104 +127,99 @@ export const StopAllTasksButlerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopAllTasksButlerErrors$ { - /** @deprecated use `StopAllTasksButlerErrors$inboundSchema` instead. */ - export const inboundSchema = StopAllTasksButlerErrors$inboundSchema; - /** @deprecated use `StopAllTasksButlerErrors$outboundSchema` instead. */ - export const outboundSchema = StopAllTasksButlerErrors$outboundSchema; - /** @deprecated use `StopAllTasksButlerErrors$Outbound` instead. */ - export type Outbound = StopAllTasksButlerErrors$Outbound; + /** @deprecated use `StopAllTasksButlerErrors$inboundSchema` instead. */ + export const inboundSchema = StopAllTasksButlerErrors$inboundSchema; + /** @deprecated use `StopAllTasksButlerErrors$outboundSchema` instead. */ + export const outboundSchema = StopAllTasksButlerErrors$outboundSchema; + /** @deprecated use `StopAllTasksButlerErrors$Outbound` instead. */ + export type Outbound = StopAllTasksButlerErrors$Outbound; } /** @internal */ -export const StopAllTasksButlerResponseBody$inboundSchema: z.ZodType< - StopAllTasksButlerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopAllTasksButlerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopAllTasksButlerResponseBody(remapped); +export const StopAllTasksUnauthorized$inboundSchema: z.ZodType< + StopAllTasksUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StopAllTasksButlerErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopAllTasksUnauthorized(remapped); + }); + /** @internal */ -export type StopAllTasksButlerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopAllTasksUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopAllTasksButlerResponseBody$outboundSchema: z.ZodType< - StopAllTasksButlerResponseBody$Outbound, - z.ZodTypeDef, - StopAllTasksButlerResponseBody -> = z - .instanceof(StopAllTasksButlerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StopAllTasksButlerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopAllTasksUnauthorized$outboundSchema: z.ZodType< + StopAllTasksUnauthorized$Outbound, + z.ZodTypeDef, + StopAllTasksUnauthorized +> = z.instanceof(StopAllTasksUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StopAllTasksButlerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopAllTasksButlerResponseBody$ { - /** @deprecated use `StopAllTasksButlerResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopAllTasksButlerResponseBody$inboundSchema; - /** @deprecated use `StopAllTasksButlerResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopAllTasksButlerResponseBody$outboundSchema; - /** @deprecated use `StopAllTasksButlerResponseBody$Outbound` instead. */ - export type Outbound = StopAllTasksButlerResponseBody$Outbound; +export namespace StopAllTasksUnauthorized$ { + /** @deprecated use `StopAllTasksUnauthorized$inboundSchema` instead. */ + export const inboundSchema = StopAllTasksUnauthorized$inboundSchema; + /** @deprecated use `StopAllTasksUnauthorized$outboundSchema` instead. */ + export const outboundSchema = StopAllTasksUnauthorized$outboundSchema; + /** @deprecated use `StopAllTasksUnauthorized$Outbound` instead. */ + export type Outbound = StopAllTasksUnauthorized$Outbound; } /** @internal */ export const StopAllTasksErrors$inboundSchema: z.ZodType< - StopAllTasksErrors, - z.ZodTypeDef, - unknown + StopAllTasksErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StopAllTasksErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopAllTasksErrors$outboundSchema: z.ZodType< - StopAllTasksErrors$Outbound, - z.ZodTypeDef, - StopAllTasksErrors + StopAllTasksErrors$Outbound, + z.ZodTypeDef, + StopAllTasksErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -242,73 +227,67 @@ export const StopAllTasksErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopAllTasksErrors$ { - /** @deprecated use `StopAllTasksErrors$inboundSchema` instead. */ - export const inboundSchema = StopAllTasksErrors$inboundSchema; - /** @deprecated use `StopAllTasksErrors$outboundSchema` instead. */ - export const outboundSchema = StopAllTasksErrors$outboundSchema; - /** @deprecated use `StopAllTasksErrors$Outbound` instead. */ - export type Outbound = StopAllTasksErrors$Outbound; + /** @deprecated use `StopAllTasksErrors$inboundSchema` instead. */ + export const inboundSchema = StopAllTasksErrors$inboundSchema; + /** @deprecated use `StopAllTasksErrors$outboundSchema` instead. */ + export const outboundSchema = StopAllTasksErrors$outboundSchema; + /** @deprecated use `StopAllTasksErrors$Outbound` instead. */ + export type Outbound = StopAllTasksErrors$Outbound; } /** @internal */ -export const StopAllTasksResponseBody$inboundSchema: z.ZodType< - StopAllTasksResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopAllTasksErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopAllTasksResponseBody(remapped); +export const StopAllTasksBadRequest$inboundSchema: z.ZodType< + StopAllTasksBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StopAllTasksErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopAllTasksBadRequest(remapped); + }); + /** @internal */ -export type StopAllTasksResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopAllTasksBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopAllTasksResponseBody$outboundSchema: z.ZodType< - StopAllTasksResponseBody$Outbound, - z.ZodTypeDef, - StopAllTasksResponseBody -> = z - .instanceof(StopAllTasksResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StopAllTasksErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopAllTasksBadRequest$outboundSchema: z.ZodType< + StopAllTasksBadRequest$Outbound, + z.ZodTypeDef, + StopAllTasksBadRequest +> = z.instanceof(StopAllTasksBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StopAllTasksErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopAllTasksResponseBody$ { - /** @deprecated use `StopAllTasksResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopAllTasksResponseBody$inboundSchema; - /** @deprecated use `StopAllTasksResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopAllTasksResponseBody$outboundSchema; - /** @deprecated use `StopAllTasksResponseBody$Outbound` instead. */ - export type Outbound = StopAllTasksResponseBody$Outbound; +export namespace StopAllTasksBadRequest$ { + /** @deprecated use `StopAllTasksBadRequest$inboundSchema` instead. */ + export const inboundSchema = StopAllTasksBadRequest$inboundSchema; + /** @deprecated use `StopAllTasksBadRequest$outboundSchema` instead. */ + export const outboundSchema = StopAllTasksBadRequest$outboundSchema; + /** @deprecated use `StopAllTasksBadRequest$Outbound` instead. */ + export type Outbound = StopAllTasksBadRequest$Outbound; } diff --git a/src/sdk/models/errors/stoptask.ts b/src/sdk/models/errors/stoptask.ts index 9a3c4713..d2933c13 100644 --- a/src/sdk/models/errors/stoptask.ts +++ b/src/sdk/models/errors/stoptask.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StopTaskButlerErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StopTaskButlerResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopTaskUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StopTaskButlerResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopTaskUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopTaskButlerResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopTaskUnauthorizedData; - constructor(err: StopTaskButlerResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopTaskUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopTaskButlerResponseBody"; - } + this.name = "StopTaskUnauthorized"; + } } export type StopTaskErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StopTaskResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopTaskBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StopTaskResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopTaskBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopTaskResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopTaskBadRequestData; - constructor(err: StopTaskResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopTaskBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopTaskResponseBody"; - } + this.name = "StopTaskBadRequest"; + } } /** @internal */ export const StopTaskButlerErrors$inboundSchema: z.ZodType< - StopTaskButlerErrors, - z.ZodTypeDef, - unknown + StopTaskButlerErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StopTaskButlerErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopTaskButlerErrors$outboundSchema: z.ZodType< - StopTaskButlerErrors$Outbound, - z.ZodTypeDef, - StopTaskButlerErrors + StopTaskButlerErrors$Outbound, + z.ZodTypeDef, + StopTaskButlerErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,101 +127,98 @@ export const StopTaskButlerErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTaskButlerErrors$ { - /** @deprecated use `StopTaskButlerErrors$inboundSchema` instead. */ - export const inboundSchema = StopTaskButlerErrors$inboundSchema; - /** @deprecated use `StopTaskButlerErrors$outboundSchema` instead. */ - export const outboundSchema = StopTaskButlerErrors$outboundSchema; - /** @deprecated use `StopTaskButlerErrors$Outbound` instead. */ - export type Outbound = StopTaskButlerErrors$Outbound; + /** @deprecated use `StopTaskButlerErrors$inboundSchema` instead. */ + export const inboundSchema = StopTaskButlerErrors$inboundSchema; + /** @deprecated use `StopTaskButlerErrors$outboundSchema` instead. */ + export const outboundSchema = StopTaskButlerErrors$outboundSchema; + /** @deprecated use `StopTaskButlerErrors$Outbound` instead. */ + export type Outbound = StopTaskButlerErrors$Outbound; } /** @internal */ -export const StopTaskButlerResponseBody$inboundSchema: z.ZodType< - StopTaskButlerResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopTaskButlerErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopTaskButlerResponseBody(remapped); +export const StopTaskUnauthorized$inboundSchema: z.ZodType< + StopTaskUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StopTaskButlerErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopTaskUnauthorized(remapped); + }); + /** @internal */ -export type StopTaskButlerResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopTaskUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopTaskButlerResponseBody$outboundSchema: z.ZodType< - StopTaskButlerResponseBody$Outbound, - z.ZodTypeDef, - StopTaskButlerResponseBody -> = z - .instanceof(StopTaskButlerResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StopTaskButlerErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopTaskUnauthorized$outboundSchema: z.ZodType< + StopTaskUnauthorized$Outbound, + z.ZodTypeDef, + StopTaskUnauthorized +> = z.instanceof(StopTaskUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StopTaskButlerErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopTaskButlerResponseBody$ { - /** @deprecated use `StopTaskButlerResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopTaskButlerResponseBody$inboundSchema; - /** @deprecated use `StopTaskButlerResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopTaskButlerResponseBody$outboundSchema; - /** @deprecated use `StopTaskButlerResponseBody$Outbound` instead. */ - export type Outbound = StopTaskButlerResponseBody$Outbound; +export namespace StopTaskUnauthorized$ { + /** @deprecated use `StopTaskUnauthorized$inboundSchema` instead. */ + export const inboundSchema = StopTaskUnauthorized$inboundSchema; + /** @deprecated use `StopTaskUnauthorized$outboundSchema` instead. */ + export const outboundSchema = StopTaskUnauthorized$outboundSchema; + /** @deprecated use `StopTaskUnauthorized$Outbound` instead. */ + export type Outbound = StopTaskUnauthorized$Outbound; } /** @internal */ -export const StopTaskErrors$inboundSchema: z.ZodType = - z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), - }); +export const StopTaskErrors$inboundSchema: z.ZodType< + StopTaskErrors, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), +}); /** @internal */ export type StopTaskErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopTaskErrors$outboundSchema: z.ZodType< - StopTaskErrors$Outbound, - z.ZodTypeDef, - StopTaskErrors + StopTaskErrors$Outbound, + z.ZodTypeDef, + StopTaskErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -239,73 +226,66 @@ export const StopTaskErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTaskErrors$ { - /** @deprecated use `StopTaskErrors$inboundSchema` instead. */ - export const inboundSchema = StopTaskErrors$inboundSchema; - /** @deprecated use `StopTaskErrors$outboundSchema` instead. */ - export const outboundSchema = StopTaskErrors$outboundSchema; - /** @deprecated use `StopTaskErrors$Outbound` instead. */ - export type Outbound = StopTaskErrors$Outbound; + /** @deprecated use `StopTaskErrors$inboundSchema` instead. */ + export const inboundSchema = StopTaskErrors$inboundSchema; + /** @deprecated use `StopTaskErrors$outboundSchema` instead. */ + export const outboundSchema = StopTaskErrors$outboundSchema; + /** @deprecated use `StopTaskErrors$Outbound` instead. */ + export type Outbound = StopTaskErrors$Outbound; } /** @internal */ -export const StopTaskResponseBody$inboundSchema: z.ZodType< - StopTaskResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopTaskErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopTaskResponseBody(remapped); +export const StopTaskBadRequest$inboundSchema: z.ZodType< + StopTaskBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StopTaskErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopTaskBadRequest(remapped); + }); + /** @internal */ -export type StopTaskResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopTaskBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopTaskResponseBody$outboundSchema: z.ZodType< - StopTaskResponseBody$Outbound, - z.ZodTypeDef, - StopTaskResponseBody -> = z - .instanceof(StopTaskResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StopTaskErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopTaskBadRequest$outboundSchema: z.ZodType< + StopTaskBadRequest$Outbound, + z.ZodTypeDef, + StopTaskBadRequest +> = z.instanceof(StopTaskBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StopTaskErrors$outboundSchema)).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopTaskResponseBody$ { - /** @deprecated use `StopTaskResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopTaskResponseBody$inboundSchema; - /** @deprecated use `StopTaskResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopTaskResponseBody$outboundSchema; - /** @deprecated use `StopTaskResponseBody$Outbound` instead. */ - export type Outbound = StopTaskResponseBody$Outbound; +export namespace StopTaskBadRequest$ { + /** @deprecated use `StopTaskBadRequest$inboundSchema` instead. */ + export const inboundSchema = StopTaskBadRequest$inboundSchema; + /** @deprecated use `StopTaskBadRequest$outboundSchema` instead. */ + export const outboundSchema = StopTaskBadRequest$outboundSchema; + /** @deprecated use `StopTaskBadRequest$Outbound` instead. */ + export type Outbound = StopTaskBadRequest$Outbound; } diff --git a/src/sdk/models/errors/stoptranscodesession.ts b/src/sdk/models/errors/stoptranscodesession.ts index beaa605d..4b2218ad 100644 --- a/src/sdk/models/errors/stoptranscodesession.ts +++ b/src/sdk/models/errors/stoptranscodesession.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StopTranscodeSessionSessionsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type StopTranscodeSessionSessionsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopTranscodeSessionUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class StopTranscodeSessionSessionsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopTranscodeSessionUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopTranscodeSessionSessionsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopTranscodeSessionUnauthorizedData; - constructor(err: StopTranscodeSessionSessionsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopTranscodeSessionUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopTranscodeSessionSessionsResponseBody"; - } + this.name = "StopTranscodeSessionUnauthorized"; + } } export type StopTranscodeSessionErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type StopTranscodeSessionResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type StopTranscodeSessionBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class StopTranscodeSessionResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class StopTranscodeSessionBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: StopTranscodeSessionResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: StopTranscodeSessionBadRequestData; - constructor(err: StopTranscodeSessionResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: StopTranscodeSessionBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "StopTranscodeSessionResponseBody"; - } + this.name = "StopTranscodeSessionBadRequest"; + } } /** @internal */ export const StopTranscodeSessionSessionsErrors$inboundSchema: z.ZodType< - StopTranscodeSessionSessionsErrors, - z.ZodTypeDef, - unknown + StopTranscodeSessionSessionsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StopTranscodeSessionSessionsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopTranscodeSessionSessionsErrors$outboundSchema: z.ZodType< - StopTranscodeSessionSessionsErrors$Outbound, - z.ZodTypeDef, - StopTranscodeSessionSessionsErrors + StopTranscodeSessionSessionsErrors$Outbound, + z.ZodTypeDef, + StopTranscodeSessionSessionsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,102 @@ export const StopTranscodeSessionSessionsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTranscodeSessionSessionsErrors$ { - /** @deprecated use `StopTranscodeSessionSessionsErrors$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionSessionsErrors$inboundSchema; - /** @deprecated use `StopTranscodeSessionSessionsErrors$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionSessionsErrors$outboundSchema; - /** @deprecated use `StopTranscodeSessionSessionsErrors$Outbound` instead. */ - export type Outbound = StopTranscodeSessionSessionsErrors$Outbound; + /** @deprecated use `StopTranscodeSessionSessionsErrors$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionSessionsErrors$inboundSchema; + /** @deprecated use `StopTranscodeSessionSessionsErrors$outboundSchema` instead. */ + export const outboundSchema = + StopTranscodeSessionSessionsErrors$outboundSchema; + /** @deprecated use `StopTranscodeSessionSessionsErrors$Outbound` instead. */ + export type Outbound = StopTranscodeSessionSessionsErrors$Outbound; } /** @internal */ -export const StopTranscodeSessionSessionsResponseBody$inboundSchema: z.ZodType< - StopTranscodeSessionSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopTranscodeSessionSessionsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopTranscodeSessionSessionsResponseBody(remapped); +export const StopTranscodeSessionUnauthorized$inboundSchema: z.ZodType< + StopTranscodeSessionUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array( + z.lazy(() => StopTranscodeSessionSessionsErrors$inboundSchema), + ).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopTranscodeSessionUnauthorized(remapped); + }); + /** @internal */ -export type StopTranscodeSessionSessionsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopTranscodeSessionUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopTranscodeSessionSessionsResponseBody$outboundSchema: z.ZodType< - StopTranscodeSessionSessionsResponseBody$Outbound, - z.ZodTypeDef, - StopTranscodeSessionSessionsResponseBody -> = z - .instanceof(StopTranscodeSessionSessionsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => StopTranscodeSessionSessionsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopTranscodeSessionUnauthorized$outboundSchema: z.ZodType< + StopTranscodeSessionUnauthorized$Outbound, + z.ZodTypeDef, + StopTranscodeSessionUnauthorized +> = z.instanceof(StopTranscodeSessionUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => StopTranscodeSessionSessionsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopTranscodeSessionSessionsResponseBody$ { - /** @deprecated use `StopTranscodeSessionSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionSessionsResponseBody$inboundSchema; - /** @deprecated use `StopTranscodeSessionSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionSessionsResponseBody$outboundSchema; - /** @deprecated use `StopTranscodeSessionSessionsResponseBody$Outbound` instead. */ - export type Outbound = StopTranscodeSessionSessionsResponseBody$Outbound; +export namespace StopTranscodeSessionUnauthorized$ { + /** @deprecated use `StopTranscodeSessionUnauthorized$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionUnauthorized$inboundSchema; + /** @deprecated use `StopTranscodeSessionUnauthorized$outboundSchema` instead. */ + export const outboundSchema = StopTranscodeSessionUnauthorized$outboundSchema; + /** @deprecated use `StopTranscodeSessionUnauthorized$Outbound` instead. */ + export type Outbound = StopTranscodeSessionUnauthorized$Outbound; } /** @internal */ export const StopTranscodeSessionErrors$inboundSchema: z.ZodType< - StopTranscodeSessionErrors, - z.ZodTypeDef, - unknown + StopTranscodeSessionErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type StopTranscodeSessionErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const StopTranscodeSessionErrors$outboundSchema: z.ZodType< - StopTranscodeSessionErrors$Outbound, - z.ZodTypeDef, - StopTranscodeSessionErrors + StopTranscodeSessionErrors$Outbound, + z.ZodTypeDef, + StopTranscodeSessionErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +230,68 @@ export const StopTranscodeSessionErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTranscodeSessionErrors$ { - /** @deprecated use `StopTranscodeSessionErrors$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionErrors$inboundSchema; - /** @deprecated use `StopTranscodeSessionErrors$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionErrors$outboundSchema; - /** @deprecated use `StopTranscodeSessionErrors$Outbound` instead. */ - export type Outbound = StopTranscodeSessionErrors$Outbound; + /** @deprecated use `StopTranscodeSessionErrors$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionErrors$inboundSchema; + /** @deprecated use `StopTranscodeSessionErrors$outboundSchema` instead. */ + export const outboundSchema = StopTranscodeSessionErrors$outboundSchema; + /** @deprecated use `StopTranscodeSessionErrors$Outbound` instead. */ + export type Outbound = StopTranscodeSessionErrors$Outbound; } /** @internal */ -export const StopTranscodeSessionResponseBody$inboundSchema: z.ZodType< - StopTranscodeSessionResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => StopTranscodeSessionErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new StopTranscodeSessionResponseBody(remapped); +export const StopTranscodeSessionBadRequest$inboundSchema: z.ZodType< + StopTranscodeSessionBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => StopTranscodeSessionErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new StopTranscodeSessionBadRequest(remapped); + }); + /** @internal */ -export type StopTranscodeSessionResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type StopTranscodeSessionBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const StopTranscodeSessionResponseBody$outboundSchema: z.ZodType< - StopTranscodeSessionResponseBody$Outbound, - z.ZodTypeDef, - StopTranscodeSessionResponseBody -> = z - .instanceof(StopTranscodeSessionResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => StopTranscodeSessionErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const StopTranscodeSessionBadRequest$outboundSchema: z.ZodType< + StopTranscodeSessionBadRequest$Outbound, + z.ZodTypeDef, + StopTranscodeSessionBadRequest +> = z.instanceof(StopTranscodeSessionBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => StopTranscodeSessionErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace StopTranscodeSessionResponseBody$ { - /** @deprecated use `StopTranscodeSessionResponseBody$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionResponseBody$inboundSchema; - /** @deprecated use `StopTranscodeSessionResponseBody$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionResponseBody$outboundSchema; - /** @deprecated use `StopTranscodeSessionResponseBody$Outbound` instead. */ - export type Outbound = StopTranscodeSessionResponseBody$Outbound; +export namespace StopTranscodeSessionBadRequest$ { + /** @deprecated use `StopTranscodeSessionBadRequest$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionBadRequest$inboundSchema; + /** @deprecated use `StopTranscodeSessionBadRequest$outboundSchema` instead. */ + export const outboundSchema = StopTranscodeSessionBadRequest$outboundSchema; + /** @deprecated use `StopTranscodeSessionBadRequest$Outbound` instead. */ + export type Outbound = StopTranscodeSessionBadRequest$Outbound; } diff --git a/src/sdk/models/errors/updateplaylist.ts b/src/sdk/models/errors/updateplaylist.ts index 5ab57044..bcc2be1c 100644 --- a/src/sdk/models/errors/updateplaylist.ts +++ b/src/sdk/models/errors/updateplaylist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdatePlaylistPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type UpdatePlaylistPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UpdatePlaylistUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class UpdatePlaylistPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UpdatePlaylistUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UpdatePlaylistPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UpdatePlaylistUnauthorizedData; - constructor(err: UpdatePlaylistPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UpdatePlaylistUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UpdatePlaylistPlaylistsResponseBody"; - } + this.name = "UpdatePlaylistUnauthorized"; + } } export type UpdatePlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type UpdatePlaylistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UpdatePlaylistBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class UpdatePlaylistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UpdatePlaylistBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UpdatePlaylistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UpdatePlaylistBadRequestData; - constructor(err: UpdatePlaylistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UpdatePlaylistBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UpdatePlaylistResponseBody"; - } + this.name = "UpdatePlaylistBadRequest"; + } } /** @internal */ export const UpdatePlaylistPlaylistsErrors$inboundSchema: z.ZodType< - UpdatePlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown + UpdatePlaylistPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UpdatePlaylistPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UpdatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< - UpdatePlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - UpdatePlaylistPlaylistsErrors + UpdatePlaylistPlaylistsErrors$Outbound, + z.ZodTypeDef, + UpdatePlaylistPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const UpdatePlaylistPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlaylistPlaylistsErrors$ { - /** @deprecated use `UpdatePlaylistPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistPlaylistsErrors$inboundSchema; - /** @deprecated use `UpdatePlaylistPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistPlaylistsErrors$outboundSchema; - /** @deprecated use `UpdatePlaylistPlaylistsErrors$Outbound` instead. */ - export type Outbound = UpdatePlaylistPlaylistsErrors$Outbound; + /** @deprecated use `UpdatePlaylistPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistPlaylistsErrors$inboundSchema; + /** @deprecated use `UpdatePlaylistPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistPlaylistsErrors$outboundSchema; + /** @deprecated use `UpdatePlaylistPlaylistsErrors$Outbound` instead. */ + export type Outbound = UpdatePlaylistPlaylistsErrors$Outbound; } /** @internal */ -export const UpdatePlaylistPlaylistsResponseBody$inboundSchema: z.ZodType< - UpdatePlaylistPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UpdatePlaylistPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UpdatePlaylistPlaylistsResponseBody(remapped); +export const UpdatePlaylistUnauthorized$inboundSchema: z.ZodType< + UpdatePlaylistUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UpdatePlaylistPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UpdatePlaylistUnauthorized(remapped); + }); + /** @internal */ -export type UpdatePlaylistPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UpdatePlaylistUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UpdatePlaylistPlaylistsResponseBody$outboundSchema: z.ZodType< - UpdatePlaylistPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - UpdatePlaylistPlaylistsResponseBody -> = z - .instanceof(UpdatePlaylistPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => UpdatePlaylistPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UpdatePlaylistUnauthorized$outboundSchema: z.ZodType< + UpdatePlaylistUnauthorized$Outbound, + z.ZodTypeDef, + UpdatePlaylistUnauthorized +> = z.instanceof(UpdatePlaylistUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => UpdatePlaylistPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdatePlaylistPlaylistsResponseBody$ { - /** @deprecated use `UpdatePlaylistPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistPlaylistsResponseBody$inboundSchema; - /** @deprecated use `UpdatePlaylistPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistPlaylistsResponseBody$outboundSchema; - /** @deprecated use `UpdatePlaylistPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = UpdatePlaylistPlaylistsResponseBody$Outbound; +export namespace UpdatePlaylistUnauthorized$ { + /** @deprecated use `UpdatePlaylistUnauthorized$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistUnauthorized$inboundSchema; + /** @deprecated use `UpdatePlaylistUnauthorized$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistUnauthorized$outboundSchema; + /** @deprecated use `UpdatePlaylistUnauthorized$Outbound` instead. */ + export type Outbound = UpdatePlaylistUnauthorized$Outbound; } /** @internal */ export const UpdatePlaylistErrors$inboundSchema: z.ZodType< - UpdatePlaylistErrors, - z.ZodTypeDef, - unknown + UpdatePlaylistErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UpdatePlaylistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UpdatePlaylistErrors$outboundSchema: z.ZodType< - UpdatePlaylistErrors$Outbound, - z.ZodTypeDef, - UpdatePlaylistErrors + UpdatePlaylistErrors$Outbound, + z.ZodTypeDef, + UpdatePlaylistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,67 @@ export const UpdatePlaylistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlaylistErrors$ { - /** @deprecated use `UpdatePlaylistErrors$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistErrors$inboundSchema; - /** @deprecated use `UpdatePlaylistErrors$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistErrors$outboundSchema; - /** @deprecated use `UpdatePlaylistErrors$Outbound` instead. */ - export type Outbound = UpdatePlaylistErrors$Outbound; + /** @deprecated use `UpdatePlaylistErrors$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistErrors$inboundSchema; + /** @deprecated use `UpdatePlaylistErrors$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistErrors$outboundSchema; + /** @deprecated use `UpdatePlaylistErrors$Outbound` instead. */ + export type Outbound = UpdatePlaylistErrors$Outbound; } /** @internal */ -export const UpdatePlaylistResponseBody$inboundSchema: z.ZodType< - UpdatePlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UpdatePlaylistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UpdatePlaylistResponseBody(remapped); +export const UpdatePlaylistBadRequest$inboundSchema: z.ZodType< + UpdatePlaylistBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UpdatePlaylistErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UpdatePlaylistBadRequest(remapped); + }); + /** @internal */ -export type UpdatePlaylistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UpdatePlaylistBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UpdatePlaylistResponseBody$outboundSchema: z.ZodType< - UpdatePlaylistResponseBody$Outbound, - z.ZodTypeDef, - UpdatePlaylistResponseBody -> = z - .instanceof(UpdatePlaylistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => UpdatePlaylistErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UpdatePlaylistBadRequest$outboundSchema: z.ZodType< + UpdatePlaylistBadRequest$Outbound, + z.ZodTypeDef, + UpdatePlaylistBadRequest +> = z.instanceof(UpdatePlaylistBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => UpdatePlaylistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdatePlaylistResponseBody$ { - /** @deprecated use `UpdatePlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistResponseBody$inboundSchema; - /** @deprecated use `UpdatePlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistResponseBody$outboundSchema; - /** @deprecated use `UpdatePlaylistResponseBody$Outbound` instead. */ - export type Outbound = UpdatePlaylistResponseBody$Outbound; +export namespace UpdatePlaylistBadRequest$ { + /** @deprecated use `UpdatePlaylistBadRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistBadRequest$inboundSchema; + /** @deprecated use `UpdatePlaylistBadRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistBadRequest$outboundSchema; + /** @deprecated use `UpdatePlaylistBadRequest$Outbound` instead. */ + export type Outbound = UpdatePlaylistBadRequest$Outbound; } diff --git a/src/sdk/models/errors/updateplayprogress.ts b/src/sdk/models/errors/updateplayprogress.ts index e953bf73..d6d3d595 100644 --- a/src/sdk/models/errors/updateplayprogress.ts +++ b/src/sdk/models/errors/updateplayprogress.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdatePlayProgressMediaErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type UpdatePlayProgressMediaResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UpdatePlayProgressUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class UpdatePlayProgressMediaResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UpdatePlayProgressUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UpdatePlayProgressMediaResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UpdatePlayProgressUnauthorizedData; - constructor(err: UpdatePlayProgressMediaResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UpdatePlayProgressUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UpdatePlayProgressMediaResponseBody"; - } + this.name = "UpdatePlayProgressUnauthorized"; + } } export type UpdatePlayProgressErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type UpdatePlayProgressResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UpdatePlayProgressBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class UpdatePlayProgressResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UpdatePlayProgressBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UpdatePlayProgressResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UpdatePlayProgressBadRequestData; - constructor(err: UpdatePlayProgressResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UpdatePlayProgressBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UpdatePlayProgressResponseBody"; - } + this.name = "UpdatePlayProgressBadRequest"; + } } /** @internal */ export const UpdatePlayProgressMediaErrors$inboundSchema: z.ZodType< - UpdatePlayProgressMediaErrors, - z.ZodTypeDef, - unknown + UpdatePlayProgressMediaErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UpdatePlayProgressMediaErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UpdatePlayProgressMediaErrors$outboundSchema: z.ZodType< - UpdatePlayProgressMediaErrors$Outbound, - z.ZodTypeDef, - UpdatePlayProgressMediaErrors + UpdatePlayProgressMediaErrors$Outbound, + z.ZodTypeDef, + UpdatePlayProgressMediaErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const UpdatePlayProgressMediaErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlayProgressMediaErrors$ { - /** @deprecated use `UpdatePlayProgressMediaErrors$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressMediaErrors$inboundSchema; - /** @deprecated use `UpdatePlayProgressMediaErrors$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressMediaErrors$outboundSchema; - /** @deprecated use `UpdatePlayProgressMediaErrors$Outbound` instead. */ - export type Outbound = UpdatePlayProgressMediaErrors$Outbound; + /** @deprecated use `UpdatePlayProgressMediaErrors$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressMediaErrors$inboundSchema; + /** @deprecated use `UpdatePlayProgressMediaErrors$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressMediaErrors$outboundSchema; + /** @deprecated use `UpdatePlayProgressMediaErrors$Outbound` instead. */ + export type Outbound = UpdatePlayProgressMediaErrors$Outbound; } /** @internal */ -export const UpdatePlayProgressMediaResponseBody$inboundSchema: z.ZodType< - UpdatePlayProgressMediaResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UpdatePlayProgressMediaErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UpdatePlayProgressMediaResponseBody(remapped); +export const UpdatePlayProgressUnauthorized$inboundSchema: z.ZodType< + UpdatePlayProgressUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UpdatePlayProgressMediaErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UpdatePlayProgressUnauthorized(remapped); + }); + /** @internal */ -export type UpdatePlayProgressMediaResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UpdatePlayProgressUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UpdatePlayProgressMediaResponseBody$outboundSchema: z.ZodType< - UpdatePlayProgressMediaResponseBody$Outbound, - z.ZodTypeDef, - UpdatePlayProgressMediaResponseBody -> = z - .instanceof(UpdatePlayProgressMediaResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => UpdatePlayProgressMediaErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UpdatePlayProgressUnauthorized$outboundSchema: z.ZodType< + UpdatePlayProgressUnauthorized$Outbound, + z.ZodTypeDef, + UpdatePlayProgressUnauthorized +> = z.instanceof(UpdatePlayProgressUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => UpdatePlayProgressMediaErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdatePlayProgressMediaResponseBody$ { - /** @deprecated use `UpdatePlayProgressMediaResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressMediaResponseBody$inboundSchema; - /** @deprecated use `UpdatePlayProgressMediaResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressMediaResponseBody$outboundSchema; - /** @deprecated use `UpdatePlayProgressMediaResponseBody$Outbound` instead. */ - export type Outbound = UpdatePlayProgressMediaResponseBody$Outbound; +export namespace UpdatePlayProgressUnauthorized$ { + /** @deprecated use `UpdatePlayProgressUnauthorized$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressUnauthorized$inboundSchema; + /** @deprecated use `UpdatePlayProgressUnauthorized$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressUnauthorized$outboundSchema; + /** @deprecated use `UpdatePlayProgressUnauthorized$Outbound` instead. */ + export type Outbound = UpdatePlayProgressUnauthorized$Outbound; } /** @internal */ export const UpdatePlayProgressErrors$inboundSchema: z.ZodType< - UpdatePlayProgressErrors, - z.ZodTypeDef, - unknown + UpdatePlayProgressErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UpdatePlayProgressErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UpdatePlayProgressErrors$outboundSchema: z.ZodType< - UpdatePlayProgressErrors$Outbound, - z.ZodTypeDef, - UpdatePlayProgressErrors + UpdatePlayProgressErrors$Outbound, + z.ZodTypeDef, + UpdatePlayProgressErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,68 @@ export const UpdatePlayProgressErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlayProgressErrors$ { - /** @deprecated use `UpdatePlayProgressErrors$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressErrors$inboundSchema; - /** @deprecated use `UpdatePlayProgressErrors$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressErrors$outboundSchema; - /** @deprecated use `UpdatePlayProgressErrors$Outbound` instead. */ - export type Outbound = UpdatePlayProgressErrors$Outbound; + /** @deprecated use `UpdatePlayProgressErrors$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressErrors$inboundSchema; + /** @deprecated use `UpdatePlayProgressErrors$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressErrors$outboundSchema; + /** @deprecated use `UpdatePlayProgressErrors$Outbound` instead. */ + export type Outbound = UpdatePlayProgressErrors$Outbound; } /** @internal */ -export const UpdatePlayProgressResponseBody$inboundSchema: z.ZodType< - UpdatePlayProgressResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UpdatePlayProgressErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UpdatePlayProgressResponseBody(remapped); +export const UpdatePlayProgressBadRequest$inboundSchema: z.ZodType< + UpdatePlayProgressBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UpdatePlayProgressErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UpdatePlayProgressBadRequest(remapped); + }); + /** @internal */ -export type UpdatePlayProgressResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UpdatePlayProgressBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UpdatePlayProgressResponseBody$outboundSchema: z.ZodType< - UpdatePlayProgressResponseBody$Outbound, - z.ZodTypeDef, - UpdatePlayProgressResponseBody -> = z - .instanceof(UpdatePlayProgressResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => UpdatePlayProgressErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UpdatePlayProgressBadRequest$outboundSchema: z.ZodType< + UpdatePlayProgressBadRequest$Outbound, + z.ZodTypeDef, + UpdatePlayProgressBadRequest +> = z.instanceof(UpdatePlayProgressBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => UpdatePlayProgressErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UpdatePlayProgressResponseBody$ { - /** @deprecated use `UpdatePlayProgressResponseBody$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressResponseBody$inboundSchema; - /** @deprecated use `UpdatePlayProgressResponseBody$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressResponseBody$outboundSchema; - /** @deprecated use `UpdatePlayProgressResponseBody$Outbound` instead. */ - export type Outbound = UpdatePlayProgressResponseBody$Outbound; +export namespace UpdatePlayProgressBadRequest$ { + /** @deprecated use `UpdatePlayProgressBadRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressBadRequest$inboundSchema; + /** @deprecated use `UpdatePlayProgressBadRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressBadRequest$outboundSchema; + /** @deprecated use `UpdatePlayProgressBadRequest$Outbound` instead. */ + export type Outbound = UpdatePlayProgressBadRequest$Outbound; } diff --git a/src/sdk/models/errors/uploadplaylist.ts b/src/sdk/models/errors/uploadplaylist.ts index 8817b337..6a63df2e 100644 --- a/src/sdk/models/errors/uploadplaylist.ts +++ b/src/sdk/models/errors/uploadplaylist.ts @@ -2,134 +2,124 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UploadPlaylistPlaylistsErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export type UploadPlaylistPlaylistsResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UploadPlaylistUnauthorizedData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Unauthorized - Returned if the X-Plex-Token is missing from the header or query. */ -export class UploadPlaylistPlaylistsResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UploadPlaylistUnauthorized extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UploadPlaylistPlaylistsResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UploadPlaylistUnauthorizedData; - constructor(err: UploadPlaylistPlaylistsResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UploadPlaylistUnauthorizedData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UploadPlaylistPlaylistsResponseBody"; - } + this.name = "UploadPlaylistUnauthorized"; + } } export type UploadPlaylistErrors = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export type UploadPlaylistResponseBodyData = { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export type UploadPlaylistBadRequestData = { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; }; /** * Bad Request - A parameter was not specified, or was specified incorrectly. */ -export class UploadPlaylistResponseBody extends Error { - errors?: Array | undefined; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse?: Response | undefined; +export class UploadPlaylistBadRequest extends Error { + errors?: Array | undefined; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse?: Response | undefined; - /** The original data that was passed to this error instance. */ - data$: UploadPlaylistResponseBodyData; + /** The original data that was passed to this error instance. */ + data$: UploadPlaylistBadRequestData; - constructor(err: UploadPlaylistResponseBodyData) { - const message = - "message" in err && typeof err.message === "string" - ? err.message - : `API error occurred: ${JSON.stringify(err)}`; - super(message); - this.data$ = err; + constructor(err: UploadPlaylistBadRequestData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + this.data$ = err; - if (err.errors != null) { - this.errors = err.errors; - } - if (err.rawResponse != null) { - this.rawResponse = err.rawResponse; - } + if (err.errors != null) this.errors = err.errors; + if (err.rawResponse != null) this.rawResponse = err.rawResponse; - this.name = "UploadPlaylistResponseBody"; - } + this.name = "UploadPlaylistBadRequest"; + } } /** @internal */ export const UploadPlaylistPlaylistsErrors$inboundSchema: z.ZodType< - UploadPlaylistPlaylistsErrors, - z.ZodTypeDef, - unknown + UploadPlaylistPlaylistsErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UploadPlaylistPlaylistsErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UploadPlaylistPlaylistsErrors$outboundSchema: z.ZodType< - UploadPlaylistPlaylistsErrors$Outbound, - z.ZodTypeDef, - UploadPlaylistPlaylistsErrors + UploadPlaylistPlaylistsErrors$Outbound, + z.ZodTypeDef, + UploadPlaylistPlaylistsErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -137,106 +127,100 @@ export const UploadPlaylistPlaylistsErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadPlaylistPlaylistsErrors$ { - /** @deprecated use `UploadPlaylistPlaylistsErrors$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistPlaylistsErrors$inboundSchema; - /** @deprecated use `UploadPlaylistPlaylistsErrors$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistPlaylistsErrors$outboundSchema; - /** @deprecated use `UploadPlaylistPlaylistsErrors$Outbound` instead. */ - export type Outbound = UploadPlaylistPlaylistsErrors$Outbound; + /** @deprecated use `UploadPlaylistPlaylistsErrors$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistPlaylistsErrors$inboundSchema; + /** @deprecated use `UploadPlaylistPlaylistsErrors$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistPlaylistsErrors$outboundSchema; + /** @deprecated use `UploadPlaylistPlaylistsErrors$Outbound` instead. */ + export type Outbound = UploadPlaylistPlaylistsErrors$Outbound; } /** @internal */ -export const UploadPlaylistPlaylistsResponseBody$inboundSchema: z.ZodType< - UploadPlaylistPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UploadPlaylistPlaylistsErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UploadPlaylistPlaylistsResponseBody(remapped); +export const UploadPlaylistUnauthorized$inboundSchema: z.ZodType< + UploadPlaylistUnauthorized, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UploadPlaylistPlaylistsErrors$inboundSchema)) + .optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UploadPlaylistUnauthorized(remapped); + }); + /** @internal */ -export type UploadPlaylistPlaylistsResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UploadPlaylistUnauthorized$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UploadPlaylistPlaylistsResponseBody$outboundSchema: z.ZodType< - UploadPlaylistPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - UploadPlaylistPlaylistsResponseBody -> = z - .instanceof(UploadPlaylistPlaylistsResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z - .array(z.lazy(() => UploadPlaylistPlaylistsErrors$outboundSchema)) - .optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UploadPlaylistUnauthorized$outboundSchema: z.ZodType< + UploadPlaylistUnauthorized$Outbound, + z.ZodTypeDef, + UploadPlaylistUnauthorized +> = z.instanceof(UploadPlaylistUnauthorized) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array( + z.lazy(() => UploadPlaylistPlaylistsErrors$outboundSchema), + ).optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UploadPlaylistPlaylistsResponseBody$ { - /** @deprecated use `UploadPlaylistPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistPlaylistsResponseBody$inboundSchema; - /** @deprecated use `UploadPlaylistPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistPlaylistsResponseBody$outboundSchema; - /** @deprecated use `UploadPlaylistPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = UploadPlaylistPlaylistsResponseBody$Outbound; +export namespace UploadPlaylistUnauthorized$ { + /** @deprecated use `UploadPlaylistUnauthorized$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistUnauthorized$inboundSchema; + /** @deprecated use `UploadPlaylistUnauthorized$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistUnauthorized$outboundSchema; + /** @deprecated use `UploadPlaylistUnauthorized$Outbound` instead. */ + export type Outbound = UploadPlaylistUnauthorized$Outbound; } /** @internal */ export const UploadPlaylistErrors$inboundSchema: z.ZodType< - UploadPlaylistErrors, - z.ZodTypeDef, - unknown + UploadPlaylistErrors, + z.ZodTypeDef, + unknown > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @internal */ export type UploadPlaylistErrors$Outbound = { - code?: number | undefined; - message?: string | undefined; - status?: number | undefined; + code?: number | undefined; + message?: string | undefined; + status?: number | undefined; }; /** @internal */ export const UploadPlaylistErrors$outboundSchema: z.ZodType< - UploadPlaylistErrors$Outbound, - z.ZodTypeDef, - UploadPlaylistErrors + UploadPlaylistErrors$Outbound, + z.ZodTypeDef, + UploadPlaylistErrors > = z.object({ - code: z.number().int().optional(), - message: z.string().optional(), - status: z.number().int().optional(), + code: z.number().int().optional(), + message: z.string().optional(), + status: z.number().int().optional(), }); /** @@ -244,73 +228,67 @@ export const UploadPlaylistErrors$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadPlaylistErrors$ { - /** @deprecated use `UploadPlaylistErrors$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistErrors$inboundSchema; - /** @deprecated use `UploadPlaylistErrors$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistErrors$outboundSchema; - /** @deprecated use `UploadPlaylistErrors$Outbound` instead. */ - export type Outbound = UploadPlaylistErrors$Outbound; + /** @deprecated use `UploadPlaylistErrors$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistErrors$inboundSchema; + /** @deprecated use `UploadPlaylistErrors$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistErrors$outboundSchema; + /** @deprecated use `UploadPlaylistErrors$Outbound` instead. */ + export type Outbound = UploadPlaylistErrors$Outbound; } /** @internal */ -export const UploadPlaylistResponseBody$inboundSchema: z.ZodType< - UploadPlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - errors: z.array(z.lazy(() => UploadPlaylistErrors$inboundSchema)).optional(), - RawResponse: z.instanceof(Response).optional(), - }) - .transform((v) => { - const remapped = remap$(v, { - RawResponse: "rawResponse", - }); - - return new UploadPlaylistResponseBody(remapped); +export const UploadPlaylistBadRequest$inboundSchema: z.ZodType< + UploadPlaylistBadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.array(z.lazy(() => UploadPlaylistErrors$inboundSchema)).optional(), + RawResponse: z.instanceof(Response).optional(), +}) + .transform((v) => { + const remapped = remap$(v, { + "RawResponse": "rawResponse", }); + return new UploadPlaylistBadRequest(remapped); + }); + /** @internal */ -export type UploadPlaylistResponseBody$Outbound = { - errors?: Array | undefined; - RawResponse?: never | undefined; +export type UploadPlaylistBadRequest$Outbound = { + errors?: Array | undefined; + RawResponse?: never | undefined; }; /** @internal */ -export const UploadPlaylistResponseBody$outboundSchema: z.ZodType< - UploadPlaylistResponseBody$Outbound, - z.ZodTypeDef, - UploadPlaylistResponseBody -> = z - .instanceof(UploadPlaylistResponseBody) - .transform((v) => v.data$) - .pipe( - z - .object({ - errors: z.array(z.lazy(() => UploadPlaylistErrors$outboundSchema)).optional(), - rawResponse: z - .instanceof(Response) - .transform(() => { - throw new Error("Response cannot be serialized"); - }) - .optional(), - }) - .transform((v) => { - return remap$(v, { - rawResponse: "RawResponse", - }); - }) - ); +export const UploadPlaylistBadRequest$outboundSchema: z.ZodType< + UploadPlaylistBadRequest$Outbound, + z.ZodTypeDef, + UploadPlaylistBadRequest +> = z.instanceof(UploadPlaylistBadRequest) + .transform(v => v.data$) + .pipe( + z.object({ + errors: z.array(z.lazy(() => UploadPlaylistErrors$outboundSchema)) + .optional(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }).optional(), + }).transform((v) => { + return remap$(v, { + rawResponse: "RawResponse", + }); + }), + ); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export namespace UploadPlaylistResponseBody$ { - /** @deprecated use `UploadPlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistResponseBody$inboundSchema; - /** @deprecated use `UploadPlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistResponseBody$outboundSchema; - /** @deprecated use `UploadPlaylistResponseBody$Outbound` instead. */ - export type Outbound = UploadPlaylistResponseBody$Outbound; +export namespace UploadPlaylistBadRequest$ { + /** @deprecated use `UploadPlaylistBadRequest$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistBadRequest$inboundSchema; + /** @deprecated use `UploadPlaylistBadRequest$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistBadRequest$outboundSchema; + /** @deprecated use `UploadPlaylistBadRequest$Outbound` instead. */ + export type Outbound = UploadPlaylistBadRequest$Outbound; } diff --git a/src/sdk/models/operations/addplaylistcontents.ts b/src/sdk/models/operations/addplaylistcontents.ts index 3f5a0e8d..52317f09 100644 --- a/src/sdk/models/operations/addplaylistcontents.ts +++ b/src/sdk/models/operations/addplaylistcontents.ts @@ -2,100 +2,100 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type AddPlaylistContentsRequest = { - /** - * the ID of the playlist - */ - playlistID: number; - /** - * the content URI for the playlist - */ - uri: string; - /** - * the play queue to add to a playlist - */ - playQueueID?: number | undefined; + /** + * the ID of the playlist + */ + playlistID: number; + /** + * the content URI for the playlist + */ + uri: string; + /** + * the play queue to add to a playlist + */ + playQueueID?: number | undefined; }; export type AddPlaylistContentsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; export type AddPlaylistContentsMediaContainer = { - size?: number | undefined; - leafCountAdded?: number | undefined; - leafCountRequested?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + leafCountAdded?: number | undefined; + leafCountRequested?: number | undefined; + metadata?: Array | undefined; }; /** * Playlist Updated */ export type AddPlaylistContentsResponseBody = { - mediaContainer?: AddPlaylistContentsMediaContainer | undefined; + mediaContainer?: AddPlaylistContentsMediaContainer | undefined; }; export type AddPlaylistContentsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Playlist Updated - */ - object?: AddPlaylistContentsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Playlist Updated + */ + object?: AddPlaylistContentsResponseBody | undefined; }; /** @internal */ export const AddPlaylistContentsRequest$inboundSchema: z.ZodType< - AddPlaylistContentsRequest, - z.ZodTypeDef, - unknown + AddPlaylistContentsRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), - uri: z.string(), - playQueueID: z.number().optional(), + playlistID: z.number(), + uri: z.string(), + playQueueID: z.number().optional(), }); /** @internal */ export type AddPlaylistContentsRequest$Outbound = { - playlistID: number; - uri: string; - playQueueID?: number | undefined; + playlistID: number; + uri: string; + playQueueID?: number | undefined; }; /** @internal */ export const AddPlaylistContentsRequest$outboundSchema: z.ZodType< - AddPlaylistContentsRequest$Outbound, - z.ZodTypeDef, - AddPlaylistContentsRequest + AddPlaylistContentsRequest$Outbound, + z.ZodTypeDef, + AddPlaylistContentsRequest > = z.object({ - playlistID: z.number(), - uri: z.string(), - playQueueID: z.number().optional(), + playlistID: z.number(), + uri: z.string(), + playQueueID: z.number().optional(), }); /** @@ -103,71 +103,71 @@ export const AddPlaylistContentsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsRequest$ { - /** @deprecated use `AddPlaylistContentsRequest$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsRequest$inboundSchema; - /** @deprecated use `AddPlaylistContentsRequest$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsRequest$outboundSchema; - /** @deprecated use `AddPlaylistContentsRequest$Outbound` instead. */ - export type Outbound = AddPlaylistContentsRequest$Outbound; + /** @deprecated use `AddPlaylistContentsRequest$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsRequest$inboundSchema; + /** @deprecated use `AddPlaylistContentsRequest$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsRequest$outboundSchema; + /** @deprecated use `AddPlaylistContentsRequest$Outbound` instead. */ + export type Outbound = AddPlaylistContentsRequest$Outbound; } /** @internal */ export const AddPlaylistContentsMetadata$inboundSchema: z.ZodType< - AddPlaylistContentsMetadata, - z.ZodTypeDef, - unknown + AddPlaylistContentsMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @internal */ export type AddPlaylistContentsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; /** @internal */ export const AddPlaylistContentsMetadata$outboundSchema: z.ZodType< - AddPlaylistContentsMetadata$Outbound, - z.ZodTypeDef, - AddPlaylistContentsMetadata + AddPlaylistContentsMetadata$Outbound, + z.ZodTypeDef, + AddPlaylistContentsMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @@ -175,178 +175,173 @@ export const AddPlaylistContentsMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsMetadata$ { - /** @deprecated use `AddPlaylistContentsMetadata$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsMetadata$inboundSchema; - /** @deprecated use `AddPlaylistContentsMetadata$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsMetadata$outboundSchema; - /** @deprecated use `AddPlaylistContentsMetadata$Outbound` instead. */ - export type Outbound = AddPlaylistContentsMetadata$Outbound; + /** @deprecated use `AddPlaylistContentsMetadata$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsMetadata$inboundSchema; + /** @deprecated use `AddPlaylistContentsMetadata$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsMetadata$outboundSchema; + /** @deprecated use `AddPlaylistContentsMetadata$Outbound` instead. */ + export type Outbound = AddPlaylistContentsMetadata$Outbound; } /** @internal */ export const AddPlaylistContentsMediaContainer$inboundSchema: z.ZodType< - AddPlaylistContentsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - leafCountAdded: z.number().int().optional(), - leafCountRequested: z.number().int().optional(), - Metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + AddPlaylistContentsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + leafCountAdded: z.number().int().optional(), + leafCountRequested: z.number().int().optional(), + Metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type AddPlaylistContentsMediaContainer$Outbound = { - size?: number | undefined; - leafCountAdded?: number | undefined; - leafCountRequested?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + leafCountAdded?: number | undefined; + leafCountRequested?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const AddPlaylistContentsMediaContainer$outboundSchema: z.ZodType< - AddPlaylistContentsMediaContainer$Outbound, - z.ZodTypeDef, - AddPlaylistContentsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - leafCountAdded: z.number().int().optional(), - leafCountRequested: z.number().int().optional(), - metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + AddPlaylistContentsMediaContainer$Outbound, + z.ZodTypeDef, + AddPlaylistContentsMediaContainer +> = z.object({ + size: z.number().int().optional(), + leafCountAdded: z.number().int().optional(), + leafCountRequested: z.number().int().optional(), + metadata: z.array(z.lazy(() => AddPlaylistContentsMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsMediaContainer$ { - /** @deprecated use `AddPlaylistContentsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsMediaContainer$inboundSchema; - /** @deprecated use `AddPlaylistContentsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsMediaContainer$outboundSchema; - /** @deprecated use `AddPlaylistContentsMediaContainer$Outbound` instead. */ - export type Outbound = AddPlaylistContentsMediaContainer$Outbound; + /** @deprecated use `AddPlaylistContentsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsMediaContainer$inboundSchema; + /** @deprecated use `AddPlaylistContentsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + AddPlaylistContentsMediaContainer$outboundSchema; + /** @deprecated use `AddPlaylistContentsMediaContainer$Outbound` instead. */ + export type Outbound = AddPlaylistContentsMediaContainer$Outbound; } /** @internal */ export const AddPlaylistContentsResponseBody$inboundSchema: z.ZodType< - AddPlaylistContentsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + AddPlaylistContentsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type AddPlaylistContentsResponseBody$Outbound = { - MediaContainer?: AddPlaylistContentsMediaContainer$Outbound | undefined; + MediaContainer?: AddPlaylistContentsMediaContainer$Outbound | undefined; }; /** @internal */ export const AddPlaylistContentsResponseBody$outboundSchema: z.ZodType< - AddPlaylistContentsResponseBody$Outbound, - z.ZodTypeDef, - AddPlaylistContentsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + AddPlaylistContentsResponseBody$Outbound, + z.ZodTypeDef, + AddPlaylistContentsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => AddPlaylistContentsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsResponseBody$ { - /** @deprecated use `AddPlaylistContentsResponseBody$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsResponseBody$inboundSchema; - /** @deprecated use `AddPlaylistContentsResponseBody$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsResponseBody$outboundSchema; - /** @deprecated use `AddPlaylistContentsResponseBody$Outbound` instead. */ - export type Outbound = AddPlaylistContentsResponseBody$Outbound; + /** @deprecated use `AddPlaylistContentsResponseBody$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsResponseBody$inboundSchema; + /** @deprecated use `AddPlaylistContentsResponseBody$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsResponseBody$outboundSchema; + /** @deprecated use `AddPlaylistContentsResponseBody$Outbound` instead. */ + export type Outbound = AddPlaylistContentsResponseBody$Outbound; } /** @internal */ export const AddPlaylistContentsResponse$inboundSchema: z.ZodType< - AddPlaylistContentsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => AddPlaylistContentsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + AddPlaylistContentsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => AddPlaylistContentsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type AddPlaylistContentsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: AddPlaylistContentsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: AddPlaylistContentsResponseBody$Outbound | undefined; }; /** @internal */ export const AddPlaylistContentsResponse$outboundSchema: z.ZodType< - AddPlaylistContentsResponse$Outbound, - z.ZodTypeDef, - AddPlaylistContentsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => AddPlaylistContentsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + AddPlaylistContentsResponse$Outbound, + z.ZodTypeDef, + AddPlaylistContentsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => AddPlaylistContentsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AddPlaylistContentsResponse$ { - /** @deprecated use `AddPlaylistContentsResponse$inboundSchema` instead. */ - export const inboundSchema = AddPlaylistContentsResponse$inboundSchema; - /** @deprecated use `AddPlaylistContentsResponse$outboundSchema` instead. */ - export const outboundSchema = AddPlaylistContentsResponse$outboundSchema; - /** @deprecated use `AddPlaylistContentsResponse$Outbound` instead. */ - export type Outbound = AddPlaylistContentsResponse$Outbound; + /** @deprecated use `AddPlaylistContentsResponse$inboundSchema` instead. */ + export const inboundSchema = AddPlaylistContentsResponse$inboundSchema; + /** @deprecated use `AddPlaylistContentsResponse$outboundSchema` instead. */ + export const outboundSchema = AddPlaylistContentsResponse$outboundSchema; + /** @deprecated use `AddPlaylistContentsResponse$Outbound` instead. */ + export type Outbound = AddPlaylistContentsResponse$Outbound; } diff --git a/src/sdk/models/operations/applyupdates.ts b/src/sdk/models/operations/applyupdates.ts index a4d601ec..5342dbf0 100644 --- a/src/sdk/models/operations/applyupdates.ts +++ b/src/sdk/models/operations/applyupdates.ts @@ -2,109 +2,114 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install */ export enum Tonight { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. */ export enum Skip { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type ApplyUpdatesRequest = { - /** - * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install - */ - tonight?: Tonight | undefined; - /** - * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. - */ - skip?: Skip | undefined; + /** + * Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install + */ + tonight?: Tonight | undefined; + /** + * Indicate that the latest version should be marked as skipped. The [Release] entry for this version will have the `state` set to `skipped`. + */ + skip?: Skip | undefined; }; export type ApplyUpdatesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const Tonight$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Tonight); +export const Tonight$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Tonight); /** @internal */ -export const Tonight$outboundSchema: z.ZodNativeEnum = Tonight$inboundSchema; +export const Tonight$outboundSchema: z.ZodNativeEnum = + Tonight$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Tonight$ { - /** @deprecated use `Tonight$inboundSchema` instead. */ - export const inboundSchema = Tonight$inboundSchema; - /** @deprecated use `Tonight$outboundSchema` instead. */ - export const outboundSchema = Tonight$outboundSchema; + /** @deprecated use `Tonight$inboundSchema` instead. */ + export const inboundSchema = Tonight$inboundSchema; + /** @deprecated use `Tonight$outboundSchema` instead. */ + export const outboundSchema = Tonight$outboundSchema; } /** @internal */ -export const Skip$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Skip); +export const Skip$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Skip, +); /** @internal */ -export const Skip$outboundSchema: z.ZodNativeEnum = Skip$inboundSchema; +export const Skip$outboundSchema: z.ZodNativeEnum = + Skip$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Skip$ { - /** @deprecated use `Skip$inboundSchema` instead. */ - export const inboundSchema = Skip$inboundSchema; - /** @deprecated use `Skip$outboundSchema` instead. */ - export const outboundSchema = Skip$outboundSchema; + /** @deprecated use `Skip$inboundSchema` instead. */ + export const inboundSchema = Skip$inboundSchema; + /** @deprecated use `Skip$outboundSchema` instead. */ + export const outboundSchema = Skip$outboundSchema; } /** @internal */ export const ApplyUpdatesRequest$inboundSchema: z.ZodType< - ApplyUpdatesRequest, - z.ZodTypeDef, - unknown + ApplyUpdatesRequest, + z.ZodTypeDef, + unknown > = z.object({ - tonight: Tonight$inboundSchema.optional(), - skip: Skip$inboundSchema.optional(), + tonight: Tonight$inboundSchema.optional(), + skip: Skip$inboundSchema.optional(), }); /** @internal */ export type ApplyUpdatesRequest$Outbound = { - tonight?: number | undefined; - skip?: number | undefined; + tonight?: number | undefined; + skip?: number | undefined; }; /** @internal */ export const ApplyUpdatesRequest$outboundSchema: z.ZodType< - ApplyUpdatesRequest$Outbound, - z.ZodTypeDef, - ApplyUpdatesRequest + ApplyUpdatesRequest$Outbound, + z.ZodTypeDef, + ApplyUpdatesRequest > = z.object({ - tonight: Tonight$outboundSchema.optional(), - skip: Skip$outboundSchema.optional(), + tonight: Tonight$outboundSchema.optional(), + skip: Skip$outboundSchema.optional(), }); /** @@ -112,70 +117,66 @@ export const ApplyUpdatesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApplyUpdatesRequest$ { - /** @deprecated use `ApplyUpdatesRequest$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesRequest$inboundSchema; - /** @deprecated use `ApplyUpdatesRequest$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesRequest$outboundSchema; - /** @deprecated use `ApplyUpdatesRequest$Outbound` instead. */ - export type Outbound = ApplyUpdatesRequest$Outbound; + /** @deprecated use `ApplyUpdatesRequest$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesRequest$inboundSchema; + /** @deprecated use `ApplyUpdatesRequest$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesRequest$outboundSchema; + /** @deprecated use `ApplyUpdatesRequest$Outbound` instead. */ + export type Outbound = ApplyUpdatesRequest$Outbound; } /** @internal */ export const ApplyUpdatesResponse$inboundSchema: z.ZodType< - ApplyUpdatesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + ApplyUpdatesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type ApplyUpdatesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const ApplyUpdatesResponse$outboundSchema: z.ZodType< - ApplyUpdatesResponse$Outbound, - z.ZodTypeDef, - ApplyUpdatesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + ApplyUpdatesResponse$Outbound, + z.ZodTypeDef, + ApplyUpdatesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ApplyUpdatesResponse$ { - /** @deprecated use `ApplyUpdatesResponse$inboundSchema` instead. */ - export const inboundSchema = ApplyUpdatesResponse$inboundSchema; - /** @deprecated use `ApplyUpdatesResponse$outboundSchema` instead. */ - export const outboundSchema = ApplyUpdatesResponse$outboundSchema; - /** @deprecated use `ApplyUpdatesResponse$Outbound` instead. */ - export type Outbound = ApplyUpdatesResponse$Outbound; + /** @deprecated use `ApplyUpdatesResponse$inboundSchema` instead. */ + export const inboundSchema = ApplyUpdatesResponse$inboundSchema; + /** @deprecated use `ApplyUpdatesResponse$outboundSchema` instead. */ + export const outboundSchema = ApplyUpdatesResponse$outboundSchema; + /** @deprecated use `ApplyUpdatesResponse$Outbound` instead. */ + export type Outbound = ApplyUpdatesResponse$Outbound; } diff --git a/src/sdk/models/operations/cancelserveractivities.ts b/src/sdk/models/operations/cancelserveractivities.ts index 2b188d38..5a8df785 100644 --- a/src/sdk/models/operations/cancelserveractivities.ts +++ b/src/sdk/models/operations/cancelserveractivities.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type CancelServerActivitiesRequest = { - /** - * The UUID of the activity to cancel. - */ - activityUUID: string; + /** + * The UUID of the activity to cancel. + */ + activityUUID: string; }; export type CancelServerActivitiesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const CancelServerActivitiesRequest$inboundSchema: z.ZodType< - CancelServerActivitiesRequest, - z.ZodTypeDef, - unknown + CancelServerActivitiesRequest, + z.ZodTypeDef, + unknown > = z.object({ - activityUUID: z.string(), + activityUUID: z.string(), }); /** @internal */ export type CancelServerActivitiesRequest$Outbound = { - activityUUID: string; + activityUUID: string; }; /** @internal */ export const CancelServerActivitiesRequest$outboundSchema: z.ZodType< - CancelServerActivitiesRequest$Outbound, - z.ZodTypeDef, - CancelServerActivitiesRequest + CancelServerActivitiesRequest$Outbound, + z.ZodTypeDef, + CancelServerActivitiesRequest > = z.object({ - activityUUID: z.string(), + activityUUID: z.string(), }); /** @@ -55,70 +55,66 @@ export const CancelServerActivitiesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelServerActivitiesRequest$ { - /** @deprecated use `CancelServerActivitiesRequest$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesRequest$inboundSchema; - /** @deprecated use `CancelServerActivitiesRequest$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesRequest$outboundSchema; - /** @deprecated use `CancelServerActivitiesRequest$Outbound` instead. */ - export type Outbound = CancelServerActivitiesRequest$Outbound; + /** @deprecated use `CancelServerActivitiesRequest$inboundSchema` instead. */ + export const inboundSchema = CancelServerActivitiesRequest$inboundSchema; + /** @deprecated use `CancelServerActivitiesRequest$outboundSchema` instead. */ + export const outboundSchema = CancelServerActivitiesRequest$outboundSchema; + /** @deprecated use `CancelServerActivitiesRequest$Outbound` instead. */ + export type Outbound = CancelServerActivitiesRequest$Outbound; } /** @internal */ export const CancelServerActivitiesResponse$inboundSchema: z.ZodType< - CancelServerActivitiesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CancelServerActivitiesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CancelServerActivitiesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const CancelServerActivitiesResponse$outboundSchema: z.ZodType< - CancelServerActivitiesResponse$Outbound, - z.ZodTypeDef, - CancelServerActivitiesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CancelServerActivitiesResponse$Outbound, + z.ZodTypeDef, + CancelServerActivitiesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CancelServerActivitiesResponse$ { - /** @deprecated use `CancelServerActivitiesResponse$inboundSchema` instead. */ - export const inboundSchema = CancelServerActivitiesResponse$inboundSchema; - /** @deprecated use `CancelServerActivitiesResponse$outboundSchema` instead. */ - export const outboundSchema = CancelServerActivitiesResponse$outboundSchema; - /** @deprecated use `CancelServerActivitiesResponse$Outbound` instead. */ - export type Outbound = CancelServerActivitiesResponse$Outbound; + /** @deprecated use `CancelServerActivitiesResponse$inboundSchema` instead. */ + export const inboundSchema = CancelServerActivitiesResponse$inboundSchema; + /** @deprecated use `CancelServerActivitiesResponse$outboundSchema` instead. */ + export const outboundSchema = CancelServerActivitiesResponse$outboundSchema; + /** @deprecated use `CancelServerActivitiesResponse$Outbound` instead. */ + export type Outbound = CancelServerActivitiesResponse$Outbound; } diff --git a/src/sdk/models/operations/checkforupdates.ts b/src/sdk/models/operations/checkforupdates.ts index df64422a..504bdcf8 100644 --- a/src/sdk/models/operations/checkforupdates.ts +++ b/src/sdk/models/operations/checkforupdates.ts @@ -2,77 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Indicate that you want to start download any updates found. */ export enum Download { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type CheckForUpdatesRequest = { - /** - * Indicate that you want to start download any updates found. - */ - download?: Download | undefined; + /** + * Indicate that you want to start download any updates found. + */ + download?: Download | undefined; }; export type CheckForUpdatesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const Download$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Download); +export const Download$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Download); /** @internal */ -export const Download$outboundSchema: z.ZodNativeEnum = Download$inboundSchema; +export const Download$outboundSchema: z.ZodNativeEnum = + Download$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Download$ { - /** @deprecated use `Download$inboundSchema` instead. */ - export const inboundSchema = Download$inboundSchema; - /** @deprecated use `Download$outboundSchema` instead. */ - export const outboundSchema = Download$outboundSchema; + /** @deprecated use `Download$inboundSchema` instead. */ + export const inboundSchema = Download$inboundSchema; + /** @deprecated use `Download$outboundSchema` instead. */ + export const outboundSchema = Download$outboundSchema; } /** @internal */ export const CheckForUpdatesRequest$inboundSchema: z.ZodType< - CheckForUpdatesRequest, - z.ZodTypeDef, - unknown + CheckForUpdatesRequest, + z.ZodTypeDef, + unknown > = z.object({ - download: Download$inboundSchema.optional(), + download: Download$inboundSchema.optional(), }); /** @internal */ export type CheckForUpdatesRequest$Outbound = { - download?: number | undefined; + download?: number | undefined; }; /** @internal */ export const CheckForUpdatesRequest$outboundSchema: z.ZodType< - CheckForUpdatesRequest$Outbound, - z.ZodTypeDef, - CheckForUpdatesRequest + CheckForUpdatesRequest$Outbound, + z.ZodTypeDef, + CheckForUpdatesRequest > = z.object({ - download: Download$outboundSchema.optional(), + download: Download$outboundSchema.optional(), }); /** @@ -80,70 +82,66 @@ export const CheckForUpdatesRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckForUpdatesRequest$ { - /** @deprecated use `CheckForUpdatesRequest$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesRequest$inboundSchema; - /** @deprecated use `CheckForUpdatesRequest$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesRequest$outboundSchema; - /** @deprecated use `CheckForUpdatesRequest$Outbound` instead. */ - export type Outbound = CheckForUpdatesRequest$Outbound; + /** @deprecated use `CheckForUpdatesRequest$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesRequest$inboundSchema; + /** @deprecated use `CheckForUpdatesRequest$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesRequest$outboundSchema; + /** @deprecated use `CheckForUpdatesRequest$Outbound` instead. */ + export type Outbound = CheckForUpdatesRequest$Outbound; } /** @internal */ export const CheckForUpdatesResponse$inboundSchema: z.ZodType< - CheckForUpdatesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CheckForUpdatesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CheckForUpdatesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const CheckForUpdatesResponse$outboundSchema: z.ZodType< - CheckForUpdatesResponse$Outbound, - z.ZodTypeDef, - CheckForUpdatesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CheckForUpdatesResponse$Outbound, + z.ZodTypeDef, + CheckForUpdatesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CheckForUpdatesResponse$ { - /** @deprecated use `CheckForUpdatesResponse$inboundSchema` instead. */ - export const inboundSchema = CheckForUpdatesResponse$inboundSchema; - /** @deprecated use `CheckForUpdatesResponse$outboundSchema` instead. */ - export const outboundSchema = CheckForUpdatesResponse$outboundSchema; - /** @deprecated use `CheckForUpdatesResponse$Outbound` instead. */ - export type Outbound = CheckForUpdatesResponse$Outbound; + /** @deprecated use `CheckForUpdatesResponse$inboundSchema` instead. */ + export const inboundSchema = CheckForUpdatesResponse$inboundSchema; + /** @deprecated use `CheckForUpdatesResponse$outboundSchema` instead. */ + export const outboundSchema = CheckForUpdatesResponse$outboundSchema; + /** @deprecated use `CheckForUpdatesResponse$Outbound` instead. */ + export type Outbound = CheckForUpdatesResponse$Outbound; } diff --git a/src/sdk/models/operations/clearplaylistcontents.ts b/src/sdk/models/operations/clearplaylistcontents.ts index 3aca3bde..bee8b184 100644 --- a/src/sdk/models/operations/clearplaylistcontents.ts +++ b/src/sdk/models/operations/clearplaylistcontents.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ClearPlaylistContentsRequest = { - /** - * the ID of the playlist - */ - playlistID: number; + /** + * the ID of the playlist + */ + playlistID: number; }; export type ClearPlaylistContentsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const ClearPlaylistContentsRequest$inboundSchema: z.ZodType< - ClearPlaylistContentsRequest, - z.ZodTypeDef, - unknown + ClearPlaylistContentsRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @internal */ export type ClearPlaylistContentsRequest$Outbound = { - playlistID: number; + playlistID: number; }; /** @internal */ export const ClearPlaylistContentsRequest$outboundSchema: z.ZodType< - ClearPlaylistContentsRequest$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsRequest + ClearPlaylistContentsRequest$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsRequest > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @@ -55,70 +55,66 @@ export const ClearPlaylistContentsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ClearPlaylistContentsRequest$ { - /** @deprecated use `ClearPlaylistContentsRequest$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsRequest$inboundSchema; - /** @deprecated use `ClearPlaylistContentsRequest$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsRequest$outboundSchema; - /** @deprecated use `ClearPlaylistContentsRequest$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsRequest$Outbound; + /** @deprecated use `ClearPlaylistContentsRequest$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistContentsRequest$inboundSchema; + /** @deprecated use `ClearPlaylistContentsRequest$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistContentsRequest$outboundSchema; + /** @deprecated use `ClearPlaylistContentsRequest$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsRequest$Outbound; } /** @internal */ export const ClearPlaylistContentsResponse$inboundSchema: z.ZodType< - ClearPlaylistContentsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + ClearPlaylistContentsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type ClearPlaylistContentsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const ClearPlaylistContentsResponse$outboundSchema: z.ZodType< - ClearPlaylistContentsResponse$Outbound, - z.ZodTypeDef, - ClearPlaylistContentsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + ClearPlaylistContentsResponse$Outbound, + z.ZodTypeDef, + ClearPlaylistContentsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ClearPlaylistContentsResponse$ { - /** @deprecated use `ClearPlaylistContentsResponse$inboundSchema` instead. */ - export const inboundSchema = ClearPlaylistContentsResponse$inboundSchema; - /** @deprecated use `ClearPlaylistContentsResponse$outboundSchema` instead. */ - export const outboundSchema = ClearPlaylistContentsResponse$outboundSchema; - /** @deprecated use `ClearPlaylistContentsResponse$Outbound` instead. */ - export type Outbound = ClearPlaylistContentsResponse$Outbound; + /** @deprecated use `ClearPlaylistContentsResponse$inboundSchema` instead. */ + export const inboundSchema = ClearPlaylistContentsResponse$inboundSchema; + /** @deprecated use `ClearPlaylistContentsResponse$outboundSchema` instead. */ + export const outboundSchema = ClearPlaylistContentsResponse$outboundSchema; + /** @deprecated use `ClearPlaylistContentsResponse$Outbound` instead. */ + export type Outbound = ClearPlaylistContentsResponse$Outbound; } diff --git a/src/sdk/models/operations/createplaylist.ts b/src/sdk/models/operations/createplaylist.ts index 310ffa1d..c51b6196 100644 --- a/src/sdk/models/operations/createplaylist.ts +++ b/src/sdk/models/operations/createplaylist.ts @@ -2,107 +2,107 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * type of playlist to create */ export enum CreatePlaylistQueryParamType { - Audio = "audio", - Video = "video", - Photo = "photo", + Audio = "audio", + Video = "video", + Photo = "photo", } /** * whether the playlist is smart or not */ export enum Smart { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type CreatePlaylistRequest = { - /** - * name of the playlist - */ - title: string; - /** - * type of playlist to create - */ - type: CreatePlaylistQueryParamType; - /** - * whether the playlist is smart or not - */ - smart: Smart; - /** - * the content URI for the playlist - */ - uri: string; - /** - * the play queue to copy to a playlist - */ - playQueueID?: number | undefined; + /** + * name of the playlist + */ + title: string; + /** + * type of playlist to create + */ + type: CreatePlaylistQueryParamType; + /** + * whether the playlist is smart or not + */ + smart: Smart; + /** + * the content URI for the playlist + */ + uri: string; + /** + * the play queue to copy to a playlist + */ + playQueueID?: number | undefined; }; export type CreatePlaylistMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + composite?: string | undefined; + duration?: number | undefined; }; export type CreatePlaylistMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; /** * returns all playlists */ export type CreatePlaylistResponseBody = { - mediaContainer?: CreatePlaylistMediaContainer | undefined; + mediaContainer?: CreatePlaylistMediaContainer | undefined; }; export type CreatePlaylistResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * returns all playlists - */ - object?: CreatePlaylistResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * returns all playlists + */ + object?: CreatePlaylistResponseBody | undefined; }; /** @internal */ export const CreatePlaylistQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof CreatePlaylistQueryParamType + typeof CreatePlaylistQueryParamType > = z.nativeEnum(CreatePlaylistQueryParamType); /** @internal */ export const CreatePlaylistQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof CreatePlaylistQueryParamType + typeof CreatePlaylistQueryParamType > = CreatePlaylistQueryParamType$inboundSchema; /** @@ -110,62 +110,65 @@ export const CreatePlaylistQueryParamType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistQueryParamType$ { - /** @deprecated use `CreatePlaylistQueryParamType$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistQueryParamType$inboundSchema; - /** @deprecated use `CreatePlaylistQueryParamType$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistQueryParamType$outboundSchema; + /** @deprecated use `CreatePlaylistQueryParamType$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistQueryParamType$inboundSchema; + /** @deprecated use `CreatePlaylistQueryParamType$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistQueryParamType$outboundSchema; } /** @internal */ -export const Smart$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Smart); +export const Smart$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Smart, +); /** @internal */ -export const Smart$outboundSchema: z.ZodNativeEnum = Smart$inboundSchema; +export const Smart$outboundSchema: z.ZodNativeEnum = + Smart$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Smart$ { - /** @deprecated use `Smart$inboundSchema` instead. */ - export const inboundSchema = Smart$inboundSchema; - /** @deprecated use `Smart$outboundSchema` instead. */ - export const outboundSchema = Smart$outboundSchema; + /** @deprecated use `Smart$inboundSchema` instead. */ + export const inboundSchema = Smart$inboundSchema; + /** @deprecated use `Smart$outboundSchema` instead. */ + export const outboundSchema = Smart$outboundSchema; } /** @internal */ export const CreatePlaylistRequest$inboundSchema: z.ZodType< - CreatePlaylistRequest, - z.ZodTypeDef, - unknown + CreatePlaylistRequest, + z.ZodTypeDef, + unknown > = z.object({ - title: z.string(), - type: CreatePlaylistQueryParamType$inboundSchema, - smart: Smart$inboundSchema, - uri: z.string(), - playQueueID: z.number().optional(), + title: z.string(), + type: CreatePlaylistQueryParamType$inboundSchema, + smart: Smart$inboundSchema, + uri: z.string(), + playQueueID: z.number().optional(), }); /** @internal */ export type CreatePlaylistRequest$Outbound = { - title: string; - type: string; - smart: number; - uri: string; - playQueueID?: number | undefined; + title: string; + type: string; + smart: number; + uri: string; + playQueueID?: number | undefined; }; /** @internal */ export const CreatePlaylistRequest$outboundSchema: z.ZodType< - CreatePlaylistRequest$Outbound, - z.ZodTypeDef, - CreatePlaylistRequest + CreatePlaylistRequest$Outbound, + z.ZodTypeDef, + CreatePlaylistRequest > = z.object({ - title: z.string(), - type: CreatePlaylistQueryParamType$outboundSchema, - smart: Smart$outboundSchema, - uri: z.string(), - playQueueID: z.number().optional(), + title: z.string(), + type: CreatePlaylistQueryParamType$outboundSchema, + smart: Smart$outboundSchema, + uri: z.string(), + playQueueID: z.number().optional(), }); /** @@ -173,80 +176,80 @@ export const CreatePlaylistRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistRequest$ { - /** @deprecated use `CreatePlaylistRequest$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistRequest$inboundSchema; - /** @deprecated use `CreatePlaylistRequest$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistRequest$outboundSchema; - /** @deprecated use `CreatePlaylistRequest$Outbound` instead. */ - export type Outbound = CreatePlaylistRequest$Outbound; + /** @deprecated use `CreatePlaylistRequest$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistRequest$inboundSchema; + /** @deprecated use `CreatePlaylistRequest$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistRequest$outboundSchema; + /** @deprecated use `CreatePlaylistRequest$Outbound` instead. */ + export type Outbound = CreatePlaylistRequest$Outbound; } /** @internal */ export const CreatePlaylistMetadata$inboundSchema: z.ZodType< - CreatePlaylistMetadata, - z.ZodTypeDef, - unknown + CreatePlaylistMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), }); /** @internal */ export type CreatePlaylistMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + composite?: string | undefined; + duration?: number | undefined; }; /** @internal */ export const CreatePlaylistMetadata$outboundSchema: z.ZodType< - CreatePlaylistMetadata$Outbound, - z.ZodTypeDef, - CreatePlaylistMetadata + CreatePlaylistMetadata$Outbound, + z.ZodTypeDef, + CreatePlaylistMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), }); /** @@ -254,172 +257,164 @@ export const CreatePlaylistMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistMetadata$ { - /** @deprecated use `CreatePlaylistMetadata$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistMetadata$inboundSchema; - /** @deprecated use `CreatePlaylistMetadata$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistMetadata$outboundSchema; - /** @deprecated use `CreatePlaylistMetadata$Outbound` instead. */ - export type Outbound = CreatePlaylistMetadata$Outbound; + /** @deprecated use `CreatePlaylistMetadata$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistMetadata$inboundSchema; + /** @deprecated use `CreatePlaylistMetadata$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistMetadata$outboundSchema; + /** @deprecated use `CreatePlaylistMetadata$Outbound` instead. */ + export type Outbound = CreatePlaylistMetadata$Outbound; } /** @internal */ export const CreatePlaylistMediaContainer$inboundSchema: z.ZodType< - CreatePlaylistMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => CreatePlaylistMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + CreatePlaylistMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => CreatePlaylistMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type CreatePlaylistMediaContainer$Outbound = { - size?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const CreatePlaylistMediaContainer$outboundSchema: z.ZodType< - CreatePlaylistMediaContainer$Outbound, - z.ZodTypeDef, - CreatePlaylistMediaContainer -> = z - .object({ - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => CreatePlaylistMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + CreatePlaylistMediaContainer$Outbound, + z.ZodTypeDef, + CreatePlaylistMediaContainer +> = z.object({ + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => CreatePlaylistMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistMediaContainer$ { - /** @deprecated use `CreatePlaylistMediaContainer$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistMediaContainer$inboundSchema; - /** @deprecated use `CreatePlaylistMediaContainer$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistMediaContainer$outboundSchema; - /** @deprecated use `CreatePlaylistMediaContainer$Outbound` instead. */ - export type Outbound = CreatePlaylistMediaContainer$Outbound; + /** @deprecated use `CreatePlaylistMediaContainer$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistMediaContainer$inboundSchema; + /** @deprecated use `CreatePlaylistMediaContainer$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistMediaContainer$outboundSchema; + /** @deprecated use `CreatePlaylistMediaContainer$Outbound` instead. */ + export type Outbound = CreatePlaylistMediaContainer$Outbound; } /** @internal */ export const CreatePlaylistResponseBody$inboundSchema: z.ZodType< - CreatePlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => CreatePlaylistMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + CreatePlaylistResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => CreatePlaylistMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type CreatePlaylistResponseBody$Outbound = { - MediaContainer?: CreatePlaylistMediaContainer$Outbound | undefined; + MediaContainer?: CreatePlaylistMediaContainer$Outbound | undefined; }; /** @internal */ export const CreatePlaylistResponseBody$outboundSchema: z.ZodType< - CreatePlaylistResponseBody$Outbound, - z.ZodTypeDef, - CreatePlaylistResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => CreatePlaylistMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + CreatePlaylistResponseBody$Outbound, + z.ZodTypeDef, + CreatePlaylistResponseBody +> = z.object({ + mediaContainer: z.lazy(() => CreatePlaylistMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistResponseBody$ { - /** @deprecated use `CreatePlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistResponseBody$inboundSchema; - /** @deprecated use `CreatePlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistResponseBody$outboundSchema; - /** @deprecated use `CreatePlaylistResponseBody$Outbound` instead. */ - export type Outbound = CreatePlaylistResponseBody$Outbound; + /** @deprecated use `CreatePlaylistResponseBody$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistResponseBody$inboundSchema; + /** @deprecated use `CreatePlaylistResponseBody$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistResponseBody$outboundSchema; + /** @deprecated use `CreatePlaylistResponseBody$Outbound` instead. */ + export type Outbound = CreatePlaylistResponseBody$Outbound; } /** @internal */ export const CreatePlaylistResponse$inboundSchema: z.ZodType< - CreatePlaylistResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => CreatePlaylistResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + CreatePlaylistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => CreatePlaylistResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type CreatePlaylistResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: CreatePlaylistResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: CreatePlaylistResponseBody$Outbound | undefined; }; /** @internal */ export const CreatePlaylistResponse$outboundSchema: z.ZodType< - CreatePlaylistResponse$Outbound, - z.ZodTypeDef, - CreatePlaylistResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => CreatePlaylistResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + CreatePlaylistResponse$Outbound, + z.ZodTypeDef, + CreatePlaylistResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => CreatePlaylistResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreatePlaylistResponse$ { - /** @deprecated use `CreatePlaylistResponse$inboundSchema` instead. */ - export const inboundSchema = CreatePlaylistResponse$inboundSchema; - /** @deprecated use `CreatePlaylistResponse$outboundSchema` instead. */ - export const outboundSchema = CreatePlaylistResponse$outboundSchema; - /** @deprecated use `CreatePlaylistResponse$Outbound` instead. */ - export type Outbound = CreatePlaylistResponse$Outbound; + /** @deprecated use `CreatePlaylistResponse$inboundSchema` instead. */ + export const inboundSchema = CreatePlaylistResponse$inboundSchema; + /** @deprecated use `CreatePlaylistResponse$outboundSchema` instead. */ + export const outboundSchema = CreatePlaylistResponse$outboundSchema; + /** @deprecated use `CreatePlaylistResponse$Outbound` instead. */ + export type Outbound = CreatePlaylistResponse$Outbound; } diff --git a/src/sdk/models/operations/deletelibrary.ts b/src/sdk/models/operations/deletelibrary.ts index 3a89a5c3..2aaa9986 100644 --- a/src/sdk/models/operations/deletelibrary.ts +++ b/src/sdk/models/operations/deletelibrary.ts @@ -2,56 +2,55 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeleteLibraryRequest = { - /** - * The unique key of the Plex library. - * - * @remarks - * Note: This is unique in the context of the Plex server. - * - */ - sectionKey: number; + /** + * The unique key of the Plex library. + * + * @remarks + * Note: This is unique in the context of the Plex server. + */ + sectionKey: number; }; export type DeleteLibraryResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const DeleteLibraryRequest$inboundSchema: z.ZodType< - DeleteLibraryRequest, - z.ZodTypeDef, - unknown + DeleteLibraryRequest, + z.ZodTypeDef, + unknown > = z.object({ - sectionKey: z.number().int(), + sectionKey: z.number().int(), }); /** @internal */ export type DeleteLibraryRequest$Outbound = { - sectionKey: number; + sectionKey: number; }; /** @internal */ export const DeleteLibraryRequest$outboundSchema: z.ZodType< - DeleteLibraryRequest$Outbound, - z.ZodTypeDef, - DeleteLibraryRequest + DeleteLibraryRequest$Outbound, + z.ZodTypeDef, + DeleteLibraryRequest > = z.object({ - sectionKey: z.number().int(), + sectionKey: z.number().int(), }); /** @@ -59,70 +58,66 @@ export const DeleteLibraryRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteLibraryRequest$ { - /** @deprecated use `DeleteLibraryRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryRequest$inboundSchema; - /** @deprecated use `DeleteLibraryRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryRequest$outboundSchema; - /** @deprecated use `DeleteLibraryRequest$Outbound` instead. */ - export type Outbound = DeleteLibraryRequest$Outbound; + /** @deprecated use `DeleteLibraryRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryRequest$inboundSchema; + /** @deprecated use `DeleteLibraryRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryRequest$outboundSchema; + /** @deprecated use `DeleteLibraryRequest$Outbound` instead. */ + export type Outbound = DeleteLibraryRequest$Outbound; } /** @internal */ export const DeleteLibraryResponse$inboundSchema: z.ZodType< - DeleteLibraryResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeleteLibraryResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeleteLibraryResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const DeleteLibraryResponse$outboundSchema: z.ZodType< - DeleteLibraryResponse$Outbound, - z.ZodTypeDef, - DeleteLibraryResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeleteLibraryResponse$Outbound, + z.ZodTypeDef, + DeleteLibraryResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeleteLibraryResponse$ { - /** @deprecated use `DeleteLibraryResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteLibraryResponse$inboundSchema; - /** @deprecated use `DeleteLibraryResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteLibraryResponse$outboundSchema; - /** @deprecated use `DeleteLibraryResponse$Outbound` instead. */ - export type Outbound = DeleteLibraryResponse$Outbound; + /** @deprecated use `DeleteLibraryResponse$inboundSchema` instead. */ + export const inboundSchema = DeleteLibraryResponse$inboundSchema; + /** @deprecated use `DeleteLibraryResponse$outboundSchema` instead. */ + export const outboundSchema = DeleteLibraryResponse$outboundSchema; + /** @deprecated use `DeleteLibraryResponse$Outbound` instead. */ + export type Outbound = DeleteLibraryResponse$Outbound; } diff --git a/src/sdk/models/operations/deleteplaylist.ts b/src/sdk/models/operations/deleteplaylist.ts index a0548fe9..290d348b 100644 --- a/src/sdk/models/operations/deleteplaylist.ts +++ b/src/sdk/models/operations/deleteplaylist.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type DeletePlaylistRequest = { - /** - * the ID of the playlist - */ - playlistID: number; + /** + * the ID of the playlist + */ + playlistID: number; }; export type DeletePlaylistResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const DeletePlaylistRequest$inboundSchema: z.ZodType< - DeletePlaylistRequest, - z.ZodTypeDef, - unknown + DeletePlaylistRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @internal */ export type DeletePlaylistRequest$Outbound = { - playlistID: number; + playlistID: number; }; /** @internal */ export const DeletePlaylistRequest$outboundSchema: z.ZodType< - DeletePlaylistRequest$Outbound, - z.ZodTypeDef, - DeletePlaylistRequest + DeletePlaylistRequest$Outbound, + z.ZodTypeDef, + DeletePlaylistRequest > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @@ -55,70 +55,66 @@ export const DeletePlaylistRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePlaylistRequest$ { - /** @deprecated use `DeletePlaylistRequest$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistRequest$inboundSchema; - /** @deprecated use `DeletePlaylistRequest$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistRequest$outboundSchema; - /** @deprecated use `DeletePlaylistRequest$Outbound` instead. */ - export type Outbound = DeletePlaylistRequest$Outbound; + /** @deprecated use `DeletePlaylistRequest$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistRequest$inboundSchema; + /** @deprecated use `DeletePlaylistRequest$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistRequest$outboundSchema; + /** @deprecated use `DeletePlaylistRequest$Outbound` instead. */ + export type Outbound = DeletePlaylistRequest$Outbound; } /** @internal */ export const DeletePlaylistResponse$inboundSchema: z.ZodType< - DeletePlaylistResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + DeletePlaylistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type DeletePlaylistResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const DeletePlaylistResponse$outboundSchema: z.ZodType< - DeletePlaylistResponse$Outbound, - z.ZodTypeDef, - DeletePlaylistResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + DeletePlaylistResponse$Outbound, + z.ZodTypeDef, + DeletePlaylistResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DeletePlaylistResponse$ { - /** @deprecated use `DeletePlaylistResponse$inboundSchema` instead. */ - export const inboundSchema = DeletePlaylistResponse$inboundSchema; - /** @deprecated use `DeletePlaylistResponse$outboundSchema` instead. */ - export const outboundSchema = DeletePlaylistResponse$outboundSchema; - /** @deprecated use `DeletePlaylistResponse$Outbound` instead. */ - export type Outbound = DeletePlaylistResponse$Outbound; + /** @deprecated use `DeletePlaylistResponse$inboundSchema` instead. */ + export const inboundSchema = DeletePlaylistResponse$inboundSchema; + /** @deprecated use `DeletePlaylistResponse$outboundSchema` instead. */ + export const outboundSchema = DeletePlaylistResponse$outboundSchema; + /** @deprecated use `DeletePlaylistResponse$Outbound` instead. */ + export type Outbound = DeletePlaylistResponse$Outbound; } diff --git a/src/sdk/models/operations/enablepapertrail.ts b/src/sdk/models/operations/enablepapertrail.ts index 441b022d..78e0fa94 100644 --- a/src/sdk/models/operations/enablepapertrail.ts +++ b/src/sdk/models/operations/enablepapertrail.ts @@ -2,80 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type EnablePaperTrailResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const EnablePaperTrailResponse$inboundSchema: z.ZodType< - EnablePaperTrailResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + EnablePaperTrailResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type EnablePaperTrailResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const EnablePaperTrailResponse$outboundSchema: z.ZodType< - EnablePaperTrailResponse$Outbound, - z.ZodTypeDef, - EnablePaperTrailResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + EnablePaperTrailResponse$Outbound, + z.ZodTypeDef, + EnablePaperTrailResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace EnablePaperTrailResponse$ { - /** @deprecated use `EnablePaperTrailResponse$inboundSchema` instead. */ - export const inboundSchema = EnablePaperTrailResponse$inboundSchema; - /** @deprecated use `EnablePaperTrailResponse$outboundSchema` instead. */ - export const outboundSchema = EnablePaperTrailResponse$outboundSchema; - /** @deprecated use `EnablePaperTrailResponse$Outbound` instead. */ - export type Outbound = EnablePaperTrailResponse$Outbound; + /** @deprecated use `EnablePaperTrailResponse$inboundSchema` instead. */ + export const inboundSchema = EnablePaperTrailResponse$inboundSchema; + /** @deprecated use `EnablePaperTrailResponse$outboundSchema` instead. */ + export const outboundSchema = EnablePaperTrailResponse$outboundSchema; + /** @deprecated use `EnablePaperTrailResponse$Outbound` instead. */ + export type Outbound = EnablePaperTrailResponse$Outbound; } diff --git a/src/sdk/models/operations/getalllibraries.ts b/src/sdk/models/operations/getalllibraries.ts index dd8a84e8..7ef515cb 100644 --- a/src/sdk/models/operations/getalllibraries.ts +++ b/src/sdk/models/operations/getalllibraries.ts @@ -2,384 +2,379 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Location = { - id?: number | undefined; - path?: string | undefined; + id?: number | undefined; + path?: string | undefined; }; export type GetAllLibrariesDirectory = { - allowSync?: boolean | undefined; - art?: string | undefined; - composite?: string | undefined; - filters?: boolean | undefined; - refreshing?: boolean | undefined; - thumb?: string | undefined; - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - agent?: string | undefined; - scanner?: string | undefined; - language?: string | undefined; - uuid?: string | undefined; - /** - * Unix epoch datetime - */ - updatedAt?: number | undefined; - /** - * Unix epoch datetime - */ - createdAt?: number | undefined; - /** - * Unix epoch datetime - */ - scannedAt?: number | undefined; - content?: boolean | undefined; - directory?: boolean | undefined; - contentChangedAt?: number | undefined; - hidden?: number | undefined; - location?: Array | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + composite?: string | undefined; + filters?: boolean | undefined; + refreshing?: boolean | undefined; + thumb?: string | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + agent?: string | undefined; + scanner?: string | undefined; + language?: string | undefined; + uuid?: string | undefined; + /** + * Unix epoch datetime + */ + updatedAt?: number | undefined; + /** + * Unix epoch datetime + */ + createdAt?: number | undefined; + /** + * Unix epoch datetime + */ + scannedAt?: number | undefined; + content?: boolean | undefined; + directory?: boolean | undefined; + contentChangedAt?: number | undefined; + hidden?: number | undefined; + location?: Array | undefined; }; export type GetAllLibrariesMediaContainer = { - size: number; - allowSync: boolean; - title1: string; - directory?: Array | undefined; + size: number; + allowSync: boolean; + title1: string; + directory?: Array | undefined; }; /** * The libraries available on the Server */ export type GetAllLibrariesResponseBody = { - mediaContainer?: GetAllLibrariesMediaContainer | undefined; + mediaContainer?: GetAllLibrariesMediaContainer | undefined; }; export type GetAllLibrariesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The libraries available on the Server - */ - object?: GetAllLibrariesResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The libraries available on the Server + */ + object?: GetAllLibrariesResponseBody | undefined; }; /** @internal */ -export const Location$inboundSchema: z.ZodType = z.object({ - id: z.number().int().optional(), - path: z.string().optional(), +export const Location$inboundSchema: z.ZodType< + Location, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + path: z.string().optional(), }); /** @internal */ export type Location$Outbound = { - id?: number | undefined; - path?: string | undefined; + id?: number | undefined; + path?: string | undefined; }; /** @internal */ -export const Location$outboundSchema: z.ZodType = - z.object({ - id: z.number().int().optional(), - path: z.string().optional(), - }); +export const Location$outboundSchema: z.ZodType< + Location$Outbound, + z.ZodTypeDef, + Location +> = z.object({ + id: z.number().int().optional(), + path: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Location$ { - /** @deprecated use `Location$inboundSchema` instead. */ - export const inboundSchema = Location$inboundSchema; - /** @deprecated use `Location$outboundSchema` instead. */ - export const outboundSchema = Location$outboundSchema; - /** @deprecated use `Location$Outbound` instead. */ - export type Outbound = Location$Outbound; + /** @deprecated use `Location$inboundSchema` instead. */ + export const inboundSchema = Location$inboundSchema; + /** @deprecated use `Location$outboundSchema` instead. */ + export const outboundSchema = Location$outboundSchema; + /** @deprecated use `Location$Outbound` instead. */ + export type Outbound = Location$Outbound; } /** @internal */ export const GetAllLibrariesDirectory$inboundSchema: z.ZodType< - GetAllLibrariesDirectory, - z.ZodTypeDef, - unknown -> = z - .object({ - allowSync: z.boolean().optional(), - art: z.string().optional(), - composite: z.string().optional(), - filters: z.boolean().optional(), - refreshing: z.boolean().optional(), - thumb: z.string().optional(), - key: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - agent: z.string().optional(), - scanner: z.string().optional(), - language: z.string().optional(), - uuid: z.string().optional(), - updatedAt: z.number().int().optional(), - createdAt: z.number().int().optional(), - scannedAt: z.number().int().optional(), - content: z.boolean().optional(), - directory: z.boolean().optional(), - contentChangedAt: z.number().int().optional(), - hidden: z.number().int().optional(), - Location: z.array(z.lazy(() => Location$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Location: "location", - }); - }); + GetAllLibrariesDirectory, + z.ZodTypeDef, + unknown +> = z.object({ + allowSync: z.boolean().optional(), + art: z.string().optional(), + composite: z.string().optional(), + filters: z.boolean().optional(), + refreshing: z.boolean().optional(), + thumb: z.string().optional(), + key: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + agent: z.string().optional(), + scanner: z.string().optional(), + language: z.string().optional(), + uuid: z.string().optional(), + updatedAt: z.number().int().optional(), + createdAt: z.number().int().optional(), + scannedAt: z.number().int().optional(), + content: z.boolean().optional(), + directory: z.boolean().optional(), + contentChangedAt: z.number().int().optional(), + hidden: z.number().int().optional(), + Location: z.array(z.lazy(() => Location$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Location": "location", + }); +}); /** @internal */ export type GetAllLibrariesDirectory$Outbound = { - allowSync?: boolean | undefined; - art?: string | undefined; - composite?: string | undefined; - filters?: boolean | undefined; - refreshing?: boolean | undefined; - thumb?: string | undefined; - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - agent?: string | undefined; - scanner?: string | undefined; - language?: string | undefined; - uuid?: string | undefined; - updatedAt?: number | undefined; - createdAt?: number | undefined; - scannedAt?: number | undefined; - content?: boolean | undefined; - directory?: boolean | undefined; - contentChangedAt?: number | undefined; - hidden?: number | undefined; - Location?: Array | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + composite?: string | undefined; + filters?: boolean | undefined; + refreshing?: boolean | undefined; + thumb?: string | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + agent?: string | undefined; + scanner?: string | undefined; + language?: string | undefined; + uuid?: string | undefined; + updatedAt?: number | undefined; + createdAt?: number | undefined; + scannedAt?: number | undefined; + content?: boolean | undefined; + directory?: boolean | undefined; + contentChangedAt?: number | undefined; + hidden?: number | undefined; + Location?: Array | undefined; }; /** @internal */ export const GetAllLibrariesDirectory$outboundSchema: z.ZodType< - GetAllLibrariesDirectory$Outbound, - z.ZodTypeDef, - GetAllLibrariesDirectory -> = z - .object({ - allowSync: z.boolean().optional(), - art: z.string().optional(), - composite: z.string().optional(), - filters: z.boolean().optional(), - refreshing: z.boolean().optional(), - thumb: z.string().optional(), - key: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - agent: z.string().optional(), - scanner: z.string().optional(), - language: z.string().optional(), - uuid: z.string().optional(), - updatedAt: z.number().int().optional(), - createdAt: z.number().int().optional(), - scannedAt: z.number().int().optional(), - content: z.boolean().optional(), - directory: z.boolean().optional(), - contentChangedAt: z.number().int().optional(), - hidden: z.number().int().optional(), - location: z.array(z.lazy(() => Location$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - location: "Location", - }); - }); + GetAllLibrariesDirectory$Outbound, + z.ZodTypeDef, + GetAllLibrariesDirectory +> = z.object({ + allowSync: z.boolean().optional(), + art: z.string().optional(), + composite: z.string().optional(), + filters: z.boolean().optional(), + refreshing: z.boolean().optional(), + thumb: z.string().optional(), + key: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + agent: z.string().optional(), + scanner: z.string().optional(), + language: z.string().optional(), + uuid: z.string().optional(), + updatedAt: z.number().int().optional(), + createdAt: z.number().int().optional(), + scannedAt: z.number().int().optional(), + content: z.boolean().optional(), + directory: z.boolean().optional(), + contentChangedAt: z.number().int().optional(), + hidden: z.number().int().optional(), + location: z.array(z.lazy(() => Location$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + location: "Location", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesDirectory$ { - /** @deprecated use `GetAllLibrariesDirectory$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesDirectory$inboundSchema; - /** @deprecated use `GetAllLibrariesDirectory$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesDirectory$outboundSchema; - /** @deprecated use `GetAllLibrariesDirectory$Outbound` instead. */ - export type Outbound = GetAllLibrariesDirectory$Outbound; + /** @deprecated use `GetAllLibrariesDirectory$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesDirectory$inboundSchema; + /** @deprecated use `GetAllLibrariesDirectory$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesDirectory$outboundSchema; + /** @deprecated use `GetAllLibrariesDirectory$Outbound` instead. */ + export type Outbound = GetAllLibrariesDirectory$Outbound; } /** @internal */ export const GetAllLibrariesMediaContainer$inboundSchema: z.ZodType< - GetAllLibrariesMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int(), - allowSync: z.boolean(), - title1: z.string(), - Directory: z.array(z.lazy(() => GetAllLibrariesDirectory$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Directory: "directory", - }); - }); + GetAllLibrariesMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int(), + allowSync: z.boolean(), + title1: z.string(), + Directory: z.array(z.lazy(() => GetAllLibrariesDirectory$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Directory": "directory", + }); +}); /** @internal */ export type GetAllLibrariesMediaContainer$Outbound = { - size: number; - allowSync: boolean; - title1: string; - Directory?: Array | undefined; + size: number; + allowSync: boolean; + title1: string; + Directory?: Array | undefined; }; /** @internal */ export const GetAllLibrariesMediaContainer$outboundSchema: z.ZodType< - GetAllLibrariesMediaContainer$Outbound, - z.ZodTypeDef, - GetAllLibrariesMediaContainer -> = z - .object({ - size: z.number().int(), - allowSync: z.boolean(), - title1: z.string(), - directory: z.array(z.lazy(() => GetAllLibrariesDirectory$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - directory: "Directory", - }); - }); + GetAllLibrariesMediaContainer$Outbound, + z.ZodTypeDef, + GetAllLibrariesMediaContainer +> = z.object({ + size: z.number().int(), + allowSync: z.boolean(), + title1: z.string(), + directory: z.array(z.lazy(() => GetAllLibrariesDirectory$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + directory: "Directory", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesMediaContainer$ { - /** @deprecated use `GetAllLibrariesMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesMediaContainer$inboundSchema; - /** @deprecated use `GetAllLibrariesMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesMediaContainer$outboundSchema; - /** @deprecated use `GetAllLibrariesMediaContainer$Outbound` instead. */ - export type Outbound = GetAllLibrariesMediaContainer$Outbound; + /** @deprecated use `GetAllLibrariesMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesMediaContainer$inboundSchema; + /** @deprecated use `GetAllLibrariesMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesMediaContainer$outboundSchema; + /** @deprecated use `GetAllLibrariesMediaContainer$Outbound` instead. */ + export type Outbound = GetAllLibrariesMediaContainer$Outbound; } /** @internal */ export const GetAllLibrariesResponseBody$inboundSchema: z.ZodType< - GetAllLibrariesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetAllLibrariesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetAllLibrariesResponseBody$Outbound = { - MediaContainer?: GetAllLibrariesMediaContainer$Outbound | undefined; + MediaContainer?: GetAllLibrariesMediaContainer$Outbound | undefined; }; /** @internal */ export const GetAllLibrariesResponseBody$outboundSchema: z.ZodType< - GetAllLibrariesResponseBody$Outbound, - z.ZodTypeDef, - GetAllLibrariesResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetAllLibrariesResponseBody$Outbound, + z.ZodTypeDef, + GetAllLibrariesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetAllLibrariesMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesResponseBody$ { - /** @deprecated use `GetAllLibrariesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesResponseBody$inboundSchema; - /** @deprecated use `GetAllLibrariesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesResponseBody$outboundSchema; - /** @deprecated use `GetAllLibrariesResponseBody$Outbound` instead. */ - export type Outbound = GetAllLibrariesResponseBody$Outbound; + /** @deprecated use `GetAllLibrariesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesResponseBody$inboundSchema; + /** @deprecated use `GetAllLibrariesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesResponseBody$outboundSchema; + /** @deprecated use `GetAllLibrariesResponseBody$Outbound` instead. */ + export type Outbound = GetAllLibrariesResponseBody$Outbound; } /** @internal */ export const GetAllLibrariesResponse$inboundSchema: z.ZodType< - GetAllLibrariesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetAllLibrariesResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetAllLibrariesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetAllLibrariesResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetAllLibrariesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetAllLibrariesResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetAllLibrariesResponseBody$Outbound | undefined; }; /** @internal */ export const GetAllLibrariesResponse$outboundSchema: z.ZodType< - GetAllLibrariesResponse$Outbound, - z.ZodTypeDef, - GetAllLibrariesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetAllLibrariesResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetAllLibrariesResponse$Outbound, + z.ZodTypeDef, + GetAllLibrariesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetAllLibrariesResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAllLibrariesResponse$ { - /** @deprecated use `GetAllLibrariesResponse$inboundSchema` instead. */ - export const inboundSchema = GetAllLibrariesResponse$inboundSchema; - /** @deprecated use `GetAllLibrariesResponse$outboundSchema` instead. */ - export const outboundSchema = GetAllLibrariesResponse$outboundSchema; - /** @deprecated use `GetAllLibrariesResponse$Outbound` instead. */ - export type Outbound = GetAllLibrariesResponse$Outbound; + /** @deprecated use `GetAllLibrariesResponse$inboundSchema` instead. */ + export const inboundSchema = GetAllLibrariesResponse$inboundSchema; + /** @deprecated use `GetAllLibrariesResponse$outboundSchema` instead. */ + export const outboundSchema = GetAllLibrariesResponse$outboundSchema; + /** @deprecated use `GetAllLibrariesResponse$Outbound` instead. */ + export type Outbound = GetAllLibrariesResponse$Outbound; } diff --git a/src/sdk/models/operations/getavailableclients.ts b/src/sdk/models/operations/getavailableclients.ts index 08943a62..9900ffbb 100644 --- a/src/sdk/models/operations/getavailableclients.ts +++ b/src/sdk/models/operations/getavailableclients.ts @@ -2,56 +2,57 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Server = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; - protocol?: string | undefined; - product?: string | undefined; - deviceClass?: string | undefined; - protocolVersion?: number | undefined; - protocolCapabilities?: string | undefined; + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + protocol?: string | undefined; + product?: string | undefined; + deviceClass?: string | undefined; + protocolVersion?: number | undefined; + protocolCapabilities?: string | undefined; }; export type GetAvailableClientsMediaContainer = { - size?: number | undefined; - server?: Array | undefined; + size?: number | undefined; + server?: Array | undefined; }; /** * Available Clients */ export type GetAvailableClientsResponseBody = { - mediaContainer?: GetAvailableClientsMediaContainer | undefined; + mediaContainer?: GetAvailableClientsMediaContainer | undefined; }; export type GetAvailableClientsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Available Clients - */ - object?: GetAvailableClientsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Available Clients + */ + object?: GetAvailableClientsResponseBody | undefined; }; /** @internal */ -export const Server$inboundSchema: z.ZodType = z.object({ +export const Server$inboundSchema: z.ZodType = z + .object({ name: z.string().optional(), host: z.string().optional(), address: z.string().optional(), @@ -63,36 +64,40 @@ export const Server$inboundSchema: z.ZodType = z. deviceClass: z.string().optional(), protocolVersion: z.number().optional(), protocolCapabilities: z.string().optional(), -}); + }); /** @internal */ export type Server$Outbound = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; - protocol?: string | undefined; - product?: string | undefined; - deviceClass?: string | undefined; - protocolVersion?: number | undefined; - protocolCapabilities?: string | undefined; + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; + protocol?: string | undefined; + product?: string | undefined; + deviceClass?: string | undefined; + protocolVersion?: number | undefined; + protocolCapabilities?: string | undefined; }; /** @internal */ -export const Server$outboundSchema: z.ZodType = z.object({ - name: z.string().optional(), - host: z.string().optional(), - address: z.string().optional(), - port: z.number().optional(), - machineIdentifier: z.string().optional(), - version: z.string().optional(), - protocol: z.string().optional(), - product: z.string().optional(), - deviceClass: z.string().optional(), - protocolVersion: z.number().optional(), - protocolCapabilities: z.string().optional(), +export const Server$outboundSchema: z.ZodType< + Server$Outbound, + z.ZodTypeDef, + Server +> = z.object({ + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), + protocol: z.string().optional(), + product: z.string().optional(), + deviceClass: z.string().optional(), + protocolVersion: z.number().optional(), + protocolCapabilities: z.string().optional(), }); /** @@ -100,172 +105,165 @@ export const Server$outboundSchema: z.ZodType = z - .object({ - size: z.number().optional(), - Server: z.array(z.lazy(() => Server$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Server: "server", - }); - }); + GetAvailableClientsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + Server: z.array(z.lazy(() => Server$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Server": "server", + }); +}); /** @internal */ export type GetAvailableClientsMediaContainer$Outbound = { - size?: number | undefined; - Server?: Array | undefined; + size?: number | undefined; + Server?: Array | undefined; }; /** @internal */ export const GetAvailableClientsMediaContainer$outboundSchema: z.ZodType< - GetAvailableClientsMediaContainer$Outbound, - z.ZodTypeDef, - GetAvailableClientsMediaContainer -> = z - .object({ - size: z.number().optional(), - server: z.array(z.lazy(() => Server$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - server: "Server", - }); - }); + GetAvailableClientsMediaContainer$Outbound, + z.ZodTypeDef, + GetAvailableClientsMediaContainer +> = z.object({ + size: z.number().optional(), + server: z.array(z.lazy(() => Server$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + server: "Server", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableClientsMediaContainer$ { - /** @deprecated use `GetAvailableClientsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsMediaContainer$inboundSchema; - /** @deprecated use `GetAvailableClientsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsMediaContainer$outboundSchema; - /** @deprecated use `GetAvailableClientsMediaContainer$Outbound` instead. */ - export type Outbound = GetAvailableClientsMediaContainer$Outbound; + /** @deprecated use `GetAvailableClientsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsMediaContainer$inboundSchema; + /** @deprecated use `GetAvailableClientsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetAvailableClientsMediaContainer$outboundSchema; + /** @deprecated use `GetAvailableClientsMediaContainer$Outbound` instead. */ + export type Outbound = GetAvailableClientsMediaContainer$Outbound; } /** @internal */ export const GetAvailableClientsResponseBody$inboundSchema: z.ZodType< - GetAvailableClientsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetAvailableClientsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetAvailableClientsResponseBody$Outbound = { - MediaContainer?: GetAvailableClientsMediaContainer$Outbound | undefined; + MediaContainer?: GetAvailableClientsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetAvailableClientsResponseBody$outboundSchema: z.ZodType< - GetAvailableClientsResponseBody$Outbound, - z.ZodTypeDef, - GetAvailableClientsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetAvailableClientsResponseBody$Outbound, + z.ZodTypeDef, + GetAvailableClientsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetAvailableClientsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableClientsResponseBody$ { - /** @deprecated use `GetAvailableClientsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsResponseBody$inboundSchema; - /** @deprecated use `GetAvailableClientsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsResponseBody$outboundSchema; - /** @deprecated use `GetAvailableClientsResponseBody$Outbound` instead. */ - export type Outbound = GetAvailableClientsResponseBody$Outbound; + /** @deprecated use `GetAvailableClientsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsResponseBody$inboundSchema; + /** @deprecated use `GetAvailableClientsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsResponseBody$outboundSchema; + /** @deprecated use `GetAvailableClientsResponseBody$Outbound` instead. */ + export type Outbound = GetAvailableClientsResponseBody$Outbound; } /** @internal */ export const GetAvailableClientsResponse$inboundSchema: z.ZodType< - GetAvailableClientsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetAvailableClientsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetAvailableClientsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetAvailableClientsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetAvailableClientsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetAvailableClientsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetAvailableClientsResponseBody$Outbound | undefined; }; /** @internal */ export const GetAvailableClientsResponse$outboundSchema: z.ZodType< - GetAvailableClientsResponse$Outbound, - z.ZodTypeDef, - GetAvailableClientsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetAvailableClientsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetAvailableClientsResponse$Outbound, + z.ZodTypeDef, + GetAvailableClientsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetAvailableClientsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetAvailableClientsResponse$ { - /** @deprecated use `GetAvailableClientsResponse$inboundSchema` instead. */ - export const inboundSchema = GetAvailableClientsResponse$inboundSchema; - /** @deprecated use `GetAvailableClientsResponse$outboundSchema` instead. */ - export const outboundSchema = GetAvailableClientsResponse$outboundSchema; - /** @deprecated use `GetAvailableClientsResponse$Outbound` instead. */ - export type Outbound = GetAvailableClientsResponse$Outbound; + /** @deprecated use `GetAvailableClientsResponse$inboundSchema` instead. */ + export const inboundSchema = GetAvailableClientsResponse$inboundSchema; + /** @deprecated use `GetAvailableClientsResponse$outboundSchema` instead. */ + export const outboundSchema = GetAvailableClientsResponse$outboundSchema; + /** @deprecated use `GetAvailableClientsResponse$Outbound` instead. */ + export type Outbound = GetAvailableClientsResponse$Outbound; } diff --git a/src/sdk/models/operations/getbandwidthstatistics.ts b/src/sdk/models/operations/getbandwidthstatistics.ts index e2e42108..09625585 100644 --- a/src/sdk/models/operations/getbandwidthstatistics.ts +++ b/src/sdk/models/operations/getbandwidthstatistics.ts @@ -2,162 +2,157 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetBandwidthStatisticsRequest = { - /** - * The timespan to retrieve statistics for - * - * @remarks - * the exact meaning of this parameter is not known - * - */ - timespan?: number | undefined; + /** + * The timespan to retrieve statistics for + * + * @remarks + * the exact meaning of this parameter is not known + */ + timespan?: number | undefined; }; export type GetBandwidthStatisticsDevice = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; export type GetBandwidthStatisticsAccount = { - id?: number | undefined; - key?: string | undefined; - name?: string | undefined; - defaultAudioLanguage?: string | undefined; - autoSelectAudio?: boolean | undefined; - defaultSubtitleLanguage?: string | undefined; - subtitleMode?: number | undefined; - thumb?: string | undefined; + id?: number | undefined; + key?: string | undefined; + name?: string | undefined; + defaultAudioLanguage?: string | undefined; + autoSelectAudio?: boolean | undefined; + defaultSubtitleLanguage?: string | undefined; + subtitleMode?: number | undefined; + thumb?: string | undefined; }; export type StatisticsBandwidth = { - accountID?: number | undefined; - deviceID?: number | undefined; - timespan?: number | undefined; - at?: number | undefined; - lan?: boolean | undefined; - bytes?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + lan?: boolean | undefined; + bytes?: number | undefined; }; export type GetBandwidthStatisticsMediaContainer = { - size?: number | undefined; - device?: Array | undefined; - account?: Array | undefined; - statisticsBandwidth?: Array | undefined; + size?: number | undefined; + device?: Array | undefined; + account?: Array | undefined; + statisticsBandwidth?: Array | undefined; }; /** * Bandwidth Statistics */ export type GetBandwidthStatisticsResponseBody = { - mediaContainer?: GetBandwidthStatisticsMediaContainer | undefined; + mediaContainer?: GetBandwidthStatisticsMediaContainer | undefined; }; export type GetBandwidthStatisticsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Bandwidth Statistics - */ - object?: GetBandwidthStatisticsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Bandwidth Statistics + */ + object?: GetBandwidthStatisticsResponseBody | undefined; }; /** @internal */ export const GetBandwidthStatisticsRequest$inboundSchema: z.ZodType< - GetBandwidthStatisticsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - Timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - Timespan: "timespan", - }); - }); + GetBandwidthStatisticsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + Timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "Timespan": "timespan", + }); +}); /** @internal */ export type GetBandwidthStatisticsRequest$Outbound = { - Timespan?: number | undefined; + Timespan?: number | undefined; }; /** @internal */ export const GetBandwidthStatisticsRequest$outboundSchema: z.ZodType< - GetBandwidthStatisticsRequest$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsRequest -> = z - .object({ - timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - timespan: "Timespan", - }); - }); + GetBandwidthStatisticsRequest$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsRequest +> = z.object({ + timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + timespan: "Timespan", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsRequest$ { - /** @deprecated use `GetBandwidthStatisticsRequest$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsRequest$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsRequest$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsRequest$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsRequest$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsRequest$Outbound; + /** @deprecated use `GetBandwidthStatisticsRequest$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsRequest$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsRequest$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsRequest$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsRequest$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsRequest$Outbound; } /** @internal */ export const GetBandwidthStatisticsDevice$inboundSchema: z.ZodType< - GetBandwidthStatisticsDevice, - z.ZodTypeDef, - unknown + GetBandwidthStatisticsDevice, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), - platform: z.string().optional(), - clientIdentifier: z.string().optional(), - createdAt: z.number().int().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().int().optional(), }); /** @internal */ export type GetBandwidthStatisticsDevice$Outbound = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; /** @internal */ export const GetBandwidthStatisticsDevice$outboundSchema: z.ZodType< - GetBandwidthStatisticsDevice$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsDevice + GetBandwidthStatisticsDevice$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsDevice > = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), - platform: z.string().optional(), - clientIdentifier: z.string().optional(), - createdAt: z.number().int().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().int().optional(), }); /** @@ -165,56 +160,56 @@ export const GetBandwidthStatisticsDevice$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsDevice$ { - /** @deprecated use `GetBandwidthStatisticsDevice$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsDevice$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsDevice$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsDevice$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsDevice$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsDevice$Outbound; + /** @deprecated use `GetBandwidthStatisticsDevice$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsDevice$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsDevice$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsDevice$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsDevice$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsDevice$Outbound; } /** @internal */ export const GetBandwidthStatisticsAccount$inboundSchema: z.ZodType< - GetBandwidthStatisticsAccount, - z.ZodTypeDef, - unknown + GetBandwidthStatisticsAccount, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - name: z.string().optional(), - defaultAudioLanguage: z.string().optional(), - autoSelectAudio: z.boolean().optional(), - defaultSubtitleLanguage: z.string().optional(), - subtitleMode: z.number().int().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + name: z.string().optional(), + defaultAudioLanguage: z.string().optional(), + autoSelectAudio: z.boolean().optional(), + defaultSubtitleLanguage: z.string().optional(), + subtitleMode: z.number().int().optional(), + thumb: z.string().optional(), }); /** @internal */ export type GetBandwidthStatisticsAccount$Outbound = { - id?: number | undefined; - key?: string | undefined; - name?: string | undefined; - defaultAudioLanguage?: string | undefined; - autoSelectAudio?: boolean | undefined; - defaultSubtitleLanguage?: string | undefined; - subtitleMode?: number | undefined; - thumb?: string | undefined; + id?: number | undefined; + key?: string | undefined; + name?: string | undefined; + defaultAudioLanguage?: string | undefined; + autoSelectAudio?: boolean | undefined; + defaultSubtitleLanguage?: string | undefined; + subtitleMode?: number | undefined; + thumb?: string | undefined; }; /** @internal */ export const GetBandwidthStatisticsAccount$outboundSchema: z.ZodType< - GetBandwidthStatisticsAccount$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsAccount + GetBandwidthStatisticsAccount$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsAccount > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - name: z.string().optional(), - defaultAudioLanguage: z.string().optional(), - autoSelectAudio: z.boolean().optional(), - defaultSubtitleLanguage: z.string().optional(), - subtitleMode: z.number().int().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + name: z.string().optional(), + defaultAudioLanguage: z.string().optional(), + autoSelectAudio: z.boolean().optional(), + defaultSubtitleLanguage: z.string().optional(), + subtitleMode: z.number().int().optional(), + thumb: z.string().optional(), }); /** @@ -222,50 +217,50 @@ export const GetBandwidthStatisticsAccount$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsAccount$ { - /** @deprecated use `GetBandwidthStatisticsAccount$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsAccount$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsAccount$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsAccount$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsAccount$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsAccount$Outbound; + /** @deprecated use `GetBandwidthStatisticsAccount$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsAccount$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsAccount$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsAccount$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsAccount$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsAccount$Outbound; } /** @internal */ export const StatisticsBandwidth$inboundSchema: z.ZodType< - StatisticsBandwidth, - z.ZodTypeDef, - unknown + StatisticsBandwidth, + z.ZodTypeDef, + unknown > = z.object({ - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), - timespan: z.number().int().optional(), - at: z.number().int().optional(), - lan: z.boolean().optional(), - bytes: z.number().int().optional(), + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + lan: z.boolean().optional(), + bytes: z.number().int().optional(), }); /** @internal */ export type StatisticsBandwidth$Outbound = { - accountID?: number | undefined; - deviceID?: number | undefined; - timespan?: number | undefined; - at?: number | undefined; - lan?: boolean | undefined; - bytes?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + lan?: boolean | undefined; + bytes?: number | undefined; }; /** @internal */ export const StatisticsBandwidth$outboundSchema: z.ZodType< - StatisticsBandwidth$Outbound, - z.ZodTypeDef, - StatisticsBandwidth + StatisticsBandwidth$Outbound, + z.ZodTypeDef, + StatisticsBandwidth > = z.object({ - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), - timespan: z.number().int().optional(), - at: z.number().int().optional(), - lan: z.boolean().optional(), - bytes: z.number().int().optional(), + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + lan: z.boolean().optional(), + bytes: z.number().int().optional(), }); /** @@ -273,184 +268,185 @@ export const StatisticsBandwidth$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StatisticsBandwidth$ { - /** @deprecated use `StatisticsBandwidth$inboundSchema` instead. */ - export const inboundSchema = StatisticsBandwidth$inboundSchema; - /** @deprecated use `StatisticsBandwidth$outboundSchema` instead. */ - export const outboundSchema = StatisticsBandwidth$outboundSchema; - /** @deprecated use `StatisticsBandwidth$Outbound` instead. */ - export type Outbound = StatisticsBandwidth$Outbound; + /** @deprecated use `StatisticsBandwidth$inboundSchema` instead. */ + export const inboundSchema = StatisticsBandwidth$inboundSchema; + /** @deprecated use `StatisticsBandwidth$outboundSchema` instead. */ + export const outboundSchema = StatisticsBandwidth$outboundSchema; + /** @deprecated use `StatisticsBandwidth$Outbound` instead. */ + export type Outbound = StatisticsBandwidth$Outbound; } /** @internal */ export const GetBandwidthStatisticsMediaContainer$inboundSchema: z.ZodType< - GetBandwidthStatisticsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$inboundSchema)).optional(), - Account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$inboundSchema)).optional(), - StatisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Device: "device", - Account: "account", - StatisticsBandwidth: "statisticsBandwidth", - }); - }); + GetBandwidthStatisticsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$inboundSchema)) + .optional(), + Account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$inboundSchema)) + .optional(), + StatisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + "Account": "account", + "StatisticsBandwidth": "statisticsBandwidth", + }); +}); /** @internal */ export type GetBandwidthStatisticsMediaContainer$Outbound = { - size?: number | undefined; - Device?: Array | undefined; - Account?: Array | undefined; - StatisticsBandwidth?: Array | undefined; + size?: number | undefined; + Device?: Array | undefined; + Account?: Array | undefined; + StatisticsBandwidth?: Array | undefined; }; /** @internal */ export const GetBandwidthStatisticsMediaContainer$outboundSchema: z.ZodType< - GetBandwidthStatisticsMediaContainer$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$outboundSchema)).optional(), - account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$outboundSchema)).optional(), - statisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - device: "Device", - account: "Account", - statisticsBandwidth: "StatisticsBandwidth", - }); - }); + GetBandwidthStatisticsMediaContainer$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsMediaContainer +> = z.object({ + size: z.number().int().optional(), + device: z.array(z.lazy(() => GetBandwidthStatisticsDevice$outboundSchema)) + .optional(), + account: z.array(z.lazy(() => GetBandwidthStatisticsAccount$outboundSchema)) + .optional(), + statisticsBandwidth: z.array(z.lazy(() => StatisticsBandwidth$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + device: "Device", + account: "Account", + statisticsBandwidth: "StatisticsBandwidth", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsMediaContainer$ { - /** @deprecated use `GetBandwidthStatisticsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsMediaContainer$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsMediaContainer$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsMediaContainer$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsMediaContainer$Outbound; + /** @deprecated use `GetBandwidthStatisticsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + GetBandwidthStatisticsMediaContainer$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetBandwidthStatisticsMediaContainer$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsMediaContainer$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsMediaContainer$Outbound; } /** @internal */ export const GetBandwidthStatisticsResponseBody$inboundSchema: z.ZodType< - GetBandwidthStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetBandwidthStatisticsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetBandwidthStatisticsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + GetBandwidthStatisticsMediaContainer$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetBandwidthStatisticsResponseBody$Outbound = { - MediaContainer?: GetBandwidthStatisticsMediaContainer$Outbound | undefined; + MediaContainer?: GetBandwidthStatisticsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetBandwidthStatisticsResponseBody$outboundSchema: z.ZodType< - GetBandwidthStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsResponseBody -> = z - .object({ - mediaContainer: z - .lazy(() => GetBandwidthStatisticsMediaContainer$outboundSchema) - .optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetBandwidthStatisticsResponseBody$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetBandwidthStatisticsMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsResponseBody$ { - /** @deprecated use `GetBandwidthStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsResponseBody$Outbound; + /** @deprecated use `GetBandwidthStatisticsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsResponseBody$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetBandwidthStatisticsResponseBody$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsResponseBody$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsResponseBody$Outbound; } /** @internal */ export const GetBandwidthStatisticsResponse$inboundSchema: z.ZodType< - GetBandwidthStatisticsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetBandwidthStatisticsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetBandwidthStatisticsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetBandwidthStatisticsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetBandwidthStatisticsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetBandwidthStatisticsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetBandwidthStatisticsResponseBody$Outbound | undefined; }; /** @internal */ export const GetBandwidthStatisticsResponse$outboundSchema: z.ZodType< - GetBandwidthStatisticsResponse$Outbound, - z.ZodTypeDef, - GetBandwidthStatisticsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetBandwidthStatisticsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetBandwidthStatisticsResponse$Outbound, + z.ZodTypeDef, + GetBandwidthStatisticsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetBandwidthStatisticsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBandwidthStatisticsResponse$ { - /** @deprecated use `GetBandwidthStatisticsResponse$inboundSchema` instead. */ - export const inboundSchema = GetBandwidthStatisticsResponse$inboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponse$outboundSchema` instead. */ - export const outboundSchema = GetBandwidthStatisticsResponse$outboundSchema; - /** @deprecated use `GetBandwidthStatisticsResponse$Outbound` instead. */ - export type Outbound = GetBandwidthStatisticsResponse$Outbound; + /** @deprecated use `GetBandwidthStatisticsResponse$inboundSchema` instead. */ + export const inboundSchema = GetBandwidthStatisticsResponse$inboundSchema; + /** @deprecated use `GetBandwidthStatisticsResponse$outboundSchema` instead. */ + export const outboundSchema = GetBandwidthStatisticsResponse$outboundSchema; + /** @deprecated use `GetBandwidthStatisticsResponse$Outbound` instead. */ + export type Outbound = GetBandwidthStatisticsResponse$Outbound; } diff --git a/src/sdk/models/operations/getbannerimage.ts b/src/sdk/models/operations/getbannerimage.ts index 5b5500f9..8a15c7e2 100644 --- a/src/sdk/models/operations/getbannerimage.ts +++ b/src/sdk/models/operations/getbannerimage.ts @@ -2,173 +2,165 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetBannerImageRequest = { - /** - * the id of the library item to return the children of. - */ - ratingKey: number; - width: number; - height: number; - minSize: number; - upscale: number; - /** - * Plex Authentication Token - */ - xPlexToken: string; + /** + * the id of the library item to return the children of. + */ + ratingKey: number; + width: number; + height: number; + minSize: number; + upscale: number; + /** + * Plex Authentication Token + */ + xPlexToken: string; }; export type GetBannerImageResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Successful response returning an image - */ - responseStream?: ReadableStream | undefined; - headers: { [k: string]: Array }; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Successful response returning an image + */ + responseStream?: ReadableStream | undefined; + headers: { [k: string]: Array }; }; /** @internal */ export const GetBannerImageRequest$inboundSchema: z.ZodType< - GetBannerImageRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.number().int(), - width: z.number().int(), - height: z.number().int(), - minSize: z.number().int(), - upscale: z.number().int(), - "X-Plex-Token": z.string(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Token": "xPlexToken", - }); - }); + GetBannerImageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.number().int(), + width: z.number().int(), + height: z.number().int(), + minSize: z.number().int(), + upscale: z.number().int(), + "X-Plex-Token": z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Token": "xPlexToken", + }); +}); /** @internal */ export type GetBannerImageRequest$Outbound = { - ratingKey: number; - width: number; - height: number; - minSize: number; - upscale: number; - "X-Plex-Token": string; + ratingKey: number; + width: number; + height: number; + minSize: number; + upscale: number; + "X-Plex-Token": string; }; /** @internal */ export const GetBannerImageRequest$outboundSchema: z.ZodType< - GetBannerImageRequest$Outbound, - z.ZodTypeDef, - GetBannerImageRequest -> = z - .object({ - ratingKey: z.number().int(), - width: z.number().int(), - height: z.number().int(), - minSize: z.number().int(), - upscale: z.number().int(), - xPlexToken: z.string(), - }) - .transform((v) => { - return remap$(v, { - xPlexToken: "X-Plex-Token", - }); - }); + GetBannerImageRequest$Outbound, + z.ZodTypeDef, + GetBannerImageRequest +> = z.object({ + ratingKey: z.number().int(), + width: z.number().int(), + height: z.number().int(), + minSize: z.number().int(), + upscale: z.number().int(), + xPlexToken: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexToken: "X-Plex-Token", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBannerImageRequest$ { - /** @deprecated use `GetBannerImageRequest$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageRequest$inboundSchema; - /** @deprecated use `GetBannerImageRequest$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageRequest$outboundSchema; - /** @deprecated use `GetBannerImageRequest$Outbound` instead. */ - export type Outbound = GetBannerImageRequest$Outbound; + /** @deprecated use `GetBannerImageRequest$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageRequest$inboundSchema; + /** @deprecated use `GetBannerImageRequest$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageRequest$outboundSchema; + /** @deprecated use `GetBannerImageRequest$Outbound` instead. */ + export type Outbound = GetBannerImageRequest$Outbound; } /** @internal */ export const GetBannerImageResponse$inboundSchema: z.ZodType< - GetBannerImageResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - "response-stream": z.instanceof(ReadableStream).optional(), - Headers: z.record(z.array(z.string())), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - "response-stream": "responseStream", - Headers: "headers", - }); - }); + GetBannerImageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "response-stream": z.instanceof(ReadableStream).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "response-stream": "responseStream", + "Headers": "headers", + }); +}); /** @internal */ export type GetBannerImageResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - "response-stream"?: ReadableStream | undefined; - Headers: { [k: string]: Array }; + ContentType: string; + StatusCode: number; + RawResponse: never; + "response-stream"?: ReadableStream | undefined; + Headers: { [k: string]: Array }; }; /** @internal */ export const GetBannerImageResponse$outboundSchema: z.ZodType< - GetBannerImageResponse$Outbound, - z.ZodTypeDef, - GetBannerImageResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - responseStream: z.instanceof(ReadableStream).optional(), - headers: z.record(z.array(z.string())), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - responseStream: "response-stream", - headers: "Headers", - }); - }); + GetBannerImageResponse$Outbound, + z.ZodTypeDef, + GetBannerImageResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + responseStream: z.instanceof(ReadableStream).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + responseStream: "response-stream", + headers: "Headers", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetBannerImageResponse$ { - /** @deprecated use `GetBannerImageResponse$inboundSchema` instead. */ - export const inboundSchema = GetBannerImageResponse$inboundSchema; - /** @deprecated use `GetBannerImageResponse$outboundSchema` instead. */ - export const outboundSchema = GetBannerImageResponse$outboundSchema; - /** @deprecated use `GetBannerImageResponse$Outbound` instead. */ - export type Outbound = GetBannerImageResponse$Outbound; + /** @deprecated use `GetBannerImageResponse$inboundSchema` instead. */ + export const inboundSchema = GetBannerImageResponse$inboundSchema; + /** @deprecated use `GetBannerImageResponse$outboundSchema` instead. */ + export const outboundSchema = GetBannerImageResponse$outboundSchema; + /** @deprecated use `GetBannerImageResponse$Outbound` instead. */ + export type Outbound = GetBannerImageResponse$Outbound; } diff --git a/src/sdk/models/operations/getbutlertasks.ts b/src/sdk/models/operations/getbutlertasks.ts index 21e28559..edb447c2 100644 --- a/src/sdk/models/operations/getbutlertasks.ts +++ b/src/sdk/models/operations/getbutlertasks.ts @@ -2,243 +2,242 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type ButlerTask = { - name?: string | undefined; - interval?: number | undefined; - scheduleRandomized?: boolean | undefined; - enabled?: boolean | undefined; - title?: string | undefined; - description?: string | undefined; + name?: string | undefined; + interval?: number | undefined; + scheduleRandomized?: boolean | undefined; + enabled?: boolean | undefined; + title?: string | undefined; + description?: string | undefined; }; export type ButlerTasks = { - butlerTask?: Array | undefined; + butlerTask?: Array | undefined; }; /** * All butler tasks */ export type GetButlerTasksResponseBody = { - butlerTasks?: ButlerTasks | undefined; + butlerTasks?: ButlerTasks | undefined; }; export type GetButlerTasksResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * All butler tasks - */ - object?: GetButlerTasksResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * All butler tasks + */ + object?: GetButlerTasksResponseBody | undefined; }; /** @internal */ -export const ButlerTask$inboundSchema: z.ZodType = z.object({ - name: z.string().optional(), - interval: z.number().optional(), - scheduleRandomized: z.boolean().optional(), - enabled: z.boolean().optional(), - title: z.string().optional(), - description: z.string().optional(), +export const ButlerTask$inboundSchema: z.ZodType< + ButlerTask, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string().optional(), + interval: z.number().optional(), + scheduleRandomized: z.boolean().optional(), + enabled: z.boolean().optional(), + title: z.string().optional(), + description: z.string().optional(), }); /** @internal */ export type ButlerTask$Outbound = { - name?: string | undefined; - interval?: number | undefined; - scheduleRandomized?: boolean | undefined; - enabled?: boolean | undefined; - title?: string | undefined; - description?: string | undefined; + name?: string | undefined; + interval?: number | undefined; + scheduleRandomized?: boolean | undefined; + enabled?: boolean | undefined; + title?: string | undefined; + description?: string | undefined; }; /** @internal */ -export const ButlerTask$outboundSchema: z.ZodType = - z.object({ - name: z.string().optional(), - interval: z.number().optional(), - scheduleRandomized: z.boolean().optional(), - enabled: z.boolean().optional(), - title: z.string().optional(), - description: z.string().optional(), - }); +export const ButlerTask$outboundSchema: z.ZodType< + ButlerTask$Outbound, + z.ZodTypeDef, + ButlerTask +> = z.object({ + name: z.string().optional(), + interval: z.number().optional(), + scheduleRandomized: z.boolean().optional(), + enabled: z.boolean().optional(), + title: z.string().optional(), + description: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ButlerTask$ { - /** @deprecated use `ButlerTask$inboundSchema` instead. */ - export const inboundSchema = ButlerTask$inboundSchema; - /** @deprecated use `ButlerTask$outboundSchema` instead. */ - export const outboundSchema = ButlerTask$outboundSchema; - /** @deprecated use `ButlerTask$Outbound` instead. */ - export type Outbound = ButlerTask$Outbound; + /** @deprecated use `ButlerTask$inboundSchema` instead. */ + export const inboundSchema = ButlerTask$inboundSchema; + /** @deprecated use `ButlerTask$outboundSchema` instead. */ + export const outboundSchema = ButlerTask$outboundSchema; + /** @deprecated use `ButlerTask$Outbound` instead. */ + export type Outbound = ButlerTask$Outbound; } /** @internal */ -export const ButlerTasks$inboundSchema: z.ZodType = z - .object({ - ButlerTask: z.array(z.lazy(() => ButlerTask$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - ButlerTask: "butlerTask", - }); - }); +export const ButlerTasks$inboundSchema: z.ZodType< + ButlerTasks, + z.ZodTypeDef, + unknown +> = z.object({ + ButlerTask: z.array(z.lazy(() => ButlerTask$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "ButlerTask": "butlerTask", + }); +}); /** @internal */ export type ButlerTasks$Outbound = { - ButlerTask?: Array | undefined; + ButlerTask?: Array | undefined; }; /** @internal */ export const ButlerTasks$outboundSchema: z.ZodType< - ButlerTasks$Outbound, - z.ZodTypeDef, - ButlerTasks -> = z - .object({ - butlerTask: z.array(z.lazy(() => ButlerTask$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - butlerTask: "ButlerTask", - }); - }); + ButlerTasks$Outbound, + z.ZodTypeDef, + ButlerTasks +> = z.object({ + butlerTask: z.array(z.lazy(() => ButlerTask$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + butlerTask: "ButlerTask", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ButlerTasks$ { - /** @deprecated use `ButlerTasks$inboundSchema` instead. */ - export const inboundSchema = ButlerTasks$inboundSchema; - /** @deprecated use `ButlerTasks$outboundSchema` instead. */ - export const outboundSchema = ButlerTasks$outboundSchema; - /** @deprecated use `ButlerTasks$Outbound` instead. */ - export type Outbound = ButlerTasks$Outbound; + /** @deprecated use `ButlerTasks$inboundSchema` instead. */ + export const inboundSchema = ButlerTasks$inboundSchema; + /** @deprecated use `ButlerTasks$outboundSchema` instead. */ + export const outboundSchema = ButlerTasks$outboundSchema; + /** @deprecated use `ButlerTasks$Outbound` instead. */ + export type Outbound = ButlerTasks$Outbound; } /** @internal */ export const GetButlerTasksResponseBody$inboundSchema: z.ZodType< - GetButlerTasksResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - ButlerTasks: z.lazy(() => ButlerTasks$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ButlerTasks: "butlerTasks", - }); - }); + GetButlerTasksResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + ButlerTasks: z.lazy(() => ButlerTasks$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ButlerTasks": "butlerTasks", + }); +}); /** @internal */ export type GetButlerTasksResponseBody$Outbound = { - ButlerTasks?: ButlerTasks$Outbound | undefined; + ButlerTasks?: ButlerTasks$Outbound | undefined; }; /** @internal */ export const GetButlerTasksResponseBody$outboundSchema: z.ZodType< - GetButlerTasksResponseBody$Outbound, - z.ZodTypeDef, - GetButlerTasksResponseBody -> = z - .object({ - butlerTasks: z.lazy(() => ButlerTasks$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - butlerTasks: "ButlerTasks", - }); - }); + GetButlerTasksResponseBody$Outbound, + z.ZodTypeDef, + GetButlerTasksResponseBody +> = z.object({ + butlerTasks: z.lazy(() => ButlerTasks$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + butlerTasks: "ButlerTasks", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetButlerTasksResponseBody$ { - /** @deprecated use `GetButlerTasksResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksResponseBody$inboundSchema; - /** @deprecated use `GetButlerTasksResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksResponseBody$outboundSchema; - /** @deprecated use `GetButlerTasksResponseBody$Outbound` instead. */ - export type Outbound = GetButlerTasksResponseBody$Outbound; + /** @deprecated use `GetButlerTasksResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksResponseBody$inboundSchema; + /** @deprecated use `GetButlerTasksResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksResponseBody$outboundSchema; + /** @deprecated use `GetButlerTasksResponseBody$Outbound` instead. */ + export type Outbound = GetButlerTasksResponseBody$Outbound; } /** @internal */ export const GetButlerTasksResponse$inboundSchema: z.ZodType< - GetButlerTasksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetButlerTasksResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetButlerTasksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetButlerTasksResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetButlerTasksResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetButlerTasksResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetButlerTasksResponseBody$Outbound | undefined; }; /** @internal */ export const GetButlerTasksResponse$outboundSchema: z.ZodType< - GetButlerTasksResponse$Outbound, - z.ZodTypeDef, - GetButlerTasksResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetButlerTasksResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetButlerTasksResponse$Outbound, + z.ZodTypeDef, + GetButlerTasksResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetButlerTasksResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetButlerTasksResponse$ { - /** @deprecated use `GetButlerTasksResponse$inboundSchema` instead. */ - export const inboundSchema = GetButlerTasksResponse$inboundSchema; - /** @deprecated use `GetButlerTasksResponse$outboundSchema` instead. */ - export const outboundSchema = GetButlerTasksResponse$outboundSchema; - /** @deprecated use `GetButlerTasksResponse$Outbound` instead. */ - export type Outbound = GetButlerTasksResponse$Outbound; + /** @deprecated use `GetButlerTasksResponse$inboundSchema` instead. */ + export const inboundSchema = GetButlerTasksResponse$inboundSchema; + /** @deprecated use `GetButlerTasksResponse$outboundSchema` instead. */ + export const outboundSchema = GetButlerTasksResponse$outboundSchema; + /** @deprecated use `GetButlerTasksResponse$Outbound` instead. */ + export type Outbound = GetButlerTasksResponse$Outbound; } diff --git a/src/sdk/models/operations/getcompanionsdata.ts b/src/sdk/models/operations/getcompanionsdata.ts index 74bea463..18d90f72 100644 --- a/src/sdk/models/operations/getcompanionsdata.ts +++ b/src/sdk/models/operations/getcompanionsdata.ts @@ -2,74 +2,80 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetCompanionsDataServerList = ["https://plex.tv/api/v2/"] as const; +export const GetCompanionsDataServerList = [ + "https://plex.tv/api/v2/", +] as const; export type ResponseBody = { - identifier: string; - baseURL: string; - title: string; - linkURL: string; - provides: string; - /** - * The plex authtoken used to identify with - */ - token: string; + identifier: string; + baseURL: string; + title: string; + linkURL: string; + provides: string; + /** + * The plex authtoken used to identify with + */ + token: string; }; export type GetCompanionsDataResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Companions Data - */ - responseBodies?: Array | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Companions Data + */ + responseBodies?: Array | undefined; }; /** @internal */ -export const ResponseBody$inboundSchema: z.ZodType = z.object({ - identifier: z.string(), - baseURL: z.string(), - title: z.string(), - linkURL: z.string(), - provides: z.string(), - token: z.string(), +export const ResponseBody$inboundSchema: z.ZodType< + ResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string(), + baseURL: z.string(), + title: z.string(), + linkURL: z.string(), + provides: z.string(), + token: z.string(), }); /** @internal */ export type ResponseBody$Outbound = { - identifier: string; - baseURL: string; - title: string; - linkURL: string; - provides: string; - token: string; + identifier: string; + baseURL: string; + title: string; + linkURL: string; + provides: string; + token: string; }; /** @internal */ export const ResponseBody$outboundSchema: z.ZodType< - ResponseBody$Outbound, - z.ZodTypeDef, - ResponseBody + ResponseBody$Outbound, + z.ZodTypeDef, + ResponseBody > = z.object({ - identifier: z.string(), - baseURL: z.string(), - title: z.string(), - linkURL: z.string(), - provides: z.string(), - token: z.string(), + identifier: z.string(), + baseURL: z.string(), + title: z.string(), + linkURL: z.string(), + provides: z.string(), + token: z.string(), }); /** @@ -77,73 +83,69 @@ export const ResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ResponseBody$ { - /** @deprecated use `ResponseBody$inboundSchema` instead. */ - export const inboundSchema = ResponseBody$inboundSchema; - /** @deprecated use `ResponseBody$outboundSchema` instead. */ - export const outboundSchema = ResponseBody$outboundSchema; - /** @deprecated use `ResponseBody$Outbound` instead. */ - export type Outbound = ResponseBody$Outbound; + /** @deprecated use `ResponseBody$inboundSchema` instead. */ + export const inboundSchema = ResponseBody$inboundSchema; + /** @deprecated use `ResponseBody$outboundSchema` instead. */ + export const outboundSchema = ResponseBody$outboundSchema; + /** @deprecated use `ResponseBody$Outbound` instead. */ + export type Outbound = ResponseBody$Outbound; } /** @internal */ export const GetCompanionsDataResponse$inboundSchema: z.ZodType< - GetCompanionsDataResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - responseBodies: z.array(z.lazy(() => ResponseBody$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetCompanionsDataResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + responseBodies: z.array(z.lazy(() => ResponseBody$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetCompanionsDataResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - responseBodies?: Array | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + responseBodies?: Array | undefined; }; /** @internal */ export const GetCompanionsDataResponse$outboundSchema: z.ZodType< - GetCompanionsDataResponse$Outbound, - z.ZodTypeDef, - GetCompanionsDataResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - responseBodies: z.array(z.lazy(() => ResponseBody$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetCompanionsDataResponse$Outbound, + z.ZodTypeDef, + GetCompanionsDataResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + responseBodies: z.array(z.lazy(() => ResponseBody$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetCompanionsDataResponse$ { - /** @deprecated use `GetCompanionsDataResponse$inboundSchema` instead. */ - export const inboundSchema = GetCompanionsDataResponse$inboundSchema; - /** @deprecated use `GetCompanionsDataResponse$outboundSchema` instead. */ - export const outboundSchema = GetCompanionsDataResponse$outboundSchema; - /** @deprecated use `GetCompanionsDataResponse$Outbound` instead. */ - export type Outbound = GetCompanionsDataResponse$Outbound; + /** @deprecated use `GetCompanionsDataResponse$inboundSchema` instead. */ + export const inboundSchema = GetCompanionsDataResponse$inboundSchema; + /** @deprecated use `GetCompanionsDataResponse$outboundSchema` instead. */ + export const outboundSchema = GetCompanionsDataResponse$outboundSchema; + /** @deprecated use `GetCompanionsDataResponse$Outbound` instead. */ + export type Outbound = GetCompanionsDataResponse$Outbound; } diff --git a/src/sdk/models/operations/getdevices.ts b/src/sdk/models/operations/getdevices.ts index b01602b0..12f04428 100644 --- a/src/sdk/models/operations/getdevices.ts +++ b/src/sdk/models/operations/getdevices.ts @@ -2,74 +2,79 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Device = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; export type GetDevicesMediaContainer = { - size?: number | undefined; - identifier?: string | undefined; - device?: Array | undefined; + size?: number | undefined; + identifier?: string | undefined; + device?: Array | undefined; }; /** * Devices */ export type GetDevicesResponseBody = { - mediaContainer?: GetDevicesMediaContainer | undefined; + mediaContainer?: GetDevicesMediaContainer | undefined; }; export type GetDevicesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Devices - */ - object?: GetDevicesResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Devices + */ + object?: GetDevicesResponseBody | undefined; }; /** @internal */ -export const Device$inboundSchema: z.ZodType = z.object({ +export const Device$inboundSchema: z.ZodType = z + .object({ id: z.number().optional(), name: z.string().optional(), platform: z.string().optional(), clientIdentifier: z.string().optional(), createdAt: z.number().optional(), -}); + }); /** @internal */ export type Device$Outbound = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; /** @internal */ -export const Device$outboundSchema: z.ZodType = z.object({ - id: z.number().optional(), - name: z.string().optional(), - platform: z.string().optional(), - clientIdentifier: z.string().optional(), - createdAt: z.number().optional(), +export const Device$outboundSchema: z.ZodType< + Device$Outbound, + z.ZodTypeDef, + Device +> = z.object({ + id: z.number().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().optional(), }); /** @@ -77,175 +82,165 @@ export const Device$outboundSchema: z.ZodType = z - .object({ - size: z.number().optional(), - identifier: z.string().optional(), - Device: z.array(z.lazy(() => Device$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Device: "device", - }); - }); + GetDevicesMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + identifier: z.string().optional(), + Device: z.array(z.lazy(() => Device$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + }); +}); /** @internal */ export type GetDevicesMediaContainer$Outbound = { - size?: number | undefined; - identifier?: string | undefined; - Device?: Array | undefined; + size?: number | undefined; + identifier?: string | undefined; + Device?: Array | undefined; }; /** @internal */ export const GetDevicesMediaContainer$outboundSchema: z.ZodType< - GetDevicesMediaContainer$Outbound, - z.ZodTypeDef, - GetDevicesMediaContainer -> = z - .object({ - size: z.number().optional(), - identifier: z.string().optional(), - device: z.array(z.lazy(() => Device$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - device: "Device", - }); - }); + GetDevicesMediaContainer$Outbound, + z.ZodTypeDef, + GetDevicesMediaContainer +> = z.object({ + size: z.number().optional(), + identifier: z.string().optional(), + device: z.array(z.lazy(() => Device$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + device: "Device", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDevicesMediaContainer$ { - /** @deprecated use `GetDevicesMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetDevicesMediaContainer$inboundSchema; - /** @deprecated use `GetDevicesMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetDevicesMediaContainer$outboundSchema; - /** @deprecated use `GetDevicesMediaContainer$Outbound` instead. */ - export type Outbound = GetDevicesMediaContainer$Outbound; + /** @deprecated use `GetDevicesMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetDevicesMediaContainer$inboundSchema; + /** @deprecated use `GetDevicesMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetDevicesMediaContainer$outboundSchema; + /** @deprecated use `GetDevicesMediaContainer$Outbound` instead. */ + export type Outbound = GetDevicesMediaContainer$Outbound; } /** @internal */ export const GetDevicesResponseBody$inboundSchema: z.ZodType< - GetDevicesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetDevicesMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetDevicesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetDevicesMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetDevicesResponseBody$Outbound = { - MediaContainer?: GetDevicesMediaContainer$Outbound | undefined; + MediaContainer?: GetDevicesMediaContainer$Outbound | undefined; }; /** @internal */ export const GetDevicesResponseBody$outboundSchema: z.ZodType< - GetDevicesResponseBody$Outbound, - z.ZodTypeDef, - GetDevicesResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetDevicesMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetDevicesResponseBody$Outbound, + z.ZodTypeDef, + GetDevicesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetDevicesMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDevicesResponseBody$ { - /** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetDevicesResponseBody$inboundSchema; - /** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetDevicesResponseBody$outboundSchema; - /** @deprecated use `GetDevicesResponseBody$Outbound` instead. */ - export type Outbound = GetDevicesResponseBody$Outbound; + /** @deprecated use `GetDevicesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetDevicesResponseBody$inboundSchema; + /** @deprecated use `GetDevicesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetDevicesResponseBody$outboundSchema; + /** @deprecated use `GetDevicesResponseBody$Outbound` instead. */ + export type Outbound = GetDevicesResponseBody$Outbound; } /** @internal */ export const GetDevicesResponse$inboundSchema: z.ZodType< - GetDevicesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetDevicesResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetDevicesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetDevicesResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetDevicesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetDevicesResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetDevicesResponseBody$Outbound | undefined; }; /** @internal */ export const GetDevicesResponse$outboundSchema: z.ZodType< - GetDevicesResponse$Outbound, - z.ZodTypeDef, - GetDevicesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetDevicesResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetDevicesResponse$Outbound, + z.ZodTypeDef, + GetDevicesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetDevicesResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetDevicesResponse$ { - /** @deprecated use `GetDevicesResponse$inboundSchema` instead. */ - export const inboundSchema = GetDevicesResponse$inboundSchema; - /** @deprecated use `GetDevicesResponse$outboundSchema` instead. */ - export const outboundSchema = GetDevicesResponse$outboundSchema; - /** @deprecated use `GetDevicesResponse$Outbound` instead. */ - export type Outbound = GetDevicesResponse$Outbound; + /** @deprecated use `GetDevicesResponse$inboundSchema` instead. */ + export const inboundSchema = GetDevicesResponse$inboundSchema; + /** @deprecated use `GetDevicesResponse$outboundSchema` instead. */ + export const outboundSchema = GetDevicesResponse$outboundSchema; + /** @deprecated use `GetDevicesResponse$Outbound` instead. */ + export type Outbound = GetDevicesResponse$Outbound; } diff --git a/src/sdk/models/operations/getfilehash.ts b/src/sdk/models/operations/getfilehash.ts index 002ca135..dcaba999 100644 --- a/src/sdk/models/operations/getfilehash.ts +++ b/src/sdk/models/operations/getfilehash.ts @@ -2,59 +2,59 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetFileHashRequest = { - /** - * This is the path to the local file, must be prefixed by `file://` - */ - url: string; - /** - * Item type - */ - type?: number | undefined; + /** + * This is the path to the local file, must be prefixed by `file://` + */ + url: string; + /** + * Item type + */ + type?: number | undefined; }; export type GetFileHashResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const GetFileHashRequest$inboundSchema: z.ZodType< - GetFileHashRequest, - z.ZodTypeDef, - unknown + GetFileHashRequest, + z.ZodTypeDef, + unknown > = z.object({ - url: z.string(), - type: z.number().optional(), + url: z.string(), + type: z.number().optional(), }); /** @internal */ export type GetFileHashRequest$Outbound = { - url: string; - type?: number | undefined; + url: string; + type?: number | undefined; }; /** @internal */ export const GetFileHashRequest$outboundSchema: z.ZodType< - GetFileHashRequest$Outbound, - z.ZodTypeDef, - GetFileHashRequest + GetFileHashRequest$Outbound, + z.ZodTypeDef, + GetFileHashRequest > = z.object({ - url: z.string(), - type: z.number().optional(), + url: z.string(), + type: z.number().optional(), }); /** @@ -62,70 +62,66 @@ export const GetFileHashRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetFileHashRequest$ { - /** @deprecated use `GetFileHashRequest$inboundSchema` instead. */ - export const inboundSchema = GetFileHashRequest$inboundSchema; - /** @deprecated use `GetFileHashRequest$outboundSchema` instead. */ - export const outboundSchema = GetFileHashRequest$outboundSchema; - /** @deprecated use `GetFileHashRequest$Outbound` instead. */ - export type Outbound = GetFileHashRequest$Outbound; + /** @deprecated use `GetFileHashRequest$inboundSchema` instead. */ + export const inboundSchema = GetFileHashRequest$inboundSchema; + /** @deprecated use `GetFileHashRequest$outboundSchema` instead. */ + export const outboundSchema = GetFileHashRequest$outboundSchema; + /** @deprecated use `GetFileHashRequest$Outbound` instead. */ + export type Outbound = GetFileHashRequest$Outbound; } /** @internal */ export const GetFileHashResponse$inboundSchema: z.ZodType< - GetFileHashResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetFileHashResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetFileHashResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetFileHashResponse$outboundSchema: z.ZodType< - GetFileHashResponse$Outbound, - z.ZodTypeDef, - GetFileHashResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetFileHashResponse$Outbound, + z.ZodTypeDef, + GetFileHashResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetFileHashResponse$ { - /** @deprecated use `GetFileHashResponse$inboundSchema` instead. */ - export const inboundSchema = GetFileHashResponse$inboundSchema; - /** @deprecated use `GetFileHashResponse$outboundSchema` instead. */ - export const outboundSchema = GetFileHashResponse$outboundSchema; - /** @deprecated use `GetFileHashResponse$Outbound` instead. */ - export type Outbound = GetFileHashResponse$Outbound; + /** @deprecated use `GetFileHashResponse$inboundSchema` instead. */ + export const inboundSchema = GetFileHashResponse$inboundSchema; + /** @deprecated use `GetFileHashResponse$outboundSchema` instead. */ + export const outboundSchema = GetFileHashResponse$outboundSchema; + /** @deprecated use `GetFileHashResponse$Outbound` instead. */ + export type Outbound = GetFileHashResponse$Outbound; } diff --git a/src/sdk/models/operations/getgeodata.ts b/src/sdk/models/operations/getgeodata.ts index 7b6e390e..c5c8ac30 100644 --- a/src/sdk/models/operations/getgeodata.ts +++ b/src/sdk/models/operations/getgeodata.ts @@ -2,226 +2,223 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetGeoDataServerList = ["https://plex.tv/api/v2/"] as const; +export const GetGeoDataServerList = [ + "https://plex.tv/api/v2/", +] as const; /** * Geo location data */ export type GetGeoDataGeoData = { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - code: string; - /** - * The continent code where the country is located. - */ - continentCode: string; - /** - * The official name of the country. - */ - country: string; - /** - * The name of the city. - */ - city: string; - /** - * Indicates if the country is a member of the European Union. - */ - europeanUnionMember?: boolean | undefined; - /** - * The time zone of the country. - */ - timeZone: string; - /** - * The postal code of the location. - */ - postalCode: number; - /** - * Indicates if the country has privacy restrictions. - */ - inPrivacyRestrictedCountry?: boolean | undefined; - /** - * Indicates if the region has privacy restrictions. - */ - inPrivacyRestrictedRegion?: boolean | undefined; - /** - * The name of the primary administrative subdivision. - */ - subdivisions: string; - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - coordinates: string; + /** + * The ISO 3166-1 alpha-2 code of the country. + */ + code: string; + /** + * The continent code where the country is located. + */ + continentCode: string; + /** + * The official name of the country. + */ + country: string; + /** + * The name of the city. + */ + city: string; + /** + * Indicates if the country is a member of the European Union. + */ + europeanUnionMember?: boolean | undefined; + /** + * The time zone of the country. + */ + timeZone: string; + /** + * The postal code of the location. + */ + postalCode: number; + /** + * Indicates if the country has privacy restrictions. + */ + inPrivacyRestrictedCountry?: boolean | undefined; + /** + * Indicates if the region has privacy restrictions. + */ + inPrivacyRestrictedRegion?: boolean | undefined; + /** + * The name of the primary administrative subdivision. + */ + subdivisions: string; + /** + * The geographical coordinates (latitude, longitude) of the location. + */ + coordinates: string; }; export type GetGeoDataResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Gets the geo location data of the user - */ - geoData?: GetGeoDataGeoData | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Gets the geo location data of the user + */ + geoData?: GetGeoDataGeoData | undefined; }; /** @internal */ -export const GetGeoDataGeoData$inboundSchema: z.ZodType = - z - .object({ - code: z.string(), - continent_code: z.string(), - country: z.string(), - city: z.string(), - european_union_member: z.boolean().default(false), - time_zone: z.string(), - postal_code: z.number().int(), - in_privacy_restricted_country: z.boolean().default(false), - in_privacy_restricted_region: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continent_code: "continentCode", - european_union_member: "europeanUnionMember", - time_zone: "timeZone", - postal_code: "postalCode", - in_privacy_restricted_country: "inPrivacyRestrictedCountry", - in_privacy_restricted_region: "inPrivacyRestrictedRegion", - }); - }); +export const GetGeoDataGeoData$inboundSchema: z.ZodType< + GetGeoDataGeoData, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.string(), + continent_code: z.string(), + country: z.string(), + city: z.string(), + european_union_member: z.boolean().default(false), + time_zone: z.string(), + postal_code: z.number().int(), + in_privacy_restricted_country: z.boolean().default(false), + in_privacy_restricted_region: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), +}).transform((v) => { + return remap$(v, { + "continent_code": "continentCode", + "european_union_member": "europeanUnionMember", + "time_zone": "timeZone", + "postal_code": "postalCode", + "in_privacy_restricted_country": "inPrivacyRestrictedCountry", + "in_privacy_restricted_region": "inPrivacyRestrictedRegion", + }); +}); /** @internal */ export type GetGeoDataGeoData$Outbound = { - code: string; - continent_code: string; - country: string; - city: string; - european_union_member: boolean; - time_zone: string; - postal_code: number; - in_privacy_restricted_country: boolean; - in_privacy_restricted_region: boolean; - subdivisions: string; - coordinates: string; + code: string; + continent_code: string; + country: string; + city: string; + european_union_member: boolean; + time_zone: string; + postal_code: number; + in_privacy_restricted_country: boolean; + in_privacy_restricted_region: boolean; + subdivisions: string; + coordinates: string; }; /** @internal */ export const GetGeoDataGeoData$outboundSchema: z.ZodType< - GetGeoDataGeoData$Outbound, - z.ZodTypeDef, - GetGeoDataGeoData -> = z - .object({ - code: z.string(), - continentCode: z.string(), - country: z.string(), - city: z.string(), - europeanUnionMember: z.boolean().default(false), - timeZone: z.string(), - postalCode: z.number().int(), - inPrivacyRestrictedCountry: z.boolean().default(false), - inPrivacyRestrictedRegion: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continentCode: "continent_code", - europeanUnionMember: "european_union_member", - timeZone: "time_zone", - postalCode: "postal_code", - inPrivacyRestrictedCountry: "in_privacy_restricted_country", - inPrivacyRestrictedRegion: "in_privacy_restricted_region", - }); - }); + GetGeoDataGeoData$Outbound, + z.ZodTypeDef, + GetGeoDataGeoData +> = z.object({ + code: z.string(), + continentCode: z.string(), + country: z.string(), + city: z.string(), + europeanUnionMember: z.boolean().default(false), + timeZone: z.string(), + postalCode: z.number().int(), + inPrivacyRestrictedCountry: z.boolean().default(false), + inPrivacyRestrictedRegion: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), +}).transform((v) => { + return remap$(v, { + continentCode: "continent_code", + europeanUnionMember: "european_union_member", + timeZone: "time_zone", + postalCode: "postal_code", + inPrivacyRestrictedCountry: "in_privacy_restricted_country", + inPrivacyRestrictedRegion: "in_privacy_restricted_region", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGeoDataGeoData$ { - /** @deprecated use `GetGeoDataGeoData$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataGeoData$inboundSchema; - /** @deprecated use `GetGeoDataGeoData$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataGeoData$outboundSchema; - /** @deprecated use `GetGeoDataGeoData$Outbound` instead. */ - export type Outbound = GetGeoDataGeoData$Outbound; + /** @deprecated use `GetGeoDataGeoData$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataGeoData$inboundSchema; + /** @deprecated use `GetGeoDataGeoData$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataGeoData$outboundSchema; + /** @deprecated use `GetGeoDataGeoData$Outbound` instead. */ + export type Outbound = GetGeoDataGeoData$Outbound; } /** @internal */ export const GetGeoDataResponse$inboundSchema: z.ZodType< - GetGeoDataResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - GeoData: z.lazy(() => GetGeoDataGeoData$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - GeoData: "geoData", - }); - }); + GetGeoDataResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + GeoData: z.lazy(() => GetGeoDataGeoData$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "GeoData": "geoData", + }); +}); /** @internal */ export type GetGeoDataResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - GeoData?: GetGeoDataGeoData$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + GeoData?: GetGeoDataGeoData$Outbound | undefined; }; /** @internal */ export const GetGeoDataResponse$outboundSchema: z.ZodType< - GetGeoDataResponse$Outbound, - z.ZodTypeDef, - GetGeoDataResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - geoData: z.lazy(() => GetGeoDataGeoData$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - geoData: "GeoData", - }); - }); + GetGeoDataResponse$Outbound, + z.ZodTypeDef, + GetGeoDataResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + geoData: z.lazy(() => GetGeoDataGeoData$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + geoData: "GeoData", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGeoDataResponse$ { - /** @deprecated use `GetGeoDataResponse$inboundSchema` instead. */ - export const inboundSchema = GetGeoDataResponse$inboundSchema; - /** @deprecated use `GetGeoDataResponse$outboundSchema` instead. */ - export const outboundSchema = GetGeoDataResponse$outboundSchema; - /** @deprecated use `GetGeoDataResponse$Outbound` instead. */ - export type Outbound = GetGeoDataResponse$Outbound; + /** @deprecated use `GetGeoDataResponse$inboundSchema` instead. */ + export const inboundSchema = GetGeoDataResponse$inboundSchema; + /** @deprecated use `GetGeoDataResponse$outboundSchema` instead. */ + export const outboundSchema = GetGeoDataResponse$outboundSchema; + /** @deprecated use `GetGeoDataResponse$Outbound` instead. */ + export type Outbound = GetGeoDataResponse$Outbound; } diff --git a/src/sdk/models/operations/getglobalhubs.ts b/src/sdk/models/operations/getglobalhubs.ts index e9e37374..60d1561b 100644 --- a/src/sdk/models/operations/getglobalhubs.ts +++ b/src/sdk/models/operations/getglobalhubs.ts @@ -2,138 +2,140 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). */ export enum OnlyTransient { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetGlobalHubsRequest = { - /** - * The number of items to return with each hub. - */ - count?: number | undefined; - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - onlyTransient?: OnlyTransient | undefined; + /** + * The number of items to return with each hub. + */ + count?: number | undefined; + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + onlyTransient?: OnlyTransient | undefined; }; export type GetGlobalHubsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; export type Hub = { - hubKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - promoted?: boolean | undefined; - metadata?: Array | undefined; + hubKey?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + hubIdentifier?: string | undefined; + context?: string | undefined; + size?: number | undefined; + more?: boolean | undefined; + style?: string | undefined; + promoted?: boolean | undefined; + metadata?: Array | undefined; }; export type GetGlobalHubsMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - hub?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + hub?: Array | undefined; }; /** * returns global hubs */ export type GetGlobalHubsResponseBody = { - mediaContainer?: GetGlobalHubsMediaContainer | undefined; + mediaContainer?: GetGlobalHubsMediaContainer | undefined; }; export type GetGlobalHubsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * returns global hubs - */ - object?: GetGlobalHubsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * returns global hubs + */ + object?: GetGlobalHubsResponseBody | undefined; }; /** @internal */ -export const OnlyTransient$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(OnlyTransient); +export const OnlyTransient$inboundSchema: z.ZodNativeEnum< + typeof OnlyTransient +> = z.nativeEnum(OnlyTransient); /** @internal */ -export const OnlyTransient$outboundSchema: z.ZodNativeEnum = - OnlyTransient$inboundSchema; +export const OnlyTransient$outboundSchema: z.ZodNativeEnum< + typeof OnlyTransient +> = OnlyTransient$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace OnlyTransient$ { - /** @deprecated use `OnlyTransient$inboundSchema` instead. */ - export const inboundSchema = OnlyTransient$inboundSchema; - /** @deprecated use `OnlyTransient$outboundSchema` instead. */ - export const outboundSchema = OnlyTransient$outboundSchema; + /** @deprecated use `OnlyTransient$inboundSchema` instead. */ + export const inboundSchema = OnlyTransient$inboundSchema; + /** @deprecated use `OnlyTransient$outboundSchema` instead. */ + export const outboundSchema = OnlyTransient$outboundSchema; } /** @internal */ export const GetGlobalHubsRequest$inboundSchema: z.ZodType< - GetGlobalHubsRequest, - z.ZodTypeDef, - unknown + GetGlobalHubsRequest, + z.ZodTypeDef, + unknown > = z.object({ - count: z.number().optional(), - onlyTransient: OnlyTransient$inboundSchema.optional(), + count: z.number().optional(), + onlyTransient: OnlyTransient$inboundSchema.optional(), }); /** @internal */ export type GetGlobalHubsRequest$Outbound = { - count?: number | undefined; - onlyTransient?: number | undefined; + count?: number | undefined; + onlyTransient?: number | undefined; }; /** @internal */ export const GetGlobalHubsRequest$outboundSchema: z.ZodType< - GetGlobalHubsRequest$Outbound, - z.ZodTypeDef, - GetGlobalHubsRequest + GetGlobalHubsRequest$Outbound, + z.ZodTypeDef, + GetGlobalHubsRequest > = z.object({ - count: z.number().optional(), - onlyTransient: OnlyTransient$outboundSchema.optional(), + count: z.number().optional(), + onlyTransient: OnlyTransient$outboundSchema.optional(), }); /** @@ -141,83 +143,83 @@ export const GetGlobalHubsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsRequest$ { - /** @deprecated use `GetGlobalHubsRequest$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsRequest$inboundSchema; - /** @deprecated use `GetGlobalHubsRequest$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsRequest$outboundSchema; - /** @deprecated use `GetGlobalHubsRequest$Outbound` instead. */ - export type Outbound = GetGlobalHubsRequest$Outbound; + /** @deprecated use `GetGlobalHubsRequest$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsRequest$inboundSchema; + /** @deprecated use `GetGlobalHubsRequest$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsRequest$outboundSchema; + /** @deprecated use `GetGlobalHubsRequest$Outbound` instead. */ + export type Outbound = GetGlobalHubsRequest$Outbound; } /** @internal */ export const GetGlobalHubsMetadata$inboundSchema: z.ZodType< - GetGlobalHubsMetadata, - z.ZodTypeDef, - unknown + GetGlobalHubsMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @internal */ export type GetGlobalHubsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; /** @internal */ export const GetGlobalHubsMetadata$outboundSchema: z.ZodType< - GetGlobalHubsMetadata$Outbound, - z.ZodTypeDef, - GetGlobalHubsMetadata + GetGlobalHubsMetadata$Outbound, + z.ZodTypeDef, + GetGlobalHubsMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @@ -225,248 +227,238 @@ export const GetGlobalHubsMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsMetadata$ { - /** @deprecated use `GetGlobalHubsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsMetadata$inboundSchema; - /** @deprecated use `GetGlobalHubsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsMetadata$outboundSchema; - /** @deprecated use `GetGlobalHubsMetadata$Outbound` instead. */ - export type Outbound = GetGlobalHubsMetadata$Outbound; + /** @deprecated use `GetGlobalHubsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsMetadata$inboundSchema; + /** @deprecated use `GetGlobalHubsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsMetadata$outboundSchema; + /** @deprecated use `GetGlobalHubsMetadata$Outbound` instead. */ + export type Outbound = GetGlobalHubsMetadata$Outbound; } /** @internal */ export const Hub$inboundSchema: z.ZodType = z - .object({ - hubKey: z.string().optional(), - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - hubIdentifier: z.string().optional(), - context: z.string().optional(), - size: z.number().int().optional(), - more: z.boolean().optional(), - style: z.string().optional(), - promoted: z.boolean().optional(), - Metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); + .object({ + hubKey: z.string().optional(), + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + hubIdentifier: z.string().optional(), + context: z.string().optional(), + size: z.number().int().optional(), + more: z.boolean().optional(), + style: z.string().optional(), + promoted: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$inboundSchema)) + .optional(), + }).transform((v) => { + return remap$(v, { + "Metadata": "metadata", }); + }); /** @internal */ export type Hub$Outbound = { - hubKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - promoted?: boolean | undefined; - Metadata?: Array | undefined; + hubKey?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + hubIdentifier?: string | undefined; + context?: string | undefined; + size?: number | undefined; + more?: boolean | undefined; + style?: string | undefined; + promoted?: boolean | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const Hub$outboundSchema: z.ZodType = z - .object({ - hubKey: z.string().optional(), - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - hubIdentifier: z.string().optional(), - context: z.string().optional(), - size: z.number().int().optional(), - more: z.boolean().optional(), - style: z.string().optional(), - promoted: z.boolean().optional(), - metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); + .object({ + hubKey: z.string().optional(), + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + hubIdentifier: z.string().optional(), + context: z.string().optional(), + size: z.number().int().optional(), + more: z.boolean().optional(), + style: z.string().optional(), + promoted: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetGlobalHubsMetadata$outboundSchema)) + .optional(), + }).transform((v) => { + return remap$(v, { + metadata: "Metadata", }); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Hub$ { - /** @deprecated use `Hub$inboundSchema` instead. */ - export const inboundSchema = Hub$inboundSchema; - /** @deprecated use `Hub$outboundSchema` instead. */ - export const outboundSchema = Hub$outboundSchema; - /** @deprecated use `Hub$Outbound` instead. */ - export type Outbound = Hub$Outbound; + /** @deprecated use `Hub$inboundSchema` instead. */ + export const inboundSchema = Hub$inboundSchema; + /** @deprecated use `Hub$outboundSchema` instead. */ + export const outboundSchema = Hub$outboundSchema; + /** @deprecated use `Hub$Outbound` instead. */ + export type Outbound = Hub$Outbound; } /** @internal */ export const GetGlobalHubsMediaContainer$inboundSchema: z.ZodType< - GetGlobalHubsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - Hub: z.array(z.lazy(() => Hub$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Hub: "hub", - }); - }); + GetGlobalHubsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + Hub: z.array(z.lazy(() => Hub$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Hub": "hub", + }); +}); /** @internal */ export type GetGlobalHubsMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - Hub?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + Hub?: Array | undefined; }; /** @internal */ export const GetGlobalHubsMediaContainer$outboundSchema: z.ZodType< - GetGlobalHubsMediaContainer$Outbound, - z.ZodTypeDef, - GetGlobalHubsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - hub: z.array(z.lazy(() => Hub$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - hub: "Hub", - }); - }); + GetGlobalHubsMediaContainer$Outbound, + z.ZodTypeDef, + GetGlobalHubsMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + hub: z.array(z.lazy(() => Hub$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + hub: "Hub", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsMediaContainer$ { - /** @deprecated use `GetGlobalHubsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsMediaContainer$inboundSchema; - /** @deprecated use `GetGlobalHubsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsMediaContainer$outboundSchema; - /** @deprecated use `GetGlobalHubsMediaContainer$Outbound` instead. */ - export type Outbound = GetGlobalHubsMediaContainer$Outbound; + /** @deprecated use `GetGlobalHubsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsMediaContainer$inboundSchema; + /** @deprecated use `GetGlobalHubsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsMediaContainer$outboundSchema; + /** @deprecated use `GetGlobalHubsMediaContainer$Outbound` instead. */ + export type Outbound = GetGlobalHubsMediaContainer$Outbound; } /** @internal */ export const GetGlobalHubsResponseBody$inboundSchema: z.ZodType< - GetGlobalHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetGlobalHubsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetGlobalHubsResponseBody$Outbound = { - MediaContainer?: GetGlobalHubsMediaContainer$Outbound | undefined; + MediaContainer?: GetGlobalHubsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetGlobalHubsResponseBody$outboundSchema: z.ZodType< - GetGlobalHubsResponseBody$Outbound, - z.ZodTypeDef, - GetGlobalHubsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetGlobalHubsResponseBody$Outbound, + z.ZodTypeDef, + GetGlobalHubsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetGlobalHubsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsResponseBody$ { - /** @deprecated use `GetGlobalHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsResponseBody$inboundSchema; - /** @deprecated use `GetGlobalHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsResponseBody$outboundSchema; - /** @deprecated use `GetGlobalHubsResponseBody$Outbound` instead. */ - export type Outbound = GetGlobalHubsResponseBody$Outbound; + /** @deprecated use `GetGlobalHubsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsResponseBody$inboundSchema; + /** @deprecated use `GetGlobalHubsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsResponseBody$outboundSchema; + /** @deprecated use `GetGlobalHubsResponseBody$Outbound` instead. */ + export type Outbound = GetGlobalHubsResponseBody$Outbound; } /** @internal */ export const GetGlobalHubsResponse$inboundSchema: z.ZodType< - GetGlobalHubsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetGlobalHubsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetGlobalHubsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetGlobalHubsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetGlobalHubsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetGlobalHubsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetGlobalHubsResponseBody$Outbound | undefined; }; /** @internal */ export const GetGlobalHubsResponse$outboundSchema: z.ZodType< - GetGlobalHubsResponse$Outbound, - z.ZodTypeDef, - GetGlobalHubsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetGlobalHubsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetGlobalHubsResponse$Outbound, + z.ZodTypeDef, + GetGlobalHubsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetGlobalHubsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetGlobalHubsResponse$ { - /** @deprecated use `GetGlobalHubsResponse$inboundSchema` instead. */ - export const inboundSchema = GetGlobalHubsResponse$inboundSchema; - /** @deprecated use `GetGlobalHubsResponse$outboundSchema` instead. */ - export const outboundSchema = GetGlobalHubsResponse$outboundSchema; - /** @deprecated use `GetGlobalHubsResponse$Outbound` instead. */ - export type Outbound = GetGlobalHubsResponse$Outbound; + /** @deprecated use `GetGlobalHubsResponse$inboundSchema` instead. */ + export const inboundSchema = GetGlobalHubsResponse$inboundSchema; + /** @deprecated use `GetGlobalHubsResponse$outboundSchema` instead. */ + export const outboundSchema = GetGlobalHubsResponse$outboundSchema; + /** @deprecated use `GetGlobalHubsResponse$Outbound` instead. */ + export type Outbound = GetGlobalHubsResponse$Outbound; } diff --git a/src/sdk/models/operations/gethomedata.ts b/src/sdk/models/operations/gethomedata.ts index 1ea4e27e..ad31b838 100644 --- a/src/sdk/models/operations/gethomedata.ts +++ b/src/sdk/models/operations/gethomedata.ts @@ -2,76 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Home Data */ export type GetHomeDataResponseBody = { - id?: number | undefined; - name?: string | undefined; - guestUserID?: number | undefined; - guestUserUUID?: string | undefined; - guestEnabled?: boolean | undefined; - subscription?: boolean | undefined; + id?: number | undefined; + name?: string | undefined; + guestUserID?: number | undefined; + guestUserUUID?: string | undefined; + guestEnabled?: boolean | undefined; + subscription?: boolean | undefined; }; export type GetHomeDataResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Home Data - */ - object?: GetHomeDataResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Home Data + */ + object?: GetHomeDataResponseBody | undefined; }; /** @internal */ export const GetHomeDataResponseBody$inboundSchema: z.ZodType< - GetHomeDataResponseBody, - z.ZodTypeDef, - unknown + GetHomeDataResponseBody, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().optional(), - name: z.string().optional(), - guestUserID: z.number().optional(), - guestUserUUID: z.string().optional(), - guestEnabled: z.boolean().optional(), - subscription: z.boolean().optional(), + id: z.number().optional(), + name: z.string().optional(), + guestUserID: z.number().optional(), + guestUserUUID: z.string().optional(), + guestEnabled: z.boolean().optional(), + subscription: z.boolean().optional(), }); /** @internal */ export type GetHomeDataResponseBody$Outbound = { - id?: number | undefined; - name?: string | undefined; - guestUserID?: number | undefined; - guestUserUUID?: string | undefined; - guestEnabled?: boolean | undefined; - subscription?: boolean | undefined; + id?: number | undefined; + name?: string | undefined; + guestUserID?: number | undefined; + guestUserUUID?: string | undefined; + guestEnabled?: boolean | undefined; + subscription?: boolean | undefined; }; /** @internal */ export const GetHomeDataResponseBody$outboundSchema: z.ZodType< - GetHomeDataResponseBody$Outbound, - z.ZodTypeDef, - GetHomeDataResponseBody + GetHomeDataResponseBody$Outbound, + z.ZodTypeDef, + GetHomeDataResponseBody > = z.object({ - id: z.number().optional(), - name: z.string().optional(), - guestUserID: z.number().optional(), - guestUserUUID: z.string().optional(), - guestEnabled: z.boolean().optional(), - subscription: z.boolean().optional(), + id: z.number().optional(), + name: z.string().optional(), + guestUserID: z.number().optional(), + guestUserUUID: z.string().optional(), + guestEnabled: z.boolean().optional(), + subscription: z.boolean().optional(), }); /** @@ -79,73 +79,69 @@ export const GetHomeDataResponseBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetHomeDataResponseBody$ { - /** @deprecated use `GetHomeDataResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataResponseBody$inboundSchema; - /** @deprecated use `GetHomeDataResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataResponseBody$outboundSchema; - /** @deprecated use `GetHomeDataResponseBody$Outbound` instead. */ - export type Outbound = GetHomeDataResponseBody$Outbound; + /** @deprecated use `GetHomeDataResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataResponseBody$inboundSchema; + /** @deprecated use `GetHomeDataResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataResponseBody$outboundSchema; + /** @deprecated use `GetHomeDataResponseBody$Outbound` instead. */ + export type Outbound = GetHomeDataResponseBody$Outbound; } /** @internal */ export const GetHomeDataResponse$inboundSchema: z.ZodType< - GetHomeDataResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetHomeDataResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetHomeDataResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetHomeDataResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetHomeDataResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetHomeDataResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetHomeDataResponseBody$Outbound | undefined; }; /** @internal */ export const GetHomeDataResponse$outboundSchema: z.ZodType< - GetHomeDataResponse$Outbound, - z.ZodTypeDef, - GetHomeDataResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetHomeDataResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetHomeDataResponse$Outbound, + z.ZodTypeDef, + GetHomeDataResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetHomeDataResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetHomeDataResponse$ { - /** @deprecated use `GetHomeDataResponse$inboundSchema` instead. */ - export const inboundSchema = GetHomeDataResponse$inboundSchema; - /** @deprecated use `GetHomeDataResponse$outboundSchema` instead. */ - export const outboundSchema = GetHomeDataResponse$outboundSchema; - /** @deprecated use `GetHomeDataResponse$Outbound` instead. */ - export type Outbound = GetHomeDataResponse$Outbound; + /** @deprecated use `GetHomeDataResponse$inboundSchema` instead. */ + export const inboundSchema = GetHomeDataResponse$inboundSchema; + /** @deprecated use `GetHomeDataResponse$outboundSchema` instead. */ + export const outboundSchema = GetHomeDataResponse$outboundSchema; + /** @deprecated use `GetHomeDataResponse$Outbound` instead. */ + export type Outbound = GetHomeDataResponse$Outbound; } diff --git a/src/sdk/models/operations/getlibrarydetails.ts b/src/sdk/models/operations/getlibrarydetails.ts index 9e0232b5..2ad6ad02 100644 --- a/src/sdk/models/operations/getlibrarydetails.ts +++ b/src/sdk/models/operations/getlibrarydetails.ts @@ -2,179 +2,178 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Whether or not to include details for a section (types, filters, and sorts). * * @remarks * Only exists for backwards compatibility, media providers other than the server libraries have it on always. - * */ export enum IncludeDetails { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetLibraryDetailsRequest = { - /** - * The unique key of the Plex library. - * - * @remarks - * Note: This is unique in the context of the Plex server. - * - */ - sectionKey: number; - /** - * Whether or not to include details for a section (types, filters, and sorts). - * - * @remarks - * Only exists for backwards compatibility, media providers other than the server libraries have it on always. - * - */ - includeDetails?: IncludeDetails | undefined; + /** + * The unique key of the Plex library. + * + * @remarks + * Note: This is unique in the context of the Plex server. + */ + sectionKey: number; + /** + * Whether or not to include details for a section (types, filters, and sorts). + * + * @remarks + * Only exists for backwards compatibility, media providers other than the server libraries have it on always. + */ + includeDetails?: IncludeDetails | undefined; }; export type GetLibraryDetailsDirectory = { - key?: string | undefined; - title?: string | undefined; - secondary?: boolean | undefined; - prompt?: string | undefined; - search?: boolean | undefined; + key?: string | undefined; + title?: string | undefined; + secondary?: boolean | undefined; + prompt?: string | undefined; + search?: boolean | undefined; }; export type GetLibraryDetailsFilter = { - filter?: string | undefined; - filterType?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; + filter?: string | undefined; + filterType?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; }; export type Sort = { - default?: string | undefined; - defaultDirection?: string | undefined; - descKey?: string | undefined; - firstCharacterKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; + default?: string | undefined; + defaultDirection?: string | undefined; + descKey?: string | undefined; + firstCharacterKey?: string | undefined; + key?: string | undefined; + title?: string | undefined; }; export type Field = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - subType?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + subType?: string | undefined; }; export type GetLibraryDetailsType = { - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - active?: boolean | undefined; - filter?: Array | undefined; - sort?: Array | undefined; - field?: Array | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + active?: boolean | undefined; + filter?: Array | undefined; + sort?: Array | undefined; + field?: Array | undefined; }; export type Operator = { - key?: string | undefined; - title?: string | undefined; + key?: string | undefined; + title?: string | undefined; }; export type FieldType = { - type?: string | undefined; - operator?: Array | undefined; + type?: string | undefined; + operator?: Array | undefined; }; export type GetLibraryDetailsMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - content?: string | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - thumb?: string | undefined; - title1?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - directory?: Array | undefined; - type?: Array | undefined; - fieldType?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + content?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + directory?: Array | undefined; + type?: Array | undefined; + fieldType?: Array | undefined; }; /** * The details of the library */ export type GetLibraryDetailsResponseBody = { - mediaContainer?: GetLibraryDetailsMediaContainer | undefined; + mediaContainer?: GetLibraryDetailsMediaContainer | undefined; }; export type GetLibraryDetailsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The details of the library - */ - object?: GetLibraryDetailsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The details of the library + */ + object?: GetLibraryDetailsResponseBody | undefined; }; /** @internal */ -export const IncludeDetails$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeDetails); +export const IncludeDetails$inboundSchema: z.ZodNativeEnum< + typeof IncludeDetails +> = z.nativeEnum(IncludeDetails); /** @internal */ -export const IncludeDetails$outboundSchema: z.ZodNativeEnum = - IncludeDetails$inboundSchema; +export const IncludeDetails$outboundSchema: z.ZodNativeEnum< + typeof IncludeDetails +> = IncludeDetails$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeDetails$ { - /** @deprecated use `IncludeDetails$inboundSchema` instead. */ - export const inboundSchema = IncludeDetails$inboundSchema; - /** @deprecated use `IncludeDetails$outboundSchema` instead. */ - export const outboundSchema = IncludeDetails$outboundSchema; + /** @deprecated use `IncludeDetails$inboundSchema` instead. */ + export const inboundSchema = IncludeDetails$inboundSchema; + /** @deprecated use `IncludeDetails$outboundSchema` instead. */ + export const outboundSchema = IncludeDetails$outboundSchema; } /** @internal */ export const GetLibraryDetailsRequest$inboundSchema: z.ZodType< - GetLibraryDetailsRequest, - z.ZodTypeDef, - unknown + GetLibraryDetailsRequest, + z.ZodTypeDef, + unknown > = z.object({ - sectionKey: z.number().int(), - includeDetails: IncludeDetails$inboundSchema, + sectionKey: z.number().int(), + includeDetails: IncludeDetails$inboundSchema, }); /** @internal */ export type GetLibraryDetailsRequest$Outbound = { - sectionKey: number; - includeDetails: number; + sectionKey: number; + includeDetails: number; }; /** @internal */ export const GetLibraryDetailsRequest$outboundSchema: z.ZodType< - GetLibraryDetailsRequest$Outbound, - z.ZodTypeDef, - GetLibraryDetailsRequest + GetLibraryDetailsRequest$Outbound, + z.ZodTypeDef, + GetLibraryDetailsRequest > = z.object({ - sectionKey: z.number().int(), - includeDetails: IncludeDetails$outboundSchema.default(IncludeDetails.Zero), + sectionKey: z.number().int(), + includeDetails: IncludeDetails$outboundSchema.default(IncludeDetails.Zero), }); /** @@ -182,47 +181,47 @@ export const GetLibraryDetailsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsRequest$ { - /** @deprecated use `GetLibraryDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsRequest$inboundSchema; - /** @deprecated use `GetLibraryDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsRequest$outboundSchema; - /** @deprecated use `GetLibraryDetailsRequest$Outbound` instead. */ - export type Outbound = GetLibraryDetailsRequest$Outbound; + /** @deprecated use `GetLibraryDetailsRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsRequest$inboundSchema; + /** @deprecated use `GetLibraryDetailsRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsRequest$outboundSchema; + /** @deprecated use `GetLibraryDetailsRequest$Outbound` instead. */ + export type Outbound = GetLibraryDetailsRequest$Outbound; } /** @internal */ export const GetLibraryDetailsDirectory$inboundSchema: z.ZodType< - GetLibraryDetailsDirectory, - z.ZodTypeDef, - unknown + GetLibraryDetailsDirectory, + z.ZodTypeDef, + unknown > = z.object({ - key: z.string().optional(), - title: z.string().optional(), - secondary: z.boolean().optional(), - prompt: z.string().optional(), - search: z.boolean().optional(), + key: z.string().optional(), + title: z.string().optional(), + secondary: z.boolean().optional(), + prompt: z.string().optional(), + search: z.boolean().optional(), }); /** @internal */ export type GetLibraryDetailsDirectory$Outbound = { - key?: string | undefined; - title?: string | undefined; - secondary?: boolean | undefined; - prompt?: string | undefined; - search?: boolean | undefined; + key?: string | undefined; + title?: string | undefined; + secondary?: boolean | undefined; + prompt?: string | undefined; + search?: boolean | undefined; }; /** @internal */ export const GetLibraryDetailsDirectory$outboundSchema: z.ZodType< - GetLibraryDetailsDirectory$Outbound, - z.ZodTypeDef, - GetLibraryDetailsDirectory + GetLibraryDetailsDirectory$Outbound, + z.ZodTypeDef, + GetLibraryDetailsDirectory > = z.object({ - key: z.string().optional(), - title: z.string().optional(), - secondary: z.boolean().optional(), - prompt: z.string().optional(), - search: z.boolean().optional(), + key: z.string().optional(), + title: z.string().optional(), + secondary: z.boolean().optional(), + prompt: z.string().optional(), + search: z.boolean().optional(), }); /** @@ -230,47 +229,47 @@ export const GetLibraryDetailsDirectory$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsDirectory$ { - /** @deprecated use `GetLibraryDetailsDirectory$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsDirectory$inboundSchema; - /** @deprecated use `GetLibraryDetailsDirectory$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsDirectory$outboundSchema; - /** @deprecated use `GetLibraryDetailsDirectory$Outbound` instead. */ - export type Outbound = GetLibraryDetailsDirectory$Outbound; + /** @deprecated use `GetLibraryDetailsDirectory$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsDirectory$inboundSchema; + /** @deprecated use `GetLibraryDetailsDirectory$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsDirectory$outboundSchema; + /** @deprecated use `GetLibraryDetailsDirectory$Outbound` instead. */ + export type Outbound = GetLibraryDetailsDirectory$Outbound; } /** @internal */ export const GetLibraryDetailsFilter$inboundSchema: z.ZodType< - GetLibraryDetailsFilter, - z.ZodTypeDef, - unknown + GetLibraryDetailsFilter, + z.ZodTypeDef, + unknown > = z.object({ - filter: z.string().optional(), - filterType: z.string().optional(), - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), + filter: z.string().optional(), + filterType: z.string().optional(), + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), }); /** @internal */ export type GetLibraryDetailsFilter$Outbound = { - filter?: string | undefined; - filterType?: string | undefined; - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; + filter?: string | undefined; + filterType?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; }; /** @internal */ export const GetLibraryDetailsFilter$outboundSchema: z.ZodType< - GetLibraryDetailsFilter$Outbound, - z.ZodTypeDef, - GetLibraryDetailsFilter + GetLibraryDetailsFilter$Outbound, + z.ZodTypeDef, + GetLibraryDetailsFilter > = z.object({ - filter: z.string().optional(), - filterType: z.string().optional(), - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), + filter: z.string().optional(), + filterType: z.string().optional(), + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), }); /** @@ -278,79 +277,86 @@ export const GetLibraryDetailsFilter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsFilter$ { - /** @deprecated use `GetLibraryDetailsFilter$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsFilter$inboundSchema; - /** @deprecated use `GetLibraryDetailsFilter$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsFilter$outboundSchema; - /** @deprecated use `GetLibraryDetailsFilter$Outbound` instead. */ - export type Outbound = GetLibraryDetailsFilter$Outbound; + /** @deprecated use `GetLibraryDetailsFilter$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsFilter$inboundSchema; + /** @deprecated use `GetLibraryDetailsFilter$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsFilter$outboundSchema; + /** @deprecated use `GetLibraryDetailsFilter$Outbound` instead. */ + export type Outbound = GetLibraryDetailsFilter$Outbound; } /** @internal */ -export const Sort$inboundSchema: z.ZodType = z.object({ +export const Sort$inboundSchema: z.ZodType = z + .object({ default: z.string().optional(), defaultDirection: z.string().optional(), descKey: z.string().optional(), firstCharacterKey: z.string().optional(), key: z.string().optional(), title: z.string().optional(), -}); + }); /** @internal */ export type Sort$Outbound = { - default?: string | undefined; - defaultDirection?: string | undefined; - descKey?: string | undefined; - firstCharacterKey?: string | undefined; - key?: string | undefined; - title?: string | undefined; + default?: string | undefined; + defaultDirection?: string | undefined; + descKey?: string | undefined; + firstCharacterKey?: string | undefined; + key?: string | undefined; + title?: string | undefined; }; /** @internal */ -export const Sort$outboundSchema: z.ZodType = z.object({ +export const Sort$outboundSchema: z.ZodType = + z.object({ default: z.string().optional(), defaultDirection: z.string().optional(), descKey: z.string().optional(), firstCharacterKey: z.string().optional(), key: z.string().optional(), title: z.string().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Sort$ { - /** @deprecated use `Sort$inboundSchema` instead. */ - export const inboundSchema = Sort$inboundSchema; - /** @deprecated use `Sort$outboundSchema` instead. */ - export const outboundSchema = Sort$outboundSchema; - /** @deprecated use `Sort$Outbound` instead. */ - export type Outbound = Sort$Outbound; + /** @deprecated use `Sort$inboundSchema` instead. */ + export const inboundSchema = Sort$inboundSchema; + /** @deprecated use `Sort$outboundSchema` instead. */ + export const outboundSchema = Sort$outboundSchema; + /** @deprecated use `Sort$Outbound` instead. */ + export type Outbound = Sort$Outbound; } /** @internal */ -export const Field$inboundSchema: z.ZodType = z.object({ +export const Field$inboundSchema: z.ZodType = z + .object({ key: z.string().optional(), title: z.string().optional(), type: z.string().optional(), subType: z.string().optional(), -}); + }); /** @internal */ export type Field$Outbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - subType?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + subType?: string | undefined; }; /** @internal */ -export const Field$outboundSchema: z.ZodType = z.object({ - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - subType: z.string().optional(), +export const Field$outboundSchema: z.ZodType< + Field$Outbound, + z.ZodTypeDef, + Field +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + subType: z.string().optional(), }); /** @@ -358,360 +364,361 @@ export const Field$outboundSchema: z.ZodType = z - .object({ - key: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - active: z.boolean().optional(), - Filter: z.array(z.lazy(() => GetLibraryDetailsFilter$inboundSchema)).optional(), - Sort: z.array(z.lazy(() => Sort$inboundSchema)).optional(), - Field: z.array(z.lazy(() => Field$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Filter: "filter", - Sort: "sort", - Field: "field", - }); - }); + GetLibraryDetailsType, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + active: z.boolean().optional(), + Filter: z.array(z.lazy(() => GetLibraryDetailsFilter$inboundSchema)) + .optional(), + Sort: z.array(z.lazy(() => Sort$inboundSchema)).optional(), + Field: z.array(z.lazy(() => Field$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Filter": "filter", + "Sort": "sort", + "Field": "field", + }); +}); /** @internal */ export type GetLibraryDetailsType$Outbound = { - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - active?: boolean | undefined; - Filter?: Array | undefined; - Sort?: Array | undefined; - Field?: Array | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + active?: boolean | undefined; + Filter?: Array | undefined; + Sort?: Array | undefined; + Field?: Array | undefined; }; /** @internal */ export const GetLibraryDetailsType$outboundSchema: z.ZodType< - GetLibraryDetailsType$Outbound, - z.ZodTypeDef, - GetLibraryDetailsType -> = z - .object({ - key: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - active: z.boolean().optional(), - filter: z.array(z.lazy(() => GetLibraryDetailsFilter$outboundSchema)).optional(), - sort: z.array(z.lazy(() => Sort$outboundSchema)).optional(), - field: z.array(z.lazy(() => Field$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - filter: "Filter", - sort: "Sort", - field: "Field", - }); - }); + GetLibraryDetailsType$Outbound, + z.ZodTypeDef, + GetLibraryDetailsType +> = z.object({ + key: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + active: z.boolean().optional(), + filter: z.array(z.lazy(() => GetLibraryDetailsFilter$outboundSchema)) + .optional(), + sort: z.array(z.lazy(() => Sort$outboundSchema)).optional(), + field: z.array(z.lazy(() => Field$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + filter: "Filter", + sort: "Sort", + field: "Field", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsType$ { - /** @deprecated use `GetLibraryDetailsType$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsType$inboundSchema; - /** @deprecated use `GetLibraryDetailsType$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsType$outboundSchema; - /** @deprecated use `GetLibraryDetailsType$Outbound` instead. */ - export type Outbound = GetLibraryDetailsType$Outbound; + /** @deprecated use `GetLibraryDetailsType$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsType$inboundSchema; + /** @deprecated use `GetLibraryDetailsType$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsType$outboundSchema; + /** @deprecated use `GetLibraryDetailsType$Outbound` instead. */ + export type Outbound = GetLibraryDetailsType$Outbound; } /** @internal */ -export const Operator$inboundSchema: z.ZodType = z.object({ - key: z.string().optional(), - title: z.string().optional(), +export const Operator$inboundSchema: z.ZodType< + Operator, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), }); /** @internal */ export type Operator$Outbound = { - key?: string | undefined; - title?: string | undefined; + key?: string | undefined; + title?: string | undefined; }; /** @internal */ -export const Operator$outboundSchema: z.ZodType = - z.object({ - key: z.string().optional(), - title: z.string().optional(), - }); +export const Operator$outboundSchema: z.ZodType< + Operator$Outbound, + z.ZodTypeDef, + Operator +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Operator$ { - /** @deprecated use `Operator$inboundSchema` instead. */ - export const inboundSchema = Operator$inboundSchema; - /** @deprecated use `Operator$outboundSchema` instead. */ - export const outboundSchema = Operator$outboundSchema; - /** @deprecated use `Operator$Outbound` instead. */ - export type Outbound = Operator$Outbound; + /** @deprecated use `Operator$inboundSchema` instead. */ + export const inboundSchema = Operator$inboundSchema; + /** @deprecated use `Operator$outboundSchema` instead. */ + export const outboundSchema = Operator$outboundSchema; + /** @deprecated use `Operator$Outbound` instead. */ + export type Outbound = Operator$Outbound; } /** @internal */ -export const FieldType$inboundSchema: z.ZodType = z - .object({ - type: z.string().optional(), - Operator: z.array(z.lazy(() => Operator$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Operator: "operator", - }); - }); +export const FieldType$inboundSchema: z.ZodType< + FieldType, + z.ZodTypeDef, + unknown +> = z.object({ + type: z.string().optional(), + Operator: z.array(z.lazy(() => Operator$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Operator": "operator", + }); +}); /** @internal */ export type FieldType$Outbound = { - type?: string | undefined; - Operator?: Array | undefined; + type?: string | undefined; + Operator?: Array | undefined; }; /** @internal */ -export const FieldType$outboundSchema: z.ZodType = z - .object({ - type: z.string().optional(), - operator: z.array(z.lazy(() => Operator$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - operator: "Operator", - }); - }); +export const FieldType$outboundSchema: z.ZodType< + FieldType$Outbound, + z.ZodTypeDef, + FieldType +> = z.object({ + type: z.string().optional(), + operator: z.array(z.lazy(() => Operator$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + operator: "Operator", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace FieldType$ { - /** @deprecated use `FieldType$inboundSchema` instead. */ - export const inboundSchema = FieldType$inboundSchema; - /** @deprecated use `FieldType$outboundSchema` instead. */ - export const outboundSchema = FieldType$outboundSchema; - /** @deprecated use `FieldType$Outbound` instead. */ - export type Outbound = FieldType$Outbound; + /** @deprecated use `FieldType$inboundSchema` instead. */ + export const inboundSchema = FieldType$inboundSchema; + /** @deprecated use `FieldType$outboundSchema` instead. */ + export const outboundSchema = FieldType$outboundSchema; + /** @deprecated use `FieldType$Outbound` instead. */ + export type Outbound = FieldType$Outbound; } /** @internal */ export const GetLibraryDetailsMediaContainer$inboundSchema: z.ZodType< - GetLibraryDetailsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - content: z.string().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - Directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$inboundSchema)).optional(), - Type: z.array(z.lazy(() => GetLibraryDetailsType$inboundSchema)).optional(), - FieldType: z.array(z.lazy(() => FieldType$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Directory: "directory", - Type: "type", - FieldType: "fieldType", - }); - }); + GetLibraryDetailsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + content: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + Directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$inboundSchema)) + .optional(), + Type: z.array(z.lazy(() => GetLibraryDetailsType$inboundSchema)).optional(), + FieldType: z.array(z.lazy(() => FieldType$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Directory": "directory", + "Type": "type", + "FieldType": "fieldType", + }); +}); /** @internal */ export type GetLibraryDetailsMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - content?: string | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - thumb?: string | undefined; - title1?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Directory?: Array | undefined; - Type?: Array | undefined; - FieldType?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + content?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + Directory?: Array | undefined; + Type?: Array | undefined; + FieldType?: Array | undefined; }; /** @internal */ export const GetLibraryDetailsMediaContainer$outboundSchema: z.ZodType< - GetLibraryDetailsMediaContainer$Outbound, - z.ZodTypeDef, - GetLibraryDetailsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - content: z.string().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$outboundSchema)).optional(), - type: z.array(z.lazy(() => GetLibraryDetailsType$outboundSchema)).optional(), - fieldType: z.array(z.lazy(() => FieldType$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - directory: "Directory", - type: "Type", - fieldType: "FieldType", - }); - }); + GetLibraryDetailsMediaContainer$Outbound, + z.ZodTypeDef, + GetLibraryDetailsMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + content: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + directory: z.array(z.lazy(() => GetLibraryDetailsDirectory$outboundSchema)) + .optional(), + type: z.array(z.lazy(() => GetLibraryDetailsType$outboundSchema)).optional(), + fieldType: z.array(z.lazy(() => FieldType$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + directory: "Directory", + type: "Type", + fieldType: "FieldType", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsMediaContainer$ { - /** @deprecated use `GetLibraryDetailsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsMediaContainer$inboundSchema; - /** @deprecated use `GetLibraryDetailsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsMediaContainer$outboundSchema; - /** @deprecated use `GetLibraryDetailsMediaContainer$Outbound` instead. */ - export type Outbound = GetLibraryDetailsMediaContainer$Outbound; + /** @deprecated use `GetLibraryDetailsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsMediaContainer$inboundSchema; + /** @deprecated use `GetLibraryDetailsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsMediaContainer$outboundSchema; + /** @deprecated use `GetLibraryDetailsMediaContainer$Outbound` instead. */ + export type Outbound = GetLibraryDetailsMediaContainer$Outbound; } /** @internal */ export const GetLibraryDetailsResponseBody$inboundSchema: z.ZodType< - GetLibraryDetailsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetLibraryDetailsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetLibraryDetailsResponseBody$Outbound = { - MediaContainer?: GetLibraryDetailsMediaContainer$Outbound | undefined; + MediaContainer?: GetLibraryDetailsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetLibraryDetailsResponseBody$outboundSchema: z.ZodType< - GetLibraryDetailsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryDetailsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetLibraryDetailsResponseBody$Outbound, + z.ZodTypeDef, + GetLibraryDetailsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetLibraryDetailsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsResponseBody$ { - /** @deprecated use `GetLibraryDetailsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryDetailsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryDetailsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryDetailsResponseBody$Outbound; + /** @deprecated use `GetLibraryDetailsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsResponseBody$inboundSchema; + /** @deprecated use `GetLibraryDetailsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsResponseBody$outboundSchema; + /** @deprecated use `GetLibraryDetailsResponseBody$Outbound` instead. */ + export type Outbound = GetLibraryDetailsResponseBody$Outbound; } /** @internal */ export const GetLibraryDetailsResponse$inboundSchema: z.ZodType< - GetLibraryDetailsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetLibraryDetailsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetLibraryDetailsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetLibraryDetailsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetLibraryDetailsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetLibraryDetailsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetLibraryDetailsResponseBody$Outbound | undefined; }; /** @internal */ export const GetLibraryDetailsResponse$outboundSchema: z.ZodType< - GetLibraryDetailsResponse$Outbound, - z.ZodTypeDef, - GetLibraryDetailsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetLibraryDetailsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetLibraryDetailsResponse$Outbound, + z.ZodTypeDef, + GetLibraryDetailsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetLibraryDetailsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryDetailsResponse$ { - /** @deprecated use `GetLibraryDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = GetLibraryDetailsResponse$inboundSchema; - /** @deprecated use `GetLibraryDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = GetLibraryDetailsResponse$outboundSchema; - /** @deprecated use `GetLibraryDetailsResponse$Outbound` instead. */ - export type Outbound = GetLibraryDetailsResponse$Outbound; + /** @deprecated use `GetLibraryDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = GetLibraryDetailsResponse$inboundSchema; + /** @deprecated use `GetLibraryDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = GetLibraryDetailsResponse$outboundSchema; + /** @deprecated use `GetLibraryDetailsResponse$Outbound` instead. */ + export type Outbound = GetLibraryDetailsResponse$Outbound; } diff --git a/src/sdk/models/operations/getlibraryhubs.ts b/src/sdk/models/operations/getlibraryhubs.ts index 25582fca..9253ab15 100644 --- a/src/sdk/models/operations/getlibraryhubs.ts +++ b/src/sdk/models/operations/getlibraryhubs.ts @@ -2,182 +2,182 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; /** * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). */ export enum QueryParamOnlyTransient { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetLibraryHubsRequest = { - /** - * the Id of the library to query - */ - sectionId: number; - /** - * The number of items to return with each hub. - */ - count?: number | undefined; - /** - * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). - */ - onlyTransient?: QueryParamOnlyTransient | undefined; + /** + * the Id of the library to query + */ + sectionId: number; + /** + * The number of items to return with each hub. + */ + count?: number | undefined; + /** + * Only return hubs which are "transient", meaning those which are prone to changing after media playback or addition (e.g. On Deck, or Recently Added). + */ + onlyTransient?: QueryParamOnlyTransient | undefined; }; export type GetLibraryHubsPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; export type GetLibraryHubsMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetLibraryHubsGenre = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryHubsCountry = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryHubsDirector = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryHubsRole = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryHubsWriter = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryHubsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - country?: Array | undefined; - director?: Array | undefined; - role?: Array | undefined; - writer?: Array | undefined; - skipCount?: number | undefined; - chapterSource?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + country?: Array | undefined; + director?: Array | undefined; + role?: Array | undefined; + writer?: Array | undefined; + skipCount?: number | undefined; + chapterSource?: string | undefined; }; export type GetLibraryHubsHub = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - hubKey?: string | undefined; - metadata?: Array | undefined; - promoted?: boolean | undefined; - random?: boolean | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + hubIdentifier?: string | undefined; + context?: string | undefined; + size?: number | undefined; + more?: boolean | undefined; + style?: string | undefined; + hubKey?: string | undefined; + metadata?: Array | undefined; + promoted?: boolean | undefined; + random?: boolean | undefined; }; export type GetLibraryHubsMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - hub?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + hub?: Array | undefined; }; /** * The hubs specific to the library */ export type GetLibraryHubsResponseBody = { - mediaContainer?: GetLibraryHubsMediaContainer | undefined; + mediaContainer?: GetLibraryHubsMediaContainer | undefined; }; export type GetLibraryHubsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The hubs specific to the library - */ - object?: GetLibraryHubsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The hubs specific to the library + */ + object?: GetLibraryHubsResponseBody | undefined; }; /** @internal */ export const QueryParamOnlyTransient$inboundSchema: z.ZodNativeEnum< - typeof QueryParamOnlyTransient + typeof QueryParamOnlyTransient > = z.nativeEnum(QueryParamOnlyTransient); /** @internal */ export const QueryParamOnlyTransient$outboundSchema: z.ZodNativeEnum< - typeof QueryParamOnlyTransient + typeof QueryParamOnlyTransient > = QueryParamOnlyTransient$inboundSchema; /** @@ -185,39 +185,39 @@ export const QueryParamOnlyTransient$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamOnlyTransient$ { - /** @deprecated use `QueryParamOnlyTransient$inboundSchema` instead. */ - export const inboundSchema = QueryParamOnlyTransient$inboundSchema; - /** @deprecated use `QueryParamOnlyTransient$outboundSchema` instead. */ - export const outboundSchema = QueryParamOnlyTransient$outboundSchema; + /** @deprecated use `QueryParamOnlyTransient$inboundSchema` instead. */ + export const inboundSchema = QueryParamOnlyTransient$inboundSchema; + /** @deprecated use `QueryParamOnlyTransient$outboundSchema` instead. */ + export const outboundSchema = QueryParamOnlyTransient$outboundSchema; } /** @internal */ export const GetLibraryHubsRequest$inboundSchema: z.ZodType< - GetLibraryHubsRequest, - z.ZodTypeDef, - unknown + GetLibraryHubsRequest, + z.ZodTypeDef, + unknown > = z.object({ - sectionId: z.number(), - count: z.number().optional(), - onlyTransient: QueryParamOnlyTransient$inboundSchema.optional(), + sectionId: z.number(), + count: z.number().optional(), + onlyTransient: QueryParamOnlyTransient$inboundSchema.optional(), }); /** @internal */ export type GetLibraryHubsRequest$Outbound = { - sectionId: number; - count?: number | undefined; - onlyTransient?: number | undefined; + sectionId: number; + count?: number | undefined; + onlyTransient?: number | undefined; }; /** @internal */ export const GetLibraryHubsRequest$outboundSchema: z.ZodType< - GetLibraryHubsRequest$Outbound, - z.ZodTypeDef, - GetLibraryHubsRequest + GetLibraryHubsRequest$Outbound, + z.ZodTypeDef, + GetLibraryHubsRequest > = z.object({ - sectionId: z.number(), - count: z.number().optional(), - onlyTransient: QueryParamOnlyTransient$outboundSchema.optional(), + sectionId: z.number(), + count: z.number().optional(), + onlyTransient: QueryParamOnlyTransient$outboundSchema.optional(), }); /** @@ -225,62 +225,62 @@ export const GetLibraryHubsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsRequest$ { - /** @deprecated use `GetLibraryHubsRequest$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsRequest$inboundSchema; - /** @deprecated use `GetLibraryHubsRequest$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsRequest$outboundSchema; - /** @deprecated use `GetLibraryHubsRequest$Outbound` instead. */ - export type Outbound = GetLibraryHubsRequest$Outbound; + /** @deprecated use `GetLibraryHubsRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsRequest$inboundSchema; + /** @deprecated use `GetLibraryHubsRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsRequest$outboundSchema; + /** @deprecated use `GetLibraryHubsRequest$Outbound` instead. */ + export type Outbound = GetLibraryHubsRequest$Outbound; } /** @internal */ export const GetLibraryHubsPart$inboundSchema: z.ZodType< - GetLibraryHubsPart, - z.ZodTypeDef, - unknown + GetLibraryHubsPart, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), }); /** @internal */ export type GetLibraryHubsPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; /** @internal */ export const GetLibraryHubsPart$outboundSchema: z.ZodType< - GetLibraryHubsPart$Outbound, - z.ZodTypeDef, - GetLibraryHubsPart + GetLibraryHubsPart$Outbound, + z.ZodTypeDef, + GetLibraryHubsPart > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), }); /** @@ -288,131 +288,127 @@ export const GetLibraryHubsPart$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsPart$ { - /** @deprecated use `GetLibraryHubsPart$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsPart$inboundSchema; - /** @deprecated use `GetLibraryHubsPart$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsPart$outboundSchema; - /** @deprecated use `GetLibraryHubsPart$Outbound` instead. */ - export type Outbound = GetLibraryHubsPart$Outbound; + /** @deprecated use `GetLibraryHubsPart$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsPart$inboundSchema; + /** @deprecated use `GetLibraryHubsPart$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsPart$outboundSchema; + /** @deprecated use `GetLibraryHubsPart$Outbound` instead. */ + export type Outbound = GetLibraryHubsPart$Outbound; } /** @internal */ export const GetLibraryHubsMedia$inboundSchema: z.ZodType< - GetLibraryHubsMedia, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetLibraryHubsPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); + GetLibraryHubsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetLibraryHubsPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetLibraryHubsMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetLibraryHubsMedia$outboundSchema: z.ZodType< - GetLibraryHubsMedia$Outbound, - z.ZodTypeDef, - GetLibraryHubsMedia -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetLibraryHubsPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetLibraryHubsMedia$Outbound, + z.ZodTypeDef, + GetLibraryHubsMedia +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetLibraryHubsPart$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsMedia$ { - /** @deprecated use `GetLibraryHubsMedia$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsMedia$inboundSchema; - /** @deprecated use `GetLibraryHubsMedia$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsMedia$outboundSchema; - /** @deprecated use `GetLibraryHubsMedia$Outbound` instead. */ - export type Outbound = GetLibraryHubsMedia$Outbound; + /** @deprecated use `GetLibraryHubsMedia$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsMedia$inboundSchema; + /** @deprecated use `GetLibraryHubsMedia$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsMedia$outboundSchema; + /** @deprecated use `GetLibraryHubsMedia$Outbound` instead. */ + export type Outbound = GetLibraryHubsMedia$Outbound; } /** @internal */ export const GetLibraryHubsGenre$inboundSchema: z.ZodType< - GetLibraryHubsGenre, - z.ZodTypeDef, - unknown + GetLibraryHubsGenre, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryHubsGenre$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryHubsGenre$outboundSchema: z.ZodType< - GetLibraryHubsGenre$Outbound, - z.ZodTypeDef, - GetLibraryHubsGenre + GetLibraryHubsGenre$Outbound, + z.ZodTypeDef, + GetLibraryHubsGenre > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -420,35 +416,35 @@ export const GetLibraryHubsGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsGenre$ { - /** @deprecated use `GetLibraryHubsGenre$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsGenre$inboundSchema; - /** @deprecated use `GetLibraryHubsGenre$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsGenre$outboundSchema; - /** @deprecated use `GetLibraryHubsGenre$Outbound` instead. */ - export type Outbound = GetLibraryHubsGenre$Outbound; + /** @deprecated use `GetLibraryHubsGenre$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsGenre$inboundSchema; + /** @deprecated use `GetLibraryHubsGenre$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsGenre$outboundSchema; + /** @deprecated use `GetLibraryHubsGenre$Outbound` instead. */ + export type Outbound = GetLibraryHubsGenre$Outbound; } /** @internal */ export const GetLibraryHubsCountry$inboundSchema: z.ZodType< - GetLibraryHubsCountry, - z.ZodTypeDef, - unknown + GetLibraryHubsCountry, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryHubsCountry$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryHubsCountry$outboundSchema: z.ZodType< - GetLibraryHubsCountry$Outbound, - z.ZodTypeDef, - GetLibraryHubsCountry + GetLibraryHubsCountry$Outbound, + z.ZodTypeDef, + GetLibraryHubsCountry > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -456,35 +452,35 @@ export const GetLibraryHubsCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsCountry$ { - /** @deprecated use `GetLibraryHubsCountry$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsCountry$inboundSchema; - /** @deprecated use `GetLibraryHubsCountry$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsCountry$outboundSchema; - /** @deprecated use `GetLibraryHubsCountry$Outbound` instead. */ - export type Outbound = GetLibraryHubsCountry$Outbound; + /** @deprecated use `GetLibraryHubsCountry$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsCountry$inboundSchema; + /** @deprecated use `GetLibraryHubsCountry$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsCountry$outboundSchema; + /** @deprecated use `GetLibraryHubsCountry$Outbound` instead. */ + export type Outbound = GetLibraryHubsCountry$Outbound; } /** @internal */ export const GetLibraryHubsDirector$inboundSchema: z.ZodType< - GetLibraryHubsDirector, - z.ZodTypeDef, - unknown + GetLibraryHubsDirector, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryHubsDirector$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryHubsDirector$outboundSchema: z.ZodType< - GetLibraryHubsDirector$Outbound, - z.ZodTypeDef, - GetLibraryHubsDirector + GetLibraryHubsDirector$Outbound, + z.ZodTypeDef, + GetLibraryHubsDirector > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -492,35 +488,35 @@ export const GetLibraryHubsDirector$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsDirector$ { - /** @deprecated use `GetLibraryHubsDirector$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsDirector$inboundSchema; - /** @deprecated use `GetLibraryHubsDirector$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsDirector$outboundSchema; - /** @deprecated use `GetLibraryHubsDirector$Outbound` instead. */ - export type Outbound = GetLibraryHubsDirector$Outbound; + /** @deprecated use `GetLibraryHubsDirector$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsDirector$inboundSchema; + /** @deprecated use `GetLibraryHubsDirector$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsDirector$outboundSchema; + /** @deprecated use `GetLibraryHubsDirector$Outbound` instead. */ + export type Outbound = GetLibraryHubsDirector$Outbound; } /** @internal */ export const GetLibraryHubsRole$inboundSchema: z.ZodType< - GetLibraryHubsRole, - z.ZodTypeDef, - unknown + GetLibraryHubsRole, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryHubsRole$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryHubsRole$outboundSchema: z.ZodType< - GetLibraryHubsRole$Outbound, - z.ZodTypeDef, - GetLibraryHubsRole + GetLibraryHubsRole$Outbound, + z.ZodTypeDef, + GetLibraryHubsRole > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -528,35 +524,35 @@ export const GetLibraryHubsRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsRole$ { - /** @deprecated use `GetLibraryHubsRole$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsRole$inboundSchema; - /** @deprecated use `GetLibraryHubsRole$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsRole$outboundSchema; - /** @deprecated use `GetLibraryHubsRole$Outbound` instead. */ - export type Outbound = GetLibraryHubsRole$Outbound; + /** @deprecated use `GetLibraryHubsRole$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsRole$inboundSchema; + /** @deprecated use `GetLibraryHubsRole$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsRole$outboundSchema; + /** @deprecated use `GetLibraryHubsRole$Outbound` instead. */ + export type Outbound = GetLibraryHubsRole$Outbound; } /** @internal */ export const GetLibraryHubsWriter$inboundSchema: z.ZodType< - GetLibraryHubsWriter, - z.ZodTypeDef, - unknown + GetLibraryHubsWriter, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryHubsWriter$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryHubsWriter$outboundSchema: z.ZodType< - GetLibraryHubsWriter$Outbound, - z.ZodTypeDef, - GetLibraryHubsWriter + GetLibraryHubsWriter$Outbound, + z.ZodTypeDef, + GetLibraryHubsWriter > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -564,428 +560,414 @@ export const GetLibraryHubsWriter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsWriter$ { - /** @deprecated use `GetLibraryHubsWriter$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsWriter$inboundSchema; - /** @deprecated use `GetLibraryHubsWriter$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsWriter$outboundSchema; - /** @deprecated use `GetLibraryHubsWriter$Outbound` instead. */ - export type Outbound = GetLibraryHubsWriter$Outbound; + /** @deprecated use `GetLibraryHubsWriter$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsWriter$inboundSchema; + /** @deprecated use `GetLibraryHubsWriter$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsWriter$outboundSchema; + /** @deprecated use `GetLibraryHubsWriter$Outbound` instead. */ + export type Outbound = GetLibraryHubsWriter$Outbound; } /** @internal */ export const GetLibraryHubsMetadata$inboundSchema: z.ZodType< - GetLibraryHubsMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - Media: z.array(z.lazy(() => GetLibraryHubsMedia$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => GetLibraryHubsGenre$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetLibraryHubsCountry$inboundSchema)).optional(), - Director: z.array(z.lazy(() => GetLibraryHubsDirector$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetLibraryHubsRole$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => GetLibraryHubsWriter$inboundSchema)).optional(), - skipCount: z.number().int().optional(), - chapterSource: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Country: "country", - Director: "director", - Role: "role", - Writer: "writer", - }); - }); + GetLibraryHubsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => GetLibraryHubsMedia$inboundSchema)).optional(), + Genre: z.array(z.lazy(() => GetLibraryHubsGenre$inboundSchema)).optional(), + Country: z.array(z.lazy(() => GetLibraryHubsCountry$inboundSchema)) + .optional(), + Director: z.array(z.lazy(() => GetLibraryHubsDirector$inboundSchema)) + .optional(), + Role: z.array(z.lazy(() => GetLibraryHubsRole$inboundSchema)).optional(), + Writer: z.array(z.lazy(() => GetLibraryHubsWriter$inboundSchema)).optional(), + skipCount: z.number().int().optional(), + chapterSource: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Country": "country", + "Director": "director", + "Role": "role", + "Writer": "writer", + }); +}); /** @internal */ export type GetLibraryHubsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Director?: Array | undefined; - Role?: Array | undefined; - Writer?: Array | undefined; - skipCount?: number | undefined; - chapterSource?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Director?: Array | undefined; + Role?: Array | undefined; + Writer?: Array | undefined; + skipCount?: number | undefined; + chapterSource?: string | undefined; }; /** @internal */ export const GetLibraryHubsMetadata$outboundSchema: z.ZodType< - GetLibraryHubsMetadata$Outbound, - z.ZodTypeDef, - GetLibraryHubsMetadata -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - media: z.array(z.lazy(() => GetLibraryHubsMedia$outboundSchema)).optional(), - genre: z.array(z.lazy(() => GetLibraryHubsGenre$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetLibraryHubsCountry$outboundSchema)).optional(), - director: z.array(z.lazy(() => GetLibraryHubsDirector$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetLibraryHubsRole$outboundSchema)).optional(), - writer: z.array(z.lazy(() => GetLibraryHubsWriter$outboundSchema)).optional(), - skipCount: z.number().int().optional(), - chapterSource: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - country: "Country", - director: "Director", - role: "Role", - writer: "Writer", - }); - }); + GetLibraryHubsMetadata$Outbound, + z.ZodTypeDef, + GetLibraryHubsMetadata +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => GetLibraryHubsMedia$outboundSchema)).optional(), + genre: z.array(z.lazy(() => GetLibraryHubsGenre$outboundSchema)).optional(), + country: z.array(z.lazy(() => GetLibraryHubsCountry$outboundSchema)) + .optional(), + director: z.array(z.lazy(() => GetLibraryHubsDirector$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetLibraryHubsRole$outboundSchema)).optional(), + writer: z.array(z.lazy(() => GetLibraryHubsWriter$outboundSchema)).optional(), + skipCount: z.number().int().optional(), + chapterSource: z.string().optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + country: "Country", + director: "Director", + role: "Role", + writer: "Writer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsMetadata$ { - /** @deprecated use `GetLibraryHubsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsMetadata$inboundSchema; - /** @deprecated use `GetLibraryHubsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsMetadata$outboundSchema; - /** @deprecated use `GetLibraryHubsMetadata$Outbound` instead. */ - export type Outbound = GetLibraryHubsMetadata$Outbound; + /** @deprecated use `GetLibraryHubsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsMetadata$inboundSchema; + /** @deprecated use `GetLibraryHubsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsMetadata$outboundSchema; + /** @deprecated use `GetLibraryHubsMetadata$Outbound` instead. */ + export type Outbound = GetLibraryHubsMetadata$Outbound; } /** @internal */ -export const GetLibraryHubsHub$inboundSchema: z.ZodType = - z - .object({ - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - hubIdentifier: z.string().optional(), - context: z.string().optional(), - size: z.number().int().optional(), - more: z.boolean().optional(), - style: z.string().optional(), - hubKey: z.string().optional(), - Metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$inboundSchema)).optional(), - promoted: z.boolean().optional(), - random: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); +export const GetLibraryHubsHub$inboundSchema: z.ZodType< + GetLibraryHubsHub, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + hubIdentifier: z.string().optional(), + context: z.string().optional(), + size: z.number().int().optional(), + more: z.boolean().optional(), + style: z.string().optional(), + hubKey: z.string().optional(), + Metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$inboundSchema)) + .optional(), + promoted: z.boolean().optional(), + random: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetLibraryHubsHub$Outbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; - hubIdentifier?: string | undefined; - context?: string | undefined; - size?: number | undefined; - more?: boolean | undefined; - style?: string | undefined; - hubKey?: string | undefined; - Metadata?: Array | undefined; - promoted?: boolean | undefined; - random?: boolean | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; + hubIdentifier?: string | undefined; + context?: string | undefined; + size?: number | undefined; + more?: boolean | undefined; + style?: string | undefined; + hubKey?: string | undefined; + Metadata?: Array | undefined; + promoted?: boolean | undefined; + random?: boolean | undefined; }; /** @internal */ export const GetLibraryHubsHub$outboundSchema: z.ZodType< - GetLibraryHubsHub$Outbound, - z.ZodTypeDef, - GetLibraryHubsHub -> = z - .object({ - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - hubIdentifier: z.string().optional(), - context: z.string().optional(), - size: z.number().int().optional(), - more: z.boolean().optional(), - style: z.string().optional(), - hubKey: z.string().optional(), - metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$outboundSchema)).optional(), - promoted: z.boolean().optional(), - random: z.boolean().optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetLibraryHubsHub$Outbound, + z.ZodTypeDef, + GetLibraryHubsHub +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), + hubIdentifier: z.string().optional(), + context: z.string().optional(), + size: z.number().int().optional(), + more: z.boolean().optional(), + style: z.string().optional(), + hubKey: z.string().optional(), + metadata: z.array(z.lazy(() => GetLibraryHubsMetadata$outboundSchema)) + .optional(), + promoted: z.boolean().optional(), + random: z.boolean().optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsHub$ { - /** @deprecated use `GetLibraryHubsHub$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsHub$inboundSchema; - /** @deprecated use `GetLibraryHubsHub$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsHub$outboundSchema; - /** @deprecated use `GetLibraryHubsHub$Outbound` instead. */ - export type Outbound = GetLibraryHubsHub$Outbound; + /** @deprecated use `GetLibraryHubsHub$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsHub$inboundSchema; + /** @deprecated use `GetLibraryHubsHub$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsHub$outboundSchema; + /** @deprecated use `GetLibraryHubsHub$Outbound` instead. */ + export type Outbound = GetLibraryHubsHub$Outbound; } /** @internal */ export const GetLibraryHubsMediaContainer$inboundSchema: z.ZodType< - GetLibraryHubsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - Hub: z.array(z.lazy(() => GetLibraryHubsHub$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Hub: "hub", - }); - }); + GetLibraryHubsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + Hub: z.array(z.lazy(() => GetLibraryHubsHub$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Hub": "hub", + }); +}); /** @internal */ export type GetLibraryHubsMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - Hub?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + Hub?: Array | undefined; }; /** @internal */ export const GetLibraryHubsMediaContainer$outboundSchema: z.ZodType< - GetLibraryHubsMediaContainer$Outbound, - z.ZodTypeDef, - GetLibraryHubsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - hub: z.array(z.lazy(() => GetLibraryHubsHub$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - hub: "Hub", - }); - }); + GetLibraryHubsMediaContainer$Outbound, + z.ZodTypeDef, + GetLibraryHubsMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + hub: z.array(z.lazy(() => GetLibraryHubsHub$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + hub: "Hub", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsMediaContainer$ { - /** @deprecated use `GetLibraryHubsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsMediaContainer$inboundSchema; - /** @deprecated use `GetLibraryHubsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsMediaContainer$outboundSchema; - /** @deprecated use `GetLibraryHubsMediaContainer$Outbound` instead. */ - export type Outbound = GetLibraryHubsMediaContainer$Outbound; + /** @deprecated use `GetLibraryHubsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsMediaContainer$inboundSchema; + /** @deprecated use `GetLibraryHubsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsMediaContainer$outboundSchema; + /** @deprecated use `GetLibraryHubsMediaContainer$Outbound` instead. */ + export type Outbound = GetLibraryHubsMediaContainer$Outbound; } /** @internal */ export const GetLibraryHubsResponseBody$inboundSchema: z.ZodType< - GetLibraryHubsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetLibraryHubsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetLibraryHubsResponseBody$Outbound = { - MediaContainer?: GetLibraryHubsMediaContainer$Outbound | undefined; + MediaContainer?: GetLibraryHubsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetLibraryHubsResponseBody$outboundSchema: z.ZodType< - GetLibraryHubsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryHubsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetLibraryHubsResponseBody$Outbound, + z.ZodTypeDef, + GetLibraryHubsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetLibraryHubsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsResponseBody$ { - /** @deprecated use `GetLibraryHubsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryHubsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryHubsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryHubsResponseBody$Outbound; + /** @deprecated use `GetLibraryHubsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsResponseBody$inboundSchema; + /** @deprecated use `GetLibraryHubsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsResponseBody$outboundSchema; + /** @deprecated use `GetLibraryHubsResponseBody$Outbound` instead. */ + export type Outbound = GetLibraryHubsResponseBody$Outbound; } /** @internal */ export const GetLibraryHubsResponse$inboundSchema: z.ZodType< - GetLibraryHubsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetLibraryHubsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetLibraryHubsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetLibraryHubsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetLibraryHubsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetLibraryHubsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetLibraryHubsResponseBody$Outbound | undefined; }; /** @internal */ export const GetLibraryHubsResponse$outboundSchema: z.ZodType< - GetLibraryHubsResponse$Outbound, - z.ZodTypeDef, - GetLibraryHubsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetLibraryHubsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetLibraryHubsResponse$Outbound, + z.ZodTypeDef, + GetLibraryHubsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetLibraryHubsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryHubsResponse$ { - /** @deprecated use `GetLibraryHubsResponse$inboundSchema` instead. */ - export const inboundSchema = GetLibraryHubsResponse$inboundSchema; - /** @deprecated use `GetLibraryHubsResponse$outboundSchema` instead. */ - export const outboundSchema = GetLibraryHubsResponse$outboundSchema; - /** @deprecated use `GetLibraryHubsResponse$Outbound` instead. */ - export type Outbound = GetLibraryHubsResponse$Outbound; + /** @deprecated use `GetLibraryHubsResponse$inboundSchema` instead. */ + export const inboundSchema = GetLibraryHubsResponse$inboundSchema; + /** @deprecated use `GetLibraryHubsResponse$outboundSchema` instead. */ + export const outboundSchema = GetLibraryHubsResponse$outboundSchema; + /** @deprecated use `GetLibraryHubsResponse$Outbound` instead. */ + export type Outbound = GetLibraryHubsResponse$Outbound; } diff --git a/src/sdk/models/operations/getlibraryitems.ts b/src/sdk/models/operations/getlibraryitems.ts index 2bd9c9fa..39c15fca 100644 --- a/src/sdk/models/operations/getlibraryitems.ts +++ b/src/sdk/models/operations/getlibraryitems.ts @@ -2,55 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; /** * A key representing a specific tag within the section. */ export enum Tag { - All = "all", - Unwatched = "unwatched", - Newest = "newest", - RecentlyAdded = "recentlyAdded", - RecentlyViewed = "recentlyViewed", - OnDeck = "onDeck", - Collection = "collection", - Edition = "edition", - Genre = "genre", - Year = "year", - Decade = "decade", - Director = "director", - Actor = "actor", - Country = "country", - ContentRating = "contentRating", - Rating = "rating", - Resolution = "resolution", - FirstCharacter = "firstCharacter", - Folder = "folder", + All = "all", + Unwatched = "unwatched", + Newest = "newest", + RecentlyAdded = "recentlyAdded", + RecentlyViewed = "recentlyViewed", + OnDeck = "onDeck", + Collection = "collection", + Edition = "edition", + Genre = "genre", + Year = "year", + Decade = "decade", + Director = "director", + Actor = "actor", + Country = "country", + ContentRating = "contentRating", + Rating = "rating", + Resolution = "resolution", + FirstCharacter = "firstCharacter", + Folder = "folder", } /** * Adds the Guids object to the response * * @remarks - * */ export enum IncludeGuids { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** * Adds the Meta object to the response * * @remarks - * */ export enum IncludeMeta { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** @@ -62,380 +60,376 @@ export enum IncludeMeta { * 3 = season * 4 = episode * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * */ export enum Type { - One = 1, - Two = 2, - Three = 3, - Four = 4, + One = 1, + Two = 2, + Three = 3, + Four = 4, } export type GetLibraryItemsRequest = { - /** - * The unique key of the Plex library. - * - * @remarks - * Note: This is unique in the context of the Plex server. - * - */ - sectionKey: number; - /** - * A key representing a specific tag within the section. - */ - tag: Tag; - /** - * Adds the Guids object to the response - * - * @remarks - * - */ - includeGuids?: IncludeGuids | undefined; - /** - * Adds the Meta object to the response - * - * @remarks - * - */ - includeMeta?: IncludeMeta | undefined; - /** - * The type of media to retrieve. - * - * @remarks - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - */ - type: Type; - /** - * The index of the first item to return. If not specified, the first item will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 0 - * - */ - xPlexContainerStart?: number | undefined; - /** - * The number of items to return. If not specified, all items will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 50 - * - */ - xPlexContainerSize?: number | undefined; + /** + * The unique key of the Plex library. + * + * @remarks + * Note: This is unique in the context of the Plex server. + */ + sectionKey: number; + /** + * A key representing a specific tag within the section. + */ + tag: Tag; + /** + * Adds the Guids object to the response + * + * @remarks + */ + includeGuids?: IncludeGuids | undefined; + /** + * Adds the Meta object to the response + * + * @remarks + */ + includeMeta?: IncludeMeta | undefined; + /** + * The type of media to retrieve. + * + * @remarks + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + */ + type: Type; + /** + * The index of the first item to return. If not specified, the first item will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + */ + xPlexContainerStart?: number | undefined; + /** + * The number of items to return. If not specified, all items will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + */ + xPlexContainerSize?: number | undefined; }; export type LibrarySectionID = number | string; export type GetLibraryItemsPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + videoProfile?: string | undefined; }; export type GetLibraryItemsMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetLibraryItemsGenre = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryItemsCountry = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryItemsDirector = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryItemsWriter = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryItemsRole = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetLibraryItemsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - grandparentRatingKey?: string | undefined; - grandparentGuid?: string | undefined; - grandparentKey?: string | undefined; - grandparentTitle?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - grandparentTheme?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - country?: Array | undefined; - director?: Array | undefined; - writer?: Array | undefined; - role?: Array | undefined; - titleSort?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - originalTitle?: string | undefined; - viewOffset?: number | undefined; - skipCount?: number | undefined; - index?: number | undefined; - theme?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - childCount?: number | undefined; - hasPremiumExtras?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - parentRatingKey?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - parentIndex?: number | undefined; - parentYear?: number | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentTitle?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + country?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + role?: Array | undefined; + titleSort?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + originalTitle?: string | undefined; + viewOffset?: number | undefined; + skipCount?: number | undefined; + index?: number | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + parentRatingKey?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; }; export type GetLibraryItemsMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - librarySectionID?: number | string | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - mixedParents?: boolean | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | string | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; }; /** * The contents of the library by section and tag */ export type GetLibraryItemsResponseBody = { - mediaContainer?: GetLibraryItemsMediaContainer | undefined; + mediaContainer?: GetLibraryItemsMediaContainer | undefined; }; export type GetLibraryItemsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The contents of the library by section and tag - */ - object?: GetLibraryItemsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The contents of the library by section and tag + */ + object?: GetLibraryItemsResponseBody | undefined; }; /** @internal */ export const Tag$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Tag); /** @internal */ -export const Tag$outboundSchema: z.ZodNativeEnum = Tag$inboundSchema; +export const Tag$outboundSchema: z.ZodNativeEnum = + Tag$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Tag$ { - /** @deprecated use `Tag$inboundSchema` instead. */ - export const inboundSchema = Tag$inboundSchema; - /** @deprecated use `Tag$outboundSchema` instead. */ - export const outboundSchema = Tag$outboundSchema; + /** @deprecated use `Tag$inboundSchema` instead. */ + export const inboundSchema = Tag$inboundSchema; + /** @deprecated use `Tag$outboundSchema` instead. */ + export const outboundSchema = Tag$outboundSchema; } /** @internal */ export const IncludeGuids$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeGuids); + z.nativeEnum(IncludeGuids); /** @internal */ export const IncludeGuids$outboundSchema: z.ZodNativeEnum = - IncludeGuids$inboundSchema; + IncludeGuids$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeGuids$ { - /** @deprecated use `IncludeGuids$inboundSchema` instead. */ - export const inboundSchema = IncludeGuids$inboundSchema; - /** @deprecated use `IncludeGuids$outboundSchema` instead. */ - export const outboundSchema = IncludeGuids$outboundSchema; + /** @deprecated use `IncludeGuids$inboundSchema` instead. */ + export const inboundSchema = IncludeGuids$inboundSchema; + /** @deprecated use `IncludeGuids$outboundSchema` instead. */ + export const outboundSchema = IncludeGuids$outboundSchema; } /** @internal */ -export const IncludeMeta$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeMeta); +export const IncludeMeta$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(IncludeMeta); /** @internal */ export const IncludeMeta$outboundSchema: z.ZodNativeEnum = - IncludeMeta$inboundSchema; + IncludeMeta$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeMeta$ { - /** @deprecated use `IncludeMeta$inboundSchema` instead. */ - export const inboundSchema = IncludeMeta$inboundSchema; - /** @deprecated use `IncludeMeta$outboundSchema` instead. */ - export const outboundSchema = IncludeMeta$outboundSchema; + /** @deprecated use `IncludeMeta$inboundSchema` instead. */ + export const inboundSchema = IncludeMeta$inboundSchema; + /** @deprecated use `IncludeMeta$outboundSchema` instead. */ + export const outboundSchema = IncludeMeta$outboundSchema; } /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Type); +export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Type, +); /** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = Type$inboundSchema; +export const Type$outboundSchema: z.ZodNativeEnum = + Type$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; + /** @deprecated use `Type$inboundSchema` instead. */ + export const inboundSchema = Type$inboundSchema; + /** @deprecated use `Type$outboundSchema` instead. */ + export const outboundSchema = Type$outboundSchema; } /** @internal */ export const GetLibraryItemsRequest$inboundSchema: z.ZodType< - GetLibraryItemsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - sectionKey: z.number().int(), - tag: Tag$inboundSchema, - includeGuids: IncludeGuids$inboundSchema.optional(), - includeMeta: IncludeMeta$inboundSchema.optional(), - type: Type$inboundSchema, - "X-Plex-Container-Start": z.number().int().default(0), - "X-Plex-Container-Size": z.number().int().default(50), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Container-Start": "xPlexContainerStart", - "X-Plex-Container-Size": "xPlexContainerSize", - }); - }); + GetLibraryItemsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + sectionKey: z.number().int(), + tag: Tag$inboundSchema, + includeGuids: IncludeGuids$inboundSchema.optional(), + includeMeta: IncludeMeta$inboundSchema.optional(), + type: Type$inboundSchema, + "X-Plex-Container-Start": z.number().int().default(0), + "X-Plex-Container-Size": z.number().int().default(50), +}).transform((v) => { + return remap$(v, { + "X-Plex-Container-Start": "xPlexContainerStart", + "X-Plex-Container-Size": "xPlexContainerSize", + }); +}); /** @internal */ export type GetLibraryItemsRequest$Outbound = { - sectionKey: number; - tag: string; - includeGuids?: number | undefined; - includeMeta?: number | undefined; - type: number; - "X-Plex-Container-Start": number; - "X-Plex-Container-Size": number; + sectionKey: number; + tag: string; + includeGuids?: number | undefined; + includeMeta?: number | undefined; + type: number; + "X-Plex-Container-Start": number; + "X-Plex-Container-Size": number; }; /** @internal */ export const GetLibraryItemsRequest$outboundSchema: z.ZodType< - GetLibraryItemsRequest$Outbound, - z.ZodTypeDef, - GetLibraryItemsRequest -> = z - .object({ - sectionKey: z.number().int(), - tag: Tag$outboundSchema, - includeGuids: IncludeGuids$outboundSchema.optional(), - includeMeta: IncludeMeta$outboundSchema.optional(), - type: Type$outboundSchema, - xPlexContainerStart: z.number().int().default(0), - xPlexContainerSize: z.number().int().default(50), - }) - .transform((v) => { - return remap$(v, { - xPlexContainerStart: "X-Plex-Container-Start", - xPlexContainerSize: "X-Plex-Container-Size", - }); - }); + GetLibraryItemsRequest$Outbound, + z.ZodTypeDef, + GetLibraryItemsRequest +> = z.object({ + sectionKey: z.number().int(), + tag: Tag$outboundSchema, + includeGuids: IncludeGuids$outboundSchema.optional(), + includeMeta: IncludeMeta$outboundSchema.optional(), + type: Type$outboundSchema, + xPlexContainerStart: z.number().int().default(0), + xPlexContainerSize: z.number().int().default(50), +}).transform((v) => { + return remap$(v, { + xPlexContainerStart: "X-Plex-Container-Start", + xPlexContainerSize: "X-Plex-Container-Size", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsRequest$ { - /** @deprecated use `GetLibraryItemsRequest$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsRequest$inboundSchema; - /** @deprecated use `GetLibraryItemsRequest$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsRequest$outboundSchema; - /** @deprecated use `GetLibraryItemsRequest$Outbound` instead. */ - export type Outbound = GetLibraryItemsRequest$Outbound; + /** @deprecated use `GetLibraryItemsRequest$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsRequest$inboundSchema; + /** @deprecated use `GetLibraryItemsRequest$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsRequest$outboundSchema; + /** @deprecated use `GetLibraryItemsRequest$Outbound` instead. */ + export type Outbound = GetLibraryItemsRequest$Outbound; } /** @internal */ -export const LibrarySectionID$inboundSchema: z.ZodType = - z.union([z.number().int(), z.string()]); +export const LibrarySectionID$inboundSchema: z.ZodType< + LibrarySectionID, + z.ZodTypeDef, + unknown +> = z.union([z.number().int(), z.string()]); /** @internal */ export type LibrarySectionID$Outbound = number | string; /** @internal */ export const LibrarySectionID$outboundSchema: z.ZodType< - LibrarySectionID$Outbound, - z.ZodTypeDef, - LibrarySectionID + LibrarySectionID$Outbound, + z.ZodTypeDef, + LibrarySectionID > = z.union([z.number().int(), z.string()]); /** @@ -443,53 +437,53 @@ export const LibrarySectionID$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LibrarySectionID$ { - /** @deprecated use `LibrarySectionID$inboundSchema` instead. */ - export const inboundSchema = LibrarySectionID$inboundSchema; - /** @deprecated use `LibrarySectionID$outboundSchema` instead. */ - export const outboundSchema = LibrarySectionID$outboundSchema; - /** @deprecated use `LibrarySectionID$Outbound` instead. */ - export type Outbound = LibrarySectionID$Outbound; + /** @deprecated use `LibrarySectionID$inboundSchema` instead. */ + export const inboundSchema = LibrarySectionID$inboundSchema; + /** @deprecated use `LibrarySectionID$outboundSchema` instead. */ + export const outboundSchema = LibrarySectionID$outboundSchema; + /** @deprecated use `LibrarySectionID$Outbound` instead. */ + export type Outbound = LibrarySectionID$Outbound; } /** @internal */ export const GetLibraryItemsPart$inboundSchema: z.ZodType< - GetLibraryItemsPart, - z.ZodTypeDef, - unknown + GetLibraryItemsPart, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), }); /** @internal */ export type GetLibraryItemsPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + videoProfile?: string | undefined; }; /** @internal */ export const GetLibraryItemsPart$outboundSchema: z.ZodType< - GetLibraryItemsPart$Outbound, - z.ZodTypeDef, - GetLibraryItemsPart + GetLibraryItemsPart$Outbound, + z.ZodTypeDef, + GetLibraryItemsPart > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), }); /** @@ -497,122 +491,118 @@ export const GetLibraryItemsPart$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsPart$ { - /** @deprecated use `GetLibraryItemsPart$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsPart$inboundSchema; - /** @deprecated use `GetLibraryItemsPart$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsPart$outboundSchema; - /** @deprecated use `GetLibraryItemsPart$Outbound` instead. */ - export type Outbound = GetLibraryItemsPart$Outbound; + /** @deprecated use `GetLibraryItemsPart$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsPart$inboundSchema; + /** @deprecated use `GetLibraryItemsPart$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsPart$outboundSchema; + /** @deprecated use `GetLibraryItemsPart$Outbound` instead. */ + export type Outbound = GetLibraryItemsPart$Outbound; } /** @internal */ export const GetLibraryItemsMedia$inboundSchema: z.ZodType< - GetLibraryItemsMedia, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetLibraryItemsPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); + GetLibraryItemsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetLibraryItemsPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetLibraryItemsMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetLibraryItemsMedia$outboundSchema: z.ZodType< - GetLibraryItemsMedia$Outbound, - z.ZodTypeDef, - GetLibraryItemsMedia -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetLibraryItemsPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetLibraryItemsMedia$Outbound, + z.ZodTypeDef, + GetLibraryItemsMedia +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetLibraryItemsPart$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsMedia$ { - /** @deprecated use `GetLibraryItemsMedia$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsMedia$inboundSchema; - /** @deprecated use `GetLibraryItemsMedia$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsMedia$outboundSchema; - /** @deprecated use `GetLibraryItemsMedia$Outbound` instead. */ - export type Outbound = GetLibraryItemsMedia$Outbound; + /** @deprecated use `GetLibraryItemsMedia$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsMedia$inboundSchema; + /** @deprecated use `GetLibraryItemsMedia$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsMedia$outboundSchema; + /** @deprecated use `GetLibraryItemsMedia$Outbound` instead. */ + export type Outbound = GetLibraryItemsMedia$Outbound; } /** @internal */ export const GetLibraryItemsGenre$inboundSchema: z.ZodType< - GetLibraryItemsGenre, - z.ZodTypeDef, - unknown + GetLibraryItemsGenre, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryItemsGenre$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryItemsGenre$outboundSchema: z.ZodType< - GetLibraryItemsGenre$Outbound, - z.ZodTypeDef, - GetLibraryItemsGenre + GetLibraryItemsGenre$Outbound, + z.ZodTypeDef, + GetLibraryItemsGenre > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -620,35 +610,35 @@ export const GetLibraryItemsGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsGenre$ { - /** @deprecated use `GetLibraryItemsGenre$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsGenre$inboundSchema; - /** @deprecated use `GetLibraryItemsGenre$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsGenre$outboundSchema; - /** @deprecated use `GetLibraryItemsGenre$Outbound` instead. */ - export type Outbound = GetLibraryItemsGenre$Outbound; + /** @deprecated use `GetLibraryItemsGenre$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsGenre$inboundSchema; + /** @deprecated use `GetLibraryItemsGenre$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsGenre$outboundSchema; + /** @deprecated use `GetLibraryItemsGenre$Outbound` instead. */ + export type Outbound = GetLibraryItemsGenre$Outbound; } /** @internal */ export const GetLibraryItemsCountry$inboundSchema: z.ZodType< - GetLibraryItemsCountry, - z.ZodTypeDef, - unknown + GetLibraryItemsCountry, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryItemsCountry$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryItemsCountry$outboundSchema: z.ZodType< - GetLibraryItemsCountry$Outbound, - z.ZodTypeDef, - GetLibraryItemsCountry + GetLibraryItemsCountry$Outbound, + z.ZodTypeDef, + GetLibraryItemsCountry > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -656,35 +646,35 @@ export const GetLibraryItemsCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsCountry$ { - /** @deprecated use `GetLibraryItemsCountry$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsCountry$inboundSchema; - /** @deprecated use `GetLibraryItemsCountry$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsCountry$outboundSchema; - /** @deprecated use `GetLibraryItemsCountry$Outbound` instead. */ - export type Outbound = GetLibraryItemsCountry$Outbound; + /** @deprecated use `GetLibraryItemsCountry$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsCountry$inboundSchema; + /** @deprecated use `GetLibraryItemsCountry$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsCountry$outboundSchema; + /** @deprecated use `GetLibraryItemsCountry$Outbound` instead. */ + export type Outbound = GetLibraryItemsCountry$Outbound; } /** @internal */ export const GetLibraryItemsDirector$inboundSchema: z.ZodType< - GetLibraryItemsDirector, - z.ZodTypeDef, - unknown + GetLibraryItemsDirector, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryItemsDirector$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryItemsDirector$outboundSchema: z.ZodType< - GetLibraryItemsDirector$Outbound, - z.ZodTypeDef, - GetLibraryItemsDirector + GetLibraryItemsDirector$Outbound, + z.ZodTypeDef, + GetLibraryItemsDirector > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -692,35 +682,35 @@ export const GetLibraryItemsDirector$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsDirector$ { - /** @deprecated use `GetLibraryItemsDirector$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsDirector$inboundSchema; - /** @deprecated use `GetLibraryItemsDirector$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsDirector$outboundSchema; - /** @deprecated use `GetLibraryItemsDirector$Outbound` instead. */ - export type Outbound = GetLibraryItemsDirector$Outbound; + /** @deprecated use `GetLibraryItemsDirector$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsDirector$inboundSchema; + /** @deprecated use `GetLibraryItemsDirector$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsDirector$outboundSchema; + /** @deprecated use `GetLibraryItemsDirector$Outbound` instead. */ + export type Outbound = GetLibraryItemsDirector$Outbound; } /** @internal */ export const GetLibraryItemsWriter$inboundSchema: z.ZodType< - GetLibraryItemsWriter, - z.ZodTypeDef, - unknown + GetLibraryItemsWriter, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryItemsWriter$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryItemsWriter$outboundSchema: z.ZodType< - GetLibraryItemsWriter$Outbound, - z.ZodTypeDef, - GetLibraryItemsWriter + GetLibraryItemsWriter$Outbound, + z.ZodTypeDef, + GetLibraryItemsWriter > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -728,35 +718,35 @@ export const GetLibraryItemsWriter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsWriter$ { - /** @deprecated use `GetLibraryItemsWriter$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsWriter$inboundSchema; - /** @deprecated use `GetLibraryItemsWriter$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsWriter$outboundSchema; - /** @deprecated use `GetLibraryItemsWriter$Outbound` instead. */ - export type Outbound = GetLibraryItemsWriter$Outbound; + /** @deprecated use `GetLibraryItemsWriter$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsWriter$inboundSchema; + /** @deprecated use `GetLibraryItemsWriter$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsWriter$outboundSchema; + /** @deprecated use `GetLibraryItemsWriter$Outbound` instead. */ + export type Outbound = GetLibraryItemsWriter$Outbound; } /** @internal */ export const GetLibraryItemsRole$inboundSchema: z.ZodType< - GetLibraryItemsRole, - z.ZodTypeDef, - unknown + GetLibraryItemsRole, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetLibraryItemsRole$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetLibraryItemsRole$outboundSchema: z.ZodType< - GetLibraryItemsRole$Outbound, - z.ZodTypeDef, - GetLibraryItemsRole + GetLibraryItemsRole$Outbound, + z.ZodTypeDef, + GetLibraryItemsRole > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -764,446 +754,434 @@ export const GetLibraryItemsRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsRole$ { - /** @deprecated use `GetLibraryItemsRole$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsRole$inboundSchema; - /** @deprecated use `GetLibraryItemsRole$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsRole$outboundSchema; - /** @deprecated use `GetLibraryItemsRole$Outbound` instead. */ - export type Outbound = GetLibraryItemsRole$Outbound; + /** @deprecated use `GetLibraryItemsRole$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsRole$inboundSchema; + /** @deprecated use `GetLibraryItemsRole$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsRole$outboundSchema; + /** @deprecated use `GetLibraryItemsRole$Outbound` instead. */ + export type Outbound = GetLibraryItemsRole$Outbound; } /** @internal */ export const GetLibraryItemsMetadata$inboundSchema: z.ZodType< - GetLibraryItemsMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - grandparentRatingKey: z.string().optional(), - grandparentGuid: z.string().optional(), - grandparentKey: z.string().optional(), - grandparentTitle: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - grandparentTheme: z.string().optional(), - Media: z.array(z.lazy(() => GetLibraryItemsMedia$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => GetLibraryItemsGenre$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetLibraryItemsCountry$inboundSchema)).optional(), - Director: z.array(z.lazy(() => GetLibraryItemsDirector$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => GetLibraryItemsWriter$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetLibraryItemsRole$inboundSchema)).optional(), - titleSort: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - originalTitle: z.string().optional(), - viewOffset: z.number().int().optional(), - skipCount: z.number().int().optional(), - index: z.number().int().optional(), - theme: z.string().optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - hasPremiumExtras: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - parentRatingKey: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - parentIndex: z.number().int().optional(), - parentYear: z.number().int().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Country: "country", - Director: "director", - Writer: "writer", - Role: "role", - }); - }); + GetLibraryItemsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentTitle: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + Media: z.array(z.lazy(() => GetLibraryItemsMedia$inboundSchema)).optional(), + Genre: z.array(z.lazy(() => GetLibraryItemsGenre$inboundSchema)).optional(), + Country: z.array(z.lazy(() => GetLibraryItemsCountry$inboundSchema)) + .optional(), + Director: z.array(z.lazy(() => GetLibraryItemsDirector$inboundSchema)) + .optional(), + Writer: z.array(z.lazy(() => GetLibraryItemsWriter$inboundSchema)).optional(), + Role: z.array(z.lazy(() => GetLibraryItemsRole$inboundSchema)).optional(), + titleSort: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + originalTitle: z.string().optional(), + viewOffset: z.number().int().optional(), + skipCount: z.number().int().optional(), + index: z.number().int().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + parentRatingKey: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Country": "country", + "Director": "director", + "Writer": "writer", + "Role": "role", + }); +}); /** @internal */ export type GetLibraryItemsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - grandparentRatingKey?: string | undefined; - grandparentGuid?: string | undefined; - grandparentKey?: string | undefined; - grandparentTitle?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - grandparentTheme?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Role?: Array | undefined; - titleSort?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - originalTitle?: string | undefined; - viewOffset?: number | undefined; - skipCount?: number | undefined; - index?: number | undefined; - theme?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - childCount?: number | undefined; - hasPremiumExtras?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - parentRatingKey?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - parentIndex?: number | undefined; - parentYear?: number | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentTitle?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Role?: Array | undefined; + titleSort?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + originalTitle?: string | undefined; + viewOffset?: number | undefined; + skipCount?: number | undefined; + index?: number | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + parentRatingKey?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; }; /** @internal */ export const GetLibraryItemsMetadata$outboundSchema: z.ZodType< - GetLibraryItemsMetadata$Outbound, - z.ZodTypeDef, - GetLibraryItemsMetadata -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - grandparentRatingKey: z.string().optional(), - grandparentGuid: z.string().optional(), - grandparentKey: z.string().optional(), - grandparentTitle: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - grandparentTheme: z.string().optional(), - media: z.array(z.lazy(() => GetLibraryItemsMedia$outboundSchema)).optional(), - genre: z.array(z.lazy(() => GetLibraryItemsGenre$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetLibraryItemsCountry$outboundSchema)).optional(), - director: z.array(z.lazy(() => GetLibraryItemsDirector$outboundSchema)).optional(), - writer: z.array(z.lazy(() => GetLibraryItemsWriter$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetLibraryItemsRole$outboundSchema)).optional(), - titleSort: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - originalTitle: z.string().optional(), - viewOffset: z.number().int().optional(), - skipCount: z.number().int().optional(), - index: z.number().int().optional(), - theme: z.string().optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - hasPremiumExtras: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - parentRatingKey: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - parentIndex: z.number().int().optional(), - parentYear: z.number().int().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - country: "Country", - director: "Director", - writer: "Writer", - role: "Role", - }); - }); + GetLibraryItemsMetadata$Outbound, + z.ZodTypeDef, + GetLibraryItemsMetadata +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentTitle: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + media: z.array(z.lazy(() => GetLibraryItemsMedia$outboundSchema)).optional(), + genre: z.array(z.lazy(() => GetLibraryItemsGenre$outboundSchema)).optional(), + country: z.array(z.lazy(() => GetLibraryItemsCountry$outboundSchema)) + .optional(), + director: z.array(z.lazy(() => GetLibraryItemsDirector$outboundSchema)) + .optional(), + writer: z.array(z.lazy(() => GetLibraryItemsWriter$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetLibraryItemsRole$outboundSchema)).optional(), + titleSort: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + originalTitle: z.string().optional(), + viewOffset: z.number().int().optional(), + skipCount: z.number().int().optional(), + index: z.number().int().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + parentRatingKey: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + country: "Country", + director: "Director", + writer: "Writer", + role: "Role", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsMetadata$ { - /** @deprecated use `GetLibraryItemsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsMetadata$inboundSchema; - /** @deprecated use `GetLibraryItemsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsMetadata$outboundSchema; - /** @deprecated use `GetLibraryItemsMetadata$Outbound` instead. */ - export type Outbound = GetLibraryItemsMetadata$Outbound; + /** @deprecated use `GetLibraryItemsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsMetadata$inboundSchema; + /** @deprecated use `GetLibraryItemsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsMetadata$outboundSchema; + /** @deprecated use `GetLibraryItemsMetadata$Outbound` instead. */ + export type Outbound = GetLibraryItemsMetadata$Outbound; } /** @internal */ export const GetLibraryItemsMediaContainer$inboundSchema: z.ZodType< - GetLibraryItemsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - librarySectionID: z.union([z.number().int(), z.string()]).optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - mixedParents: z.boolean().optional(), - Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetLibraryItemsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.union([z.number().int(), z.string()]).optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetLibraryItemsMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - librarySectionID?: number | string | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - mixedParents?: boolean | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + librarySectionID?: number | string | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetLibraryItemsMediaContainer$outboundSchema: z.ZodType< - GetLibraryItemsMediaContainer$Outbound, - z.ZodTypeDef, - GetLibraryItemsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - librarySectionID: z.union([z.number().int(), z.string()]).optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - mixedParents: z.boolean().optional(), - metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetLibraryItemsMediaContainer$Outbound, + z.ZodTypeDef, + GetLibraryItemsMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + librarySectionID: z.union([z.number().int(), z.string()]).optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetLibraryItemsMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsMediaContainer$ { - /** @deprecated use `GetLibraryItemsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsMediaContainer$inboundSchema; - /** @deprecated use `GetLibraryItemsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsMediaContainer$outboundSchema; - /** @deprecated use `GetLibraryItemsMediaContainer$Outbound` instead. */ - export type Outbound = GetLibraryItemsMediaContainer$Outbound; + /** @deprecated use `GetLibraryItemsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsMediaContainer$inboundSchema; + /** @deprecated use `GetLibraryItemsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsMediaContainer$outboundSchema; + /** @deprecated use `GetLibraryItemsMediaContainer$Outbound` instead. */ + export type Outbound = GetLibraryItemsMediaContainer$Outbound; } /** @internal */ export const GetLibraryItemsResponseBody$inboundSchema: z.ZodType< - GetLibraryItemsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetLibraryItemsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetLibraryItemsResponseBody$Outbound = { - MediaContainer?: GetLibraryItemsMediaContainer$Outbound | undefined; + MediaContainer?: GetLibraryItemsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetLibraryItemsResponseBody$outboundSchema: z.ZodType< - GetLibraryItemsResponseBody$Outbound, - z.ZodTypeDef, - GetLibraryItemsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetLibraryItemsResponseBody$Outbound, + z.ZodTypeDef, + GetLibraryItemsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetLibraryItemsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsResponseBody$ { - /** @deprecated use `GetLibraryItemsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsResponseBody$inboundSchema; - /** @deprecated use `GetLibraryItemsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsResponseBody$outboundSchema; - /** @deprecated use `GetLibraryItemsResponseBody$Outbound` instead. */ - export type Outbound = GetLibraryItemsResponseBody$Outbound; + /** @deprecated use `GetLibraryItemsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsResponseBody$inboundSchema; + /** @deprecated use `GetLibraryItemsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsResponseBody$outboundSchema; + /** @deprecated use `GetLibraryItemsResponseBody$Outbound` instead. */ + export type Outbound = GetLibraryItemsResponseBody$Outbound; } /** @internal */ export const GetLibraryItemsResponse$inboundSchema: z.ZodType< - GetLibraryItemsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetLibraryItemsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetLibraryItemsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetLibraryItemsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetLibraryItemsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetLibraryItemsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetLibraryItemsResponseBody$Outbound | undefined; }; /** @internal */ export const GetLibraryItemsResponse$outboundSchema: z.ZodType< - GetLibraryItemsResponse$Outbound, - z.ZodTypeDef, - GetLibraryItemsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetLibraryItemsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetLibraryItemsResponse$Outbound, + z.ZodTypeDef, + GetLibraryItemsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetLibraryItemsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetLibraryItemsResponse$ { - /** @deprecated use `GetLibraryItemsResponse$inboundSchema` instead. */ - export const inboundSchema = GetLibraryItemsResponse$inboundSchema; - /** @deprecated use `GetLibraryItemsResponse$outboundSchema` instead. */ - export const outboundSchema = GetLibraryItemsResponse$outboundSchema; - /** @deprecated use `GetLibraryItemsResponse$Outbound` instead. */ - export type Outbound = GetLibraryItemsResponse$Outbound; + /** @deprecated use `GetLibraryItemsResponse$inboundSchema` instead. */ + export const inboundSchema = GetLibraryItemsResponse$inboundSchema; + /** @deprecated use `GetLibraryItemsResponse$outboundSchema` instead. */ + export const outboundSchema = GetLibraryItemsResponse$outboundSchema; + /** @deprecated use `GetLibraryItemsResponse$Outbound` instead. */ + export type Outbound = GetLibraryItemsResponse$Outbound; } diff --git a/src/sdk/models/operations/getmediaproviders.ts b/src/sdk/models/operations/getmediaproviders.ts index fe9b1805..da5a2f2f 100644 --- a/src/sdk/models/operations/getmediaproviders.ts +++ b/src/sdk/models/operations/getmediaproviders.ts @@ -2,205 +2,206 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMediaProvidersRequest = { - /** - * Plex Authentication Token - */ - xPlexToken: string; + /** + * Plex Authentication Token + */ + xPlexToken: string; }; export type Pivot = { - id?: string | undefined; - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - context?: string | undefined; - symbol?: string | undefined; + id?: string | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + context?: string | undefined; + symbol?: string | undefined; }; export type GetMediaProvidersDirectory = { - hubKey?: string | undefined; - title?: string | undefined; - agent?: string | undefined; - language?: string | undefined; - refreshing?: boolean | undefined; - scanner?: string | undefined; - uuid?: string | undefined; - id?: string | undefined; - key?: string | undefined; - type?: string | undefined; - subtype?: string | undefined; - updatedAt?: number | undefined; - scannedAt?: number | undefined; - pivot?: Array | undefined; + hubKey?: string | undefined; + title?: string | undefined; + agent?: string | undefined; + language?: string | undefined; + refreshing?: boolean | undefined; + scanner?: string | undefined; + uuid?: string | undefined; + id?: string | undefined; + key?: string | undefined; + type?: string | undefined; + subtype?: string | undefined; + updatedAt?: number | undefined; + scannedAt?: number | undefined; + pivot?: Array | undefined; }; export type Feature = { - key?: string | undefined; - type?: string | undefined; - directory?: Array | undefined; + key?: string | undefined; + type?: string | undefined; + directory?: Array | undefined; }; export type MediaProvider = { - identifier?: string | undefined; - title?: string | undefined; - types?: string | undefined; - protocols?: string | undefined; - feature?: Array | undefined; + identifier?: string | undefined; + title?: string | undefined; + types?: string | undefined; + protocols?: string | undefined; + feature?: Array | undefined; }; export type GetMediaProvidersMediaContainer = { - size?: number | undefined; - allowCameraUpload?: boolean | undefined; - allowChannelAccess?: boolean | undefined; - allowSharing?: boolean | undefined; - allowSync?: boolean | undefined; - allowTuners?: boolean | undefined; - backgroundProcessing?: boolean | undefined; - certificate?: boolean | undefined; - companionProxy?: boolean | undefined; - countryCode?: string | undefined; - diagnostics?: string | undefined; - eventStream?: boolean | undefined; - friendlyName?: string | undefined; - livetv?: number | undefined; - machineIdentifier?: string | undefined; - musicAnalysis?: number | undefined; - myPlex?: boolean | undefined; - myPlexMappingState?: string | undefined; - myPlexSigninState?: string | undefined; - myPlexSubscription?: boolean | undefined; - myPlexUsername?: string | undefined; - offlineTranscode?: number | undefined; - ownerFeatures?: string | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - pluginHost?: boolean | undefined; - pushNotifications?: boolean | undefined; - readOnlyLibraries?: boolean | undefined; - streamingBrainABRVersion?: number | undefined; - streamingBrainVersion?: number | undefined; - sync?: boolean | undefined; - transcoderActiveVideoSessions?: number | undefined; - transcoderAudio?: boolean | undefined; - transcoderLyrics?: boolean | undefined; - transcoderSubtitles?: boolean | undefined; - transcoderVideo?: boolean | undefined; - transcoderVideoBitrates?: string | undefined; - transcoderVideoQualities?: string | undefined; - transcoderVideoResolutions?: string | undefined; - updatedAt?: number | undefined; - updater?: boolean | undefined; - version?: string | undefined; - voiceSearch?: boolean | undefined; - mediaProvider?: Array | undefined; + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + mediaProvider?: Array | undefined; }; /** * Media providers and their features */ export type GetMediaProvidersResponseBody = { - mediaContainer?: GetMediaProvidersMediaContainer | undefined; + mediaContainer?: GetMediaProvidersMediaContainer | undefined; }; export type GetMediaProvidersResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Media providers and their features - */ - object?: GetMediaProvidersResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Media providers and their features + */ + object?: GetMediaProvidersResponseBody | undefined; }; /** @internal */ export const GetMediaProvidersRequest$inboundSchema: z.ZodType< - GetMediaProvidersRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Token": z.string(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Token": "xPlexToken", - }); - }); + GetMediaProvidersRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Token": z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Token": "xPlexToken", + }); +}); /** @internal */ export type GetMediaProvidersRequest$Outbound = { - "X-Plex-Token": string; + "X-Plex-Token": string; }; /** @internal */ export const GetMediaProvidersRequest$outboundSchema: z.ZodType< - GetMediaProvidersRequest$Outbound, - z.ZodTypeDef, - GetMediaProvidersRequest -> = z - .object({ - xPlexToken: z.string(), - }) - .transform((v) => { - return remap$(v, { - xPlexToken: "X-Plex-Token", - }); - }); + GetMediaProvidersRequest$Outbound, + z.ZodTypeDef, + GetMediaProvidersRequest +> = z.object({ + xPlexToken: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexToken: "X-Plex-Token", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersRequest$ { - /** @deprecated use `GetMediaProvidersRequest$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersRequest$inboundSchema; - /** @deprecated use `GetMediaProvidersRequest$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersRequest$outboundSchema; - /** @deprecated use `GetMediaProvidersRequest$Outbound` instead. */ - export type Outbound = GetMediaProvidersRequest$Outbound; + /** @deprecated use `GetMediaProvidersRequest$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersRequest$inboundSchema; + /** @deprecated use `GetMediaProvidersRequest$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersRequest$outboundSchema; + /** @deprecated use `GetMediaProvidersRequest$Outbound` instead. */ + export type Outbound = GetMediaProvidersRequest$Outbound; } /** @internal */ -export const Pivot$inboundSchema: z.ZodType = z.object({ +export const Pivot$inboundSchema: z.ZodType = z + .object({ id: z.string().optional(), key: z.string().optional(), type: z.string().optional(), title: z.string().optional(), context: z.string().optional(), symbol: z.string().optional(), -}); + }); /** @internal */ export type Pivot$Outbound = { - id?: string | undefined; - key?: string | undefined; - type?: string | undefined; - title?: string | undefined; - context?: string | undefined; - symbol?: string | undefined; + id?: string | undefined; + key?: string | undefined; + type?: string | undefined; + title?: string | undefined; + context?: string | undefined; + symbol?: string | undefined; }; /** @internal */ -export const Pivot$outboundSchema: z.ZodType = z.object({ - id: z.string().optional(), - key: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - context: z.string().optional(), - symbol: z.string().optional(), +export const Pivot$outboundSchema: z.ZodType< + Pivot$Outbound, + z.ZodTypeDef, + Pivot +> = z.object({ + id: z.string().optional(), + key: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + context: z.string().optional(), + symbol: z.string().optional(), }); /** @@ -208,487 +209,476 @@ export const Pivot$outboundSchema: z.ZodType = z - .object({ - hubKey: z.string().optional(), - title: z.string().optional(), - agent: z.string().optional(), - language: z.string().optional(), - refreshing: z.boolean().optional(), - scanner: z.string().optional(), - uuid: z.string().optional(), - id: z.string().optional(), - key: z.string().optional(), - type: z.string().optional(), - subtype: z.string().optional(), - updatedAt: z.number().int().optional(), - scannedAt: z.number().int().optional(), - Pivot: z.array(z.lazy(() => Pivot$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Pivot: "pivot", - }); - }); + GetMediaProvidersDirectory, + z.ZodTypeDef, + unknown +> = z.object({ + hubKey: z.string().optional(), + title: z.string().optional(), + agent: z.string().optional(), + language: z.string().optional(), + refreshing: z.boolean().optional(), + scanner: z.string().optional(), + uuid: z.string().optional(), + id: z.string().optional(), + key: z.string().optional(), + type: z.string().optional(), + subtype: z.string().optional(), + updatedAt: z.number().int().optional(), + scannedAt: z.number().int().optional(), + Pivot: z.array(z.lazy(() => Pivot$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Pivot": "pivot", + }); +}); /** @internal */ export type GetMediaProvidersDirectory$Outbound = { - hubKey?: string | undefined; - title?: string | undefined; - agent?: string | undefined; - language?: string | undefined; - refreshing?: boolean | undefined; - scanner?: string | undefined; - uuid?: string | undefined; - id?: string | undefined; - key?: string | undefined; - type?: string | undefined; - subtype?: string | undefined; - updatedAt?: number | undefined; - scannedAt?: number | undefined; - Pivot?: Array | undefined; + hubKey?: string | undefined; + title?: string | undefined; + agent?: string | undefined; + language?: string | undefined; + refreshing?: boolean | undefined; + scanner?: string | undefined; + uuid?: string | undefined; + id?: string | undefined; + key?: string | undefined; + type?: string | undefined; + subtype?: string | undefined; + updatedAt?: number | undefined; + scannedAt?: number | undefined; + Pivot?: Array | undefined; }; /** @internal */ export const GetMediaProvidersDirectory$outboundSchema: z.ZodType< - GetMediaProvidersDirectory$Outbound, - z.ZodTypeDef, - GetMediaProvidersDirectory -> = z - .object({ - hubKey: z.string().optional(), - title: z.string().optional(), - agent: z.string().optional(), - language: z.string().optional(), - refreshing: z.boolean().optional(), - scanner: z.string().optional(), - uuid: z.string().optional(), - id: z.string().optional(), - key: z.string().optional(), - type: z.string().optional(), - subtype: z.string().optional(), - updatedAt: z.number().int().optional(), - scannedAt: z.number().int().optional(), - pivot: z.array(z.lazy(() => Pivot$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - pivot: "Pivot", - }); - }); + GetMediaProvidersDirectory$Outbound, + z.ZodTypeDef, + GetMediaProvidersDirectory +> = z.object({ + hubKey: z.string().optional(), + title: z.string().optional(), + agent: z.string().optional(), + language: z.string().optional(), + refreshing: z.boolean().optional(), + scanner: z.string().optional(), + uuid: z.string().optional(), + id: z.string().optional(), + key: z.string().optional(), + type: z.string().optional(), + subtype: z.string().optional(), + updatedAt: z.number().int().optional(), + scannedAt: z.number().int().optional(), + pivot: z.array(z.lazy(() => Pivot$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + pivot: "Pivot", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersDirectory$ { - /** @deprecated use `GetMediaProvidersDirectory$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersDirectory$inboundSchema; - /** @deprecated use `GetMediaProvidersDirectory$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersDirectory$outboundSchema; - /** @deprecated use `GetMediaProvidersDirectory$Outbound` instead. */ - export type Outbound = GetMediaProvidersDirectory$Outbound; + /** @deprecated use `GetMediaProvidersDirectory$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersDirectory$inboundSchema; + /** @deprecated use `GetMediaProvidersDirectory$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersDirectory$outboundSchema; + /** @deprecated use `GetMediaProvidersDirectory$Outbound` instead. */ + export type Outbound = GetMediaProvidersDirectory$Outbound; } /** @internal */ -export const Feature$inboundSchema: z.ZodType = z - .object({ - key: z.string().optional(), - type: z.string().optional(), - Directory: z.array(z.lazy(() => GetMediaProvidersDirectory$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Directory: "directory", - }); +export const Feature$inboundSchema: z.ZodType = + z.object({ + key: z.string().optional(), + type: z.string().optional(), + Directory: z.array(z.lazy(() => GetMediaProvidersDirectory$inboundSchema)) + .optional(), + }).transform((v) => { + return remap$(v, { + "Directory": "directory", }); + }); /** @internal */ export type Feature$Outbound = { - key?: string | undefined; - type?: string | undefined; - Directory?: Array | undefined; + key?: string | undefined; + type?: string | undefined; + Directory?: Array | undefined; }; /** @internal */ -export const Feature$outboundSchema: z.ZodType = z - .object({ - key: z.string().optional(), - type: z.string().optional(), - directory: z.array(z.lazy(() => GetMediaProvidersDirectory$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - directory: "Directory", - }); - }); +export const Feature$outboundSchema: z.ZodType< + Feature$Outbound, + z.ZodTypeDef, + Feature +> = z.object({ + key: z.string().optional(), + type: z.string().optional(), + directory: z.array(z.lazy(() => GetMediaProvidersDirectory$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + directory: "Directory", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Feature$ { - /** @deprecated use `Feature$inboundSchema` instead. */ - export const inboundSchema = Feature$inboundSchema; - /** @deprecated use `Feature$outboundSchema` instead. */ - export const outboundSchema = Feature$outboundSchema; - /** @deprecated use `Feature$Outbound` instead. */ - export type Outbound = Feature$Outbound; + /** @deprecated use `Feature$inboundSchema` instead. */ + export const inboundSchema = Feature$inboundSchema; + /** @deprecated use `Feature$outboundSchema` instead. */ + export const outboundSchema = Feature$outboundSchema; + /** @deprecated use `Feature$Outbound` instead. */ + export type Outbound = Feature$Outbound; } /** @internal */ -export const MediaProvider$inboundSchema: z.ZodType = z - .object({ - identifier: z.string().optional(), - title: z.string().optional(), - types: z.string().optional(), - protocols: z.string().optional(), - Feature: z.array(z.lazy(() => Feature$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Feature: "feature", - }); - }); +export const MediaProvider$inboundSchema: z.ZodType< + MediaProvider, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string().optional(), + title: z.string().optional(), + types: z.string().optional(), + protocols: z.string().optional(), + Feature: z.array(z.lazy(() => Feature$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Feature": "feature", + }); +}); /** @internal */ export type MediaProvider$Outbound = { - identifier?: string | undefined; - title?: string | undefined; - types?: string | undefined; - protocols?: string | undefined; - Feature?: Array | undefined; + identifier?: string | undefined; + title?: string | undefined; + types?: string | undefined; + protocols?: string | undefined; + Feature?: Array | undefined; }; /** @internal */ export const MediaProvider$outboundSchema: z.ZodType< - MediaProvider$Outbound, - z.ZodTypeDef, - MediaProvider -> = z - .object({ - identifier: z.string().optional(), - title: z.string().optional(), - types: z.string().optional(), - protocols: z.string().optional(), - feature: z.array(z.lazy(() => Feature$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - feature: "Feature", - }); - }); + MediaProvider$Outbound, + z.ZodTypeDef, + MediaProvider +> = z.object({ + identifier: z.string().optional(), + title: z.string().optional(), + types: z.string().optional(), + protocols: z.string().optional(), + feature: z.array(z.lazy(() => Feature$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + feature: "Feature", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MediaProvider$ { - /** @deprecated use `MediaProvider$inboundSchema` instead. */ - export const inboundSchema = MediaProvider$inboundSchema; - /** @deprecated use `MediaProvider$outboundSchema` instead. */ - export const outboundSchema = MediaProvider$outboundSchema; - /** @deprecated use `MediaProvider$Outbound` instead. */ - export type Outbound = MediaProvider$Outbound; + /** @deprecated use `MediaProvider$inboundSchema` instead. */ + export const inboundSchema = MediaProvider$inboundSchema; + /** @deprecated use `MediaProvider$outboundSchema` instead. */ + export const outboundSchema = MediaProvider$outboundSchema; + /** @deprecated use `MediaProvider$Outbound` instead. */ + export type Outbound = MediaProvider$Outbound; } /** @internal */ export const GetMediaProvidersMediaContainer$inboundSchema: z.ZodType< - GetMediaProvidersMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowCameraUpload: z.boolean().optional(), - allowChannelAccess: z.boolean().optional(), - allowSharing: z.boolean().optional(), - allowSync: z.boolean().optional(), - allowTuners: z.boolean().optional(), - backgroundProcessing: z.boolean().optional(), - certificate: z.boolean().optional(), - companionProxy: z.boolean().optional(), - countryCode: z.string().optional(), - diagnostics: z.string().optional(), - eventStream: z.boolean().optional(), - friendlyName: z.string().optional(), - livetv: z.number().int().optional(), - machineIdentifier: z.string().optional(), - musicAnalysis: z.number().int().optional(), - myPlex: z.boolean().optional(), - myPlexMappingState: z.string().optional(), - myPlexSigninState: z.string().optional(), - myPlexSubscription: z.boolean().optional(), - myPlexUsername: z.string().optional(), - offlineTranscode: z.number().int().optional(), - ownerFeatures: z.string().optional(), - platform: z.string().optional(), - platformVersion: z.string().optional(), - pluginHost: z.boolean().optional(), - pushNotifications: z.boolean().optional(), - readOnlyLibraries: z.boolean().optional(), - streamingBrainABRVersion: z.number().int().optional(), - streamingBrainVersion: z.number().int().optional(), - sync: z.boolean().optional(), - transcoderActiveVideoSessions: z.number().int().optional(), - transcoderAudio: z.boolean().optional(), - transcoderLyrics: z.boolean().optional(), - transcoderSubtitles: z.boolean().optional(), - transcoderVideo: z.boolean().optional(), - transcoderVideoBitrates: z.string().optional(), - transcoderVideoQualities: z.string().optional(), - transcoderVideoResolutions: z.string().optional(), - updatedAt: z.number().int().optional(), - updater: z.boolean().optional(), - version: z.string().optional(), - voiceSearch: z.boolean().optional(), - MediaProvider: z.array(z.lazy(() => MediaProvider$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaProvider: "mediaProvider", - }); - }); + GetMediaProvidersMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + livetv: z.number().int().optional(), + machineIdentifier: z.string().optional(), + musicAnalysis: z.number().int().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().int().optional(), + ownerFeatures: z.string().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().int().optional(), + streamingBrainVersion: z.number().int().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().int().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().int().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + MediaProvider: z.array(z.lazy(() => MediaProvider$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "MediaProvider": "mediaProvider", + }); +}); /** @internal */ export type GetMediaProvidersMediaContainer$Outbound = { - size?: number | undefined; - allowCameraUpload?: boolean | undefined; - allowChannelAccess?: boolean | undefined; - allowSharing?: boolean | undefined; - allowSync?: boolean | undefined; - allowTuners?: boolean | undefined; - backgroundProcessing?: boolean | undefined; - certificate?: boolean | undefined; - companionProxy?: boolean | undefined; - countryCode?: string | undefined; - diagnostics?: string | undefined; - eventStream?: boolean | undefined; - friendlyName?: string | undefined; - livetv?: number | undefined; - machineIdentifier?: string | undefined; - musicAnalysis?: number | undefined; - myPlex?: boolean | undefined; - myPlexMappingState?: string | undefined; - myPlexSigninState?: string | undefined; - myPlexSubscription?: boolean | undefined; - myPlexUsername?: string | undefined; - offlineTranscode?: number | undefined; - ownerFeatures?: string | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - pluginHost?: boolean | undefined; - pushNotifications?: boolean | undefined; - readOnlyLibraries?: boolean | undefined; - streamingBrainABRVersion?: number | undefined; - streamingBrainVersion?: number | undefined; - sync?: boolean | undefined; - transcoderActiveVideoSessions?: number | undefined; - transcoderAudio?: boolean | undefined; - transcoderLyrics?: boolean | undefined; - transcoderSubtitles?: boolean | undefined; - transcoderVideo?: boolean | undefined; - transcoderVideoBitrates?: string | undefined; - transcoderVideoQualities?: string | undefined; - transcoderVideoResolutions?: string | undefined; - updatedAt?: number | undefined; - updater?: boolean | undefined; - version?: string | undefined; - voiceSearch?: boolean | undefined; - MediaProvider?: Array | undefined; + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + MediaProvider?: Array | undefined; }; /** @internal */ export const GetMediaProvidersMediaContainer$outboundSchema: z.ZodType< - GetMediaProvidersMediaContainer$Outbound, - z.ZodTypeDef, - GetMediaProvidersMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowCameraUpload: z.boolean().optional(), - allowChannelAccess: z.boolean().optional(), - allowSharing: z.boolean().optional(), - allowSync: z.boolean().optional(), - allowTuners: z.boolean().optional(), - backgroundProcessing: z.boolean().optional(), - certificate: z.boolean().optional(), - companionProxy: z.boolean().optional(), - countryCode: z.string().optional(), - diagnostics: z.string().optional(), - eventStream: z.boolean().optional(), - friendlyName: z.string().optional(), - livetv: z.number().int().optional(), - machineIdentifier: z.string().optional(), - musicAnalysis: z.number().int().optional(), - myPlex: z.boolean().optional(), - myPlexMappingState: z.string().optional(), - myPlexSigninState: z.string().optional(), - myPlexSubscription: z.boolean().optional(), - myPlexUsername: z.string().optional(), - offlineTranscode: z.number().int().optional(), - ownerFeatures: z.string().optional(), - platform: z.string().optional(), - platformVersion: z.string().optional(), - pluginHost: z.boolean().optional(), - pushNotifications: z.boolean().optional(), - readOnlyLibraries: z.boolean().optional(), - streamingBrainABRVersion: z.number().int().optional(), - streamingBrainVersion: z.number().int().optional(), - sync: z.boolean().optional(), - transcoderActiveVideoSessions: z.number().int().optional(), - transcoderAudio: z.boolean().optional(), - transcoderLyrics: z.boolean().optional(), - transcoderSubtitles: z.boolean().optional(), - transcoderVideo: z.boolean().optional(), - transcoderVideoBitrates: z.string().optional(), - transcoderVideoQualities: z.string().optional(), - transcoderVideoResolutions: z.string().optional(), - updatedAt: z.number().int().optional(), - updater: z.boolean().optional(), - version: z.string().optional(), - voiceSearch: z.boolean().optional(), - mediaProvider: z.array(z.lazy(() => MediaProvider$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaProvider: "MediaProvider", - }); - }); + GetMediaProvidersMediaContainer$Outbound, + z.ZodTypeDef, + GetMediaProvidersMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + livetv: z.number().int().optional(), + machineIdentifier: z.string().optional(), + musicAnalysis: z.number().int().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().int().optional(), + ownerFeatures: z.string().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().int().optional(), + streamingBrainVersion: z.number().int().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().int().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().int().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + mediaProvider: z.array(z.lazy(() => MediaProvider$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + mediaProvider: "MediaProvider", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersMediaContainer$ { - /** @deprecated use `GetMediaProvidersMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersMediaContainer$inboundSchema; - /** @deprecated use `GetMediaProvidersMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersMediaContainer$outboundSchema; - /** @deprecated use `GetMediaProvidersMediaContainer$Outbound` instead. */ - export type Outbound = GetMediaProvidersMediaContainer$Outbound; + /** @deprecated use `GetMediaProvidersMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersMediaContainer$inboundSchema; + /** @deprecated use `GetMediaProvidersMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersMediaContainer$outboundSchema; + /** @deprecated use `GetMediaProvidersMediaContainer$Outbound` instead. */ + export type Outbound = GetMediaProvidersMediaContainer$Outbound; } /** @internal */ export const GetMediaProvidersResponseBody$inboundSchema: z.ZodType< - GetMediaProvidersResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetMediaProvidersMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetMediaProvidersResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetMediaProvidersMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetMediaProvidersResponseBody$Outbound = { - MediaContainer?: GetMediaProvidersMediaContainer$Outbound | undefined; + MediaContainer?: GetMediaProvidersMediaContainer$Outbound | undefined; }; /** @internal */ export const GetMediaProvidersResponseBody$outboundSchema: z.ZodType< - GetMediaProvidersResponseBody$Outbound, - z.ZodTypeDef, - GetMediaProvidersResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetMediaProvidersMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetMediaProvidersResponseBody$Outbound, + z.ZodTypeDef, + GetMediaProvidersResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetMediaProvidersMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersResponseBody$ { - /** @deprecated use `GetMediaProvidersResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersResponseBody$inboundSchema; - /** @deprecated use `GetMediaProvidersResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersResponseBody$outboundSchema; - /** @deprecated use `GetMediaProvidersResponseBody$Outbound` instead. */ - export type Outbound = GetMediaProvidersResponseBody$Outbound; + /** @deprecated use `GetMediaProvidersResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersResponseBody$inboundSchema; + /** @deprecated use `GetMediaProvidersResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersResponseBody$outboundSchema; + /** @deprecated use `GetMediaProvidersResponseBody$Outbound` instead. */ + export type Outbound = GetMediaProvidersResponseBody$Outbound; } /** @internal */ export const GetMediaProvidersResponse$inboundSchema: z.ZodType< - GetMediaProvidersResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetMediaProvidersResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetMediaProvidersResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetMediaProvidersResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetMediaProvidersResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetMediaProvidersResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetMediaProvidersResponseBody$Outbound | undefined; }; /** @internal */ export const GetMediaProvidersResponse$outboundSchema: z.ZodType< - GetMediaProvidersResponse$Outbound, - z.ZodTypeDef, - GetMediaProvidersResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetMediaProvidersResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetMediaProvidersResponse$Outbound, + z.ZodTypeDef, + GetMediaProvidersResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetMediaProvidersResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMediaProvidersResponse$ { - /** @deprecated use `GetMediaProvidersResponse$inboundSchema` instead. */ - export const inboundSchema = GetMediaProvidersResponse$inboundSchema; - /** @deprecated use `GetMediaProvidersResponse$outboundSchema` instead. */ - export const outboundSchema = GetMediaProvidersResponse$outboundSchema; - /** @deprecated use `GetMediaProvidersResponse$Outbound` instead. */ - export type Outbound = GetMediaProvidersResponse$Outbound; + /** @deprecated use `GetMediaProvidersResponse$inboundSchema` instead. */ + export const inboundSchema = GetMediaProvidersResponse$inboundSchema; + /** @deprecated use `GetMediaProvidersResponse$outboundSchema` instead. */ + export const outboundSchema = GetMediaProvidersResponse$outboundSchema; + /** @deprecated use `GetMediaProvidersResponse$Outbound` instead. */ + export type Outbound = GetMediaProvidersResponse$Outbound; } diff --git a/src/sdk/models/operations/getmetadatabyratingkey.ts b/src/sdk/models/operations/getmetadatabyratingkey.ts index 181f6b8b..66c73083 100644 --- a/src/sdk/models/operations/getmetadatabyratingkey.ts +++ b/src/sdk/models/operations/getmetadatabyratingkey.ts @@ -2,236 +2,236 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; export type GetMetaDataByRatingKeyRequest = { - /** - * the id of the library item to return the children of. - */ - ratingKey: number; + /** + * the id of the library item to return the children of. + */ + ratingKey: number; }; export type Stream = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorPrimaries?: string | undefined; - colorRange?: string | undefined; - colorSpace?: string | undefined; - colorTrc?: string | undefined; - frameRate?: number | undefined; - hasScalingMatrix?: boolean | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - scanType?: string | undefined; - streamIdentifier?: string | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - selected?: boolean | undefined; - channels?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - samplingRate?: number | undefined; + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorPrimaries?: string | undefined; + colorRange?: string | undefined; + colorSpace?: string | undefined; + colorTrc?: string | undefined; + frameRate?: number | undefined; + hasScalingMatrix?: boolean | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + scanType?: string | undefined; + streamIdentifier?: string | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + selected?: boolean | undefined; + channels?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + samplingRate?: number | undefined; }; export type GetMetaDataByRatingKeyPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - stream?: Array | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; + stream?: Array | undefined; }; export type GetMetaDataByRatingKeyMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetMetaDataByRatingKeyGenre = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; export type GetMetaDataByRatingKeyCountry = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; export type Guids = { - id?: string | undefined; + id?: string | undefined; }; export type Ratings = { - image?: string | undefined; - value?: number | undefined; - type?: string | undefined; + image?: string | undefined; + value?: number | undefined; + type?: string | undefined; }; export type GetMetaDataByRatingKeyDirector = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; export type GetMetaDataByRatingKeyWriter = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; export type GetMetaDataByRatingKeyRole = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - role?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + role?: string | undefined; + thumb?: string | undefined; }; export type Producer = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; export type GetMetaDataByRatingKeyMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - country?: Array | undefined; - guids?: Array | undefined; - ratings?: Array | undefined; - director?: Array | undefined; - writer?: Array | undefined; - role?: Array | undefined; - producer?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + country?: Array | undefined; + guids?: Array | undefined; + ratings?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + role?: Array | undefined; + producer?: Array | undefined; }; export type GetMetaDataByRatingKeyMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + metadata?: Array | undefined; }; /** * The metadata of the library item. */ export type GetMetaDataByRatingKeyResponseBody = { - mediaContainer?: GetMetaDataByRatingKeyMediaContainer | undefined; + mediaContainer?: GetMetaDataByRatingKeyMediaContainer | undefined; }; export type GetMetaDataByRatingKeyResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The metadata of the library item. - */ - object?: GetMetaDataByRatingKeyResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The metadata of the library item. + */ + object?: GetMetaDataByRatingKeyResponseBody | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyRequest$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyRequest, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyRequest, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.number().int(), + ratingKey: z.number().int(), }); /** @internal */ export type GetMetaDataByRatingKeyRequest$Outbound = { - ratingKey: number; + ratingKey: number; }; /** @internal */ export const GetMetaDataByRatingKeyRequest$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyRequest$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyRequest + GetMetaDataByRatingKeyRequest$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyRequest > = z.object({ - ratingKey: z.number().int(), + ratingKey: z.number().int(), }); /** @@ -239,16 +239,17 @@ export const GetMetaDataByRatingKeyRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyRequest$ { - /** @deprecated use `GetMetaDataByRatingKeyRequest$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyRequest$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyRequest$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyRequest$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyRequest$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyRequest$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyRequest$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyRequest$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyRequest$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyRequest$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyRequest$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyRequest$Outbound; } /** @internal */ -export const Stream$inboundSchema: z.ZodType = z.object({ +export const Stream$inboundSchema: z.ZodType = z + .object({ id: z.number().int().optional(), streamType: z.number().int().optional(), default: z.boolean().optional(), @@ -281,78 +282,82 @@ export const Stream$inboundSchema: z.ZodType = z. languageTag: z.string().optional(), languageCode: z.string().optional(), samplingRate: z.number().int().optional(), -}); + }); /** @internal */ export type Stream$Outbound = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorPrimaries?: string | undefined; - colorRange?: string | undefined; - colorSpace?: string | undefined; - colorTrc?: string | undefined; - frameRate?: number | undefined; - hasScalingMatrix?: boolean | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - scanType?: string | undefined; - streamIdentifier?: string | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - selected?: boolean | undefined; - channels?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - samplingRate?: number | undefined; + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorPrimaries?: string | undefined; + colorRange?: string | undefined; + colorSpace?: string | undefined; + colorTrc?: string | undefined; + frameRate?: number | undefined; + hasScalingMatrix?: boolean | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + scanType?: string | undefined; + streamIdentifier?: string | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + selected?: boolean | undefined; + channels?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + samplingRate?: number | undefined; }; /** @internal */ -export const Stream$outboundSchema: z.ZodType = z.object({ - id: z.number().int().optional(), - streamType: z.number().int().optional(), - default: z.boolean().optional(), - codec: z.string().optional(), - index: z.number().int().optional(), - bitrate: z.number().int().optional(), - bitDepth: z.number().int().optional(), - chromaLocation: z.string().optional(), - chromaSubsampling: z.string().optional(), - codedHeight: z.number().int().optional(), - codedWidth: z.number().int().optional(), - colorPrimaries: z.string().optional(), - colorRange: z.string().optional(), - colorSpace: z.string().optional(), - colorTrc: z.string().optional(), - frameRate: z.number().int().optional(), - hasScalingMatrix: z.boolean().optional(), - height: z.number().int().optional(), - level: z.number().int().optional(), - profile: z.string().optional(), - refFrames: z.number().int().optional(), - scanType: z.string().optional(), - streamIdentifier: z.string().optional(), - width: z.number().int().optional(), - displayTitle: z.string().optional(), - extendedDisplayTitle: z.string().optional(), - selected: z.boolean().optional(), - channels: z.number().int().optional(), - language: z.string().optional(), - languageTag: z.string().optional(), - languageCode: z.string().optional(), - samplingRate: z.number().int().optional(), +export const Stream$outboundSchema: z.ZodType< + Stream$Outbound, + z.ZodTypeDef, + Stream +> = z.object({ + id: z.number().int().optional(), + streamType: z.number().int().optional(), + default: z.boolean().optional(), + codec: z.string().optional(), + index: z.number().int().optional(), + bitrate: z.number().int().optional(), + bitDepth: z.number().int().optional(), + chromaLocation: z.string().optional(), + chromaSubsampling: z.string().optional(), + codedHeight: z.number().int().optional(), + codedWidth: z.number().int().optional(), + colorPrimaries: z.string().optional(), + colorRange: z.string().optional(), + colorSpace: z.string().optional(), + colorTrc: z.string().optional(), + frameRate: z.number().int().optional(), + hasScalingMatrix: z.boolean().optional(), + height: z.number().int().optional(), + level: z.number().int().optional(), + profile: z.string().optional(), + refFrames: z.number().int().optional(), + scanType: z.string().optional(), + streamIdentifier: z.string().optional(), + width: z.number().int().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), + selected: z.boolean().optional(), + channels: z.number().int().optional(), + language: z.string().optional(), + languageTag: z.string().optional(), + languageCode: z.string().optional(), + samplingRate: z.number().int().optional(), }); /** @@ -360,215 +365,209 @@ export const Stream$outboundSchema: z.ZodType = z - .object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), - Stream: z.array(z.lazy(() => Stream$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Stream: "stream", - }); - }); + GetMetaDataByRatingKeyPart, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), + Stream: z.array(z.lazy(() => Stream$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Stream": "stream", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; - Stream?: Array | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; + Stream?: Array | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyPart$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyPart$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyPart -> = z - .object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), - stream: z.array(z.lazy(() => Stream$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - stream: "Stream", - }); - }); + GetMetaDataByRatingKeyPart$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyPart +> = z.object({ + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), + stream: z.array(z.lazy(() => Stream$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + stream: "Stream", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyPart$ { - /** @deprecated use `GetMetaDataByRatingKeyPart$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyPart$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyPart$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyPart$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyPart$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyPart$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyPart$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyPart$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyPart$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyPart$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyPart$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyPart$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyMedia$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyMedia, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetMetaDataByRatingKeyPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); + GetMetaDataByRatingKeyMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetMetaDataByRatingKeyPart$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyMedia$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyMedia$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyMedia -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetMetaDataByRatingKeyPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetMetaDataByRatingKeyMedia$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyMedia +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetMetaDataByRatingKeyPart$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyMedia$ { - /** @deprecated use `GetMetaDataByRatingKeyMedia$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyMedia$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMedia$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyMedia$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMedia$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyMedia$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyMedia$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyMedia$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMedia$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyMedia$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMedia$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyMedia$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyGenre$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyGenre, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyGenre, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyGenre$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyGenre$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyGenre$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyGenre + GetMetaDataByRatingKeyGenre$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyGenre > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @@ -576,41 +575,41 @@ export const GetMetaDataByRatingKeyGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyGenre$ { - /** @deprecated use `GetMetaDataByRatingKeyGenre$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyGenre$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyGenre$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyGenre$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyGenre$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyGenre$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyGenre$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyGenre$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyGenre$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyGenre$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyGenre$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyGenre$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyCountry$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyCountry, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyCountry, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyCountry$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyCountry$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyCountry$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyCountry + GetMetaDataByRatingKeyCountry$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyCountry > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @@ -618,27 +617,32 @@ export const GetMetaDataByRatingKeyCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyCountry$ { - /** @deprecated use `GetMetaDataByRatingKeyCountry$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyCountry$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyCountry$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyCountry$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyCountry$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyCountry$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyCountry$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyCountry$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyCountry$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyCountry$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyCountry$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyCountry$Outbound; } /** @internal */ -export const Guids$inboundSchema: z.ZodType = z.object({ +export const Guids$inboundSchema: z.ZodType = z + .object({ id: z.string().optional(), -}); + }); /** @internal */ export type Guids$Outbound = { - id?: string | undefined; + id?: string | undefined; }; /** @internal */ -export const Guids$outboundSchema: z.ZodType = z.object({ - id: z.string().optional(), +export const Guids$outboundSchema: z.ZodType< + Guids$Outbound, + z.ZodTypeDef, + Guids +> = z.object({ + id: z.string().optional(), }); /** @@ -646,33 +650,38 @@ export const Guids$outboundSchema: z.ZodType = z.object({ +export const Ratings$inboundSchema: z.ZodType = + z.object({ image: z.string().optional(), value: z.number().optional(), type: z.string().optional(), -}); + }); /** @internal */ export type Ratings$Outbound = { - image?: string | undefined; - value?: number | undefined; - type?: string | undefined; + image?: string | undefined; + value?: number | undefined; + type?: string | undefined; }; /** @internal */ -export const Ratings$outboundSchema: z.ZodType = z.object({ - image: z.string().optional(), - value: z.number().optional(), - type: z.string().optional(), +export const Ratings$outboundSchema: z.ZodType< + Ratings$Outbound, + z.ZodTypeDef, + Ratings +> = z.object({ + image: z.string().optional(), + value: z.number().optional(), + type: z.string().optional(), }); /** @@ -680,47 +689,47 @@ export const Ratings$outboundSchema: z.ZodType = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyDirector$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyDirector$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyDirector$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyDirector + GetMetaDataByRatingKeyDirector$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyDirector > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), }); /** @@ -728,47 +737,47 @@ export const GetMetaDataByRatingKeyDirector$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyDirector$ { - /** @deprecated use `GetMetaDataByRatingKeyDirector$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyDirector$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyDirector$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyDirector$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyDirector$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyDirector$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyDirector$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyDirector$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyDirector$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyDirector$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyDirector$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyDirector$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyWriter$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyWriter, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyWriter, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyWriter$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyWriter$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyWriter$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyWriter + GetMetaDataByRatingKeyWriter$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyWriter > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), }); /** @@ -776,50 +785,50 @@ export const GetMetaDataByRatingKeyWriter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyWriter$ { - /** @deprecated use `GetMetaDataByRatingKeyWriter$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyWriter$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyWriter$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyWriter$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyWriter$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyWriter$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyWriter$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyWriter$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyWriter$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyWriter$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyWriter$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyWriter$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyRole$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyRole, - z.ZodTypeDef, - unknown + GetMetaDataByRatingKeyRole, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - role: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + role: z.string().optional(), + thumb: z.string().optional(), }); /** @internal */ export type GetMetaDataByRatingKeyRole$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - role?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + role?: string | undefined; + thumb?: string | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyRole$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyRole$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyRole + GetMetaDataByRatingKeyRole$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyRole > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - role: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + role: z.string().optional(), + thumb: z.string().optional(), }); /** @@ -827,402 +836,409 @@ export const GetMetaDataByRatingKeyRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyRole$ { - /** @deprecated use `GetMetaDataByRatingKeyRole$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyRole$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyRole$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyRole$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyRole$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyRole$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyRole$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyRole$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyRole$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyRole$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyRole$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyRole$Outbound; } /** @internal */ -export const Producer$inboundSchema: z.ZodType = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), +export const Producer$inboundSchema: z.ZodType< + Producer, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), }); /** @internal */ export type Producer$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + thumb?: string | undefined; }; /** @internal */ -export const Producer$outboundSchema: z.ZodType = - z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - thumb: z.string().optional(), - }); +export const Producer$outboundSchema: z.ZodType< + Producer$Outbound, + z.ZodTypeDef, + Producer +> = z.object({ + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + thumb: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Producer$ { - /** @deprecated use `Producer$inboundSchema` instead. */ - export const inboundSchema = Producer$inboundSchema; - /** @deprecated use `Producer$outboundSchema` instead. */ - export const outboundSchema = Producer$outboundSchema; - /** @deprecated use `Producer$Outbound` instead. */ - export type Outbound = Producer$Outbound; + /** @deprecated use `Producer$inboundSchema` instead. */ + export const inboundSchema = Producer$inboundSchema; + /** @deprecated use `Producer$outboundSchema` instead. */ + export const outboundSchema = Producer$outboundSchema; + /** @deprecated use `Producer$Outbound` instead. */ + export type Outbound = Producer$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyMetadata$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - ratingImage: z.string().optional(), - Media: z.array(z.lazy(() => GetMetaDataByRatingKeyMedia$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => GetMetaDataByRatingKeyGenre$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetMetaDataByRatingKeyCountry$inboundSchema)).optional(), - Guid: z.array(z.lazy(() => Guids$inboundSchema)).optional(), - Rating: z.array(z.lazy(() => Ratings$inboundSchema)).optional(), - Director: z.array(z.lazy(() => GetMetaDataByRatingKeyDirector$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => GetMetaDataByRatingKeyWriter$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetMetaDataByRatingKeyRole$inboundSchema)).optional(), - Producer: z.array(z.lazy(() => Producer$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Country: "country", - Guid: "guids", - Rating: "ratings", - Director: "director", - Writer: "writer", - Role: "role", - Producer: "producer", - }); - }); + GetMetaDataByRatingKeyMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => GetMetaDataByRatingKeyMedia$inboundSchema)) + .optional(), + Genre: z.array(z.lazy(() => GetMetaDataByRatingKeyGenre$inboundSchema)) + .optional(), + Country: z.array(z.lazy(() => GetMetaDataByRatingKeyCountry$inboundSchema)) + .optional(), + Guid: z.array(z.lazy(() => Guids$inboundSchema)).optional(), + Rating: z.array(z.lazy(() => Ratings$inboundSchema)).optional(), + Director: z.array(z.lazy(() => GetMetaDataByRatingKeyDirector$inboundSchema)) + .optional(), + Writer: z.array(z.lazy(() => GetMetaDataByRatingKeyWriter$inboundSchema)) + .optional(), + Role: z.array(z.lazy(() => GetMetaDataByRatingKeyRole$inboundSchema)) + .optional(), + Producer: z.array(z.lazy(() => Producer$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Country": "country", + "Guid": "guids", + "Rating": "ratings", + "Director": "director", + "Writer": "writer", + "Role": "role", + "Producer": "producer", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Guid?: Array | undefined; - Rating?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Role?: Array | undefined; - Producer?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Guid?: Array | undefined; + Rating?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Role?: Array | undefined; + Producer?: Array | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyMetadata$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyMetadata$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyMetadata -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - ratingImage: z.string().optional(), - media: z.array(z.lazy(() => GetMetaDataByRatingKeyMedia$outboundSchema)).optional(), - genre: z.array(z.lazy(() => GetMetaDataByRatingKeyGenre$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetMetaDataByRatingKeyCountry$outboundSchema)).optional(), - guids: z.array(z.lazy(() => Guids$outboundSchema)).optional(), - ratings: z.array(z.lazy(() => Ratings$outboundSchema)).optional(), - director: z.array(z.lazy(() => GetMetaDataByRatingKeyDirector$outboundSchema)).optional(), - writer: z.array(z.lazy(() => GetMetaDataByRatingKeyWriter$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetMetaDataByRatingKeyRole$outboundSchema)).optional(), - producer: z.array(z.lazy(() => Producer$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - country: "Country", - guids: "Guid", - ratings: "Rating", - director: "Director", - writer: "Writer", - role: "Role", - producer: "Producer", - }); - }); + GetMetaDataByRatingKeyMetadata$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyMetadata +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => GetMetaDataByRatingKeyMedia$outboundSchema)) + .optional(), + genre: z.array(z.lazy(() => GetMetaDataByRatingKeyGenre$outboundSchema)) + .optional(), + country: z.array(z.lazy(() => GetMetaDataByRatingKeyCountry$outboundSchema)) + .optional(), + guids: z.array(z.lazy(() => Guids$outboundSchema)).optional(), + ratings: z.array(z.lazy(() => Ratings$outboundSchema)).optional(), + director: z.array(z.lazy(() => GetMetaDataByRatingKeyDirector$outboundSchema)) + .optional(), + writer: z.array(z.lazy(() => GetMetaDataByRatingKeyWriter$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetMetaDataByRatingKeyRole$outboundSchema)) + .optional(), + producer: z.array(z.lazy(() => Producer$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + country: "Country", + guids: "Guid", + ratings: "Rating", + director: "Director", + writer: "Writer", + role: "Role", + producer: "Producer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyMetadata$ { - /** @deprecated use `GetMetaDataByRatingKeyMetadata$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyMetadata$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMetadata$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyMetadata$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMetadata$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyMetadata$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyMetadata$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyMetadata$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMetadata$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyMetadata$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMetadata$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyMetadata$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyMediaContainer$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetMetaDataByRatingKeyMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetMetaDataByRatingKeyMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetMetaDataByRatingKeyMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyMediaContainer$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyMediaContainer$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetMetaDataByRatingKeyMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetMetaDataByRatingKeyMediaContainer$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetMetaDataByRatingKeyMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyMediaContainer$ { - /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyMediaContainer$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyMediaContainer$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyMediaContainer$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + GetMetaDataByRatingKeyMediaContainer$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetMetaDataByRatingKeyMediaContainer$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyMediaContainer$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyMediaContainer$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyResponseBody$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetMetaDataByRatingKeyMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetMetaDataByRatingKeyResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + GetMetaDataByRatingKeyMediaContainer$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyResponseBody$Outbound = { - MediaContainer?: GetMetaDataByRatingKeyMediaContainer$Outbound | undefined; + MediaContainer?: GetMetaDataByRatingKeyMediaContainer$Outbound | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyResponseBody$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponseBody$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyResponseBody -> = z - .object({ - mediaContainer: z - .lazy(() => GetMetaDataByRatingKeyMediaContainer$outboundSchema) - .optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetMetaDataByRatingKeyResponseBody$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetMetaDataByRatingKeyMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyResponseBody$ { - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyResponseBody$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyResponseBody$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponseBody$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyResponseBody$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyResponseBody$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetMetaDataByRatingKeyResponseBody$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyResponseBody$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyResponseBody$Outbound; } /** @internal */ export const GetMetaDataByRatingKeyResponse$inboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetMetaDataByRatingKeyResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetMetaDataByRatingKeyResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetMetaDataByRatingKeyResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetMetaDataByRatingKeyResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetMetaDataByRatingKeyResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetMetaDataByRatingKeyResponseBody$Outbound | undefined; }; /** @internal */ export const GetMetaDataByRatingKeyResponse$outboundSchema: z.ZodType< - GetMetaDataByRatingKeyResponse$Outbound, - z.ZodTypeDef, - GetMetaDataByRatingKeyResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetMetaDataByRatingKeyResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetMetaDataByRatingKeyResponse$Outbound, + z.ZodTypeDef, + GetMetaDataByRatingKeyResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetMetaDataByRatingKeyResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetaDataByRatingKeyResponse$ { - /** @deprecated use `GetMetaDataByRatingKeyResponse$inboundSchema` instead. */ - export const inboundSchema = GetMetaDataByRatingKeyResponse$inboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponse$outboundSchema` instead. */ - export const outboundSchema = GetMetaDataByRatingKeyResponse$outboundSchema; - /** @deprecated use `GetMetaDataByRatingKeyResponse$Outbound` instead. */ - export type Outbound = GetMetaDataByRatingKeyResponse$Outbound; + /** @deprecated use `GetMetaDataByRatingKeyResponse$inboundSchema` instead. */ + export const inboundSchema = GetMetaDataByRatingKeyResponse$inboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyResponse$outboundSchema` instead. */ + export const outboundSchema = GetMetaDataByRatingKeyResponse$outboundSchema; + /** @deprecated use `GetMetaDataByRatingKeyResponse$Outbound` instead. */ + export type Outbound = GetMetaDataByRatingKeyResponse$Outbound; } diff --git a/src/sdk/models/operations/getmetadatachildren.ts b/src/sdk/models/operations/getmetadatachildren.ts index ac31f1a0..bfebf22e 100644 --- a/src/sdk/models/operations/getmetadatachildren.ts +++ b/src/sdk/models/operations/getmetadatachildren.ts @@ -2,137 +2,136 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetMetadataChildrenRequest = { - /** - * the id of the library item to return the children of. - */ - ratingKey: number; - /** - * Adds additional elements to the response. Supported types are (Stream) - * - * @remarks - * - */ - includeElements?: string | undefined; + /** + * the id of the library item to return the children of. + */ + ratingKey: number; + /** + * Adds additional elements to the response. Supported types are (Stream) + * + * @remarks + */ + includeElements?: string | undefined; }; export type GetMetadataChildrenDirectory = { - leafCount?: number | undefined; - thumb?: string | undefined; - viewedLeafCount?: number | undefined; - key?: string | undefined; - title?: string | undefined; + leafCount?: number | undefined; + thumb?: string | undefined; + viewedLeafCount?: number | undefined; + key?: string | undefined; + title?: string | undefined; }; export type GetMetadataChildrenMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - userRating?: number | undefined; - skipCount?: number | undefined; - lastRatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + parentRatingKey?: string | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + parentYear?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + userRating?: number | undefined; + skipCount?: number | undefined; + lastRatedAt?: number | undefined; }; export type GetMetadataChildrenMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - key?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - parentIndex?: number | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - summary?: string | undefined; - theme?: string | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - directory?: Array | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + key?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + nocache?: boolean | undefined; + parentIndex?: number | undefined; + parentTitle?: string | undefined; + parentYear?: number | undefined; + summary?: string | undefined; + theme?: string | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + directory?: Array | undefined; + metadata?: Array | undefined; }; /** * The children of the library item. */ export type GetMetadataChildrenResponseBody = { - mediaContainer?: GetMetadataChildrenMediaContainer | undefined; + mediaContainer?: GetMetadataChildrenMediaContainer | undefined; }; export type GetMetadataChildrenResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The children of the library item. - */ - object?: GetMetadataChildrenResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The children of the library item. + */ + object?: GetMetadataChildrenResponseBody | undefined; }; /** @internal */ export const GetMetadataChildrenRequest$inboundSchema: z.ZodType< - GetMetadataChildrenRequest, - z.ZodTypeDef, - unknown + GetMetadataChildrenRequest, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.number(), - includeElements: z.string().optional(), + ratingKey: z.number(), + includeElements: z.string().optional(), }); /** @internal */ export type GetMetadataChildrenRequest$Outbound = { - ratingKey: number; - includeElements?: string | undefined; + ratingKey: number; + includeElements?: string | undefined; }; /** @internal */ export const GetMetadataChildrenRequest$outboundSchema: z.ZodType< - GetMetadataChildrenRequest$Outbound, - z.ZodTypeDef, - GetMetadataChildrenRequest + GetMetadataChildrenRequest$Outbound, + z.ZodTypeDef, + GetMetadataChildrenRequest > = z.object({ - ratingKey: z.number(), - includeElements: z.string().optional(), + ratingKey: z.number(), + includeElements: z.string().optional(), }); /** @@ -140,47 +139,47 @@ export const GetMetadataChildrenRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenRequest$ { - /** @deprecated use `GetMetadataChildrenRequest$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenRequest$inboundSchema; - /** @deprecated use `GetMetadataChildrenRequest$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenRequest$outboundSchema; - /** @deprecated use `GetMetadataChildrenRequest$Outbound` instead. */ - export type Outbound = GetMetadataChildrenRequest$Outbound; + /** @deprecated use `GetMetadataChildrenRequest$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenRequest$inboundSchema; + /** @deprecated use `GetMetadataChildrenRequest$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenRequest$outboundSchema; + /** @deprecated use `GetMetadataChildrenRequest$Outbound` instead. */ + export type Outbound = GetMetadataChildrenRequest$Outbound; } /** @internal */ export const GetMetadataChildrenDirectory$inboundSchema: z.ZodType< - GetMetadataChildrenDirectory, - z.ZodTypeDef, - unknown + GetMetadataChildrenDirectory, + z.ZodTypeDef, + unknown > = z.object({ - leafCount: z.number().int().optional(), - thumb: z.string().optional(), - viewedLeafCount: z.number().int().optional(), - key: z.string().optional(), - title: z.string().optional(), + leafCount: z.number().int().optional(), + thumb: z.string().optional(), + viewedLeafCount: z.number().int().optional(), + key: z.string().optional(), + title: z.string().optional(), }); /** @internal */ export type GetMetadataChildrenDirectory$Outbound = { - leafCount?: number | undefined; - thumb?: string | undefined; - viewedLeafCount?: number | undefined; - key?: string | undefined; - title?: string | undefined; + leafCount?: number | undefined; + thumb?: string | undefined; + viewedLeafCount?: number | undefined; + key?: string | undefined; + title?: string | undefined; }; /** @internal */ export const GetMetadataChildrenDirectory$outboundSchema: z.ZodType< - GetMetadataChildrenDirectory$Outbound, - z.ZodTypeDef, - GetMetadataChildrenDirectory + GetMetadataChildrenDirectory$Outbound, + z.ZodTypeDef, + GetMetadataChildrenDirectory > = z.object({ - leafCount: z.number().int().optional(), - thumb: z.string().optional(), - viewedLeafCount: z.number().int().optional(), - key: z.string().optional(), - title: z.string().optional(), + leafCount: z.number().int().optional(), + thumb: z.string().optional(), + viewedLeafCount: z.number().int().optional(), + key: z.string().optional(), + title: z.string().optional(), }); /** @@ -188,113 +187,113 @@ export const GetMetadataChildrenDirectory$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenDirectory$ { - /** @deprecated use `GetMetadataChildrenDirectory$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenDirectory$inboundSchema; - /** @deprecated use `GetMetadataChildrenDirectory$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenDirectory$outboundSchema; - /** @deprecated use `GetMetadataChildrenDirectory$Outbound` instead. */ - export type Outbound = GetMetadataChildrenDirectory$Outbound; + /** @deprecated use `GetMetadataChildrenDirectory$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenDirectory$inboundSchema; + /** @deprecated use `GetMetadataChildrenDirectory$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenDirectory$outboundSchema; + /** @deprecated use `GetMetadataChildrenDirectory$Outbound` instead. */ + export type Outbound = GetMetadataChildrenDirectory$Outbound; } /** @internal */ export const GetMetadataChildrenMetadata$inboundSchema: z.ZodType< - GetMetadataChildrenMetadata, - z.ZodTypeDef, - unknown + GetMetadataChildrenMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - parentRatingKey: z.string().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - parentYear: z.number().int().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - userRating: z.number().int().optional(), - skipCount: z.number().int().optional(), - lastRatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + parentRatingKey: z.string().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + parentYear: z.number().int().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + userRating: z.number().int().optional(), + skipCount: z.number().int().optional(), + lastRatedAt: z.number().int().optional(), }); /** @internal */ export type GetMetadataChildrenMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - userRating?: number | undefined; - skipCount?: number | undefined; - lastRatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + parentRatingKey?: string | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + parentYear?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + userRating?: number | undefined; + skipCount?: number | undefined; + lastRatedAt?: number | undefined; }; /** @internal */ export const GetMetadataChildrenMetadata$outboundSchema: z.ZodType< - GetMetadataChildrenMetadata$Outbound, - z.ZodTypeDef, - GetMetadataChildrenMetadata + GetMetadataChildrenMetadata$Outbound, + z.ZodTypeDef, + GetMetadataChildrenMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - parentRatingKey: z.string().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - parentYear: z.number().int().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - userRating: z.number().int().optional(), - skipCount: z.number().int().optional(), - lastRatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + parentRatingKey: z.string().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + parentYear: z.number().int().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + userRating: z.number().int().optional(), + skipCount: z.number().int().optional(), + lastRatedAt: z.number().int().optional(), }); /** @@ -302,237 +301,234 @@ export const GetMetadataChildrenMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenMetadata$ { - /** @deprecated use `GetMetadataChildrenMetadata$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenMetadata$inboundSchema; - /** @deprecated use `GetMetadataChildrenMetadata$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenMetadata$outboundSchema; - /** @deprecated use `GetMetadataChildrenMetadata$Outbound` instead. */ - export type Outbound = GetMetadataChildrenMetadata$Outbound; + /** @deprecated use `GetMetadataChildrenMetadata$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenMetadata$inboundSchema; + /** @deprecated use `GetMetadataChildrenMetadata$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenMetadata$outboundSchema; + /** @deprecated use `GetMetadataChildrenMetadata$Outbound` instead. */ + export type Outbound = GetMetadataChildrenMetadata$Outbound; } /** @internal */ export const GetMetadataChildrenMediaContainer$inboundSchema: z.ZodType< - GetMetadataChildrenMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - key: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - nocache: z.boolean().optional(), - parentIndex: z.number().int().optional(), - parentTitle: z.string().optional(), - parentYear: z.number().int().optional(), - summary: z.string().optional(), - theme: z.string().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - Directory: z.array(z.lazy(() => GetMetadataChildrenDirectory$inboundSchema)).optional(), - Metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Directory: "directory", - Metadata: "metadata", - }); - }); + GetMetadataChildrenMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + key: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + nocache: z.boolean().optional(), + parentIndex: z.number().int().optional(), + parentTitle: z.string().optional(), + parentYear: z.number().int().optional(), + summary: z.string().optional(), + theme: z.string().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + Directory: z.array(z.lazy(() => GetMetadataChildrenDirectory$inboundSchema)) + .optional(), + Metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Directory": "directory", + "Metadata": "metadata", + }); +}); /** @internal */ export type GetMetadataChildrenMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - key?: string | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - parentIndex?: number | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - summary?: string | undefined; - theme?: string | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Directory?: Array | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + key?: string | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + nocache?: boolean | undefined; + parentIndex?: number | undefined; + parentTitle?: string | undefined; + parentYear?: number | undefined; + summary?: string | undefined; + theme?: string | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + Directory?: Array | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetMetadataChildrenMediaContainer$outboundSchema: z.ZodType< - GetMetadataChildrenMediaContainer$Outbound, - z.ZodTypeDef, - GetMetadataChildrenMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - key: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - nocache: z.boolean().optional(), - parentIndex: z.number().int().optional(), - parentTitle: z.string().optional(), - parentYear: z.number().int().optional(), - summary: z.string().optional(), - theme: z.string().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - directory: z.array(z.lazy(() => GetMetadataChildrenDirectory$outboundSchema)).optional(), - metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - directory: "Directory", - metadata: "Metadata", - }); - }); + GetMetadataChildrenMediaContainer$Outbound, + z.ZodTypeDef, + GetMetadataChildrenMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + key: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + nocache: z.boolean().optional(), + parentIndex: z.number().int().optional(), + parentTitle: z.string().optional(), + parentYear: z.number().int().optional(), + summary: z.string().optional(), + theme: z.string().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + directory: z.array(z.lazy(() => GetMetadataChildrenDirectory$outboundSchema)) + .optional(), + metadata: z.array(z.lazy(() => GetMetadataChildrenMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + directory: "Directory", + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenMediaContainer$ { - /** @deprecated use `GetMetadataChildrenMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenMediaContainer$inboundSchema; - /** @deprecated use `GetMetadataChildrenMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenMediaContainer$outboundSchema; - /** @deprecated use `GetMetadataChildrenMediaContainer$Outbound` instead. */ - export type Outbound = GetMetadataChildrenMediaContainer$Outbound; + /** @deprecated use `GetMetadataChildrenMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenMediaContainer$inboundSchema; + /** @deprecated use `GetMetadataChildrenMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetMetadataChildrenMediaContainer$outboundSchema; + /** @deprecated use `GetMetadataChildrenMediaContainer$Outbound` instead. */ + export type Outbound = GetMetadataChildrenMediaContainer$Outbound; } /** @internal */ export const GetMetadataChildrenResponseBody$inboundSchema: z.ZodType< - GetMetadataChildrenResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetMetadataChildrenMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetMetadataChildrenResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetMetadataChildrenMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetMetadataChildrenResponseBody$Outbound = { - MediaContainer?: GetMetadataChildrenMediaContainer$Outbound | undefined; + MediaContainer?: GetMetadataChildrenMediaContainer$Outbound | undefined; }; /** @internal */ export const GetMetadataChildrenResponseBody$outboundSchema: z.ZodType< - GetMetadataChildrenResponseBody$Outbound, - z.ZodTypeDef, - GetMetadataChildrenResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetMetadataChildrenMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetMetadataChildrenResponseBody$Outbound, + z.ZodTypeDef, + GetMetadataChildrenResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetMetadataChildrenMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenResponseBody$ { - /** @deprecated use `GetMetadataChildrenResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenResponseBody$inboundSchema; - /** @deprecated use `GetMetadataChildrenResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenResponseBody$outboundSchema; - /** @deprecated use `GetMetadataChildrenResponseBody$Outbound` instead. */ - export type Outbound = GetMetadataChildrenResponseBody$Outbound; + /** @deprecated use `GetMetadataChildrenResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenResponseBody$inboundSchema; + /** @deprecated use `GetMetadataChildrenResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenResponseBody$outboundSchema; + /** @deprecated use `GetMetadataChildrenResponseBody$Outbound` instead. */ + export type Outbound = GetMetadataChildrenResponseBody$Outbound; } /** @internal */ export const GetMetadataChildrenResponse$inboundSchema: z.ZodType< - GetMetadataChildrenResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetMetadataChildrenResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetMetadataChildrenResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetMetadataChildrenResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetMetadataChildrenResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetMetadataChildrenResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetMetadataChildrenResponseBody$Outbound | undefined; }; /** @internal */ export const GetMetadataChildrenResponse$outboundSchema: z.ZodType< - GetMetadataChildrenResponse$Outbound, - z.ZodTypeDef, - GetMetadataChildrenResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetMetadataChildrenResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetMetadataChildrenResponse$Outbound, + z.ZodTypeDef, + GetMetadataChildrenResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetMetadataChildrenResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMetadataChildrenResponse$ { - /** @deprecated use `GetMetadataChildrenResponse$inboundSchema` instead. */ - export const inboundSchema = GetMetadataChildrenResponse$inboundSchema; - /** @deprecated use `GetMetadataChildrenResponse$outboundSchema` instead. */ - export const outboundSchema = GetMetadataChildrenResponse$outboundSchema; - /** @deprecated use `GetMetadataChildrenResponse$Outbound` instead. */ - export type Outbound = GetMetadataChildrenResponse$Outbound; + /** @deprecated use `GetMetadataChildrenResponse$inboundSchema` instead. */ + export const inboundSchema = GetMetadataChildrenResponse$inboundSchema; + /** @deprecated use `GetMetadataChildrenResponse$outboundSchema` instead. */ + export const outboundSchema = GetMetadataChildrenResponse$outboundSchema; + /** @deprecated use `GetMetadataChildrenResponse$Outbound` instead. */ + export type Outbound = GetMetadataChildrenResponse$Outbound; } diff --git a/src/sdk/models/operations/getmyplexaccount.ts b/src/sdk/models/operations/getmyplexaccount.ts index 1bbff9aa..798cd606 100644 --- a/src/sdk/models/operations/getmyplexaccount.ts +++ b/src/sdk/models/operations/getmyplexaccount.ts @@ -2,52 +2,53 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type MyPlex = { - authToken?: string | undefined; - username?: string | undefined; - mappingState?: string | undefined; - mappingError?: string | undefined; - signInState?: string | undefined; - publicAddress?: string | undefined; - publicPort?: number | undefined; - privateAddress?: string | undefined; - privatePort?: number | undefined; - subscriptionFeatures?: string | undefined; - subscriptionActive?: boolean | undefined; - subscriptionState?: string | undefined; + authToken?: string | undefined; + username?: string | undefined; + mappingState?: string | undefined; + mappingError?: string | undefined; + signInState?: string | undefined; + publicAddress?: string | undefined; + publicPort?: number | undefined; + privateAddress?: string | undefined; + privatePort?: number | undefined; + subscriptionFeatures?: string | undefined; + subscriptionActive?: boolean | undefined; + subscriptionState?: string | undefined; }; /** * MyPlex Account */ export type GetMyPlexAccountResponseBody = { - myPlex?: MyPlex | undefined; + myPlex?: MyPlex | undefined; }; export type GetMyPlexAccountResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * MyPlex Account - */ - object?: GetMyPlexAccountResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * MyPlex Account + */ + object?: GetMyPlexAccountResponseBody | undefined; }; /** @internal */ -export const MyPlex$inboundSchema: z.ZodType = z.object({ +export const MyPlex$inboundSchema: z.ZodType = z + .object({ authToken: z.string().optional(), username: z.string().optional(), mappingState: z.string().optional(), @@ -60,38 +61,42 @@ export const MyPlex$inboundSchema: z.ZodType = z. subscriptionFeatures: z.string().optional(), subscriptionActive: z.boolean().optional(), subscriptionState: z.string().optional(), -}); + }); /** @internal */ export type MyPlex$Outbound = { - authToken?: string | undefined; - username?: string | undefined; - mappingState?: string | undefined; - mappingError?: string | undefined; - signInState?: string | undefined; - publicAddress?: string | undefined; - publicPort?: number | undefined; - privateAddress?: string | undefined; - privatePort?: number | undefined; - subscriptionFeatures?: string | undefined; - subscriptionActive?: boolean | undefined; - subscriptionState?: string | undefined; + authToken?: string | undefined; + username?: string | undefined; + mappingState?: string | undefined; + mappingError?: string | undefined; + signInState?: string | undefined; + publicAddress?: string | undefined; + publicPort?: number | undefined; + privateAddress?: string | undefined; + privatePort?: number | undefined; + subscriptionFeatures?: string | undefined; + subscriptionActive?: boolean | undefined; + subscriptionState?: string | undefined; }; /** @internal */ -export const MyPlex$outboundSchema: z.ZodType = z.object({ - authToken: z.string().optional(), - username: z.string().optional(), - mappingState: z.string().optional(), - mappingError: z.string().optional(), - signInState: z.string().optional(), - publicAddress: z.string().optional(), - publicPort: z.number().optional(), - privateAddress: z.string().optional(), - privatePort: z.number().optional(), - subscriptionFeatures: z.string().optional(), - subscriptionActive: z.boolean().optional(), - subscriptionState: z.string().optional(), +export const MyPlex$outboundSchema: z.ZodType< + MyPlex$Outbound, + z.ZodTypeDef, + MyPlex +> = z.object({ + authToken: z.string().optional(), + username: z.string().optional(), + mappingState: z.string().optional(), + mappingError: z.string().optional(), + signInState: z.string().optional(), + publicAddress: z.string().optional(), + publicPort: z.number().optional(), + privateAddress: z.string().optional(), + privatePort: z.number().optional(), + subscriptionFeatures: z.string().optional(), + subscriptionActive: z.boolean().optional(), + subscriptionState: z.string().optional(), }); /** @@ -99,121 +104,113 @@ export const MyPlex$outboundSchema: z.ZodType = z - .object({ - MyPlex: z.lazy(() => MyPlex$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MyPlex: "myPlex", - }); - }); + GetMyPlexAccountResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MyPlex: z.lazy(() => MyPlex$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "MyPlex": "myPlex", + }); +}); /** @internal */ export type GetMyPlexAccountResponseBody$Outbound = { - MyPlex?: MyPlex$Outbound | undefined; + MyPlex?: MyPlex$Outbound | undefined; }; /** @internal */ export const GetMyPlexAccountResponseBody$outboundSchema: z.ZodType< - GetMyPlexAccountResponseBody$Outbound, - z.ZodTypeDef, - GetMyPlexAccountResponseBody -> = z - .object({ - myPlex: z.lazy(() => MyPlex$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - myPlex: "MyPlex", - }); - }); + GetMyPlexAccountResponseBody$Outbound, + z.ZodTypeDef, + GetMyPlexAccountResponseBody +> = z.object({ + myPlex: z.lazy(() => MyPlex$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + myPlex: "MyPlex", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMyPlexAccountResponseBody$ { - /** @deprecated use `GetMyPlexAccountResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountResponseBody$inboundSchema; - /** @deprecated use `GetMyPlexAccountResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountResponseBody$outboundSchema; - /** @deprecated use `GetMyPlexAccountResponseBody$Outbound` instead. */ - export type Outbound = GetMyPlexAccountResponseBody$Outbound; + /** @deprecated use `GetMyPlexAccountResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountResponseBody$inboundSchema; + /** @deprecated use `GetMyPlexAccountResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountResponseBody$outboundSchema; + /** @deprecated use `GetMyPlexAccountResponseBody$Outbound` instead. */ + export type Outbound = GetMyPlexAccountResponseBody$Outbound; } /** @internal */ export const GetMyPlexAccountResponse$inboundSchema: z.ZodType< - GetMyPlexAccountResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetMyPlexAccountResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetMyPlexAccountResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetMyPlexAccountResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetMyPlexAccountResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetMyPlexAccountResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetMyPlexAccountResponseBody$Outbound | undefined; }; /** @internal */ export const GetMyPlexAccountResponse$outboundSchema: z.ZodType< - GetMyPlexAccountResponse$Outbound, - z.ZodTypeDef, - GetMyPlexAccountResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetMyPlexAccountResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetMyPlexAccountResponse$Outbound, + z.ZodTypeDef, + GetMyPlexAccountResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetMyPlexAccountResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetMyPlexAccountResponse$ { - /** @deprecated use `GetMyPlexAccountResponse$inboundSchema` instead. */ - export const inboundSchema = GetMyPlexAccountResponse$inboundSchema; - /** @deprecated use `GetMyPlexAccountResponse$outboundSchema` instead. */ - export const outboundSchema = GetMyPlexAccountResponse$outboundSchema; - /** @deprecated use `GetMyPlexAccountResponse$Outbound` instead. */ - export type Outbound = GetMyPlexAccountResponse$Outbound; + /** @deprecated use `GetMyPlexAccountResponse$inboundSchema` instead. */ + export const inboundSchema = GetMyPlexAccountResponse$inboundSchema; + /** @deprecated use `GetMyPlexAccountResponse$outboundSchema` instead. */ + export const outboundSchema = GetMyPlexAccountResponse$outboundSchema; + /** @deprecated use `GetMyPlexAccountResponse$Outbound` instead. */ + export type Outbound = GetMyPlexAccountResponse$Outbound; } diff --git a/src/sdk/models/operations/getondeck.ts b/src/sdk/models/operations/getondeck.ts index 8dc5b54c..1f5cc553 100644 --- a/src/sdk/models/operations/getondeck.ts +++ b/src/sdk/models/operations/getondeck.ts @@ -2,228 +2,231 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetOnDeckStream = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorRange?: string | undefined; - frameRate?: number | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorRange?: string | undefined; + frameRate?: number | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; }; export type GetOnDeckPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; - stream?: Array | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + stream?: Array | undefined; }; export type GetOnDeckMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetOnDeckGuids = { - id?: string | undefined; + id?: string | undefined; }; export type GetOnDeckMetadata = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - parentRatingKey?: number | undefined; - grandparentRatingKey?: number | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - grandparentGuid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - grandparentKey?: string | undefined; - parentKey?: string | undefined; - librarySectionKey?: string | undefined; - grandparentTitle?: string | undefined; - parentTitle?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - grandparentTheme?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: Date | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - media?: Array | undefined; - guids?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + parentRatingKey?: number | undefined; + grandparentRatingKey?: number | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + grandparentGuid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + grandparentKey?: string | undefined; + parentKey?: string | undefined; + librarySectionKey?: string | undefined; + grandparentTitle?: string | undefined; + parentTitle?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + media?: Array | undefined; + guids?: Array | undefined; }; export type GetOnDeckMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; }; /** * The on Deck content */ export type GetOnDeckResponseBody = { - mediaContainer?: GetOnDeckMediaContainer | undefined; + mediaContainer?: GetOnDeckMediaContainer | undefined; }; export type GetOnDeckResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The on Deck content - */ - object?: GetOnDeckResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The on Deck content + */ + object?: GetOnDeckResponseBody | undefined; }; /** @internal */ -export const GetOnDeckStream$inboundSchema: z.ZodType = - z.object({ - id: z.number().optional(), - streamType: z.number().optional(), - default: z.boolean().optional(), - codec: z.string().optional(), - index: z.number().optional(), - bitrate: z.number().optional(), - language: z.string().optional(), - languageTag: z.string().optional(), - languageCode: z.string().optional(), - bitDepth: z.number().optional(), - chromaLocation: z.string().optional(), - chromaSubsampling: z.string().optional(), - codedHeight: z.number().optional(), - codedWidth: z.number().optional(), - colorRange: z.string().optional(), - frameRate: z.number().optional(), - height: z.number().optional(), - level: z.number().optional(), - profile: z.string().optional(), - refFrames: z.number().optional(), - width: z.number().optional(), - displayTitle: z.string().optional(), - extendedDisplayTitle: z.string().optional(), - }); +export const GetOnDeckStream$inboundSchema: z.ZodType< + GetOnDeckStream, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().optional(), + streamType: z.number().optional(), + default: z.boolean().optional(), + codec: z.string().optional(), + index: z.number().optional(), + bitrate: z.number().optional(), + language: z.string().optional(), + languageTag: z.string().optional(), + languageCode: z.string().optional(), + bitDepth: z.number().optional(), + chromaLocation: z.string().optional(), + chromaSubsampling: z.string().optional(), + codedHeight: z.number().optional(), + codedWidth: z.number().optional(), + colorRange: z.string().optional(), + frameRate: z.number().optional(), + height: z.number().optional(), + level: z.number().optional(), + profile: z.string().optional(), + refFrames: z.number().optional(), + width: z.number().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), +}); /** @internal */ export type GetOnDeckStream$Outbound = { - id?: number | undefined; - streamType?: number | undefined; - default?: boolean | undefined; - codec?: string | undefined; - index?: number | undefined; - bitrate?: number | undefined; - language?: string | undefined; - languageTag?: string | undefined; - languageCode?: string | undefined; - bitDepth?: number | undefined; - chromaLocation?: string | undefined; - chromaSubsampling?: string | undefined; - codedHeight?: number | undefined; - codedWidth?: number | undefined; - colorRange?: string | undefined; - frameRate?: number | undefined; - height?: number | undefined; - level?: number | undefined; - profile?: string | undefined; - refFrames?: number | undefined; - width?: number | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; + id?: number | undefined; + streamType?: number | undefined; + default?: boolean | undefined; + codec?: string | undefined; + index?: number | undefined; + bitrate?: number | undefined; + language?: string | undefined; + languageTag?: string | undefined; + languageCode?: string | undefined; + bitDepth?: number | undefined; + chromaLocation?: string | undefined; + chromaSubsampling?: string | undefined; + codedHeight?: number | undefined; + codedWidth?: number | undefined; + colorRange?: string | undefined; + frameRate?: number | undefined; + height?: number | undefined; + level?: number | undefined; + profile?: string | undefined; + refFrames?: number | undefined; + width?: number | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; }; /** @internal */ export const GetOnDeckStream$outboundSchema: z.ZodType< - GetOnDeckStream$Outbound, - z.ZodTypeDef, - GetOnDeckStream + GetOnDeckStream$Outbound, + z.ZodTypeDef, + GetOnDeckStream > = z.object({ - id: z.number().optional(), - streamType: z.number().optional(), - default: z.boolean().optional(), - codec: z.string().optional(), - index: z.number().optional(), - bitrate: z.number().optional(), - language: z.string().optional(), - languageTag: z.string().optional(), - languageCode: z.string().optional(), - bitDepth: z.number().optional(), - chromaLocation: z.string().optional(), - chromaSubsampling: z.string().optional(), - codedHeight: z.number().optional(), - codedWidth: z.number().optional(), - colorRange: z.string().optional(), - frameRate: z.number().optional(), - height: z.number().optional(), - level: z.number().optional(), - profile: z.string().optional(), - refFrames: z.number().optional(), - width: z.number().optional(), - displayTitle: z.string().optional(), - extendedDisplayTitle: z.string().optional(), + id: z.number().optional(), + streamType: z.number().optional(), + default: z.boolean().optional(), + codec: z.string().optional(), + index: z.number().optional(), + bitrate: z.number().optional(), + language: z.string().optional(), + languageTag: z.string().optional(), + languageCode: z.string().optional(), + bitDepth: z.number().optional(), + chromaLocation: z.string().optional(), + chromaSubsampling: z.string().optional(), + codedHeight: z.number().optional(), + codedWidth: z.number().optional(), + colorRange: z.string().optional(), + frameRate: z.number().optional(), + height: z.number().optional(), + level: z.number().optional(), + profile: z.string().optional(), + refFrames: z.number().optional(), + width: z.number().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), }); /** @@ -231,186 +234,189 @@ export const GetOnDeckStream$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckStream$ { - /** @deprecated use `GetOnDeckStream$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckStream$inboundSchema; - /** @deprecated use `GetOnDeckStream$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckStream$outboundSchema; - /** @deprecated use `GetOnDeckStream$Outbound` instead. */ - export type Outbound = GetOnDeckStream$Outbound; + /** @deprecated use `GetOnDeckStream$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckStream$inboundSchema; + /** @deprecated use `GetOnDeckStream$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckStream$outboundSchema; + /** @deprecated use `GetOnDeckStream$Outbound` instead. */ + export type Outbound = GetOnDeckStream$Outbound; } /** @internal */ -export const GetOnDeckPart$inboundSchema: z.ZodType = z - .object({ - id: z.number().optional(), - key: z.string().optional(), - duration: z.number().optional(), - file: z.string().optional(), - size: z.number().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), - Stream: z.array(z.lazy(() => GetOnDeckStream$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Stream: "stream", - }); - }); +export const GetOnDeckPart$inboundSchema: z.ZodType< + GetOnDeckPart, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + Stream: z.array(z.lazy(() => GetOnDeckStream$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Stream": "stream", + }); +}); /** @internal */ export type GetOnDeckPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; - Stream?: Array | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; + Stream?: Array | undefined; }; /** @internal */ export const GetOnDeckPart$outboundSchema: z.ZodType< - GetOnDeckPart$Outbound, - z.ZodTypeDef, - GetOnDeckPart -> = z - .object({ - id: z.number().optional(), - key: z.string().optional(), - duration: z.number().optional(), - file: z.string().optional(), - size: z.number().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), - stream: z.array(z.lazy(() => GetOnDeckStream$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - stream: "Stream", - }); - }); + GetOnDeckPart$Outbound, + z.ZodTypeDef, + GetOnDeckPart +> = z.object({ + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), + stream: z.array(z.lazy(() => GetOnDeckStream$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + stream: "Stream", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckPart$ { - /** @deprecated use `GetOnDeckPart$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckPart$inboundSchema; - /** @deprecated use `GetOnDeckPart$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckPart$outboundSchema; - /** @deprecated use `GetOnDeckPart$Outbound` instead. */ - export type Outbound = GetOnDeckPart$Outbound; + /** @deprecated use `GetOnDeckPart$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckPart$inboundSchema; + /** @deprecated use `GetOnDeckPart$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckPart$outboundSchema; + /** @deprecated use `GetOnDeckPart$Outbound` instead. */ + export type Outbound = GetOnDeckPart$Outbound; } /** @internal */ -export const GetOnDeckMedia$inboundSchema: z.ZodType = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - audioProfile: z.string().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetOnDeckPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); +export const GetOnDeckMedia$inboundSchema: z.ZodType< + GetOnDeckMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetOnDeckPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetOnDeckMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetOnDeckMedia$outboundSchema: z.ZodType< - GetOnDeckMedia$Outbound, - z.ZodTypeDef, - GetOnDeckMedia -> = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - audioProfile: z.string().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetOnDeckPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetOnDeckMedia$Outbound, + z.ZodTypeDef, + GetOnDeckMedia +> = z.object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetOnDeckPart$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckMedia$ { - /** @deprecated use `GetOnDeckMedia$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckMedia$inboundSchema; - /** @deprecated use `GetOnDeckMedia$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckMedia$outboundSchema; - /** @deprecated use `GetOnDeckMedia$Outbound` instead. */ - export type Outbound = GetOnDeckMedia$Outbound; + /** @deprecated use `GetOnDeckMedia$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckMedia$inboundSchema; + /** @deprecated use `GetOnDeckMedia$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckMedia$outboundSchema; + /** @deprecated use `GetOnDeckMedia$Outbound` instead. */ + export type Outbound = GetOnDeckMedia$Outbound; } /** @internal */ -export const GetOnDeckGuids$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - }); +export const GetOnDeckGuids$inboundSchema: z.ZodType< + GetOnDeckGuids, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), +}); /** @internal */ export type GetOnDeckGuids$Outbound = { - id?: string | undefined; + id?: string | undefined; }; /** @internal */ export const GetOnDeckGuids$outboundSchema: z.ZodType< - GetOnDeckGuids$Outbound, - z.ZodTypeDef, - GetOnDeckGuids + GetOnDeckGuids$Outbound, + z.ZodTypeDef, + GetOnDeckGuids > = z.object({ - id: z.string().optional(), + id: z.string().optional(), }); /** @@ -418,343 +424,330 @@ export const GetOnDeckGuids$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckGuids$ { - /** @deprecated use `GetOnDeckGuids$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckGuids$inboundSchema; - /** @deprecated use `GetOnDeckGuids$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckGuids$outboundSchema; - /** @deprecated use `GetOnDeckGuids$Outbound` instead. */ - export type Outbound = GetOnDeckGuids$Outbound; + /** @deprecated use `GetOnDeckGuids$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckGuids$inboundSchema; + /** @deprecated use `GetOnDeckGuids$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckGuids$outboundSchema; + /** @deprecated use `GetOnDeckGuids$Outbound` instead. */ + export type Outbound = GetOnDeckGuids$Outbound; } /** @internal */ -export const GetOnDeckMetadata$inboundSchema: z.ZodType = - z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - parentRatingKey: z.number().optional(), - grandparentRatingKey: z.number().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - grandparentGuid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - grandparentKey: z.string().optional(), - parentKey: z.string().optional(), - librarySectionKey: z.string().optional(), - grandparentTitle: z.string().optional(), - parentTitle: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - index: z.number().optional(), - parentIndex: z.number().optional(), - lastViewedAt: z.number().optional(), - year: z.number().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - grandparentTheme: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - Media: z.array(z.lazy(() => GetOnDeckMedia$inboundSchema)).optional(), - Guid: z.array(z.lazy(() => GetOnDeckGuids$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Guid: "guids", - }); - }); +export const GetOnDeckMetadata$inboundSchema: z.ZodType< + GetOnDeckMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + parentRatingKey: z.number().optional(), + grandparentRatingKey: z.number().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + grandparentGuid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + grandparentKey: z.string().optional(), + parentKey: z.string().optional(), + librarySectionKey: z.string().optional(), + grandparentTitle: z.string().optional(), + parentTitle: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().optional(), + parentIndex: z.number().optional(), + lastViewedAt: z.number().optional(), + year: z.number().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + Media: z.array(z.lazy(() => GetOnDeckMedia$inboundSchema)).optional(), + Guid: z.array(z.lazy(() => GetOnDeckGuids$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Guid": "guids", + }); +}); /** @internal */ export type GetOnDeckMetadata$Outbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - parentRatingKey?: number | undefined; - grandparentRatingKey?: number | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - grandparentGuid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - grandparentKey?: string | undefined; - parentKey?: string | undefined; - librarySectionKey?: string | undefined; - grandparentTitle?: string | undefined; - parentTitle?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - lastViewedAt?: number | undefined; - year?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - grandparentTheme?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - Media?: Array | undefined; - Guid?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + parentRatingKey?: number | undefined; + grandparentRatingKey?: number | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + grandparentGuid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + grandparentKey?: string | undefined; + parentKey?: string | undefined; + librarySectionKey?: string | undefined; + grandparentTitle?: string | undefined; + parentTitle?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + lastViewedAt?: number | undefined; + year?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + grandparentTheme?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + Media?: Array | undefined; + Guid?: Array | undefined; }; /** @internal */ export const GetOnDeckMetadata$outboundSchema: z.ZodType< - GetOnDeckMetadata$Outbound, - z.ZodTypeDef, - GetOnDeckMetadata -> = z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - parentRatingKey: z.number().optional(), - grandparentRatingKey: z.number().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - grandparentGuid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - grandparentKey: z.string().optional(), - parentKey: z.string().optional(), - librarySectionKey: z.string().optional(), - grandparentTitle: z.string().optional(), - parentTitle: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - index: z.number().optional(), - parentIndex: z.number().optional(), - lastViewedAt: z.number().optional(), - year: z.number().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - grandparentTheme: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .date() - .transform((v) => v.toISOString()) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - media: z.array(z.lazy(() => GetOnDeckMedia$outboundSchema)).optional(), - guids: z.array(z.lazy(() => GetOnDeckGuids$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - guids: "Guid", - }); - }); + GetOnDeckMetadata$Outbound, + z.ZodTypeDef, + GetOnDeckMetadata +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + parentRatingKey: z.number().optional(), + grandparentRatingKey: z.number().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + grandparentGuid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + grandparentKey: z.string().optional(), + parentKey: z.string().optional(), + librarySectionKey: z.string().optional(), + grandparentTitle: z.string().optional(), + parentTitle: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().optional(), + parentIndex: z.number().optional(), + lastViewedAt: z.number().optional(), + year: z.number().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + grandparentTheme: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.date().transform(v => v.toISOString()).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + media: z.array(z.lazy(() => GetOnDeckMedia$outboundSchema)).optional(), + guids: z.array(z.lazy(() => GetOnDeckGuids$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + guids: "Guid", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckMetadata$ { - /** @deprecated use `GetOnDeckMetadata$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckMetadata$inboundSchema; - /** @deprecated use `GetOnDeckMetadata$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckMetadata$outboundSchema; - /** @deprecated use `GetOnDeckMetadata$Outbound` instead. */ - export type Outbound = GetOnDeckMetadata$Outbound; + /** @deprecated use `GetOnDeckMetadata$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckMetadata$inboundSchema; + /** @deprecated use `GetOnDeckMetadata$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckMetadata$outboundSchema; + /** @deprecated use `GetOnDeckMetadata$Outbound` instead. */ + export type Outbound = GetOnDeckMetadata$Outbound; } /** @internal */ export const GetOnDeckMediaContainer$inboundSchema: z.ZodType< - GetOnDeckMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - mixedParents: z.boolean().optional(), - Metadata: z.array(z.lazy(() => GetOnDeckMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetOnDeckMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetOnDeckMetadata$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetOnDeckMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetOnDeckMediaContainer$outboundSchema: z.ZodType< - GetOnDeckMediaContainer$Outbound, - z.ZodTypeDef, - GetOnDeckMediaContainer -> = z - .object({ - size: z.number().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - mixedParents: z.boolean().optional(), - metadata: z.array(z.lazy(() => GetOnDeckMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetOnDeckMediaContainer$Outbound, + z.ZodTypeDef, + GetOnDeckMediaContainer +> = z.object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetOnDeckMetadata$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckMediaContainer$ { - /** @deprecated use `GetOnDeckMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckMediaContainer$inboundSchema; - /** @deprecated use `GetOnDeckMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckMediaContainer$outboundSchema; - /** @deprecated use `GetOnDeckMediaContainer$Outbound` instead. */ - export type Outbound = GetOnDeckMediaContainer$Outbound; + /** @deprecated use `GetOnDeckMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckMediaContainer$inboundSchema; + /** @deprecated use `GetOnDeckMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckMediaContainer$outboundSchema; + /** @deprecated use `GetOnDeckMediaContainer$Outbound` instead. */ + export type Outbound = GetOnDeckMediaContainer$Outbound; } /** @internal */ export const GetOnDeckResponseBody$inboundSchema: z.ZodType< - GetOnDeckResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetOnDeckMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetOnDeckResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetOnDeckMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetOnDeckResponseBody$Outbound = { - MediaContainer?: GetOnDeckMediaContainer$Outbound | undefined; + MediaContainer?: GetOnDeckMediaContainer$Outbound | undefined; }; /** @internal */ export const GetOnDeckResponseBody$outboundSchema: z.ZodType< - GetOnDeckResponseBody$Outbound, - z.ZodTypeDef, - GetOnDeckResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetOnDeckMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetOnDeckResponseBody$Outbound, + z.ZodTypeDef, + GetOnDeckResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetOnDeckMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckResponseBody$ { - /** @deprecated use `GetOnDeckResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckResponseBody$inboundSchema; - /** @deprecated use `GetOnDeckResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckResponseBody$outboundSchema; - /** @deprecated use `GetOnDeckResponseBody$Outbound` instead. */ - export type Outbound = GetOnDeckResponseBody$Outbound; + /** @deprecated use `GetOnDeckResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckResponseBody$inboundSchema; + /** @deprecated use `GetOnDeckResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckResponseBody$outboundSchema; + /** @deprecated use `GetOnDeckResponseBody$Outbound` instead. */ + export type Outbound = GetOnDeckResponseBody$Outbound; } /** @internal */ -export const GetOnDeckResponse$inboundSchema: z.ZodType = - z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetOnDeckResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); +export const GetOnDeckResponse$inboundSchema: z.ZodType< + GetOnDeckResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetOnDeckResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetOnDeckResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetOnDeckResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetOnDeckResponseBody$Outbound | undefined; }; /** @internal */ export const GetOnDeckResponse$outboundSchema: z.ZodType< - GetOnDeckResponse$Outbound, - z.ZodTypeDef, - GetOnDeckResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetOnDeckResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetOnDeckResponse$Outbound, + z.ZodTypeDef, + GetOnDeckResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetOnDeckResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetOnDeckResponse$ { - /** @deprecated use `GetOnDeckResponse$inboundSchema` instead. */ - export const inboundSchema = GetOnDeckResponse$inboundSchema; - /** @deprecated use `GetOnDeckResponse$outboundSchema` instead. */ - export const outboundSchema = GetOnDeckResponse$outboundSchema; - /** @deprecated use `GetOnDeckResponse$Outbound` instead. */ - export type Outbound = GetOnDeckResponse$Outbound; + /** @deprecated use `GetOnDeckResponse$inboundSchema` instead. */ + export const inboundSchema = GetOnDeckResponse$inboundSchema; + /** @deprecated use `GetOnDeckResponse$outboundSchema` instead. */ + export const outboundSchema = GetOnDeckResponse$outboundSchema; + /** @deprecated use `GetOnDeckResponse$Outbound` instead. */ + export type Outbound = GetOnDeckResponse$Outbound; } diff --git a/src/sdk/models/operations/getpin.ts b/src/sdk/models/operations/getpin.ts index cf16374c..5438763f 100644 --- a/src/sdk/models/operations/getpin.ts +++ b/src/sdk/models/operations/getpin.ts @@ -2,377 +2,371 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetPinServerList = ["https://plex.tv/api/v2/"] as const; +export const GetPinServerList = [ + "https://plex.tv/api/v2/", +] as const; export type GetPinGlobals = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; }; export type GetPinRequest = { - /** - * Determines the kind of code returned by the API call - * - * @remarks - * Strong codes are used for Pin authentication flows - * Non-Strong codes are used for `Plex.tv/link` - * - */ - strong?: boolean | undefined; - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; - xPlexProduct?: string | undefined; + /** + * Determines the kind of code returned by the API call + * + * @remarks + * Strong codes are used for Pin authentication flows + * Non-Strong codes are used for `Plex.tv/link` + */ + strong?: boolean | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; + xPlexProduct?: string | undefined; }; /** * Geo location data */ export type GeoData = { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - code: string; - /** - * The continent code where the country is located. - */ - continentCode: string; - /** - * The official name of the country. - */ - country: string; - /** - * The name of the city. - */ - city: string; - /** - * Indicates if the country is a member of the European Union. - */ - europeanUnionMember?: boolean | undefined; - /** - * The time zone of the country. - */ - timeZone: string; - /** - * The postal code of the location. - */ - postalCode: number; - /** - * Indicates if the country has privacy restrictions. - */ - inPrivacyRestrictedCountry?: boolean | undefined; - /** - * Indicates if the region has privacy restrictions. - */ - inPrivacyRestrictedRegion?: boolean | undefined; - /** - * The name of the primary administrative subdivision. - */ - subdivisions: string; - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - coordinates: string; + /** + * The ISO 3166-1 alpha-2 code of the country. + */ + code: string; + /** + * The continent code where the country is located. + */ + continentCode: string; + /** + * The official name of the country. + */ + country: string; + /** + * The name of the city. + */ + city: string; + /** + * Indicates if the country is a member of the European Union. + */ + europeanUnionMember?: boolean | undefined; + /** + * The time zone of the country. + */ + timeZone: string; + /** + * The postal code of the location. + */ + postalCode: number; + /** + * Indicates if the country has privacy restrictions. + */ + inPrivacyRestrictedCountry?: boolean | undefined; + /** + * Indicates if the region has privacy restrictions. + */ + inPrivacyRestrictedRegion?: boolean | undefined; + /** + * The name of the primary administrative subdivision. + */ + subdivisions: string; + /** + * The geographical coordinates (latitude, longitude) of the location. + */ + coordinates: string; }; /** * Requests a new pin id used in the authentication flow */ export type GetPinAuthPinContainer = { - id: number; - code: string; - product: string; - trusted?: boolean | undefined; - qr: string; - /** - * The X-Client-Identifier used in the request - */ - clientIdentifier: string; - /** - * Geo location data - */ - location: GeoData; - /** - * The number of seconds this pin expires, by default 900 seconds - */ - expiresIn?: number | undefined; - createdAt: Date; - expiresAt: Date; - authToken?: any | null | undefined; - newRegistration?: any | null | undefined; + id: number; + code: string; + product: string; + trusted?: boolean | undefined; + qr: string; + /** + * The X-Client-Identifier used in the request + */ + clientIdentifier: string; + /** + * Geo location data + */ + location: GeoData; + /** + * The number of seconds this pin expires, by default 900 seconds + */ + expiresIn?: number | undefined; + createdAt: Date; + expiresAt: Date; + authToken?: any | null | undefined; + newRegistration?: any | null | undefined; }; export type GetPinResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Requests a new pin id used in the authentication flow - */ - authPinContainer?: GetPinAuthPinContainer | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Requests a new pin id used in the authentication flow + */ + authPinContainer?: GetPinAuthPinContainer | undefined; }; /** @internal */ -export const GetPinGlobals$inboundSchema: z.ZodType = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - }); - }); +export const GetPinGlobals$inboundSchema: z.ZodType< + GetPinGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type GetPinGlobals$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Client-Identifier"?: string | undefined; }; /** @internal */ export const GetPinGlobals$outboundSchema: z.ZodType< - GetPinGlobals$Outbound, - z.ZodTypeDef, - GetPinGlobals -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - }); - }); + GetPinGlobals$Outbound, + z.ZodTypeDef, + GetPinGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPinGlobals$ { - /** @deprecated use `GetPinGlobals$inboundSchema` instead. */ - export const inboundSchema = GetPinGlobals$inboundSchema; - /** @deprecated use `GetPinGlobals$outboundSchema` instead. */ - export const outboundSchema = GetPinGlobals$outboundSchema; - /** @deprecated use `GetPinGlobals$Outbound` instead. */ - export type Outbound = GetPinGlobals$Outbound; + /** @deprecated use `GetPinGlobals$inboundSchema` instead. */ + export const inboundSchema = GetPinGlobals$inboundSchema; + /** @deprecated use `GetPinGlobals$outboundSchema` instead. */ + export const outboundSchema = GetPinGlobals$outboundSchema; + /** @deprecated use `GetPinGlobals$Outbound` instead. */ + export type Outbound = GetPinGlobals$Outbound; } /** @internal */ -export const GetPinRequest$inboundSchema: z.ZodType = z - .object({ - strong: z.boolean().default(false), - "X-Plex-Client-Identifier": z.string().optional(), - "X-Plex-Product": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - "X-Plex-Product": "xPlexProduct", - }); - }); +export const GetPinRequest$inboundSchema: z.ZodType< + GetPinRequest, + z.ZodTypeDef, + unknown +> = z.object({ + strong: z.boolean().default(false), + "X-Plex-Client-Identifier": z.string().optional(), + "X-Plex-Product": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "X-Plex-Product": "xPlexProduct", + }); +}); /** @internal */ export type GetPinRequest$Outbound = { - strong: boolean; - "X-Plex-Client-Identifier"?: string | undefined; - "X-Plex-Product"?: string | undefined; + strong: boolean; + "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Product"?: string | undefined; }; /** @internal */ export const GetPinRequest$outboundSchema: z.ZodType< - GetPinRequest$Outbound, - z.ZodTypeDef, - GetPinRequest -> = z - .object({ - strong: z.boolean().default(false), - xPlexClientIdentifier: z.string().optional(), - xPlexProduct: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - xPlexProduct: "X-Plex-Product", - }); - }); + GetPinRequest$Outbound, + z.ZodTypeDef, + GetPinRequest +> = z.object({ + strong: z.boolean().default(false), + xPlexClientIdentifier: z.string().optional(), + xPlexProduct: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + xPlexProduct: "X-Plex-Product", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPinRequest$ { - /** @deprecated use `GetPinRequest$inboundSchema` instead. */ - export const inboundSchema = GetPinRequest$inboundSchema; - /** @deprecated use `GetPinRequest$outboundSchema` instead. */ - export const outboundSchema = GetPinRequest$outboundSchema; - /** @deprecated use `GetPinRequest$Outbound` instead. */ - export type Outbound = GetPinRequest$Outbound; + /** @deprecated use `GetPinRequest$inboundSchema` instead. */ + export const inboundSchema = GetPinRequest$inboundSchema; + /** @deprecated use `GetPinRequest$outboundSchema` instead. */ + export const outboundSchema = GetPinRequest$outboundSchema; + /** @deprecated use `GetPinRequest$Outbound` instead. */ + export type Outbound = GetPinRequest$Outbound; } /** @internal */ -export const GeoData$inboundSchema: z.ZodType = z - .object({ - code: z.string(), - continent_code: z.string(), - country: z.string(), - city: z.string(), - european_union_member: z.boolean().default(false), - time_zone: z.string(), - postal_code: z.number().int(), - in_privacy_restricted_country: z.boolean().default(false), - in_privacy_restricted_region: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continent_code: "continentCode", - european_union_member: "europeanUnionMember", - time_zone: "timeZone", - postal_code: "postalCode", - in_privacy_restricted_country: "inPrivacyRestrictedCountry", - in_privacy_restricted_region: "inPrivacyRestrictedRegion", - }); +export const GeoData$inboundSchema: z.ZodType = + z.object({ + code: z.string(), + continent_code: z.string(), + country: z.string(), + city: z.string(), + european_union_member: z.boolean().default(false), + time_zone: z.string(), + postal_code: z.number().int(), + in_privacy_restricted_country: z.boolean().default(false), + in_privacy_restricted_region: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), + }).transform((v) => { + return remap$(v, { + "continent_code": "continentCode", + "european_union_member": "europeanUnionMember", + "time_zone": "timeZone", + "postal_code": "postalCode", + "in_privacy_restricted_country": "inPrivacyRestrictedCountry", + "in_privacy_restricted_region": "inPrivacyRestrictedRegion", }); + }); /** @internal */ export type GeoData$Outbound = { - code: string; - continent_code: string; - country: string; - city: string; - european_union_member: boolean; - time_zone: string; - postal_code: number; - in_privacy_restricted_country: boolean; - in_privacy_restricted_region: boolean; - subdivisions: string; - coordinates: string; + code: string; + continent_code: string; + country: string; + city: string; + european_union_member: boolean; + time_zone: string; + postal_code: number; + in_privacy_restricted_country: boolean; + in_privacy_restricted_region: boolean; + subdivisions: string; + coordinates: string; }; /** @internal */ -export const GeoData$outboundSchema: z.ZodType = z - .object({ - code: z.string(), - continentCode: z.string(), - country: z.string(), - city: z.string(), - europeanUnionMember: z.boolean().default(false), - timeZone: z.string(), - postalCode: z.number().int(), - inPrivacyRestrictedCountry: z.boolean().default(false), - inPrivacyRestrictedRegion: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continentCode: "continent_code", - europeanUnionMember: "european_union_member", - timeZone: "time_zone", - postalCode: "postal_code", - inPrivacyRestrictedCountry: "in_privacy_restricted_country", - inPrivacyRestrictedRegion: "in_privacy_restricted_region", - }); - }); +export const GeoData$outboundSchema: z.ZodType< + GeoData$Outbound, + z.ZodTypeDef, + GeoData +> = z.object({ + code: z.string(), + continentCode: z.string(), + country: z.string(), + city: z.string(), + europeanUnionMember: z.boolean().default(false), + timeZone: z.string(), + postalCode: z.number().int(), + inPrivacyRestrictedCountry: z.boolean().default(false), + inPrivacyRestrictedRegion: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), +}).transform((v) => { + return remap$(v, { + continentCode: "continent_code", + europeanUnionMember: "european_union_member", + timeZone: "time_zone", + postalCode: "postal_code", + inPrivacyRestrictedCountry: "in_privacy_restricted_country", + inPrivacyRestrictedRegion: "in_privacy_restricted_region", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GeoData$ { - /** @deprecated use `GeoData$inboundSchema` instead. */ - export const inboundSchema = GeoData$inboundSchema; - /** @deprecated use `GeoData$outboundSchema` instead. */ - export const outboundSchema = GeoData$outboundSchema; - /** @deprecated use `GeoData$Outbound` instead. */ - export type Outbound = GeoData$Outbound; + /** @deprecated use `GeoData$inboundSchema` instead. */ + export const inboundSchema = GeoData$inboundSchema; + /** @deprecated use `GeoData$outboundSchema` instead. */ + export const outboundSchema = GeoData$outboundSchema; + /** @deprecated use `GeoData$Outbound` instead. */ + export type Outbound = GeoData$Outbound; } /** @internal */ export const GetPinAuthPinContainer$inboundSchema: z.ZodType< - GetPinAuthPinContainer, - z.ZodTypeDef, - unknown + GetPinAuthPinContainer, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), - code: z.string(), - product: z.string(), - trusted: z.boolean().default(false), - qr: z.string(), - clientIdentifier: z.string(), - location: z.lazy(() => GeoData$inboundSchema), - expiresIn: z.number().int().default(900), - createdAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - expiresAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - authToken: z.nullable(z.any()).optional(), - newRegistration: z.nullable(z.any()).optional(), + id: z.number().int(), + code: z.string(), + product: z.string(), + trusted: z.boolean().default(false), + qr: z.string(), + clientIdentifier: z.string(), + location: z.lazy(() => GeoData$inboundSchema), + expiresIn: z.number().int().default(900), + createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + expiresAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + authToken: z.nullable(z.any()).optional(), + newRegistration: z.nullable(z.any()).optional(), }); /** @internal */ export type GetPinAuthPinContainer$Outbound = { - id: number; - code: string; - product: string; - trusted: boolean; - qr: string; - clientIdentifier: string; - location: GeoData$Outbound; - expiresIn: number; - createdAt: string; - expiresAt: string; - authToken?: any | null | undefined; - newRegistration?: any | null | undefined; + id: number; + code: string; + product: string; + trusted: boolean; + qr: string; + clientIdentifier: string; + location: GeoData$Outbound; + expiresIn: number; + createdAt: string; + expiresAt: string; + authToken?: any | null | undefined; + newRegistration?: any | null | undefined; }; /** @internal */ export const GetPinAuthPinContainer$outboundSchema: z.ZodType< - GetPinAuthPinContainer$Outbound, - z.ZodTypeDef, - GetPinAuthPinContainer + GetPinAuthPinContainer$Outbound, + z.ZodTypeDef, + GetPinAuthPinContainer > = z.object({ - id: z.number().int(), - code: z.string(), - product: z.string(), - trusted: z.boolean().default(false), - qr: z.string(), - clientIdentifier: z.string(), - location: z.lazy(() => GeoData$outboundSchema), - expiresIn: z.number().int().default(900), - createdAt: z.date().transform((v) => v.toISOString()), - expiresAt: z.date().transform((v) => v.toISOString()), - authToken: z.nullable(z.any()).optional(), - newRegistration: z.nullable(z.any()).optional(), + id: z.number().int(), + code: z.string(), + product: z.string(), + trusted: z.boolean().default(false), + qr: z.string(), + clientIdentifier: z.string(), + location: z.lazy(() => GeoData$outboundSchema), + expiresIn: z.number().int().default(900), + createdAt: z.date().transform(v => v.toISOString()), + expiresAt: z.date().transform(v => v.toISOString()), + authToken: z.nullable(z.any()).optional(), + newRegistration: z.nullable(z.any()).optional(), }); /** @@ -380,71 +374,73 @@ export const GetPinAuthPinContainer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPinAuthPinContainer$ { - /** @deprecated use `GetPinAuthPinContainer$inboundSchema` instead. */ - export const inboundSchema = GetPinAuthPinContainer$inboundSchema; - /** @deprecated use `GetPinAuthPinContainer$outboundSchema` instead. */ - export const outboundSchema = GetPinAuthPinContainer$outboundSchema; - /** @deprecated use `GetPinAuthPinContainer$Outbound` instead. */ - export type Outbound = GetPinAuthPinContainer$Outbound; + /** @deprecated use `GetPinAuthPinContainer$inboundSchema` instead. */ + export const inboundSchema = GetPinAuthPinContainer$inboundSchema; + /** @deprecated use `GetPinAuthPinContainer$outboundSchema` instead. */ + export const outboundSchema = GetPinAuthPinContainer$outboundSchema; + /** @deprecated use `GetPinAuthPinContainer$Outbound` instead. */ + export type Outbound = GetPinAuthPinContainer$Outbound; } /** @internal */ -export const GetPinResponse$inboundSchema: z.ZodType = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - AuthPinContainer: z.lazy(() => GetPinAuthPinContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - AuthPinContainer: "authPinContainer", - }); - }); +export const GetPinResponse$inboundSchema: z.ZodType< + GetPinResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + AuthPinContainer: z.lazy(() => GetPinAuthPinContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "AuthPinContainer": "authPinContainer", + }); +}); /** @internal */ export type GetPinResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - AuthPinContainer?: GetPinAuthPinContainer$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + AuthPinContainer?: GetPinAuthPinContainer$Outbound | undefined; }; /** @internal */ export const GetPinResponse$outboundSchema: z.ZodType< - GetPinResponse$Outbound, - z.ZodTypeDef, - GetPinResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - authPinContainer: z.lazy(() => GetPinAuthPinContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - authPinContainer: "AuthPinContainer", - }); - }); + GetPinResponse$Outbound, + z.ZodTypeDef, + GetPinResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + authPinContainer: z.lazy(() => GetPinAuthPinContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + authPinContainer: "AuthPinContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPinResponse$ { - /** @deprecated use `GetPinResponse$inboundSchema` instead. */ - export const inboundSchema = GetPinResponse$inboundSchema; - /** @deprecated use `GetPinResponse$outboundSchema` instead. */ - export const outboundSchema = GetPinResponse$outboundSchema; - /** @deprecated use `GetPinResponse$Outbound` instead. */ - export type Outbound = GetPinResponse$Outbound; + /** @deprecated use `GetPinResponse$inboundSchema` instead. */ + export const inboundSchema = GetPinResponse$inboundSchema; + /** @deprecated use `GetPinResponse$outboundSchema` instead. */ + export const outboundSchema = GetPinResponse$outboundSchema; + /** @deprecated use `GetPinResponse$Outbound` instead. */ + export type Outbound = GetPinResponse$Outbound; } diff --git a/src/sdk/models/operations/getplaylist.ts b/src/sdk/models/operations/getplaylist.ts index af099fa4..c2898873 100644 --- a/src/sdk/models/operations/getplaylist.ts +++ b/src/sdk/models/operations/getplaylist.ts @@ -2,86 +2,86 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetPlaylistRequest = { - /** - * the ID of the playlist - */ - playlistID: number; + /** + * the ID of the playlist + */ + playlistID: number; }; export type GetPlaylistMetadata = { - content?: string | undefined; - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + content?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; export type GetPlaylistMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; /** * The playlist */ export type GetPlaylistResponseBody = { - mediaContainer?: GetPlaylistMediaContainer | undefined; + mediaContainer?: GetPlaylistMediaContainer | undefined; }; export type GetPlaylistResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The playlist - */ - object?: GetPlaylistResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The playlist + */ + object?: GetPlaylistResponseBody | undefined; }; /** @internal */ export const GetPlaylistRequest$inboundSchema: z.ZodType< - GetPlaylistRequest, - z.ZodTypeDef, - unknown + GetPlaylistRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @internal */ export type GetPlaylistRequest$Outbound = { - playlistID: number; + playlistID: number; }; /** @internal */ export const GetPlaylistRequest$outboundSchema: z.ZodType< - GetPlaylistRequest$Outbound, - z.ZodTypeDef, - GetPlaylistRequest + GetPlaylistRequest$Outbound, + z.ZodTypeDef, + GetPlaylistRequest > = z.object({ - playlistID: z.number(), + playlistID: z.number(), }); /** @@ -89,77 +89,77 @@ export const GetPlaylistRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistRequest$ { - /** @deprecated use `GetPlaylistRequest$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistRequest$inboundSchema; - /** @deprecated use `GetPlaylistRequest$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistRequest$outboundSchema; - /** @deprecated use `GetPlaylistRequest$Outbound` instead. */ - export type Outbound = GetPlaylistRequest$Outbound; + /** @deprecated use `GetPlaylistRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistRequest$inboundSchema; + /** @deprecated use `GetPlaylistRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistRequest$outboundSchema; + /** @deprecated use `GetPlaylistRequest$Outbound` instead. */ + export type Outbound = GetPlaylistRequest$Outbound; } /** @internal */ export const GetPlaylistMetadata$inboundSchema: z.ZodType< - GetPlaylistMetadata, - z.ZodTypeDef, - unknown + GetPlaylistMetadata, + z.ZodTypeDef, + unknown > = z.object({ - content: z.string().optional(), - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + content: z.string().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @internal */ export type GetPlaylistMetadata$Outbound = { - content?: string | undefined; - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + content?: string | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; /** @internal */ export const GetPlaylistMetadata$outboundSchema: z.ZodType< - GetPlaylistMetadata$Outbound, - z.ZodTypeDef, - GetPlaylistMetadata + GetPlaylistMetadata$Outbound, + z.ZodTypeDef, + GetPlaylistMetadata > = z.object({ - content: z.string().optional(), - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + content: z.string().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @@ -167,172 +167,163 @@ export const GetPlaylistMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistMetadata$ { - /** @deprecated use `GetPlaylistMetadata$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistMetadata$inboundSchema; - /** @deprecated use `GetPlaylistMetadata$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistMetadata$outboundSchema; - /** @deprecated use `GetPlaylistMetadata$Outbound` instead. */ - export type Outbound = GetPlaylistMetadata$Outbound; + /** @deprecated use `GetPlaylistMetadata$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistMetadata$inboundSchema; + /** @deprecated use `GetPlaylistMetadata$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistMetadata$outboundSchema; + /** @deprecated use `GetPlaylistMetadata$Outbound` instead. */ + export type Outbound = GetPlaylistMetadata$Outbound; } /** @internal */ export const GetPlaylistMediaContainer$inboundSchema: z.ZodType< - GetPlaylistMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetPlaylistMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetPlaylistMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetPlaylistMetadata$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetPlaylistMediaContainer$Outbound = { - size?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetPlaylistMediaContainer$outboundSchema: z.ZodType< - GetPlaylistMediaContainer$Outbound, - z.ZodTypeDef, - GetPlaylistMediaContainer -> = z - .object({ - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetPlaylistMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetPlaylistMediaContainer$Outbound, + z.ZodTypeDef, + GetPlaylistMediaContainer +> = z.object({ + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetPlaylistMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistMediaContainer$ { - /** @deprecated use `GetPlaylistMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistMediaContainer$inboundSchema; - /** @deprecated use `GetPlaylistMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistMediaContainer$outboundSchema; - /** @deprecated use `GetPlaylistMediaContainer$Outbound` instead. */ - export type Outbound = GetPlaylistMediaContainer$Outbound; + /** @deprecated use `GetPlaylistMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistMediaContainer$inboundSchema; + /** @deprecated use `GetPlaylistMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistMediaContainer$outboundSchema; + /** @deprecated use `GetPlaylistMediaContainer$Outbound` instead. */ + export type Outbound = GetPlaylistMediaContainer$Outbound; } /** @internal */ export const GetPlaylistResponseBody$inboundSchema: z.ZodType< - GetPlaylistResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetPlaylistMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetPlaylistResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetPlaylistMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetPlaylistResponseBody$Outbound = { - MediaContainer?: GetPlaylistMediaContainer$Outbound | undefined; + MediaContainer?: GetPlaylistMediaContainer$Outbound | undefined; }; /** @internal */ export const GetPlaylistResponseBody$outboundSchema: z.ZodType< - GetPlaylistResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetPlaylistMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetPlaylistResponseBody$Outbound, + z.ZodTypeDef, + GetPlaylistResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetPlaylistMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistResponseBody$ { - /** @deprecated use `GetPlaylistResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistResponseBody$Outbound; + /** @deprecated use `GetPlaylistResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistResponseBody$inboundSchema; + /** @deprecated use `GetPlaylistResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistResponseBody$outboundSchema; + /** @deprecated use `GetPlaylistResponseBody$Outbound` instead. */ + export type Outbound = GetPlaylistResponseBody$Outbound; } /** @internal */ export const GetPlaylistResponse$inboundSchema: z.ZodType< - GetPlaylistResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetPlaylistResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetPlaylistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetPlaylistResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetPlaylistResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetPlaylistResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetPlaylistResponseBody$Outbound | undefined; }; /** @internal */ export const GetPlaylistResponse$outboundSchema: z.ZodType< - GetPlaylistResponse$Outbound, - z.ZodTypeDef, - GetPlaylistResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetPlaylistResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetPlaylistResponse$Outbound, + z.ZodTypeDef, + GetPlaylistResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetPlaylistResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistResponse$ { - /** @deprecated use `GetPlaylistResponse$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistResponse$inboundSchema; - /** @deprecated use `GetPlaylistResponse$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistResponse$outboundSchema; - /** @deprecated use `GetPlaylistResponse$Outbound` instead. */ - export type Outbound = GetPlaylistResponse$Outbound; + /** @deprecated use `GetPlaylistResponse$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistResponse$inboundSchema; + /** @deprecated use `GetPlaylistResponse$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistResponse$outboundSchema; + /** @deprecated use `GetPlaylistResponse$Outbound` instead. */ + export type Outbound = GetPlaylistResponse$Outbound; } diff --git a/src/sdk/models/operations/getplaylistcontents.ts b/src/sdk/models/operations/getplaylistcontents.ts index 35ee317b..4da301c8 100644 --- a/src/sdk/models/operations/getplaylistcontents.ts +++ b/src/sdk/models/operations/getplaylistcontents.ts @@ -2,9 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; /** * The type of media to retrieve. @@ -15,168 +15,166 @@ import * as z from "zod"; * 3 = season * 4 = episode * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * */ export enum GetPlaylistContentsQueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + One = 1, + Two = 2, + Three = 3, + Four = 4, } export type GetPlaylistContentsRequest = { - /** - * the ID of the playlist - */ - playlistID: number; - /** - * The type of media to retrieve. - * - * @remarks - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - */ - type: GetPlaylistContentsQueryParamType; + /** + * the ID of the playlist + */ + playlistID: number; + /** + * The type of media to retrieve. + * + * @remarks + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + */ + type: GetPlaylistContentsQueryParamType; }; export type GetPlaylistContentsPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; export type GetPlaylistContentsMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetPlaylistContentsGenre = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetPlaylistContentsCountry = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetPlaylistContentsDirector = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetPlaylistContentsWriter = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetPlaylistContentsRole = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetPlaylistContentsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumExtras?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - country?: Array | undefined; - director?: Array | undefined; - writer?: Array | undefined; - role?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + country?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + role?: Array | undefined; }; export type GetPlaylistContentsMediaContainer = { - size?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - playlistType?: string | undefined; - ratingKey?: string | undefined; - smart?: boolean | undefined; - title?: string | undefined; - metadata?: Array | undefined; + size?: number | undefined; + composite?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + playlistType?: string | undefined; + ratingKey?: string | undefined; + smart?: boolean | undefined; + title?: string | undefined; + metadata?: Array | undefined; }; /** * The playlist contents */ export type GetPlaylistContentsResponseBody = { - mediaContainer?: GetPlaylistContentsMediaContainer | undefined; + mediaContainer?: GetPlaylistContentsMediaContainer | undefined; }; export type GetPlaylistContentsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The playlist contents - */ - object?: GetPlaylistContentsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The playlist contents + */ + object?: GetPlaylistContentsResponseBody | undefined; }; /** @internal */ export const GetPlaylistContentsQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetPlaylistContentsQueryParamType + typeof GetPlaylistContentsQueryParamType > = z.nativeEnum(GetPlaylistContentsQueryParamType); /** @internal */ export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetPlaylistContentsQueryParamType + typeof GetPlaylistContentsQueryParamType > = GetPlaylistContentsQueryParamType$inboundSchema; /** @@ -184,36 +182,37 @@ export const GetPlaylistContentsQueryParamType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsQueryParamType$ { - /** @deprecated use `GetPlaylistContentsQueryParamType$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsQueryParamType$inboundSchema; - /** @deprecated use `GetPlaylistContentsQueryParamType$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsQueryParamType$outboundSchema; + /** @deprecated use `GetPlaylistContentsQueryParamType$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsQueryParamType$inboundSchema; + /** @deprecated use `GetPlaylistContentsQueryParamType$outboundSchema` instead. */ + export const outboundSchema = + GetPlaylistContentsQueryParamType$outboundSchema; } /** @internal */ export const GetPlaylistContentsRequest$inboundSchema: z.ZodType< - GetPlaylistContentsRequest, - z.ZodTypeDef, - unknown + GetPlaylistContentsRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), - type: GetPlaylistContentsQueryParamType$inboundSchema, + playlistID: z.number(), + type: GetPlaylistContentsQueryParamType$inboundSchema, }); /** @internal */ export type GetPlaylistContentsRequest$Outbound = { - playlistID: number; - type: number; + playlistID: number; + type: number; }; /** @internal */ export const GetPlaylistContentsRequest$outboundSchema: z.ZodType< - GetPlaylistContentsRequest$Outbound, - z.ZodTypeDef, - GetPlaylistContentsRequest + GetPlaylistContentsRequest$Outbound, + z.ZodTypeDef, + GetPlaylistContentsRequest > = z.object({ - playlistID: z.number(), - type: GetPlaylistContentsQueryParamType$outboundSchema, + playlistID: z.number(), + type: GetPlaylistContentsQueryParamType$outboundSchema, }); /** @@ -221,62 +220,62 @@ export const GetPlaylistContentsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsRequest$ { - /** @deprecated use `GetPlaylistContentsRequest$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsRequest$inboundSchema; - /** @deprecated use `GetPlaylistContentsRequest$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsRequest$outboundSchema; - /** @deprecated use `GetPlaylistContentsRequest$Outbound` instead. */ - export type Outbound = GetPlaylistContentsRequest$Outbound; + /** @deprecated use `GetPlaylistContentsRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsRequest$inboundSchema; + /** @deprecated use `GetPlaylistContentsRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsRequest$outboundSchema; + /** @deprecated use `GetPlaylistContentsRequest$Outbound` instead. */ + export type Outbound = GetPlaylistContentsRequest$Outbound; } /** @internal */ export const GetPlaylistContentsPart$inboundSchema: z.ZodType< - GetPlaylistContentsPart, - z.ZodTypeDef, - unknown + GetPlaylistContentsPart, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; /** @internal */ export const GetPlaylistContentsPart$outboundSchema: z.ZodType< - GetPlaylistContentsPart$Outbound, - z.ZodTypeDef, - GetPlaylistContentsPart + GetPlaylistContentsPart$Outbound, + z.ZodTypeDef, + GetPlaylistContentsPart > = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - size: z.number().int().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - optimizedForStreaming: z.boolean().optional(), - videoProfile: z.string().optional(), + id: z.number().int().optional(), + key: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + size: z.number().int().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + optimizedForStreaming: z.boolean().optional(), + videoProfile: z.string().optional(), }); /** @@ -284,131 +283,128 @@ export const GetPlaylistContentsPart$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsPart$ { - /** @deprecated use `GetPlaylistContentsPart$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsPart$inboundSchema; - /** @deprecated use `GetPlaylistContentsPart$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsPart$outboundSchema; - /** @deprecated use `GetPlaylistContentsPart$Outbound` instead. */ - export type Outbound = GetPlaylistContentsPart$Outbound; + /** @deprecated use `GetPlaylistContentsPart$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsPart$inboundSchema; + /** @deprecated use `GetPlaylistContentsPart$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsPart$outboundSchema; + /** @deprecated use `GetPlaylistContentsPart$Outbound` instead. */ + export type Outbound = GetPlaylistContentsPart$Outbound; } /** @internal */ export const GetPlaylistContentsMedia$inboundSchema: z.ZodType< - GetPlaylistContentsMedia, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetPlaylistContentsPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); + GetPlaylistContentsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetPlaylistContentsPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetPlaylistContentsMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: string | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - audioProfile?: string | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: string | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + audioProfile?: string | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetPlaylistContentsMedia$outboundSchema: z.ZodType< - GetPlaylistContentsMedia$Outbound, - z.ZodTypeDef, - GetPlaylistContentsMedia -> = z - .object({ - id: z.number().int().optional(), - duration: z.number().int().optional(), - bitrate: z.number().int().optional(), - width: z.number().int().optional(), - height: z.number().int().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.string().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().int().optional(), - audioProfile: z.string().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetPlaylistContentsPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetPlaylistContentsMedia$Outbound, + z.ZodTypeDef, + GetPlaylistContentsMedia +> = z.object({ + id: z.number().int().optional(), + duration: z.number().int().optional(), + bitrate: z.number().int().optional(), + width: z.number().int().optional(), + height: z.number().int().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.string().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().int().optional(), + audioProfile: z.string().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetPlaylistContentsPart$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsMedia$ { - /** @deprecated use `GetPlaylistContentsMedia$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsMedia$inboundSchema; - /** @deprecated use `GetPlaylistContentsMedia$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsMedia$outboundSchema; - /** @deprecated use `GetPlaylistContentsMedia$Outbound` instead. */ - export type Outbound = GetPlaylistContentsMedia$Outbound; + /** @deprecated use `GetPlaylistContentsMedia$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsMedia$inboundSchema; + /** @deprecated use `GetPlaylistContentsMedia$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsMedia$outboundSchema; + /** @deprecated use `GetPlaylistContentsMedia$Outbound` instead. */ + export type Outbound = GetPlaylistContentsMedia$Outbound; } /** @internal */ export const GetPlaylistContentsGenre$inboundSchema: z.ZodType< - GetPlaylistContentsGenre, - z.ZodTypeDef, - unknown + GetPlaylistContentsGenre, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsGenre$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetPlaylistContentsGenre$outboundSchema: z.ZodType< - GetPlaylistContentsGenre$Outbound, - z.ZodTypeDef, - GetPlaylistContentsGenre + GetPlaylistContentsGenre$Outbound, + z.ZodTypeDef, + GetPlaylistContentsGenre > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -416,35 +412,35 @@ export const GetPlaylistContentsGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsGenre$ { - /** @deprecated use `GetPlaylistContentsGenre$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsGenre$inboundSchema; - /** @deprecated use `GetPlaylistContentsGenre$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsGenre$outboundSchema; - /** @deprecated use `GetPlaylistContentsGenre$Outbound` instead. */ - export type Outbound = GetPlaylistContentsGenre$Outbound; + /** @deprecated use `GetPlaylistContentsGenre$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsGenre$inboundSchema; + /** @deprecated use `GetPlaylistContentsGenre$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsGenre$outboundSchema; + /** @deprecated use `GetPlaylistContentsGenre$Outbound` instead. */ + export type Outbound = GetPlaylistContentsGenre$Outbound; } /** @internal */ export const GetPlaylistContentsCountry$inboundSchema: z.ZodType< - GetPlaylistContentsCountry, - z.ZodTypeDef, - unknown + GetPlaylistContentsCountry, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsCountry$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetPlaylistContentsCountry$outboundSchema: z.ZodType< - GetPlaylistContentsCountry$Outbound, - z.ZodTypeDef, - GetPlaylistContentsCountry + GetPlaylistContentsCountry$Outbound, + z.ZodTypeDef, + GetPlaylistContentsCountry > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -452,35 +448,35 @@ export const GetPlaylistContentsCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsCountry$ { - /** @deprecated use `GetPlaylistContentsCountry$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsCountry$inboundSchema; - /** @deprecated use `GetPlaylistContentsCountry$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsCountry$outboundSchema; - /** @deprecated use `GetPlaylistContentsCountry$Outbound` instead. */ - export type Outbound = GetPlaylistContentsCountry$Outbound; + /** @deprecated use `GetPlaylistContentsCountry$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsCountry$inboundSchema; + /** @deprecated use `GetPlaylistContentsCountry$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsCountry$outboundSchema; + /** @deprecated use `GetPlaylistContentsCountry$Outbound` instead. */ + export type Outbound = GetPlaylistContentsCountry$Outbound; } /** @internal */ export const GetPlaylistContentsDirector$inboundSchema: z.ZodType< - GetPlaylistContentsDirector, - z.ZodTypeDef, - unknown + GetPlaylistContentsDirector, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsDirector$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetPlaylistContentsDirector$outboundSchema: z.ZodType< - GetPlaylistContentsDirector$Outbound, - z.ZodTypeDef, - GetPlaylistContentsDirector + GetPlaylistContentsDirector$Outbound, + z.ZodTypeDef, + GetPlaylistContentsDirector > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -488,35 +484,35 @@ export const GetPlaylistContentsDirector$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsDirector$ { - /** @deprecated use `GetPlaylistContentsDirector$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsDirector$inboundSchema; - /** @deprecated use `GetPlaylistContentsDirector$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsDirector$outboundSchema; - /** @deprecated use `GetPlaylistContentsDirector$Outbound` instead. */ - export type Outbound = GetPlaylistContentsDirector$Outbound; + /** @deprecated use `GetPlaylistContentsDirector$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsDirector$inboundSchema; + /** @deprecated use `GetPlaylistContentsDirector$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsDirector$outboundSchema; + /** @deprecated use `GetPlaylistContentsDirector$Outbound` instead. */ + export type Outbound = GetPlaylistContentsDirector$Outbound; } /** @internal */ export const GetPlaylistContentsWriter$inboundSchema: z.ZodType< - GetPlaylistContentsWriter, - z.ZodTypeDef, - unknown + GetPlaylistContentsWriter, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsWriter$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetPlaylistContentsWriter$outboundSchema: z.ZodType< - GetPlaylistContentsWriter$Outbound, - z.ZodTypeDef, - GetPlaylistContentsWriter + GetPlaylistContentsWriter$Outbound, + z.ZodTypeDef, + GetPlaylistContentsWriter > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -524,35 +520,35 @@ export const GetPlaylistContentsWriter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsWriter$ { - /** @deprecated use `GetPlaylistContentsWriter$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsWriter$inboundSchema; - /** @deprecated use `GetPlaylistContentsWriter$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsWriter$outboundSchema; - /** @deprecated use `GetPlaylistContentsWriter$Outbound` instead. */ - export type Outbound = GetPlaylistContentsWriter$Outbound; + /** @deprecated use `GetPlaylistContentsWriter$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsWriter$inboundSchema; + /** @deprecated use `GetPlaylistContentsWriter$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsWriter$outboundSchema; + /** @deprecated use `GetPlaylistContentsWriter$Outbound` instead. */ + export type Outbound = GetPlaylistContentsWriter$Outbound; } /** @internal */ export const GetPlaylistContentsRole$inboundSchema: z.ZodType< - GetPlaylistContentsRole, - z.ZodTypeDef, - unknown + GetPlaylistContentsRole, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetPlaylistContentsRole$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetPlaylistContentsRole$outboundSchema: z.ZodType< - GetPlaylistContentsRole$Outbound, - z.ZodTypeDef, - GetPlaylistContentsRole + GetPlaylistContentsRole$Outbound, + z.ZodTypeDef, + GetPlaylistContentsRole > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -560,350 +556,347 @@ export const GetPlaylistContentsRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsRole$ { - /** @deprecated use `GetPlaylistContentsRole$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsRole$inboundSchema; - /** @deprecated use `GetPlaylistContentsRole$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsRole$outboundSchema; - /** @deprecated use `GetPlaylistContentsRole$Outbound` instead. */ - export type Outbound = GetPlaylistContentsRole$Outbound; + /** @deprecated use `GetPlaylistContentsRole$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsRole$inboundSchema; + /** @deprecated use `GetPlaylistContentsRole$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsRole$outboundSchema; + /** @deprecated use `GetPlaylistContentsRole$Outbound` instead. */ + export type Outbound = GetPlaylistContentsRole$Outbound; } /** @internal */ export const GetPlaylistContentsMetadata$inboundSchema: z.ZodType< - GetPlaylistContentsMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - hasPremiumExtras: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - ratingImage: z.string().optional(), - Media: z.array(z.lazy(() => GetPlaylistContentsMedia$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => GetPlaylistContentsGenre$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetPlaylistContentsCountry$inboundSchema)).optional(), - Director: z.array(z.lazy(() => GetPlaylistContentsDirector$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => GetPlaylistContentsWriter$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetPlaylistContentsRole$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Country: "country", - Director: "director", - Writer: "writer", - Role: "role", - }); - }); + GetPlaylistContentsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => GetPlaylistContentsMedia$inboundSchema)) + .optional(), + Genre: z.array(z.lazy(() => GetPlaylistContentsGenre$inboundSchema)) + .optional(), + Country: z.array(z.lazy(() => GetPlaylistContentsCountry$inboundSchema)) + .optional(), + Director: z.array(z.lazy(() => GetPlaylistContentsDirector$inboundSchema)) + .optional(), + Writer: z.array(z.lazy(() => GetPlaylistContentsWriter$inboundSchema)) + .optional(), + Role: z.array(z.lazy(() => GetPlaylistContentsRole$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Country": "country", + "Director": "director", + "Writer": "writer", + "Role": "role", + }); +}); /** @internal */ export type GetPlaylistContentsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - hasPremiumExtras?: string | undefined; - hasPremiumPrimaryExtra?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Role?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + hasPremiumExtras?: string | undefined; + hasPremiumPrimaryExtra?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Role?: Array | undefined; }; /** @internal */ export const GetPlaylistContentsMetadata$outboundSchema: z.ZodType< - GetPlaylistContentsMetadata$Outbound, - z.ZodTypeDef, - GetPlaylistContentsMetadata -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - hasPremiumExtras: z.string().optional(), - hasPremiumPrimaryExtra: z.string().optional(), - ratingImage: z.string().optional(), - media: z.array(z.lazy(() => GetPlaylistContentsMedia$outboundSchema)).optional(), - genre: z.array(z.lazy(() => GetPlaylistContentsGenre$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetPlaylistContentsCountry$outboundSchema)).optional(), - director: z.array(z.lazy(() => GetPlaylistContentsDirector$outboundSchema)).optional(), - writer: z.array(z.lazy(() => GetPlaylistContentsWriter$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetPlaylistContentsRole$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - country: "Country", - director: "Director", - writer: "Writer", - role: "Role", - }); - }); + GetPlaylistContentsMetadata$Outbound, + z.ZodTypeDef, + GetPlaylistContentsMetadata +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + hasPremiumExtras: z.string().optional(), + hasPremiumPrimaryExtra: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => GetPlaylistContentsMedia$outboundSchema)) + .optional(), + genre: z.array(z.lazy(() => GetPlaylistContentsGenre$outboundSchema)) + .optional(), + country: z.array(z.lazy(() => GetPlaylistContentsCountry$outboundSchema)) + .optional(), + director: z.array(z.lazy(() => GetPlaylistContentsDirector$outboundSchema)) + .optional(), + writer: z.array(z.lazy(() => GetPlaylistContentsWriter$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetPlaylistContentsRole$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + country: "Country", + director: "Director", + writer: "Writer", + role: "Role", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsMetadata$ { - /** @deprecated use `GetPlaylistContentsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsMetadata$inboundSchema; - /** @deprecated use `GetPlaylistContentsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsMetadata$outboundSchema; - /** @deprecated use `GetPlaylistContentsMetadata$Outbound` instead. */ - export type Outbound = GetPlaylistContentsMetadata$Outbound; + /** @deprecated use `GetPlaylistContentsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsMetadata$inboundSchema; + /** @deprecated use `GetPlaylistContentsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsMetadata$outboundSchema; + /** @deprecated use `GetPlaylistContentsMetadata$Outbound` instead. */ + export type Outbound = GetPlaylistContentsMetadata$Outbound; } /** @internal */ export const GetPlaylistContentsMediaContainer$inboundSchema: z.ZodType< - GetPlaylistContentsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - playlistType: z.string().optional(), - ratingKey: z.string().optional(), - smart: z.boolean().optional(), - title: z.string().optional(), - Metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetPlaylistContentsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + playlistType: z.string().optional(), + ratingKey: z.string().optional(), + smart: z.boolean().optional(), + title: z.string().optional(), + Metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetPlaylistContentsMediaContainer$Outbound = { - size?: number | undefined; - composite?: string | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - playlistType?: string | undefined; - ratingKey?: string | undefined; - smart?: boolean | undefined; - title?: string | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + composite?: string | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + playlistType?: string | undefined; + ratingKey?: string | undefined; + smart?: boolean | undefined; + title?: string | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetPlaylistContentsMediaContainer$outboundSchema: z.ZodType< - GetPlaylistContentsMediaContainer$Outbound, - z.ZodTypeDef, - GetPlaylistContentsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - composite: z.string().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - playlistType: z.string().optional(), - ratingKey: z.string().optional(), - smart: z.boolean().optional(), - title: z.string().optional(), - metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetPlaylistContentsMediaContainer$Outbound, + z.ZodTypeDef, + GetPlaylistContentsMediaContainer +> = z.object({ + size: z.number().int().optional(), + composite: z.string().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + playlistType: z.string().optional(), + ratingKey: z.string().optional(), + smart: z.boolean().optional(), + title: z.string().optional(), + metadata: z.array(z.lazy(() => GetPlaylistContentsMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsMediaContainer$ { - /** @deprecated use `GetPlaylistContentsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsMediaContainer$inboundSchema; - /** @deprecated use `GetPlaylistContentsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsMediaContainer$outboundSchema; - /** @deprecated use `GetPlaylistContentsMediaContainer$Outbound` instead. */ - export type Outbound = GetPlaylistContentsMediaContainer$Outbound; + /** @deprecated use `GetPlaylistContentsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsMediaContainer$inboundSchema; + /** @deprecated use `GetPlaylistContentsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetPlaylistContentsMediaContainer$outboundSchema; + /** @deprecated use `GetPlaylistContentsMediaContainer$Outbound` instead. */ + export type Outbound = GetPlaylistContentsMediaContainer$Outbound; } /** @internal */ export const GetPlaylistContentsResponseBody$inboundSchema: z.ZodType< - GetPlaylistContentsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetPlaylistContentsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetPlaylistContentsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetPlaylistContentsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetPlaylistContentsResponseBody$Outbound = { - MediaContainer?: GetPlaylistContentsMediaContainer$Outbound | undefined; + MediaContainer?: GetPlaylistContentsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetPlaylistContentsResponseBody$outboundSchema: z.ZodType< - GetPlaylistContentsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistContentsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetPlaylistContentsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetPlaylistContentsResponseBody$Outbound, + z.ZodTypeDef, + GetPlaylistContentsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetPlaylistContentsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsResponseBody$ { - /** @deprecated use `GetPlaylistContentsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistContentsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistContentsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistContentsResponseBody$Outbound; + /** @deprecated use `GetPlaylistContentsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsResponseBody$inboundSchema; + /** @deprecated use `GetPlaylistContentsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsResponseBody$outboundSchema; + /** @deprecated use `GetPlaylistContentsResponseBody$Outbound` instead. */ + export type Outbound = GetPlaylistContentsResponseBody$Outbound; } /** @internal */ export const GetPlaylistContentsResponse$inboundSchema: z.ZodType< - GetPlaylistContentsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetPlaylistContentsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetPlaylistContentsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetPlaylistContentsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetPlaylistContentsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetPlaylistContentsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetPlaylistContentsResponseBody$Outbound | undefined; }; /** @internal */ export const GetPlaylistContentsResponse$outboundSchema: z.ZodType< - GetPlaylistContentsResponse$Outbound, - z.ZodTypeDef, - GetPlaylistContentsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetPlaylistContentsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetPlaylistContentsResponse$Outbound, + z.ZodTypeDef, + GetPlaylistContentsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetPlaylistContentsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistContentsResponse$ { - /** @deprecated use `GetPlaylistContentsResponse$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistContentsResponse$inboundSchema; - /** @deprecated use `GetPlaylistContentsResponse$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistContentsResponse$outboundSchema; - /** @deprecated use `GetPlaylistContentsResponse$Outbound` instead. */ - export type Outbound = GetPlaylistContentsResponse$Outbound; + /** @deprecated use `GetPlaylistContentsResponse$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistContentsResponse$inboundSchema; + /** @deprecated use `GetPlaylistContentsResponse$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistContentsResponse$outboundSchema; + /** @deprecated use `GetPlaylistContentsResponse$Outbound` instead. */ + export type Outbound = GetPlaylistContentsResponse$Outbound; } diff --git a/src/sdk/models/operations/getplaylists.ts b/src/sdk/models/operations/getplaylists.ts index c1e7fa92..dc12a76e 100644 --- a/src/sdk/models/operations/getplaylists.ts +++ b/src/sdk/models/operations/getplaylists.ts @@ -2,149 +2,151 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * limit to a type of playlist. */ export enum PlaylistType { - Audio = "audio", - Video = "video", - Photo = "photo", + Audio = "audio", + Video = "video", + Photo = "photo", } /** * type of playlists to return (default is all). */ export enum QueryParamSmart { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetPlaylistsRequest = { - /** - * limit to a type of playlist. - */ - playlistType?: PlaylistType | undefined; - /** - * type of playlists to return (default is all). - */ - smart?: QueryParamSmart | undefined; + /** + * limit to a type of playlist. + */ + playlistType?: PlaylistType | undefined; + /** + * type of playlists to return (default is all). + */ + smart?: QueryParamSmart | undefined; }; export type GetPlaylistsMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; export type GetPlaylistsMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; /** * returns all playlists */ export type GetPlaylistsResponseBody = { - mediaContainer?: GetPlaylistsMediaContainer | undefined; + mediaContainer?: GetPlaylistsMediaContainer | undefined; }; export type GetPlaylistsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * returns all playlists - */ - object?: GetPlaylistsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * returns all playlists + */ + object?: GetPlaylistsResponseBody | undefined; }; /** @internal */ export const PlaylistType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PlaylistType); + z.nativeEnum(PlaylistType); /** @internal */ export const PlaylistType$outboundSchema: z.ZodNativeEnum = - PlaylistType$inboundSchema; + PlaylistType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PlaylistType$ { - /** @deprecated use `PlaylistType$inboundSchema` instead. */ - export const inboundSchema = PlaylistType$inboundSchema; - /** @deprecated use `PlaylistType$outboundSchema` instead. */ - export const outboundSchema = PlaylistType$outboundSchema; + /** @deprecated use `PlaylistType$inboundSchema` instead. */ + export const inboundSchema = PlaylistType$inboundSchema; + /** @deprecated use `PlaylistType$outboundSchema` instead. */ + export const outboundSchema = PlaylistType$outboundSchema; } /** @internal */ -export const QueryParamSmart$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamSmart); +export const QueryParamSmart$inboundSchema: z.ZodNativeEnum< + typeof QueryParamSmart +> = z.nativeEnum(QueryParamSmart); /** @internal */ -export const QueryParamSmart$outboundSchema: z.ZodNativeEnum = - QueryParamSmart$inboundSchema; +export const QueryParamSmart$outboundSchema: z.ZodNativeEnum< + typeof QueryParamSmart +> = QueryParamSmart$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamSmart$ { - /** @deprecated use `QueryParamSmart$inboundSchema` instead. */ - export const inboundSchema = QueryParamSmart$inboundSchema; - /** @deprecated use `QueryParamSmart$outboundSchema` instead. */ - export const outboundSchema = QueryParamSmart$outboundSchema; + /** @deprecated use `QueryParamSmart$inboundSchema` instead. */ + export const inboundSchema = QueryParamSmart$inboundSchema; + /** @deprecated use `QueryParamSmart$outboundSchema` instead. */ + export const outboundSchema = QueryParamSmart$outboundSchema; } /** @internal */ export const GetPlaylistsRequest$inboundSchema: z.ZodType< - GetPlaylistsRequest, - z.ZodTypeDef, - unknown + GetPlaylistsRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistType: PlaylistType$inboundSchema.optional(), - smart: QueryParamSmart$inboundSchema.optional(), + playlistType: PlaylistType$inboundSchema.optional(), + smart: QueryParamSmart$inboundSchema.optional(), }); /** @internal */ export type GetPlaylistsRequest$Outbound = { - playlistType?: string | undefined; - smart?: number | undefined; + playlistType?: string | undefined; + smart?: number | undefined; }; /** @internal */ export const GetPlaylistsRequest$outboundSchema: z.ZodType< - GetPlaylistsRequest$Outbound, - z.ZodTypeDef, - GetPlaylistsRequest + GetPlaylistsRequest$Outbound, + z.ZodTypeDef, + GetPlaylistsRequest > = z.object({ - playlistType: PlaylistType$outboundSchema.optional(), - smart: QueryParamSmart$outboundSchema.optional(), + playlistType: PlaylistType$outboundSchema.optional(), + smart: QueryParamSmart$outboundSchema.optional(), }); /** @@ -152,80 +154,80 @@ export const GetPlaylistsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsRequest$ { - /** @deprecated use `GetPlaylistsRequest$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsRequest$inboundSchema; - /** @deprecated use `GetPlaylistsRequest$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsRequest$outboundSchema; - /** @deprecated use `GetPlaylistsRequest$Outbound` instead. */ - export type Outbound = GetPlaylistsRequest$Outbound; + /** @deprecated use `GetPlaylistsRequest$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsRequest$inboundSchema; + /** @deprecated use `GetPlaylistsRequest$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsRequest$outboundSchema; + /** @deprecated use `GetPlaylistsRequest$Outbound` instead. */ + export type Outbound = GetPlaylistsRequest$Outbound; } /** @internal */ export const GetPlaylistsMetadata$inboundSchema: z.ZodType< - GetPlaylistsMetadata, - z.ZodTypeDef, - unknown + GetPlaylistsMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @internal */ export type GetPlaylistsMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - type?: string | undefined; - title?: string | undefined; - summary?: string | undefined; - smart?: boolean | undefined; - playlistType?: string | undefined; - composite?: string | undefined; - icon?: string | undefined; - viewCount?: number | undefined; - lastViewedAt?: number | undefined; - duration?: number | undefined; - leafCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + type?: string | undefined; + title?: string | undefined; + summary?: string | undefined; + smart?: boolean | undefined; + playlistType?: string | undefined; + composite?: string | undefined; + icon?: string | undefined; + viewCount?: number | undefined; + lastViewedAt?: number | undefined; + duration?: number | undefined; + leafCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; /** @internal */ export const GetPlaylistsMetadata$outboundSchema: z.ZodType< - GetPlaylistsMetadata$Outbound, - z.ZodTypeDef, - GetPlaylistsMetadata + GetPlaylistsMetadata$Outbound, + z.ZodTypeDef, + GetPlaylistsMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - summary: z.string().optional(), - smart: z.boolean().optional(), - playlistType: z.string().optional(), - composite: z.string().optional(), - icon: z.string().optional(), - viewCount: z.number().int().optional(), - lastViewedAt: z.number().int().optional(), - duration: z.number().int().optional(), - leafCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + summary: z.string().optional(), + smart: z.boolean().optional(), + playlistType: z.string().optional(), + composite: z.string().optional(), + icon: z.string().optional(), + viewCount: z.number().int().optional(), + lastViewedAt: z.number().int().optional(), + duration: z.number().int().optional(), + leafCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @@ -233,172 +235,164 @@ export const GetPlaylistsMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsMetadata$ { - /** @deprecated use `GetPlaylistsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsMetadata$inboundSchema; - /** @deprecated use `GetPlaylistsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsMetadata$outboundSchema; - /** @deprecated use `GetPlaylistsMetadata$Outbound` instead. */ - export type Outbound = GetPlaylistsMetadata$Outbound; + /** @deprecated use `GetPlaylistsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsMetadata$inboundSchema; + /** @deprecated use `GetPlaylistsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsMetadata$outboundSchema; + /** @deprecated use `GetPlaylistsMetadata$Outbound` instead. */ + export type Outbound = GetPlaylistsMetadata$Outbound; } /** @internal */ export const GetPlaylistsMediaContainer$inboundSchema: z.ZodType< - GetPlaylistsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetPlaylistsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetPlaylistsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetPlaylistsMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetPlaylistsMediaContainer$Outbound = { - size?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetPlaylistsMediaContainer$outboundSchema: z.ZodType< - GetPlaylistsMediaContainer$Outbound, - z.ZodTypeDef, - GetPlaylistsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetPlaylistsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetPlaylistsMediaContainer$Outbound, + z.ZodTypeDef, + GetPlaylistsMediaContainer +> = z.object({ + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetPlaylistsMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsMediaContainer$ { - /** @deprecated use `GetPlaylistsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsMediaContainer$inboundSchema; - /** @deprecated use `GetPlaylistsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsMediaContainer$outboundSchema; - /** @deprecated use `GetPlaylistsMediaContainer$Outbound` instead. */ - export type Outbound = GetPlaylistsMediaContainer$Outbound; + /** @deprecated use `GetPlaylistsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsMediaContainer$inboundSchema; + /** @deprecated use `GetPlaylistsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsMediaContainer$outboundSchema; + /** @deprecated use `GetPlaylistsMediaContainer$Outbound` instead. */ + export type Outbound = GetPlaylistsMediaContainer$Outbound; } /** @internal */ export const GetPlaylistsResponseBody$inboundSchema: z.ZodType< - GetPlaylistsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetPlaylistsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetPlaylistsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetPlaylistsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetPlaylistsResponseBody$Outbound = { - MediaContainer?: GetPlaylistsMediaContainer$Outbound | undefined; + MediaContainer?: GetPlaylistsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetPlaylistsResponseBody$outboundSchema: z.ZodType< - GetPlaylistsResponseBody$Outbound, - z.ZodTypeDef, - GetPlaylistsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetPlaylistsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetPlaylistsResponseBody$Outbound, + z.ZodTypeDef, + GetPlaylistsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetPlaylistsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsResponseBody$ { - /** @deprecated use `GetPlaylistsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsResponseBody$inboundSchema; - /** @deprecated use `GetPlaylistsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsResponseBody$outboundSchema; - /** @deprecated use `GetPlaylistsResponseBody$Outbound` instead. */ - export type Outbound = GetPlaylistsResponseBody$Outbound; + /** @deprecated use `GetPlaylistsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsResponseBody$inboundSchema; + /** @deprecated use `GetPlaylistsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsResponseBody$outboundSchema; + /** @deprecated use `GetPlaylistsResponseBody$Outbound` instead. */ + export type Outbound = GetPlaylistsResponseBody$Outbound; } /** @internal */ export const GetPlaylistsResponse$inboundSchema: z.ZodType< - GetPlaylistsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetPlaylistsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetPlaylistsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetPlaylistsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetPlaylistsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetPlaylistsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetPlaylistsResponseBody$Outbound | undefined; }; /** @internal */ export const GetPlaylistsResponse$outboundSchema: z.ZodType< - GetPlaylistsResponse$Outbound, - z.ZodTypeDef, - GetPlaylistsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetPlaylistsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetPlaylistsResponse$Outbound, + z.ZodTypeDef, + GetPlaylistsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetPlaylistsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetPlaylistsResponse$ { - /** @deprecated use `GetPlaylistsResponse$inboundSchema` instead. */ - export const inboundSchema = GetPlaylistsResponse$inboundSchema; - /** @deprecated use `GetPlaylistsResponse$outboundSchema` instead. */ - export const outboundSchema = GetPlaylistsResponse$outboundSchema; - /** @deprecated use `GetPlaylistsResponse$Outbound` instead. */ - export type Outbound = GetPlaylistsResponse$Outbound; + /** @deprecated use `GetPlaylistsResponse$inboundSchema` instead. */ + export const inboundSchema = GetPlaylistsResponse$inboundSchema; + /** @deprecated use `GetPlaylistsResponse$outboundSchema` instead. */ + export const outboundSchema = GetPlaylistsResponse$outboundSchema; + /** @deprecated use `GetPlaylistsResponse$Outbound` instead. */ + export type Outbound = GetPlaylistsResponse$Outbound; } diff --git a/src/sdk/models/operations/getrecentlyadded.ts b/src/sdk/models/operations/getrecentlyadded.ts index 53af07d2..095b5552 100644 --- a/src/sdk/models/operations/getrecentlyadded.ts +++ b/src/sdk/models/operations/getrecentlyadded.ts @@ -2,208 +2,203 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetRecentlyAddedRequest = { - /** - * The index of the first item to return. If not specified, the first item will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 0 - * - */ - xPlexContainerStart?: number | undefined; - /** - * The number of items to return. If not specified, all items will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 50 - * - */ - xPlexContainerSize?: number | undefined; + /** + * The index of the first item to return. If not specified, the first item will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + */ + xPlexContainerStart?: number | undefined; + /** + * The number of items to return. If not specified, all items will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + */ + xPlexContainerSize?: number | undefined; }; export type Part = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - hasThumbnail?: number | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + hasThumbnail?: number | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; export type Media = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type Genre = { - tag?: string | undefined; + tag?: string | undefined; }; export type Director = { - tag?: string | undefined; + tag?: string | undefined; }; export type Writer = { - tag?: string | undefined; + tag?: string | undefined; }; export type Country = { - tag?: string | undefined; + tag?: string | undefined; }; export type Role = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetRecentlyAddedMetadata = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: Date | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - director?: Array | undefined; - writer?: Array | undefined; - country?: Array | undefined; - role?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + country?: Array | undefined; + role?: Array | undefined; }; export type GetRecentlyAddedMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + metadata?: Array | undefined; }; /** * The recently added content */ export type GetRecentlyAddedResponseBody = { - mediaContainer?: GetRecentlyAddedMediaContainer | undefined; + mediaContainer?: GetRecentlyAddedMediaContainer | undefined; }; export type GetRecentlyAddedResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The recently added content - */ - object?: GetRecentlyAddedResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The recently added content + */ + object?: GetRecentlyAddedResponseBody | undefined; }; /** @internal */ export const GetRecentlyAddedRequest$inboundSchema: z.ZodType< - GetRecentlyAddedRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Container-Start": z.number().int().default(0), - "X-Plex-Container-Size": z.number().int().default(50), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Container-Start": "xPlexContainerStart", - "X-Plex-Container-Size": "xPlexContainerSize", - }); - }); + GetRecentlyAddedRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Container-Start": z.number().int().default(0), + "X-Plex-Container-Size": z.number().int().default(50), +}).transform((v) => { + return remap$(v, { + "X-Plex-Container-Start": "xPlexContainerStart", + "X-Plex-Container-Size": "xPlexContainerSize", + }); +}); /** @internal */ export type GetRecentlyAddedRequest$Outbound = { - "X-Plex-Container-Start": number; - "X-Plex-Container-Size": number; + "X-Plex-Container-Start": number; + "X-Plex-Container-Size": number; }; /** @internal */ export const GetRecentlyAddedRequest$outboundSchema: z.ZodType< - GetRecentlyAddedRequest$Outbound, - z.ZodTypeDef, - GetRecentlyAddedRequest -> = z - .object({ - xPlexContainerStart: z.number().int().default(0), - xPlexContainerSize: z.number().int().default(50), - }) - .transform((v) => { - return remap$(v, { - xPlexContainerStart: "X-Plex-Container-Start", - xPlexContainerSize: "X-Plex-Container-Size", - }); - }); + GetRecentlyAddedRequest$Outbound, + z.ZodTypeDef, + GetRecentlyAddedRequest +> = z.object({ + xPlexContainerStart: z.number().int().default(0), + xPlexContainerSize: z.number().int().default(50), +}).transform((v) => { + return remap$(v, { + xPlexContainerStart: "X-Plex-Container-Start", + xPlexContainerSize: "X-Plex-Container-Size", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedRequest$ { - /** @deprecated use `GetRecentlyAddedRequest$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedRequest$inboundSchema; - /** @deprecated use `GetRecentlyAddedRequest$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedRequest$outboundSchema; - /** @deprecated use `GetRecentlyAddedRequest$Outbound` instead. */ - export type Outbound = GetRecentlyAddedRequest$Outbound; + /** @deprecated use `GetRecentlyAddedRequest$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedRequest$inboundSchema; + /** @deprecated use `GetRecentlyAddedRequest$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedRequest$outboundSchema; + /** @deprecated use `GetRecentlyAddedRequest$Outbound` instead. */ + export type Outbound = GetRecentlyAddedRequest$Outbound; } /** @internal */ -export const Part$inboundSchema: z.ZodType = z.object({ +export const Part$inboundSchema: z.ZodType = z + .object({ id: z.number().optional(), key: z.string().optional(), duration: z.number().optional(), @@ -214,24 +209,25 @@ export const Part$inboundSchema: z.ZodType = z.obje hasThumbnail: z.number().optional(), optimizedForStreaming: z.boolean().optional(), videoProfile: z.string().optional(), -}); + }); /** @internal */ export type Part$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - container?: string | undefined; - has64bitOffsets?: boolean | undefined; - hasThumbnail?: number | undefined; - optimizedForStreaming?: boolean | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + container?: string | undefined; + has64bitOffsets?: boolean | undefined; + hasThumbnail?: number | undefined; + optimizedForStreaming?: boolean | undefined; + videoProfile?: string | undefined; }; /** @internal */ -export const Part$outboundSchema: z.ZodType = z.object({ +export const Part$outboundSchema: z.ZodType = + z.object({ id: z.number().optional(), key: z.string().optional(), duration: z.number().optional(), @@ -242,119 +238,125 @@ export const Part$outboundSchema: z.ZodType = hasThumbnail: z.number().optional(), optimizedForStreaming: z.boolean().optional(), videoProfile: z.string().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Part$ { - /** @deprecated use `Part$inboundSchema` instead. */ - export const inboundSchema = Part$inboundSchema; - /** @deprecated use `Part$outboundSchema` instead. */ - export const outboundSchema = Part$outboundSchema; - /** @deprecated use `Part$Outbound` instead. */ - export type Outbound = Part$Outbound; + /** @deprecated use `Part$inboundSchema` instead. */ + export const inboundSchema = Part$inboundSchema; + /** @deprecated use `Part$outboundSchema` instead. */ + export const outboundSchema = Part$outboundSchema; + /** @deprecated use `Part$Outbound` instead. */ + export type Outbound = Part$Outbound; } /** @internal */ export const Media$inboundSchema: z.ZodType = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.number().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => Part$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); + .object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => Part$inboundSchema)).optional(), + }).transform((v) => { + return remap$(v, { + "Part": "part", }); + }); /** @internal */ export type Media$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - optimizedForStreaming?: number | undefined; - has64bitOffsets?: boolean | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + optimizedForStreaming?: number | undefined; + has64bitOffsets?: boolean | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ -export const Media$outboundSchema: z.ZodType = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.number().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - optimizedForStreaming: z.number().optional(), - has64bitOffsets: z.boolean().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => Part$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); +export const Media$outboundSchema: z.ZodType< + Media$Outbound, + z.ZodTypeDef, + Media +> = z.object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + optimizedForStreaming: z.number().optional(), + has64bitOffsets: z.boolean().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => Part$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Media$ { - /** @deprecated use `Media$inboundSchema` instead. */ - export const inboundSchema = Media$inboundSchema; - /** @deprecated use `Media$outboundSchema` instead. */ - export const outboundSchema = Media$outboundSchema; - /** @deprecated use `Media$Outbound` instead. */ - export type Outbound = Media$Outbound; + /** @deprecated use `Media$inboundSchema` instead. */ + export const inboundSchema = Media$inboundSchema; + /** @deprecated use `Media$outboundSchema` instead. */ + export const outboundSchema = Media$outboundSchema; + /** @deprecated use `Media$Outbound` instead. */ + export type Outbound = Media$Outbound; } /** @internal */ -export const Genre$inboundSchema: z.ZodType = z.object({ +export const Genre$inboundSchema: z.ZodType = z + .object({ tag: z.string().optional(), -}); + }); /** @internal */ export type Genre$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ -export const Genre$outboundSchema: z.ZodType = z.object({ - tag: z.string().optional(), +export const Genre$outboundSchema: z.ZodType< + Genre$Outbound, + z.ZodTypeDef, + Genre +> = z.object({ + tag: z.string().optional(), }); /** @@ -362,56 +364,68 @@ export const Genre$outboundSchema: z.ZodType = z.object({ - tag: z.string().optional(), +export const Director$inboundSchema: z.ZodType< + Director, + z.ZodTypeDef, + unknown +> = z.object({ + tag: z.string().optional(), }); /** @internal */ export type Director$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ -export const Director$outboundSchema: z.ZodType = - z.object({ - tag: z.string().optional(), - }); +export const Director$outboundSchema: z.ZodType< + Director$Outbound, + z.ZodTypeDef, + Director +> = z.object({ + tag: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Director$ { - /** @deprecated use `Director$inboundSchema` instead. */ - export const inboundSchema = Director$inboundSchema; - /** @deprecated use `Director$outboundSchema` instead. */ - export const outboundSchema = Director$outboundSchema; - /** @deprecated use `Director$Outbound` instead. */ - export type Outbound = Director$Outbound; + /** @deprecated use `Director$inboundSchema` instead. */ + export const inboundSchema = Director$inboundSchema; + /** @deprecated use `Director$outboundSchema` instead. */ + export const outboundSchema = Director$outboundSchema; + /** @deprecated use `Director$Outbound` instead. */ + export type Outbound = Director$Outbound; } /** @internal */ -export const Writer$inboundSchema: z.ZodType = z.object({ +export const Writer$inboundSchema: z.ZodType = z + .object({ tag: z.string().optional(), -}); + }); /** @internal */ export type Writer$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ -export const Writer$outboundSchema: z.ZodType = z.object({ - tag: z.string().optional(), +export const Writer$outboundSchema: z.ZodType< + Writer$Outbound, + z.ZodTypeDef, + Writer +> = z.object({ + tag: z.string().optional(), }); /** @@ -419,27 +433,32 @@ export const Writer$outboundSchema: z.ZodType = z.object({ +export const Country$inboundSchema: z.ZodType = + z.object({ tag: z.string().optional(), -}); + }); /** @internal */ export type Country$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ -export const Country$outboundSchema: z.ZodType = z.object({ - tag: z.string().optional(), +export const Country$outboundSchema: z.ZodType< + Country$Outbound, + z.ZodTypeDef, + Country +> = z.object({ + tag: z.string().optional(), }); /** @@ -447,373 +466,358 @@ export const Country$outboundSchema: z.ZodType = z.object({ +export const Role$inboundSchema: z.ZodType = z + .object({ tag: z.string().optional(), -}); + }); /** @internal */ export type Role$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ -export const Role$outboundSchema: z.ZodType = z.object({ +export const Role$outboundSchema: z.ZodType = + z.object({ tag: z.string().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Role$ { - /** @deprecated use `Role$inboundSchema` instead. */ - export const inboundSchema = Role$inboundSchema; - /** @deprecated use `Role$outboundSchema` instead. */ - export const outboundSchema = Role$outboundSchema; - /** @deprecated use `Role$Outbound` instead. */ - export type Outbound = Role$Outbound; + /** @deprecated use `Role$inboundSchema` instead. */ + export const inboundSchema = Role$inboundSchema; + /** @deprecated use `Role$outboundSchema` instead. */ + export const outboundSchema = Role$outboundSchema; + /** @deprecated use `Role$Outbound` instead. */ + export type Outbound = Role$Outbound; } /** @internal */ export const GetRecentlyAddedMetadata$inboundSchema: z.ZodType< - GetRecentlyAddedMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - Media: z.array(z.lazy(() => Media$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => Genre$inboundSchema)).optional(), - Director: z.array(z.lazy(() => Director$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => Writer$inboundSchema)).optional(), - Country: z.array(z.lazy(() => Country$inboundSchema)).optional(), - Role: z.array(z.lazy(() => Role$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Director: "director", - Writer: "writer", - Country: "country", - Role: "role", - }); - }); + GetRecentlyAddedMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => Media$inboundSchema)).optional(), + Genre: z.array(z.lazy(() => Genre$inboundSchema)).optional(), + Director: z.array(z.lazy(() => Director$inboundSchema)).optional(), + Writer: z.array(z.lazy(() => Writer$inboundSchema)).optional(), + Country: z.array(z.lazy(() => Country$inboundSchema)).optional(), + Role: z.array(z.lazy(() => Role$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Director": "director", + "Writer": "writer", + "Country": "country", + "Role": "role", + }); +}); /** @internal */ export type GetRecentlyAddedMetadata$Outbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Country?: Array | undefined; - Role?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; }; /** @internal */ export const GetRecentlyAddedMetadata$outboundSchema: z.ZodType< - GetRecentlyAddedMetadata$Outbound, - z.ZodTypeDef, - GetRecentlyAddedMetadata -> = z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .date() - .transform((v) => v.toISOString()) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - media: z.array(z.lazy(() => Media$outboundSchema)).optional(), - genre: z.array(z.lazy(() => Genre$outboundSchema)).optional(), - director: z.array(z.lazy(() => Director$outboundSchema)).optional(), - writer: z.array(z.lazy(() => Writer$outboundSchema)).optional(), - country: z.array(z.lazy(() => Country$outboundSchema)).optional(), - role: z.array(z.lazy(() => Role$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - director: "Director", - writer: "Writer", - country: "Country", - role: "Role", - }); - }); + GetRecentlyAddedMetadata$Outbound, + z.ZodTypeDef, + GetRecentlyAddedMetadata +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.date().transform(v => v.toISOString()).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => Media$outboundSchema)).optional(), + genre: z.array(z.lazy(() => Genre$outboundSchema)).optional(), + director: z.array(z.lazy(() => Director$outboundSchema)).optional(), + writer: z.array(z.lazy(() => Writer$outboundSchema)).optional(), + country: z.array(z.lazy(() => Country$outboundSchema)).optional(), + role: z.array(z.lazy(() => Role$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + director: "Director", + writer: "Writer", + country: "Country", + role: "Role", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedMetadata$ { - /** @deprecated use `GetRecentlyAddedMetadata$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedMetadata$inboundSchema; - /** @deprecated use `GetRecentlyAddedMetadata$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedMetadata$outboundSchema; - /** @deprecated use `GetRecentlyAddedMetadata$Outbound` instead. */ - export type Outbound = GetRecentlyAddedMetadata$Outbound; + /** @deprecated use `GetRecentlyAddedMetadata$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedMetadata$inboundSchema; + /** @deprecated use `GetRecentlyAddedMetadata$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedMetadata$outboundSchema; + /** @deprecated use `GetRecentlyAddedMetadata$Outbound` instead. */ + export type Outbound = GetRecentlyAddedMetadata$Outbound; } /** @internal */ export const GetRecentlyAddedMediaContainer$inboundSchema: z.ZodType< - GetRecentlyAddedMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - mixedParents: z.boolean().optional(), - Metadata: z.array(z.lazy(() => GetRecentlyAddedMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetRecentlyAddedMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + Metadata: z.array(z.lazy(() => GetRecentlyAddedMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetRecentlyAddedMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - mixedParents?: boolean | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + mixedParents?: boolean | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetRecentlyAddedMediaContainer$outboundSchema: z.ZodType< - GetRecentlyAddedMediaContainer$Outbound, - z.ZodTypeDef, - GetRecentlyAddedMediaContainer -> = z - .object({ - size: z.number().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - mixedParents: z.boolean().optional(), - metadata: z.array(z.lazy(() => GetRecentlyAddedMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetRecentlyAddedMediaContainer$Outbound, + z.ZodTypeDef, + GetRecentlyAddedMediaContainer +> = z.object({ + size: z.number().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + mixedParents: z.boolean().optional(), + metadata: z.array(z.lazy(() => GetRecentlyAddedMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedMediaContainer$ { - /** @deprecated use `GetRecentlyAddedMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedMediaContainer$inboundSchema; - /** @deprecated use `GetRecentlyAddedMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedMediaContainer$outboundSchema; - /** @deprecated use `GetRecentlyAddedMediaContainer$Outbound` instead. */ - export type Outbound = GetRecentlyAddedMediaContainer$Outbound; + /** @deprecated use `GetRecentlyAddedMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedMediaContainer$inboundSchema; + /** @deprecated use `GetRecentlyAddedMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedMediaContainer$outboundSchema; + /** @deprecated use `GetRecentlyAddedMediaContainer$Outbound` instead. */ + export type Outbound = GetRecentlyAddedMediaContainer$Outbound; } /** @internal */ export const GetRecentlyAddedResponseBody$inboundSchema: z.ZodType< - GetRecentlyAddedResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetRecentlyAddedResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetRecentlyAddedResponseBody$Outbound = { - MediaContainer?: GetRecentlyAddedMediaContainer$Outbound | undefined; + MediaContainer?: GetRecentlyAddedMediaContainer$Outbound | undefined; }; /** @internal */ export const GetRecentlyAddedResponseBody$outboundSchema: z.ZodType< - GetRecentlyAddedResponseBody$Outbound, - z.ZodTypeDef, - GetRecentlyAddedResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetRecentlyAddedResponseBody$Outbound, + z.ZodTypeDef, + GetRecentlyAddedResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetRecentlyAddedMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedResponseBody$ { - /** @deprecated use `GetRecentlyAddedResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedResponseBody$inboundSchema; - /** @deprecated use `GetRecentlyAddedResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedResponseBody$outboundSchema; - /** @deprecated use `GetRecentlyAddedResponseBody$Outbound` instead. */ - export type Outbound = GetRecentlyAddedResponseBody$Outbound; + /** @deprecated use `GetRecentlyAddedResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedResponseBody$inboundSchema; + /** @deprecated use `GetRecentlyAddedResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedResponseBody$outboundSchema; + /** @deprecated use `GetRecentlyAddedResponseBody$Outbound` instead. */ + export type Outbound = GetRecentlyAddedResponseBody$Outbound; } /** @internal */ export const GetRecentlyAddedResponse$inboundSchema: z.ZodType< - GetRecentlyAddedResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetRecentlyAddedResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetRecentlyAddedResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetRecentlyAddedResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetRecentlyAddedResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetRecentlyAddedResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetRecentlyAddedResponseBody$Outbound | undefined; }; /** @internal */ export const GetRecentlyAddedResponse$outboundSchema: z.ZodType< - GetRecentlyAddedResponse$Outbound, - z.ZodTypeDef, - GetRecentlyAddedResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetRecentlyAddedResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetRecentlyAddedResponse$Outbound, + z.ZodTypeDef, + GetRecentlyAddedResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetRecentlyAddedResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRecentlyAddedResponse$ { - /** @deprecated use `GetRecentlyAddedResponse$inboundSchema` instead. */ - export const inboundSchema = GetRecentlyAddedResponse$inboundSchema; - /** @deprecated use `GetRecentlyAddedResponse$outboundSchema` instead. */ - export const outboundSchema = GetRecentlyAddedResponse$outboundSchema; - /** @deprecated use `GetRecentlyAddedResponse$Outbound` instead. */ - export type Outbound = GetRecentlyAddedResponse$Outbound; + /** @deprecated use `GetRecentlyAddedResponse$inboundSchema` instead. */ + export const inboundSchema = GetRecentlyAddedResponse$inboundSchema; + /** @deprecated use `GetRecentlyAddedResponse$outboundSchema` instead. */ + export const outboundSchema = GetRecentlyAddedResponse$outboundSchema; + /** @deprecated use `GetRecentlyAddedResponse$Outbound` instead. */ + export type Outbound = GetRecentlyAddedResponse$Outbound; } diff --git a/src/sdk/models/operations/getrefreshlibrarymetadata.ts b/src/sdk/models/operations/getrefreshlibrarymetadata.ts index 78f88462..90eeb8d5 100644 --- a/src/sdk/models/operations/getrefreshlibrarymetadata.ts +++ b/src/sdk/models/operations/getrefreshlibrarymetadata.ts @@ -2,88 +2,90 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Force the refresh even if the library is already being refreshed. */ export enum Force { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetRefreshLibraryMetadataRequest = { - /** - * The unique key of the Plex library. - * - * @remarks - * Note: This is unique in the context of the Plex server. - * - */ - sectionKey: number; - /** - * Force the refresh even if the library is already being refreshed. - */ - force?: Force | undefined; + /** + * The unique key of the Plex library. + * + * @remarks + * Note: This is unique in the context of the Plex server. + */ + sectionKey: number; + /** + * Force the refresh even if the library is already being refreshed. + */ + force?: Force | undefined; }; export type GetRefreshLibraryMetadataResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const Force$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Force); +export const Force$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Force, +); /** @internal */ -export const Force$outboundSchema: z.ZodNativeEnum = Force$inboundSchema; +export const Force$outboundSchema: z.ZodNativeEnum = + Force$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Force$ { - /** @deprecated use `Force$inboundSchema` instead. */ - export const inboundSchema = Force$inboundSchema; - /** @deprecated use `Force$outboundSchema` instead. */ - export const outboundSchema = Force$outboundSchema; + /** @deprecated use `Force$inboundSchema` instead. */ + export const inboundSchema = Force$inboundSchema; + /** @deprecated use `Force$outboundSchema` instead. */ + export const outboundSchema = Force$outboundSchema; } /** @internal */ export const GetRefreshLibraryMetadataRequest$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataRequest, - z.ZodTypeDef, - unknown + GetRefreshLibraryMetadataRequest, + z.ZodTypeDef, + unknown > = z.object({ - sectionKey: z.number().int(), - force: Force$inboundSchema.optional(), + sectionKey: z.number().int(), + force: Force$inboundSchema.optional(), }); /** @internal */ export type GetRefreshLibraryMetadataRequest$Outbound = { - sectionKey: number; - force?: number | undefined; + sectionKey: number; + force?: number | undefined; }; /** @internal */ export const GetRefreshLibraryMetadataRequest$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataRequest$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataRequest + GetRefreshLibraryMetadataRequest$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataRequest > = z.object({ - sectionKey: z.number().int(), - force: Force$outboundSchema.optional(), + sectionKey: z.number().int(), + force: Force$outboundSchema.optional(), }); /** @@ -91,70 +93,67 @@ export const GetRefreshLibraryMetadataRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRefreshLibraryMetadataRequest$ { - /** @deprecated use `GetRefreshLibraryMetadataRequest$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataRequest$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataRequest$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataRequest$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataRequest$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataRequest$Outbound; + /** @deprecated use `GetRefreshLibraryMetadataRequest$inboundSchema` instead. */ + export const inboundSchema = GetRefreshLibraryMetadataRequest$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataRequest$outboundSchema` instead. */ + export const outboundSchema = GetRefreshLibraryMetadataRequest$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataRequest$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataRequest$Outbound; } /** @internal */ export const GetRefreshLibraryMetadataResponse$inboundSchema: z.ZodType< - GetRefreshLibraryMetadataResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetRefreshLibraryMetadataResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetRefreshLibraryMetadataResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetRefreshLibraryMetadataResponse$outboundSchema: z.ZodType< - GetRefreshLibraryMetadataResponse$Outbound, - z.ZodTypeDef, - GetRefreshLibraryMetadataResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetRefreshLibraryMetadataResponse$Outbound, + z.ZodTypeDef, + GetRefreshLibraryMetadataResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetRefreshLibraryMetadataResponse$ { - /** @deprecated use `GetRefreshLibraryMetadataResponse$inboundSchema` instead. */ - export const inboundSchema = GetRefreshLibraryMetadataResponse$inboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataResponse$outboundSchema` instead. */ - export const outboundSchema = GetRefreshLibraryMetadataResponse$outboundSchema; - /** @deprecated use `GetRefreshLibraryMetadataResponse$Outbound` instead. */ - export type Outbound = GetRefreshLibraryMetadataResponse$Outbound; + /** @deprecated use `GetRefreshLibraryMetadataResponse$inboundSchema` instead. */ + export const inboundSchema = GetRefreshLibraryMetadataResponse$inboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataResponse$outboundSchema` instead. */ + export const outboundSchema = + GetRefreshLibraryMetadataResponse$outboundSchema; + /** @deprecated use `GetRefreshLibraryMetadataResponse$Outbound` instead. */ + export type Outbound = GetRefreshLibraryMetadataResponse$Outbound; } diff --git a/src/sdk/models/operations/getresizedphoto.ts b/src/sdk/models/operations/getresizedphoto.ts index a240b53c..a64a01fc 100644 --- a/src/sdk/models/operations/getresizedphoto.ts +++ b/src/sdk/models/operations/getresizedphoto.ts @@ -2,144 +2,148 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. */ export enum MinSize { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** * allow images to be resized beyond native dimensions. */ export enum Upscale { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetResizedPhotoRequest = { - /** - * The width for the resized photo - */ - width: number; - /** - * The height for the resized photo - */ - height: number; - /** - * The opacity for the resized photo - */ - opacity?: number | undefined; - /** - * The width for the resized photo - */ - blur: number; - /** - * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. - */ - minSize: MinSize; - /** - * allow images to be resized beyond native dimensions. - */ - upscale: Upscale; - /** - * path to image within Plex - */ - url: string; + /** + * The width for the resized photo + */ + width: number; + /** + * The height for the resized photo + */ + height: number; + /** + * The opacity for the resized photo + */ + opacity?: number | undefined; + /** + * The width for the resized photo + */ + blur: number; + /** + * images are always scaled proportionally. A value of '1' in minSize will make the smaller native dimension the dimension resized against. + */ + minSize: MinSize; + /** + * allow images to be resized beyond native dimensions. + */ + upscale: Upscale; + /** + * path to image within Plex + */ + url: string; }; export type GetResizedPhotoResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const MinSize$inboundSchema: z.ZodNativeEnum = z.nativeEnum(MinSize); +export const MinSize$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(MinSize); /** @internal */ -export const MinSize$outboundSchema: z.ZodNativeEnum = MinSize$inboundSchema; +export const MinSize$outboundSchema: z.ZodNativeEnum = + MinSize$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MinSize$ { - /** @deprecated use `MinSize$inboundSchema` instead. */ - export const inboundSchema = MinSize$inboundSchema; - /** @deprecated use `MinSize$outboundSchema` instead. */ - export const outboundSchema = MinSize$outboundSchema; + /** @deprecated use `MinSize$inboundSchema` instead. */ + export const inboundSchema = MinSize$inboundSchema; + /** @deprecated use `MinSize$outboundSchema` instead. */ + export const outboundSchema = MinSize$outboundSchema; } /** @internal */ -export const Upscale$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Upscale); +export const Upscale$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Upscale); /** @internal */ -export const Upscale$outboundSchema: z.ZodNativeEnum = Upscale$inboundSchema; +export const Upscale$outboundSchema: z.ZodNativeEnum = + Upscale$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Upscale$ { - /** @deprecated use `Upscale$inboundSchema` instead. */ - export const inboundSchema = Upscale$inboundSchema; - /** @deprecated use `Upscale$outboundSchema` instead. */ - export const outboundSchema = Upscale$outboundSchema; + /** @deprecated use `Upscale$inboundSchema` instead. */ + export const inboundSchema = Upscale$inboundSchema; + /** @deprecated use `Upscale$outboundSchema` instead. */ + export const outboundSchema = Upscale$outboundSchema; } /** @internal */ export const GetResizedPhotoRequest$inboundSchema: z.ZodType< - GetResizedPhotoRequest, - z.ZodTypeDef, - unknown + GetResizedPhotoRequest, + z.ZodTypeDef, + unknown > = z.object({ - width: z.number(), - height: z.number(), - opacity: z.number().int().default(100), - blur: z.number(), - minSize: MinSize$inboundSchema, - upscale: Upscale$inboundSchema, - url: z.string(), + width: z.number(), + height: z.number(), + opacity: z.number().int().default(100), + blur: z.number(), + minSize: MinSize$inboundSchema, + upscale: Upscale$inboundSchema, + url: z.string(), }); /** @internal */ export type GetResizedPhotoRequest$Outbound = { - width: number; - height: number; - opacity: number; - blur: number; - minSize: number; - upscale: number; - url: string; + width: number; + height: number; + opacity: number; + blur: number; + minSize: number; + upscale: number; + url: string; }; /** @internal */ export const GetResizedPhotoRequest$outboundSchema: z.ZodType< - GetResizedPhotoRequest$Outbound, - z.ZodTypeDef, - GetResizedPhotoRequest + GetResizedPhotoRequest$Outbound, + z.ZodTypeDef, + GetResizedPhotoRequest > = z.object({ - width: z.number(), - height: z.number(), - opacity: z.number().int().default(100), - blur: z.number(), - minSize: MinSize$outboundSchema, - upscale: Upscale$outboundSchema, - url: z.string(), + width: z.number(), + height: z.number(), + opacity: z.number().int().default(100), + blur: z.number(), + minSize: MinSize$outboundSchema, + upscale: Upscale$outboundSchema, + url: z.string(), }); /** @@ -147,70 +151,66 @@ export const GetResizedPhotoRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResizedPhotoRequest$ { - /** @deprecated use `GetResizedPhotoRequest$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoRequest$inboundSchema; - /** @deprecated use `GetResizedPhotoRequest$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoRequest$outboundSchema; - /** @deprecated use `GetResizedPhotoRequest$Outbound` instead. */ - export type Outbound = GetResizedPhotoRequest$Outbound; + /** @deprecated use `GetResizedPhotoRequest$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoRequest$inboundSchema; + /** @deprecated use `GetResizedPhotoRequest$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoRequest$outboundSchema; + /** @deprecated use `GetResizedPhotoRequest$Outbound` instead. */ + export type Outbound = GetResizedPhotoRequest$Outbound; } /** @internal */ export const GetResizedPhotoResponse$inboundSchema: z.ZodType< - GetResizedPhotoResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetResizedPhotoResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetResizedPhotoResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetResizedPhotoResponse$outboundSchema: z.ZodType< - GetResizedPhotoResponse$Outbound, - z.ZodTypeDef, - GetResizedPhotoResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetResizedPhotoResponse$Outbound, + z.ZodTypeDef, + GetResizedPhotoResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResizedPhotoResponse$ { - /** @deprecated use `GetResizedPhotoResponse$inboundSchema` instead. */ - export const inboundSchema = GetResizedPhotoResponse$inboundSchema; - /** @deprecated use `GetResizedPhotoResponse$outboundSchema` instead. */ - export const outboundSchema = GetResizedPhotoResponse$outboundSchema; - /** @deprecated use `GetResizedPhotoResponse$Outbound` instead. */ - export type Outbound = GetResizedPhotoResponse$Outbound; + /** @deprecated use `GetResizedPhotoResponse$inboundSchema` instead. */ + export const inboundSchema = GetResizedPhotoResponse$inboundSchema; + /** @deprecated use `GetResizedPhotoResponse$outboundSchema` instead. */ + export const outboundSchema = GetResizedPhotoResponse$outboundSchema; + /** @deprecated use `GetResizedPhotoResponse$Outbound` instead. */ + export type Outbound = GetResizedPhotoResponse$Outbound; } diff --git a/src/sdk/models/operations/getresourcesstatistics.ts b/src/sdk/models/operations/getresourcesstatistics.ts index 01e9edb6..252a2fae 100644 --- a/src/sdk/models/operations/getresourcesstatistics.ts +++ b/src/sdk/models/operations/getresourcesstatistics.ts @@ -2,144 +2,139 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetResourcesStatisticsRequest = { - /** - * The timespan to retrieve statistics for - * - * @remarks - * the exact meaning of this parameter is not known - * - */ - timespan?: number | undefined; + /** + * The timespan to retrieve statistics for + * + * @remarks + * the exact meaning of this parameter is not known + */ + timespan?: number | undefined; }; export type StatisticsResources = { - timespan?: number | undefined; - at?: number | undefined; - hostCpuUtilization?: number | undefined; - processCpuUtilization?: number | undefined; - hostMemoryUtilization?: number | undefined; - processMemoryUtilization?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + hostCpuUtilization?: number | undefined; + processCpuUtilization?: number | undefined; + hostMemoryUtilization?: number | undefined; + processMemoryUtilization?: number | undefined; }; export type GetResourcesStatisticsMediaContainer = { - size?: number | undefined; - statisticsResources?: Array | undefined; + size?: number | undefined; + statisticsResources?: Array | undefined; }; /** * Resource Statistics */ export type GetResourcesStatisticsResponseBody = { - mediaContainer?: GetResourcesStatisticsMediaContainer | undefined; + mediaContainer?: GetResourcesStatisticsMediaContainer | undefined; }; export type GetResourcesStatisticsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Resource Statistics - */ - object?: GetResourcesStatisticsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Resource Statistics + */ + object?: GetResourcesStatisticsResponseBody | undefined; }; /** @internal */ export const GetResourcesStatisticsRequest$inboundSchema: z.ZodType< - GetResourcesStatisticsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - Timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - Timespan: "timespan", - }); - }); + GetResourcesStatisticsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + Timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "Timespan": "timespan", + }); +}); /** @internal */ export type GetResourcesStatisticsRequest$Outbound = { - Timespan?: number | undefined; + Timespan?: number | undefined; }; /** @internal */ export const GetResourcesStatisticsRequest$outboundSchema: z.ZodType< - GetResourcesStatisticsRequest$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsRequest -> = z - .object({ - timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - timespan: "Timespan", - }); - }); + GetResourcesStatisticsRequest$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsRequest +> = z.object({ + timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + timespan: "Timespan", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsRequest$ { - /** @deprecated use `GetResourcesStatisticsRequest$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsRequest$inboundSchema; - /** @deprecated use `GetResourcesStatisticsRequest$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsRequest$outboundSchema; - /** @deprecated use `GetResourcesStatisticsRequest$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsRequest$Outbound; + /** @deprecated use `GetResourcesStatisticsRequest$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsRequest$inboundSchema; + /** @deprecated use `GetResourcesStatisticsRequest$outboundSchema` instead. */ + export const outboundSchema = GetResourcesStatisticsRequest$outboundSchema; + /** @deprecated use `GetResourcesStatisticsRequest$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsRequest$Outbound; } /** @internal */ export const StatisticsResources$inboundSchema: z.ZodType< - StatisticsResources, - z.ZodTypeDef, - unknown + StatisticsResources, + z.ZodTypeDef, + unknown > = z.object({ - timespan: z.number().int().optional(), - at: z.number().int().optional(), - hostCpuUtilization: z.number().optional(), - processCpuUtilization: z.number().optional(), - hostMemoryUtilization: z.number().optional(), - processMemoryUtilization: z.number().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + hostCpuUtilization: z.number().optional(), + processCpuUtilization: z.number().optional(), + hostMemoryUtilization: z.number().optional(), + processMemoryUtilization: z.number().optional(), }); /** @internal */ export type StatisticsResources$Outbound = { - timespan?: number | undefined; - at?: number | undefined; - hostCpuUtilization?: number | undefined; - processCpuUtilization?: number | undefined; - hostMemoryUtilization?: number | undefined; - processMemoryUtilization?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + hostCpuUtilization?: number | undefined; + processCpuUtilization?: number | undefined; + hostMemoryUtilization?: number | undefined; + processMemoryUtilization?: number | undefined; }; /** @internal */ export const StatisticsResources$outboundSchema: z.ZodType< - StatisticsResources$Outbound, - z.ZodTypeDef, - StatisticsResources + StatisticsResources$Outbound, + z.ZodTypeDef, + StatisticsResources > = z.object({ - timespan: z.number().int().optional(), - at: z.number().int().optional(), - hostCpuUtilization: z.number().optional(), - processCpuUtilization: z.number().optional(), - hostMemoryUtilization: z.number().optional(), - processMemoryUtilization: z.number().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + hostCpuUtilization: z.number().optional(), + processCpuUtilization: z.number().optional(), + hostMemoryUtilization: z.number().optional(), + processMemoryUtilization: z.number().optional(), }); /** @@ -147,174 +142,171 @@ export const StatisticsResources$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StatisticsResources$ { - /** @deprecated use `StatisticsResources$inboundSchema` instead. */ - export const inboundSchema = StatisticsResources$inboundSchema; - /** @deprecated use `StatisticsResources$outboundSchema` instead. */ - export const outboundSchema = StatisticsResources$outboundSchema; - /** @deprecated use `StatisticsResources$Outbound` instead. */ - export type Outbound = StatisticsResources$Outbound; + /** @deprecated use `StatisticsResources$inboundSchema` instead. */ + export const inboundSchema = StatisticsResources$inboundSchema; + /** @deprecated use `StatisticsResources$outboundSchema` instead. */ + export const outboundSchema = StatisticsResources$outboundSchema; + /** @deprecated use `StatisticsResources$Outbound` instead. */ + export type Outbound = StatisticsResources$Outbound; } /** @internal */ export const GetResourcesStatisticsMediaContainer$inboundSchema: z.ZodType< - GetResourcesStatisticsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - StatisticsResources: z.array(z.lazy(() => StatisticsResources$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - StatisticsResources: "statisticsResources", - }); - }); + GetResourcesStatisticsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + StatisticsResources: z.array(z.lazy(() => StatisticsResources$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "StatisticsResources": "statisticsResources", + }); +}); /** @internal */ export type GetResourcesStatisticsMediaContainer$Outbound = { - size?: number | undefined; - StatisticsResources?: Array | undefined; + size?: number | undefined; + StatisticsResources?: Array | undefined; }; /** @internal */ export const GetResourcesStatisticsMediaContainer$outboundSchema: z.ZodType< - GetResourcesStatisticsMediaContainer$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - statisticsResources: z.array(z.lazy(() => StatisticsResources$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - statisticsResources: "StatisticsResources", - }); - }); + GetResourcesStatisticsMediaContainer$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsMediaContainer +> = z.object({ + size: z.number().int().optional(), + statisticsResources: z.array(z.lazy(() => StatisticsResources$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + statisticsResources: "StatisticsResources", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsMediaContainer$ { - /** @deprecated use `GetResourcesStatisticsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsMediaContainer$inboundSchema; - /** @deprecated use `GetResourcesStatisticsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsMediaContainer$outboundSchema; - /** @deprecated use `GetResourcesStatisticsMediaContainer$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsMediaContainer$Outbound; + /** @deprecated use `GetResourcesStatisticsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = + GetResourcesStatisticsMediaContainer$inboundSchema; + /** @deprecated use `GetResourcesStatisticsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetResourcesStatisticsMediaContainer$outboundSchema; + /** @deprecated use `GetResourcesStatisticsMediaContainer$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsMediaContainer$Outbound; } /** @internal */ export const GetResourcesStatisticsResponseBody$inboundSchema: z.ZodType< - GetResourcesStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetResourcesStatisticsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetResourcesStatisticsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => + GetResourcesStatisticsMediaContainer$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetResourcesStatisticsResponseBody$Outbound = { - MediaContainer?: GetResourcesStatisticsMediaContainer$Outbound | undefined; + MediaContainer?: GetResourcesStatisticsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetResourcesStatisticsResponseBody$outboundSchema: z.ZodType< - GetResourcesStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsResponseBody -> = z - .object({ - mediaContainer: z - .lazy(() => GetResourcesStatisticsMediaContainer$outboundSchema) - .optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetResourcesStatisticsResponseBody$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetResourcesStatisticsMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsResponseBody$ { - /** @deprecated use `GetResourcesStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetResourcesStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetResourcesStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsResponseBody$Outbound; + /** @deprecated use `GetResourcesStatisticsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsResponseBody$inboundSchema; + /** @deprecated use `GetResourcesStatisticsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetResourcesStatisticsResponseBody$outboundSchema; + /** @deprecated use `GetResourcesStatisticsResponseBody$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsResponseBody$Outbound; } /** @internal */ export const GetResourcesStatisticsResponse$inboundSchema: z.ZodType< - GetResourcesStatisticsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetResourcesStatisticsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetResourcesStatisticsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetResourcesStatisticsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetResourcesStatisticsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetResourcesStatisticsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetResourcesStatisticsResponseBody$Outbound | undefined; }; /** @internal */ export const GetResourcesStatisticsResponse$outboundSchema: z.ZodType< - GetResourcesStatisticsResponse$Outbound, - z.ZodTypeDef, - GetResourcesStatisticsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetResourcesStatisticsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetResourcesStatisticsResponse$Outbound, + z.ZodTypeDef, + GetResourcesStatisticsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetResourcesStatisticsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetResourcesStatisticsResponse$ { - /** @deprecated use `GetResourcesStatisticsResponse$inboundSchema` instead. */ - export const inboundSchema = GetResourcesStatisticsResponse$inboundSchema; - /** @deprecated use `GetResourcesStatisticsResponse$outboundSchema` instead. */ - export const outboundSchema = GetResourcesStatisticsResponse$outboundSchema; - /** @deprecated use `GetResourcesStatisticsResponse$Outbound` instead. */ - export type Outbound = GetResourcesStatisticsResponse$Outbound; + /** @deprecated use `GetResourcesStatisticsResponse$inboundSchema` instead. */ + export const inboundSchema = GetResourcesStatisticsResponse$inboundSchema; + /** @deprecated use `GetResourcesStatisticsResponse$outboundSchema` instead. */ + export const outboundSchema = GetResourcesStatisticsResponse$outboundSchema; + /** @deprecated use `GetResourcesStatisticsResponse$Outbound` instead. */ + export type Outbound = GetResourcesStatisticsResponse$Outbound; } diff --git a/src/sdk/models/operations/getsearchlibrary.ts b/src/sdk/models/operations/getsearchlibrary.ts index 094084da..81ab6370 100644 --- a/src/sdk/models/operations/getsearchlibrary.ts +++ b/src/sdk/models/operations/getsearchlibrary.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * The type of media to retrieve. @@ -14,146 +14,145 @@ import * as z from "zod"; * 3 = season * 4 = episode * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * */ export enum QueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + One = 1, + Two = 2, + Three = 3, + Four = 4, } export type GetSearchLibraryRequest = { - /** - * The unique key of the Plex library. - * - * @remarks - * Note: This is unique in the context of the Plex server. - * - */ - sectionKey: number; - /** - * The type of media to retrieve. - * - * @remarks - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - */ - type: QueryParamType; + /** + * The unique key of the Plex library. + * + * @remarks + * Note: This is unique in the context of the Plex server. + */ + sectionKey: number; + /** + * The type of media to retrieve. + * + * @remarks + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + */ + type: QueryParamType; }; export type GetSearchLibraryMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + parentRatingKey?: string | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; export type GetSearchLibraryMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + nocache?: boolean | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + metadata?: Array | undefined; }; /** * The contents of the library by section and type */ export type GetSearchLibraryResponseBody = { - mediaContainer?: GetSearchLibraryMediaContainer | undefined; + mediaContainer?: GetSearchLibraryMediaContainer | undefined; }; export type GetSearchLibraryResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The contents of the library by section and type - */ - object?: GetSearchLibraryResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The contents of the library by section and type + */ + object?: GetSearchLibraryResponseBody | undefined; }; /** @internal */ -export const QueryParamType$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamType); +export const QueryParamType$inboundSchema: z.ZodNativeEnum< + typeof QueryParamType +> = z.nativeEnum(QueryParamType); /** @internal */ -export const QueryParamType$outboundSchema: z.ZodNativeEnum = - QueryParamType$inboundSchema; +export const QueryParamType$outboundSchema: z.ZodNativeEnum< + typeof QueryParamType +> = QueryParamType$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamType$ { - /** @deprecated use `QueryParamType$inboundSchema` instead. */ - export const inboundSchema = QueryParamType$inboundSchema; - /** @deprecated use `QueryParamType$outboundSchema` instead. */ - export const outboundSchema = QueryParamType$outboundSchema; + /** @deprecated use `QueryParamType$inboundSchema` instead. */ + export const inboundSchema = QueryParamType$inboundSchema; + /** @deprecated use `QueryParamType$outboundSchema` instead. */ + export const outboundSchema = QueryParamType$outboundSchema; } /** @internal */ export const GetSearchLibraryRequest$inboundSchema: z.ZodType< - GetSearchLibraryRequest, - z.ZodTypeDef, - unknown + GetSearchLibraryRequest, + z.ZodTypeDef, + unknown > = z.object({ - sectionKey: z.number().int(), - type: QueryParamType$inboundSchema, + sectionKey: z.number().int(), + type: QueryParamType$inboundSchema, }); /** @internal */ export type GetSearchLibraryRequest$Outbound = { - sectionKey: number; - type: number; + sectionKey: number; + type: number; }; /** @internal */ export const GetSearchLibraryRequest$outboundSchema: z.ZodType< - GetSearchLibraryRequest$Outbound, - z.ZodTypeDef, - GetSearchLibraryRequest + GetSearchLibraryRequest$Outbound, + z.ZodTypeDef, + GetSearchLibraryRequest > = z.object({ - sectionKey: z.number().int(), - type: QueryParamType$outboundSchema, + sectionKey: z.number().int(), + type: QueryParamType$outboundSchema, }); /** @@ -161,92 +160,92 @@ export const GetSearchLibraryRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryRequest$ { - /** @deprecated use `GetSearchLibraryRequest$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryRequest$inboundSchema; - /** @deprecated use `GetSearchLibraryRequest$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryRequest$outboundSchema; - /** @deprecated use `GetSearchLibraryRequest$Outbound` instead. */ - export type Outbound = GetSearchLibraryRequest$Outbound; + /** @deprecated use `GetSearchLibraryRequest$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryRequest$inboundSchema; + /** @deprecated use `GetSearchLibraryRequest$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryRequest$outboundSchema; + /** @deprecated use `GetSearchLibraryRequest$Outbound` instead. */ + export type Outbound = GetSearchLibraryRequest$Outbound; } /** @internal */ export const GetSearchLibraryMetadata$inboundSchema: z.ZodType< - GetSearchLibraryMetadata, - z.ZodTypeDef, - unknown + GetSearchLibraryMetadata, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - parentRatingKey: z.string().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - parentYear: z.number().int().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + parentRatingKey: z.string().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @internal */ export type GetSearchLibraryMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - parentRatingKey?: string | undefined; - guid?: string | undefined; - parentGuid?: string | undefined; - parentStudio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - parentKey?: string | undefined; - parentTitle?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - parentYear?: number | undefined; - thumb?: string | undefined; - art?: string | undefined; - parentThumb?: string | undefined; - parentTheme?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + parentRatingKey?: string | undefined; + guid?: string | undefined; + parentGuid?: string | undefined; + parentStudio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + parentKey?: string | undefined; + parentTitle?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + parentYear?: number | undefined; + thumb?: string | undefined; + art?: string | undefined; + parentThumb?: string | undefined; + parentTheme?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; }; /** @internal */ export const GetSearchLibraryMetadata$outboundSchema: z.ZodType< - GetSearchLibraryMetadata$Outbound, - z.ZodTypeDef, - GetSearchLibraryMetadata + GetSearchLibraryMetadata$Outbound, + z.ZodTypeDef, + GetSearchLibraryMetadata > = z.object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - parentRatingKey: z.string().optional(), - guid: z.string().optional(), - parentGuid: z.string().optional(), - parentStudio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - parentKey: z.string().optional(), - parentTitle: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - parentYear: z.number().int().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - parentThumb: z.string().optional(), - parentTheme: z.string().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), + ratingKey: z.string().optional(), + key: z.string().optional(), + parentRatingKey: z.string().optional(), + guid: z.string().optional(), + parentGuid: z.string().optional(), + parentStudio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + parentKey: z.string().optional(), + parentTitle: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + parentYear: z.number().int().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + parentThumb: z.string().optional(), + parentTheme: z.string().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), }); /** @@ -254,205 +253,197 @@ export const GetSearchLibraryMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryMetadata$ { - /** @deprecated use `GetSearchLibraryMetadata$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryMetadata$inboundSchema; - /** @deprecated use `GetSearchLibraryMetadata$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryMetadata$outboundSchema; - /** @deprecated use `GetSearchLibraryMetadata$Outbound` instead. */ - export type Outbound = GetSearchLibraryMetadata$Outbound; + /** @deprecated use `GetSearchLibraryMetadata$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryMetadata$inboundSchema; + /** @deprecated use `GetSearchLibraryMetadata$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryMetadata$outboundSchema; + /** @deprecated use `GetSearchLibraryMetadata$Outbound` instead. */ + export type Outbound = GetSearchLibraryMetadata$Outbound; } /** @internal */ export const GetSearchLibraryMediaContainer$inboundSchema: z.ZodType< - GetSearchLibraryMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - nocache: z.boolean().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetSearchLibraryMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetSearchLibraryMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + nocache: z.boolean().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetSearchLibraryMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetSearchLibraryMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - art?: string | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - nocache?: boolean | undefined; - thumb?: string | undefined; - title1?: string | undefined; - title2?: string | undefined; - viewGroup?: string | undefined; - viewMode?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + art?: string | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + nocache?: boolean | undefined; + thumb?: string | undefined; + title1?: string | undefined; + title2?: string | undefined; + viewGroup?: string | undefined; + viewMode?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetSearchLibraryMediaContainer$outboundSchema: z.ZodType< - GetSearchLibraryMediaContainer$Outbound, - z.ZodTypeDef, - GetSearchLibraryMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - art: z.string().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - nocache: z.boolean().optional(), - thumb: z.string().optional(), - title1: z.string().optional(), - title2: z.string().optional(), - viewGroup: z.string().optional(), - viewMode: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetSearchLibraryMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetSearchLibraryMediaContainer$Outbound, + z.ZodTypeDef, + GetSearchLibraryMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + art: z.string().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + nocache: z.boolean().optional(), + thumb: z.string().optional(), + title1: z.string().optional(), + title2: z.string().optional(), + viewGroup: z.string().optional(), + viewMode: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetSearchLibraryMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryMediaContainer$ { - /** @deprecated use `GetSearchLibraryMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryMediaContainer$inboundSchema; - /** @deprecated use `GetSearchLibraryMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryMediaContainer$outboundSchema; - /** @deprecated use `GetSearchLibraryMediaContainer$Outbound` instead. */ - export type Outbound = GetSearchLibraryMediaContainer$Outbound; + /** @deprecated use `GetSearchLibraryMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryMediaContainer$inboundSchema; + /** @deprecated use `GetSearchLibraryMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryMediaContainer$outboundSchema; + /** @deprecated use `GetSearchLibraryMediaContainer$Outbound` instead. */ + export type Outbound = GetSearchLibraryMediaContainer$Outbound; } /** @internal */ export const GetSearchLibraryResponseBody$inboundSchema: z.ZodType< - GetSearchLibraryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetSearchLibraryMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetSearchLibraryResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetSearchLibraryMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetSearchLibraryResponseBody$Outbound = { - MediaContainer?: GetSearchLibraryMediaContainer$Outbound | undefined; + MediaContainer?: GetSearchLibraryMediaContainer$Outbound | undefined; }; /** @internal */ export const GetSearchLibraryResponseBody$outboundSchema: z.ZodType< - GetSearchLibraryResponseBody$Outbound, - z.ZodTypeDef, - GetSearchLibraryResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetSearchLibraryMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetSearchLibraryResponseBody$Outbound, + z.ZodTypeDef, + GetSearchLibraryResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetSearchLibraryMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryResponseBody$ { - /** @deprecated use `GetSearchLibraryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryResponseBody$inboundSchema; - /** @deprecated use `GetSearchLibraryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryResponseBody$outboundSchema; - /** @deprecated use `GetSearchLibraryResponseBody$Outbound` instead. */ - export type Outbound = GetSearchLibraryResponseBody$Outbound; + /** @deprecated use `GetSearchLibraryResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryResponseBody$inboundSchema; + /** @deprecated use `GetSearchLibraryResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryResponseBody$outboundSchema; + /** @deprecated use `GetSearchLibraryResponseBody$Outbound` instead. */ + export type Outbound = GetSearchLibraryResponseBody$Outbound; } /** @internal */ export const GetSearchLibraryResponse$inboundSchema: z.ZodType< - GetSearchLibraryResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetSearchLibraryResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetSearchLibraryResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetSearchLibraryResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetSearchLibraryResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetSearchLibraryResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetSearchLibraryResponseBody$Outbound | undefined; }; /** @internal */ export const GetSearchLibraryResponse$outboundSchema: z.ZodType< - GetSearchLibraryResponse$Outbound, - z.ZodTypeDef, - GetSearchLibraryResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetSearchLibraryResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetSearchLibraryResponse$Outbound, + z.ZodTypeDef, + GetSearchLibraryResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetSearchLibraryResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchLibraryResponse$ { - /** @deprecated use `GetSearchLibraryResponse$inboundSchema` instead. */ - export const inboundSchema = GetSearchLibraryResponse$inboundSchema; - /** @deprecated use `GetSearchLibraryResponse$outboundSchema` instead. */ - export const outboundSchema = GetSearchLibraryResponse$outboundSchema; - /** @deprecated use `GetSearchLibraryResponse$Outbound` instead. */ - export type Outbound = GetSearchLibraryResponse$Outbound; + /** @deprecated use `GetSearchLibraryResponse$inboundSchema` instead. */ + export const inboundSchema = GetSearchLibraryResponse$inboundSchema; + /** @deprecated use `GetSearchLibraryResponse$outboundSchema` instead. */ + export const outboundSchema = GetSearchLibraryResponse$outboundSchema; + /** @deprecated use `GetSearchLibraryResponse$Outbound` instead. */ + export type Outbound = GetSearchLibraryResponse$Outbound; } diff --git a/src/sdk/models/operations/getsearchresults.ts b/src/sdk/models/operations/getsearchresults.ts index 3acc6dd3..c5aa3b9c 100644 --- a/src/sdk/models/operations/getsearchresults.ts +++ b/src/sdk/models/operations/getsearchresults.ts @@ -2,164 +2,164 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSearchResultsRequest = { - /** - * The search query string to use - */ - query: string; + /** + * The search query string to use + */ + query: string; }; export type GetSearchResultsPart = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; }; export type GetSearchResultsMedia = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + part?: Array | undefined; }; export type GetSearchResultsGenre = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetSearchResultsDirector = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetSearchResultsWriter = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetSearchResultsCountry = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetSearchResultsRole = { - tag?: string | undefined; + tag?: string | undefined; }; export type GetSearchResultsMetadata = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - personal?: boolean | undefined; - sourceTitle?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: Date | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - media?: Array | undefined; - genre?: Array | undefined; - director?: Array | undefined; - writer?: Array | undefined; - country?: Array | undefined; - role?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + personal?: boolean | undefined; + sourceTitle?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: Date | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + media?: Array | undefined; + genre?: Array | undefined; + director?: Array | undefined; + writer?: Array | undefined; + country?: Array | undefined; + role?: Array | undefined; }; export type Provider = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; }; export type GetSearchResultsMediaContainer = { - size?: number | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - metadata?: Array | undefined; - provider?: Array | undefined; + size?: number | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + metadata?: Array | undefined; + provider?: Array | undefined; }; /** * Search Results */ export type GetSearchResultsResponseBody = { - mediaContainer?: GetSearchResultsMediaContainer | undefined; + mediaContainer?: GetSearchResultsMediaContainer | undefined; }; export type GetSearchResultsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Search Results - */ - object?: GetSearchResultsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Search Results + */ + object?: GetSearchResultsResponseBody | undefined; }; /** @internal */ export const GetSearchResultsRequest$inboundSchema: z.ZodType< - GetSearchResultsRequest, - z.ZodTypeDef, - unknown + GetSearchResultsRequest, + z.ZodTypeDef, + unknown > = z.object({ - query: z.string(), + query: z.string(), }); /** @internal */ export type GetSearchResultsRequest$Outbound = { - query: string; + query: string; }; /** @internal */ export const GetSearchResultsRequest$outboundSchema: z.ZodType< - GetSearchResultsRequest$Outbound, - z.ZodTypeDef, - GetSearchResultsRequest + GetSearchResultsRequest$Outbound, + z.ZodTypeDef, + GetSearchResultsRequest > = z.object({ - query: z.string(), + query: z.string(), }); /** @@ -167,56 +167,56 @@ export const GetSearchResultsRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsRequest$ { - /** @deprecated use `GetSearchResultsRequest$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsRequest$inboundSchema; - /** @deprecated use `GetSearchResultsRequest$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsRequest$outboundSchema; - /** @deprecated use `GetSearchResultsRequest$Outbound` instead. */ - export type Outbound = GetSearchResultsRequest$Outbound; + /** @deprecated use `GetSearchResultsRequest$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsRequest$inboundSchema; + /** @deprecated use `GetSearchResultsRequest$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsRequest$outboundSchema; + /** @deprecated use `GetSearchResultsRequest$Outbound` instead. */ + export type Outbound = GetSearchResultsRequest$Outbound; } /** @internal */ export const GetSearchResultsPart$inboundSchema: z.ZodType< - GetSearchResultsPart, - z.ZodTypeDef, - unknown + GetSearchResultsPart, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().optional(), - key: z.string().optional(), - duration: z.number().optional(), - file: z.string().optional(), - size: z.number().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), }); /** @internal */ export type GetSearchResultsPart$Outbound = { - id?: number | undefined; - key?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - size?: number | undefined; - audioProfile?: string | undefined; - container?: string | undefined; - videoProfile?: string | undefined; + id?: number | undefined; + key?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + size?: number | undefined; + audioProfile?: string | undefined; + container?: string | undefined; + videoProfile?: string | undefined; }; /** @internal */ export const GetSearchResultsPart$outboundSchema: z.ZodType< - GetSearchResultsPart$Outbound, - z.ZodTypeDef, - GetSearchResultsPart + GetSearchResultsPart$Outbound, + z.ZodTypeDef, + GetSearchResultsPart > = z.object({ - id: z.number().optional(), - key: z.string().optional(), - duration: z.number().optional(), - file: z.string().optional(), - size: z.number().optional(), - audioProfile: z.string().optional(), - container: z.string().optional(), - videoProfile: z.string().optional(), + id: z.number().optional(), + key: z.string().optional(), + duration: z.number().optional(), + file: z.string().optional(), + size: z.number().optional(), + audioProfile: z.string().optional(), + container: z.string().optional(), + videoProfile: z.string().optional(), }); /** @@ -224,125 +224,121 @@ export const GetSearchResultsPart$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsPart$ { - /** @deprecated use `GetSearchResultsPart$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsPart$inboundSchema; - /** @deprecated use `GetSearchResultsPart$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsPart$outboundSchema; - /** @deprecated use `GetSearchResultsPart$Outbound` instead. */ - export type Outbound = GetSearchResultsPart$Outbound; + /** @deprecated use `GetSearchResultsPart$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsPart$inboundSchema; + /** @deprecated use `GetSearchResultsPart$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsPart$outboundSchema; + /** @deprecated use `GetSearchResultsPart$Outbound` instead. */ + export type Outbound = GetSearchResultsPart$Outbound; } /** @internal */ export const GetSearchResultsMedia$inboundSchema: z.ZodType< - GetSearchResultsMedia, - z.ZodTypeDef, - unknown -> = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.number().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - audioProfile: z.string().optional(), - videoProfile: z.string().optional(), - Part: z.array(z.lazy(() => GetSearchResultsPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); + GetSearchResultsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + Part: z.array(z.lazy(() => GetSearchResultsPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetSearchResultsMedia$Outbound = { - id?: number | undefined; - duration?: number | undefined; - bitrate?: number | undefined; - width?: number | undefined; - height?: number | undefined; - aspectRatio?: number | undefined; - audioChannels?: number | undefined; - audioCodec?: string | undefined; - videoCodec?: string | undefined; - videoResolution?: number | undefined; - container?: string | undefined; - videoFrameRate?: string | undefined; - audioProfile?: string | undefined; - videoProfile?: string | undefined; - Part?: Array | undefined; + id?: number | undefined; + duration?: number | undefined; + bitrate?: number | undefined; + width?: number | undefined; + height?: number | undefined; + aspectRatio?: number | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + videoCodec?: string | undefined; + videoResolution?: number | undefined; + container?: string | undefined; + videoFrameRate?: string | undefined; + audioProfile?: string | undefined; + videoProfile?: string | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetSearchResultsMedia$outboundSchema: z.ZodType< - GetSearchResultsMedia$Outbound, - z.ZodTypeDef, - GetSearchResultsMedia -> = z - .object({ - id: z.number().optional(), - duration: z.number().optional(), - bitrate: z.number().optional(), - width: z.number().optional(), - height: z.number().optional(), - aspectRatio: z.number().optional(), - audioChannels: z.number().optional(), - audioCodec: z.string().optional(), - videoCodec: z.string().optional(), - videoResolution: z.number().optional(), - container: z.string().optional(), - videoFrameRate: z.string().optional(), - audioProfile: z.string().optional(), - videoProfile: z.string().optional(), - part: z.array(z.lazy(() => GetSearchResultsPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetSearchResultsMedia$Outbound, + z.ZodTypeDef, + GetSearchResultsMedia +> = z.object({ + id: z.number().optional(), + duration: z.number().optional(), + bitrate: z.number().optional(), + width: z.number().optional(), + height: z.number().optional(), + aspectRatio: z.number().optional(), + audioChannels: z.number().optional(), + audioCodec: z.string().optional(), + videoCodec: z.string().optional(), + videoResolution: z.number().optional(), + container: z.string().optional(), + videoFrameRate: z.string().optional(), + audioProfile: z.string().optional(), + videoProfile: z.string().optional(), + part: z.array(z.lazy(() => GetSearchResultsPart$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsMedia$ { - /** @deprecated use `GetSearchResultsMedia$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsMedia$inboundSchema; - /** @deprecated use `GetSearchResultsMedia$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsMedia$outboundSchema; - /** @deprecated use `GetSearchResultsMedia$Outbound` instead. */ - export type Outbound = GetSearchResultsMedia$Outbound; + /** @deprecated use `GetSearchResultsMedia$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsMedia$inboundSchema; + /** @deprecated use `GetSearchResultsMedia$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsMedia$outboundSchema; + /** @deprecated use `GetSearchResultsMedia$Outbound` instead. */ + export type Outbound = GetSearchResultsMedia$Outbound; } /** @internal */ export const GetSearchResultsGenre$inboundSchema: z.ZodType< - GetSearchResultsGenre, - z.ZodTypeDef, - unknown + GetSearchResultsGenre, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetSearchResultsGenre$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetSearchResultsGenre$outboundSchema: z.ZodType< - GetSearchResultsGenre$Outbound, - z.ZodTypeDef, - GetSearchResultsGenre + GetSearchResultsGenre$Outbound, + z.ZodTypeDef, + GetSearchResultsGenre > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -350,35 +346,35 @@ export const GetSearchResultsGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsGenre$ { - /** @deprecated use `GetSearchResultsGenre$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsGenre$inboundSchema; - /** @deprecated use `GetSearchResultsGenre$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsGenre$outboundSchema; - /** @deprecated use `GetSearchResultsGenre$Outbound` instead. */ - export type Outbound = GetSearchResultsGenre$Outbound; + /** @deprecated use `GetSearchResultsGenre$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsGenre$inboundSchema; + /** @deprecated use `GetSearchResultsGenre$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsGenre$outboundSchema; + /** @deprecated use `GetSearchResultsGenre$Outbound` instead. */ + export type Outbound = GetSearchResultsGenre$Outbound; } /** @internal */ export const GetSearchResultsDirector$inboundSchema: z.ZodType< - GetSearchResultsDirector, - z.ZodTypeDef, - unknown + GetSearchResultsDirector, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetSearchResultsDirector$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetSearchResultsDirector$outboundSchema: z.ZodType< - GetSearchResultsDirector$Outbound, - z.ZodTypeDef, - GetSearchResultsDirector + GetSearchResultsDirector$Outbound, + z.ZodTypeDef, + GetSearchResultsDirector > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -386,35 +382,35 @@ export const GetSearchResultsDirector$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsDirector$ { - /** @deprecated use `GetSearchResultsDirector$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsDirector$inboundSchema; - /** @deprecated use `GetSearchResultsDirector$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsDirector$outboundSchema; - /** @deprecated use `GetSearchResultsDirector$Outbound` instead. */ - export type Outbound = GetSearchResultsDirector$Outbound; + /** @deprecated use `GetSearchResultsDirector$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsDirector$inboundSchema; + /** @deprecated use `GetSearchResultsDirector$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsDirector$outboundSchema; + /** @deprecated use `GetSearchResultsDirector$Outbound` instead. */ + export type Outbound = GetSearchResultsDirector$Outbound; } /** @internal */ export const GetSearchResultsWriter$inboundSchema: z.ZodType< - GetSearchResultsWriter, - z.ZodTypeDef, - unknown + GetSearchResultsWriter, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetSearchResultsWriter$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetSearchResultsWriter$outboundSchema: z.ZodType< - GetSearchResultsWriter$Outbound, - z.ZodTypeDef, - GetSearchResultsWriter + GetSearchResultsWriter$Outbound, + z.ZodTypeDef, + GetSearchResultsWriter > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -422,35 +418,35 @@ export const GetSearchResultsWriter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsWriter$ { - /** @deprecated use `GetSearchResultsWriter$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsWriter$inboundSchema; - /** @deprecated use `GetSearchResultsWriter$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsWriter$outboundSchema; - /** @deprecated use `GetSearchResultsWriter$Outbound` instead. */ - export type Outbound = GetSearchResultsWriter$Outbound; + /** @deprecated use `GetSearchResultsWriter$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsWriter$inboundSchema; + /** @deprecated use `GetSearchResultsWriter$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsWriter$outboundSchema; + /** @deprecated use `GetSearchResultsWriter$Outbound` instead. */ + export type Outbound = GetSearchResultsWriter$Outbound; } /** @internal */ export const GetSearchResultsCountry$inboundSchema: z.ZodType< - GetSearchResultsCountry, - z.ZodTypeDef, - unknown + GetSearchResultsCountry, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetSearchResultsCountry$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetSearchResultsCountry$outboundSchema: z.ZodType< - GetSearchResultsCountry$Outbound, - z.ZodTypeDef, - GetSearchResultsCountry + GetSearchResultsCountry$Outbound, + z.ZodTypeDef, + GetSearchResultsCountry > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -458,35 +454,35 @@ export const GetSearchResultsCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsCountry$ { - /** @deprecated use `GetSearchResultsCountry$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsCountry$inboundSchema; - /** @deprecated use `GetSearchResultsCountry$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsCountry$outboundSchema; - /** @deprecated use `GetSearchResultsCountry$Outbound` instead. */ - export type Outbound = GetSearchResultsCountry$Outbound; + /** @deprecated use `GetSearchResultsCountry$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsCountry$inboundSchema; + /** @deprecated use `GetSearchResultsCountry$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsCountry$outboundSchema; + /** @deprecated use `GetSearchResultsCountry$Outbound` instead. */ + export type Outbound = GetSearchResultsCountry$Outbound; } /** @internal */ export const GetSearchResultsRole$inboundSchema: z.ZodType< - GetSearchResultsRole, - z.ZodTypeDef, - unknown + GetSearchResultsRole, + z.ZodTypeDef, + unknown > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetSearchResultsRole$Outbound = { - tag?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetSearchResultsRole$outboundSchema: z.ZodType< - GetSearchResultsRole$Outbound, - z.ZodTypeDef, - GetSearchResultsRole + GetSearchResultsRole$Outbound, + z.ZodTypeDef, + GetSearchResultsRole > = z.object({ - tag: z.string().optional(), + tag: z.string().optional(), }); /** @@ -494,385 +490,381 @@ export const GetSearchResultsRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsRole$ { - /** @deprecated use `GetSearchResultsRole$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsRole$inboundSchema; - /** @deprecated use `GetSearchResultsRole$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsRole$outboundSchema; - /** @deprecated use `GetSearchResultsRole$Outbound` instead. */ - export type Outbound = GetSearchResultsRole$Outbound; + /** @deprecated use `GetSearchResultsRole$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsRole$inboundSchema; + /** @deprecated use `GetSearchResultsRole$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsRole$outboundSchema; + /** @deprecated use `GetSearchResultsRole$Outbound` instead. */ + export type Outbound = GetSearchResultsRole$Outbound; } /** @internal */ export const GetSearchResultsMetadata$inboundSchema: z.ZodType< - GetSearchResultsMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - personal: z.boolean().optional(), - sourceTitle: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - Media: z.array(z.lazy(() => GetSearchResultsMedia$inboundSchema)).optional(), - Genre: z.array(z.lazy(() => GetSearchResultsGenre$inboundSchema)).optional(), - Director: z.array(z.lazy(() => GetSearchResultsDirector$inboundSchema)).optional(), - Writer: z.array(z.lazy(() => GetSearchResultsWriter$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetSearchResultsCountry$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetSearchResultsRole$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - Genre: "genre", - Director: "director", - Writer: "writer", - Country: "country", - Role: "role", - }); - }); + GetSearchResultsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + personal: z.boolean().optional(), + sourceTitle: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.string().datetime({ offset: true }).transform(v => + new Date(v) + ).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + Media: z.array(z.lazy(() => GetSearchResultsMedia$inboundSchema)).optional(), + Genre: z.array(z.lazy(() => GetSearchResultsGenre$inboundSchema)).optional(), + Director: z.array(z.lazy(() => GetSearchResultsDirector$inboundSchema)) + .optional(), + Writer: z.array(z.lazy(() => GetSearchResultsWriter$inboundSchema)) + .optional(), + Country: z.array(z.lazy(() => GetSearchResultsCountry$inboundSchema)) + .optional(), + Role: z.array(z.lazy(() => GetSearchResultsRole$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "Genre": "genre", + "Director": "director", + "Writer": "writer", + "Country": "country", + "Role": "role", + }); +}); /** @internal */ export type GetSearchResultsMetadata$Outbound = { - allowSync?: boolean | undefined; - librarySectionID?: number | undefined; - librarySectionTitle?: string | undefined; - librarySectionUUID?: string | undefined; - personal?: boolean | undefined; - sourceTitle?: string | undefined; - ratingKey?: number | undefined; - key?: string | undefined; - guid?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - rating?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - audienceRatingImage?: string | undefined; - chapterSource?: string | undefined; - primaryExtraKey?: string | undefined; - ratingImage?: string | undefined; - Media?: Array | undefined; - Genre?: Array | undefined; - Director?: Array | undefined; - Writer?: Array | undefined; - Country?: Array | undefined; - Role?: Array | undefined; + allowSync?: boolean | undefined; + librarySectionID?: number | undefined; + librarySectionTitle?: string | undefined; + librarySectionUUID?: string | undefined; + personal?: boolean | undefined; + sourceTitle?: string | undefined; + ratingKey?: number | undefined; + key?: string | undefined; + guid?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + rating?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + audienceRatingImage?: string | undefined; + chapterSource?: string | undefined; + primaryExtraKey?: string | undefined; + ratingImage?: string | undefined; + Media?: Array | undefined; + Genre?: Array | undefined; + Director?: Array | undefined; + Writer?: Array | undefined; + Country?: Array | undefined; + Role?: Array | undefined; }; /** @internal */ export const GetSearchResultsMetadata$outboundSchema: z.ZodType< - GetSearchResultsMetadata$Outbound, - z.ZodTypeDef, - GetSearchResultsMetadata -> = z - .object({ - allowSync: z.boolean().optional(), - librarySectionID: z.number().optional(), - librarySectionTitle: z.string().optional(), - librarySectionUUID: z.string().optional(), - personal: z.boolean().optional(), - sourceTitle: z.string().optional(), - ratingKey: z.number().optional(), - key: z.string().optional(), - guid: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - rating: z.number().optional(), - audienceRating: z.number().optional(), - year: z.number().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().optional(), - originallyAvailableAt: z - .date() - .transform((v) => v.toISOString()) - .optional(), - addedAt: z.number().optional(), - updatedAt: z.number().optional(), - audienceRatingImage: z.string().optional(), - chapterSource: z.string().optional(), - primaryExtraKey: z.string().optional(), - ratingImage: z.string().optional(), - media: z.array(z.lazy(() => GetSearchResultsMedia$outboundSchema)).optional(), - genre: z.array(z.lazy(() => GetSearchResultsGenre$outboundSchema)).optional(), - director: z.array(z.lazy(() => GetSearchResultsDirector$outboundSchema)).optional(), - writer: z.array(z.lazy(() => GetSearchResultsWriter$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetSearchResultsCountry$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetSearchResultsRole$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - genre: "Genre", - director: "Director", - writer: "Writer", - country: "Country", - role: "Role", - }); - }); + GetSearchResultsMetadata$Outbound, + z.ZodTypeDef, + GetSearchResultsMetadata +> = z.object({ + allowSync: z.boolean().optional(), + librarySectionID: z.number().optional(), + librarySectionTitle: z.string().optional(), + librarySectionUUID: z.string().optional(), + personal: z.boolean().optional(), + sourceTitle: z.string().optional(), + ratingKey: z.number().optional(), + key: z.string().optional(), + guid: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + rating: z.number().optional(), + audienceRating: z.number().optional(), + year: z.number().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().optional(), + originallyAvailableAt: z.date().transform(v => v.toISOString()).optional(), + addedAt: z.number().optional(), + updatedAt: z.number().optional(), + audienceRatingImage: z.string().optional(), + chapterSource: z.string().optional(), + primaryExtraKey: z.string().optional(), + ratingImage: z.string().optional(), + media: z.array(z.lazy(() => GetSearchResultsMedia$outboundSchema)).optional(), + genre: z.array(z.lazy(() => GetSearchResultsGenre$outboundSchema)).optional(), + director: z.array(z.lazy(() => GetSearchResultsDirector$outboundSchema)) + .optional(), + writer: z.array(z.lazy(() => GetSearchResultsWriter$outboundSchema)) + .optional(), + country: z.array(z.lazy(() => GetSearchResultsCountry$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetSearchResultsRole$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + genre: "Genre", + director: "Director", + writer: "Writer", + country: "Country", + role: "Role", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsMetadata$ { - /** @deprecated use `GetSearchResultsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsMetadata$inboundSchema; - /** @deprecated use `GetSearchResultsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsMetadata$outboundSchema; - /** @deprecated use `GetSearchResultsMetadata$Outbound` instead. */ - export type Outbound = GetSearchResultsMetadata$Outbound; + /** @deprecated use `GetSearchResultsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsMetadata$inboundSchema; + /** @deprecated use `GetSearchResultsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsMetadata$outboundSchema; + /** @deprecated use `GetSearchResultsMetadata$Outbound` instead. */ + export type Outbound = GetSearchResultsMetadata$Outbound; } /** @internal */ -export const Provider$inboundSchema: z.ZodType = z.object({ - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), +export const Provider$inboundSchema: z.ZodType< + Provider, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), }); /** @internal */ export type Provider$Outbound = { - key?: string | undefined; - title?: string | undefined; - type?: string | undefined; + key?: string | undefined; + title?: string | undefined; + type?: string | undefined; }; /** @internal */ -export const Provider$outboundSchema: z.ZodType = - z.object({ - key: z.string().optional(), - title: z.string().optional(), - type: z.string().optional(), - }); +export const Provider$outboundSchema: z.ZodType< + Provider$Outbound, + z.ZodTypeDef, + Provider +> = z.object({ + key: z.string().optional(), + title: z.string().optional(), + type: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Provider$ { - /** @deprecated use `Provider$inboundSchema` instead. */ - export const inboundSchema = Provider$inboundSchema; - /** @deprecated use `Provider$outboundSchema` instead. */ - export const outboundSchema = Provider$outboundSchema; - /** @deprecated use `Provider$Outbound` instead. */ - export type Outbound = Provider$Outbound; + /** @deprecated use `Provider$inboundSchema` instead. */ + export const inboundSchema = Provider$inboundSchema; + /** @deprecated use `Provider$outboundSchema` instead. */ + export const outboundSchema = Provider$outboundSchema; + /** @deprecated use `Provider$Outbound` instead. */ + export type Outbound = Provider$Outbound; } /** @internal */ export const GetSearchResultsMediaContainer$inboundSchema: z.ZodType< - GetSearchResultsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - Metadata: z.array(z.lazy(() => GetSearchResultsMetadata$inboundSchema)).optional(), - Provider: z.array(z.lazy(() => Provider$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - Provider: "provider", - }); - }); + GetSearchResultsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + Metadata: z.array(z.lazy(() => GetSearchResultsMetadata$inboundSchema)) + .optional(), + Provider: z.array(z.lazy(() => Provider$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + "Provider": "provider", + }); +}); /** @internal */ export type GetSearchResultsMediaContainer$Outbound = { - size?: number | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - Metadata?: Array | undefined; - Provider?: Array | undefined; + size?: number | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + Metadata?: Array | undefined; + Provider?: Array | undefined; }; /** @internal */ export const GetSearchResultsMediaContainer$outboundSchema: z.ZodType< - GetSearchResultsMediaContainer$Outbound, - z.ZodTypeDef, - GetSearchResultsMediaContainer -> = z - .object({ - size: z.number().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().optional(), - metadata: z.array(z.lazy(() => GetSearchResultsMetadata$outboundSchema)).optional(), - provider: z.array(z.lazy(() => Provider$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - provider: "Provider", - }); - }); + GetSearchResultsMediaContainer$Outbound, + z.ZodTypeDef, + GetSearchResultsMediaContainer +> = z.object({ + size: z.number().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().optional(), + metadata: z.array(z.lazy(() => GetSearchResultsMetadata$outboundSchema)) + .optional(), + provider: z.array(z.lazy(() => Provider$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + provider: "Provider", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsMediaContainer$ { - /** @deprecated use `GetSearchResultsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsMediaContainer$inboundSchema; - /** @deprecated use `GetSearchResultsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsMediaContainer$outboundSchema; - /** @deprecated use `GetSearchResultsMediaContainer$Outbound` instead. */ - export type Outbound = GetSearchResultsMediaContainer$Outbound; + /** @deprecated use `GetSearchResultsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsMediaContainer$inboundSchema; + /** @deprecated use `GetSearchResultsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsMediaContainer$outboundSchema; + /** @deprecated use `GetSearchResultsMediaContainer$Outbound` instead. */ + export type Outbound = GetSearchResultsMediaContainer$Outbound; } /** @internal */ export const GetSearchResultsResponseBody$inboundSchema: z.ZodType< - GetSearchResultsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetSearchResultsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetSearchResultsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetSearchResultsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetSearchResultsResponseBody$Outbound = { - MediaContainer?: GetSearchResultsMediaContainer$Outbound | undefined; + MediaContainer?: GetSearchResultsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetSearchResultsResponseBody$outboundSchema: z.ZodType< - GetSearchResultsResponseBody$Outbound, - z.ZodTypeDef, - GetSearchResultsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetSearchResultsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetSearchResultsResponseBody$Outbound, + z.ZodTypeDef, + GetSearchResultsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetSearchResultsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsResponseBody$ { - /** @deprecated use `GetSearchResultsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsResponseBody$inboundSchema; - /** @deprecated use `GetSearchResultsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsResponseBody$outboundSchema; - /** @deprecated use `GetSearchResultsResponseBody$Outbound` instead. */ - export type Outbound = GetSearchResultsResponseBody$Outbound; + /** @deprecated use `GetSearchResultsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsResponseBody$inboundSchema; + /** @deprecated use `GetSearchResultsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsResponseBody$outboundSchema; + /** @deprecated use `GetSearchResultsResponseBody$Outbound` instead. */ + export type Outbound = GetSearchResultsResponseBody$Outbound; } /** @internal */ export const GetSearchResultsResponse$inboundSchema: z.ZodType< - GetSearchResultsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetSearchResultsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetSearchResultsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetSearchResultsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetSearchResultsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetSearchResultsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetSearchResultsResponseBody$Outbound | undefined; }; /** @internal */ export const GetSearchResultsResponse$outboundSchema: z.ZodType< - GetSearchResultsResponse$Outbound, - z.ZodTypeDef, - GetSearchResultsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetSearchResultsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetSearchResultsResponse$Outbound, + z.ZodTypeDef, + GetSearchResultsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetSearchResultsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSearchResultsResponse$ { - /** @deprecated use `GetSearchResultsResponse$inboundSchema` instead. */ - export const inboundSchema = GetSearchResultsResponse$inboundSchema; - /** @deprecated use `GetSearchResultsResponse$outboundSchema` instead. */ - export const outboundSchema = GetSearchResultsResponse$outboundSchema; - /** @deprecated use `GetSearchResultsResponse$Outbound` instead. */ - export type Outbound = GetSearchResultsResponse$Outbound; + /** @deprecated use `GetSearchResultsResponse$inboundSchema` instead. */ + export const inboundSchema = GetSearchResultsResponse$inboundSchema; + /** @deprecated use `GetSearchResultsResponse$outboundSchema` instead. */ + export const outboundSchema = GetSearchResultsResponse$outboundSchema; + /** @deprecated use `GetSearchResultsResponse$Outbound` instead. */ + export type Outbound = GetSearchResultsResponse$Outbound; } diff --git a/src/sdk/models/operations/getserveractivities.ts b/src/sdk/models/operations/getserveractivities.ts index 6fbf2bc7..c8adcd11 100644 --- a/src/sdk/models/operations/getserveractivities.ts +++ b/src/sdk/models/operations/getserveractivities.ts @@ -2,68 +2,73 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Context = { - librarySectionID?: string | undefined; + librarySectionID?: string | undefined; }; export type Activity = { - uuid?: string | undefined; - type?: string | undefined; - cancellable?: boolean | undefined; - userID?: number | undefined; - title?: string | undefined; - subtitle?: string | undefined; - progress?: number | undefined; - context?: Context | undefined; + uuid?: string | undefined; + type?: string | undefined; + cancellable?: boolean | undefined; + userID?: number | undefined; + title?: string | undefined; + subtitle?: string | undefined; + progress?: number | undefined; + context?: Context | undefined; }; export type GetServerActivitiesMediaContainer = { - size?: number | undefined; - activity?: Array | undefined; + size?: number | undefined; + activity?: Array | undefined; }; /** * The Server Activities */ export type GetServerActivitiesResponseBody = { - mediaContainer?: GetServerActivitiesMediaContainer | undefined; + mediaContainer?: GetServerActivitiesMediaContainer | undefined; }; export type GetServerActivitiesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Server Activities - */ - object?: GetServerActivitiesResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Activities + */ + object?: GetServerActivitiesResponseBody | undefined; }; /** @internal */ -export const Context$inboundSchema: z.ZodType = z.object({ +export const Context$inboundSchema: z.ZodType = + z.object({ librarySectionID: z.string().optional(), -}); + }); /** @internal */ export type Context$Outbound = { - librarySectionID?: string | undefined; + librarySectionID?: string | undefined; }; /** @internal */ -export const Context$outboundSchema: z.ZodType = z.object({ - librarySectionID: z.string().optional(), +export const Context$outboundSchema: z.ZodType< + Context$Outbound, + z.ZodTypeDef, + Context +> = z.object({ + librarySectionID: z.string().optional(), }); /** @@ -71,233 +76,230 @@ export const Context$outboundSchema: z.ZodType = z - .object({ - uuid: z.string().optional(), - type: z.string().optional(), - cancellable: z.boolean().optional(), - userID: z.number().optional(), - title: z.string().optional(), - subtitle: z.string().optional(), - progress: z.number().optional(), - Context: z.lazy(() => Context$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - Context: "context", - }); - }); +export const Activity$inboundSchema: z.ZodType< + Activity, + z.ZodTypeDef, + unknown +> = z.object({ + uuid: z.string().optional(), + type: z.string().optional(), + cancellable: z.boolean().optional(), + userID: z.number().optional(), + title: z.string().optional(), + subtitle: z.string().optional(), + progress: z.number().optional(), + Context: z.lazy(() => Context$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Context": "context", + }); +}); /** @internal */ export type Activity$Outbound = { - uuid?: string | undefined; - type?: string | undefined; - cancellable?: boolean | undefined; - userID?: number | undefined; - title?: string | undefined; - subtitle?: string | undefined; - progress?: number | undefined; - Context?: Context$Outbound | undefined; + uuid?: string | undefined; + type?: string | undefined; + cancellable?: boolean | undefined; + userID?: number | undefined; + title?: string | undefined; + subtitle?: string | undefined; + progress?: number | undefined; + Context?: Context$Outbound | undefined; }; /** @internal */ -export const Activity$outboundSchema: z.ZodType = z - .object({ - uuid: z.string().optional(), - type: z.string().optional(), - cancellable: z.boolean().optional(), - userID: z.number().optional(), - title: z.string().optional(), - subtitle: z.string().optional(), - progress: z.number().optional(), - context: z.lazy(() => Context$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - context: "Context", - }); - }); +export const Activity$outboundSchema: z.ZodType< + Activity$Outbound, + z.ZodTypeDef, + Activity +> = z.object({ + uuid: z.string().optional(), + type: z.string().optional(), + cancellable: z.boolean().optional(), + userID: z.number().optional(), + title: z.string().optional(), + subtitle: z.string().optional(), + progress: z.number().optional(), + context: z.lazy(() => Context$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + context: "Context", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Activity$ { - /** @deprecated use `Activity$inboundSchema` instead. */ - export const inboundSchema = Activity$inboundSchema; - /** @deprecated use `Activity$outboundSchema` instead. */ - export const outboundSchema = Activity$outboundSchema; - /** @deprecated use `Activity$Outbound` instead. */ - export type Outbound = Activity$Outbound; + /** @deprecated use `Activity$inboundSchema` instead. */ + export const inboundSchema = Activity$inboundSchema; + /** @deprecated use `Activity$outboundSchema` instead. */ + export const outboundSchema = Activity$outboundSchema; + /** @deprecated use `Activity$Outbound` instead. */ + export type Outbound = Activity$Outbound; } /** @internal */ export const GetServerActivitiesMediaContainer$inboundSchema: z.ZodType< - GetServerActivitiesMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().optional(), - Activity: z.array(z.lazy(() => Activity$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Activity: "activity", - }); - }); + GetServerActivitiesMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + Activity: z.array(z.lazy(() => Activity$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Activity": "activity", + }); +}); /** @internal */ export type GetServerActivitiesMediaContainer$Outbound = { - size?: number | undefined; - Activity?: Array | undefined; + size?: number | undefined; + Activity?: Array | undefined; }; /** @internal */ export const GetServerActivitiesMediaContainer$outboundSchema: z.ZodType< - GetServerActivitiesMediaContainer$Outbound, - z.ZodTypeDef, - GetServerActivitiesMediaContainer -> = z - .object({ - size: z.number().optional(), - activity: z.array(z.lazy(() => Activity$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - activity: "Activity", - }); - }); + GetServerActivitiesMediaContainer$Outbound, + z.ZodTypeDef, + GetServerActivitiesMediaContainer +> = z.object({ + size: z.number().optional(), + activity: z.array(z.lazy(() => Activity$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + activity: "Activity", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerActivitiesMediaContainer$ { - /** @deprecated use `GetServerActivitiesMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesMediaContainer$inboundSchema; - /** @deprecated use `GetServerActivitiesMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesMediaContainer$outboundSchema; - /** @deprecated use `GetServerActivitiesMediaContainer$Outbound` instead. */ - export type Outbound = GetServerActivitiesMediaContainer$Outbound; + /** @deprecated use `GetServerActivitiesMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesMediaContainer$inboundSchema; + /** @deprecated use `GetServerActivitiesMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetServerActivitiesMediaContainer$outboundSchema; + /** @deprecated use `GetServerActivitiesMediaContainer$Outbound` instead. */ + export type Outbound = GetServerActivitiesMediaContainer$Outbound; } /** @internal */ export const GetServerActivitiesResponseBody$inboundSchema: z.ZodType< - GetServerActivitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetServerActivitiesMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetServerActivitiesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetServerActivitiesMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetServerActivitiesResponseBody$Outbound = { - MediaContainer?: GetServerActivitiesMediaContainer$Outbound | undefined; + MediaContainer?: GetServerActivitiesMediaContainer$Outbound | undefined; }; /** @internal */ export const GetServerActivitiesResponseBody$outboundSchema: z.ZodType< - GetServerActivitiesResponseBody$Outbound, - z.ZodTypeDef, - GetServerActivitiesResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetServerActivitiesMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetServerActivitiesResponseBody$Outbound, + z.ZodTypeDef, + GetServerActivitiesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetServerActivitiesMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerActivitiesResponseBody$ { - /** @deprecated use `GetServerActivitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesResponseBody$inboundSchema; - /** @deprecated use `GetServerActivitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesResponseBody$outboundSchema; - /** @deprecated use `GetServerActivitiesResponseBody$Outbound` instead. */ - export type Outbound = GetServerActivitiesResponseBody$Outbound; + /** @deprecated use `GetServerActivitiesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesResponseBody$inboundSchema; + /** @deprecated use `GetServerActivitiesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetServerActivitiesResponseBody$outboundSchema; + /** @deprecated use `GetServerActivitiesResponseBody$Outbound` instead. */ + export type Outbound = GetServerActivitiesResponseBody$Outbound; } /** @internal */ export const GetServerActivitiesResponse$inboundSchema: z.ZodType< - GetServerActivitiesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetServerActivitiesResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetServerActivitiesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerActivitiesResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetServerActivitiesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetServerActivitiesResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerActivitiesResponseBody$Outbound | undefined; }; /** @internal */ export const GetServerActivitiesResponse$outboundSchema: z.ZodType< - GetServerActivitiesResponse$Outbound, - z.ZodTypeDef, - GetServerActivitiesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetServerActivitiesResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetServerActivitiesResponse$Outbound, + z.ZodTypeDef, + GetServerActivitiesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerActivitiesResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerActivitiesResponse$ { - /** @deprecated use `GetServerActivitiesResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerActivitiesResponse$inboundSchema; - /** @deprecated use `GetServerActivitiesResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerActivitiesResponse$outboundSchema; - /** @deprecated use `GetServerActivitiesResponse$Outbound` instead. */ - export type Outbound = GetServerActivitiesResponse$Outbound; + /** @deprecated use `GetServerActivitiesResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerActivitiesResponse$inboundSchema; + /** @deprecated use `GetServerActivitiesResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerActivitiesResponse$outboundSchema; + /** @deprecated use `GetServerActivitiesResponse$Outbound` instead. */ + export type Outbound = GetServerActivitiesResponse$Outbound; } diff --git a/src/sdk/models/operations/getservercapabilities.ts b/src/sdk/models/operations/getservercapabilities.ts index e331d201..e3f836f2 100644 --- a/src/sdk/models/operations/getservercapabilities.ts +++ b/src/sdk/models/operations/getservercapabilities.ts @@ -2,431 +2,433 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Directory = { - count?: number | undefined; - key?: string | undefined; - title?: string | undefined; + count?: number | undefined; + key?: string | undefined; + title?: string | undefined; }; export type MediaContainer = { - size?: number | undefined; - allowCameraUpload?: boolean | undefined; - allowChannelAccess?: boolean | undefined; - allowMediaDeletion?: boolean | undefined; - allowSharing?: boolean | undefined; - allowSync?: boolean | undefined; - allowTuners?: boolean | undefined; - backgroundProcessing?: boolean | undefined; - certificate?: boolean | undefined; - companionProxy?: boolean | undefined; - countryCode?: string | undefined; - diagnostics?: string | undefined; - eventStream?: boolean | undefined; - friendlyName?: string | undefined; - hubSearch?: boolean | undefined; - itemClusters?: boolean | undefined; - livetv?: number | undefined; - machineIdentifier?: string | undefined; - mediaProviders?: boolean | undefined; - multiuser?: boolean | undefined; - musicAnalysis?: number | undefined; - myPlex?: boolean | undefined; - myPlexMappingState?: string | undefined; - myPlexSigninState?: string | undefined; - myPlexSubscription?: boolean | undefined; - myPlexUsername?: string | undefined; - offlineTranscode?: number | undefined; - ownerFeatures?: string | undefined; - photoAutoTag?: boolean | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - pluginHost?: boolean | undefined; - pushNotifications?: boolean | undefined; - readOnlyLibraries?: boolean | undefined; - streamingBrainABRVersion?: number | undefined; - streamingBrainVersion?: number | undefined; - sync?: boolean | undefined; - transcoderActiveVideoSessions?: number | undefined; - transcoderAudio?: boolean | undefined; - transcoderLyrics?: boolean | undefined; - transcoderPhoto?: boolean | undefined; - transcoderSubtitles?: boolean | undefined; - transcoderVideo?: boolean | undefined; - transcoderVideoBitrates?: string | undefined; - transcoderVideoQualities?: string | undefined; - transcoderVideoResolutions?: string | undefined; - updatedAt?: number | undefined; - updater?: boolean | undefined; - version?: string | undefined; - voiceSearch?: boolean | undefined; - directory?: Array | undefined; + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowMediaDeletion?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + hubSearch?: boolean | undefined; + itemClusters?: boolean | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + mediaProviders?: boolean | undefined; + multiuser?: boolean | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + photoAutoTag?: boolean | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderPhoto?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + directory?: Array | undefined; }; /** * The Server Capabilities */ export type GetServerCapabilitiesResponseBody = { - mediaContainer?: MediaContainer | undefined; + mediaContainer?: MediaContainer | undefined; }; export type GetServerCapabilitiesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Server Capabilities - */ - object?: GetServerCapabilitiesResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Capabilities + */ + object?: GetServerCapabilitiesResponseBody | undefined; }; /** @internal */ -export const Directory$inboundSchema: z.ZodType = z.object({ - count: z.number().optional(), - key: z.string().optional(), - title: z.string().optional(), +export const Directory$inboundSchema: z.ZodType< + Directory, + z.ZodTypeDef, + unknown +> = z.object({ + count: z.number().optional(), + key: z.string().optional(), + title: z.string().optional(), }); /** @internal */ export type Directory$Outbound = { - count?: number | undefined; - key?: string | undefined; - title?: string | undefined; + count?: number | undefined; + key?: string | undefined; + title?: string | undefined; }; /** @internal */ -export const Directory$outboundSchema: z.ZodType = - z.object({ - count: z.number().optional(), - key: z.string().optional(), - title: z.string().optional(), - }); +export const Directory$outboundSchema: z.ZodType< + Directory$Outbound, + z.ZodTypeDef, + Directory +> = z.object({ + count: z.number().optional(), + key: z.string().optional(), + title: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Directory$ { - /** @deprecated use `Directory$inboundSchema` instead. */ - export const inboundSchema = Directory$inboundSchema; - /** @deprecated use `Directory$outboundSchema` instead. */ - export const outboundSchema = Directory$outboundSchema; - /** @deprecated use `Directory$Outbound` instead. */ - export type Outbound = Directory$Outbound; + /** @deprecated use `Directory$inboundSchema` instead. */ + export const inboundSchema = Directory$inboundSchema; + /** @deprecated use `Directory$outboundSchema` instead. */ + export const outboundSchema = Directory$outboundSchema; + /** @deprecated use `Directory$Outbound` instead. */ + export type Outbound = Directory$Outbound; } /** @internal */ -export const MediaContainer$inboundSchema: z.ZodType = z - .object({ - size: z.number().optional(), - allowCameraUpload: z.boolean().optional(), - allowChannelAccess: z.boolean().optional(), - allowMediaDeletion: z.boolean().optional(), - allowSharing: z.boolean().optional(), - allowSync: z.boolean().optional(), - allowTuners: z.boolean().optional(), - backgroundProcessing: z.boolean().optional(), - certificate: z.boolean().optional(), - companionProxy: z.boolean().optional(), - countryCode: z.string().optional(), - diagnostics: z.string().optional(), - eventStream: z.boolean().optional(), - friendlyName: z.string().optional(), - hubSearch: z.boolean().optional(), - itemClusters: z.boolean().optional(), - livetv: z.number().optional(), - machineIdentifier: z.string().optional(), - mediaProviders: z.boolean().optional(), - multiuser: z.boolean().optional(), - musicAnalysis: z.number().optional(), - myPlex: z.boolean().optional(), - myPlexMappingState: z.string().optional(), - myPlexSigninState: z.string().optional(), - myPlexSubscription: z.boolean().optional(), - myPlexUsername: z.string().optional(), - offlineTranscode: z.number().optional(), - ownerFeatures: z.string().optional(), - photoAutoTag: z.boolean().optional(), - platform: z.string().optional(), - platformVersion: z.string().optional(), - pluginHost: z.boolean().optional(), - pushNotifications: z.boolean().optional(), - readOnlyLibraries: z.boolean().optional(), - streamingBrainABRVersion: z.number().optional(), - streamingBrainVersion: z.number().optional(), - sync: z.boolean().optional(), - transcoderActiveVideoSessions: z.number().optional(), - transcoderAudio: z.boolean().optional(), - transcoderLyrics: z.boolean().optional(), - transcoderPhoto: z.boolean().optional(), - transcoderSubtitles: z.boolean().optional(), - transcoderVideo: z.boolean().optional(), - transcoderVideoBitrates: z.string().optional(), - transcoderVideoQualities: z.string().optional(), - transcoderVideoResolutions: z.string().optional(), - updatedAt: z.number().optional(), - updater: z.boolean().optional(), - version: z.string().optional(), - voiceSearch: z.boolean().optional(), - Directory: z.array(z.lazy(() => Directory$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Directory: "directory", - }); - }); +export const MediaContainer$inboundSchema: z.ZodType< + MediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowMediaDeletion: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + hubSearch: z.boolean().optional(), + itemClusters: z.boolean().optional(), + livetv: z.number().optional(), + machineIdentifier: z.string().optional(), + mediaProviders: z.boolean().optional(), + multiuser: z.boolean().optional(), + musicAnalysis: z.number().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().optional(), + ownerFeatures: z.string().optional(), + photoAutoTag: z.boolean().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().optional(), + streamingBrainVersion: z.number().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderPhoto: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + Directory: z.array(z.lazy(() => Directory$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Directory": "directory", + }); +}); /** @internal */ export type MediaContainer$Outbound = { - size?: number | undefined; - allowCameraUpload?: boolean | undefined; - allowChannelAccess?: boolean | undefined; - allowMediaDeletion?: boolean | undefined; - allowSharing?: boolean | undefined; - allowSync?: boolean | undefined; - allowTuners?: boolean | undefined; - backgroundProcessing?: boolean | undefined; - certificate?: boolean | undefined; - companionProxy?: boolean | undefined; - countryCode?: string | undefined; - diagnostics?: string | undefined; - eventStream?: boolean | undefined; - friendlyName?: string | undefined; - hubSearch?: boolean | undefined; - itemClusters?: boolean | undefined; - livetv?: number | undefined; - machineIdentifier?: string | undefined; - mediaProviders?: boolean | undefined; - multiuser?: boolean | undefined; - musicAnalysis?: number | undefined; - myPlex?: boolean | undefined; - myPlexMappingState?: string | undefined; - myPlexSigninState?: string | undefined; - myPlexSubscription?: boolean | undefined; - myPlexUsername?: string | undefined; - offlineTranscode?: number | undefined; - ownerFeatures?: string | undefined; - photoAutoTag?: boolean | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - pluginHost?: boolean | undefined; - pushNotifications?: boolean | undefined; - readOnlyLibraries?: boolean | undefined; - streamingBrainABRVersion?: number | undefined; - streamingBrainVersion?: number | undefined; - sync?: boolean | undefined; - transcoderActiveVideoSessions?: number | undefined; - transcoderAudio?: boolean | undefined; - transcoderLyrics?: boolean | undefined; - transcoderPhoto?: boolean | undefined; - transcoderSubtitles?: boolean | undefined; - transcoderVideo?: boolean | undefined; - transcoderVideoBitrates?: string | undefined; - transcoderVideoQualities?: string | undefined; - transcoderVideoResolutions?: string | undefined; - updatedAt?: number | undefined; - updater?: boolean | undefined; - version?: string | undefined; - voiceSearch?: boolean | undefined; - Directory?: Array | undefined; + size?: number | undefined; + allowCameraUpload?: boolean | undefined; + allowChannelAccess?: boolean | undefined; + allowMediaDeletion?: boolean | undefined; + allowSharing?: boolean | undefined; + allowSync?: boolean | undefined; + allowTuners?: boolean | undefined; + backgroundProcessing?: boolean | undefined; + certificate?: boolean | undefined; + companionProxy?: boolean | undefined; + countryCode?: string | undefined; + diagnostics?: string | undefined; + eventStream?: boolean | undefined; + friendlyName?: string | undefined; + hubSearch?: boolean | undefined; + itemClusters?: boolean | undefined; + livetv?: number | undefined; + machineIdentifier?: string | undefined; + mediaProviders?: boolean | undefined; + multiuser?: boolean | undefined; + musicAnalysis?: number | undefined; + myPlex?: boolean | undefined; + myPlexMappingState?: string | undefined; + myPlexSigninState?: string | undefined; + myPlexSubscription?: boolean | undefined; + myPlexUsername?: string | undefined; + offlineTranscode?: number | undefined; + ownerFeatures?: string | undefined; + photoAutoTag?: boolean | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + pluginHost?: boolean | undefined; + pushNotifications?: boolean | undefined; + readOnlyLibraries?: boolean | undefined; + streamingBrainABRVersion?: number | undefined; + streamingBrainVersion?: number | undefined; + sync?: boolean | undefined; + transcoderActiveVideoSessions?: number | undefined; + transcoderAudio?: boolean | undefined; + transcoderLyrics?: boolean | undefined; + transcoderPhoto?: boolean | undefined; + transcoderSubtitles?: boolean | undefined; + transcoderVideo?: boolean | undefined; + transcoderVideoBitrates?: string | undefined; + transcoderVideoQualities?: string | undefined; + transcoderVideoResolutions?: string | undefined; + updatedAt?: number | undefined; + updater?: boolean | undefined; + version?: string | undefined; + voiceSearch?: boolean | undefined; + Directory?: Array | undefined; }; /** @internal */ export const MediaContainer$outboundSchema: z.ZodType< - MediaContainer$Outbound, - z.ZodTypeDef, - MediaContainer -> = z - .object({ - size: z.number().optional(), - allowCameraUpload: z.boolean().optional(), - allowChannelAccess: z.boolean().optional(), - allowMediaDeletion: z.boolean().optional(), - allowSharing: z.boolean().optional(), - allowSync: z.boolean().optional(), - allowTuners: z.boolean().optional(), - backgroundProcessing: z.boolean().optional(), - certificate: z.boolean().optional(), - companionProxy: z.boolean().optional(), - countryCode: z.string().optional(), - diagnostics: z.string().optional(), - eventStream: z.boolean().optional(), - friendlyName: z.string().optional(), - hubSearch: z.boolean().optional(), - itemClusters: z.boolean().optional(), - livetv: z.number().optional(), - machineIdentifier: z.string().optional(), - mediaProviders: z.boolean().optional(), - multiuser: z.boolean().optional(), - musicAnalysis: z.number().optional(), - myPlex: z.boolean().optional(), - myPlexMappingState: z.string().optional(), - myPlexSigninState: z.string().optional(), - myPlexSubscription: z.boolean().optional(), - myPlexUsername: z.string().optional(), - offlineTranscode: z.number().optional(), - ownerFeatures: z.string().optional(), - photoAutoTag: z.boolean().optional(), - platform: z.string().optional(), - platformVersion: z.string().optional(), - pluginHost: z.boolean().optional(), - pushNotifications: z.boolean().optional(), - readOnlyLibraries: z.boolean().optional(), - streamingBrainABRVersion: z.number().optional(), - streamingBrainVersion: z.number().optional(), - sync: z.boolean().optional(), - transcoderActiveVideoSessions: z.number().optional(), - transcoderAudio: z.boolean().optional(), - transcoderLyrics: z.boolean().optional(), - transcoderPhoto: z.boolean().optional(), - transcoderSubtitles: z.boolean().optional(), - transcoderVideo: z.boolean().optional(), - transcoderVideoBitrates: z.string().optional(), - transcoderVideoQualities: z.string().optional(), - transcoderVideoResolutions: z.string().optional(), - updatedAt: z.number().optional(), - updater: z.boolean().optional(), - version: z.string().optional(), - voiceSearch: z.boolean().optional(), - directory: z.array(z.lazy(() => Directory$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - directory: "Directory", - }); - }); + MediaContainer$Outbound, + z.ZodTypeDef, + MediaContainer +> = z.object({ + size: z.number().optional(), + allowCameraUpload: z.boolean().optional(), + allowChannelAccess: z.boolean().optional(), + allowMediaDeletion: z.boolean().optional(), + allowSharing: z.boolean().optional(), + allowSync: z.boolean().optional(), + allowTuners: z.boolean().optional(), + backgroundProcessing: z.boolean().optional(), + certificate: z.boolean().optional(), + companionProxy: z.boolean().optional(), + countryCode: z.string().optional(), + diagnostics: z.string().optional(), + eventStream: z.boolean().optional(), + friendlyName: z.string().optional(), + hubSearch: z.boolean().optional(), + itemClusters: z.boolean().optional(), + livetv: z.number().optional(), + machineIdentifier: z.string().optional(), + mediaProviders: z.boolean().optional(), + multiuser: z.boolean().optional(), + musicAnalysis: z.number().optional(), + myPlex: z.boolean().optional(), + myPlexMappingState: z.string().optional(), + myPlexSigninState: z.string().optional(), + myPlexSubscription: z.boolean().optional(), + myPlexUsername: z.string().optional(), + offlineTranscode: z.number().optional(), + ownerFeatures: z.string().optional(), + photoAutoTag: z.boolean().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + pluginHost: z.boolean().optional(), + pushNotifications: z.boolean().optional(), + readOnlyLibraries: z.boolean().optional(), + streamingBrainABRVersion: z.number().optional(), + streamingBrainVersion: z.number().optional(), + sync: z.boolean().optional(), + transcoderActiveVideoSessions: z.number().optional(), + transcoderAudio: z.boolean().optional(), + transcoderLyrics: z.boolean().optional(), + transcoderPhoto: z.boolean().optional(), + transcoderSubtitles: z.boolean().optional(), + transcoderVideo: z.boolean().optional(), + transcoderVideoBitrates: z.string().optional(), + transcoderVideoQualities: z.string().optional(), + transcoderVideoResolutions: z.string().optional(), + updatedAt: z.number().optional(), + updater: z.boolean().optional(), + version: z.string().optional(), + voiceSearch: z.boolean().optional(), + directory: z.array(z.lazy(() => Directory$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + directory: "Directory", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MediaContainer$ { - /** @deprecated use `MediaContainer$inboundSchema` instead. */ - export const inboundSchema = MediaContainer$inboundSchema; - /** @deprecated use `MediaContainer$outboundSchema` instead. */ - export const outboundSchema = MediaContainer$outboundSchema; - /** @deprecated use `MediaContainer$Outbound` instead. */ - export type Outbound = MediaContainer$Outbound; + /** @deprecated use `MediaContainer$inboundSchema` instead. */ + export const inboundSchema = MediaContainer$inboundSchema; + /** @deprecated use `MediaContainer$outboundSchema` instead. */ + export const outboundSchema = MediaContainer$outboundSchema; + /** @deprecated use `MediaContainer$Outbound` instead. */ + export type Outbound = MediaContainer$Outbound; } /** @internal */ export const GetServerCapabilitiesResponseBody$inboundSchema: z.ZodType< - GetServerCapabilitiesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => MediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetServerCapabilitiesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => MediaContainer$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetServerCapabilitiesResponseBody$Outbound = { - MediaContainer?: MediaContainer$Outbound | undefined; + MediaContainer?: MediaContainer$Outbound | undefined; }; /** @internal */ export const GetServerCapabilitiesResponseBody$outboundSchema: z.ZodType< - GetServerCapabilitiesResponseBody$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => MediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetServerCapabilitiesResponseBody$Outbound, + z.ZodTypeDef, + GetServerCapabilitiesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => MediaContainer$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerCapabilitiesResponseBody$ { - /** @deprecated use `GetServerCapabilitiesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerCapabilitiesResponseBody$inboundSchema; - /** @deprecated use `GetServerCapabilitiesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerCapabilitiesResponseBody$outboundSchema; - /** @deprecated use `GetServerCapabilitiesResponseBody$Outbound` instead. */ - export type Outbound = GetServerCapabilitiesResponseBody$Outbound; + /** @deprecated use `GetServerCapabilitiesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetServerCapabilitiesResponseBody$inboundSchema; + /** @deprecated use `GetServerCapabilitiesResponseBody$outboundSchema` instead. */ + export const outboundSchema = + GetServerCapabilitiesResponseBody$outboundSchema; + /** @deprecated use `GetServerCapabilitiesResponseBody$Outbound` instead. */ + export type Outbound = GetServerCapabilitiesResponseBody$Outbound; } /** @internal */ export const GetServerCapabilitiesResponse$inboundSchema: z.ZodType< - GetServerCapabilitiesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetServerCapabilitiesResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetServerCapabilitiesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerCapabilitiesResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetServerCapabilitiesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetServerCapabilitiesResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerCapabilitiesResponseBody$Outbound | undefined; }; /** @internal */ export const GetServerCapabilitiesResponse$outboundSchema: z.ZodType< - GetServerCapabilitiesResponse$Outbound, - z.ZodTypeDef, - GetServerCapabilitiesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetServerCapabilitiesResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetServerCapabilitiesResponse$Outbound, + z.ZodTypeDef, + GetServerCapabilitiesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerCapabilitiesResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerCapabilitiesResponse$ { - /** @deprecated use `GetServerCapabilitiesResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerCapabilitiesResponse$inboundSchema; - /** @deprecated use `GetServerCapabilitiesResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerCapabilitiesResponse$outboundSchema; - /** @deprecated use `GetServerCapabilitiesResponse$Outbound` instead. */ - export type Outbound = GetServerCapabilitiesResponse$Outbound; + /** @deprecated use `GetServerCapabilitiesResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerCapabilitiesResponse$inboundSchema; + /** @deprecated use `GetServerCapabilitiesResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerCapabilitiesResponse$outboundSchema; + /** @deprecated use `GetServerCapabilitiesResponse$Outbound` instead. */ + export type Outbound = GetServerCapabilitiesResponse$Outbound; } diff --git a/src/sdk/models/operations/getserveridentity.ts b/src/sdk/models/operations/getserveridentity.ts index 1a26ba58..bf7e069d 100644 --- a/src/sdk/models/operations/getserveridentity.ts +++ b/src/sdk/models/operations/getserveridentity.ts @@ -2,72 +2,72 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerIdentityMediaContainer = { - size?: number | undefined; - claimed?: boolean | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; + size?: number | undefined; + claimed?: boolean | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; }; /** * The Server Identity information */ export type GetServerIdentityResponseBody = { - mediaContainer?: GetServerIdentityMediaContainer | undefined; + mediaContainer?: GetServerIdentityMediaContainer | undefined; }; export type GetServerIdentityResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Server Identity information - */ - object?: GetServerIdentityResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Identity information + */ + object?: GetServerIdentityResponseBody | undefined; }; /** @internal */ export const GetServerIdentityMediaContainer$inboundSchema: z.ZodType< - GetServerIdentityMediaContainer, - z.ZodTypeDef, - unknown + GetServerIdentityMediaContainer, + z.ZodTypeDef, + unknown > = z.object({ - size: z.number().optional(), - claimed: z.boolean().optional(), - machineIdentifier: z.string().optional(), - version: z.string().optional(), + size: z.number().optional(), + claimed: z.boolean().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), }); /** @internal */ export type GetServerIdentityMediaContainer$Outbound = { - size?: number | undefined; - claimed?: boolean | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; + size?: number | undefined; + claimed?: boolean | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; }; /** @internal */ export const GetServerIdentityMediaContainer$outboundSchema: z.ZodType< - GetServerIdentityMediaContainer$Outbound, - z.ZodTypeDef, - GetServerIdentityMediaContainer + GetServerIdentityMediaContainer$Outbound, + z.ZodTypeDef, + GetServerIdentityMediaContainer > = z.object({ - size: z.number().optional(), - claimed: z.boolean().optional(), - machineIdentifier: z.string().optional(), - version: z.string().optional(), + size: z.number().optional(), + claimed: z.boolean().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), }); /** @@ -75,121 +75,115 @@ export const GetServerIdentityMediaContainer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerIdentityMediaContainer$ { - /** @deprecated use `GetServerIdentityMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetServerIdentityMediaContainer$inboundSchema; - /** @deprecated use `GetServerIdentityMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetServerIdentityMediaContainer$outboundSchema; - /** @deprecated use `GetServerIdentityMediaContainer$Outbound` instead. */ - export type Outbound = GetServerIdentityMediaContainer$Outbound; + /** @deprecated use `GetServerIdentityMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetServerIdentityMediaContainer$inboundSchema; + /** @deprecated use `GetServerIdentityMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetServerIdentityMediaContainer$outboundSchema; + /** @deprecated use `GetServerIdentityMediaContainer$Outbound` instead. */ + export type Outbound = GetServerIdentityMediaContainer$Outbound; } /** @internal */ export const GetServerIdentityResponseBody$inboundSchema: z.ZodType< - GetServerIdentityResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetServerIdentityMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetServerIdentityResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetServerIdentityMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetServerIdentityResponseBody$Outbound = { - MediaContainer?: GetServerIdentityMediaContainer$Outbound | undefined; + MediaContainer?: GetServerIdentityMediaContainer$Outbound | undefined; }; /** @internal */ export const GetServerIdentityResponseBody$outboundSchema: z.ZodType< - GetServerIdentityResponseBody$Outbound, - z.ZodTypeDef, - GetServerIdentityResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetServerIdentityMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetServerIdentityResponseBody$Outbound, + z.ZodTypeDef, + GetServerIdentityResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetServerIdentityMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerIdentityResponseBody$ { - /** @deprecated use `GetServerIdentityResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerIdentityResponseBody$inboundSchema; - /** @deprecated use `GetServerIdentityResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerIdentityResponseBody$outboundSchema; - /** @deprecated use `GetServerIdentityResponseBody$Outbound` instead. */ - export type Outbound = GetServerIdentityResponseBody$Outbound; + /** @deprecated use `GetServerIdentityResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetServerIdentityResponseBody$inboundSchema; + /** @deprecated use `GetServerIdentityResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetServerIdentityResponseBody$outboundSchema; + /** @deprecated use `GetServerIdentityResponseBody$Outbound` instead. */ + export type Outbound = GetServerIdentityResponseBody$Outbound; } /** @internal */ export const GetServerIdentityResponse$inboundSchema: z.ZodType< - GetServerIdentityResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetServerIdentityResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetServerIdentityResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerIdentityResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetServerIdentityResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetServerIdentityResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerIdentityResponseBody$Outbound | undefined; }; /** @internal */ export const GetServerIdentityResponse$outboundSchema: z.ZodType< - GetServerIdentityResponse$Outbound, - z.ZodTypeDef, - GetServerIdentityResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetServerIdentityResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetServerIdentityResponse$Outbound, + z.ZodTypeDef, + GetServerIdentityResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerIdentityResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerIdentityResponse$ { - /** @deprecated use `GetServerIdentityResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerIdentityResponse$inboundSchema; - /** @deprecated use `GetServerIdentityResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerIdentityResponse$outboundSchema; - /** @deprecated use `GetServerIdentityResponse$Outbound` instead. */ - export type Outbound = GetServerIdentityResponse$Outbound; + /** @deprecated use `GetServerIdentityResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerIdentityResponse$inboundSchema; + /** @deprecated use `GetServerIdentityResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerIdentityResponse$outboundSchema; + /** @deprecated use `GetServerIdentityResponse$Outbound` instead. */ + export type Outbound = GetServerIdentityResponse$Outbound; } diff --git a/src/sdk/models/operations/getserverlist.ts b/src/sdk/models/operations/getserverlist.ts index f9959212..1aba864b 100644 --- a/src/sdk/models/operations/getserverlist.ts +++ b/src/sdk/models/operations/getserverlist.ts @@ -2,85 +2,85 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetServerListServer = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; }; export type GetServerListMediaContainer = { - size?: number | undefined; - server?: Array | undefined; + size?: number | undefined; + server?: Array | undefined; }; /** * List of Servers */ export type GetServerListResponseBody = { - mediaContainer?: GetServerListMediaContainer | undefined; + mediaContainer?: GetServerListMediaContainer | undefined; }; export type GetServerListResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * List of Servers - */ - object?: GetServerListResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * List of Servers + */ + object?: GetServerListResponseBody | undefined; }; /** @internal */ export const GetServerListServer$inboundSchema: z.ZodType< - GetServerListServer, - z.ZodTypeDef, - unknown + GetServerListServer, + z.ZodTypeDef, + unknown > = z.object({ - name: z.string().optional(), - host: z.string().optional(), - address: z.string().optional(), - port: z.number().optional(), - machineIdentifier: z.string().optional(), - version: z.string().optional(), + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), }); /** @internal */ export type GetServerListServer$Outbound = { - name?: string | undefined; - host?: string | undefined; - address?: string | undefined; - port?: number | undefined; - machineIdentifier?: string | undefined; - version?: string | undefined; + name?: string | undefined; + host?: string | undefined; + address?: string | undefined; + port?: number | undefined; + machineIdentifier?: string | undefined; + version?: string | undefined; }; /** @internal */ export const GetServerListServer$outboundSchema: z.ZodType< - GetServerListServer$Outbound, - z.ZodTypeDef, - GetServerListServer + GetServerListServer$Outbound, + z.ZodTypeDef, + GetServerListServer > = z.object({ - name: z.string().optional(), - host: z.string().optional(), - address: z.string().optional(), - port: z.number().optional(), - machineIdentifier: z.string().optional(), - version: z.string().optional(), + name: z.string().optional(), + host: z.string().optional(), + address: z.string().optional(), + port: z.number().optional(), + machineIdentifier: z.string().optional(), + version: z.string().optional(), }); /** @@ -88,172 +88,162 @@ export const GetServerListServer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListServer$ { - /** @deprecated use `GetServerListServer$inboundSchema` instead. */ - export const inboundSchema = GetServerListServer$inboundSchema; - /** @deprecated use `GetServerListServer$outboundSchema` instead. */ - export const outboundSchema = GetServerListServer$outboundSchema; - /** @deprecated use `GetServerListServer$Outbound` instead. */ - export type Outbound = GetServerListServer$Outbound; + /** @deprecated use `GetServerListServer$inboundSchema` instead. */ + export const inboundSchema = GetServerListServer$inboundSchema; + /** @deprecated use `GetServerListServer$outboundSchema` instead. */ + export const outboundSchema = GetServerListServer$outboundSchema; + /** @deprecated use `GetServerListServer$Outbound` instead. */ + export type Outbound = GetServerListServer$Outbound; } /** @internal */ export const GetServerListMediaContainer$inboundSchema: z.ZodType< - GetServerListMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().optional(), - Server: z.array(z.lazy(() => GetServerListServer$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Server: "server", - }); - }); + GetServerListMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().optional(), + Server: z.array(z.lazy(() => GetServerListServer$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Server": "server", + }); +}); /** @internal */ export type GetServerListMediaContainer$Outbound = { - size?: number | undefined; - Server?: Array | undefined; + size?: number | undefined; + Server?: Array | undefined; }; /** @internal */ export const GetServerListMediaContainer$outboundSchema: z.ZodType< - GetServerListMediaContainer$Outbound, - z.ZodTypeDef, - GetServerListMediaContainer -> = z - .object({ - size: z.number().optional(), - server: z.array(z.lazy(() => GetServerListServer$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - server: "Server", - }); - }); + GetServerListMediaContainer$Outbound, + z.ZodTypeDef, + GetServerListMediaContainer +> = z.object({ + size: z.number().optional(), + server: z.array(z.lazy(() => GetServerListServer$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + server: "Server", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListMediaContainer$ { - /** @deprecated use `GetServerListMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetServerListMediaContainer$inboundSchema; - /** @deprecated use `GetServerListMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetServerListMediaContainer$outboundSchema; - /** @deprecated use `GetServerListMediaContainer$Outbound` instead. */ - export type Outbound = GetServerListMediaContainer$Outbound; + /** @deprecated use `GetServerListMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetServerListMediaContainer$inboundSchema; + /** @deprecated use `GetServerListMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetServerListMediaContainer$outboundSchema; + /** @deprecated use `GetServerListMediaContainer$Outbound` instead. */ + export type Outbound = GetServerListMediaContainer$Outbound; } /** @internal */ export const GetServerListResponseBody$inboundSchema: z.ZodType< - GetServerListResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetServerListMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetServerListResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetServerListMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetServerListResponseBody$Outbound = { - MediaContainer?: GetServerListMediaContainer$Outbound | undefined; + MediaContainer?: GetServerListMediaContainer$Outbound | undefined; }; /** @internal */ export const GetServerListResponseBody$outboundSchema: z.ZodType< - GetServerListResponseBody$Outbound, - z.ZodTypeDef, - GetServerListResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetServerListMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetServerListResponseBody$Outbound, + z.ZodTypeDef, + GetServerListResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetServerListMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListResponseBody$ { - /** @deprecated use `GetServerListResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerListResponseBody$inboundSchema; - /** @deprecated use `GetServerListResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerListResponseBody$outboundSchema; - /** @deprecated use `GetServerListResponseBody$Outbound` instead. */ - export type Outbound = GetServerListResponseBody$Outbound; + /** @deprecated use `GetServerListResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetServerListResponseBody$inboundSchema; + /** @deprecated use `GetServerListResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetServerListResponseBody$outboundSchema; + /** @deprecated use `GetServerListResponseBody$Outbound` instead. */ + export type Outbound = GetServerListResponseBody$Outbound; } /** @internal */ export const GetServerListResponse$inboundSchema: z.ZodType< - GetServerListResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetServerListResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetServerListResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerListResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetServerListResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetServerListResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerListResponseBody$Outbound | undefined; }; /** @internal */ export const GetServerListResponse$outboundSchema: z.ZodType< - GetServerListResponse$Outbound, - z.ZodTypeDef, - GetServerListResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetServerListResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetServerListResponse$Outbound, + z.ZodTypeDef, + GetServerListResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerListResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerListResponse$ { - /** @deprecated use `GetServerListResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerListResponse$inboundSchema; - /** @deprecated use `GetServerListResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerListResponse$outboundSchema; - /** @deprecated use `GetServerListResponse$Outbound` instead. */ - export type Outbound = GetServerListResponse$Outbound; + /** @deprecated use `GetServerListResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerListResponse$inboundSchema; + /** @deprecated use `GetServerListResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerListResponse$outboundSchema; + /** @deprecated use `GetServerListResponse$Outbound` instead. */ + export type Outbound = GetServerListResponse$Outbound; } diff --git a/src/sdk/models/operations/getserverpreferences.ts b/src/sdk/models/operations/getserverpreferences.ts index 77a2bf29..abcc27b6 100644 --- a/src/sdk/models/operations/getserverpreferences.ts +++ b/src/sdk/models/operations/getserverpreferences.ts @@ -2,55 +2,56 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Setting = { - id?: string | undefined; - label?: string | undefined; - summary?: string | undefined; - type?: string | undefined; - default?: boolean | undefined; - value?: boolean | undefined; - hidden?: boolean | undefined; - advanced?: boolean | undefined; - group?: string | undefined; - enumValues?: string | undefined; + id?: string | undefined; + label?: string | undefined; + summary?: string | undefined; + type?: string | undefined; + default?: boolean | undefined; + value?: boolean | undefined; + hidden?: boolean | undefined; + advanced?: boolean | undefined; + group?: string | undefined; + enumValues?: string | undefined; }; export type GetServerPreferencesMediaContainer = { - size?: number | undefined; - setting?: Array | undefined; + size?: number | undefined; + setting?: Array | undefined; }; /** * Server Preferences */ export type GetServerPreferencesResponseBody = { - mediaContainer?: GetServerPreferencesMediaContainer | undefined; + mediaContainer?: GetServerPreferencesMediaContainer | undefined; }; export type GetServerPreferencesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Server Preferences - */ - object?: GetServerPreferencesResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Server Preferences + */ + object?: GetServerPreferencesResponseBody | undefined; }; /** @internal */ -export const Setting$inboundSchema: z.ZodType = z.object({ +export const Setting$inboundSchema: z.ZodType = + z.object({ id: z.string().optional(), label: z.string().optional(), summary: z.string().optional(), @@ -61,34 +62,38 @@ export const Setting$inboundSchema: z.ZodType = advanced: z.boolean().optional(), group: z.string().optional(), enumValues: z.string().optional(), -}); + }); /** @internal */ export type Setting$Outbound = { - id?: string | undefined; - label?: string | undefined; - summary?: string | undefined; - type?: string | undefined; - default?: boolean | undefined; - value?: boolean | undefined; - hidden?: boolean | undefined; - advanced?: boolean | undefined; - group?: string | undefined; - enumValues?: string | undefined; + id?: string | undefined; + label?: string | undefined; + summary?: string | undefined; + type?: string | undefined; + default?: boolean | undefined; + value?: boolean | undefined; + hidden?: boolean | undefined; + advanced?: boolean | undefined; + group?: string | undefined; + enumValues?: string | undefined; }; /** @internal */ -export const Setting$outboundSchema: z.ZodType = z.object({ - id: z.string().optional(), - label: z.string().optional(), - summary: z.string().optional(), - type: z.string().optional(), - default: z.boolean().optional(), - value: z.boolean().optional(), - hidden: z.boolean().optional(), - advanced: z.boolean().optional(), - group: z.string().optional(), - enumValues: z.string().optional(), +export const Setting$outboundSchema: z.ZodType< + Setting$Outbound, + z.ZodTypeDef, + Setting +> = z.object({ + id: z.string().optional(), + label: z.string().optional(), + summary: z.string().optional(), + type: z.string().optional(), + default: z.boolean().optional(), + value: z.boolean().optional(), + hidden: z.boolean().optional(), + advanced: z.boolean().optional(), + group: z.string().optional(), + enumValues: z.string().optional(), }); /** @@ -96,172 +101,166 @@ export const Setting$outboundSchema: z.ZodType = z - .object({ - size: z.number().int().optional(), - Setting: z.array(z.lazy(() => Setting$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Setting: "setting", - }); - }); + GetServerPreferencesMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Setting: z.array(z.lazy(() => Setting$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Setting": "setting", + }); +}); /** @internal */ export type GetServerPreferencesMediaContainer$Outbound = { - size?: number | undefined; - Setting?: Array | undefined; + size?: number | undefined; + Setting?: Array | undefined; }; /** @internal */ export const GetServerPreferencesMediaContainer$outboundSchema: z.ZodType< - GetServerPreferencesMediaContainer$Outbound, - z.ZodTypeDef, - GetServerPreferencesMediaContainer -> = z - .object({ - size: z.number().int().optional(), - setting: z.array(z.lazy(() => Setting$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - setting: "Setting", - }); - }); + GetServerPreferencesMediaContainer$Outbound, + z.ZodTypeDef, + GetServerPreferencesMediaContainer +> = z.object({ + size: z.number().int().optional(), + setting: z.array(z.lazy(() => Setting$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + setting: "Setting", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerPreferencesMediaContainer$ { - /** @deprecated use `GetServerPreferencesMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesMediaContainer$inboundSchema; - /** @deprecated use `GetServerPreferencesMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesMediaContainer$outboundSchema; - /** @deprecated use `GetServerPreferencesMediaContainer$Outbound` instead. */ - export type Outbound = GetServerPreferencesMediaContainer$Outbound; + /** @deprecated use `GetServerPreferencesMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesMediaContainer$inboundSchema; + /** @deprecated use `GetServerPreferencesMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetServerPreferencesMediaContainer$outboundSchema; + /** @deprecated use `GetServerPreferencesMediaContainer$Outbound` instead. */ + export type Outbound = GetServerPreferencesMediaContainer$Outbound; } /** @internal */ export const GetServerPreferencesResponseBody$inboundSchema: z.ZodType< - GetServerPreferencesResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetServerPreferencesMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetServerPreferencesResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetServerPreferencesMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetServerPreferencesResponseBody$Outbound = { - MediaContainer?: GetServerPreferencesMediaContainer$Outbound | undefined; + MediaContainer?: GetServerPreferencesMediaContainer$Outbound | undefined; }; /** @internal */ export const GetServerPreferencesResponseBody$outboundSchema: z.ZodType< - GetServerPreferencesResponseBody$Outbound, - z.ZodTypeDef, - GetServerPreferencesResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetServerPreferencesMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetServerPreferencesResponseBody$Outbound, + z.ZodTypeDef, + GetServerPreferencesResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetServerPreferencesMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerPreferencesResponseBody$ { - /** @deprecated use `GetServerPreferencesResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesResponseBody$inboundSchema; - /** @deprecated use `GetServerPreferencesResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesResponseBody$outboundSchema; - /** @deprecated use `GetServerPreferencesResponseBody$Outbound` instead. */ - export type Outbound = GetServerPreferencesResponseBody$Outbound; + /** @deprecated use `GetServerPreferencesResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesResponseBody$inboundSchema; + /** @deprecated use `GetServerPreferencesResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesResponseBody$outboundSchema; + /** @deprecated use `GetServerPreferencesResponseBody$Outbound` instead. */ + export type Outbound = GetServerPreferencesResponseBody$Outbound; } /** @internal */ export const GetServerPreferencesResponse$inboundSchema: z.ZodType< - GetServerPreferencesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetServerPreferencesResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetServerPreferencesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetServerPreferencesResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetServerPreferencesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetServerPreferencesResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetServerPreferencesResponseBody$Outbound | undefined; }; /** @internal */ export const GetServerPreferencesResponse$outboundSchema: z.ZodType< - GetServerPreferencesResponse$Outbound, - z.ZodTypeDef, - GetServerPreferencesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetServerPreferencesResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetServerPreferencesResponse$Outbound, + z.ZodTypeDef, + GetServerPreferencesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetServerPreferencesResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerPreferencesResponse$ { - /** @deprecated use `GetServerPreferencesResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerPreferencesResponse$inboundSchema; - /** @deprecated use `GetServerPreferencesResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerPreferencesResponse$outboundSchema; - /** @deprecated use `GetServerPreferencesResponse$Outbound` instead. */ - export type Outbound = GetServerPreferencesResponse$Outbound; + /** @deprecated use `GetServerPreferencesResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerPreferencesResponse$inboundSchema; + /** @deprecated use `GetServerPreferencesResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerPreferencesResponse$outboundSchema; + /** @deprecated use `GetServerPreferencesResponse$Outbound` instead. */ + export type Outbound = GetServerPreferencesResponse$Outbound; } diff --git a/src/sdk/models/operations/getserverresources.ts b/src/sdk/models/operations/getserverresources.ts index bcb39056..576837e2 100644 --- a/src/sdk/models/operations/getserverresources.ts +++ b/src/sdk/models/operations/getserverresources.ts @@ -2,29 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetServerResourcesServerList = ["https://plex.tv/api/v2/"] as const; +export const GetServerResourcesServerList = [ + "https://plex.tv/api/v2/", +] as const; export type GetServerResourcesGlobals = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; }; /** * Include Https entries in the results */ export enum IncludeHttps { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** @@ -32,506 +33,483 @@ export enum IncludeHttps { * * @remarks * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - * */ export enum IncludeRelay { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } /** * Include IPv6 entries in the results */ export enum IncludeIPv6 { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type GetServerResourcesRequest = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; - /** - * Plex Authentication Token - */ - xPlexToken: string; - /** - * Include Https entries in the results - */ - includeHttps?: IncludeHttps | undefined; - /** - * Include Relay addresses in the results - * - * @remarks - * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 - * - */ - includeRelay?: IncludeRelay | undefined; - /** - * Include IPv6 entries in the results - */ - includeIPv6?: IncludeIPv6 | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; + /** + * Include Https entries in the results + */ + includeHttps?: IncludeHttps | undefined; + /** + * Include Relay addresses in the results + * + * @remarks + * E.g: https://10-0-0-25.bbf8e10c7fa20447cacee74cd9914cde.plex.direct:32400 + */ + includeRelay?: IncludeRelay | undefined; + /** + * Include IPv6 entries in the results + */ + includeIPv6?: IncludeIPv6 | undefined; }; export type Connections = { - protocol: string; - address: string; - port: number; - uri: string; - local: boolean; - relay: boolean; - iPv6: boolean; + protocol: string; + address: string; + port: number; + uri: string; + local: boolean; + relay: boolean; + iPv6: boolean; }; export type PlexDevice = { - name: string; - product: string; - productVersion: string; - platform: string | null; - platformVersion: string | null; - device: string | null; - clientIdentifier: string; - createdAt: Date; - lastSeenAt: Date; - provides: string; - /** - * ownerId is null when the device is owned by the token used to send the request - */ - ownerId: number | null; - sourceTitle: string | null; - publicAddress: string; - accessToken: string; - owned: boolean; - home: boolean; - synced: boolean; - relay: boolean; - presence: boolean; - httpsRequired: boolean; - publicAddressMatches: boolean; - dnsRebindingProtection: boolean; - natLoopbackSupported: boolean; - connections: Array; + name: string; + product: string; + productVersion: string; + platform: string | null; + platformVersion: string | null; + device: string | null; + clientIdentifier: string; + createdAt: Date; + lastSeenAt: Date; + provides: string; + /** + * ownerId is null when the device is owned by the token used to send the request + */ + ownerId: number | null; + sourceTitle: string | null; + publicAddress: string; + accessToken: string; + owned: boolean; + home: boolean; + synced: boolean; + relay: boolean; + presence: boolean; + httpsRequired: boolean; + publicAddressMatches: boolean; + dnsRebindingProtection: boolean; + natLoopbackSupported: boolean; + connections: Array; }; export type GetServerResourcesResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * List of Plex Devices. This includes Plex hosted servers and clients - */ - plexDevices?: Array | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * List of Plex Devices. This includes Plex hosted servers and clients + */ + plexDevices?: Array | undefined; }; /** @internal */ export const GetServerResourcesGlobals$inboundSchema: z.ZodType< - GetServerResourcesGlobals, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - }); - }); + GetServerResourcesGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type GetServerResourcesGlobals$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Client-Identifier"?: string | undefined; }; /** @internal */ export const GetServerResourcesGlobals$outboundSchema: z.ZodType< - GetServerResourcesGlobals$Outbound, - z.ZodTypeDef, - GetServerResourcesGlobals -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - }); - }); + GetServerResourcesGlobals$Outbound, + z.ZodTypeDef, + GetServerResourcesGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerResourcesGlobals$ { - /** @deprecated use `GetServerResourcesGlobals$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesGlobals$inboundSchema; - /** @deprecated use `GetServerResourcesGlobals$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesGlobals$outboundSchema; - /** @deprecated use `GetServerResourcesGlobals$Outbound` instead. */ - export type Outbound = GetServerResourcesGlobals$Outbound; + /** @deprecated use `GetServerResourcesGlobals$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesGlobals$inboundSchema; + /** @deprecated use `GetServerResourcesGlobals$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesGlobals$outboundSchema; + /** @deprecated use `GetServerResourcesGlobals$Outbound` instead. */ + export type Outbound = GetServerResourcesGlobals$Outbound; } /** @internal */ export const IncludeHttps$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeHttps); + z.nativeEnum(IncludeHttps); /** @internal */ export const IncludeHttps$outboundSchema: z.ZodNativeEnum = - IncludeHttps$inboundSchema; + IncludeHttps$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeHttps$ { - /** @deprecated use `IncludeHttps$inboundSchema` instead. */ - export const inboundSchema = IncludeHttps$inboundSchema; - /** @deprecated use `IncludeHttps$outboundSchema` instead. */ - export const outboundSchema = IncludeHttps$outboundSchema; + /** @deprecated use `IncludeHttps$inboundSchema` instead. */ + export const inboundSchema = IncludeHttps$inboundSchema; + /** @deprecated use `IncludeHttps$outboundSchema` instead. */ + export const outboundSchema = IncludeHttps$outboundSchema; } /** @internal */ export const IncludeRelay$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeRelay); + z.nativeEnum(IncludeRelay); /** @internal */ export const IncludeRelay$outboundSchema: z.ZodNativeEnum = - IncludeRelay$inboundSchema; + IncludeRelay$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeRelay$ { - /** @deprecated use `IncludeRelay$inboundSchema` instead. */ - export const inboundSchema = IncludeRelay$inboundSchema; - /** @deprecated use `IncludeRelay$outboundSchema` instead. */ - export const outboundSchema = IncludeRelay$outboundSchema; + /** @deprecated use `IncludeRelay$inboundSchema` instead. */ + export const inboundSchema = IncludeRelay$inboundSchema; + /** @deprecated use `IncludeRelay$outboundSchema` instead. */ + export const outboundSchema = IncludeRelay$outboundSchema; } /** @internal */ -export const IncludeIPv6$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeIPv6); +export const IncludeIPv6$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(IncludeIPv6); /** @internal */ export const IncludeIPv6$outboundSchema: z.ZodNativeEnum = - IncludeIPv6$inboundSchema; + IncludeIPv6$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeIPv6$ { - /** @deprecated use `IncludeIPv6$inboundSchema` instead. */ - export const inboundSchema = IncludeIPv6$inboundSchema; - /** @deprecated use `IncludeIPv6$outboundSchema` instead. */ - export const outboundSchema = IncludeIPv6$outboundSchema; + /** @deprecated use `IncludeIPv6$inboundSchema` instead. */ + export const inboundSchema = IncludeIPv6$inboundSchema; + /** @deprecated use `IncludeIPv6$outboundSchema` instead. */ + export const outboundSchema = IncludeIPv6$outboundSchema; } /** @internal */ export const GetServerResourcesRequest$inboundSchema: z.ZodType< - GetServerResourcesRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - "X-Plex-Token": z.string(), - includeHttps: IncludeHttps$inboundSchema, - includeRelay: IncludeRelay$inboundSchema, - includeIPv6: IncludeIPv6$inboundSchema, - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - "X-Plex-Token": "xPlexToken", - }); - }); + GetServerResourcesRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + includeHttps: IncludeHttps$inboundSchema, + includeRelay: IncludeRelay$inboundSchema, + includeIPv6: IncludeIPv6$inboundSchema, +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type GetServerResourcesRequest$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; - "X-Plex-Token": string; - includeHttps: number; - includeRelay: number; - includeIPv6: number; + "X-Plex-Client-Identifier"?: string | undefined; + includeHttps: number; + includeRelay: number; + includeIPv6: number; }; /** @internal */ export const GetServerResourcesRequest$outboundSchema: z.ZodType< - GetServerResourcesRequest$Outbound, - z.ZodTypeDef, - GetServerResourcesRequest -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - xPlexToken: z.string(), - includeHttps: IncludeHttps$outboundSchema.default(IncludeHttps.Zero), - includeRelay: IncludeRelay$outboundSchema.default(IncludeRelay.Zero), - includeIPv6: IncludeIPv6$outboundSchema.default(IncludeIPv6.Zero), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - xPlexToken: "X-Plex-Token", - }); - }); + GetServerResourcesRequest$Outbound, + z.ZodTypeDef, + GetServerResourcesRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + includeHttps: IncludeHttps$outboundSchema.default(IncludeHttps.Zero), + includeRelay: IncludeRelay$outboundSchema.default(IncludeRelay.Zero), + includeIPv6: IncludeIPv6$outboundSchema.default(IncludeIPv6.Zero), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerResourcesRequest$ { - /** @deprecated use `GetServerResourcesRequest$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesRequest$inboundSchema; - /** @deprecated use `GetServerResourcesRequest$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesRequest$outboundSchema; - /** @deprecated use `GetServerResourcesRequest$Outbound` instead. */ - export type Outbound = GetServerResourcesRequest$Outbound; + /** @deprecated use `GetServerResourcesRequest$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesRequest$inboundSchema; + /** @deprecated use `GetServerResourcesRequest$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesRequest$outboundSchema; + /** @deprecated use `GetServerResourcesRequest$Outbound` instead. */ + export type Outbound = GetServerResourcesRequest$Outbound; } /** @internal */ -export const Connections$inboundSchema: z.ZodType = z - .object({ - protocol: z.string(), - address: z.string(), - port: z.number(), - uri: z.string(), - local: z.boolean(), - relay: z.boolean(), - IPv6: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - IPv6: "iPv6", - }); - }); +export const Connections$inboundSchema: z.ZodType< + Connections, + z.ZodTypeDef, + unknown +> = z.object({ + protocol: z.string(), + address: z.string(), + port: z.number(), + uri: z.string(), + local: z.boolean(), + relay: z.boolean(), + IPv6: z.boolean(), +}).transform((v) => { + return remap$(v, { + "IPv6": "iPv6", + }); +}); /** @internal */ export type Connections$Outbound = { - protocol: string; - address: string; - port: number; - uri: string; - local: boolean; - relay: boolean; - IPv6: boolean; + protocol: string; + address: string; + port: number; + uri: string; + local: boolean; + relay: boolean; + IPv6: boolean; }; /** @internal */ export const Connections$outboundSchema: z.ZodType< - Connections$Outbound, - z.ZodTypeDef, - Connections -> = z - .object({ - protocol: z.string(), - address: z.string(), - port: z.number(), - uri: z.string(), - local: z.boolean(), - relay: z.boolean(), - iPv6: z.boolean(), - }) - .transform((v) => { - return remap$(v, { - iPv6: "IPv6", - }); - }); + Connections$Outbound, + z.ZodTypeDef, + Connections +> = z.object({ + protocol: z.string(), + address: z.string(), + port: z.number(), + uri: z.string(), + local: z.boolean(), + relay: z.boolean(), + iPv6: z.boolean(), +}).transform((v) => { + return remap$(v, { + iPv6: "IPv6", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Connections$ { - /** @deprecated use `Connections$inboundSchema` instead. */ - export const inboundSchema = Connections$inboundSchema; - /** @deprecated use `Connections$outboundSchema` instead. */ - export const outboundSchema = Connections$outboundSchema; - /** @deprecated use `Connections$Outbound` instead. */ - export type Outbound = Connections$Outbound; + /** @deprecated use `Connections$inboundSchema` instead. */ + export const inboundSchema = Connections$inboundSchema; + /** @deprecated use `Connections$outboundSchema` instead. */ + export const outboundSchema = Connections$outboundSchema; + /** @deprecated use `Connections$Outbound` instead. */ + export type Outbound = Connections$Outbound; } /** @internal */ -export const PlexDevice$inboundSchema: z.ZodType = z.object({ - name: z.string(), - product: z.string(), - productVersion: z.string(), - platform: z.nullable(z.string()), - platformVersion: z.nullable(z.string()), - device: z.nullable(z.string()), - clientIdentifier: z.string(), - createdAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - lastSeenAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - provides: z.string(), - ownerId: z.nullable(z.number().int()), - sourceTitle: z.nullable(z.string()), - publicAddress: z.string(), - accessToken: z.string(), - owned: z.boolean(), - home: z.boolean(), - synced: z.boolean(), - relay: z.boolean(), - presence: z.boolean(), - httpsRequired: z.boolean(), - publicAddressMatches: z.boolean(), - dnsRebindingProtection: z.boolean(), - natLoopbackSupported: z.boolean(), - connections: z.array(z.lazy(() => Connections$inboundSchema)), +export const PlexDevice$inboundSchema: z.ZodType< + PlexDevice, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + product: z.string(), + productVersion: z.string(), + platform: z.nullable(z.string()), + platformVersion: z.nullable(z.string()), + device: z.nullable(z.string()), + clientIdentifier: z.string(), + createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + lastSeenAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + provides: z.string(), + ownerId: z.nullable(z.number().int()), + sourceTitle: z.nullable(z.string()), + publicAddress: z.string(), + accessToken: z.string(), + owned: z.boolean(), + home: z.boolean(), + synced: z.boolean(), + relay: z.boolean(), + presence: z.boolean(), + httpsRequired: z.boolean(), + publicAddressMatches: z.boolean(), + dnsRebindingProtection: z.boolean(), + natLoopbackSupported: z.boolean(), + connections: z.array(z.lazy(() => Connections$inboundSchema)), }); /** @internal */ export type PlexDevice$Outbound = { - name: string; - product: string; - productVersion: string; - platform: string | null; - platformVersion: string | null; - device: string | null; - clientIdentifier: string; - createdAt: string; - lastSeenAt: string; - provides: string; - ownerId: number | null; - sourceTitle: string | null; - publicAddress: string; - accessToken: string; - owned: boolean; - home: boolean; - synced: boolean; - relay: boolean; - presence: boolean; - httpsRequired: boolean; - publicAddressMatches: boolean; - dnsRebindingProtection: boolean; - natLoopbackSupported: boolean; - connections: Array; + name: string; + product: string; + productVersion: string; + platform: string | null; + platformVersion: string | null; + device: string | null; + clientIdentifier: string; + createdAt: string; + lastSeenAt: string; + provides: string; + ownerId: number | null; + sourceTitle: string | null; + publicAddress: string; + accessToken: string; + owned: boolean; + home: boolean; + synced: boolean; + relay: boolean; + presence: boolean; + httpsRequired: boolean; + publicAddressMatches: boolean; + dnsRebindingProtection: boolean; + natLoopbackSupported: boolean; + connections: Array; }; /** @internal */ -export const PlexDevice$outboundSchema: z.ZodType = - z.object({ - name: z.string(), - product: z.string(), - productVersion: z.string(), - platform: z.nullable(z.string()), - platformVersion: z.nullable(z.string()), - device: z.nullable(z.string()), - clientIdentifier: z.string(), - createdAt: z.date().transform((v) => v.toISOString()), - lastSeenAt: z.date().transform((v) => v.toISOString()), - provides: z.string(), - ownerId: z.nullable(z.number().int()), - sourceTitle: z.nullable(z.string()), - publicAddress: z.string(), - accessToken: z.string(), - owned: z.boolean(), - home: z.boolean(), - synced: z.boolean(), - relay: z.boolean(), - presence: z.boolean(), - httpsRequired: z.boolean(), - publicAddressMatches: z.boolean(), - dnsRebindingProtection: z.boolean(), - natLoopbackSupported: z.boolean(), - connections: z.array(z.lazy(() => Connections$outboundSchema)), - }); +export const PlexDevice$outboundSchema: z.ZodType< + PlexDevice$Outbound, + z.ZodTypeDef, + PlexDevice +> = z.object({ + name: z.string(), + product: z.string(), + productVersion: z.string(), + platform: z.nullable(z.string()), + platformVersion: z.nullable(z.string()), + device: z.nullable(z.string()), + clientIdentifier: z.string(), + createdAt: z.date().transform(v => v.toISOString()), + lastSeenAt: z.date().transform(v => v.toISOString()), + provides: z.string(), + ownerId: z.nullable(z.number().int()), + sourceTitle: z.nullable(z.string()), + publicAddress: z.string(), + accessToken: z.string(), + owned: z.boolean(), + home: z.boolean(), + synced: z.boolean(), + relay: z.boolean(), + presence: z.boolean(), + httpsRequired: z.boolean(), + publicAddressMatches: z.boolean(), + dnsRebindingProtection: z.boolean(), + natLoopbackSupported: z.boolean(), + connections: z.array(z.lazy(() => Connections$outboundSchema)), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PlexDevice$ { - /** @deprecated use `PlexDevice$inboundSchema` instead. */ - export const inboundSchema = PlexDevice$inboundSchema; - /** @deprecated use `PlexDevice$outboundSchema` instead. */ - export const outboundSchema = PlexDevice$outboundSchema; - /** @deprecated use `PlexDevice$Outbound` instead. */ - export type Outbound = PlexDevice$Outbound; + /** @deprecated use `PlexDevice$inboundSchema` instead. */ + export const inboundSchema = PlexDevice$inboundSchema; + /** @deprecated use `PlexDevice$outboundSchema` instead. */ + export const outboundSchema = PlexDevice$outboundSchema; + /** @deprecated use `PlexDevice$Outbound` instead. */ + export type Outbound = PlexDevice$Outbound; } /** @internal */ export const GetServerResourcesResponse$inboundSchema: z.ZodType< - GetServerResourcesResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - PlexDevices: z.array(z.lazy(() => PlexDevice$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - PlexDevices: "plexDevices", - }); - }); + GetServerResourcesResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + PlexDevices: z.array(z.lazy(() => PlexDevice$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "PlexDevices": "plexDevices", + }); +}); /** @internal */ export type GetServerResourcesResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - PlexDevices?: Array | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + PlexDevices?: Array | undefined; }; /** @internal */ export const GetServerResourcesResponse$outboundSchema: z.ZodType< - GetServerResourcesResponse$Outbound, - z.ZodTypeDef, - GetServerResourcesResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - plexDevices: z.array(z.lazy(() => PlexDevice$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - plexDevices: "PlexDevices", - }); - }); + GetServerResourcesResponse$Outbound, + z.ZodTypeDef, + GetServerResourcesResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + plexDevices: z.array(z.lazy(() => PlexDevice$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + plexDevices: "PlexDevices", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetServerResourcesResponse$ { - /** @deprecated use `GetServerResourcesResponse$inboundSchema` instead. */ - export const inboundSchema = GetServerResourcesResponse$inboundSchema; - /** @deprecated use `GetServerResourcesResponse$outboundSchema` instead. */ - export const outboundSchema = GetServerResourcesResponse$outboundSchema; - /** @deprecated use `GetServerResourcesResponse$Outbound` instead. */ - export type Outbound = GetServerResourcesResponse$Outbound; + /** @deprecated use `GetServerResourcesResponse$inboundSchema` instead. */ + export const inboundSchema = GetServerResourcesResponse$inboundSchema; + /** @deprecated use `GetServerResourcesResponse$outboundSchema` instead. */ + export const outboundSchema = GetServerResourcesResponse$outboundSchema; + /** @deprecated use `GetServerResourcesResponse$Outbound` instead. */ + export type Outbound = GetServerResourcesResponse$Outbound; } diff --git a/src/sdk/models/operations/getsessionhistory.ts b/src/sdk/models/operations/getsessionhistory.ts index 14a355c5..b53ed08e 100644 --- a/src/sdk/models/operations/getsessionhistory.ts +++ b/src/sdk/models/operations/getsessionhistory.ts @@ -2,116 +2,114 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; /** * Filters content by field and direction/equality * * @remarks * (Unknown if viewedAt is the only supported column) - * */ export type QueryParamFilter = {}; export type GetSessionHistoryRequest = { - /** - * Sorts the results by the specified field followed by the direction (asc, desc) - * - * @remarks - * - */ - sort?: string | undefined; - /** - * Filter results by those that are related to a specific users id - * - * @remarks - * - */ - accountId?: number | undefined; - /** - * Filters content by field and direction/equality - * - * @remarks - * (Unknown if viewedAt is the only supported column) - * - */ - filter?: QueryParamFilter | undefined; - /** - * Filters the results based on the id of a valid library section - * - * @remarks - * - */ - librarySectionID?: number | undefined; + /** + * Sorts the results by the specified field followed by the direction (asc, desc) + * + * @remarks + */ + sort?: string | undefined; + /** + * Filter results by those that are related to a specific users id + * + * @remarks + */ + accountId?: number | undefined; + /** + * Filters content by field and direction/equality + * + * @remarks + * (Unknown if viewedAt is the only supported column) + */ + filter?: QueryParamFilter | undefined; + /** + * Filters the results based on the id of a valid library section + * + * @remarks + */ + librarySectionID?: number | undefined; }; export type GetSessionHistoryMetadata = { - historyKey?: string | undefined; - key?: string | undefined; - ratingKey?: string | undefined; - librarySectionID?: string | undefined; - parentKey?: string | undefined; - grandparentKey?: string | undefined; - title?: string | undefined; - grandparentTitle?: string | undefined; - type?: string | undefined; - thumb?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - viewedAt?: number | undefined; - accountID?: number | undefined; - deviceID?: number | undefined; + historyKey?: string | undefined; + key?: string | undefined; + ratingKey?: string | undefined; + librarySectionID?: string | undefined; + parentKey?: string | undefined; + grandparentKey?: string | undefined; + title?: string | undefined; + grandparentTitle?: string | undefined; + type?: string | undefined; + thumb?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + viewedAt?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; }; export type GetSessionHistoryMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; /** * List of Plex Sessions */ export type GetSessionHistoryResponseBody = { - mediaContainer?: GetSessionHistoryMediaContainer | undefined; + mediaContainer?: GetSessionHistoryMediaContainer | undefined; }; export type GetSessionHistoryResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * List of Plex Sessions - */ - object?: GetSessionHistoryResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * List of Plex Sessions + */ + object?: GetSessionHistoryResponseBody | undefined; }; /** @internal */ -export const QueryParamFilter$inboundSchema: z.ZodType = - z.object({}); +export const QueryParamFilter$inboundSchema: z.ZodType< + QueryParamFilter, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type QueryParamFilter$Outbound = {}; /** @internal */ export const QueryParamFilter$outboundSchema: z.ZodType< - QueryParamFilter$Outbound, - z.ZodTypeDef, - QueryParamFilter + QueryParamFilter$Outbound, + z.ZodTypeDef, + QueryParamFilter > = z.object({}); /** @@ -119,44 +117,44 @@ export const QueryParamFilter$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamFilter$ { - /** @deprecated use `QueryParamFilter$inboundSchema` instead. */ - export const inboundSchema = QueryParamFilter$inboundSchema; - /** @deprecated use `QueryParamFilter$outboundSchema` instead. */ - export const outboundSchema = QueryParamFilter$outboundSchema; - /** @deprecated use `QueryParamFilter$Outbound` instead. */ - export type Outbound = QueryParamFilter$Outbound; + /** @deprecated use `QueryParamFilter$inboundSchema` instead. */ + export const inboundSchema = QueryParamFilter$inboundSchema; + /** @deprecated use `QueryParamFilter$outboundSchema` instead. */ + export const outboundSchema = QueryParamFilter$outboundSchema; + /** @deprecated use `QueryParamFilter$Outbound` instead. */ + export type Outbound = QueryParamFilter$Outbound; } /** @internal */ export const GetSessionHistoryRequest$inboundSchema: z.ZodType< - GetSessionHistoryRequest, - z.ZodTypeDef, - unknown + GetSessionHistoryRequest, + z.ZodTypeDef, + unknown > = z.object({ - sort: z.string().optional(), - accountId: z.number().int().optional(), - filter: z.lazy(() => QueryParamFilter$inboundSchema).optional(), - librarySectionID: z.number().int().optional(), + sort: z.string().optional(), + accountId: z.number().int().optional(), + filter: z.lazy(() => QueryParamFilter$inboundSchema).optional(), + librarySectionID: z.number().int().optional(), }); /** @internal */ export type GetSessionHistoryRequest$Outbound = { - sort?: string | undefined; - accountId?: number | undefined; - filter?: QueryParamFilter$Outbound | undefined; - librarySectionID?: number | undefined; + sort?: string | undefined; + accountId?: number | undefined; + filter?: QueryParamFilter$Outbound | undefined; + librarySectionID?: number | undefined; }; /** @internal */ export const GetSessionHistoryRequest$outboundSchema: z.ZodType< - GetSessionHistoryRequest$Outbound, - z.ZodTypeDef, - GetSessionHistoryRequest + GetSessionHistoryRequest$Outbound, + z.ZodTypeDef, + GetSessionHistoryRequest > = z.object({ - sort: z.string().optional(), - accountId: z.number().int().optional(), - filter: z.lazy(() => QueryParamFilter$outboundSchema).optional(), - librarySectionID: z.number().int().optional(), + sort: z.string().optional(), + accountId: z.number().int().optional(), + filter: z.lazy(() => QueryParamFilter$outboundSchema).optional(), + librarySectionID: z.number().int().optional(), }); /** @@ -164,95 +162,90 @@ export const GetSessionHistoryRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryRequest$ { - /** @deprecated use `GetSessionHistoryRequest$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryRequest$inboundSchema; - /** @deprecated use `GetSessionHistoryRequest$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryRequest$outboundSchema; - /** @deprecated use `GetSessionHistoryRequest$Outbound` instead. */ - export type Outbound = GetSessionHistoryRequest$Outbound; + /** @deprecated use `GetSessionHistoryRequest$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryRequest$inboundSchema; + /** @deprecated use `GetSessionHistoryRequest$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryRequest$outboundSchema; + /** @deprecated use `GetSessionHistoryRequest$Outbound` instead. */ + export type Outbound = GetSessionHistoryRequest$Outbound; } /** @internal */ export const GetSessionHistoryMetadata$inboundSchema: z.ZodType< - GetSessionHistoryMetadata, - z.ZodTypeDef, - unknown + GetSessionHistoryMetadata, + z.ZodTypeDef, + unknown > = z.object({ - historyKey: z.string().optional(), - key: z.string().optional(), - ratingKey: z.string().optional(), - librarySectionID: z.string().optional(), - parentKey: z.string().optional(), - grandparentKey: z.string().optional(), - title: z.string().optional(), - grandparentTitle: z.string().optional(), - type: z.string().optional(), - thumb: z.string().optional(), - parentThumb: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - viewedAt: z.number().int().optional(), - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), + historyKey: z.string().optional(), + key: z.string().optional(), + ratingKey: z.string().optional(), + librarySectionID: z.string().optional(), + parentKey: z.string().optional(), + grandparentKey: z.string().optional(), + title: z.string().optional(), + grandparentTitle: z.string().optional(), + type: z.string().optional(), + thumb: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + viewedAt: z.number().int().optional(), + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), }); /** @internal */ export type GetSessionHistoryMetadata$Outbound = { - historyKey?: string | undefined; - key?: string | undefined; - ratingKey?: string | undefined; - librarySectionID?: string | undefined; - parentKey?: string | undefined; - grandparentKey?: string | undefined; - title?: string | undefined; - grandparentTitle?: string | undefined; - type?: string | undefined; - thumb?: string | undefined; - parentThumb?: string | undefined; - grandparentThumb?: string | undefined; - grandparentArt?: string | undefined; - index?: number | undefined; - parentIndex?: number | undefined; - originallyAvailableAt?: string | undefined; - viewedAt?: number | undefined; - accountID?: number | undefined; - deviceID?: number | undefined; + historyKey?: string | undefined; + key?: string | undefined; + ratingKey?: string | undefined; + librarySectionID?: string | undefined; + parentKey?: string | undefined; + grandparentKey?: string | undefined; + title?: string | undefined; + grandparentTitle?: string | undefined; + type?: string | undefined; + thumb?: string | undefined; + parentThumb?: string | undefined; + grandparentThumb?: string | undefined; + grandparentArt?: string | undefined; + index?: number | undefined; + parentIndex?: number | undefined; + originallyAvailableAt?: string | undefined; + viewedAt?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; }; /** @internal */ export const GetSessionHistoryMetadata$outboundSchema: z.ZodType< - GetSessionHistoryMetadata$Outbound, - z.ZodTypeDef, - GetSessionHistoryMetadata + GetSessionHistoryMetadata$Outbound, + z.ZodTypeDef, + GetSessionHistoryMetadata > = z.object({ - historyKey: z.string().optional(), - key: z.string().optional(), - ratingKey: z.string().optional(), - librarySectionID: z.string().optional(), - parentKey: z.string().optional(), - grandparentKey: z.string().optional(), - title: z.string().optional(), - grandparentTitle: z.string().optional(), - type: z.string().optional(), - thumb: z.string().optional(), - parentThumb: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentArt: z.string().optional(), - index: z.number().int().optional(), - parentIndex: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - viewedAt: z.number().int().optional(), - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), + historyKey: z.string().optional(), + key: z.string().optional(), + ratingKey: z.string().optional(), + librarySectionID: z.string().optional(), + parentKey: z.string().optional(), + grandparentKey: z.string().optional(), + title: z.string().optional(), + grandparentTitle: z.string().optional(), + type: z.string().optional(), + thumb: z.string().optional(), + parentThumb: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentArt: z.string().optional(), + index: z.number().int().optional(), + parentIndex: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + viewedAt: z.number().int().optional(), + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), }); /** @@ -260,172 +253,164 @@ export const GetSessionHistoryMetadata$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryMetadata$ { - /** @deprecated use `GetSessionHistoryMetadata$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryMetadata$inboundSchema; - /** @deprecated use `GetSessionHistoryMetadata$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryMetadata$outboundSchema; - /** @deprecated use `GetSessionHistoryMetadata$Outbound` instead. */ - export type Outbound = GetSessionHistoryMetadata$Outbound; + /** @deprecated use `GetSessionHistoryMetadata$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryMetadata$inboundSchema; + /** @deprecated use `GetSessionHistoryMetadata$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryMetadata$outboundSchema; + /** @deprecated use `GetSessionHistoryMetadata$Outbound` instead. */ + export type Outbound = GetSessionHistoryMetadata$Outbound; } /** @internal */ export const GetSessionHistoryMediaContainer$inboundSchema: z.ZodType< - GetSessionHistoryMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetSessionHistoryMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetSessionHistoryMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetSessionHistoryMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetSessionHistoryMediaContainer$Outbound = { - size?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetSessionHistoryMediaContainer$outboundSchema: z.ZodType< - GetSessionHistoryMediaContainer$Outbound, - z.ZodTypeDef, - GetSessionHistoryMediaContainer -> = z - .object({ - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetSessionHistoryMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetSessionHistoryMediaContainer$Outbound, + z.ZodTypeDef, + GetSessionHistoryMediaContainer +> = z.object({ + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetSessionHistoryMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryMediaContainer$ { - /** @deprecated use `GetSessionHistoryMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryMediaContainer$inboundSchema; - /** @deprecated use `GetSessionHistoryMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryMediaContainer$outboundSchema; - /** @deprecated use `GetSessionHistoryMediaContainer$Outbound` instead. */ - export type Outbound = GetSessionHistoryMediaContainer$Outbound; + /** @deprecated use `GetSessionHistoryMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryMediaContainer$inboundSchema; + /** @deprecated use `GetSessionHistoryMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryMediaContainer$outboundSchema; + /** @deprecated use `GetSessionHistoryMediaContainer$Outbound` instead. */ + export type Outbound = GetSessionHistoryMediaContainer$Outbound; } /** @internal */ export const GetSessionHistoryResponseBody$inboundSchema: z.ZodType< - GetSessionHistoryResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetSessionHistoryMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetSessionHistoryResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetSessionHistoryMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetSessionHistoryResponseBody$Outbound = { - MediaContainer?: GetSessionHistoryMediaContainer$Outbound | undefined; + MediaContainer?: GetSessionHistoryMediaContainer$Outbound | undefined; }; /** @internal */ export const GetSessionHistoryResponseBody$outboundSchema: z.ZodType< - GetSessionHistoryResponseBody$Outbound, - z.ZodTypeDef, - GetSessionHistoryResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetSessionHistoryMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetSessionHistoryResponseBody$Outbound, + z.ZodTypeDef, + GetSessionHistoryResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetSessionHistoryMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryResponseBody$ { - /** @deprecated use `GetSessionHistoryResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryResponseBody$inboundSchema; - /** @deprecated use `GetSessionHistoryResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryResponseBody$outboundSchema; - /** @deprecated use `GetSessionHistoryResponseBody$Outbound` instead. */ - export type Outbound = GetSessionHistoryResponseBody$Outbound; + /** @deprecated use `GetSessionHistoryResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryResponseBody$inboundSchema; + /** @deprecated use `GetSessionHistoryResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryResponseBody$outboundSchema; + /** @deprecated use `GetSessionHistoryResponseBody$Outbound` instead. */ + export type Outbound = GetSessionHistoryResponseBody$Outbound; } /** @internal */ export const GetSessionHistoryResponse$inboundSchema: z.ZodType< - GetSessionHistoryResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetSessionHistoryResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetSessionHistoryResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetSessionHistoryResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetSessionHistoryResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetSessionHistoryResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetSessionHistoryResponseBody$Outbound | undefined; }; /** @internal */ export const GetSessionHistoryResponse$outboundSchema: z.ZodType< - GetSessionHistoryResponse$Outbound, - z.ZodTypeDef, - GetSessionHistoryResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetSessionHistoryResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetSessionHistoryResponse$Outbound, + z.ZodTypeDef, + GetSessionHistoryResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetSessionHistoryResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionHistoryResponse$ { - /** @deprecated use `GetSessionHistoryResponse$inboundSchema` instead. */ - export const inboundSchema = GetSessionHistoryResponse$inboundSchema; - /** @deprecated use `GetSessionHistoryResponse$outboundSchema` instead. */ - export const outboundSchema = GetSessionHistoryResponse$outboundSchema; - /** @deprecated use `GetSessionHistoryResponse$Outbound` instead. */ - export type Outbound = GetSessionHistoryResponse$Outbound; + /** @deprecated use `GetSessionHistoryResponse$inboundSchema` instead. */ + export const inboundSchema = GetSessionHistoryResponse$inboundSchema; + /** @deprecated use `GetSessionHistoryResponse$outboundSchema` instead. */ + export const outboundSchema = GetSessionHistoryResponse$outboundSchema; + /** @deprecated use `GetSessionHistoryResponse$Outbound` instead. */ + export type Outbound = GetSessionHistoryResponse$Outbound; } diff --git a/src/sdk/models/operations/getsessions.ts b/src/sdk/models/operations/getsessions.ts index fdff8302..31dfec1d 100644 --- a/src/sdk/models/operations/getsessions.ts +++ b/src/sdk/models/operations/getsessions.ts @@ -2,232 +2,235 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSessionsStream = { - albumGain?: string | undefined; - albumPeak?: string | undefined; - albumRange?: string | undefined; - audioChannelLayout?: string | undefined; - bitDepth?: number | undefined; - bitrate?: number | undefined; - channels?: number | undefined; - codec?: string | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - gain?: string | undefined; - id?: string | undefined; - index?: number | undefined; - loudness?: string | undefined; - lra?: string | undefined; - peak?: string | undefined; - samplingRate?: number | undefined; - selected?: boolean | undefined; - streamType?: number | undefined; - location?: string | undefined; + albumGain?: string | undefined; + albumPeak?: string | undefined; + albumRange?: string | undefined; + audioChannelLayout?: string | undefined; + bitDepth?: number | undefined; + bitrate?: number | undefined; + channels?: number | undefined; + codec?: string | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + gain?: string | undefined; + id?: string | undefined; + index?: number | undefined; + loudness?: string | undefined; + lra?: string | undefined; + peak?: string | undefined; + samplingRate?: number | undefined; + selected?: boolean | undefined; + streamType?: number | undefined; + location?: string | undefined; }; export type GetSessionsPart = { - container?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - hasThumbnail?: string | undefined; - id?: string | undefined; - key?: string | undefined; - size?: number | undefined; - decision?: string | undefined; - selected?: boolean | undefined; - stream?: Array | undefined; + container?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + hasThumbnail?: string | undefined; + id?: string | undefined; + key?: string | undefined; + size?: number | undefined; + decision?: string | undefined; + selected?: boolean | undefined; + stream?: Array | undefined; }; export type GetSessionsMedia = { - audioChannels?: number | undefined; - audioCodec?: string | undefined; - bitrate?: number | undefined; - container?: string | undefined; - duration?: number | undefined; - id?: string | undefined; - selected?: boolean | undefined; - part?: Array | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + bitrate?: number | undefined; + container?: string | undefined; + duration?: number | undefined; + id?: string | undefined; + selected?: boolean | undefined; + part?: Array | undefined; }; export type GetSessionsUser = { - id?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; + id?: string | undefined; + thumb?: string | undefined; + title?: string | undefined; }; export type Player = { - address?: string | undefined; - machineIdentifier?: string | undefined; - model?: string | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - product?: string | undefined; - profile?: string | undefined; - remotePublicAddress?: string | undefined; - state?: string | undefined; - title?: string | undefined; - version?: string | undefined; - local?: boolean | undefined; - relayed?: boolean | undefined; - secure?: boolean | undefined; - userID?: number | undefined; + address?: string | undefined; + machineIdentifier?: string | undefined; + model?: string | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + product?: string | undefined; + profile?: string | undefined; + remotePublicAddress?: string | undefined; + state?: string | undefined; + title?: string | undefined; + version?: string | undefined; + local?: boolean | undefined; + relayed?: boolean | undefined; + secure?: boolean | undefined; + userID?: number | undefined; }; export type Session = { - id?: string | undefined; - bandwidth?: number | undefined; - location?: string | undefined; + id?: string | undefined; + bandwidth?: number | undefined; + location?: string | undefined; }; export type GetSessionsMetadata = { - addedAt?: number | undefined; - art?: string | undefined; - duration?: number | undefined; - grandparentArt?: string | undefined; - grandparentGuid?: string | undefined; - grandparentKey?: string | undefined; - grandparentRatingKey?: string | undefined; - grandparentThumb?: string | undefined; - grandparentTitle?: string | undefined; - guid?: string | undefined; - index?: number | undefined; - key?: string | undefined; - librarySectionID?: string | undefined; - librarySectionKey?: string | undefined; - librarySectionTitle?: string | undefined; - musicAnalysisVersion?: string | undefined; - parentGuid?: string | undefined; - parentIndex?: number | undefined; - parentKey?: string | undefined; - parentRatingKey?: string | undefined; - parentStudio?: string | undefined; - parentThumb?: string | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - ratingCount?: number | undefined; - ratingKey?: string | undefined; - sessionKey?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - type?: string | undefined; - updatedAt?: number | undefined; - viewOffset?: number | undefined; - media?: Array | undefined; - user?: GetSessionsUser | undefined; - player?: Player | undefined; - session?: Session | undefined; + addedAt?: number | undefined; + art?: string | undefined; + duration?: number | undefined; + grandparentArt?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentThumb?: string | undefined; + grandparentTitle?: string | undefined; + guid?: string | undefined; + index?: number | undefined; + key?: string | undefined; + librarySectionID?: string | undefined; + librarySectionKey?: string | undefined; + librarySectionTitle?: string | undefined; + musicAnalysisVersion?: string | undefined; + parentGuid?: string | undefined; + parentIndex?: number | undefined; + parentKey?: string | undefined; + parentRatingKey?: string | undefined; + parentStudio?: string | undefined; + parentThumb?: string | undefined; + parentTitle?: string | undefined; + parentYear?: number | undefined; + ratingCount?: number | undefined; + ratingKey?: string | undefined; + sessionKey?: string | undefined; + thumb?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + type?: string | undefined; + updatedAt?: number | undefined; + viewOffset?: number | undefined; + media?: Array | undefined; + user?: GetSessionsUser | undefined; + player?: Player | undefined; + session?: Session | undefined; }; export type GetSessionsMediaContainer = { - size?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; /** * List of Active Plex Sessions */ export type GetSessionsResponseBody = { - mediaContainer?: GetSessionsMediaContainer | undefined; + mediaContainer?: GetSessionsMediaContainer | undefined; }; export type GetSessionsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * List of Active Plex Sessions - */ - object?: GetSessionsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * List of Active Plex Sessions + */ + object?: GetSessionsResponseBody | undefined; }; /** @internal */ -export const GetSessionsStream$inboundSchema: z.ZodType = - z.object({ - albumGain: z.string().optional(), - albumPeak: z.string().optional(), - albumRange: z.string().optional(), - audioChannelLayout: z.string().optional(), - bitDepth: z.number().int().optional(), - bitrate: z.number().int().optional(), - channels: z.number().int().optional(), - codec: z.string().optional(), - displayTitle: z.string().optional(), - extendedDisplayTitle: z.string().optional(), - gain: z.string().optional(), - id: z.string().optional(), - index: z.number().int().optional(), - loudness: z.string().optional(), - lra: z.string().optional(), - peak: z.string().optional(), - samplingRate: z.number().int().optional(), - selected: z.boolean().optional(), - streamType: z.number().int().optional(), - location: z.string().optional(), - }); +export const GetSessionsStream$inboundSchema: z.ZodType< + GetSessionsStream, + z.ZodTypeDef, + unknown +> = z.object({ + albumGain: z.string().optional(), + albumPeak: z.string().optional(), + albumRange: z.string().optional(), + audioChannelLayout: z.string().optional(), + bitDepth: z.number().int().optional(), + bitrate: z.number().int().optional(), + channels: z.number().int().optional(), + codec: z.string().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), + gain: z.string().optional(), + id: z.string().optional(), + index: z.number().int().optional(), + loudness: z.string().optional(), + lra: z.string().optional(), + peak: z.string().optional(), + samplingRate: z.number().int().optional(), + selected: z.boolean().optional(), + streamType: z.number().int().optional(), + location: z.string().optional(), +}); /** @internal */ export type GetSessionsStream$Outbound = { - albumGain?: string | undefined; - albumPeak?: string | undefined; - albumRange?: string | undefined; - audioChannelLayout?: string | undefined; - bitDepth?: number | undefined; - bitrate?: number | undefined; - channels?: number | undefined; - codec?: string | undefined; - displayTitle?: string | undefined; - extendedDisplayTitle?: string | undefined; - gain?: string | undefined; - id?: string | undefined; - index?: number | undefined; - loudness?: string | undefined; - lra?: string | undefined; - peak?: string | undefined; - samplingRate?: number | undefined; - selected?: boolean | undefined; - streamType?: number | undefined; - location?: string | undefined; + albumGain?: string | undefined; + albumPeak?: string | undefined; + albumRange?: string | undefined; + audioChannelLayout?: string | undefined; + bitDepth?: number | undefined; + bitrate?: number | undefined; + channels?: number | undefined; + codec?: string | undefined; + displayTitle?: string | undefined; + extendedDisplayTitle?: string | undefined; + gain?: string | undefined; + id?: string | undefined; + index?: number | undefined; + loudness?: string | undefined; + lra?: string | undefined; + peak?: string | undefined; + samplingRate?: number | undefined; + selected?: boolean | undefined; + streamType?: number | undefined; + location?: string | undefined; }; /** @internal */ export const GetSessionsStream$outboundSchema: z.ZodType< - GetSessionsStream$Outbound, - z.ZodTypeDef, - GetSessionsStream + GetSessionsStream$Outbound, + z.ZodTypeDef, + GetSessionsStream > = z.object({ - albumGain: z.string().optional(), - albumPeak: z.string().optional(), - albumRange: z.string().optional(), - audioChannelLayout: z.string().optional(), - bitDepth: z.number().int().optional(), - bitrate: z.number().int().optional(), - channels: z.number().int().optional(), - codec: z.string().optional(), - displayTitle: z.string().optional(), - extendedDisplayTitle: z.string().optional(), - gain: z.string().optional(), - id: z.string().optional(), - index: z.number().int().optional(), - loudness: z.string().optional(), - lra: z.string().optional(), - peak: z.string().optional(), - samplingRate: z.number().int().optional(), - selected: z.boolean().optional(), - streamType: z.number().int().optional(), - location: z.string().optional(), + albumGain: z.string().optional(), + albumPeak: z.string().optional(), + albumRange: z.string().optional(), + audioChannelLayout: z.string().optional(), + bitDepth: z.number().int().optional(), + bitrate: z.number().int().optional(), + channels: z.number().int().optional(), + codec: z.string().optional(), + displayTitle: z.string().optional(), + extendedDisplayTitle: z.string().optional(), + gain: z.string().optional(), + id: z.string().optional(), + index: z.number().int().optional(), + loudness: z.string().optional(), + lra: z.string().optional(), + peak: z.string().optional(), + samplingRate: z.number().int().optional(), + selected: z.boolean().optional(), + streamType: z.number().int().optional(), + location: z.string().optional(), }); /** @@ -235,174 +238,177 @@ export const GetSessionsStream$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsStream$ { - /** @deprecated use `GetSessionsStream$inboundSchema` instead. */ - export const inboundSchema = GetSessionsStream$inboundSchema; - /** @deprecated use `GetSessionsStream$outboundSchema` instead. */ - export const outboundSchema = GetSessionsStream$outboundSchema; - /** @deprecated use `GetSessionsStream$Outbound` instead. */ - export type Outbound = GetSessionsStream$Outbound; + /** @deprecated use `GetSessionsStream$inboundSchema` instead. */ + export const inboundSchema = GetSessionsStream$inboundSchema; + /** @deprecated use `GetSessionsStream$outboundSchema` instead. */ + export const outboundSchema = GetSessionsStream$outboundSchema; + /** @deprecated use `GetSessionsStream$Outbound` instead. */ + export type Outbound = GetSessionsStream$Outbound; } /** @internal */ -export const GetSessionsPart$inboundSchema: z.ZodType = z - .object({ - container: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - hasThumbnail: z.string().optional(), - id: z.string().optional(), - key: z.string().optional(), - size: z.number().int().optional(), - decision: z.string().optional(), - selected: z.boolean().optional(), - Stream: z.array(z.lazy(() => GetSessionsStream$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Stream: "stream", - }); - }); +export const GetSessionsPart$inboundSchema: z.ZodType< + GetSessionsPart, + z.ZodTypeDef, + unknown +> = z.object({ + container: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + hasThumbnail: z.string().optional(), + id: z.string().optional(), + key: z.string().optional(), + size: z.number().int().optional(), + decision: z.string().optional(), + selected: z.boolean().optional(), + Stream: z.array(z.lazy(() => GetSessionsStream$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Stream": "stream", + }); +}); /** @internal */ export type GetSessionsPart$Outbound = { - container?: string | undefined; - duration?: number | undefined; - file?: string | undefined; - hasThumbnail?: string | undefined; - id?: string | undefined; - key?: string | undefined; - size?: number | undefined; - decision?: string | undefined; - selected?: boolean | undefined; - Stream?: Array | undefined; + container?: string | undefined; + duration?: number | undefined; + file?: string | undefined; + hasThumbnail?: string | undefined; + id?: string | undefined; + key?: string | undefined; + size?: number | undefined; + decision?: string | undefined; + selected?: boolean | undefined; + Stream?: Array | undefined; }; /** @internal */ export const GetSessionsPart$outboundSchema: z.ZodType< - GetSessionsPart$Outbound, - z.ZodTypeDef, - GetSessionsPart -> = z - .object({ - container: z.string().optional(), - duration: z.number().int().optional(), - file: z.string().optional(), - hasThumbnail: z.string().optional(), - id: z.string().optional(), - key: z.string().optional(), - size: z.number().int().optional(), - decision: z.string().optional(), - selected: z.boolean().optional(), - stream: z.array(z.lazy(() => GetSessionsStream$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - stream: "Stream", - }); - }); + GetSessionsPart$Outbound, + z.ZodTypeDef, + GetSessionsPart +> = z.object({ + container: z.string().optional(), + duration: z.number().int().optional(), + file: z.string().optional(), + hasThumbnail: z.string().optional(), + id: z.string().optional(), + key: z.string().optional(), + size: z.number().int().optional(), + decision: z.string().optional(), + selected: z.boolean().optional(), + stream: z.array(z.lazy(() => GetSessionsStream$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + stream: "Stream", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsPart$ { - /** @deprecated use `GetSessionsPart$inboundSchema` instead. */ - export const inboundSchema = GetSessionsPart$inboundSchema; - /** @deprecated use `GetSessionsPart$outboundSchema` instead. */ - export const outboundSchema = GetSessionsPart$outboundSchema; - /** @deprecated use `GetSessionsPart$Outbound` instead. */ - export type Outbound = GetSessionsPart$Outbound; + /** @deprecated use `GetSessionsPart$inboundSchema` instead. */ + export const inboundSchema = GetSessionsPart$inboundSchema; + /** @deprecated use `GetSessionsPart$outboundSchema` instead. */ + export const outboundSchema = GetSessionsPart$outboundSchema; + /** @deprecated use `GetSessionsPart$Outbound` instead. */ + export type Outbound = GetSessionsPart$Outbound; } /** @internal */ -export const GetSessionsMedia$inboundSchema: z.ZodType = z - .object({ - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - bitrate: z.number().int().optional(), - container: z.string().optional(), - duration: z.number().int().optional(), - id: z.string().optional(), - selected: z.boolean().optional(), - Part: z.array(z.lazy(() => GetSessionsPart$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Part: "part", - }); - }); +export const GetSessionsMedia$inboundSchema: z.ZodType< + GetSessionsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + bitrate: z.number().int().optional(), + container: z.string().optional(), + duration: z.number().int().optional(), + id: z.string().optional(), + selected: z.boolean().optional(), + Part: z.array(z.lazy(() => GetSessionsPart$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Part": "part", + }); +}); /** @internal */ export type GetSessionsMedia$Outbound = { - audioChannels?: number | undefined; - audioCodec?: string | undefined; - bitrate?: number | undefined; - container?: string | undefined; - duration?: number | undefined; - id?: string | undefined; - selected?: boolean | undefined; - Part?: Array | undefined; + audioChannels?: number | undefined; + audioCodec?: string | undefined; + bitrate?: number | undefined; + container?: string | undefined; + duration?: number | undefined; + id?: string | undefined; + selected?: boolean | undefined; + Part?: Array | undefined; }; /** @internal */ export const GetSessionsMedia$outboundSchema: z.ZodType< - GetSessionsMedia$Outbound, - z.ZodTypeDef, - GetSessionsMedia -> = z - .object({ - audioChannels: z.number().int().optional(), - audioCodec: z.string().optional(), - bitrate: z.number().int().optional(), - container: z.string().optional(), - duration: z.number().int().optional(), - id: z.string().optional(), - selected: z.boolean().optional(), - part: z.array(z.lazy(() => GetSessionsPart$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - part: "Part", - }); - }); + GetSessionsMedia$Outbound, + z.ZodTypeDef, + GetSessionsMedia +> = z.object({ + audioChannels: z.number().int().optional(), + audioCodec: z.string().optional(), + bitrate: z.number().int().optional(), + container: z.string().optional(), + duration: z.number().int().optional(), + id: z.string().optional(), + selected: z.boolean().optional(), + part: z.array(z.lazy(() => GetSessionsPart$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + part: "Part", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsMedia$ { - /** @deprecated use `GetSessionsMedia$inboundSchema` instead. */ - export const inboundSchema = GetSessionsMedia$inboundSchema; - /** @deprecated use `GetSessionsMedia$outboundSchema` instead. */ - export const outboundSchema = GetSessionsMedia$outboundSchema; - /** @deprecated use `GetSessionsMedia$Outbound` instead. */ - export type Outbound = GetSessionsMedia$Outbound; + /** @deprecated use `GetSessionsMedia$inboundSchema` instead. */ + export const inboundSchema = GetSessionsMedia$inboundSchema; + /** @deprecated use `GetSessionsMedia$outboundSchema` instead. */ + export const outboundSchema = GetSessionsMedia$outboundSchema; + /** @deprecated use `GetSessionsMedia$Outbound` instead. */ + export type Outbound = GetSessionsMedia$Outbound; } /** @internal */ -export const GetSessionsUser$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - thumb: z.string().optional(), - title: z.string().optional(), - }); +export const GetSessionsUser$inboundSchema: z.ZodType< + GetSessionsUser, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + thumb: z.string().optional(), + title: z.string().optional(), +}); /** @internal */ export type GetSessionsUser$Outbound = { - id?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; + id?: string | undefined; + thumb?: string | undefined; + title?: string | undefined; }; /** @internal */ export const GetSessionsUser$outboundSchema: z.ZodType< - GetSessionsUser$Outbound, - z.ZodTypeDef, - GetSessionsUser + GetSessionsUser$Outbound, + z.ZodTypeDef, + GetSessionsUser > = z.object({ - id: z.string().optional(), - thumb: z.string().optional(), - title: z.string().optional(), + id: z.string().optional(), + thumb: z.string().optional(), + title: z.string().optional(), }); /** @@ -410,16 +416,17 @@ export const GetSessionsUser$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsUser$ { - /** @deprecated use `GetSessionsUser$inboundSchema` instead. */ - export const inboundSchema = GetSessionsUser$inboundSchema; - /** @deprecated use `GetSessionsUser$outboundSchema` instead. */ - export const outboundSchema = GetSessionsUser$outboundSchema; - /** @deprecated use `GetSessionsUser$Outbound` instead. */ - export type Outbound = GetSessionsUser$Outbound; + /** @deprecated use `GetSessionsUser$inboundSchema` instead. */ + export const inboundSchema = GetSessionsUser$inboundSchema; + /** @deprecated use `GetSessionsUser$outboundSchema` instead. */ + export const outboundSchema = GetSessionsUser$outboundSchema; + /** @deprecated use `GetSessionsUser$Outbound` instead. */ + export type Outbound = GetSessionsUser$Outbound; } /** @internal */ -export const Player$inboundSchema: z.ZodType = z.object({ +export const Player$inboundSchema: z.ZodType = z + .object({ address: z.string().optional(), machineIdentifier: z.string().optional(), model: z.string().optional(), @@ -435,44 +442,48 @@ export const Player$inboundSchema: z.ZodType = z. relayed: z.boolean().optional(), secure: z.boolean().optional(), userID: z.number().int().optional(), -}); + }); /** @internal */ export type Player$Outbound = { - address?: string | undefined; - machineIdentifier?: string | undefined; - model?: string | undefined; - platform?: string | undefined; - platformVersion?: string | undefined; - product?: string | undefined; - profile?: string | undefined; - remotePublicAddress?: string | undefined; - state?: string | undefined; - title?: string | undefined; - version?: string | undefined; - local?: boolean | undefined; - relayed?: boolean | undefined; - secure?: boolean | undefined; - userID?: number | undefined; + address?: string | undefined; + machineIdentifier?: string | undefined; + model?: string | undefined; + platform?: string | undefined; + platformVersion?: string | undefined; + product?: string | undefined; + profile?: string | undefined; + remotePublicAddress?: string | undefined; + state?: string | undefined; + title?: string | undefined; + version?: string | undefined; + local?: boolean | undefined; + relayed?: boolean | undefined; + secure?: boolean | undefined; + userID?: number | undefined; }; /** @internal */ -export const Player$outboundSchema: z.ZodType = z.object({ - address: z.string().optional(), - machineIdentifier: z.string().optional(), - model: z.string().optional(), - platform: z.string().optional(), - platformVersion: z.string().optional(), - product: z.string().optional(), - profile: z.string().optional(), - remotePublicAddress: z.string().optional(), - state: z.string().optional(), - title: z.string().optional(), - version: z.string().optional(), - local: z.boolean().optional(), - relayed: z.boolean().optional(), - secure: z.boolean().optional(), - userID: z.number().int().optional(), +export const Player$outboundSchema: z.ZodType< + Player$Outbound, + z.ZodTypeDef, + Player +> = z.object({ + address: z.string().optional(), + machineIdentifier: z.string().optional(), + model: z.string().optional(), + platform: z.string().optional(), + platformVersion: z.string().optional(), + product: z.string().optional(), + profile: z.string().optional(), + remotePublicAddress: z.string().optional(), + state: z.string().optional(), + title: z.string().optional(), + version: z.string().optional(), + local: z.boolean().optional(), + relayed: z.boolean().optional(), + secure: z.boolean().optional(), + userID: z.number().int().optional(), }); /** @@ -480,33 +491,38 @@ export const Player$outboundSchema: z.ZodType = z.object({ +export const Session$inboundSchema: z.ZodType = + z.object({ id: z.string().optional(), bandwidth: z.number().int().optional(), location: z.string().optional(), -}); + }); /** @internal */ export type Session$Outbound = { - id?: string | undefined; - bandwidth?: number | undefined; - location?: string | undefined; + id?: string | undefined; + bandwidth?: number | undefined; + location?: string | undefined; }; /** @internal */ -export const Session$outboundSchema: z.ZodType = z.object({ - id: z.string().optional(), - bandwidth: z.number().int().optional(), - location: z.string().optional(), +export const Session$outboundSchema: z.ZodType< + Session$Outbound, + z.ZodTypeDef, + Session +> = z.object({ + id: z.string().optional(), + bandwidth: z.number().int().optional(), + location: z.string().optional(), }); /** @@ -514,334 +530,321 @@ export const Session$outboundSchema: z.ZodType = z - .object({ - addedAt: z.number().int().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - grandparentArt: z.string().optional(), - grandparentGuid: z.string().optional(), - grandparentKey: z.string().optional(), - grandparentRatingKey: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentTitle: z.string().optional(), - guid: z.string().optional(), - index: z.number().int().optional(), - key: z.string().optional(), - librarySectionID: z.string().optional(), - librarySectionKey: z.string().optional(), - librarySectionTitle: z.string().optional(), - musicAnalysisVersion: z.string().optional(), - parentGuid: z.string().optional(), - parentIndex: z.number().int().optional(), - parentKey: z.string().optional(), - parentRatingKey: z.string().optional(), - parentStudio: z.string().optional(), - parentThumb: z.string().optional(), - parentTitle: z.string().optional(), - parentYear: z.number().int().optional(), - ratingCount: z.number().int().optional(), - ratingKey: z.string().optional(), - sessionKey: z.string().optional(), - thumb: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - type: z.string().optional(), - updatedAt: z.number().int().optional(), - viewOffset: z.number().int().optional(), - Media: z.array(z.lazy(() => GetSessionsMedia$inboundSchema)).optional(), - User: z.lazy(() => GetSessionsUser$inboundSchema).optional(), - Player: z.lazy(() => Player$inboundSchema).optional(), - Session: z.lazy(() => Session$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - Media: "media", - User: "user", - Player: "player", - Session: "session", - }); - }); + GetSessionsMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + addedAt: z.number().int().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + grandparentArt: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentTitle: z.string().optional(), + guid: z.string().optional(), + index: z.number().int().optional(), + key: z.string().optional(), + librarySectionID: z.string().optional(), + librarySectionKey: z.string().optional(), + librarySectionTitle: z.string().optional(), + musicAnalysisVersion: z.string().optional(), + parentGuid: z.string().optional(), + parentIndex: z.number().int().optional(), + parentKey: z.string().optional(), + parentRatingKey: z.string().optional(), + parentStudio: z.string().optional(), + parentThumb: z.string().optional(), + parentTitle: z.string().optional(), + parentYear: z.number().int().optional(), + ratingCount: z.number().int().optional(), + ratingKey: z.string().optional(), + sessionKey: z.string().optional(), + thumb: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + type: z.string().optional(), + updatedAt: z.number().int().optional(), + viewOffset: z.number().int().optional(), + Media: z.array(z.lazy(() => GetSessionsMedia$inboundSchema)).optional(), + User: z.lazy(() => GetSessionsUser$inboundSchema).optional(), + Player: z.lazy(() => Player$inboundSchema).optional(), + Session: z.lazy(() => Session$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Media": "media", + "User": "user", + "Player": "player", + "Session": "session", + }); +}); /** @internal */ export type GetSessionsMetadata$Outbound = { - addedAt?: number | undefined; - art?: string | undefined; - duration?: number | undefined; - grandparentArt?: string | undefined; - grandparentGuid?: string | undefined; - grandparentKey?: string | undefined; - grandparentRatingKey?: string | undefined; - grandparentThumb?: string | undefined; - grandparentTitle?: string | undefined; - guid?: string | undefined; - index?: number | undefined; - key?: string | undefined; - librarySectionID?: string | undefined; - librarySectionKey?: string | undefined; - librarySectionTitle?: string | undefined; - musicAnalysisVersion?: string | undefined; - parentGuid?: string | undefined; - parentIndex?: number | undefined; - parentKey?: string | undefined; - parentRatingKey?: string | undefined; - parentStudio?: string | undefined; - parentThumb?: string | undefined; - parentTitle?: string | undefined; - parentYear?: number | undefined; - ratingCount?: number | undefined; - ratingKey?: string | undefined; - sessionKey?: string | undefined; - thumb?: string | undefined; - title?: string | undefined; - titleSort?: string | undefined; - type?: string | undefined; - updatedAt?: number | undefined; - viewOffset?: number | undefined; - Media?: Array | undefined; - User?: GetSessionsUser$Outbound | undefined; - Player?: Player$Outbound | undefined; - Session?: Session$Outbound | undefined; + addedAt?: number | undefined; + art?: string | undefined; + duration?: number | undefined; + grandparentArt?: string | undefined; + grandparentGuid?: string | undefined; + grandparentKey?: string | undefined; + grandparentRatingKey?: string | undefined; + grandparentThumb?: string | undefined; + grandparentTitle?: string | undefined; + guid?: string | undefined; + index?: number | undefined; + key?: string | undefined; + librarySectionID?: string | undefined; + librarySectionKey?: string | undefined; + librarySectionTitle?: string | undefined; + musicAnalysisVersion?: string | undefined; + parentGuid?: string | undefined; + parentIndex?: number | undefined; + parentKey?: string | undefined; + parentRatingKey?: string | undefined; + parentStudio?: string | undefined; + parentThumb?: string | undefined; + parentTitle?: string | undefined; + parentYear?: number | undefined; + ratingCount?: number | undefined; + ratingKey?: string | undefined; + sessionKey?: string | undefined; + thumb?: string | undefined; + title?: string | undefined; + titleSort?: string | undefined; + type?: string | undefined; + updatedAt?: number | undefined; + viewOffset?: number | undefined; + Media?: Array | undefined; + User?: GetSessionsUser$Outbound | undefined; + Player?: Player$Outbound | undefined; + Session?: Session$Outbound | undefined; }; /** @internal */ export const GetSessionsMetadata$outboundSchema: z.ZodType< - GetSessionsMetadata$Outbound, - z.ZodTypeDef, - GetSessionsMetadata -> = z - .object({ - addedAt: z.number().int().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - grandparentArt: z.string().optional(), - grandparentGuid: z.string().optional(), - grandparentKey: z.string().optional(), - grandparentRatingKey: z.string().optional(), - grandparentThumb: z.string().optional(), - grandparentTitle: z.string().optional(), - guid: z.string().optional(), - index: z.number().int().optional(), - key: z.string().optional(), - librarySectionID: z.string().optional(), - librarySectionKey: z.string().optional(), - librarySectionTitle: z.string().optional(), - musicAnalysisVersion: z.string().optional(), - parentGuid: z.string().optional(), - parentIndex: z.number().int().optional(), - parentKey: z.string().optional(), - parentRatingKey: z.string().optional(), - parentStudio: z.string().optional(), - parentThumb: z.string().optional(), - parentTitle: z.string().optional(), - parentYear: z.number().int().optional(), - ratingCount: z.number().int().optional(), - ratingKey: z.string().optional(), - sessionKey: z.string().optional(), - thumb: z.string().optional(), - title: z.string().optional(), - titleSort: z.string().optional(), - type: z.string().optional(), - updatedAt: z.number().int().optional(), - viewOffset: z.number().int().optional(), - media: z.array(z.lazy(() => GetSessionsMedia$outboundSchema)).optional(), - user: z.lazy(() => GetSessionsUser$outboundSchema).optional(), - player: z.lazy(() => Player$outboundSchema).optional(), - session: z.lazy(() => Session$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - media: "Media", - user: "User", - player: "Player", - session: "Session", - }); - }); + GetSessionsMetadata$Outbound, + z.ZodTypeDef, + GetSessionsMetadata +> = z.object({ + addedAt: z.number().int().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + grandparentArt: z.string().optional(), + grandparentGuid: z.string().optional(), + grandparentKey: z.string().optional(), + grandparentRatingKey: z.string().optional(), + grandparentThumb: z.string().optional(), + grandparentTitle: z.string().optional(), + guid: z.string().optional(), + index: z.number().int().optional(), + key: z.string().optional(), + librarySectionID: z.string().optional(), + librarySectionKey: z.string().optional(), + librarySectionTitle: z.string().optional(), + musicAnalysisVersion: z.string().optional(), + parentGuid: z.string().optional(), + parentIndex: z.number().int().optional(), + parentKey: z.string().optional(), + parentRatingKey: z.string().optional(), + parentStudio: z.string().optional(), + parentThumb: z.string().optional(), + parentTitle: z.string().optional(), + parentYear: z.number().int().optional(), + ratingCount: z.number().int().optional(), + ratingKey: z.string().optional(), + sessionKey: z.string().optional(), + thumb: z.string().optional(), + title: z.string().optional(), + titleSort: z.string().optional(), + type: z.string().optional(), + updatedAt: z.number().int().optional(), + viewOffset: z.number().int().optional(), + media: z.array(z.lazy(() => GetSessionsMedia$outboundSchema)).optional(), + user: z.lazy(() => GetSessionsUser$outboundSchema).optional(), + player: z.lazy(() => Player$outboundSchema).optional(), + session: z.lazy(() => Session$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + media: "Media", + user: "User", + player: "Player", + session: "Session", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsMetadata$ { - /** @deprecated use `GetSessionsMetadata$inboundSchema` instead. */ - export const inboundSchema = GetSessionsMetadata$inboundSchema; - /** @deprecated use `GetSessionsMetadata$outboundSchema` instead. */ - export const outboundSchema = GetSessionsMetadata$outboundSchema; - /** @deprecated use `GetSessionsMetadata$Outbound` instead. */ - export type Outbound = GetSessionsMetadata$Outbound; + /** @deprecated use `GetSessionsMetadata$inboundSchema` instead. */ + export const inboundSchema = GetSessionsMetadata$inboundSchema; + /** @deprecated use `GetSessionsMetadata$outboundSchema` instead. */ + export const outboundSchema = GetSessionsMetadata$outboundSchema; + /** @deprecated use `GetSessionsMetadata$Outbound` instead. */ + export type Outbound = GetSessionsMetadata$Outbound; } /** @internal */ export const GetSessionsMediaContainer$inboundSchema: z.ZodType< - GetSessionsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetSessionsMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetSessionsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetSessionsMetadata$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetSessionsMediaContainer$Outbound = { - size?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetSessionsMediaContainer$outboundSchema: z.ZodType< - GetSessionsMediaContainer$Outbound, - z.ZodTypeDef, - GetSessionsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetSessionsMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetSessionsMediaContainer$Outbound, + z.ZodTypeDef, + GetSessionsMediaContainer +> = z.object({ + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetSessionsMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsMediaContainer$ { - /** @deprecated use `GetSessionsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetSessionsMediaContainer$inboundSchema; - /** @deprecated use `GetSessionsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetSessionsMediaContainer$outboundSchema; - /** @deprecated use `GetSessionsMediaContainer$Outbound` instead. */ - export type Outbound = GetSessionsMediaContainer$Outbound; + /** @deprecated use `GetSessionsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetSessionsMediaContainer$inboundSchema; + /** @deprecated use `GetSessionsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetSessionsMediaContainer$outboundSchema; + /** @deprecated use `GetSessionsMediaContainer$Outbound` instead. */ + export type Outbound = GetSessionsMediaContainer$Outbound; } /** @internal */ export const GetSessionsResponseBody$inboundSchema: z.ZodType< - GetSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetSessionsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetSessionsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetSessionsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetSessionsResponseBody$Outbound = { - MediaContainer?: GetSessionsMediaContainer$Outbound | undefined; + MediaContainer?: GetSessionsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetSessionsResponseBody$outboundSchema: z.ZodType< - GetSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetSessionsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetSessionsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetSessionsResponseBody$Outbound, + z.ZodTypeDef, + GetSessionsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetSessionsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsResponseBody$ { - /** @deprecated use `GetSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetSessionsResponseBody$inboundSchema; - /** @deprecated use `GetSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetSessionsResponseBody$outboundSchema; - /** @deprecated use `GetSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetSessionsResponseBody$Outbound; + /** @deprecated use `GetSessionsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetSessionsResponseBody$inboundSchema; + /** @deprecated use `GetSessionsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetSessionsResponseBody$outboundSchema; + /** @deprecated use `GetSessionsResponseBody$Outbound` instead. */ + export type Outbound = GetSessionsResponseBody$Outbound; } /** @internal */ export const GetSessionsResponse$inboundSchema: z.ZodType< - GetSessionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetSessionsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetSessionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetSessionsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetSessionsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetSessionsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetSessionsResponseBody$Outbound | undefined; }; /** @internal */ export const GetSessionsResponse$outboundSchema: z.ZodType< - GetSessionsResponse$Outbound, - z.ZodTypeDef, - GetSessionsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetSessionsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetSessionsResponse$Outbound, + z.ZodTypeDef, + GetSessionsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetSessionsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSessionsResponse$ { - /** @deprecated use `GetSessionsResponse$inboundSchema` instead. */ - export const inboundSchema = GetSessionsResponse$inboundSchema; - /** @deprecated use `GetSessionsResponse$outboundSchema` instead. */ - export const outboundSchema = GetSessionsResponse$outboundSchema; - /** @deprecated use `GetSessionsResponse$Outbound` instead. */ - export type Outbound = GetSessionsResponse$Outbound; + /** @deprecated use `GetSessionsResponse$inboundSchema` instead. */ + export const inboundSchema = GetSessionsResponse$inboundSchema; + /** @deprecated use `GetSessionsResponse$outboundSchema` instead. */ + export const outboundSchema = GetSessionsResponse$outboundSchema; + /** @deprecated use `GetSessionsResponse$Outbound` instead. */ + export type Outbound = GetSessionsResponse$Outbound; } diff --git a/src/sdk/models/operations/getsourceconnectioninformation.ts b/src/sdk/models/operations/getsourceconnectioninformation.ts index 29aeff61..8782f508 100644 --- a/src/sdk/models/operations/getsourceconnectioninformation.ts +++ b/src/sdk/models/operations/getsourceconnectioninformation.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetSourceConnectionInformationRequest = { - /** - * The source identifier with an included prefix. - */ - source: string; + /** + * The source identifier with an included prefix. + */ + source: string; }; export type GetSourceConnectionInformationResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const GetSourceConnectionInformationRequest$inboundSchema: z.ZodType< - GetSourceConnectionInformationRequest, - z.ZodTypeDef, - unknown + GetSourceConnectionInformationRequest, + z.ZodTypeDef, + unknown > = z.object({ - source: z.string(), + source: z.string(), }); /** @internal */ export type GetSourceConnectionInformationRequest$Outbound = { - source: string; + source: string; }; /** @internal */ export const GetSourceConnectionInformationRequest$outboundSchema: z.ZodType< - GetSourceConnectionInformationRequest$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationRequest + GetSourceConnectionInformationRequest$Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationRequest > = z.object({ - source: z.string(), + source: z.string(), }); /** @@ -55,70 +55,70 @@ export const GetSourceConnectionInformationRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSourceConnectionInformationRequest$ { - /** @deprecated use `GetSourceConnectionInformationRequest$inboundSchema` instead. */ - export const inboundSchema = GetSourceConnectionInformationRequest$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationRequest$outboundSchema` instead. */ - export const outboundSchema = GetSourceConnectionInformationRequest$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationRequest$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationRequest$Outbound; + /** @deprecated use `GetSourceConnectionInformationRequest$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationRequest$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationRequest$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationRequest$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationRequest$Outbound` instead. */ + export type Outbound = GetSourceConnectionInformationRequest$Outbound; } /** @internal */ export const GetSourceConnectionInformationResponse$inboundSchema: z.ZodType< - GetSourceConnectionInformationResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetSourceConnectionInformationResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetSourceConnectionInformationResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetSourceConnectionInformationResponse$outboundSchema: z.ZodType< - GetSourceConnectionInformationResponse$Outbound, - z.ZodTypeDef, - GetSourceConnectionInformationResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetSourceConnectionInformationResponse$Outbound, + z.ZodTypeDef, + GetSourceConnectionInformationResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetSourceConnectionInformationResponse$ { - /** @deprecated use `GetSourceConnectionInformationResponse$inboundSchema` instead. */ - export const inboundSchema = GetSourceConnectionInformationResponse$inboundSchema; - /** @deprecated use `GetSourceConnectionInformationResponse$outboundSchema` instead. */ - export const outboundSchema = GetSourceConnectionInformationResponse$outboundSchema; - /** @deprecated use `GetSourceConnectionInformationResponse$Outbound` instead. */ - export type Outbound = GetSourceConnectionInformationResponse$Outbound; + /** @deprecated use `GetSourceConnectionInformationResponse$inboundSchema` instead. */ + export const inboundSchema = + GetSourceConnectionInformationResponse$inboundSchema; + /** @deprecated use `GetSourceConnectionInformationResponse$outboundSchema` instead. */ + export const outboundSchema = + GetSourceConnectionInformationResponse$outboundSchema; + /** @deprecated use `GetSourceConnectionInformationResponse$Outbound` instead. */ + export type Outbound = GetSourceConnectionInformationResponse$Outbound; } diff --git a/src/sdk/models/operations/getstatistics.ts b/src/sdk/models/operations/getstatistics.ts index 56692fa1..be89bae3 100644 --- a/src/sdk/models/operations/getstatistics.ts +++ b/src/sdk/models/operations/getstatistics.ts @@ -2,163 +2,158 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetStatisticsRequest = { - /** - * The timespan to retrieve statistics for - * - * @remarks - * the exact meaning of this parameter is not known - * - */ - timespan?: number | undefined; + /** + * The timespan to retrieve statistics for + * + * @remarks + * the exact meaning of this parameter is not known + */ + timespan?: number | undefined; }; export type GetStatisticsDevice = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; export type Account = { - id?: number | undefined; - key?: string | undefined; - name?: string | undefined; - defaultAudioLanguage?: string | undefined; - autoSelectAudio?: boolean | undefined; - defaultSubtitleLanguage?: string | undefined; - subtitleMode?: number | undefined; - thumb?: string | undefined; + id?: number | undefined; + key?: string | undefined; + name?: string | undefined; + defaultAudioLanguage?: string | undefined; + autoSelectAudio?: boolean | undefined; + defaultSubtitleLanguage?: string | undefined; + subtitleMode?: number | undefined; + thumb?: string | undefined; }; export type StatisticsMedia = { - accountID?: number | undefined; - deviceID?: number | undefined; - timespan?: number | undefined; - at?: number | undefined; - metadataType?: number | undefined; - count?: number | undefined; - duration?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + metadataType?: number | undefined; + count?: number | undefined; + duration?: number | undefined; }; export type GetStatisticsMediaContainer = { - size?: number | undefined; - device?: Array | undefined; - account?: Array | undefined; - statisticsMedia?: Array | undefined; + size?: number | undefined; + device?: Array | undefined; + account?: Array | undefined; + statisticsMedia?: Array | undefined; }; /** * Media Statistics */ export type GetStatisticsResponseBody = { - mediaContainer?: GetStatisticsMediaContainer | undefined; + mediaContainer?: GetStatisticsMediaContainer | undefined; }; export type GetStatisticsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Media Statistics - */ - object?: GetStatisticsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Media Statistics + */ + object?: GetStatisticsResponseBody | undefined; }; /** @internal */ export const GetStatisticsRequest$inboundSchema: z.ZodType< - GetStatisticsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - Timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - Timespan: "timespan", - }); - }); + GetStatisticsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + Timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + "Timespan": "timespan", + }); +}); /** @internal */ export type GetStatisticsRequest$Outbound = { - Timespan?: number | undefined; + Timespan?: number | undefined; }; /** @internal */ export const GetStatisticsRequest$outboundSchema: z.ZodType< - GetStatisticsRequest$Outbound, - z.ZodTypeDef, - GetStatisticsRequest -> = z - .object({ - timespan: z.number().int().optional(), - }) - .transform((v) => { - return remap$(v, { - timespan: "Timespan", - }); - }); + GetStatisticsRequest$Outbound, + z.ZodTypeDef, + GetStatisticsRequest +> = z.object({ + timespan: z.number().int().optional(), +}).transform((v) => { + return remap$(v, { + timespan: "Timespan", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsRequest$ { - /** @deprecated use `GetStatisticsRequest$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsRequest$inboundSchema; - /** @deprecated use `GetStatisticsRequest$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsRequest$outboundSchema; - /** @deprecated use `GetStatisticsRequest$Outbound` instead. */ - export type Outbound = GetStatisticsRequest$Outbound; + /** @deprecated use `GetStatisticsRequest$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsRequest$inboundSchema; + /** @deprecated use `GetStatisticsRequest$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsRequest$outboundSchema; + /** @deprecated use `GetStatisticsRequest$Outbound` instead. */ + export type Outbound = GetStatisticsRequest$Outbound; } /** @internal */ export const GetStatisticsDevice$inboundSchema: z.ZodType< - GetStatisticsDevice, - z.ZodTypeDef, - unknown + GetStatisticsDevice, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), - platform: z.string().optional(), - clientIdentifier: z.string().optional(), - createdAt: z.number().int().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().int().optional(), }); /** @internal */ export type GetStatisticsDevice$Outbound = { - id?: number | undefined; - name?: string | undefined; - platform?: string | undefined; - clientIdentifier?: string | undefined; - createdAt?: number | undefined; + id?: number | undefined; + name?: string | undefined; + platform?: string | undefined; + clientIdentifier?: string | undefined; + createdAt?: number | undefined; }; /** @internal */ export const GetStatisticsDevice$outboundSchema: z.ZodType< - GetStatisticsDevice$Outbound, - z.ZodTypeDef, - GetStatisticsDevice + GetStatisticsDevice$Outbound, + z.ZodTypeDef, + GetStatisticsDevice > = z.object({ - id: z.number().int().optional(), - name: z.string().optional(), - platform: z.string().optional(), - clientIdentifier: z.string().optional(), - createdAt: z.number().int().optional(), + id: z.number().int().optional(), + name: z.string().optional(), + platform: z.string().optional(), + clientIdentifier: z.string().optional(), + createdAt: z.number().int().optional(), }); /** @@ -166,16 +161,17 @@ export const GetStatisticsDevice$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsDevice$ { - /** @deprecated use `GetStatisticsDevice$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsDevice$inboundSchema; - /** @deprecated use `GetStatisticsDevice$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsDevice$outboundSchema; - /** @deprecated use `GetStatisticsDevice$Outbound` instead. */ - export type Outbound = GetStatisticsDevice$Outbound; + /** @deprecated use `GetStatisticsDevice$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsDevice$inboundSchema; + /** @deprecated use `GetStatisticsDevice$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsDevice$outboundSchema; + /** @deprecated use `GetStatisticsDevice$Outbound` instead. */ + export type Outbound = GetStatisticsDevice$Outbound; } /** @internal */ -export const Account$inboundSchema: z.ZodType = z.object({ +export const Account$inboundSchema: z.ZodType = + z.object({ id: z.number().int().optional(), key: z.string().optional(), name: z.string().optional(), @@ -184,30 +180,34 @@ export const Account$inboundSchema: z.ZodType = defaultSubtitleLanguage: z.string().optional(), subtitleMode: z.number().int().optional(), thumb: z.string().optional(), -}); + }); /** @internal */ export type Account$Outbound = { - id?: number | undefined; - key?: string | undefined; - name?: string | undefined; - defaultAudioLanguage?: string | undefined; - autoSelectAudio?: boolean | undefined; - defaultSubtitleLanguage?: string | undefined; - subtitleMode?: number | undefined; - thumb?: string | undefined; + id?: number | undefined; + key?: string | undefined; + name?: string | undefined; + defaultAudioLanguage?: string | undefined; + autoSelectAudio?: boolean | undefined; + defaultSubtitleLanguage?: string | undefined; + subtitleMode?: number | undefined; + thumb?: string | undefined; }; /** @internal */ -export const Account$outboundSchema: z.ZodType = z.object({ - id: z.number().int().optional(), - key: z.string().optional(), - name: z.string().optional(), - defaultAudioLanguage: z.string().optional(), - autoSelectAudio: z.boolean().optional(), - defaultSubtitleLanguage: z.string().optional(), - subtitleMode: z.number().int().optional(), - thumb: z.string().optional(), +export const Account$outboundSchema: z.ZodType< + Account$Outbound, + z.ZodTypeDef, + Account +> = z.object({ + id: z.number().int().optional(), + key: z.string().optional(), + name: z.string().optional(), + defaultAudioLanguage: z.string().optional(), + autoSelectAudio: z.boolean().optional(), + defaultSubtitleLanguage: z.string().optional(), + subtitleMode: z.number().int().optional(), + thumb: z.string().optional(), }); /** @@ -215,50 +215,53 @@ export const Account$outboundSchema: z.ZodType = - z.object({ - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), - timespan: z.number().int().optional(), - at: z.number().int().optional(), - metadataType: z.number().int().optional(), - count: z.number().int().optional(), - duration: z.number().int().optional(), - }); +export const StatisticsMedia$inboundSchema: z.ZodType< + StatisticsMedia, + z.ZodTypeDef, + unknown +> = z.object({ + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + metadataType: z.number().int().optional(), + count: z.number().int().optional(), + duration: z.number().int().optional(), +}); /** @internal */ export type StatisticsMedia$Outbound = { - accountID?: number | undefined; - deviceID?: number | undefined; - timespan?: number | undefined; - at?: number | undefined; - metadataType?: number | undefined; - count?: number | undefined; - duration?: number | undefined; + accountID?: number | undefined; + deviceID?: number | undefined; + timespan?: number | undefined; + at?: number | undefined; + metadataType?: number | undefined; + count?: number | undefined; + duration?: number | undefined; }; /** @internal */ export const StatisticsMedia$outboundSchema: z.ZodType< - StatisticsMedia$Outbound, - z.ZodTypeDef, - StatisticsMedia + StatisticsMedia$Outbound, + z.ZodTypeDef, + StatisticsMedia > = z.object({ - accountID: z.number().int().optional(), - deviceID: z.number().int().optional(), - timespan: z.number().int().optional(), - at: z.number().int().optional(), - metadataType: z.number().int().optional(), - count: z.number().int().optional(), - duration: z.number().int().optional(), + accountID: z.number().int().optional(), + deviceID: z.number().int().optional(), + timespan: z.number().int().optional(), + at: z.number().int().optional(), + metadataType: z.number().int().optional(), + count: z.number().int().optional(), + duration: z.number().int().optional(), }); /** @@ -266,182 +269,174 @@ export const StatisticsMedia$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StatisticsMedia$ { - /** @deprecated use `StatisticsMedia$inboundSchema` instead. */ - export const inboundSchema = StatisticsMedia$inboundSchema; - /** @deprecated use `StatisticsMedia$outboundSchema` instead. */ - export const outboundSchema = StatisticsMedia$outboundSchema; - /** @deprecated use `StatisticsMedia$Outbound` instead. */ - export type Outbound = StatisticsMedia$Outbound; + /** @deprecated use `StatisticsMedia$inboundSchema` instead. */ + export const inboundSchema = StatisticsMedia$inboundSchema; + /** @deprecated use `StatisticsMedia$outboundSchema` instead. */ + export const outboundSchema = StatisticsMedia$outboundSchema; + /** @deprecated use `StatisticsMedia$Outbound` instead. */ + export type Outbound = StatisticsMedia$Outbound; } /** @internal */ export const GetStatisticsMediaContainer$inboundSchema: z.ZodType< - GetStatisticsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - Device: z.array(z.lazy(() => GetStatisticsDevice$inboundSchema)).optional(), - Account: z.array(z.lazy(() => Account$inboundSchema)).optional(), - StatisticsMedia: z.array(z.lazy(() => StatisticsMedia$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Device: "device", - Account: "account", - StatisticsMedia: "statisticsMedia", - }); - }); + GetStatisticsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + Device: z.array(z.lazy(() => GetStatisticsDevice$inboundSchema)).optional(), + Account: z.array(z.lazy(() => Account$inboundSchema)).optional(), + StatisticsMedia: z.array(z.lazy(() => StatisticsMedia$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Device": "device", + "Account": "account", + "StatisticsMedia": "statisticsMedia", + }); +}); /** @internal */ export type GetStatisticsMediaContainer$Outbound = { - size?: number | undefined; - Device?: Array | undefined; - Account?: Array | undefined; - StatisticsMedia?: Array | undefined; + size?: number | undefined; + Device?: Array | undefined; + Account?: Array | undefined; + StatisticsMedia?: Array | undefined; }; /** @internal */ export const GetStatisticsMediaContainer$outboundSchema: z.ZodType< - GetStatisticsMediaContainer$Outbound, - z.ZodTypeDef, - GetStatisticsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - device: z.array(z.lazy(() => GetStatisticsDevice$outboundSchema)).optional(), - account: z.array(z.lazy(() => Account$outboundSchema)).optional(), - statisticsMedia: z.array(z.lazy(() => StatisticsMedia$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - device: "Device", - account: "Account", - statisticsMedia: "StatisticsMedia", - }); - }); + GetStatisticsMediaContainer$Outbound, + z.ZodTypeDef, + GetStatisticsMediaContainer +> = z.object({ + size: z.number().int().optional(), + device: z.array(z.lazy(() => GetStatisticsDevice$outboundSchema)).optional(), + account: z.array(z.lazy(() => Account$outboundSchema)).optional(), + statisticsMedia: z.array(z.lazy(() => StatisticsMedia$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + device: "Device", + account: "Account", + statisticsMedia: "StatisticsMedia", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsMediaContainer$ { - /** @deprecated use `GetStatisticsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsMediaContainer$inboundSchema; - /** @deprecated use `GetStatisticsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsMediaContainer$outboundSchema; - /** @deprecated use `GetStatisticsMediaContainer$Outbound` instead. */ - export type Outbound = GetStatisticsMediaContainer$Outbound; + /** @deprecated use `GetStatisticsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsMediaContainer$inboundSchema; + /** @deprecated use `GetStatisticsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsMediaContainer$outboundSchema; + /** @deprecated use `GetStatisticsMediaContainer$Outbound` instead. */ + export type Outbound = GetStatisticsMediaContainer$Outbound; } /** @internal */ export const GetStatisticsResponseBody$inboundSchema: z.ZodType< - GetStatisticsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetStatisticsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetStatisticsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetStatisticsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetStatisticsResponseBody$Outbound = { - MediaContainer?: GetStatisticsMediaContainer$Outbound | undefined; + MediaContainer?: GetStatisticsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetStatisticsResponseBody$outboundSchema: z.ZodType< - GetStatisticsResponseBody$Outbound, - z.ZodTypeDef, - GetStatisticsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetStatisticsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetStatisticsResponseBody$Outbound, + z.ZodTypeDef, + GetStatisticsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetStatisticsMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsResponseBody$ { - /** @deprecated use `GetStatisticsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsResponseBody$inboundSchema; - /** @deprecated use `GetStatisticsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsResponseBody$outboundSchema; - /** @deprecated use `GetStatisticsResponseBody$Outbound` instead. */ - export type Outbound = GetStatisticsResponseBody$Outbound; + /** @deprecated use `GetStatisticsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsResponseBody$inboundSchema; + /** @deprecated use `GetStatisticsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsResponseBody$outboundSchema; + /** @deprecated use `GetStatisticsResponseBody$Outbound` instead. */ + export type Outbound = GetStatisticsResponseBody$Outbound; } /** @internal */ export const GetStatisticsResponse$inboundSchema: z.ZodType< - GetStatisticsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetStatisticsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetStatisticsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetStatisticsResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetStatisticsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetStatisticsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetStatisticsResponseBody$Outbound | undefined; }; /** @internal */ export const GetStatisticsResponse$outboundSchema: z.ZodType< - GetStatisticsResponse$Outbound, - z.ZodTypeDef, - GetStatisticsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetStatisticsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetStatisticsResponse$Outbound, + z.ZodTypeDef, + GetStatisticsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetStatisticsResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetStatisticsResponse$ { - /** @deprecated use `GetStatisticsResponse$inboundSchema` instead. */ - export const inboundSchema = GetStatisticsResponse$inboundSchema; - /** @deprecated use `GetStatisticsResponse$outboundSchema` instead. */ - export const outboundSchema = GetStatisticsResponse$outboundSchema; - /** @deprecated use `GetStatisticsResponse$Outbound` instead. */ - export type Outbound = GetStatisticsResponse$Outbound; + /** @deprecated use `GetStatisticsResponse$inboundSchema` instead. */ + export const inboundSchema = GetStatisticsResponse$inboundSchema; + /** @deprecated use `GetStatisticsResponse$outboundSchema` instead. */ + export const outboundSchema = GetStatisticsResponse$outboundSchema; + /** @deprecated use `GetStatisticsResponse$Outbound` instead. */ + export type Outbound = GetStatisticsResponse$Outbound; } diff --git a/src/sdk/models/operations/getthumbimage.ts b/src/sdk/models/operations/getthumbimage.ts index 104b52d0..412a6c74 100644 --- a/src/sdk/models/operations/getthumbimage.ts +++ b/src/sdk/models/operations/getthumbimage.ts @@ -2,173 +2,165 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type GetThumbImageRequest = { - /** - * the id of the library item to return the children of. - */ - ratingKey: number; - width: number; - height: number; - minSize: number; - upscale: number; - /** - * Plex Authentication Token - */ - xPlexToken: string; + /** + * the id of the library item to return the children of. + */ + ratingKey: number; + width: number; + height: number; + minSize: number; + upscale: number; + /** + * Plex Authentication Token + */ + xPlexToken: string; }; export type GetThumbImageResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Successful response returning an image - */ - responseStream?: ReadableStream | undefined; - headers: { [k: string]: Array }; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Successful response returning an image + */ + responseStream?: ReadableStream | undefined; + headers: { [k: string]: Array }; }; /** @internal */ export const GetThumbImageRequest$inboundSchema: z.ZodType< - GetThumbImageRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.number().int(), - width: z.number().int(), - height: z.number().int(), - minSize: z.number().int(), - upscale: z.number().int(), - "X-Plex-Token": z.string(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Token": "xPlexToken", - }); - }); + GetThumbImageRequest, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.number().int(), + width: z.number().int(), + height: z.number().int(), + minSize: z.number().int(), + upscale: z.number().int(), + "X-Plex-Token": z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Token": "xPlexToken", + }); +}); /** @internal */ export type GetThumbImageRequest$Outbound = { - ratingKey: number; - width: number; - height: number; - minSize: number; - upscale: number; - "X-Plex-Token": string; + ratingKey: number; + width: number; + height: number; + minSize: number; + upscale: number; + "X-Plex-Token": string; }; /** @internal */ export const GetThumbImageRequest$outboundSchema: z.ZodType< - GetThumbImageRequest$Outbound, - z.ZodTypeDef, - GetThumbImageRequest -> = z - .object({ - ratingKey: z.number().int(), - width: z.number().int(), - height: z.number().int(), - minSize: z.number().int(), - upscale: z.number().int(), - xPlexToken: z.string(), - }) - .transform((v) => { - return remap$(v, { - xPlexToken: "X-Plex-Token", - }); - }); + GetThumbImageRequest$Outbound, + z.ZodTypeDef, + GetThumbImageRequest +> = z.object({ + ratingKey: z.number().int(), + width: z.number().int(), + height: z.number().int(), + minSize: z.number().int(), + upscale: z.number().int(), + xPlexToken: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexToken: "X-Plex-Token", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetThumbImageRequest$ { - /** @deprecated use `GetThumbImageRequest$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageRequest$inboundSchema; - /** @deprecated use `GetThumbImageRequest$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageRequest$outboundSchema; - /** @deprecated use `GetThumbImageRequest$Outbound` instead. */ - export type Outbound = GetThumbImageRequest$Outbound; + /** @deprecated use `GetThumbImageRequest$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageRequest$inboundSchema; + /** @deprecated use `GetThumbImageRequest$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageRequest$outboundSchema; + /** @deprecated use `GetThumbImageRequest$Outbound` instead. */ + export type Outbound = GetThumbImageRequest$Outbound; } /** @internal */ export const GetThumbImageResponse$inboundSchema: z.ZodType< - GetThumbImageResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - "response-stream": z.instanceof(ReadableStream).optional(), - Headers: z.record(z.array(z.string())), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - "response-stream": "responseStream", - Headers: "headers", - }); - }); + GetThumbImageResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + "response-stream": z.instanceof(ReadableStream).optional(), + Headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "response-stream": "responseStream", + "Headers": "headers", + }); +}); /** @internal */ export type GetThumbImageResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - "response-stream"?: ReadableStream | undefined; - Headers: { [k: string]: Array }; + ContentType: string; + StatusCode: number; + RawResponse: never; + "response-stream"?: ReadableStream | undefined; + Headers: { [k: string]: Array }; }; /** @internal */ export const GetThumbImageResponse$outboundSchema: z.ZodType< - GetThumbImageResponse$Outbound, - z.ZodTypeDef, - GetThumbImageResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - responseStream: z.instanceof(ReadableStream).optional(), - headers: z.record(z.array(z.string())), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - responseStream: "response-stream", - headers: "Headers", - }); - }); + GetThumbImageResponse$Outbound, + z.ZodTypeDef, + GetThumbImageResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + responseStream: z.instanceof(ReadableStream).optional(), + headers: z.record(z.array(z.string())), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + responseStream: "response-stream", + headers: "Headers", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetThumbImageResponse$ { - /** @deprecated use `GetThumbImageResponse$inboundSchema` instead. */ - export const inboundSchema = GetThumbImageResponse$inboundSchema; - /** @deprecated use `GetThumbImageResponse$outboundSchema` instead. */ - export const outboundSchema = GetThumbImageResponse$outboundSchema; - /** @deprecated use `GetThumbImageResponse$Outbound` instead. */ - export type Outbound = GetThumbImageResponse$Outbound; + /** @deprecated use `GetThumbImageResponse$inboundSchema` instead. */ + export const inboundSchema = GetThumbImageResponse$inboundSchema; + /** @deprecated use `GetThumbImageResponse$outboundSchema` instead. */ + export const outboundSchema = GetThumbImageResponse$outboundSchema; + /** @deprecated use `GetThumbImageResponse$Outbound` instead. */ + export type Outbound = GetThumbImageResponse$Outbound; } diff --git a/src/sdk/models/operations/gettimeline.ts b/src/sdk/models/operations/gettimeline.ts index ebd9f8bc..61797dc4 100644 --- a/src/sdk/models/operations/gettimeline.ts +++ b/src/sdk/models/operations/gettimeline.ts @@ -2,141 +2,144 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * The state of the media item */ export enum State { - Playing = "playing", - Paused = "paused", - Stopped = "stopped", + Playing = "playing", + Paused = "paused", + Stopped = "stopped", } export type GetTimelineRequest = { - /** - * The rating key of the media item - */ - ratingKey: number; - /** - * The key of the media item to get the timeline for - */ - key: string; - /** - * The state of the media item - */ - state: State; - /** - * Whether the media item has MDE - */ - hasMDE: number; - /** - * The time of the media item - */ - time: number; - /** - * The duration of the media item - */ - duration: number; - /** - * The context of the media item - */ - context: string; - /** - * The play queue item ID of the media item - */ - playQueueItemID: number; - /** - * The playback time of the media item - */ - playBackTime: number; - /** - * The row of the media item - */ - row: number; + /** + * The rating key of the media item + */ + ratingKey: number; + /** + * The key of the media item to get the timeline for + */ + key: string; + /** + * The state of the media item + */ + state: State; + /** + * Whether the media item has MDE + */ + hasMDE: number; + /** + * The time of the media item + */ + time: number; + /** + * The duration of the media item + */ + duration: number; + /** + * The context of the media item + */ + context: string; + /** + * The play queue item ID of the media item + */ + playQueueItemID: number; + /** + * The playback time of the media item + */ + playBackTime: number; + /** + * The row of the media item + */ + row: number; }; export type GetTimelineResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const State$inboundSchema: z.ZodNativeEnum = z.nativeEnum(State); +export const State$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + State, +); /** @internal */ -export const State$outboundSchema: z.ZodNativeEnum = State$inboundSchema; +export const State$outboundSchema: z.ZodNativeEnum = + State$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace State$ { - /** @deprecated use `State$inboundSchema` instead. */ - export const inboundSchema = State$inboundSchema; - /** @deprecated use `State$outboundSchema` instead. */ - export const outboundSchema = State$outboundSchema; + /** @deprecated use `State$inboundSchema` instead. */ + export const inboundSchema = State$inboundSchema; + /** @deprecated use `State$outboundSchema` instead. */ + export const outboundSchema = State$outboundSchema; } /** @internal */ export const GetTimelineRequest$inboundSchema: z.ZodType< - GetTimelineRequest, - z.ZodTypeDef, - unknown + GetTimelineRequest, + z.ZodTypeDef, + unknown > = z.object({ - ratingKey: z.number(), - key: z.string(), - state: State$inboundSchema, - hasMDE: z.number(), - time: z.number(), - duration: z.number(), - context: z.string(), - playQueueItemID: z.number(), - playBackTime: z.number(), - row: z.number(), + ratingKey: z.number(), + key: z.string(), + state: State$inboundSchema, + hasMDE: z.number(), + time: z.number(), + duration: z.number(), + context: z.string(), + playQueueItemID: z.number(), + playBackTime: z.number(), + row: z.number(), }); /** @internal */ export type GetTimelineRequest$Outbound = { - ratingKey: number; - key: string; - state: string; - hasMDE: number; - time: number; - duration: number; - context: string; - playQueueItemID: number; - playBackTime: number; - row: number; + ratingKey: number; + key: string; + state: string; + hasMDE: number; + time: number; + duration: number; + context: string; + playQueueItemID: number; + playBackTime: number; + row: number; }; /** @internal */ export const GetTimelineRequest$outboundSchema: z.ZodType< - GetTimelineRequest$Outbound, - z.ZodTypeDef, - GetTimelineRequest + GetTimelineRequest$Outbound, + z.ZodTypeDef, + GetTimelineRequest > = z.object({ - ratingKey: z.number(), - key: z.string(), - state: State$outboundSchema, - hasMDE: z.number(), - time: z.number(), - duration: z.number(), - context: z.string(), - playQueueItemID: z.number(), - playBackTime: z.number(), - row: z.number(), + ratingKey: z.number(), + key: z.string(), + state: State$outboundSchema, + hasMDE: z.number(), + time: z.number(), + duration: z.number(), + context: z.string(), + playQueueItemID: z.number(), + playBackTime: z.number(), + row: z.number(), }); /** @@ -144,70 +147,66 @@ export const GetTimelineRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTimelineRequest$ { - /** @deprecated use `GetTimelineRequest$inboundSchema` instead. */ - export const inboundSchema = GetTimelineRequest$inboundSchema; - /** @deprecated use `GetTimelineRequest$outboundSchema` instead. */ - export const outboundSchema = GetTimelineRequest$outboundSchema; - /** @deprecated use `GetTimelineRequest$Outbound` instead. */ - export type Outbound = GetTimelineRequest$Outbound; + /** @deprecated use `GetTimelineRequest$inboundSchema` instead. */ + export const inboundSchema = GetTimelineRequest$inboundSchema; + /** @deprecated use `GetTimelineRequest$outboundSchema` instead. */ + export const outboundSchema = GetTimelineRequest$outboundSchema; + /** @deprecated use `GetTimelineRequest$Outbound` instead. */ + export type Outbound = GetTimelineRequest$Outbound; } /** @internal */ export const GetTimelineResponse$inboundSchema: z.ZodType< - GetTimelineResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetTimelineResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetTimelineResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetTimelineResponse$outboundSchema: z.ZodType< - GetTimelineResponse$Outbound, - z.ZodTypeDef, - GetTimelineResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetTimelineResponse$Outbound, + z.ZodTypeDef, + GetTimelineResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTimelineResponse$ { - /** @deprecated use `GetTimelineResponse$inboundSchema` instead. */ - export const inboundSchema = GetTimelineResponse$inboundSchema; - /** @deprecated use `GetTimelineResponse$outboundSchema` instead. */ - export const outboundSchema = GetTimelineResponse$outboundSchema; - /** @deprecated use `GetTimelineResponse$Outbound` instead. */ - export type Outbound = GetTimelineResponse$Outbound; + /** @deprecated use `GetTimelineResponse$inboundSchema` instead. */ + export const inboundSchema = GetTimelineResponse$inboundSchema; + /** @deprecated use `GetTimelineResponse$outboundSchema` instead. */ + export const outboundSchema = GetTimelineResponse$outboundSchema; + /** @deprecated use `GetTimelineResponse$Outbound` instead. */ + export type Outbound = GetTimelineResponse$Outbound; } diff --git a/src/sdk/models/operations/gettokenbypinid.ts b/src/sdk/models/operations/gettokenbypinid.ts index 9a169e40..3830362a 100644 --- a/src/sdk/models/operations/gettokenbypinid.ts +++ b/src/sdk/models/operations/gettokenbypinid.ts @@ -2,382 +2,364 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetTokenByPinIdServerList = ["https://plex.tv/api/v2/"] as const; +export const GetTokenByPinIdServerList = [ + "https://plex.tv/api/v2/", +] as const; export type GetTokenByPinIdGlobals = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; }; export type GetTokenByPinIdRequest = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; - /** - * The PinID to retrieve an access token for - */ - pinID: number; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; + /** + * The PinID to retrieve an access token for + */ + pinID: number; }; /** * Geo location data */ export type GetTokenByPinIdGeoData = { - /** - * The ISO 3166-1 alpha-2 code of the country. - */ - code: string; - /** - * The continent code where the country is located. - */ - continentCode: string; - /** - * The official name of the country. - */ - country: string; - /** - * The name of the city. - */ - city: string; - /** - * Indicates if the country is a member of the European Union. - */ - europeanUnionMember?: boolean | undefined; - /** - * The time zone of the country. - */ - timeZone: string; - /** - * The postal code of the location. - */ - postalCode: number; - /** - * Indicates if the country has privacy restrictions. - */ - inPrivacyRestrictedCountry?: boolean | undefined; - /** - * Indicates if the region has privacy restrictions. - */ - inPrivacyRestrictedRegion?: boolean | undefined; - /** - * The name of the primary administrative subdivision. - */ - subdivisions: string; - /** - * The geographical coordinates (latitude, longitude) of the location. - */ - coordinates: string; + /** + * The ISO 3166-1 alpha-2 code of the country. + */ + code: string; + /** + * The continent code where the country is located. + */ + continentCode: string; + /** + * The official name of the country. + */ + country: string; + /** + * The name of the city. + */ + city: string; + /** + * Indicates if the country is a member of the European Union. + */ + europeanUnionMember?: boolean | undefined; + /** + * The time zone of the country. + */ + timeZone: string; + /** + * The postal code of the location. + */ + postalCode: number; + /** + * Indicates if the country has privacy restrictions. + */ + inPrivacyRestrictedCountry?: boolean | undefined; + /** + * Indicates if the region has privacy restrictions. + */ + inPrivacyRestrictedRegion?: boolean | undefined; + /** + * The name of the primary administrative subdivision. + */ + subdivisions: string; + /** + * The geographical coordinates (latitude, longitude) of the location. + */ + coordinates: string; }; /** * The Pin with a non-null authToken when it has been verified by the user */ export type GetTokenByPinIdAuthPinContainer = { - id: number; - code: string; - product: string; - trusted?: boolean | undefined; - qr: string; - /** - * The X-Client-Identifier used in the request - */ - clientIdentifier: string; - /** - * Geo location data - */ - location: GetTokenByPinIdGeoData; - /** - * The number of seconds this pin expires, by default 900 seconds - */ - expiresIn?: number | undefined; - createdAt: Date; - expiresAt: Date; - authToken?: any | null | undefined; - newRegistration?: any | null | undefined; + id: number; + code: string; + product: string; + trusted?: boolean | undefined; + qr: string; + /** + * The X-Client-Identifier used in the request + */ + clientIdentifier: string; + /** + * Geo location data + */ + location: GetTokenByPinIdGeoData; + /** + * The number of seconds this pin expires, by default 900 seconds + */ + expiresIn?: number | undefined; + createdAt: Date; + expiresAt: Date; + authToken?: any | null | undefined; + newRegistration?: any | null | undefined; }; export type GetTokenByPinIdResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Pin with a non-null authToken when it has been verified by the user - */ - authPinContainer?: GetTokenByPinIdAuthPinContainer | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Pin with a non-null authToken when it has been verified by the user + */ + authPinContainer?: GetTokenByPinIdAuthPinContainer | undefined; }; /** @internal */ export const GetTokenByPinIdGlobals$inboundSchema: z.ZodType< - GetTokenByPinIdGlobals, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - }); - }); + GetTokenByPinIdGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type GetTokenByPinIdGlobals$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Client-Identifier"?: string | undefined; }; /** @internal */ export const GetTokenByPinIdGlobals$outboundSchema: z.ZodType< - GetTokenByPinIdGlobals$Outbound, - z.ZodTypeDef, - GetTokenByPinIdGlobals -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - }); - }); + GetTokenByPinIdGlobals$Outbound, + z.ZodTypeDef, + GetTokenByPinIdGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdGlobals$ { - /** @deprecated use `GetTokenByPinIdGlobals$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdGlobals$inboundSchema; - /** @deprecated use `GetTokenByPinIdGlobals$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdGlobals$outboundSchema; - /** @deprecated use `GetTokenByPinIdGlobals$Outbound` instead. */ - export type Outbound = GetTokenByPinIdGlobals$Outbound; + /** @deprecated use `GetTokenByPinIdGlobals$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdGlobals$inboundSchema; + /** @deprecated use `GetTokenByPinIdGlobals$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdGlobals$outboundSchema; + /** @deprecated use `GetTokenByPinIdGlobals$Outbound` instead. */ + export type Outbound = GetTokenByPinIdGlobals$Outbound; } /** @internal */ export const GetTokenByPinIdRequest$inboundSchema: z.ZodType< - GetTokenByPinIdRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - pinID: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - }); - }); + GetTokenByPinIdRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + pinID: z.number().int(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type GetTokenByPinIdRequest$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; - pinID: number; + "X-Plex-Client-Identifier"?: string | undefined; + pinID: number; }; /** @internal */ export const GetTokenByPinIdRequest$outboundSchema: z.ZodType< - GetTokenByPinIdRequest$Outbound, - z.ZodTypeDef, - GetTokenByPinIdRequest -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - pinID: z.number().int(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - }); - }); + GetTokenByPinIdRequest$Outbound, + z.ZodTypeDef, + GetTokenByPinIdRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + pinID: z.number().int(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdRequest$ { - /** @deprecated use `GetTokenByPinIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdRequest$inboundSchema; - /** @deprecated use `GetTokenByPinIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdRequest$outboundSchema; - /** @deprecated use `GetTokenByPinIdRequest$Outbound` instead. */ - export type Outbound = GetTokenByPinIdRequest$Outbound; + /** @deprecated use `GetTokenByPinIdRequest$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdRequest$inboundSchema; + /** @deprecated use `GetTokenByPinIdRequest$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdRequest$outboundSchema; + /** @deprecated use `GetTokenByPinIdRequest$Outbound` instead. */ + export type Outbound = GetTokenByPinIdRequest$Outbound; } /** @internal */ export const GetTokenByPinIdGeoData$inboundSchema: z.ZodType< - GetTokenByPinIdGeoData, - z.ZodTypeDef, - unknown -> = z - .object({ - code: z.string(), - continent_code: z.string(), - country: z.string(), - city: z.string(), - european_union_member: z.boolean().default(false), - time_zone: z.string(), - postal_code: z.number().int(), - in_privacy_restricted_country: z.boolean().default(false), - in_privacy_restricted_region: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continent_code: "continentCode", - european_union_member: "europeanUnionMember", - time_zone: "timeZone", - postal_code: "postalCode", - in_privacy_restricted_country: "inPrivacyRestrictedCountry", - in_privacy_restricted_region: "inPrivacyRestrictedRegion", - }); - }); + GetTokenByPinIdGeoData, + z.ZodTypeDef, + unknown +> = z.object({ + code: z.string(), + continent_code: z.string(), + country: z.string(), + city: z.string(), + european_union_member: z.boolean().default(false), + time_zone: z.string(), + postal_code: z.number().int(), + in_privacy_restricted_country: z.boolean().default(false), + in_privacy_restricted_region: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), +}).transform((v) => { + return remap$(v, { + "continent_code": "continentCode", + "european_union_member": "europeanUnionMember", + "time_zone": "timeZone", + "postal_code": "postalCode", + "in_privacy_restricted_country": "inPrivacyRestrictedCountry", + "in_privacy_restricted_region": "inPrivacyRestrictedRegion", + }); +}); /** @internal */ export type GetTokenByPinIdGeoData$Outbound = { - code: string; - continent_code: string; - country: string; - city: string; - european_union_member: boolean; - time_zone: string; - postal_code: number; - in_privacy_restricted_country: boolean; - in_privacy_restricted_region: boolean; - subdivisions: string; - coordinates: string; + code: string; + continent_code: string; + country: string; + city: string; + european_union_member: boolean; + time_zone: string; + postal_code: number; + in_privacy_restricted_country: boolean; + in_privacy_restricted_region: boolean; + subdivisions: string; + coordinates: string; }; /** @internal */ export const GetTokenByPinIdGeoData$outboundSchema: z.ZodType< - GetTokenByPinIdGeoData$Outbound, - z.ZodTypeDef, - GetTokenByPinIdGeoData -> = z - .object({ - code: z.string(), - continentCode: z.string(), - country: z.string(), - city: z.string(), - europeanUnionMember: z.boolean().default(false), - timeZone: z.string(), - postalCode: z.number().int(), - inPrivacyRestrictedCountry: z.boolean().default(false), - inPrivacyRestrictedRegion: z.boolean().default(false), - subdivisions: z.string(), - coordinates: z.string(), - }) - .transform((v) => { - return remap$(v, { - continentCode: "continent_code", - europeanUnionMember: "european_union_member", - timeZone: "time_zone", - postalCode: "postal_code", - inPrivacyRestrictedCountry: "in_privacy_restricted_country", - inPrivacyRestrictedRegion: "in_privacy_restricted_region", - }); - }); + GetTokenByPinIdGeoData$Outbound, + z.ZodTypeDef, + GetTokenByPinIdGeoData +> = z.object({ + code: z.string(), + continentCode: z.string(), + country: z.string(), + city: z.string(), + europeanUnionMember: z.boolean().default(false), + timeZone: z.string(), + postalCode: z.number().int(), + inPrivacyRestrictedCountry: z.boolean().default(false), + inPrivacyRestrictedRegion: z.boolean().default(false), + subdivisions: z.string(), + coordinates: z.string(), +}).transform((v) => { + return remap$(v, { + continentCode: "continent_code", + europeanUnionMember: "european_union_member", + timeZone: "time_zone", + postalCode: "postal_code", + inPrivacyRestrictedCountry: "in_privacy_restricted_country", + inPrivacyRestrictedRegion: "in_privacy_restricted_region", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdGeoData$ { - /** @deprecated use `GetTokenByPinIdGeoData$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdGeoData$inboundSchema; - /** @deprecated use `GetTokenByPinIdGeoData$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdGeoData$outboundSchema; - /** @deprecated use `GetTokenByPinIdGeoData$Outbound` instead. */ - export type Outbound = GetTokenByPinIdGeoData$Outbound; + /** @deprecated use `GetTokenByPinIdGeoData$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdGeoData$inboundSchema; + /** @deprecated use `GetTokenByPinIdGeoData$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdGeoData$outboundSchema; + /** @deprecated use `GetTokenByPinIdGeoData$Outbound` instead. */ + export type Outbound = GetTokenByPinIdGeoData$Outbound; } /** @internal */ export const GetTokenByPinIdAuthPinContainer$inboundSchema: z.ZodType< - GetTokenByPinIdAuthPinContainer, - z.ZodTypeDef, - unknown + GetTokenByPinIdAuthPinContainer, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int(), - code: z.string(), - product: z.string(), - trusted: z.boolean().default(false), - qr: z.string(), - clientIdentifier: z.string(), - location: z.lazy(() => GetTokenByPinIdGeoData$inboundSchema), - expiresIn: z.number().int().default(900), - createdAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - expiresAt: z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)), - authToken: z.nullable(z.any()).optional(), - newRegistration: z.nullable(z.any()).optional(), + id: z.number().int(), + code: z.string(), + product: z.string(), + trusted: z.boolean().default(false), + qr: z.string(), + clientIdentifier: z.string(), + location: z.lazy(() => GetTokenByPinIdGeoData$inboundSchema), + expiresIn: z.number().int().default(900), + createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + expiresAt: z.string().datetime({ offset: true }).transform(v => new Date(v)), + authToken: z.nullable(z.any()).optional(), + newRegistration: z.nullable(z.any()).optional(), }); /** @internal */ export type GetTokenByPinIdAuthPinContainer$Outbound = { - id: number; - code: string; - product: string; - trusted: boolean; - qr: string; - clientIdentifier: string; - location: GetTokenByPinIdGeoData$Outbound; - expiresIn: number; - createdAt: string; - expiresAt: string; - authToken?: any | null | undefined; - newRegistration?: any | null | undefined; + id: number; + code: string; + product: string; + trusted: boolean; + qr: string; + clientIdentifier: string; + location: GetTokenByPinIdGeoData$Outbound; + expiresIn: number; + createdAt: string; + expiresAt: string; + authToken?: any | null | undefined; + newRegistration?: any | null | undefined; }; /** @internal */ export const GetTokenByPinIdAuthPinContainer$outboundSchema: z.ZodType< - GetTokenByPinIdAuthPinContainer$Outbound, - z.ZodTypeDef, - GetTokenByPinIdAuthPinContainer + GetTokenByPinIdAuthPinContainer$Outbound, + z.ZodTypeDef, + GetTokenByPinIdAuthPinContainer > = z.object({ - id: z.number().int(), - code: z.string(), - product: z.string(), - trusted: z.boolean().default(false), - qr: z.string(), - clientIdentifier: z.string(), - location: z.lazy(() => GetTokenByPinIdGeoData$outboundSchema), - expiresIn: z.number().int().default(900), - createdAt: z.date().transform((v) => v.toISOString()), - expiresAt: z.date().transform((v) => v.toISOString()), - authToken: z.nullable(z.any()).optional(), - newRegistration: z.nullable(z.any()).optional(), + id: z.number().int(), + code: z.string(), + product: z.string(), + trusted: z.boolean().default(false), + qr: z.string(), + clientIdentifier: z.string(), + location: z.lazy(() => GetTokenByPinIdGeoData$outboundSchema), + expiresIn: z.number().int().default(900), + createdAt: z.date().transform(v => v.toISOString()), + expiresAt: z.date().transform(v => v.toISOString()), + authToken: z.nullable(z.any()).optional(), + newRegistration: z.nullable(z.any()).optional(), }); /** @@ -385,75 +367,73 @@ export const GetTokenByPinIdAuthPinContainer$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdAuthPinContainer$ { - /** @deprecated use `GetTokenByPinIdAuthPinContainer$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdAuthPinContainer$inboundSchema; - /** @deprecated use `GetTokenByPinIdAuthPinContainer$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdAuthPinContainer$outboundSchema; - /** @deprecated use `GetTokenByPinIdAuthPinContainer$Outbound` instead. */ - export type Outbound = GetTokenByPinIdAuthPinContainer$Outbound; + /** @deprecated use `GetTokenByPinIdAuthPinContainer$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdAuthPinContainer$inboundSchema; + /** @deprecated use `GetTokenByPinIdAuthPinContainer$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdAuthPinContainer$outboundSchema; + /** @deprecated use `GetTokenByPinIdAuthPinContainer$Outbound` instead. */ + export type Outbound = GetTokenByPinIdAuthPinContainer$Outbound; } /** @internal */ export const GetTokenByPinIdResponse$inboundSchema: z.ZodType< - GetTokenByPinIdResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - AuthPinContainer: z.lazy(() => GetTokenByPinIdAuthPinContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - AuthPinContainer: "authPinContainer", - }); - }); + GetTokenByPinIdResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + AuthPinContainer: z.lazy(() => GetTokenByPinIdAuthPinContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "AuthPinContainer": "authPinContainer", + }); +}); /** @internal */ export type GetTokenByPinIdResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - AuthPinContainer?: GetTokenByPinIdAuthPinContainer$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + AuthPinContainer?: GetTokenByPinIdAuthPinContainer$Outbound | undefined; }; /** @internal */ export const GetTokenByPinIdResponse$outboundSchema: z.ZodType< - GetTokenByPinIdResponse$Outbound, - z.ZodTypeDef, - GetTokenByPinIdResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - authPinContainer: z.lazy(() => GetTokenByPinIdAuthPinContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - authPinContainer: "AuthPinContainer", - }); - }); + GetTokenByPinIdResponse$Outbound, + z.ZodTypeDef, + GetTokenByPinIdResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + authPinContainer: z.lazy(() => GetTokenByPinIdAuthPinContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + authPinContainer: "AuthPinContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTokenByPinIdResponse$ { - /** @deprecated use `GetTokenByPinIdResponse$inboundSchema` instead. */ - export const inboundSchema = GetTokenByPinIdResponse$inboundSchema; - /** @deprecated use `GetTokenByPinIdResponse$outboundSchema` instead. */ - export const outboundSchema = GetTokenByPinIdResponse$outboundSchema; - /** @deprecated use `GetTokenByPinIdResponse$Outbound` instead. */ - export type Outbound = GetTokenByPinIdResponse$Outbound; + /** @deprecated use `GetTokenByPinIdResponse$inboundSchema` instead. */ + export const inboundSchema = GetTokenByPinIdResponse$inboundSchema; + /** @deprecated use `GetTokenByPinIdResponse$outboundSchema` instead. */ + export const outboundSchema = GetTokenByPinIdResponse$outboundSchema; + /** @deprecated use `GetTokenByPinIdResponse$Outbound` instead. */ + export type Outbound = GetTokenByPinIdResponse$Outbound; } diff --git a/src/sdk/models/operations/gettokendetails.ts b/src/sdk/models/operations/gettokendetails.ts new file mode 100644 index 00000000..1dc2fde2 --- /dev/null +++ b/src/sdk/models/operations/gettokendetails.ts @@ -0,0 +1,1137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; + +export const GetTokenDetailsServerList = [ + "https://plex.tv/api/v2/", +] as const; + +/** + * Your current mailing list status + */ +export enum MailingListStatus { + Active = "active", + Unsubscribed = "unsubscribed", +} + +/** + * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + */ +export enum AutoSelectSubtitle { + Zero = "0", + One = "1", +} + +/** + * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + */ +export enum DefaultSubtitleAccessibility { + Zero = "0", + One = "1", +} + +/** + * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + */ +export enum DefaultSubtitleForced { + Zero = "0", + One = "1", +} + +export enum WatchedIndicator { + Zero = "0", + One = "1", +} + +export enum MediaReviewsVisibility { + Zero = 0, + One = 1, +} + +export type UserProfile = { + /** + * If the account has automatically select audio and subtitle tracks enabled + */ + autoSelectAudio?: boolean | undefined; + /** + * The preferred audio language for the account + */ + defaultAudioLanguage: string | null; + /** + * The preferred subtitle language for the account + */ + defaultSubtitleLanguage: string | null; + /** + * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + */ + autoSelectSubtitle?: AutoSelectSubtitle | undefined; + /** + * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + */ + defaultSubtitleAccessibility?: DefaultSubtitleAccessibility | undefined; + /** + * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + */ + defaultSubtitleForced?: DefaultSubtitleForced | undefined; + watchedIndicator?: WatchedIndicator | undefined; + mediaReviewsVisibility?: MediaReviewsVisibility | undefined; +}; + +export enum GetTokenDetailsStatus { + Online = "online", + Offline = "offline", +} + +export type Services = { + identifier: string; + endpoint: string; + token: string | null; + secret: string | null; + status: GetTokenDetailsStatus; +}; + +export enum Features { + AndroidDolbyVision = "Android - Dolby Vision", + AndroidPiP = "Android - PiP", + CUSunset = "CU Sunset", + HRKEnableEUR = "HRK_enable_EUR", + TREBLEShowFeatures = "TREBLE-show-features", + AdCountdownTimer = "ad-countdown-timer", + AdaptiveBitrate = "adaptive_bitrate", + AmazonLoopDebug = "amazon-loop-debug", + AvodAdAnalysis = "avod-ad-analysis", + AvodNewMedia = "avod-new-media", + BlacklistGetSignin = "blacklist_get_signin", + ClientRadioStations = "client-radio-stations", + CloudflareTurnstileRequired = "cloudflare-turnstile-required", + Collections = "collections", + CommentsAndRepliesPushNotifications = + "comments_and_replies_push_notifications", + CommunityAccessPlexTv = "community_access_plex_tv", + CompanionsSonos = "companions_sonos", + CustomHomeRemoval = "custom-home-removal", + DisableHomeUserFriendships = "disable_home_user_friendships", + DisableSharingFriendships = "disable_sharing_friendships", + DrmSupport = "drm_support", + ExcludeRestrictions = "exclude restrictions", + FederatedAuth = "federated-auth", + FriendRequestPushNotifications = "friend_request_push_notifications", + GuidedUpgrade = "guided-upgrade", + Home = "home", + IncreasePasswordComplexity = "increase-password-complexity", + Ios14PrivacyBanner = "ios14-privacy-banner", + IterableNotificationTokens = "iterable-notification-tokens", + KeepPaymentMethod = "keep-payment-method", + KevinBacon = "kevin-bacon", + KoreaConsent = "korea-consent", + LeIsrgRootX1 = "le_isrg_root_x1", + LetsEncrypt = "lets_encrypt", + LightningDvrPivot = "lightning-dvr-pivot", + LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", + Livetv = "livetv", + MetadataSearch = "metadata_search", + NewPlexPassPrices = "new_plex_pass_prices", + NewsProviderSunsetModal = "news-provider-sunset-modal", + PhotosFavorites = "photos-favorites", + PhotosMetadataEdition = "photos-metadata-edition", + PmsHealth = "pms_health", + Radio = "radio", + RateLimitClientToken = "rate-limit-client-token", + ScrobblingServicePlexTv = "scrobbling-service-plex-tv", + SharedServerNotification = "shared_server_notification", + SharedSourceNotification = "shared_source_notification", + SigninWithApple = "signin_with_apple", + SpringServeAdProvider = "spring_serve_ad_provider", + TranscoderCache = "transcoder_cache", + TunerSharing = "tuner-sharing", + TwoFactorAuthentication = "two-factor-authentication", + Unsupportedtuners = "unsupportedtuners", + Upgrade3ds2 = "upgrade-3ds2", + VodSchema = "vod-schema", + VodCloudflare = "vod_cloudflare", + WatchTogetherInvite = "watch-together-invite", + WebServerDashboard = "web_server_dashboard", +} + +/** + * String representation of subscriptionActive + */ +export enum GetTokenDetailsAuthenticationStatus { + Inactive = "Inactive", + Active = "Active", +} + +/** + * If the account’s Plex Pass subscription is active + */ +export type Subscription = { + /** + * List of features allowed on your Plex Pass subscription + */ + features?: Array | undefined; + /** + * If the account's Plex Pass subscription is active + */ + active?: boolean | undefined; + /** + * Date the account subscribed to Plex Pass + */ + subscribedAt?: string | null | undefined; + /** + * String representation of subscriptionActive + */ + status?: GetTokenDetailsAuthenticationStatus | undefined; + /** + * Payment service used for your Plex Pass subscription + */ + paymentService?: string | null | undefined; + /** + * Name of Plex Pass subscription plan + */ + plan?: string | null | undefined; +}; + +export enum GetTokenDetailsFeatures { + AndroidDolbyVision = "Android - Dolby Vision", + AndroidPiP = "Android - PiP", + CUSunset = "CU Sunset", + HRKEnableEUR = "HRK_enable_EUR", + TREBLEShowFeatures = "TREBLE-show-features", + AdCountdownTimer = "ad-countdown-timer", + AdaptiveBitrate = "adaptive_bitrate", + AmazonLoopDebug = "amazon-loop-debug", + AvodAdAnalysis = "avod-ad-analysis", + AvodNewMedia = "avod-new-media", + BlacklistGetSignin = "blacklist_get_signin", + ClientRadioStations = "client-radio-stations", + CloudflareTurnstileRequired = "cloudflare-turnstile-required", + Collections = "collections", + CommentsAndRepliesPushNotifications = + "comments_and_replies_push_notifications", + CommunityAccessPlexTv = "community_access_plex_tv", + CompanionsSonos = "companions_sonos", + CustomHomeRemoval = "custom-home-removal", + DisableHomeUserFriendships = "disable_home_user_friendships", + DisableSharingFriendships = "disable_sharing_friendships", + DrmSupport = "drm_support", + ExcludeRestrictions = "exclude restrictions", + FederatedAuth = "federated-auth", + FriendRequestPushNotifications = "friend_request_push_notifications", + GuidedUpgrade = "guided-upgrade", + Home = "home", + IncreasePasswordComplexity = "increase-password-complexity", + Ios14PrivacyBanner = "ios14-privacy-banner", + IterableNotificationTokens = "iterable-notification-tokens", + KeepPaymentMethod = "keep-payment-method", + KevinBacon = "kevin-bacon", + KoreaConsent = "korea-consent", + LeIsrgRootX1 = "le_isrg_root_x1", + LetsEncrypt = "lets_encrypt", + LightningDvrPivot = "lightning-dvr-pivot", + LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", + Livetv = "livetv", + MetadataSearch = "metadata_search", + NewPlexPassPrices = "new_plex_pass_prices", + NewsProviderSunsetModal = "news-provider-sunset-modal", + PhotosFavorites = "photos-favorites", + PhotosMetadataEdition = "photos-metadata-edition", + PmsHealth = "pms_health", + Radio = "radio", + RateLimitClientToken = "rate-limit-client-token", + ScrobblingServicePlexTv = "scrobbling-service-plex-tv", + SharedServerNotification = "shared_server_notification", + SharedSourceNotification = "shared_source_notification", + SigninWithApple = "signin_with_apple", + SpringServeAdProvider = "spring_serve_ad_provider", + TranscoderCache = "transcoder_cache", + TunerSharing = "tuner-sharing", + TwoFactorAuthentication = "two-factor-authentication", + Unsupportedtuners = "unsupportedtuners", + Upgrade3ds2 = "upgrade-3ds2", + VodSchema = "vod-schema", + VodCloudflare = "vod_cloudflare", + WatchTogetherInvite = "watch-together-invite", + WebServerDashboard = "web_server_dashboard", +} + +/** + * String representation of subscriptionActive + */ +export enum GetTokenDetailsAuthenticationResponseStatus { + Inactive = "Inactive", + Active = "Active", +} + +export type GetTokenDetailsSubscription = { + /** + * List of features allowed on your Plex Pass subscription + */ + features?: Array | undefined; + /** + * If the account's Plex Pass subscription is active + */ + active?: boolean | undefined; + /** + * Date the account subscribed to Plex Pass + */ + subscribedAt?: string | null | undefined; + /** + * String representation of subscriptionActive + */ + status?: GetTokenDetailsAuthenticationResponseStatus | undefined; + /** + * Payment service used for your Plex Pass subscription + */ + paymentService?: string | null | undefined; + /** + * Name of Plex Pass subscription plan + */ + plan?: string | null | undefined; +}; + +/** + * Logged in user details + */ +export type GetTokenDetailsUserPlexAccount = { + /** + * Unknown + */ + adsConsent: boolean | null; + /** + * Unknown + */ + adsConsentReminderAt: Date | null; + /** + * Unknown + */ + adsConsentSetAt: Date | null; + /** + * Unknown + */ + anonymous?: boolean | null | undefined; + /** + * The account token + */ + authToken: string; + /** + * If the two-factor authentication backup codes have been created + */ + backupCodesCreated?: boolean | undefined; + /** + * If the account has been confirmed + */ + confirmed?: boolean | undefined; + /** + * The account country + */ + country: string; + /** + * The account email address + */ + email: string; + /** + * If login with email only is enabled + */ + emailOnlyAuth?: boolean | undefined; + /** + * If experimental features are enabled + */ + experimentalFeatures?: boolean | undefined; + /** + * Your account full name + */ + friendlyName: string; + /** + * List of devices your allowed to use with this account + */ + entitlements: Array; + /** + * If the account is a Plex Home guest user + */ + guest?: boolean | undefined; + /** + * If the account has a password + */ + hasPassword?: boolean | undefined; + /** + * If the account is a Plex Home user + */ + home?: boolean | undefined; + /** + * If the account is the Plex Home admin + */ + homeAdmin?: boolean | undefined; + /** + * The number of accounts in the Plex Home + */ + homeSize: number; + /** + * The Plex account ID + */ + id: number; + /** + * Unix epoch datetime + */ + joinedAt: number; + /** + * The account locale + */ + locale: string | null; + /** + * If you are subscribed to the Plex newsletter + */ + mailingListActive?: boolean | undefined; + /** + * Your current mailing list status + */ + mailingListStatus: MailingListStatus; + /** + * The maximum number of accounts allowed in the Plex Home + */ + maxHomeSize: number; + /** + * [Might be removed] The hashed Plex Home PIN + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + pin?: string | undefined; + profile: UserProfile; + /** + * If the account has a Plex Home PIN enabled + */ + protected?: boolean | undefined; + /** + * Unix epoch datetime + */ + rememberExpiresAt: number; + /** + * If the account is a Plex Home managed user + */ + restricted?: boolean | undefined; + /** + * [Might be removed] List of account roles. Plexpass membership listed here + */ + roles?: Array | undefined; + /** + * Unknown + */ + scrobbleTypes: string; + services: Array; + /** + * If the account’s Plex Pass subscription is active + */ + subscription: Subscription; + /** + * Description of the Plex Pass subscription + */ + subscriptionDescription: string | null; + subscriptions: Array; + /** + * URL of the account thumbnail + */ + thumb: string; + /** + * The title of the account (username or friendly name) + */ + title: string; + /** + * If two-factor authentication is enabled + */ + twoFactorEnabled?: boolean | undefined; + /** + * The account username + */ + username: string; + /** + * The account UUID + */ + uuid: string; +}; + +export type GetTokenDetailsResponse = { + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Logged in user details + */ + userPlexAccount?: GetTokenDetailsUserPlexAccount | undefined; +}; + +/** @internal */ +export const MailingListStatus$inboundSchema: z.ZodNativeEnum< + typeof MailingListStatus +> = z.nativeEnum(MailingListStatus); + +/** @internal */ +export const MailingListStatus$outboundSchema: z.ZodNativeEnum< + typeof MailingListStatus +> = MailingListStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MailingListStatus$ { + /** @deprecated use `MailingListStatus$inboundSchema` instead. */ + export const inboundSchema = MailingListStatus$inboundSchema; + /** @deprecated use `MailingListStatus$outboundSchema` instead. */ + export const outboundSchema = MailingListStatus$outboundSchema; +} + +/** @internal */ +export const AutoSelectSubtitle$inboundSchema: z.ZodNativeEnum< + typeof AutoSelectSubtitle +> = z.nativeEnum(AutoSelectSubtitle); + +/** @internal */ +export const AutoSelectSubtitle$outboundSchema: z.ZodNativeEnum< + typeof AutoSelectSubtitle +> = AutoSelectSubtitle$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AutoSelectSubtitle$ { + /** @deprecated use `AutoSelectSubtitle$inboundSchema` instead. */ + export const inboundSchema = AutoSelectSubtitle$inboundSchema; + /** @deprecated use `AutoSelectSubtitle$outboundSchema` instead. */ + export const outboundSchema = AutoSelectSubtitle$outboundSchema; +} + +/** @internal */ +export const DefaultSubtitleAccessibility$inboundSchema: z.ZodNativeEnum< + typeof DefaultSubtitleAccessibility +> = z.nativeEnum(DefaultSubtitleAccessibility); + +/** @internal */ +export const DefaultSubtitleAccessibility$outboundSchema: z.ZodNativeEnum< + typeof DefaultSubtitleAccessibility +> = DefaultSubtitleAccessibility$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DefaultSubtitleAccessibility$ { + /** @deprecated use `DefaultSubtitleAccessibility$inboundSchema` instead. */ + export const inboundSchema = DefaultSubtitleAccessibility$inboundSchema; + /** @deprecated use `DefaultSubtitleAccessibility$outboundSchema` instead. */ + export const outboundSchema = DefaultSubtitleAccessibility$outboundSchema; +} + +/** @internal */ +export const DefaultSubtitleForced$inboundSchema: z.ZodNativeEnum< + typeof DefaultSubtitleForced +> = z.nativeEnum(DefaultSubtitleForced); + +/** @internal */ +export const DefaultSubtitleForced$outboundSchema: z.ZodNativeEnum< + typeof DefaultSubtitleForced +> = DefaultSubtitleForced$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DefaultSubtitleForced$ { + /** @deprecated use `DefaultSubtitleForced$inboundSchema` instead. */ + export const inboundSchema = DefaultSubtitleForced$inboundSchema; + /** @deprecated use `DefaultSubtitleForced$outboundSchema` instead. */ + export const outboundSchema = DefaultSubtitleForced$outboundSchema; +} + +/** @internal */ +export const WatchedIndicator$inboundSchema: z.ZodNativeEnum< + typeof WatchedIndicator +> = z.nativeEnum(WatchedIndicator); + +/** @internal */ +export const WatchedIndicator$outboundSchema: z.ZodNativeEnum< + typeof WatchedIndicator +> = WatchedIndicator$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace WatchedIndicator$ { + /** @deprecated use `WatchedIndicator$inboundSchema` instead. */ + export const inboundSchema = WatchedIndicator$inboundSchema; + /** @deprecated use `WatchedIndicator$outboundSchema` instead. */ + export const outboundSchema = WatchedIndicator$outboundSchema; +} + +/** @internal */ +export const MediaReviewsVisibility$inboundSchema: z.ZodNativeEnum< + typeof MediaReviewsVisibility +> = z.nativeEnum(MediaReviewsVisibility); + +/** @internal */ +export const MediaReviewsVisibility$outboundSchema: z.ZodNativeEnum< + typeof MediaReviewsVisibility +> = MediaReviewsVisibility$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace MediaReviewsVisibility$ { + /** @deprecated use `MediaReviewsVisibility$inboundSchema` instead. */ + export const inboundSchema = MediaReviewsVisibility$inboundSchema; + /** @deprecated use `MediaReviewsVisibility$outboundSchema` instead. */ + export const outboundSchema = MediaReviewsVisibility$outboundSchema; +} + +/** @internal */ +export const UserProfile$inboundSchema: z.ZodType< + UserProfile, + z.ZodTypeDef, + unknown +> = z.object({ + autoSelectAudio: z.boolean().default(true), + defaultAudioLanguage: z.nullable(z.string()), + defaultSubtitleLanguage: z.nullable(z.string()), + autoSelectSubtitle: AutoSelectSubtitle$inboundSchema.optional(), + defaultSubtitleAccessibility: DefaultSubtitleAccessibility$inboundSchema + .optional(), + defaultSubtitleForced: DefaultSubtitleForced$inboundSchema.optional(), + watchedIndicator: WatchedIndicator$inboundSchema.optional(), + mediaReviewsVisibility: MediaReviewsVisibility$inboundSchema.optional(), +}); + +/** @internal */ +export type UserProfile$Outbound = { + autoSelectAudio: boolean; + defaultAudioLanguage: string | null; + defaultSubtitleLanguage: string | null; + autoSelectSubtitle?: string | undefined; + defaultSubtitleAccessibility?: string | undefined; + defaultSubtitleForced?: string | undefined; + watchedIndicator?: string | undefined; + mediaReviewsVisibility?: number | undefined; +}; + +/** @internal */ +export const UserProfile$outboundSchema: z.ZodType< + UserProfile$Outbound, + z.ZodTypeDef, + UserProfile +> = z.object({ + autoSelectAudio: z.boolean().default(true), + defaultAudioLanguage: z.nullable(z.string()), + defaultSubtitleLanguage: z.nullable(z.string()), + autoSelectSubtitle: AutoSelectSubtitle$outboundSchema.optional(), + defaultSubtitleAccessibility: DefaultSubtitleAccessibility$outboundSchema + .optional(), + defaultSubtitleForced: DefaultSubtitleForced$outboundSchema.optional(), + watchedIndicator: WatchedIndicator$outboundSchema.optional(), + mediaReviewsVisibility: MediaReviewsVisibility$outboundSchema.optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UserProfile$ { + /** @deprecated use `UserProfile$inboundSchema` instead. */ + export const inboundSchema = UserProfile$inboundSchema; + /** @deprecated use `UserProfile$outboundSchema` instead. */ + export const outboundSchema = UserProfile$outboundSchema; + /** @deprecated use `UserProfile$Outbound` instead. */ + export type Outbound = UserProfile$Outbound; +} + +/** @internal */ +export const GetTokenDetailsStatus$inboundSchema: z.ZodNativeEnum< + typeof GetTokenDetailsStatus +> = z.nativeEnum(GetTokenDetailsStatus); + +/** @internal */ +export const GetTokenDetailsStatus$outboundSchema: z.ZodNativeEnum< + typeof GetTokenDetailsStatus +> = GetTokenDetailsStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsStatus$ { + /** @deprecated use `GetTokenDetailsStatus$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsStatus$inboundSchema; + /** @deprecated use `GetTokenDetailsStatus$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsStatus$outboundSchema; +} + +/** @internal */ +export const Services$inboundSchema: z.ZodType< + Services, + z.ZodTypeDef, + unknown +> = z.object({ + identifier: z.string(), + endpoint: z.string(), + token: z.nullable(z.string()), + secret: z.nullable(z.string()), + status: GetTokenDetailsStatus$inboundSchema, +}); + +/** @internal */ +export type Services$Outbound = { + identifier: string; + endpoint: string; + token: string | null; + secret: string | null; + status: string; +}; + +/** @internal */ +export const Services$outboundSchema: z.ZodType< + Services$Outbound, + z.ZodTypeDef, + Services +> = z.object({ + identifier: z.string(), + endpoint: z.string(), + token: z.nullable(z.string()), + secret: z.nullable(z.string()), + status: GetTokenDetailsStatus$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Services$ { + /** @deprecated use `Services$inboundSchema` instead. */ + export const inboundSchema = Services$inboundSchema; + /** @deprecated use `Services$outboundSchema` instead. */ + export const outboundSchema = Services$outboundSchema; + /** @deprecated use `Services$Outbound` instead. */ + export type Outbound = Services$Outbound; +} + +/** @internal */ +export const Features$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Features); + +/** @internal */ +export const Features$outboundSchema: z.ZodNativeEnum = + Features$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Features$ { + /** @deprecated use `Features$inboundSchema` instead. */ + export const inboundSchema = Features$inboundSchema; + /** @deprecated use `Features$outboundSchema` instead. */ + export const outboundSchema = Features$outboundSchema; +} + +/** @internal */ +export const GetTokenDetailsAuthenticationStatus$inboundSchema: z.ZodNativeEnum< + typeof GetTokenDetailsAuthenticationStatus +> = z.nativeEnum(GetTokenDetailsAuthenticationStatus); + +/** @internal */ +export const GetTokenDetailsAuthenticationStatus$outboundSchema: + z.ZodNativeEnum = + GetTokenDetailsAuthenticationStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsAuthenticationStatus$ { + /** @deprecated use `GetTokenDetailsAuthenticationStatus$inboundSchema` instead. */ + export const inboundSchema = + GetTokenDetailsAuthenticationStatus$inboundSchema; + /** @deprecated use `GetTokenDetailsAuthenticationStatus$outboundSchema` instead. */ + export const outboundSchema = + GetTokenDetailsAuthenticationStatus$outboundSchema; +} + +/** @internal */ +export const Subscription$inboundSchema: z.ZodType< + Subscription, + z.ZodTypeDef, + unknown +> = z.object({ + features: z.array(Features$inboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: GetTokenDetailsAuthenticationStatus$inboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type Subscription$Outbound = { + features?: Array | undefined; + active?: boolean | undefined; + subscribedAt?: string | null | undefined; + status?: string | undefined; + paymentService?: string | null | undefined; + plan?: string | null | undefined; +}; + +/** @internal */ +export const Subscription$outboundSchema: z.ZodType< + Subscription$Outbound, + z.ZodTypeDef, + Subscription +> = z.object({ + features: z.array(Features$outboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: GetTokenDetailsAuthenticationStatus$outboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Subscription$ { + /** @deprecated use `Subscription$inboundSchema` instead. */ + export const inboundSchema = Subscription$inboundSchema; + /** @deprecated use `Subscription$outboundSchema` instead. */ + export const outboundSchema = Subscription$outboundSchema; + /** @deprecated use `Subscription$Outbound` instead. */ + export type Outbound = Subscription$Outbound; +} + +/** @internal */ +export const GetTokenDetailsFeatures$inboundSchema: z.ZodNativeEnum< + typeof GetTokenDetailsFeatures +> = z.nativeEnum(GetTokenDetailsFeatures); + +/** @internal */ +export const GetTokenDetailsFeatures$outboundSchema: z.ZodNativeEnum< + typeof GetTokenDetailsFeatures +> = GetTokenDetailsFeatures$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsFeatures$ { + /** @deprecated use `GetTokenDetailsFeatures$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsFeatures$inboundSchema; + /** @deprecated use `GetTokenDetailsFeatures$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsFeatures$outboundSchema; +} + +/** @internal */ +export const GetTokenDetailsAuthenticationResponseStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(GetTokenDetailsAuthenticationResponseStatus); + +/** @internal */ +export const GetTokenDetailsAuthenticationResponseStatus$outboundSchema: + z.ZodNativeEnum = + GetTokenDetailsAuthenticationResponseStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsAuthenticationResponseStatus$ { + /** @deprecated use `GetTokenDetailsAuthenticationResponseStatus$inboundSchema` instead. */ + export const inboundSchema = + GetTokenDetailsAuthenticationResponseStatus$inboundSchema; + /** @deprecated use `GetTokenDetailsAuthenticationResponseStatus$outboundSchema` instead. */ + export const outboundSchema = + GetTokenDetailsAuthenticationResponseStatus$outboundSchema; +} + +/** @internal */ +export const GetTokenDetailsSubscription$inboundSchema: z.ZodType< + GetTokenDetailsSubscription, + z.ZodTypeDef, + unknown +> = z.object({ + features: z.array(GetTokenDetailsFeatures$inboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: GetTokenDetailsAuthenticationResponseStatus$inboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type GetTokenDetailsSubscription$Outbound = { + features?: Array | undefined; + active?: boolean | undefined; + subscribedAt?: string | null | undefined; + status?: string | undefined; + paymentService?: string | null | undefined; + plan?: string | null | undefined; +}; + +/** @internal */ +export const GetTokenDetailsSubscription$outboundSchema: z.ZodType< + GetTokenDetailsSubscription$Outbound, + z.ZodTypeDef, + GetTokenDetailsSubscription +> = z.object({ + features: z.array(GetTokenDetailsFeatures$outboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: GetTokenDetailsAuthenticationResponseStatus$outboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsSubscription$ { + /** @deprecated use `GetTokenDetailsSubscription$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsSubscription$inboundSchema; + /** @deprecated use `GetTokenDetailsSubscription$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsSubscription$outboundSchema; + /** @deprecated use `GetTokenDetailsSubscription$Outbound` instead. */ + export type Outbound = GetTokenDetailsSubscription$Outbound; +} + +/** @internal */ +export const GetTokenDetailsUserPlexAccount$inboundSchema: z.ZodType< + GetTokenDetailsUserPlexAccount, + z.ZodTypeDef, + unknown +> = z.object({ + adsConsent: z.nullable(z.boolean()), + adsConsentReminderAt: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + adsConsentSetAt: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + anonymous: z.nullable(z.boolean().default(false)), + authToken: z.string(), + backupCodesCreated: z.boolean().default(false), + confirmed: z.boolean().default(false), + country: z.string(), + email: z.string(), + emailOnlyAuth: z.boolean().default(false), + experimentalFeatures: z.boolean().default(false), + friendlyName: z.string(), + entitlements: z.array(z.string()), + guest: z.boolean().default(false), + hasPassword: z.boolean().default(true), + home: z.boolean().default(false), + homeAdmin: z.boolean().default(false), + homeSize: z.number().int(), + id: z.number().int(), + joinedAt: z.number().int(), + locale: z.nullable(z.string()), + mailingListActive: z.boolean().default(false), + mailingListStatus: MailingListStatus$inboundSchema, + maxHomeSize: z.number().int(), + pin: z.string().optional(), + profile: z.lazy(() => UserProfile$inboundSchema), + protected: z.boolean().default(false), + rememberExpiresAt: z.number().int(), + restricted: z.boolean().default(false), + roles: z.array(z.string()).optional(), + scrobbleTypes: z.string(), + services: z.array(z.lazy(() => Services$inboundSchema)), + subscription: z.lazy(() => Subscription$inboundSchema), + subscriptionDescription: z.nullable(z.string()), + subscriptions: z.array( + z.lazy(() => GetTokenDetailsSubscription$inboundSchema), + ), + thumb: z.string(), + title: z.string(), + twoFactorEnabled: z.boolean().default(false), + username: z.string(), + uuid: z.string(), +}); + +/** @internal */ +export type GetTokenDetailsUserPlexAccount$Outbound = { + adsConsent: boolean | null; + adsConsentReminderAt: string | null; + adsConsentSetAt: string | null; + anonymous: boolean | null; + authToken: string; + backupCodesCreated: boolean; + confirmed: boolean; + country: string; + email: string; + emailOnlyAuth: boolean; + experimentalFeatures: boolean; + friendlyName: string; + entitlements: Array; + guest: boolean; + hasPassword: boolean; + home: boolean; + homeAdmin: boolean; + homeSize: number; + id: number; + joinedAt: number; + locale: string | null; + mailingListActive: boolean; + mailingListStatus: string; + maxHomeSize: number; + pin?: string | undefined; + profile: UserProfile$Outbound; + protected: boolean; + rememberExpiresAt: number; + restricted: boolean; + roles?: Array | undefined; + scrobbleTypes: string; + services: Array; + subscription: Subscription$Outbound; + subscriptionDescription: string | null; + subscriptions: Array; + thumb: string; + title: string; + twoFactorEnabled: boolean; + username: string; + uuid: string; +}; + +/** @internal */ +export const GetTokenDetailsUserPlexAccount$outboundSchema: z.ZodType< + GetTokenDetailsUserPlexAccount$Outbound, + z.ZodTypeDef, + GetTokenDetailsUserPlexAccount +> = z.object({ + adsConsent: z.nullable(z.boolean()), + adsConsentReminderAt: z.nullable(z.date().transform(v => v.toISOString())), + adsConsentSetAt: z.nullable(z.date().transform(v => v.toISOString())), + anonymous: z.nullable(z.boolean().default(false)), + authToken: z.string(), + backupCodesCreated: z.boolean().default(false), + confirmed: z.boolean().default(false), + country: z.string(), + email: z.string(), + emailOnlyAuth: z.boolean().default(false), + experimentalFeatures: z.boolean().default(false), + friendlyName: z.string(), + entitlements: z.array(z.string()), + guest: z.boolean().default(false), + hasPassword: z.boolean().default(true), + home: z.boolean().default(false), + homeAdmin: z.boolean().default(false), + homeSize: z.number().int(), + id: z.number().int(), + joinedAt: z.number().int(), + locale: z.nullable(z.string()), + mailingListActive: z.boolean().default(false), + mailingListStatus: MailingListStatus$outboundSchema, + maxHomeSize: z.number().int(), + pin: z.string().optional(), + profile: z.lazy(() => UserProfile$outboundSchema), + protected: z.boolean().default(false), + rememberExpiresAt: z.number().int(), + restricted: z.boolean().default(false), + roles: z.array(z.string()).optional(), + scrobbleTypes: z.string(), + services: z.array(z.lazy(() => Services$outboundSchema)), + subscription: z.lazy(() => Subscription$outboundSchema), + subscriptionDescription: z.nullable(z.string()), + subscriptions: z.array( + z.lazy(() => GetTokenDetailsSubscription$outboundSchema), + ), + thumb: z.string(), + title: z.string(), + twoFactorEnabled: z.boolean().default(false), + username: z.string(), + uuid: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsUserPlexAccount$ { + /** @deprecated use `GetTokenDetailsUserPlexAccount$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsUserPlexAccount$inboundSchema; + /** @deprecated use `GetTokenDetailsUserPlexAccount$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsUserPlexAccount$outboundSchema; + /** @deprecated use `GetTokenDetailsUserPlexAccount$Outbound` instead. */ + export type Outbound = GetTokenDetailsUserPlexAccount$Outbound; +} + +/** @internal */ +export const GetTokenDetailsResponse$inboundSchema: z.ZodType< + GetTokenDetailsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + UserPlexAccount: z.lazy(() => GetTokenDetailsUserPlexAccount$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "UserPlexAccount": "userPlexAccount", + }); +}); + +/** @internal */ +export type GetTokenDetailsResponse$Outbound = { + ContentType: string; + StatusCode: number; + RawResponse: never; + UserPlexAccount?: GetTokenDetailsUserPlexAccount$Outbound | undefined; +}; + +/** @internal */ +export const GetTokenDetailsResponse$outboundSchema: z.ZodType< + GetTokenDetailsResponse$Outbound, + z.ZodTypeDef, + GetTokenDetailsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + userPlexAccount: z.lazy(() => GetTokenDetailsUserPlexAccount$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + userPlexAccount: "UserPlexAccount", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace GetTokenDetailsResponse$ { + /** @deprecated use `GetTokenDetailsResponse$inboundSchema` instead. */ + export const inboundSchema = GetTokenDetailsResponse$inboundSchema; + /** @deprecated use `GetTokenDetailsResponse$outboundSchema` instead. */ + export const outboundSchema = GetTokenDetailsResponse$outboundSchema; + /** @deprecated use `GetTokenDetailsResponse$Outbound` instead. */ + export type Outbound = GetTokenDetailsResponse$Outbound; +} diff --git a/src/sdk/models/operations/gettopwatchedcontent.ts b/src/sdk/models/operations/gettopwatchedcontent.ts index 8358fac4..6ab7534c 100644 --- a/src/sdk/models/operations/gettopwatchedcontent.ts +++ b/src/sdk/models/operations/gettopwatchedcontent.ts @@ -2,9 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; /** * The type of media to retrieve. @@ -15,144 +15,141 @@ import * as z from "zod"; * 3 = season * 4 = episode * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * */ export enum GetTopWatchedContentQueryParamType { - One = 1, - Two = 2, - Three = 3, - Four = 4, + One = 1, + Two = 2, + Three = 3, + Four = 4, } export type GetTopWatchedContentRequest = { - /** - * The type of media to retrieve. - * - * @remarks - * 1 = movie - * 2 = show - * 3 = season - * 4 = episode - * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries - * - */ - type: GetTopWatchedContentQueryParamType; - /** - * Adds the Guids object to the response - * - * @remarks - * - */ - includeGuids?: number | undefined; + /** + * The type of media to retrieve. + * + * @remarks + * 1 = movie + * 2 = show + * 3 = season + * 4 = episode + * E.g. A movie library will not return anything with type 3 as there are no seasons for movie libraries + */ + type: GetTopWatchedContentQueryParamType; + /** + * Adds the Guids object to the response + * + * @remarks + */ + includeGuids?: number | undefined; }; export type GetTopWatchedContentGenre = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; export type GetTopWatchedContentCountry = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; export type GetTopWatchedContentGuids = { - id?: string | undefined; + id?: string | undefined; }; export type GetTopWatchedContentRole = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - role?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + role?: string | undefined; + thumb?: string | undefined; }; export type User = { - id?: number | undefined; + id?: number | undefined; }; export type GetTopWatchedContentMetadata = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - slug?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: RFCDate | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - childCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - globalViewCount?: number | undefined; - audienceRatingImage?: string | undefined; - genre?: Array | undefined; - country?: Array | undefined; - guids?: Array | undefined; - role?: Array | undefined; - user?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + slug?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: RFCDate | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + globalViewCount?: number | undefined; + audienceRatingImage?: string | undefined; + genre?: Array | undefined; + country?: Array | undefined; + guids?: Array | undefined; + role?: Array | undefined; + user?: Array | undefined; }; export type GetTopWatchedContentMediaContainer = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + metadata?: Array | undefined; }; /** * The metadata of the library item. */ export type GetTopWatchedContentResponseBody = { - mediaContainer?: GetTopWatchedContentMediaContainer | undefined; + mediaContainer?: GetTopWatchedContentMediaContainer | undefined; }; export type GetTopWatchedContentResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The metadata of the library item. - */ - object?: GetTopWatchedContentResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The metadata of the library item. + */ + object?: GetTopWatchedContentResponseBody | undefined; }; /** @internal */ export const GetTopWatchedContentQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetTopWatchedContentQueryParamType + typeof GetTopWatchedContentQueryParamType > = z.nativeEnum(GetTopWatchedContentQueryParamType); /** @internal */ export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetTopWatchedContentQueryParamType + typeof GetTopWatchedContentQueryParamType > = GetTopWatchedContentQueryParamType$inboundSchema; /** @@ -160,36 +157,37 @@ export const GetTopWatchedContentQueryParamType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentQueryParamType$ { - /** @deprecated use `GetTopWatchedContentQueryParamType$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentQueryParamType$inboundSchema; - /** @deprecated use `GetTopWatchedContentQueryParamType$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentQueryParamType$outboundSchema; + /** @deprecated use `GetTopWatchedContentQueryParamType$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentQueryParamType$inboundSchema; + /** @deprecated use `GetTopWatchedContentQueryParamType$outboundSchema` instead. */ + export const outboundSchema = + GetTopWatchedContentQueryParamType$outboundSchema; } /** @internal */ export const GetTopWatchedContentRequest$inboundSchema: z.ZodType< - GetTopWatchedContentRequest, - z.ZodTypeDef, - unknown + GetTopWatchedContentRequest, + z.ZodTypeDef, + unknown > = z.object({ - type: GetTopWatchedContentQueryParamType$inboundSchema, - includeGuids: z.number().int().optional(), + type: GetTopWatchedContentQueryParamType$inboundSchema, + includeGuids: z.number().int().optional(), }); /** @internal */ export type GetTopWatchedContentRequest$Outbound = { - type: number; - includeGuids?: number | undefined; + type: number; + includeGuids?: number | undefined; }; /** @internal */ export const GetTopWatchedContentRequest$outboundSchema: z.ZodType< - GetTopWatchedContentRequest$Outbound, - z.ZodTypeDef, - GetTopWatchedContentRequest + GetTopWatchedContentRequest$Outbound, + z.ZodTypeDef, + GetTopWatchedContentRequest > = z.object({ - type: GetTopWatchedContentQueryParamType$outboundSchema, - includeGuids: z.number().int().optional(), + type: GetTopWatchedContentQueryParamType$outboundSchema, + includeGuids: z.number().int().optional(), }); /** @@ -197,41 +195,41 @@ export const GetTopWatchedContentRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentRequest$ { - /** @deprecated use `GetTopWatchedContentRequest$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentRequest$inboundSchema; - /** @deprecated use `GetTopWatchedContentRequest$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentRequest$outboundSchema; - /** @deprecated use `GetTopWatchedContentRequest$Outbound` instead. */ - export type Outbound = GetTopWatchedContentRequest$Outbound; + /** @deprecated use `GetTopWatchedContentRequest$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentRequest$inboundSchema; + /** @deprecated use `GetTopWatchedContentRequest$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentRequest$outboundSchema; + /** @deprecated use `GetTopWatchedContentRequest$Outbound` instead. */ + export type Outbound = GetTopWatchedContentRequest$Outbound; } /** @internal */ export const GetTopWatchedContentGenre$inboundSchema: z.ZodType< - GetTopWatchedContentGenre, - z.ZodTypeDef, - unknown + GetTopWatchedContentGenre, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetTopWatchedContentGenre$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetTopWatchedContentGenre$outboundSchema: z.ZodType< - GetTopWatchedContentGenre$Outbound, - z.ZodTypeDef, - GetTopWatchedContentGenre + GetTopWatchedContentGenre$Outbound, + z.ZodTypeDef, + GetTopWatchedContentGenre > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @@ -239,41 +237,41 @@ export const GetTopWatchedContentGenre$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentGenre$ { - /** @deprecated use `GetTopWatchedContentGenre$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentGenre$inboundSchema; - /** @deprecated use `GetTopWatchedContentGenre$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentGenre$outboundSchema; - /** @deprecated use `GetTopWatchedContentGenre$Outbound` instead. */ - export type Outbound = GetTopWatchedContentGenre$Outbound; + /** @deprecated use `GetTopWatchedContentGenre$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentGenre$inboundSchema; + /** @deprecated use `GetTopWatchedContentGenre$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentGenre$outboundSchema; + /** @deprecated use `GetTopWatchedContentGenre$Outbound` instead. */ + export type Outbound = GetTopWatchedContentGenre$Outbound; } /** @internal */ export const GetTopWatchedContentCountry$inboundSchema: z.ZodType< - GetTopWatchedContentCountry, - z.ZodTypeDef, - unknown + GetTopWatchedContentCountry, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @internal */ export type GetTopWatchedContentCountry$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; }; /** @internal */ export const GetTopWatchedContentCountry$outboundSchema: z.ZodType< - GetTopWatchedContentCountry$Outbound, - z.ZodTypeDef, - GetTopWatchedContentCountry + GetTopWatchedContentCountry$Outbound, + z.ZodTypeDef, + GetTopWatchedContentCountry > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), }); /** @@ -281,35 +279,35 @@ export const GetTopWatchedContentCountry$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentCountry$ { - /** @deprecated use `GetTopWatchedContentCountry$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentCountry$inboundSchema; - /** @deprecated use `GetTopWatchedContentCountry$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentCountry$outboundSchema; - /** @deprecated use `GetTopWatchedContentCountry$Outbound` instead. */ - export type Outbound = GetTopWatchedContentCountry$Outbound; + /** @deprecated use `GetTopWatchedContentCountry$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentCountry$inboundSchema; + /** @deprecated use `GetTopWatchedContentCountry$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentCountry$outboundSchema; + /** @deprecated use `GetTopWatchedContentCountry$Outbound` instead. */ + export type Outbound = GetTopWatchedContentCountry$Outbound; } /** @internal */ export const GetTopWatchedContentGuids$inboundSchema: z.ZodType< - GetTopWatchedContentGuids, - z.ZodTypeDef, - unknown + GetTopWatchedContentGuids, + z.ZodTypeDef, + unknown > = z.object({ - id: z.string().optional(), + id: z.string().optional(), }); /** @internal */ export type GetTopWatchedContentGuids$Outbound = { - id?: string | undefined; + id?: string | undefined; }; /** @internal */ export const GetTopWatchedContentGuids$outboundSchema: z.ZodType< - GetTopWatchedContentGuids$Outbound, - z.ZodTypeDef, - GetTopWatchedContentGuids + GetTopWatchedContentGuids$Outbound, + z.ZodTypeDef, + GetTopWatchedContentGuids > = z.object({ - id: z.string().optional(), + id: z.string().optional(), }); /** @@ -317,50 +315,50 @@ export const GetTopWatchedContentGuids$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentGuids$ { - /** @deprecated use `GetTopWatchedContentGuids$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentGuids$inboundSchema; - /** @deprecated use `GetTopWatchedContentGuids$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentGuids$outboundSchema; - /** @deprecated use `GetTopWatchedContentGuids$Outbound` instead. */ - export type Outbound = GetTopWatchedContentGuids$Outbound; + /** @deprecated use `GetTopWatchedContentGuids$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentGuids$inboundSchema; + /** @deprecated use `GetTopWatchedContentGuids$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentGuids$outboundSchema; + /** @deprecated use `GetTopWatchedContentGuids$Outbound` instead. */ + export type Outbound = GetTopWatchedContentGuids$Outbound; } /** @internal */ export const GetTopWatchedContentRole$inboundSchema: z.ZodType< - GetTopWatchedContentRole, - z.ZodTypeDef, - unknown + GetTopWatchedContentRole, + z.ZodTypeDef, + unknown > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - role: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + role: z.string().optional(), + thumb: z.string().optional(), }); /** @internal */ export type GetTopWatchedContentRole$Outbound = { - id?: number | undefined; - filter?: string | undefined; - tag?: string | undefined; - tagKey?: string | undefined; - role?: string | undefined; - thumb?: string | undefined; + id?: number | undefined; + filter?: string | undefined; + tag?: string | undefined; + tagKey?: string | undefined; + role?: string | undefined; + thumb?: string | undefined; }; /** @internal */ export const GetTopWatchedContentRole$outboundSchema: z.ZodType< - GetTopWatchedContentRole$Outbound, - z.ZodTypeDef, - GetTopWatchedContentRole + GetTopWatchedContentRole$Outbound, + z.ZodTypeDef, + GetTopWatchedContentRole > = z.object({ - id: z.number().int().optional(), - filter: z.string().optional(), - tag: z.string().optional(), - tagKey: z.string().optional(), - role: z.string().optional(), - thumb: z.string().optional(), + id: z.number().int().optional(), + filter: z.string().optional(), + tag: z.string().optional(), + tagKey: z.string().optional(), + role: z.string().optional(), + thumb: z.string().optional(), }); /** @@ -368,367 +366,364 @@ export const GetTopWatchedContentRole$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentRole$ { - /** @deprecated use `GetTopWatchedContentRole$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentRole$inboundSchema; - /** @deprecated use `GetTopWatchedContentRole$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentRole$outboundSchema; - /** @deprecated use `GetTopWatchedContentRole$Outbound` instead. */ - export type Outbound = GetTopWatchedContentRole$Outbound; + /** @deprecated use `GetTopWatchedContentRole$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentRole$inboundSchema; + /** @deprecated use `GetTopWatchedContentRole$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentRole$outboundSchema; + /** @deprecated use `GetTopWatchedContentRole$Outbound` instead. */ + export type Outbound = GetTopWatchedContentRole$Outbound; } /** @internal */ -export const User$inboundSchema: z.ZodType = z.object({ +export const User$inboundSchema: z.ZodType = z + .object({ id: z.number().int().optional(), -}); + }); /** @internal */ export type User$Outbound = { - id?: number | undefined; + id?: number | undefined; }; /** @internal */ -export const User$outboundSchema: z.ZodType = z.object({ +export const User$outboundSchema: z.ZodType = + z.object({ id: z.number().int().optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace User$ { - /** @deprecated use `User$inboundSchema` instead. */ - export const inboundSchema = User$inboundSchema; - /** @deprecated use `User$outboundSchema` instead. */ - export const outboundSchema = User$outboundSchema; - /** @deprecated use `User$Outbound` instead. */ - export type Outbound = User$Outbound; + /** @deprecated use `User$inboundSchema` instead. */ + export const inboundSchema = User$inboundSchema; + /** @deprecated use `User$outboundSchema` instead. */ + export const outboundSchema = User$outboundSchema; + /** @deprecated use `User$Outbound` instead. */ + export type Outbound = User$Outbound; } /** @internal */ export const GetTopWatchedContentMetadata$inboundSchema: z.ZodType< - GetTopWatchedContentMetadata, - z.ZodTypeDef, - unknown -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - slug: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - globalViewCount: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - Genre: z.array(z.lazy(() => GetTopWatchedContentGenre$inboundSchema)).optional(), - Country: z.array(z.lazy(() => GetTopWatchedContentCountry$inboundSchema)).optional(), - Guid: z.array(z.lazy(() => GetTopWatchedContentGuids$inboundSchema)).optional(), - Role: z.array(z.lazy(() => GetTopWatchedContentRole$inboundSchema)).optional(), - User: z.array(z.lazy(() => User$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Genre: "genre", - Country: "country", - Guid: "guids", - Role: "role", - User: "user", - }); - }); + GetTopWatchedContentMetadata, + z.ZodTypeDef, + unknown +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + slug: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + globalViewCount: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + Genre: z.array(z.lazy(() => GetTopWatchedContentGenre$inboundSchema)) + .optional(), + Country: z.array(z.lazy(() => GetTopWatchedContentCountry$inboundSchema)) + .optional(), + Guid: z.array(z.lazy(() => GetTopWatchedContentGuids$inboundSchema)) + .optional(), + Role: z.array(z.lazy(() => GetTopWatchedContentRole$inboundSchema)) + .optional(), + User: z.array(z.lazy(() => User$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Genre": "genre", + "Country": "country", + "Guid": "guids", + "Role": "role", + "User": "user", + }); +}); /** @internal */ export type GetTopWatchedContentMetadata$Outbound = { - ratingKey?: string | undefined; - key?: string | undefined; - guid?: string | undefined; - slug?: string | undefined; - studio?: string | undefined; - type?: string | undefined; - title?: string | undefined; - librarySectionTitle?: string | undefined; - librarySectionID?: number | undefined; - librarySectionKey?: string | undefined; - contentRating?: string | undefined; - summary?: string | undefined; - index?: number | undefined; - audienceRating?: number | undefined; - year?: number | undefined; - tagline?: string | undefined; - thumb?: string | undefined; - art?: string | undefined; - duration?: number | undefined; - originallyAvailableAt?: string | undefined; - leafCount?: number | undefined; - viewedLeafCount?: number | undefined; - childCount?: number | undefined; - addedAt?: number | undefined; - updatedAt?: number | undefined; - globalViewCount?: number | undefined; - audienceRatingImage?: string | undefined; - Genre?: Array | undefined; - Country?: Array | undefined; - Guid?: Array | undefined; - Role?: Array | undefined; - User?: Array | undefined; + ratingKey?: string | undefined; + key?: string | undefined; + guid?: string | undefined; + slug?: string | undefined; + studio?: string | undefined; + type?: string | undefined; + title?: string | undefined; + librarySectionTitle?: string | undefined; + librarySectionID?: number | undefined; + librarySectionKey?: string | undefined; + contentRating?: string | undefined; + summary?: string | undefined; + index?: number | undefined; + audienceRating?: number | undefined; + year?: number | undefined; + tagline?: string | undefined; + thumb?: string | undefined; + art?: string | undefined; + duration?: number | undefined; + originallyAvailableAt?: string | undefined; + leafCount?: number | undefined; + viewedLeafCount?: number | undefined; + childCount?: number | undefined; + addedAt?: number | undefined; + updatedAt?: number | undefined; + globalViewCount?: number | undefined; + audienceRatingImage?: string | undefined; + Genre?: Array | undefined; + Country?: Array | undefined; + Guid?: Array | undefined; + Role?: Array | undefined; + User?: Array | undefined; }; /** @internal */ export const GetTopWatchedContentMetadata$outboundSchema: z.ZodType< - GetTopWatchedContentMetadata$Outbound, - z.ZodTypeDef, - GetTopWatchedContentMetadata -> = z - .object({ - ratingKey: z.string().optional(), - key: z.string().optional(), - guid: z.string().optional(), - slug: z.string().optional(), - studio: z.string().optional(), - type: z.string().optional(), - title: z.string().optional(), - librarySectionTitle: z.string().optional(), - librarySectionID: z.number().int().optional(), - librarySectionKey: z.string().optional(), - contentRating: z.string().optional(), - summary: z.string().optional(), - index: z.number().int().optional(), - audienceRating: z.number().optional(), - year: z.number().int().optional(), - tagline: z.string().optional(), - thumb: z.string().optional(), - art: z.string().optional(), - duration: z.number().int().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - leafCount: z.number().int().optional(), - viewedLeafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - addedAt: z.number().int().optional(), - updatedAt: z.number().int().optional(), - globalViewCount: z.number().int().optional(), - audienceRatingImage: z.string().optional(), - genre: z.array(z.lazy(() => GetTopWatchedContentGenre$outboundSchema)).optional(), - country: z.array(z.lazy(() => GetTopWatchedContentCountry$outboundSchema)).optional(), - guids: z.array(z.lazy(() => GetTopWatchedContentGuids$outboundSchema)).optional(), - role: z.array(z.lazy(() => GetTopWatchedContentRole$outboundSchema)).optional(), - user: z.array(z.lazy(() => User$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - genre: "Genre", - country: "Country", - guids: "Guid", - role: "Role", - user: "User", - }); - }); + GetTopWatchedContentMetadata$Outbound, + z.ZodTypeDef, + GetTopWatchedContentMetadata +> = z.object({ + ratingKey: z.string().optional(), + key: z.string().optional(), + guid: z.string().optional(), + slug: z.string().optional(), + studio: z.string().optional(), + type: z.string().optional(), + title: z.string().optional(), + librarySectionTitle: z.string().optional(), + librarySectionID: z.number().int().optional(), + librarySectionKey: z.string().optional(), + contentRating: z.string().optional(), + summary: z.string().optional(), + index: z.number().int().optional(), + audienceRating: z.number().optional(), + year: z.number().int().optional(), + tagline: z.string().optional(), + thumb: z.string().optional(), + art: z.string().optional(), + duration: z.number().int().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + leafCount: z.number().int().optional(), + viewedLeafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + addedAt: z.number().int().optional(), + updatedAt: z.number().int().optional(), + globalViewCount: z.number().int().optional(), + audienceRatingImage: z.string().optional(), + genre: z.array(z.lazy(() => GetTopWatchedContentGenre$outboundSchema)) + .optional(), + country: z.array(z.lazy(() => GetTopWatchedContentCountry$outboundSchema)) + .optional(), + guids: z.array(z.lazy(() => GetTopWatchedContentGuids$outboundSchema)) + .optional(), + role: z.array(z.lazy(() => GetTopWatchedContentRole$outboundSchema)) + .optional(), + user: z.array(z.lazy(() => User$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + genre: "Genre", + country: "Country", + guids: "Guid", + role: "Role", + user: "User", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentMetadata$ { - /** @deprecated use `GetTopWatchedContentMetadata$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentMetadata$inboundSchema; - /** @deprecated use `GetTopWatchedContentMetadata$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentMetadata$outboundSchema; - /** @deprecated use `GetTopWatchedContentMetadata$Outbound` instead. */ - export type Outbound = GetTopWatchedContentMetadata$Outbound; + /** @deprecated use `GetTopWatchedContentMetadata$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentMetadata$inboundSchema; + /** @deprecated use `GetTopWatchedContentMetadata$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentMetadata$outboundSchema; + /** @deprecated use `GetTopWatchedContentMetadata$Outbound` instead. */ + export type Outbound = GetTopWatchedContentMetadata$Outbound; } /** @internal */ export const GetTopWatchedContentMediaContainer$inboundSchema: z.ZodType< - GetTopWatchedContentMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - Metadata: z.array(z.lazy(() => GetTopWatchedContentMetadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetTopWatchedContentMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + Metadata: z.array(z.lazy(() => GetTopWatchedContentMetadata$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetTopWatchedContentMediaContainer$Outbound = { - size?: number | undefined; - allowSync?: boolean | undefined; - identifier?: string | undefined; - mediaTagPrefix?: string | undefined; - mediaTagVersion?: number | undefined; - Metadata?: Array | undefined; + size?: number | undefined; + allowSync?: boolean | undefined; + identifier?: string | undefined; + mediaTagPrefix?: string | undefined; + mediaTagVersion?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetTopWatchedContentMediaContainer$outboundSchema: z.ZodType< - GetTopWatchedContentMediaContainer$Outbound, - z.ZodTypeDef, - GetTopWatchedContentMediaContainer -> = z - .object({ - size: z.number().int().optional(), - allowSync: z.boolean().optional(), - identifier: z.string().optional(), - mediaTagPrefix: z.string().optional(), - mediaTagVersion: z.number().int().optional(), - metadata: z.array(z.lazy(() => GetTopWatchedContentMetadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetTopWatchedContentMediaContainer$Outbound, + z.ZodTypeDef, + GetTopWatchedContentMediaContainer +> = z.object({ + size: z.number().int().optional(), + allowSync: z.boolean().optional(), + identifier: z.string().optional(), + mediaTagPrefix: z.string().optional(), + mediaTagVersion: z.number().int().optional(), + metadata: z.array(z.lazy(() => GetTopWatchedContentMetadata$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentMediaContainer$ { - /** @deprecated use `GetTopWatchedContentMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentMediaContainer$inboundSchema; - /** @deprecated use `GetTopWatchedContentMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentMediaContainer$outboundSchema; - /** @deprecated use `GetTopWatchedContentMediaContainer$Outbound` instead. */ - export type Outbound = GetTopWatchedContentMediaContainer$Outbound; + /** @deprecated use `GetTopWatchedContentMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentMediaContainer$inboundSchema; + /** @deprecated use `GetTopWatchedContentMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetTopWatchedContentMediaContainer$outboundSchema; + /** @deprecated use `GetTopWatchedContentMediaContainer$Outbound` instead. */ + export type Outbound = GetTopWatchedContentMediaContainer$Outbound; } /** @internal */ export const GetTopWatchedContentResponseBody$inboundSchema: z.ZodType< - GetTopWatchedContentResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetTopWatchedContentMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetTopWatchedContentResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetTopWatchedContentMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetTopWatchedContentResponseBody$Outbound = { - MediaContainer?: GetTopWatchedContentMediaContainer$Outbound | undefined; + MediaContainer?: GetTopWatchedContentMediaContainer$Outbound | undefined; }; /** @internal */ export const GetTopWatchedContentResponseBody$outboundSchema: z.ZodType< - GetTopWatchedContentResponseBody$Outbound, - z.ZodTypeDef, - GetTopWatchedContentResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetTopWatchedContentMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetTopWatchedContentResponseBody$Outbound, + z.ZodTypeDef, + GetTopWatchedContentResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetTopWatchedContentMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentResponseBody$ { - /** @deprecated use `GetTopWatchedContentResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentResponseBody$inboundSchema; - /** @deprecated use `GetTopWatchedContentResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentResponseBody$outboundSchema; - /** @deprecated use `GetTopWatchedContentResponseBody$Outbound` instead. */ - export type Outbound = GetTopWatchedContentResponseBody$Outbound; + /** @deprecated use `GetTopWatchedContentResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentResponseBody$inboundSchema; + /** @deprecated use `GetTopWatchedContentResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentResponseBody$outboundSchema; + /** @deprecated use `GetTopWatchedContentResponseBody$Outbound` instead. */ + export type Outbound = GetTopWatchedContentResponseBody$Outbound; } /** @internal */ export const GetTopWatchedContentResponse$inboundSchema: z.ZodType< - GetTopWatchedContentResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetTopWatchedContentResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetTopWatchedContentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetTopWatchedContentResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetTopWatchedContentResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetTopWatchedContentResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetTopWatchedContentResponseBody$Outbound | undefined; }; /** @internal */ export const GetTopWatchedContentResponse$outboundSchema: z.ZodType< - GetTopWatchedContentResponse$Outbound, - z.ZodTypeDef, - GetTopWatchedContentResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetTopWatchedContentResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetTopWatchedContentResponse$Outbound, + z.ZodTypeDef, + GetTopWatchedContentResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetTopWatchedContentResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopWatchedContentResponse$ { - /** @deprecated use `GetTopWatchedContentResponse$inboundSchema` instead. */ - export const inboundSchema = GetTopWatchedContentResponse$inboundSchema; - /** @deprecated use `GetTopWatchedContentResponse$outboundSchema` instead. */ - export const outboundSchema = GetTopWatchedContentResponse$outboundSchema; - /** @deprecated use `GetTopWatchedContentResponse$Outbound` instead. */ - export type Outbound = GetTopWatchedContentResponse$Outbound; + /** @deprecated use `GetTopWatchedContentResponse$inboundSchema` instead. */ + export const inboundSchema = GetTopWatchedContentResponse$inboundSchema; + /** @deprecated use `GetTopWatchedContentResponse$outboundSchema` instead. */ + export const outboundSchema = GetTopWatchedContentResponse$outboundSchema; + /** @deprecated use `GetTopWatchedContentResponse$Outbound` instead. */ + export type Outbound = GetTopWatchedContentResponse$Outbound; } diff --git a/src/sdk/models/operations/gettranscodesessions.ts b/src/sdk/models/operations/gettranscodesessions.ts index 821650eb..99cce9d5 100644 --- a/src/sdk/models/operations/gettranscodesessions.ts +++ b/src/sdk/models/operations/gettranscodesessions.ts @@ -2,154 +2,157 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type TranscodeSession = { - key?: string | undefined; - throttled?: boolean | undefined; - complete?: boolean | undefined; - progress?: number | undefined; - size?: number | undefined; - speed?: number | undefined; - error?: boolean | undefined; - duration?: number | undefined; - remaining?: number | undefined; - context?: string | undefined; - sourceVideoCodec?: string | undefined; - sourceAudioCodec?: string | undefined; - videoDecision?: string | undefined; - audioDecision?: string | undefined; - subtitleDecision?: string | undefined; - protocol?: string | undefined; - container?: string | undefined; - videoCodec?: string | undefined; - audioCodec?: string | undefined; - audioChannels?: number | undefined; - transcodeHwRequested?: boolean | undefined; - timeStamp?: number | undefined; - maxOffsetAvailable?: number | undefined; - minOffsetAvailable?: number | undefined; + key?: string | undefined; + throttled?: boolean | undefined; + complete?: boolean | undefined; + progress?: number | undefined; + size?: number | undefined; + speed?: number | undefined; + error?: boolean | undefined; + duration?: number | undefined; + remaining?: number | undefined; + context?: string | undefined; + sourceVideoCodec?: string | undefined; + sourceAudioCodec?: string | undefined; + videoDecision?: string | undefined; + audioDecision?: string | undefined; + subtitleDecision?: string | undefined; + protocol?: string | undefined; + container?: string | undefined; + videoCodec?: string | undefined; + audioCodec?: string | undefined; + audioChannels?: number | undefined; + transcodeHwRequested?: boolean | undefined; + timeStamp?: number | undefined; + maxOffsetAvailable?: number | undefined; + minOffsetAvailable?: number | undefined; }; export type GetTranscodeSessionsMediaContainer = { - size?: number | undefined; - transcodeSession?: Array | undefined; + size?: number | undefined; + transcodeSession?: Array | undefined; }; /** * The Transcode Sessions */ export type GetTranscodeSessionsResponseBody = { - mediaContainer?: GetTranscodeSessionsMediaContainer | undefined; + mediaContainer?: GetTranscodeSessionsMediaContainer | undefined; }; export type GetTranscodeSessionsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Transcode Sessions - */ - object?: GetTranscodeSessionsResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Transcode Sessions + */ + object?: GetTranscodeSessionsResponseBody | undefined; }; /** @internal */ -export const TranscodeSession$inboundSchema: z.ZodType = - z.object({ - key: z.string().optional(), - throttled: z.boolean().optional(), - complete: z.boolean().optional(), - progress: z.number().optional(), - size: z.number().int().optional(), - speed: z.number().optional(), - error: z.boolean().optional(), - duration: z.number().int().optional(), - remaining: z.number().int().optional(), - context: z.string().optional(), - sourceVideoCodec: z.string().optional(), - sourceAudioCodec: z.string().optional(), - videoDecision: z.string().optional(), - audioDecision: z.string().optional(), - subtitleDecision: z.string().optional(), - protocol: z.string().optional(), - container: z.string().optional(), - videoCodec: z.string().optional(), - audioCodec: z.string().optional(), - audioChannels: z.number().int().optional(), - transcodeHwRequested: z.boolean().optional(), - timeStamp: z.number().optional(), - maxOffsetAvailable: z.number().optional(), - minOffsetAvailable: z.number().optional(), - }); +export const TranscodeSession$inboundSchema: z.ZodType< + TranscodeSession, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.string().optional(), + throttled: z.boolean().optional(), + complete: z.boolean().optional(), + progress: z.number().optional(), + size: z.number().int().optional(), + speed: z.number().optional(), + error: z.boolean().optional(), + duration: z.number().int().optional(), + remaining: z.number().int().optional(), + context: z.string().optional(), + sourceVideoCodec: z.string().optional(), + sourceAudioCodec: z.string().optional(), + videoDecision: z.string().optional(), + audioDecision: z.string().optional(), + subtitleDecision: z.string().optional(), + protocol: z.string().optional(), + container: z.string().optional(), + videoCodec: z.string().optional(), + audioCodec: z.string().optional(), + audioChannels: z.number().int().optional(), + transcodeHwRequested: z.boolean().optional(), + timeStamp: z.number().optional(), + maxOffsetAvailable: z.number().optional(), + minOffsetAvailable: z.number().optional(), +}); /** @internal */ export type TranscodeSession$Outbound = { - key?: string | undefined; - throttled?: boolean | undefined; - complete?: boolean | undefined; - progress?: number | undefined; - size?: number | undefined; - speed?: number | undefined; - error?: boolean | undefined; - duration?: number | undefined; - remaining?: number | undefined; - context?: string | undefined; - sourceVideoCodec?: string | undefined; - sourceAudioCodec?: string | undefined; - videoDecision?: string | undefined; - audioDecision?: string | undefined; - subtitleDecision?: string | undefined; - protocol?: string | undefined; - container?: string | undefined; - videoCodec?: string | undefined; - audioCodec?: string | undefined; - audioChannels?: number | undefined; - transcodeHwRequested?: boolean | undefined; - timeStamp?: number | undefined; - maxOffsetAvailable?: number | undefined; - minOffsetAvailable?: number | undefined; + key?: string | undefined; + throttled?: boolean | undefined; + complete?: boolean | undefined; + progress?: number | undefined; + size?: number | undefined; + speed?: number | undefined; + error?: boolean | undefined; + duration?: number | undefined; + remaining?: number | undefined; + context?: string | undefined; + sourceVideoCodec?: string | undefined; + sourceAudioCodec?: string | undefined; + videoDecision?: string | undefined; + audioDecision?: string | undefined; + subtitleDecision?: string | undefined; + protocol?: string | undefined; + container?: string | undefined; + videoCodec?: string | undefined; + audioCodec?: string | undefined; + audioChannels?: number | undefined; + transcodeHwRequested?: boolean | undefined; + timeStamp?: number | undefined; + maxOffsetAvailable?: number | undefined; + minOffsetAvailable?: number | undefined; }; /** @internal */ export const TranscodeSession$outboundSchema: z.ZodType< - TranscodeSession$Outbound, - z.ZodTypeDef, - TranscodeSession + TranscodeSession$Outbound, + z.ZodTypeDef, + TranscodeSession > = z.object({ - key: z.string().optional(), - throttled: z.boolean().optional(), - complete: z.boolean().optional(), - progress: z.number().optional(), - size: z.number().int().optional(), - speed: z.number().optional(), - error: z.boolean().optional(), - duration: z.number().int().optional(), - remaining: z.number().int().optional(), - context: z.string().optional(), - sourceVideoCodec: z.string().optional(), - sourceAudioCodec: z.string().optional(), - videoDecision: z.string().optional(), - audioDecision: z.string().optional(), - subtitleDecision: z.string().optional(), - protocol: z.string().optional(), - container: z.string().optional(), - videoCodec: z.string().optional(), - audioCodec: z.string().optional(), - audioChannels: z.number().int().optional(), - transcodeHwRequested: z.boolean().optional(), - timeStamp: z.number().optional(), - maxOffsetAvailable: z.number().optional(), - minOffsetAvailable: z.number().optional(), + key: z.string().optional(), + throttled: z.boolean().optional(), + complete: z.boolean().optional(), + progress: z.number().optional(), + size: z.number().int().optional(), + speed: z.number().optional(), + error: z.boolean().optional(), + duration: z.number().int().optional(), + remaining: z.number().int().optional(), + context: z.string().optional(), + sourceVideoCodec: z.string().optional(), + sourceAudioCodec: z.string().optional(), + videoDecision: z.string().optional(), + audioDecision: z.string().optional(), + subtitleDecision: z.string().optional(), + protocol: z.string().optional(), + container: z.string().optional(), + videoCodec: z.string().optional(), + audioCodec: z.string().optional(), + audioChannels: z.number().int().optional(), + transcodeHwRequested: z.boolean().optional(), + timeStamp: z.number().optional(), + maxOffsetAvailable: z.number().optional(), + minOffsetAvailable: z.number().optional(), }); /** @@ -157,172 +160,168 @@ export const TranscodeSession$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TranscodeSession$ { - /** @deprecated use `TranscodeSession$inboundSchema` instead. */ - export const inboundSchema = TranscodeSession$inboundSchema; - /** @deprecated use `TranscodeSession$outboundSchema` instead. */ - export const outboundSchema = TranscodeSession$outboundSchema; - /** @deprecated use `TranscodeSession$Outbound` instead. */ - export type Outbound = TranscodeSession$Outbound; + /** @deprecated use `TranscodeSession$inboundSchema` instead. */ + export const inboundSchema = TranscodeSession$inboundSchema; + /** @deprecated use `TranscodeSession$outboundSchema` instead. */ + export const outboundSchema = TranscodeSession$outboundSchema; + /** @deprecated use `TranscodeSession$Outbound` instead. */ + export type Outbound = TranscodeSession$Outbound; } /** @internal */ export const GetTranscodeSessionsMediaContainer$inboundSchema: z.ZodType< - GetTranscodeSessionsMediaContainer, - z.ZodTypeDef, - unknown -> = z - .object({ - size: z.number().int().optional(), - TranscodeSession: z.array(z.lazy(() => TranscodeSession$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - TranscodeSession: "transcodeSession", - }); - }); + GetTranscodeSessionsMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + TranscodeSession: z.array(z.lazy(() => TranscodeSession$inboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + "TranscodeSession": "transcodeSession", + }); +}); /** @internal */ export type GetTranscodeSessionsMediaContainer$Outbound = { - size?: number | undefined; - TranscodeSession?: Array | undefined; + size?: number | undefined; + TranscodeSession?: Array | undefined; }; /** @internal */ export const GetTranscodeSessionsMediaContainer$outboundSchema: z.ZodType< - GetTranscodeSessionsMediaContainer$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsMediaContainer -> = z - .object({ - size: z.number().int().optional(), - transcodeSession: z.array(z.lazy(() => TranscodeSession$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - transcodeSession: "TranscodeSession", - }); - }); + GetTranscodeSessionsMediaContainer$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsMediaContainer +> = z.object({ + size: z.number().int().optional(), + transcodeSession: z.array(z.lazy(() => TranscodeSession$outboundSchema)) + .optional(), +}).transform((v) => { + return remap$(v, { + transcodeSession: "TranscodeSession", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTranscodeSessionsMediaContainer$ { - /** @deprecated use `GetTranscodeSessionsMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsMediaContainer$inboundSchema; - /** @deprecated use `GetTranscodeSessionsMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsMediaContainer$outboundSchema; - /** @deprecated use `GetTranscodeSessionsMediaContainer$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsMediaContainer$Outbound; + /** @deprecated use `GetTranscodeSessionsMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsMediaContainer$inboundSchema; + /** @deprecated use `GetTranscodeSessionsMediaContainer$outboundSchema` instead. */ + export const outboundSchema = + GetTranscodeSessionsMediaContainer$outboundSchema; + /** @deprecated use `GetTranscodeSessionsMediaContainer$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsMediaContainer$Outbound; } /** @internal */ export const GetTranscodeSessionsResponseBody$inboundSchema: z.ZodType< - GetTranscodeSessionsResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetTranscodeSessionsMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetTranscodeSessionsResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetTranscodeSessionsMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetTranscodeSessionsResponseBody$Outbound = { - MediaContainer?: GetTranscodeSessionsMediaContainer$Outbound | undefined; + MediaContainer?: GetTranscodeSessionsMediaContainer$Outbound | undefined; }; /** @internal */ export const GetTranscodeSessionsResponseBody$outboundSchema: z.ZodType< - GetTranscodeSessionsResponseBody$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetTranscodeSessionsMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetTranscodeSessionsResponseBody$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsResponseBody +> = z.object({ + mediaContainer: z.lazy(() => + GetTranscodeSessionsMediaContainer$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTranscodeSessionsResponseBody$ { - /** @deprecated use `GetTranscodeSessionsResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsResponseBody$inboundSchema; - /** @deprecated use `GetTranscodeSessionsResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsResponseBody$outboundSchema; - /** @deprecated use `GetTranscodeSessionsResponseBody$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsResponseBody$Outbound; + /** @deprecated use `GetTranscodeSessionsResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsResponseBody$inboundSchema; + /** @deprecated use `GetTranscodeSessionsResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetTranscodeSessionsResponseBody$outboundSchema; + /** @deprecated use `GetTranscodeSessionsResponseBody$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsResponseBody$Outbound; } /** @internal */ export const GetTranscodeSessionsResponse$inboundSchema: z.ZodType< - GetTranscodeSessionsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetTranscodeSessionsResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetTranscodeSessionsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetTranscodeSessionsResponseBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetTranscodeSessionsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetTranscodeSessionsResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetTranscodeSessionsResponseBody$Outbound | undefined; }; /** @internal */ export const GetTranscodeSessionsResponse$outboundSchema: z.ZodType< - GetTranscodeSessionsResponse$Outbound, - z.ZodTypeDef, - GetTranscodeSessionsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetTranscodeSessionsResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetTranscodeSessionsResponse$Outbound, + z.ZodTypeDef, + GetTranscodeSessionsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetTranscodeSessionsResponseBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTranscodeSessionsResponse$ { - /** @deprecated use `GetTranscodeSessionsResponse$inboundSchema` instead. */ - export const inboundSchema = GetTranscodeSessionsResponse$inboundSchema; - /** @deprecated use `GetTranscodeSessionsResponse$outboundSchema` instead. */ - export const outboundSchema = GetTranscodeSessionsResponse$outboundSchema; - /** @deprecated use `GetTranscodeSessionsResponse$Outbound` instead. */ - export type Outbound = GetTranscodeSessionsResponse$Outbound; + /** @deprecated use `GetTranscodeSessionsResponse$inboundSchema` instead. */ + export const inboundSchema = GetTranscodeSessionsResponse$inboundSchema; + /** @deprecated use `GetTranscodeSessionsResponse$outboundSchema` instead. */ + export const outboundSchema = GetTranscodeSessionsResponse$outboundSchema; + /** @deprecated use `GetTranscodeSessionsResponse$Outbound` instead. */ + export type Outbound = GetTranscodeSessionsResponse$Outbound; } diff --git a/src/sdk/models/operations/gettransienttoken.ts b/src/sdk/models/operations/gettransienttoken.ts index 8e00b3f0..6ed3d57c 100644 --- a/src/sdk/models/operations/gettransienttoken.ts +++ b/src/sdk/models/operations/gettransienttoken.ts @@ -2,57 +2,57 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * `delegation` - This is the only supported `type` parameter. */ export enum GetTransientTokenQueryParamType { - Delegation = "delegation", + Delegation = "delegation", } /** * `all` - This is the only supported `scope` parameter. */ export enum Scope { - All = "all", + All = "all", } export type GetTransientTokenRequest = { - /** - * `delegation` - This is the only supported `type` parameter. - */ - type: GetTransientTokenQueryParamType; - /** - * `all` - This is the only supported `scope` parameter. - */ - scope: Scope; + /** + * `delegation` - This is the only supported `type` parameter. + */ + type: GetTransientTokenQueryParamType; + /** + * `all` - This is the only supported `scope` parameter. + */ + scope: Scope; }; export type GetTransientTokenResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const GetTransientTokenQueryParamType$inboundSchema: z.ZodNativeEnum< - typeof GetTransientTokenQueryParamType + typeof GetTransientTokenQueryParamType > = z.nativeEnum(GetTransientTokenQueryParamType); /** @internal */ export const GetTransientTokenQueryParamType$outboundSchema: z.ZodNativeEnum< - typeof GetTransientTokenQueryParamType + typeof GetTransientTokenQueryParamType > = GetTransientTokenQueryParamType$inboundSchema; /** @@ -60,53 +60,56 @@ export const GetTransientTokenQueryParamType$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransientTokenQueryParamType$ { - /** @deprecated use `GetTransientTokenQueryParamType$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenQueryParamType$inboundSchema; - /** @deprecated use `GetTransientTokenQueryParamType$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenQueryParamType$outboundSchema; + /** @deprecated use `GetTransientTokenQueryParamType$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenQueryParamType$inboundSchema; + /** @deprecated use `GetTransientTokenQueryParamType$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenQueryParamType$outboundSchema; } /** @internal */ -export const Scope$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Scope); +export const Scope$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Scope, +); /** @internal */ -export const Scope$outboundSchema: z.ZodNativeEnum = Scope$inboundSchema; +export const Scope$outboundSchema: z.ZodNativeEnum = + Scope$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Scope$ { - /** @deprecated use `Scope$inboundSchema` instead. */ - export const inboundSchema = Scope$inboundSchema; - /** @deprecated use `Scope$outboundSchema` instead. */ - export const outboundSchema = Scope$outboundSchema; + /** @deprecated use `Scope$inboundSchema` instead. */ + export const inboundSchema = Scope$inboundSchema; + /** @deprecated use `Scope$outboundSchema` instead. */ + export const outboundSchema = Scope$outboundSchema; } /** @internal */ export const GetTransientTokenRequest$inboundSchema: z.ZodType< - GetTransientTokenRequest, - z.ZodTypeDef, - unknown + GetTransientTokenRequest, + z.ZodTypeDef, + unknown > = z.object({ - type: GetTransientTokenQueryParamType$inboundSchema, - scope: Scope$inboundSchema, + type: GetTransientTokenQueryParamType$inboundSchema, + scope: Scope$inboundSchema, }); /** @internal */ export type GetTransientTokenRequest$Outbound = { - type: string; - scope: string; + type: string; + scope: string; }; /** @internal */ export const GetTransientTokenRequest$outboundSchema: z.ZodType< - GetTransientTokenRequest$Outbound, - z.ZodTypeDef, - GetTransientTokenRequest + GetTransientTokenRequest$Outbound, + z.ZodTypeDef, + GetTransientTokenRequest > = z.object({ - type: GetTransientTokenQueryParamType$outboundSchema, - scope: Scope$outboundSchema, + type: GetTransientTokenQueryParamType$outboundSchema, + scope: Scope$outboundSchema, }); /** @@ -114,70 +117,66 @@ export const GetTransientTokenRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransientTokenRequest$ { - /** @deprecated use `GetTransientTokenRequest$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenRequest$inboundSchema; - /** @deprecated use `GetTransientTokenRequest$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenRequest$outboundSchema; - /** @deprecated use `GetTransientTokenRequest$Outbound` instead. */ - export type Outbound = GetTransientTokenRequest$Outbound; + /** @deprecated use `GetTransientTokenRequest$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenRequest$inboundSchema; + /** @deprecated use `GetTransientTokenRequest$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenRequest$outboundSchema; + /** @deprecated use `GetTransientTokenRequest$Outbound` instead. */ + export type Outbound = GetTransientTokenRequest$Outbound; } /** @internal */ export const GetTransientTokenResponse$inboundSchema: z.ZodType< - GetTransientTokenResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetTransientTokenResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetTransientTokenResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const GetTransientTokenResponse$outboundSchema: z.ZodType< - GetTransientTokenResponse$Outbound, - z.ZodTypeDef, - GetTransientTokenResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetTransientTokenResponse$Outbound, + z.ZodTypeDef, + GetTransientTokenResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTransientTokenResponse$ { - /** @deprecated use `GetTransientTokenResponse$inboundSchema` instead. */ - export const inboundSchema = GetTransientTokenResponse$inboundSchema; - /** @deprecated use `GetTransientTokenResponse$outboundSchema` instead. */ - export const outboundSchema = GetTransientTokenResponse$outboundSchema; - /** @deprecated use `GetTransientTokenResponse$Outbound` instead. */ - export type Outbound = GetTransientTokenResponse$Outbound; + /** @deprecated use `GetTransientTokenResponse$inboundSchema` instead. */ + export const inboundSchema = GetTransientTokenResponse$inboundSchema; + /** @deprecated use `GetTransientTokenResponse$outboundSchema` instead. */ + export const outboundSchema = GetTransientTokenResponse$outboundSchema; + /** @deprecated use `GetTransientTokenResponse$Outbound` instead. */ + export type Outbound = GetTransientTokenResponse$Outbound; } diff --git a/src/sdk/models/operations/getupdatestatus.ts b/src/sdk/models/operations/getupdatestatus.ts index a6a1f1d9..e121e0a0 100644 --- a/src/sdk/models/operations/getupdatestatus.ts +++ b/src/sdk/models/operations/getupdatestatus.ts @@ -2,81 +2,86 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type Release = { - key?: string | undefined; - version?: string | undefined; - added?: string | undefined; - fixed?: string | undefined; - downloadURL?: string | undefined; - state?: string | undefined; + key?: string | undefined; + version?: string | undefined; + added?: string | undefined; + fixed?: string | undefined; + downloadURL?: string | undefined; + state?: string | undefined; }; export type GetUpdateStatusMediaContainer = { - size?: number | undefined; - canInstall?: boolean | undefined; - checkedAt?: number | undefined; - downloadURL?: string | undefined; - status?: number | undefined; - release?: Array | undefined; + size?: number | undefined; + canInstall?: boolean | undefined; + checkedAt?: number | undefined; + downloadURL?: string | undefined; + status?: number | undefined; + release?: Array | undefined; }; /** * The Server Updates */ export type GetUpdateStatusResponseBody = { - mediaContainer?: GetUpdateStatusMediaContainer | undefined; + mediaContainer?: GetUpdateStatusMediaContainer | undefined; }; export type GetUpdateStatusResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * The Server Updates - */ - object?: GetUpdateStatusResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * The Server Updates + */ + object?: GetUpdateStatusResponseBody | undefined; }; /** @internal */ -export const Release$inboundSchema: z.ZodType = z.object({ +export const Release$inboundSchema: z.ZodType = + z.object({ key: z.string().optional(), version: z.string().optional(), added: z.string().optional(), fixed: z.string().optional(), downloadURL: z.string().optional(), state: z.string().optional(), -}); + }); /** @internal */ export type Release$Outbound = { - key?: string | undefined; - version?: string | undefined; - added?: string | undefined; - fixed?: string | undefined; - downloadURL?: string | undefined; - state?: string | undefined; + key?: string | undefined; + version?: string | undefined; + added?: string | undefined; + fixed?: string | undefined; + downloadURL?: string | undefined; + state?: string | undefined; }; /** @internal */ -export const Release$outboundSchema: z.ZodType = z.object({ - key: z.string().optional(), - version: z.string().optional(), - added: z.string().optional(), - fixed: z.string().optional(), - downloadURL: z.string().optional(), - state: z.string().optional(), +export const Release$outboundSchema: z.ZodType< + Release$Outbound, + z.ZodTypeDef, + Release +> = z.object({ + key: z.string().optional(), + version: z.string().optional(), + added: z.string().optional(), + fixed: z.string().optional(), + downloadURL: z.string().optional(), + state: z.string().optional(), }); /** @@ -84,184 +89,174 @@ export const Release$outboundSchema: z.ZodType = z - .object({ - size: z.number().int().optional(), - canInstall: z.boolean().optional(), - checkedAt: z.number().int().optional(), - downloadURL: z.string().optional(), - status: z.number().int().optional(), - Release: z.array(z.lazy(() => Release$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Release: "release", - }); - }); + GetUpdateStatusMediaContainer, + z.ZodTypeDef, + unknown +> = z.object({ + size: z.number().int().optional(), + canInstall: z.boolean().optional(), + checkedAt: z.number().int().optional(), + downloadURL: z.string().optional(), + status: z.number().int().optional(), + Release: z.array(z.lazy(() => Release$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Release": "release", + }); +}); /** @internal */ export type GetUpdateStatusMediaContainer$Outbound = { - size?: number | undefined; - canInstall?: boolean | undefined; - checkedAt?: number | undefined; - downloadURL?: string | undefined; - status?: number | undefined; - Release?: Array | undefined; + size?: number | undefined; + canInstall?: boolean | undefined; + checkedAt?: number | undefined; + downloadURL?: string | undefined; + status?: number | undefined; + Release?: Array | undefined; }; /** @internal */ export const GetUpdateStatusMediaContainer$outboundSchema: z.ZodType< - GetUpdateStatusMediaContainer$Outbound, - z.ZodTypeDef, - GetUpdateStatusMediaContainer -> = z - .object({ - size: z.number().int().optional(), - canInstall: z.boolean().optional(), - checkedAt: z.number().int().optional(), - downloadURL: z.string().optional(), - status: z.number().int().optional(), - release: z.array(z.lazy(() => Release$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - release: "Release", - }); - }); + GetUpdateStatusMediaContainer$Outbound, + z.ZodTypeDef, + GetUpdateStatusMediaContainer +> = z.object({ + size: z.number().int().optional(), + canInstall: z.boolean().optional(), + checkedAt: z.number().int().optional(), + downloadURL: z.string().optional(), + status: z.number().int().optional(), + release: z.array(z.lazy(() => Release$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + release: "Release", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUpdateStatusMediaContainer$ { - /** @deprecated use `GetUpdateStatusMediaContainer$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusMediaContainer$inboundSchema; - /** @deprecated use `GetUpdateStatusMediaContainer$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusMediaContainer$outboundSchema; - /** @deprecated use `GetUpdateStatusMediaContainer$Outbound` instead. */ - export type Outbound = GetUpdateStatusMediaContainer$Outbound; + /** @deprecated use `GetUpdateStatusMediaContainer$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusMediaContainer$inboundSchema; + /** @deprecated use `GetUpdateStatusMediaContainer$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusMediaContainer$outboundSchema; + /** @deprecated use `GetUpdateStatusMediaContainer$Outbound` instead. */ + export type Outbound = GetUpdateStatusMediaContainer$Outbound; } /** @internal */ export const GetUpdateStatusResponseBody$inboundSchema: z.ZodType< - GetUpdateStatusResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - MediaContainer: z.lazy(() => GetUpdateStatusMediaContainer$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - MediaContainer: "mediaContainer", - }); - }); + GetUpdateStatusResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + MediaContainer: z.lazy(() => GetUpdateStatusMediaContainer$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "MediaContainer": "mediaContainer", + }); +}); /** @internal */ export type GetUpdateStatusResponseBody$Outbound = { - MediaContainer?: GetUpdateStatusMediaContainer$Outbound | undefined; + MediaContainer?: GetUpdateStatusMediaContainer$Outbound | undefined; }; /** @internal */ export const GetUpdateStatusResponseBody$outboundSchema: z.ZodType< - GetUpdateStatusResponseBody$Outbound, - z.ZodTypeDef, - GetUpdateStatusResponseBody -> = z - .object({ - mediaContainer: z.lazy(() => GetUpdateStatusMediaContainer$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - mediaContainer: "MediaContainer", - }); - }); + GetUpdateStatusResponseBody$Outbound, + z.ZodTypeDef, + GetUpdateStatusResponseBody +> = z.object({ + mediaContainer: z.lazy(() => GetUpdateStatusMediaContainer$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + mediaContainer: "MediaContainer", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUpdateStatusResponseBody$ { - /** @deprecated use `GetUpdateStatusResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusResponseBody$inboundSchema; - /** @deprecated use `GetUpdateStatusResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusResponseBody$outboundSchema; - /** @deprecated use `GetUpdateStatusResponseBody$Outbound` instead. */ - export type Outbound = GetUpdateStatusResponseBody$Outbound; + /** @deprecated use `GetUpdateStatusResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusResponseBody$inboundSchema; + /** @deprecated use `GetUpdateStatusResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusResponseBody$outboundSchema; + /** @deprecated use `GetUpdateStatusResponseBody$Outbound` instead. */ + export type Outbound = GetUpdateStatusResponseBody$Outbound; } /** @internal */ export const GetUpdateStatusResponse$inboundSchema: z.ZodType< - GetUpdateStatusResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetUpdateStatusResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetUpdateStatusResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetUpdateStatusResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetUpdateStatusResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetUpdateStatusResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetUpdateStatusResponseBody$Outbound | undefined; }; /** @internal */ export const GetUpdateStatusResponse$outboundSchema: z.ZodType< - GetUpdateStatusResponse$Outbound, - z.ZodTypeDef, - GetUpdateStatusResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetUpdateStatusResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetUpdateStatusResponse$Outbound, + z.ZodTypeDef, + GetUpdateStatusResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetUpdateStatusResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUpdateStatusResponse$ { - /** @deprecated use `GetUpdateStatusResponse$inboundSchema` instead. */ - export const inboundSchema = GetUpdateStatusResponse$inboundSchema; - /** @deprecated use `GetUpdateStatusResponse$outboundSchema` instead. */ - export const outboundSchema = GetUpdateStatusResponse$outboundSchema; - /** @deprecated use `GetUpdateStatusResponse$Outbound` instead. */ - export type Outbound = GetUpdateStatusResponse$Outbound; + /** @deprecated use `GetUpdateStatusResponse$inboundSchema` instead. */ + export const inboundSchema = GetUpdateStatusResponse$inboundSchema; + /** @deprecated use `GetUpdateStatusResponse$outboundSchema` instead. */ + export const outboundSchema = GetUpdateStatusResponse$outboundSchema; + /** @deprecated use `GetUpdateStatusResponse$Outbound` instead. */ + export type Outbound = GetUpdateStatusResponse$Outbound; } diff --git a/src/sdk/models/operations/getuserdetails.ts b/src/sdk/models/operations/getuserdetails.ts deleted file mode 100644 index c79e2092..00000000 --- a/src/sdk/models/operations/getuserdetails.ts +++ /dev/null @@ -1,1155 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import { remap as remap$ } from "../../../lib/primitives.js"; -import * as z from "zod"; - -export const GetUserDetailsServerList = ["https://plex.tv/api/v2/"] as const; - -export type GetUserDetailsRequest = { - /** - * Plex Authentication Token - */ - xPlexToken: string; -}; - -/** - * Your current mailing list status - */ -export enum MailingListStatus { - Active = "active", - Unsubscribed = "unsubscribed", -} - -/** - * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - */ -export enum AutoSelectSubtitle { - Zero = "0", - One = "1", -} - -/** - * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) - */ -export enum DefaultSubtitleAccessibility { - Zero = "0", - One = "1", -} - -/** - * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - */ -export enum DefaultSubtitleForced { - Zero = "0", - One = "1", -} - -export enum WatchedIndicator { - Zero = "0", - One = "1", -} - -export enum MediaReviewsVisibility { - Zero = 0, - One = 1, -} - -export type UserProfile = { - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - autoSelectAudio?: boolean | undefined; - /** - * The preferred audio language for the account - */ - defaultAudioLanguage: string | null; - /** - * The preferred subtitle language for the account - */ - defaultSubtitleLanguage: string | null; - /** - * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - */ - autoSelectSubtitle?: AutoSelectSubtitle | undefined; - /** - * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) - */ - defaultSubtitleAccessibility?: DefaultSubtitleAccessibility | undefined; - /** - * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - */ - defaultSubtitleForced?: DefaultSubtitleForced | undefined; - watchedIndicator?: WatchedIndicator | undefined; - mediaReviewsVisibility?: MediaReviewsVisibility | undefined; -}; - -export enum GetUserDetailsStatus { - Online = "online", - Offline = "offline", -} - -export type Services = { - identifier: string; - endpoint: string; - token: string | null; - secret: string | null; - status: GetUserDetailsStatus; -}; - -export enum Features { - AndroidDolbyVision = "Android - Dolby Vision", - AndroidPiP = "Android - PiP", - CUSunset = "CU Sunset", - HRKEnableEUR = "HRK_enable_EUR", - TREBLEShowFeatures = "TREBLE-show-features", - AdCountdownTimer = "ad-countdown-timer", - AdaptiveBitrate = "adaptive_bitrate", - AmazonLoopDebug = "amazon-loop-debug", - AvodAdAnalysis = "avod-ad-analysis", - AvodNewMedia = "avod-new-media", - BlacklistGetSignin = "blacklist_get_signin", - ClientRadioStations = "client-radio-stations", - CloudflareTurnstileRequired = "cloudflare-turnstile-required", - Collections = "collections", - CommentsAndRepliesPushNotifications = "comments_and_replies_push_notifications", - CommunityAccessPlexTv = "community_access_plex_tv", - CompanionsSonos = "companions_sonos", - CustomHomeRemoval = "custom-home-removal", - DisableHomeUserFriendships = "disable_home_user_friendships", - DisableSharingFriendships = "disable_sharing_friendships", - DrmSupport = "drm_support", - ExcludeRestrictions = "exclude restrictions", - FederatedAuth = "federated-auth", - FriendRequestPushNotifications = "friend_request_push_notifications", - GuidedUpgrade = "guided-upgrade", - Home = "home", - IncreasePasswordComplexity = "increase-password-complexity", - Ios14PrivacyBanner = "ios14-privacy-banner", - IterableNotificationTokens = "iterable-notification-tokens", - KeepPaymentMethod = "keep-payment-method", - KevinBacon = "kevin-bacon", - KoreaConsent = "korea-consent", - LeIsrgRootX1 = "le_isrg_root_x1", - LetsEncrypt = "lets_encrypt", - LightningDvrPivot = "lightning-dvr-pivot", - LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", - Livetv = "livetv", - MetadataSearch = "metadata_search", - NewPlexPassPrices = "new_plex_pass_prices", - NewsProviderSunsetModal = "news-provider-sunset-modal", - PhotosFavorites = "photos-favorites", - PhotosMetadataEdition = "photos-metadata-edition", - PmsHealth = "pms_health", - Radio = "radio", - RateLimitClientToken = "rate-limit-client-token", - ScrobblingServicePlexTv = "scrobbling-service-plex-tv", - SharedServerNotification = "shared_server_notification", - SharedSourceNotification = "shared_source_notification", - SigninWithApple = "signin_with_apple", - SpringServeAdProvider = "spring_serve_ad_provider", - TranscoderCache = "transcoder_cache", - TunerSharing = "tuner-sharing", - TwoFactorAuthentication = "two-factor-authentication", - Unsupportedtuners = "unsupportedtuners", - Upgrade3ds2 = "upgrade-3ds2", - VodSchema = "vod-schema", - VodCloudflare = "vod_cloudflare", - WatchTogetherInvite = "watch-together-invite", - WebServerDashboard = "web_server_dashboard", -} - -/** - * String representation of subscriptionActive - */ -export enum GetUserDetailsAuthenticationStatus { - Inactive = "Inactive", - Active = "Active", -} - -/** - * If the account’s Plex Pass subscription is active - */ -export type Subscription = { - /** - * List of features allowed on your Plex Pass subscription - */ - features?: Array | undefined; - /** - * If the account's Plex Pass subscription is active - */ - active?: boolean | undefined; - /** - * Date the account subscribed to Plex Pass - */ - subscribedAt?: string | null | undefined; - /** - * String representation of subscriptionActive - */ - status?: GetUserDetailsAuthenticationStatus | undefined; - /** - * Payment service used for your Plex Pass subscription - */ - paymentService?: string | null | undefined; - /** - * Name of Plex Pass subscription plan - */ - plan?: string | null | undefined; -}; - -export enum GetUserDetailsFeatures { - AndroidDolbyVision = "Android - Dolby Vision", - AndroidPiP = "Android - PiP", - CUSunset = "CU Sunset", - HRKEnableEUR = "HRK_enable_EUR", - TREBLEShowFeatures = "TREBLE-show-features", - AdCountdownTimer = "ad-countdown-timer", - AdaptiveBitrate = "adaptive_bitrate", - AmazonLoopDebug = "amazon-loop-debug", - AvodAdAnalysis = "avod-ad-analysis", - AvodNewMedia = "avod-new-media", - BlacklistGetSignin = "blacklist_get_signin", - ClientRadioStations = "client-radio-stations", - CloudflareTurnstileRequired = "cloudflare-turnstile-required", - Collections = "collections", - CommentsAndRepliesPushNotifications = "comments_and_replies_push_notifications", - CommunityAccessPlexTv = "community_access_plex_tv", - CompanionsSonos = "companions_sonos", - CustomHomeRemoval = "custom-home-removal", - DisableHomeUserFriendships = "disable_home_user_friendships", - DisableSharingFriendships = "disable_sharing_friendships", - DrmSupport = "drm_support", - ExcludeRestrictions = "exclude restrictions", - FederatedAuth = "federated-auth", - FriendRequestPushNotifications = "friend_request_push_notifications", - GuidedUpgrade = "guided-upgrade", - Home = "home", - IncreasePasswordComplexity = "increase-password-complexity", - Ios14PrivacyBanner = "ios14-privacy-banner", - IterableNotificationTokens = "iterable-notification-tokens", - KeepPaymentMethod = "keep-payment-method", - KevinBacon = "kevin-bacon", - KoreaConsent = "korea-consent", - LeIsrgRootX1 = "le_isrg_root_x1", - LetsEncrypt = "lets_encrypt", - LightningDvrPivot = "lightning-dvr-pivot", - LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", - Livetv = "livetv", - MetadataSearch = "metadata_search", - NewPlexPassPrices = "new_plex_pass_prices", - NewsProviderSunsetModal = "news-provider-sunset-modal", - PhotosFavorites = "photos-favorites", - PhotosMetadataEdition = "photos-metadata-edition", - PmsHealth = "pms_health", - Radio = "radio", - RateLimitClientToken = "rate-limit-client-token", - ScrobblingServicePlexTv = "scrobbling-service-plex-tv", - SharedServerNotification = "shared_server_notification", - SharedSourceNotification = "shared_source_notification", - SigninWithApple = "signin_with_apple", - SpringServeAdProvider = "spring_serve_ad_provider", - TranscoderCache = "transcoder_cache", - TunerSharing = "tuner-sharing", - TwoFactorAuthentication = "two-factor-authentication", - Unsupportedtuners = "unsupportedtuners", - Upgrade3ds2 = "upgrade-3ds2", - VodSchema = "vod-schema", - VodCloudflare = "vod_cloudflare", - WatchTogetherInvite = "watch-together-invite", - WebServerDashboard = "web_server_dashboard", -} - -/** - * String representation of subscriptionActive - */ -export enum GetUserDetailsAuthenticationResponseStatus { - Inactive = "Inactive", - Active = "Active", -} - -export type GetUserDetailsSubscription = { - /** - * List of features allowed on your Plex Pass subscription - */ - features?: Array | undefined; - /** - * If the account's Plex Pass subscription is active - */ - active?: boolean | undefined; - /** - * Date the account subscribed to Plex Pass - */ - subscribedAt?: string | null | undefined; - /** - * String representation of subscriptionActive - */ - status?: GetUserDetailsAuthenticationResponseStatus | undefined; - /** - * Payment service used for your Plex Pass subscription - */ - paymentService?: string | null | undefined; - /** - * Name of Plex Pass subscription plan - */ - plan?: string | null | undefined; -}; - -/** - * Logged in user details - */ -export type GetUserDetailsUserPlexAccount = { - /** - * Unknown - */ - adsConsent: boolean | null; - /** - * Unknown - */ - adsConsentReminderAt: Date | null; - /** - * Unknown - */ - adsConsentSetAt: Date | null; - /** - * Unknown - */ - anonymous?: boolean | null | undefined; - /** - * The account token - */ - authToken: string; - /** - * If the two-factor authentication backup codes have been created - */ - backupCodesCreated?: boolean | undefined; - /** - * If the account has been confirmed - */ - confirmed?: boolean | undefined; - /** - * The account country - */ - country: string; - /** - * The account email address - */ - email: string; - /** - * If login with email only is enabled - */ - emailOnlyAuth?: boolean | undefined; - /** - * If experimental features are enabled - */ - experimentalFeatures?: boolean | undefined; - /** - * Your account full name - */ - friendlyName: string; - /** - * List of devices your allowed to use with this account - */ - entitlements: Array; - /** - * If the account is a Plex Home guest user - */ - guest?: boolean | undefined; - /** - * If the account has a password - */ - hasPassword?: boolean | undefined; - /** - * If the account is a Plex Home user - */ - home?: boolean | undefined; - /** - * If the account is the Plex Home admin - */ - homeAdmin?: boolean | undefined; - /** - * The number of accounts in the Plex Home - */ - homeSize: number; - /** - * The Plex account ID - */ - id: number; - /** - * Unix epoch datetime - */ - joinedAt: number; - /** - * The account locale - */ - locale: string | null; - /** - * If you are subscribed to the Plex newsletter - */ - mailingListActive?: boolean | undefined; - /** - * Your current mailing list status - */ - mailingListStatus: MailingListStatus; - /** - * The maximum number of accounts allowed in the Plex Home - */ - maxHomeSize: number; - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - pin?: string | undefined; - profile: UserProfile; - /** - * If the account has a Plex Home PIN enabled - */ - protected?: boolean | undefined; - /** - * Unix epoch datetime - */ - rememberExpiresAt: number; - /** - * If the account is a Plex Home managed user - */ - restricted?: boolean | undefined; - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - roles?: Array | undefined; - /** - * Unknown - */ - scrobbleTypes: string; - services: Array; - /** - * If the account’s Plex Pass subscription is active - */ - subscription: Subscription; - /** - * Description of the Plex Pass subscription - */ - subscriptionDescription: string | null; - subscriptions: Array; - /** - * URL of the account thumbnail - */ - thumb: string; - /** - * The title of the account (username or friendly name) - */ - title: string; - /** - * If two-factor authentication is enabled - */ - twoFactorEnabled?: boolean | undefined; - /** - * The account username - */ - username: string; - /** - * The account UUID - */ - uuid: string; -}; - -export type GetUserDetailsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Logged in user details - */ - userPlexAccount?: GetUserDetailsUserPlexAccount | undefined; -}; - -/** @internal */ -export const GetUserDetailsRequest$inboundSchema: z.ZodType< - GetUserDetailsRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Token": z.string(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Token": "xPlexToken", - }); - }); - -/** @internal */ -export type GetUserDetailsRequest$Outbound = { - "X-Plex-Token": string; -}; - -/** @internal */ -export const GetUserDetailsRequest$outboundSchema: z.ZodType< - GetUserDetailsRequest$Outbound, - z.ZodTypeDef, - GetUserDetailsRequest -> = z - .object({ - xPlexToken: z.string(), - }) - .transform((v) => { - return remap$(v, { - xPlexToken: "X-Plex-Token", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsRequest$ { - /** @deprecated use `GetUserDetailsRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsRequest$inboundSchema; - /** @deprecated use `GetUserDetailsRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsRequest$outboundSchema; - /** @deprecated use `GetUserDetailsRequest$Outbound` instead. */ - export type Outbound = GetUserDetailsRequest$Outbound; -} - -/** @internal */ -export const MailingListStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MailingListStatus); - -/** @internal */ -export const MailingListStatus$outboundSchema: z.ZodNativeEnum = - MailingListStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MailingListStatus$ { - /** @deprecated use `MailingListStatus$inboundSchema` instead. */ - export const inboundSchema = MailingListStatus$inboundSchema; - /** @deprecated use `MailingListStatus$outboundSchema` instead. */ - export const outboundSchema = MailingListStatus$outboundSchema; -} - -/** @internal */ -export const AutoSelectSubtitle$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(AutoSelectSubtitle); - -/** @internal */ -export const AutoSelectSubtitle$outboundSchema: z.ZodNativeEnum = - AutoSelectSubtitle$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AutoSelectSubtitle$ { - /** @deprecated use `AutoSelectSubtitle$inboundSchema` instead. */ - export const inboundSchema = AutoSelectSubtitle$inboundSchema; - /** @deprecated use `AutoSelectSubtitle$outboundSchema` instead. */ - export const outboundSchema = AutoSelectSubtitle$outboundSchema; -} - -/** @internal */ -export const DefaultSubtitleAccessibility$inboundSchema: z.ZodNativeEnum< - typeof DefaultSubtitleAccessibility -> = z.nativeEnum(DefaultSubtitleAccessibility); - -/** @internal */ -export const DefaultSubtitleAccessibility$outboundSchema: z.ZodNativeEnum< - typeof DefaultSubtitleAccessibility -> = DefaultSubtitleAccessibility$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DefaultSubtitleAccessibility$ { - /** @deprecated use `DefaultSubtitleAccessibility$inboundSchema` instead. */ - export const inboundSchema = DefaultSubtitleAccessibility$inboundSchema; - /** @deprecated use `DefaultSubtitleAccessibility$outboundSchema` instead. */ - export const outboundSchema = DefaultSubtitleAccessibility$outboundSchema; -} - -/** @internal */ -export const DefaultSubtitleForced$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(DefaultSubtitleForced); - -/** @internal */ -export const DefaultSubtitleForced$outboundSchema: z.ZodNativeEnum = - DefaultSubtitleForced$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DefaultSubtitleForced$ { - /** @deprecated use `DefaultSubtitleForced$inboundSchema` instead. */ - export const inboundSchema = DefaultSubtitleForced$inboundSchema; - /** @deprecated use `DefaultSubtitleForced$outboundSchema` instead. */ - export const outboundSchema = DefaultSubtitleForced$outboundSchema; -} - -/** @internal */ -export const WatchedIndicator$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(WatchedIndicator); - -/** @internal */ -export const WatchedIndicator$outboundSchema: z.ZodNativeEnum = - WatchedIndicator$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WatchedIndicator$ { - /** @deprecated use `WatchedIndicator$inboundSchema` instead. */ - export const inboundSchema = WatchedIndicator$inboundSchema; - /** @deprecated use `WatchedIndicator$outboundSchema` instead. */ - export const outboundSchema = WatchedIndicator$outboundSchema; -} - -/** @internal */ -export const MediaReviewsVisibility$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(MediaReviewsVisibility); - -/** @internal */ -export const MediaReviewsVisibility$outboundSchema: z.ZodNativeEnum = - MediaReviewsVisibility$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MediaReviewsVisibility$ { - /** @deprecated use `MediaReviewsVisibility$inboundSchema` instead. */ - export const inboundSchema = MediaReviewsVisibility$inboundSchema; - /** @deprecated use `MediaReviewsVisibility$outboundSchema` instead. */ - export const outboundSchema = MediaReviewsVisibility$outboundSchema; -} - -/** @internal */ -export const UserProfile$inboundSchema: z.ZodType = z.object({ - autoSelectAudio: z.boolean().default(true), - defaultAudioLanguage: z.nullable(z.string()), - defaultSubtitleLanguage: z.nullable(z.string()), - autoSelectSubtitle: AutoSelectSubtitle$inboundSchema.optional(), - defaultSubtitleAccessibility: DefaultSubtitleAccessibility$inboundSchema.optional(), - defaultSubtitleForced: DefaultSubtitleForced$inboundSchema.optional(), - watchedIndicator: WatchedIndicator$inboundSchema.optional(), - mediaReviewsVisibility: MediaReviewsVisibility$inboundSchema.optional(), -}); - -/** @internal */ -export type UserProfile$Outbound = { - autoSelectAudio: boolean; - defaultAudioLanguage: string | null; - defaultSubtitleLanguage: string | null; - autoSelectSubtitle?: string | undefined; - defaultSubtitleAccessibility?: string | undefined; - defaultSubtitleForced?: string | undefined; - watchedIndicator?: string | undefined; - mediaReviewsVisibility?: number | undefined; -}; - -/** @internal */ -export const UserProfile$outboundSchema: z.ZodType< - UserProfile$Outbound, - z.ZodTypeDef, - UserProfile -> = z.object({ - autoSelectAudio: z.boolean().default(true), - defaultAudioLanguage: z.nullable(z.string()), - defaultSubtitleLanguage: z.nullable(z.string()), - autoSelectSubtitle: AutoSelectSubtitle$outboundSchema.optional(), - defaultSubtitleAccessibility: DefaultSubtitleAccessibility$outboundSchema.optional(), - defaultSubtitleForced: DefaultSubtitleForced$outboundSchema.optional(), - watchedIndicator: WatchedIndicator$outboundSchema.optional(), - mediaReviewsVisibility: MediaReviewsVisibility$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserProfile$ { - /** @deprecated use `UserProfile$inboundSchema` instead. */ - export const inboundSchema = UserProfile$inboundSchema; - /** @deprecated use `UserProfile$outboundSchema` instead. */ - export const outboundSchema = UserProfile$outboundSchema; - /** @deprecated use `UserProfile$Outbound` instead. */ - export type Outbound = UserProfile$Outbound; -} - -/** @internal */ -export const GetUserDetailsStatus$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(GetUserDetailsStatus); - -/** @internal */ -export const GetUserDetailsStatus$outboundSchema: z.ZodNativeEnum = - GetUserDetailsStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsStatus$ { - /** @deprecated use `GetUserDetailsStatus$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsStatus$inboundSchema; - /** @deprecated use `GetUserDetailsStatus$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsStatus$outboundSchema; -} - -/** @internal */ -export const Services$inboundSchema: z.ZodType = z.object({ - identifier: z.string(), - endpoint: z.string(), - token: z.nullable(z.string()), - secret: z.nullable(z.string()), - status: GetUserDetailsStatus$inboundSchema, -}); - -/** @internal */ -export type Services$Outbound = { - identifier: string; - endpoint: string; - token: string | null; - secret: string | null; - status: string; -}; - -/** @internal */ -export const Services$outboundSchema: z.ZodType = - z.object({ - identifier: z.string(), - endpoint: z.string(), - token: z.nullable(z.string()), - secret: z.nullable(z.string()), - status: GetUserDetailsStatus$outboundSchema, - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Services$ { - /** @deprecated use `Services$inboundSchema` instead. */ - export const inboundSchema = Services$inboundSchema; - /** @deprecated use `Services$outboundSchema` instead. */ - export const outboundSchema = Services$outboundSchema; - /** @deprecated use `Services$Outbound` instead. */ - export type Outbound = Services$Outbound; -} - -/** @internal */ -export const Features$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Features); - -/** @internal */ -export const Features$outboundSchema: z.ZodNativeEnum = Features$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Features$ { - /** @deprecated use `Features$inboundSchema` instead. */ - export const inboundSchema = Features$inboundSchema; - /** @deprecated use `Features$outboundSchema` instead. */ - export const outboundSchema = Features$outboundSchema; -} - -/** @internal */ -export const GetUserDetailsAuthenticationStatus$inboundSchema: z.ZodNativeEnum< - typeof GetUserDetailsAuthenticationStatus -> = z.nativeEnum(GetUserDetailsAuthenticationStatus); - -/** @internal */ -export const GetUserDetailsAuthenticationStatus$outboundSchema: z.ZodNativeEnum< - typeof GetUserDetailsAuthenticationStatus -> = GetUserDetailsAuthenticationStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsAuthenticationStatus$ { - /** @deprecated use `GetUserDetailsAuthenticationStatus$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsAuthenticationStatus$inboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationStatus$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsAuthenticationStatus$outboundSchema; -} - -/** @internal */ -export const Subscription$inboundSchema: z.ZodType = z.object({ - features: z.array(Features$inboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: GetUserDetailsAuthenticationStatus$inboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), -}); - -/** @internal */ -export type Subscription$Outbound = { - features?: Array | undefined; - active?: boolean | undefined; - subscribedAt?: string | null | undefined; - status?: string | undefined; - paymentService?: string | null | undefined; - plan?: string | null | undefined; -}; - -/** @internal */ -export const Subscription$outboundSchema: z.ZodType< - Subscription$Outbound, - z.ZodTypeDef, - Subscription -> = z.object({ - features: z.array(Features$outboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: GetUserDetailsAuthenticationStatus$outboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Subscription$ { - /** @deprecated use `Subscription$inboundSchema` instead. */ - export const inboundSchema = Subscription$inboundSchema; - /** @deprecated use `Subscription$outboundSchema` instead. */ - export const outboundSchema = Subscription$outboundSchema; - /** @deprecated use `Subscription$Outbound` instead. */ - export type Outbound = Subscription$Outbound; -} - -/** @internal */ -export const GetUserDetailsFeatures$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(GetUserDetailsFeatures); - -/** @internal */ -export const GetUserDetailsFeatures$outboundSchema: z.ZodNativeEnum = - GetUserDetailsFeatures$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsFeatures$ { - /** @deprecated use `GetUserDetailsFeatures$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsFeatures$inboundSchema; - /** @deprecated use `GetUserDetailsFeatures$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsFeatures$outboundSchema; -} - -/** @internal */ -export const GetUserDetailsAuthenticationResponseStatus$inboundSchema: z.ZodNativeEnum< - typeof GetUserDetailsAuthenticationResponseStatus -> = z.nativeEnum(GetUserDetailsAuthenticationResponseStatus); - -/** @internal */ -export const GetUserDetailsAuthenticationResponseStatus$outboundSchema: z.ZodNativeEnum< - typeof GetUserDetailsAuthenticationResponseStatus -> = GetUserDetailsAuthenticationResponseStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsAuthenticationResponseStatus$ { - /** @deprecated use `GetUserDetailsAuthenticationResponseStatus$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsAuthenticationResponseStatus$inboundSchema; - /** @deprecated use `GetUserDetailsAuthenticationResponseStatus$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsAuthenticationResponseStatus$outboundSchema; -} - -/** @internal */ -export const GetUserDetailsSubscription$inboundSchema: z.ZodType< - GetUserDetailsSubscription, - z.ZodTypeDef, - unknown -> = z.object({ - features: z.array(GetUserDetailsFeatures$inboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: GetUserDetailsAuthenticationResponseStatus$inboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), -}); - -/** @internal */ -export type GetUserDetailsSubscription$Outbound = { - features?: Array | undefined; - active?: boolean | undefined; - subscribedAt?: string | null | undefined; - status?: string | undefined; - paymentService?: string | null | undefined; - plan?: string | null | undefined; -}; - -/** @internal */ -export const GetUserDetailsSubscription$outboundSchema: z.ZodType< - GetUserDetailsSubscription$Outbound, - z.ZodTypeDef, - GetUserDetailsSubscription -> = z.object({ - features: z.array(GetUserDetailsFeatures$outboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: GetUserDetailsAuthenticationResponseStatus$outboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsSubscription$ { - /** @deprecated use `GetUserDetailsSubscription$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsSubscription$inboundSchema; - /** @deprecated use `GetUserDetailsSubscription$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsSubscription$outboundSchema; - /** @deprecated use `GetUserDetailsSubscription$Outbound` instead. */ - export type Outbound = GetUserDetailsSubscription$Outbound; -} - -/** @internal */ -export const GetUserDetailsUserPlexAccount$inboundSchema: z.ZodType< - GetUserDetailsUserPlexAccount, - z.ZodTypeDef, - unknown -> = z.object({ - adsConsent: z.nullable(z.boolean()), - adsConsentReminderAt: z.nullable( - z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - ), - adsConsentSetAt: z.nullable( - z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - ), - anonymous: z.nullable(z.boolean().default(false)), - authToken: z.string(), - backupCodesCreated: z.boolean().default(false), - confirmed: z.boolean().default(false), - country: z.string(), - email: z.string(), - emailOnlyAuth: z.boolean().default(false), - experimentalFeatures: z.boolean().default(false), - friendlyName: z.string(), - entitlements: z.array(z.string()), - guest: z.boolean().default(false), - hasPassword: z.boolean().default(true), - home: z.boolean().default(false), - homeAdmin: z.boolean().default(false), - homeSize: z.number().int(), - id: z.number().int(), - joinedAt: z.number().int(), - locale: z.nullable(z.string()), - mailingListActive: z.boolean().default(false), - mailingListStatus: MailingListStatus$inboundSchema, - maxHomeSize: z.number().int(), - pin: z.string().optional(), - profile: z.lazy(() => UserProfile$inboundSchema), - protected: z.boolean().default(false), - rememberExpiresAt: z.number().int(), - restricted: z.boolean().default(false), - roles: z.array(z.string()).optional(), - scrobbleTypes: z.string(), - services: z.array(z.lazy(() => Services$inboundSchema)), - subscription: z.lazy(() => Subscription$inboundSchema), - subscriptionDescription: z.nullable(z.string()), - subscriptions: z.array(z.lazy(() => GetUserDetailsSubscription$inboundSchema)), - thumb: z.string(), - title: z.string(), - twoFactorEnabled: z.boolean().default(false), - username: z.string(), - uuid: z.string(), -}); - -/** @internal */ -export type GetUserDetailsUserPlexAccount$Outbound = { - adsConsent: boolean | null; - adsConsentReminderAt: string | null; - adsConsentSetAt: string | null; - anonymous: boolean | null; - authToken: string; - backupCodesCreated: boolean; - confirmed: boolean; - country: string; - email: string; - emailOnlyAuth: boolean; - experimentalFeatures: boolean; - friendlyName: string; - entitlements: Array; - guest: boolean; - hasPassword: boolean; - home: boolean; - homeAdmin: boolean; - homeSize: number; - id: number; - joinedAt: number; - locale: string | null; - mailingListActive: boolean; - mailingListStatus: string; - maxHomeSize: number; - pin?: string | undefined; - profile: UserProfile$Outbound; - protected: boolean; - rememberExpiresAt: number; - restricted: boolean; - roles?: Array | undefined; - scrobbleTypes: string; - services: Array; - subscription: Subscription$Outbound; - subscriptionDescription: string | null; - subscriptions: Array; - thumb: string; - title: string; - twoFactorEnabled: boolean; - username: string; - uuid: string; -}; - -/** @internal */ -export const GetUserDetailsUserPlexAccount$outboundSchema: z.ZodType< - GetUserDetailsUserPlexAccount$Outbound, - z.ZodTypeDef, - GetUserDetailsUserPlexAccount -> = z.object({ - adsConsent: z.nullable(z.boolean()), - adsConsentReminderAt: z.nullable(z.date().transform((v) => v.toISOString())), - adsConsentSetAt: z.nullable(z.date().transform((v) => v.toISOString())), - anonymous: z.nullable(z.boolean().default(false)), - authToken: z.string(), - backupCodesCreated: z.boolean().default(false), - confirmed: z.boolean().default(false), - country: z.string(), - email: z.string(), - emailOnlyAuth: z.boolean().default(false), - experimentalFeatures: z.boolean().default(false), - friendlyName: z.string(), - entitlements: z.array(z.string()), - guest: z.boolean().default(false), - hasPassword: z.boolean().default(true), - home: z.boolean().default(false), - homeAdmin: z.boolean().default(false), - homeSize: z.number().int(), - id: z.number().int(), - joinedAt: z.number().int(), - locale: z.nullable(z.string()), - mailingListActive: z.boolean().default(false), - mailingListStatus: MailingListStatus$outboundSchema, - maxHomeSize: z.number().int(), - pin: z.string().optional(), - profile: z.lazy(() => UserProfile$outboundSchema), - protected: z.boolean().default(false), - rememberExpiresAt: z.number().int(), - restricted: z.boolean().default(false), - roles: z.array(z.string()).optional(), - scrobbleTypes: z.string(), - services: z.array(z.lazy(() => Services$outboundSchema)), - subscription: z.lazy(() => Subscription$outboundSchema), - subscriptionDescription: z.nullable(z.string()), - subscriptions: z.array(z.lazy(() => GetUserDetailsSubscription$outboundSchema)), - thumb: z.string(), - title: z.string(), - twoFactorEnabled: z.boolean().default(false), - username: z.string(), - uuid: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsUserPlexAccount$ { - /** @deprecated use `GetUserDetailsUserPlexAccount$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsUserPlexAccount$inboundSchema; - /** @deprecated use `GetUserDetailsUserPlexAccount$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsUserPlexAccount$outboundSchema; - /** @deprecated use `GetUserDetailsUserPlexAccount$Outbound` instead. */ - export type Outbound = GetUserDetailsUserPlexAccount$Outbound; -} - -/** @internal */ -export const GetUserDetailsResponse$inboundSchema: z.ZodType< - GetUserDetailsResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - UserPlexAccount: z.lazy(() => GetUserDetailsUserPlexAccount$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - UserPlexAccount: "userPlexAccount", - }); - }); - -/** @internal */ -export type GetUserDetailsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - UserPlexAccount?: GetUserDetailsUserPlexAccount$Outbound | undefined; -}; - -/** @internal */ -export const GetUserDetailsResponse$outboundSchema: z.ZodType< - GetUserDetailsResponse$Outbound, - z.ZodTypeDef, - GetUserDetailsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - userPlexAccount: z.lazy(() => GetUserDetailsUserPlexAccount$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - userPlexAccount: "UserPlexAccount", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserDetailsResponse$ { - /** @deprecated use `GetUserDetailsResponse$inboundSchema` instead. */ - export const inboundSchema = GetUserDetailsResponse$inboundSchema; - /** @deprecated use `GetUserDetailsResponse$outboundSchema` instead. */ - export const outboundSchema = GetUserDetailsResponse$outboundSchema; - /** @deprecated use `GetUserDetailsResponse$Outbound` instead. */ - export type Outbound = GetUserDetailsResponse$Outbound; -} diff --git a/src/sdk/models/operations/getuserfriends.ts b/src/sdk/models/operations/getuserfriends.ts index 0ae19f64..c0cfe805 100644 --- a/src/sdk/models/operations/getuserfriends.ts +++ b/src/sdk/models/operations/getuserfriends.ts @@ -2,10 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const GetUserFriendsServerList = ["https://plex.tv/api/v2/"] as const; +export const GetUserFriendsServerList = [ + "https://plex.tv/api/v2/", +] as const; export type SharedServers = {}; @@ -15,85 +17,88 @@ export type SharedSources = {}; * Current friend request status */ export enum Status { - Accepted = "accepted", + Accepted = "accepted", } export type Friend = { - /** - * The account email address - */ - email: string; - /** - * The account full name - */ - friendlyName: string | null; - /** - * If the account is a Plex Home user - */ - home: boolean; - /** - * The Plex account ID - */ - id: number; - /** - * If the account is a Plex Home managed user - */ - restricted?: boolean | undefined; - sharedServers: Array; - sharedSources: Array; - /** - * Current friend request status - */ - status: Status; - /** - * URL of the account thumbnail - */ - thumb: string; - /** - * The title of the account (username or friendly name) - */ - title: string; - /** - * The account username - */ - username: string; - /** - * The account Universally Unique Identifier (UUID) - */ - uuid: string; + /** + * The account email address + */ + email: string; + /** + * The account full name + */ + friendlyName: string | null; + /** + * If the account is a Plex Home user + */ + home: boolean; + /** + * The Plex account ID + */ + id: number; + /** + * If the account is a Plex Home managed user + */ + restricted?: boolean | undefined; + sharedServers: Array; + sharedSources: Array; + /** + * Current friend request status + */ + status: Status; + /** + * URL of the account thumbnail + */ + thumb: string; + /** + * The title of the account (username or friendly name) + */ + title: string; + /** + * The account username + */ + username: string; + /** + * The account Universally Unique Identifier (UUID) + */ + uuid: string; }; export type GetUserFriendsResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Friends Data - */ - friends?: Array | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Friends Data + */ + friends?: Array | undefined; }; /** @internal */ -export const SharedServers$inboundSchema: z.ZodType = - z.object({}); +export const SharedServers$inboundSchema: z.ZodType< + SharedServers, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type SharedServers$Outbound = {}; /** @internal */ export const SharedServers$outboundSchema: z.ZodType< - SharedServers$Outbound, - z.ZodTypeDef, - SharedServers + SharedServers$Outbound, + z.ZodTypeDef, + SharedServers > = z.object({}); /** @@ -101,26 +106,29 @@ export const SharedServers$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SharedServers$ { - /** @deprecated use `SharedServers$inboundSchema` instead. */ - export const inboundSchema = SharedServers$inboundSchema; - /** @deprecated use `SharedServers$outboundSchema` instead. */ - export const outboundSchema = SharedServers$outboundSchema; - /** @deprecated use `SharedServers$Outbound` instead. */ - export type Outbound = SharedServers$Outbound; + /** @deprecated use `SharedServers$inboundSchema` instead. */ + export const inboundSchema = SharedServers$inboundSchema; + /** @deprecated use `SharedServers$outboundSchema` instead. */ + export const outboundSchema = SharedServers$outboundSchema; + /** @deprecated use `SharedServers$Outbound` instead. */ + export type Outbound = SharedServers$Outbound; } /** @internal */ -export const SharedSources$inboundSchema: z.ZodType = - z.object({}); +export const SharedSources$inboundSchema: z.ZodType< + SharedSources, + z.ZodTypeDef, + unknown +> = z.object({}); /** @internal */ export type SharedSources$Outbound = {}; /** @internal */ export const SharedSources$outboundSchema: z.ZodType< - SharedSources$Outbound, - z.ZodTypeDef, - SharedSources + SharedSources$Outbound, + z.ZodTypeDef, + SharedSources > = z.object({}); /** @@ -128,33 +136,36 @@ export const SharedSources$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SharedSources$ { - /** @deprecated use `SharedSources$inboundSchema` instead. */ - export const inboundSchema = SharedSources$inboundSchema; - /** @deprecated use `SharedSources$outboundSchema` instead. */ - export const outboundSchema = SharedSources$outboundSchema; - /** @deprecated use `SharedSources$Outbound` instead. */ - export type Outbound = SharedSources$Outbound; + /** @deprecated use `SharedSources$inboundSchema` instead. */ + export const inboundSchema = SharedSources$inboundSchema; + /** @deprecated use `SharedSources$outboundSchema` instead. */ + export const outboundSchema = SharedSources$outboundSchema; + /** @deprecated use `SharedSources$Outbound` instead. */ + export type Outbound = SharedSources$Outbound; } /** @internal */ -export const Status$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Status); +export const Status$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Status); /** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = Status$inboundSchema; +export const Status$outboundSchema: z.ZodNativeEnum = + Status$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; + /** @deprecated use `Status$inboundSchema` instead. */ + export const inboundSchema = Status$inboundSchema; + /** @deprecated use `Status$outboundSchema` instead. */ + export const outboundSchema = Status$outboundSchema; } /** @internal */ -export const Friend$inboundSchema: z.ZodType = z.object({ +export const Friend$inboundSchema: z.ZodType = z + .object({ email: z.string(), friendlyName: z.nullable(z.string()), home: z.boolean(), @@ -167,38 +178,42 @@ export const Friend$inboundSchema: z.ZodType = z. title: z.string(), username: z.string(), uuid: z.string(), -}); + }); /** @internal */ export type Friend$Outbound = { - email: string; - friendlyName: string | null; - home: boolean; - id: number; - restricted: boolean; - sharedServers: Array; - sharedSources: Array; - status: string; - thumb: string; - title: string; - username: string; - uuid: string; + email: string; + friendlyName: string | null; + home: boolean; + id: number; + restricted: boolean; + sharedServers: Array; + sharedSources: Array; + status: string; + thumb: string; + title: string; + username: string; + uuid: string; }; /** @internal */ -export const Friend$outboundSchema: z.ZodType = z.object({ - email: z.string(), - friendlyName: z.nullable(z.string()), - home: z.boolean(), - id: z.number().int(), - restricted: z.boolean().default(false), - sharedServers: z.array(z.lazy(() => SharedServers$outboundSchema)), - sharedSources: z.array(z.lazy(() => SharedSources$outboundSchema)), - status: Status$outboundSchema, - thumb: z.string(), - title: z.string(), - username: z.string(), - uuid: z.string(), +export const Friend$outboundSchema: z.ZodType< + Friend$Outbound, + z.ZodTypeDef, + Friend +> = z.object({ + email: z.string(), + friendlyName: z.nullable(z.string()), + home: z.boolean(), + id: z.number().int(), + restricted: z.boolean().default(false), + sharedServers: z.array(z.lazy(() => SharedServers$outboundSchema)), + sharedSources: z.array(z.lazy(() => SharedSources$outboundSchema)), + status: Status$outboundSchema, + thumb: z.string(), + title: z.string(), + username: z.string(), + uuid: z.string(), }); /** @@ -206,75 +221,71 @@ export const Friend$outboundSchema: z.ZodType = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - Friends: z.array(z.lazy(() => Friend$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - Friends: "friends", - }); - }); + GetUserFriendsResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + Friends: z.array(z.lazy(() => Friend$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "Friends": "friends", + }); +}); /** @internal */ export type GetUserFriendsResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - Friends?: Array | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + Friends?: Array | undefined; }; /** @internal */ export const GetUserFriendsResponse$outboundSchema: z.ZodType< - GetUserFriendsResponse$Outbound, - z.ZodTypeDef, - GetUserFriendsResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - friends: z.array(z.lazy(() => Friend$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - friends: "Friends", - }); - }); + GetUserFriendsResponse$Outbound, + z.ZodTypeDef, + GetUserFriendsResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + friends: z.array(z.lazy(() => Friend$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + friends: "Friends", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserFriendsResponse$ { - /** @deprecated use `GetUserFriendsResponse$inboundSchema` instead. */ - export const inboundSchema = GetUserFriendsResponse$inboundSchema; - /** @deprecated use `GetUserFriendsResponse$outboundSchema` instead. */ - export const outboundSchema = GetUserFriendsResponse$outboundSchema; - /** @deprecated use `GetUserFriendsResponse$Outbound` instead. */ - export type Outbound = GetUserFriendsResponse$Outbound; + /** @deprecated use `GetUserFriendsResponse$inboundSchema` instead. */ + export const inboundSchema = GetUserFriendsResponse$inboundSchema; + /** @deprecated use `GetUserFriendsResponse$outboundSchema` instead. */ + export const outboundSchema = GetUserFriendsResponse$outboundSchema; + /** @deprecated use `GetUserFriendsResponse$Outbound` instead. */ + export type Outbound = GetUserFriendsResponse$Outbound; } diff --git a/src/sdk/models/operations/getwatchlist.ts b/src/sdk/models/operations/getwatchlist.ts index f65ad6a8..8fa3c2d9 100644 --- a/src/sdk/models/operations/getwatchlist.ts +++ b/src/sdk/models/operations/getwatchlist.ts @@ -2,369 +2,368 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { RFCDate } from "../../types/rfcdate.js"; -import * as z from "zod"; export const GetWatchListServerList = [ - /** - * The plex metadata provider server - */ - "https://metadata.provider.plex.tv", + /** + * The plex metadata provider server + */ + "https://metadata.provider.plex.tv", ] as const; /** * Filter */ export enum Filter { - All = "all", - Available = "available", - Released = "released", + All = "all", + Available = "available", + Released = "released", } /** * The type of library to filter. Can be "movie" or "show", or all if not present. * * @remarks - * */ export enum Libtype { - Movie = "movie", - Show = "show", + Movie = "movie", + Show = "show", } /** * include collections in the results * * @remarks - * */ export enum IncludeCollections { - One = 1, - Zero = 0, + One = 1, + Zero = 0, } /** * include external media in the results * * @remarks - * */ export enum IncludeExternalMedia { - One = 1, - Zero = 0, + One = 1, + Zero = 0, } export type GetWatchListRequest = { - /** - * Filter - */ - filter: Filter; - /** - * In the format "field:dir". Available fields are "watchlistedAt" (Added At), - * - * @remarks - * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). - * "dir" can be "asc" or "desc" - * - */ - sort?: string | undefined; - /** - * The type of library to filter. Can be "movie" or "show", or all if not present. - * - * @remarks - * - */ - libtype?: Libtype | undefined; - /** - * The number of items to return. If not specified, all items will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * - */ - maxresults?: number | undefined; - /** - * include collections in the results - * - * @remarks - * - */ - includeCollections?: IncludeCollections | undefined; - /** - * include external media in the results - * - * @remarks - * - */ - includeExternalMedia?: IncludeExternalMedia | undefined; - /** - * The index of the first item to return. If not specified, the first item will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 0 - * - */ - xPlexContainerStart?: number | undefined; - /** - * The number of items to return. If not specified, all items will be returned. - * - * @remarks - * If the number of items exceeds the limit, the response will be paginated. - * By default this is 50 - * - */ - xPlexContainerSize?: number | undefined; - /** - * Plex Authentication Token - */ - xPlexToken: string; + /** + * Filter + */ + filter: Filter; + /** + * In the format "field:dir". Available fields are "watchlistedAt" (Added At), + * + * @remarks + * "titleSort" (Title), "originallyAvailableAt" (Release Date), or "rating" (Critic Rating). + * "dir" can be "asc" or "desc" + */ + sort?: string | undefined; + /** + * The type of library to filter. Can be "movie" or "show", or all if not present. + * + * @remarks + */ + libtype?: Libtype | undefined; + /** + * The number of items to return. If not specified, all items will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + */ + maxresults?: number | undefined; + /** + * include collections in the results + * + * @remarks + */ + includeCollections?: IncludeCollections | undefined; + /** + * include external media in the results + * + * @remarks + */ + includeExternalMedia?: IncludeExternalMedia | undefined; + /** + * The index of the first item to return. If not specified, the first item will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 0 + */ + xPlexContainerStart?: number | undefined; + /** + * The number of items to return. If not specified, all items will be returned. + * + * @remarks + * If the number of items exceeds the limit, the response will be paginated. + * By default this is 50 + */ + xPlexContainerSize?: number | undefined; + /** + * Plex Authentication Token + */ + xPlexToken: string; }; export type Image = { - alt?: string | undefined; - type?: string | undefined; - url?: string | undefined; + alt?: string | undefined; + type?: string | undefined; + url?: string | undefined; }; export type Metadata = { - art?: string | undefined; - guid?: string | undefined; - key?: string | undefined; - ratingKey?: string | undefined; - studio?: string | undefined; - tagline?: string | undefined; - type?: string | undefined; - thumb?: string | undefined; - addedAt?: number | undefined; - duration?: number | undefined; - publicPagesURL?: string | undefined; - slug?: string | undefined; - userState?: boolean | undefined; - title?: string | undefined; - contentRating?: string | undefined; - originallyAvailableAt?: RFCDate | undefined; - year?: number | undefined; - image?: Array | undefined; - banner?: string | undefined; - rating?: number | undefined; - expiresAt?: number | undefined; - originalTitle?: string | undefined; - audienceRating?: number | undefined; - audienceRatingImage?: string | undefined; - ratingImage?: string | undefined; - imdbRatingCount?: number | undefined; - subtype?: string | undefined; - theme?: string | undefined; - leafCount?: number | undefined; - childCount?: number | undefined; - isContinuingSeries?: boolean | undefined; - skipChildren?: boolean | undefined; - availabilityId?: string | undefined; - streamingMediaId?: string | undefined; - playableKey?: string | undefined; + art?: string | undefined; + guid?: string | undefined; + key?: string | undefined; + ratingKey?: string | undefined; + studio?: string | undefined; + tagline?: string | undefined; + type?: string | undefined; + thumb?: string | undefined; + addedAt?: number | undefined; + duration?: number | undefined; + publicPagesURL?: string | undefined; + slug?: string | undefined; + userState?: boolean | undefined; + title?: string | undefined; + contentRating?: string | undefined; + originallyAvailableAt?: RFCDate | undefined; + year?: number | undefined; + image?: Array | undefined; + banner?: string | undefined; + rating?: number | undefined; + expiresAt?: number | undefined; + originalTitle?: string | undefined; + audienceRating?: number | undefined; + audienceRatingImage?: string | undefined; + ratingImage?: string | undefined; + imdbRatingCount?: number | undefined; + subtype?: string | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + childCount?: number | undefined; + isContinuingSeries?: boolean | undefined; + skipChildren?: boolean | undefined; + availabilityId?: string | undefined; + streamingMediaId?: string | undefined; + playableKey?: string | undefined; }; /** * Watchlist Data */ export type GetWatchListResponseBody = { - librarySectionID?: string | undefined; - librarySectionTitle?: string | undefined; - offset?: number | undefined; - totalSize?: number | undefined; - identifier?: string | undefined; - size?: number | undefined; - metadata?: Array | undefined; + librarySectionID?: string | undefined; + librarySectionTitle?: string | undefined; + offset?: number | undefined; + totalSize?: number | undefined; + identifier?: string | undefined; + size?: number | undefined; + metadata?: Array | undefined; }; export type GetWatchListResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Watchlist Data - */ - object?: GetWatchListResponseBody | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Watchlist Data + */ + object?: GetWatchListResponseBody | undefined; }; /** @internal */ -export const Filter$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Filter); +export const Filter$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Filter); /** @internal */ -export const Filter$outboundSchema: z.ZodNativeEnum = Filter$inboundSchema; +export const Filter$outboundSchema: z.ZodNativeEnum = + Filter$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Filter$ { - /** @deprecated use `Filter$inboundSchema` instead. */ - export const inboundSchema = Filter$inboundSchema; - /** @deprecated use `Filter$outboundSchema` instead. */ - export const outboundSchema = Filter$outboundSchema; + /** @deprecated use `Filter$inboundSchema` instead. */ + export const inboundSchema = Filter$inboundSchema; + /** @deprecated use `Filter$outboundSchema` instead. */ + export const outboundSchema = Filter$outboundSchema; } /** @internal */ -export const Libtype$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Libtype); +export const Libtype$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(Libtype); /** @internal */ -export const Libtype$outboundSchema: z.ZodNativeEnum = Libtype$inboundSchema; +export const Libtype$outboundSchema: z.ZodNativeEnum = + Libtype$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Libtype$ { - /** @deprecated use `Libtype$inboundSchema` instead. */ - export const inboundSchema = Libtype$inboundSchema; - /** @deprecated use `Libtype$outboundSchema` instead. */ - export const outboundSchema = Libtype$outboundSchema; + /** @deprecated use `Libtype$inboundSchema` instead. */ + export const inboundSchema = Libtype$inboundSchema; + /** @deprecated use `Libtype$outboundSchema` instead. */ + export const outboundSchema = Libtype$outboundSchema; } /** @internal */ -export const IncludeCollections$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeCollections); +export const IncludeCollections$inboundSchema: z.ZodNativeEnum< + typeof IncludeCollections +> = z.nativeEnum(IncludeCollections); /** @internal */ -export const IncludeCollections$outboundSchema: z.ZodNativeEnum = - IncludeCollections$inboundSchema; +export const IncludeCollections$outboundSchema: z.ZodNativeEnum< + typeof IncludeCollections +> = IncludeCollections$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeCollections$ { - /** @deprecated use `IncludeCollections$inboundSchema` instead. */ - export const inboundSchema = IncludeCollections$inboundSchema; - /** @deprecated use `IncludeCollections$outboundSchema` instead. */ - export const outboundSchema = IncludeCollections$outboundSchema; + /** @deprecated use `IncludeCollections$inboundSchema` instead. */ + export const inboundSchema = IncludeCollections$inboundSchema; + /** @deprecated use `IncludeCollections$outboundSchema` instead. */ + export const outboundSchema = IncludeCollections$outboundSchema; } /** @internal */ -export const IncludeExternalMedia$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(IncludeExternalMedia); +export const IncludeExternalMedia$inboundSchema: z.ZodNativeEnum< + typeof IncludeExternalMedia +> = z.nativeEnum(IncludeExternalMedia); /** @internal */ -export const IncludeExternalMedia$outboundSchema: z.ZodNativeEnum = - IncludeExternalMedia$inboundSchema; +export const IncludeExternalMedia$outboundSchema: z.ZodNativeEnum< + typeof IncludeExternalMedia +> = IncludeExternalMedia$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncludeExternalMedia$ { - /** @deprecated use `IncludeExternalMedia$inboundSchema` instead. */ - export const inboundSchema = IncludeExternalMedia$inboundSchema; - /** @deprecated use `IncludeExternalMedia$outboundSchema` instead. */ - export const outboundSchema = IncludeExternalMedia$outboundSchema; + /** @deprecated use `IncludeExternalMedia$inboundSchema` instead. */ + export const inboundSchema = IncludeExternalMedia$inboundSchema; + /** @deprecated use `IncludeExternalMedia$outboundSchema` instead. */ + export const outboundSchema = IncludeExternalMedia$outboundSchema; } /** @internal */ export const GetWatchListRequest$inboundSchema: z.ZodType< - GetWatchListRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - filter: Filter$inboundSchema, - sort: z.string().optional(), - libtype: Libtype$inboundSchema.optional(), - maxresults: z.number().int().optional(), - includeCollections: IncludeCollections$inboundSchema.optional(), - includeExternalMedia: IncludeExternalMedia$inboundSchema.optional(), - "X-Plex-Container-Start": z.number().int().default(0), - "X-Plex-Container-Size": z.number().int().default(50), - "X-Plex-Token": z.string(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Container-Start": "xPlexContainerStart", - "X-Plex-Container-Size": "xPlexContainerSize", - "X-Plex-Token": "xPlexToken", - }); - }); + GetWatchListRequest, + z.ZodTypeDef, + unknown +> = z.object({ + filter: Filter$inboundSchema, + sort: z.string().optional(), + libtype: Libtype$inboundSchema.optional(), + maxresults: z.number().int().optional(), + includeCollections: IncludeCollections$inboundSchema.optional(), + includeExternalMedia: IncludeExternalMedia$inboundSchema.optional(), + "X-Plex-Container-Start": z.number().int().default(0), + "X-Plex-Container-Size": z.number().int().default(50), + "X-Plex-Token": z.string(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Container-Start": "xPlexContainerStart", + "X-Plex-Container-Size": "xPlexContainerSize", + "X-Plex-Token": "xPlexToken", + }); +}); /** @internal */ export type GetWatchListRequest$Outbound = { - filter: string; - sort?: string | undefined; - libtype?: string | undefined; - maxresults?: number | undefined; - includeCollections?: number | undefined; - includeExternalMedia?: number | undefined; - "X-Plex-Container-Start": number; - "X-Plex-Container-Size": number; - "X-Plex-Token": string; + filter: string; + sort?: string | undefined; + libtype?: string | undefined; + maxresults?: number | undefined; + includeCollections?: number | undefined; + includeExternalMedia?: number | undefined; + "X-Plex-Container-Start": number; + "X-Plex-Container-Size": number; + "X-Plex-Token": string; }; /** @internal */ export const GetWatchListRequest$outboundSchema: z.ZodType< - GetWatchListRequest$Outbound, - z.ZodTypeDef, - GetWatchListRequest -> = z - .object({ - filter: Filter$outboundSchema, - sort: z.string().optional(), - libtype: Libtype$outboundSchema.optional(), - maxresults: z.number().int().optional(), - includeCollections: IncludeCollections$outboundSchema.optional(), - includeExternalMedia: IncludeExternalMedia$outboundSchema.optional(), - xPlexContainerStart: z.number().int().default(0), - xPlexContainerSize: z.number().int().default(50), - xPlexToken: z.string(), - }) - .transform((v) => { - return remap$(v, { - xPlexContainerStart: "X-Plex-Container-Start", - xPlexContainerSize: "X-Plex-Container-Size", - xPlexToken: "X-Plex-Token", - }); - }); + GetWatchListRequest$Outbound, + z.ZodTypeDef, + GetWatchListRequest +> = z.object({ + filter: Filter$outboundSchema, + sort: z.string().optional(), + libtype: Libtype$outboundSchema.optional(), + maxresults: z.number().int().optional(), + includeCollections: IncludeCollections$outboundSchema.optional(), + includeExternalMedia: IncludeExternalMedia$outboundSchema.optional(), + xPlexContainerStart: z.number().int().default(0), + xPlexContainerSize: z.number().int().default(50), + xPlexToken: z.string(), +}).transform((v) => { + return remap$(v, { + xPlexContainerStart: "X-Plex-Container-Start", + xPlexContainerSize: "X-Plex-Container-Size", + xPlexToken: "X-Plex-Token", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWatchListRequest$ { - /** @deprecated use `GetWatchListRequest$inboundSchema` instead. */ - export const inboundSchema = GetWatchListRequest$inboundSchema; - /** @deprecated use `GetWatchListRequest$outboundSchema` instead. */ - export const outboundSchema = GetWatchListRequest$outboundSchema; - /** @deprecated use `GetWatchListRequest$Outbound` instead. */ - export type Outbound = GetWatchListRequest$Outbound; + /** @deprecated use `GetWatchListRequest$inboundSchema` instead. */ + export const inboundSchema = GetWatchListRequest$inboundSchema; + /** @deprecated use `GetWatchListRequest$outboundSchema` instead. */ + export const outboundSchema = GetWatchListRequest$outboundSchema; + /** @deprecated use `GetWatchListRequest$Outbound` instead. */ + export type Outbound = GetWatchListRequest$Outbound; } /** @internal */ -export const Image$inboundSchema: z.ZodType = z.object({ +export const Image$inboundSchema: z.ZodType = z + .object({ alt: z.string().optional(), type: z.string().optional(), url: z.string().optional(), -}); + }); /** @internal */ export type Image$Outbound = { - alt?: string | undefined; - type?: string | undefined; - url?: string | undefined; + alt?: string | undefined; + type?: string | undefined; + url?: string | undefined; }; /** @internal */ -export const Image$outboundSchema: z.ZodType = z.object({ - alt: z.string().optional(), - type: z.string().optional(), - url: z.string().optional(), +export const Image$outboundSchema: z.ZodType< + Image$Outbound, + z.ZodTypeDef, + Image +> = z.object({ + alt: z.string().optional(), + type: z.string().optional(), + url: z.string().optional(), }); /** @@ -372,287 +371,278 @@ export const Image$outboundSchema: z.ZodType = z - .object({ - art: z.string().optional(), - guid: z.string().optional(), - key: z.string().optional(), - ratingKey: z.string().optional(), - studio: z.string().optional(), - tagline: z.string().optional(), - type: z.string().optional(), - thumb: z.string().optional(), - addedAt: z.number().int().optional(), - duration: z.number().int().optional(), - publicPagesURL: z.string().optional(), - slug: z.string().optional(), - userState: z.boolean().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - originallyAvailableAt: z - .string() - .transform((v) => new RFCDate(v)) - .optional(), - year: z.number().int().optional(), - Image: z.array(z.lazy(() => Image$inboundSchema)).optional(), - banner: z.string().optional(), - rating: z.number().optional(), - expiresAt: z.number().int().optional(), - originalTitle: z.string().optional(), - audienceRating: z.number().optional(), - audienceRatingImage: z.string().optional(), - ratingImage: z.string().optional(), - imdbRatingCount: z.number().int().optional(), - subtype: z.string().optional(), - theme: z.string().optional(), - leafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - isContinuingSeries: z.boolean().optional(), - skipChildren: z.boolean().optional(), - availabilityId: z.string().optional(), - streamingMediaId: z.string().optional(), - playableKey: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - Image: "image", - }); - }); +export const Metadata$inboundSchema: z.ZodType< + Metadata, + z.ZodTypeDef, + unknown +> = z.object({ + art: z.string().optional(), + guid: z.string().optional(), + key: z.string().optional(), + ratingKey: z.string().optional(), + studio: z.string().optional(), + tagline: z.string().optional(), + type: z.string().optional(), + thumb: z.string().optional(), + addedAt: z.number().int().optional(), + duration: z.number().int().optional(), + publicPagesURL: z.string().optional(), + slug: z.string().optional(), + userState: z.boolean().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + originallyAvailableAt: z.string().transform(v => new RFCDate(v)).optional(), + year: z.number().int().optional(), + Image: z.array(z.lazy(() => Image$inboundSchema)).optional(), + banner: z.string().optional(), + rating: z.number().optional(), + expiresAt: z.number().int().optional(), + originalTitle: z.string().optional(), + audienceRating: z.number().optional(), + audienceRatingImage: z.string().optional(), + ratingImage: z.string().optional(), + imdbRatingCount: z.number().int().optional(), + subtype: z.string().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + isContinuingSeries: z.boolean().optional(), + skipChildren: z.boolean().optional(), + availabilityId: z.string().optional(), + streamingMediaId: z.string().optional(), + playableKey: z.string().optional(), +}).transform((v) => { + return remap$(v, { + "Image": "image", + }); +}); /** @internal */ export type Metadata$Outbound = { - art?: string | undefined; - guid?: string | undefined; - key?: string | undefined; - ratingKey?: string | undefined; - studio?: string | undefined; - tagline?: string | undefined; - type?: string | undefined; - thumb?: string | undefined; - addedAt?: number | undefined; - duration?: number | undefined; - publicPagesURL?: string | undefined; - slug?: string | undefined; - userState?: boolean | undefined; - title?: string | undefined; - contentRating?: string | undefined; - originallyAvailableAt?: string | undefined; - year?: number | undefined; - Image?: Array | undefined; - banner?: string | undefined; - rating?: number | undefined; - expiresAt?: number | undefined; - originalTitle?: string | undefined; - audienceRating?: number | undefined; - audienceRatingImage?: string | undefined; - ratingImage?: string | undefined; - imdbRatingCount?: number | undefined; - subtype?: string | undefined; - theme?: string | undefined; - leafCount?: number | undefined; - childCount?: number | undefined; - isContinuingSeries?: boolean | undefined; - skipChildren?: boolean | undefined; - availabilityId?: string | undefined; - streamingMediaId?: string | undefined; - playableKey?: string | undefined; + art?: string | undefined; + guid?: string | undefined; + key?: string | undefined; + ratingKey?: string | undefined; + studio?: string | undefined; + tagline?: string | undefined; + type?: string | undefined; + thumb?: string | undefined; + addedAt?: number | undefined; + duration?: number | undefined; + publicPagesURL?: string | undefined; + slug?: string | undefined; + userState?: boolean | undefined; + title?: string | undefined; + contentRating?: string | undefined; + originallyAvailableAt?: string | undefined; + year?: number | undefined; + Image?: Array | undefined; + banner?: string | undefined; + rating?: number | undefined; + expiresAt?: number | undefined; + originalTitle?: string | undefined; + audienceRating?: number | undefined; + audienceRatingImage?: string | undefined; + ratingImage?: string | undefined; + imdbRatingCount?: number | undefined; + subtype?: string | undefined; + theme?: string | undefined; + leafCount?: number | undefined; + childCount?: number | undefined; + isContinuingSeries?: boolean | undefined; + skipChildren?: boolean | undefined; + availabilityId?: string | undefined; + streamingMediaId?: string | undefined; + playableKey?: string | undefined; }; /** @internal */ -export const Metadata$outboundSchema: z.ZodType = z - .object({ - art: z.string().optional(), - guid: z.string().optional(), - key: z.string().optional(), - ratingKey: z.string().optional(), - studio: z.string().optional(), - tagline: z.string().optional(), - type: z.string().optional(), - thumb: z.string().optional(), - addedAt: z.number().int().optional(), - duration: z.number().int().optional(), - publicPagesURL: z.string().optional(), - slug: z.string().optional(), - userState: z.boolean().optional(), - title: z.string().optional(), - contentRating: z.string().optional(), - originallyAvailableAt: z - .instanceof(RFCDate) - .transform((v) => v.toString()) - .optional(), - year: z.number().int().optional(), - image: z.array(z.lazy(() => Image$outboundSchema)).optional(), - banner: z.string().optional(), - rating: z.number().optional(), - expiresAt: z.number().int().optional(), - originalTitle: z.string().optional(), - audienceRating: z.number().optional(), - audienceRatingImage: z.string().optional(), - ratingImage: z.string().optional(), - imdbRatingCount: z.number().int().optional(), - subtype: z.string().optional(), - theme: z.string().optional(), - leafCount: z.number().int().optional(), - childCount: z.number().int().optional(), - isContinuingSeries: z.boolean().optional(), - skipChildren: z.boolean().optional(), - availabilityId: z.string().optional(), - streamingMediaId: z.string().optional(), - playableKey: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - image: "Image", - }); - }); +export const Metadata$outboundSchema: z.ZodType< + Metadata$Outbound, + z.ZodTypeDef, + Metadata +> = z.object({ + art: z.string().optional(), + guid: z.string().optional(), + key: z.string().optional(), + ratingKey: z.string().optional(), + studio: z.string().optional(), + tagline: z.string().optional(), + type: z.string().optional(), + thumb: z.string().optional(), + addedAt: z.number().int().optional(), + duration: z.number().int().optional(), + publicPagesURL: z.string().optional(), + slug: z.string().optional(), + userState: z.boolean().optional(), + title: z.string().optional(), + contentRating: z.string().optional(), + originallyAvailableAt: z.instanceof(RFCDate).transform(v => v.toString()) + .optional(), + year: z.number().int().optional(), + image: z.array(z.lazy(() => Image$outboundSchema)).optional(), + banner: z.string().optional(), + rating: z.number().optional(), + expiresAt: z.number().int().optional(), + originalTitle: z.string().optional(), + audienceRating: z.number().optional(), + audienceRatingImage: z.string().optional(), + ratingImage: z.string().optional(), + imdbRatingCount: z.number().int().optional(), + subtype: z.string().optional(), + theme: z.string().optional(), + leafCount: z.number().int().optional(), + childCount: z.number().int().optional(), + isContinuingSeries: z.boolean().optional(), + skipChildren: z.boolean().optional(), + availabilityId: z.string().optional(), + streamingMediaId: z.string().optional(), + playableKey: z.string().optional(), +}).transform((v) => { + return remap$(v, { + image: "Image", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; + /** @deprecated use `Metadata$inboundSchema` instead. */ + export const inboundSchema = Metadata$inboundSchema; + /** @deprecated use `Metadata$outboundSchema` instead. */ + export const outboundSchema = Metadata$outboundSchema; + /** @deprecated use `Metadata$Outbound` instead. */ + export type Outbound = Metadata$Outbound; } /** @internal */ export const GetWatchListResponseBody$inboundSchema: z.ZodType< - GetWatchListResponseBody, - z.ZodTypeDef, - unknown -> = z - .object({ - librarySectionID: z.string().optional(), - librarySectionTitle: z.string().optional(), - offset: z.number().int().optional(), - totalSize: z.number().int().optional(), - identifier: z.string().optional(), - size: z.number().int().optional(), - Metadata: z.array(z.lazy(() => Metadata$inboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - Metadata: "metadata", - }); - }); + GetWatchListResponseBody, + z.ZodTypeDef, + unknown +> = z.object({ + librarySectionID: z.string().optional(), + librarySectionTitle: z.string().optional(), + offset: z.number().int().optional(), + totalSize: z.number().int().optional(), + identifier: z.string().optional(), + size: z.number().int().optional(), + Metadata: z.array(z.lazy(() => Metadata$inboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + "Metadata": "metadata", + }); +}); /** @internal */ export type GetWatchListResponseBody$Outbound = { - librarySectionID?: string | undefined; - librarySectionTitle?: string | undefined; - offset?: number | undefined; - totalSize?: number | undefined; - identifier?: string | undefined; - size?: number | undefined; - Metadata?: Array | undefined; + librarySectionID?: string | undefined; + librarySectionTitle?: string | undefined; + offset?: number | undefined; + totalSize?: number | undefined; + identifier?: string | undefined; + size?: number | undefined; + Metadata?: Array | undefined; }; /** @internal */ export const GetWatchListResponseBody$outboundSchema: z.ZodType< - GetWatchListResponseBody$Outbound, - z.ZodTypeDef, - GetWatchListResponseBody -> = z - .object({ - librarySectionID: z.string().optional(), - librarySectionTitle: z.string().optional(), - offset: z.number().int().optional(), - totalSize: z.number().int().optional(), - identifier: z.string().optional(), - size: z.number().int().optional(), - metadata: z.array(z.lazy(() => Metadata$outboundSchema)).optional(), - }) - .transform((v) => { - return remap$(v, { - metadata: "Metadata", - }); - }); + GetWatchListResponseBody$Outbound, + z.ZodTypeDef, + GetWatchListResponseBody +> = z.object({ + librarySectionID: z.string().optional(), + librarySectionTitle: z.string().optional(), + offset: z.number().int().optional(), + totalSize: z.number().int().optional(), + identifier: z.string().optional(), + size: z.number().int().optional(), + metadata: z.array(z.lazy(() => Metadata$outboundSchema)).optional(), +}).transform((v) => { + return remap$(v, { + metadata: "Metadata", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWatchListResponseBody$ { - /** @deprecated use `GetWatchListResponseBody$inboundSchema` instead. */ - export const inboundSchema = GetWatchListResponseBody$inboundSchema; - /** @deprecated use `GetWatchListResponseBody$outboundSchema` instead. */ - export const outboundSchema = GetWatchListResponseBody$outboundSchema; - /** @deprecated use `GetWatchListResponseBody$Outbound` instead. */ - export type Outbound = GetWatchListResponseBody$Outbound; + /** @deprecated use `GetWatchListResponseBody$inboundSchema` instead. */ + export const inboundSchema = GetWatchListResponseBody$inboundSchema; + /** @deprecated use `GetWatchListResponseBody$outboundSchema` instead. */ + export const outboundSchema = GetWatchListResponseBody$outboundSchema; + /** @deprecated use `GetWatchListResponseBody$Outbound` instead. */ + export type Outbound = GetWatchListResponseBody$Outbound; } /** @internal */ export const GetWatchListResponse$inboundSchema: z.ZodType< - GetWatchListResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - object: z.lazy(() => GetWatchListResponseBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + GetWatchListResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + object: z.lazy(() => GetWatchListResponseBody$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type GetWatchListResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - object?: GetWatchListResponseBody$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + object?: GetWatchListResponseBody$Outbound | undefined; }; /** @internal */ export const GetWatchListResponse$outboundSchema: z.ZodType< - GetWatchListResponse$Outbound, - z.ZodTypeDef, - GetWatchListResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - object: z.lazy(() => GetWatchListResponseBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + GetWatchListResponse$Outbound, + z.ZodTypeDef, + GetWatchListResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + object: z.lazy(() => GetWatchListResponseBody$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetWatchListResponse$ { - /** @deprecated use `GetWatchListResponse$inboundSchema` instead. */ - export const inboundSchema = GetWatchListResponse$inboundSchema; - /** @deprecated use `GetWatchListResponse$outboundSchema` instead. */ - export const outboundSchema = GetWatchListResponse$outboundSchema; - /** @deprecated use `GetWatchListResponse$Outbound` instead. */ - export type Outbound = GetWatchListResponse$Outbound; + /** @deprecated use `GetWatchListResponse$inboundSchema` instead. */ + export const inboundSchema = GetWatchListResponse$inboundSchema; + /** @deprecated use `GetWatchListResponse$outboundSchema` instead. */ + export const outboundSchema = GetWatchListResponse$outboundSchema; + /** @deprecated use `GetWatchListResponse$Outbound` instead. */ + export type Outbound = GetWatchListResponse$Outbound; } diff --git a/src/sdk/models/operations/index.ts b/src/sdk/models/operations/index.ts index f00363c8..21dc2f4b 100644 --- a/src/sdk/models/operations/index.ts +++ b/src/sdk/models/operations/index.ts @@ -53,11 +53,11 @@ export * from "./getstatistics.js"; export * from "./getthumbimage.js"; export * from "./gettimeline.js"; export * from "./gettokenbypinid.js"; +export * from "./gettokendetails.js"; export * from "./gettopwatchedcontent.js"; export * from "./gettranscodesessions.js"; export * from "./gettransienttoken.js"; export * from "./getupdatestatus.js"; -export * from "./getuserdetails.js"; export * from "./getuserfriends.js"; export * from "./getwatchlist.js"; export * from "./logline.js"; diff --git a/src/sdk/models/operations/logline.ts b/src/sdk/models/operations/logline.ts index e7709af6..c84fe09d 100644 --- a/src/sdk/models/operations/logline.ts +++ b/src/sdk/models/operations/logline.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * An integer log level to write to the PMS log with. @@ -14,95 +14,99 @@ import * as z from "zod"; * 2: Info * 3: Debug * 4: Verbose - * */ export enum Level { - Zero = 0, - One = 1, - Two = 2, - Three = 3, - Four = 4, + Zero = 0, + One = 1, + Two = 2, + Three = 3, + Four = 4, } export type LogLineRequest = { - /** - * An integer log level to write to the PMS log with. - * - * @remarks - * 0: Error - * 1: Warning - * 2: Info - * 3: Debug - * 4: Verbose - * - */ - level: Level; - /** - * The text of the message to write to the log. - */ - message: string; - /** - * a string indicating the source of the message. - */ - source: string; + /** + * An integer log level to write to the PMS log with. + * + * @remarks + * 0: Error + * 1: Warning + * 2: Info + * 3: Debug + * 4: Verbose + */ + level: Level; + /** + * The text of the message to write to the log. + */ + message: string; + /** + * a string indicating the source of the message. + */ + source: string; }; export type LogLineResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const Level$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Level); +export const Level$inboundSchema: z.ZodNativeEnum = z.nativeEnum( + Level, +); /** @internal */ -export const Level$outboundSchema: z.ZodNativeEnum = Level$inboundSchema; +export const Level$outboundSchema: z.ZodNativeEnum = + Level$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Level$ { - /** @deprecated use `Level$inboundSchema` instead. */ - export const inboundSchema = Level$inboundSchema; - /** @deprecated use `Level$outboundSchema` instead. */ - export const outboundSchema = Level$outboundSchema; + /** @deprecated use `Level$inboundSchema` instead. */ + export const inboundSchema = Level$inboundSchema; + /** @deprecated use `Level$outboundSchema` instead. */ + export const outboundSchema = Level$outboundSchema; } /** @internal */ -export const LogLineRequest$inboundSchema: z.ZodType = - z.object({ - level: Level$inboundSchema, - message: z.string(), - source: z.string(), - }); +export const LogLineRequest$inboundSchema: z.ZodType< + LogLineRequest, + z.ZodTypeDef, + unknown +> = z.object({ + level: Level$inboundSchema, + message: z.string(), + source: z.string(), +}); /** @internal */ export type LogLineRequest$Outbound = { - level: number; - message: string; - source: string; + level: number; + message: string; + source: string; }; /** @internal */ export const LogLineRequest$outboundSchema: z.ZodType< - LogLineRequest$Outbound, - z.ZodTypeDef, - LogLineRequest + LogLineRequest$Outbound, + z.ZodTypeDef, + LogLineRequest > = z.object({ - level: Level$outboundSchema, - message: z.string(), - source: z.string(), + level: Level$outboundSchema, + message: z.string(), + source: z.string(), }); /** @@ -110,66 +114,66 @@ export const LogLineRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogLineRequest$ { - /** @deprecated use `LogLineRequest$inboundSchema` instead. */ - export const inboundSchema = LogLineRequest$inboundSchema; - /** @deprecated use `LogLineRequest$outboundSchema` instead. */ - export const outboundSchema = LogLineRequest$outboundSchema; - /** @deprecated use `LogLineRequest$Outbound` instead. */ - export type Outbound = LogLineRequest$Outbound; + /** @deprecated use `LogLineRequest$inboundSchema` instead. */ + export const inboundSchema = LogLineRequest$inboundSchema; + /** @deprecated use `LogLineRequest$outboundSchema` instead. */ + export const outboundSchema = LogLineRequest$outboundSchema; + /** @deprecated use `LogLineRequest$Outbound` instead. */ + export type Outbound = LogLineRequest$Outbound; } /** @internal */ -export const LogLineResponse$inboundSchema: z.ZodType = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); +export const LogLineResponse$inboundSchema: z.ZodType< + LogLineResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type LogLineResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const LogLineResponse$outboundSchema: z.ZodType< - LogLineResponse$Outbound, - z.ZodTypeDef, - LogLineResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + LogLineResponse$Outbound, + z.ZodTypeDef, + LogLineResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogLineResponse$ { - /** @deprecated use `LogLineResponse$inboundSchema` instead. */ - export const inboundSchema = LogLineResponse$inboundSchema; - /** @deprecated use `LogLineResponse$outboundSchema` instead. */ - export const outboundSchema = LogLineResponse$outboundSchema; - /** @deprecated use `LogLineResponse$Outbound` instead. */ - export type Outbound = LogLineResponse$Outbound; + /** @deprecated use `LogLineResponse$inboundSchema` instead. */ + export const inboundSchema = LogLineResponse$inboundSchema; + /** @deprecated use `LogLineResponse$outboundSchema` instead. */ + export const outboundSchema = LogLineResponse$outboundSchema; + /** @deprecated use `LogLineResponse$Outbound` instead. */ + export type Outbound = LogLineResponse$Outbound; } diff --git a/src/sdk/models/operations/logmultiline.ts b/src/sdk/models/operations/logmultiline.ts index a98cb3a5..c6c7ba2e 100644 --- a/src/sdk/models/operations/logmultiline.ts +++ b/src/sdk/models/operations/logmultiline.ts @@ -2,80 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type LogMultiLineResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const LogMultiLineResponse$inboundSchema: z.ZodType< - LogMultiLineResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + LogMultiLineResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type LogMultiLineResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const LogMultiLineResponse$outboundSchema: z.ZodType< - LogMultiLineResponse$Outbound, - z.ZodTypeDef, - LogMultiLineResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + LogMultiLineResponse$Outbound, + z.ZodTypeDef, + LogMultiLineResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogMultiLineResponse$ { - /** @deprecated use `LogMultiLineResponse$inboundSchema` instead. */ - export const inboundSchema = LogMultiLineResponse$inboundSchema; - /** @deprecated use `LogMultiLineResponse$outboundSchema` instead. */ - export const outboundSchema = LogMultiLineResponse$outboundSchema; - /** @deprecated use `LogMultiLineResponse$Outbound` instead. */ - export type Outbound = LogMultiLineResponse$Outbound; + /** @deprecated use `LogMultiLineResponse$inboundSchema` instead. */ + export const inboundSchema = LogMultiLineResponse$inboundSchema; + /** @deprecated use `LogMultiLineResponse$outboundSchema` instead. */ + export const outboundSchema = LogMultiLineResponse$outboundSchema; + /** @deprecated use `LogMultiLineResponse$Outbound` instead. */ + export type Outbound = LogMultiLineResponse$Outbound; } diff --git a/src/sdk/models/operations/markplayed.ts b/src/sdk/models/operations/markplayed.ts index b6f151fa..579f14aa 100644 --- a/src/sdk/models/operations/markplayed.ts +++ b/src/sdk/models/operations/markplayed.ts @@ -2,49 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type MarkPlayedRequest = { - /** - * The media key to mark as played - */ - key: number; + /** + * The media key to mark as played + */ + key: number; }; export type MarkPlayedResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const MarkPlayedRequest$inboundSchema: z.ZodType = - z.object({ - key: z.number(), - }); +export const MarkPlayedRequest$inboundSchema: z.ZodType< + MarkPlayedRequest, + z.ZodTypeDef, + unknown +> = z.object({ + key: z.number(), +}); /** @internal */ export type MarkPlayedRequest$Outbound = { - key: number; + key: number; }; /** @internal */ export const MarkPlayedRequest$outboundSchema: z.ZodType< - MarkPlayedRequest$Outbound, - z.ZodTypeDef, - MarkPlayedRequest + MarkPlayedRequest$Outbound, + z.ZodTypeDef, + MarkPlayedRequest > = z.object({ - key: z.number(), + key: z.number(), }); /** @@ -52,70 +55,66 @@ export const MarkPlayedRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkPlayedRequest$ { - /** @deprecated use `MarkPlayedRequest$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedRequest$inboundSchema; - /** @deprecated use `MarkPlayedRequest$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedRequest$outboundSchema; - /** @deprecated use `MarkPlayedRequest$Outbound` instead. */ - export type Outbound = MarkPlayedRequest$Outbound; + /** @deprecated use `MarkPlayedRequest$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedRequest$inboundSchema; + /** @deprecated use `MarkPlayedRequest$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedRequest$outboundSchema; + /** @deprecated use `MarkPlayedRequest$Outbound` instead. */ + export type Outbound = MarkPlayedRequest$Outbound; } /** @internal */ export const MarkPlayedResponse$inboundSchema: z.ZodType< - MarkPlayedResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + MarkPlayedResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type MarkPlayedResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const MarkPlayedResponse$outboundSchema: z.ZodType< - MarkPlayedResponse$Outbound, - z.ZodTypeDef, - MarkPlayedResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + MarkPlayedResponse$Outbound, + z.ZodTypeDef, + MarkPlayedResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkPlayedResponse$ { - /** @deprecated use `MarkPlayedResponse$inboundSchema` instead. */ - export const inboundSchema = MarkPlayedResponse$inboundSchema; - /** @deprecated use `MarkPlayedResponse$outboundSchema` instead. */ - export const outboundSchema = MarkPlayedResponse$outboundSchema; - /** @deprecated use `MarkPlayedResponse$Outbound` instead. */ - export type Outbound = MarkPlayedResponse$Outbound; + /** @deprecated use `MarkPlayedResponse$inboundSchema` instead. */ + export const inboundSchema = MarkPlayedResponse$inboundSchema; + /** @deprecated use `MarkPlayedResponse$outboundSchema` instead. */ + export const outboundSchema = MarkPlayedResponse$outboundSchema; + /** @deprecated use `MarkPlayedResponse$Outbound` instead. */ + export type Outbound = MarkPlayedResponse$Outbound; } diff --git a/src/sdk/models/operations/markunplayed.ts b/src/sdk/models/operations/markunplayed.ts index 38bfc5eb..11ffe354 100644 --- a/src/sdk/models/operations/markunplayed.ts +++ b/src/sdk/models/operations/markunplayed.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type MarkUnplayedRequest = { - /** - * The media key to mark as Unplayed - */ - key: number; + /** + * The media key to mark as Unplayed + */ + key: number; }; export type MarkUnplayedResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const MarkUnplayedRequest$inboundSchema: z.ZodType< - MarkUnplayedRequest, - z.ZodTypeDef, - unknown + MarkUnplayedRequest, + z.ZodTypeDef, + unknown > = z.object({ - key: z.number(), + key: z.number(), }); /** @internal */ export type MarkUnplayedRequest$Outbound = { - key: number; + key: number; }; /** @internal */ export const MarkUnplayedRequest$outboundSchema: z.ZodType< - MarkUnplayedRequest$Outbound, - z.ZodTypeDef, - MarkUnplayedRequest + MarkUnplayedRequest$Outbound, + z.ZodTypeDef, + MarkUnplayedRequest > = z.object({ - key: z.number(), + key: z.number(), }); /** @@ -55,70 +55,66 @@ export const MarkUnplayedRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkUnplayedRequest$ { - /** @deprecated use `MarkUnplayedRequest$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedRequest$inboundSchema; - /** @deprecated use `MarkUnplayedRequest$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedRequest$outboundSchema; - /** @deprecated use `MarkUnplayedRequest$Outbound` instead. */ - export type Outbound = MarkUnplayedRequest$Outbound; + /** @deprecated use `MarkUnplayedRequest$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedRequest$inboundSchema; + /** @deprecated use `MarkUnplayedRequest$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedRequest$outboundSchema; + /** @deprecated use `MarkUnplayedRequest$Outbound` instead. */ + export type Outbound = MarkUnplayedRequest$Outbound; } /** @internal */ export const MarkUnplayedResponse$inboundSchema: z.ZodType< - MarkUnplayedResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + MarkUnplayedResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type MarkUnplayedResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const MarkUnplayedResponse$outboundSchema: z.ZodType< - MarkUnplayedResponse$Outbound, - z.ZodTypeDef, - MarkUnplayedResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + MarkUnplayedResponse$Outbound, + z.ZodTypeDef, + MarkUnplayedResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace MarkUnplayedResponse$ { - /** @deprecated use `MarkUnplayedResponse$inboundSchema` instead. */ - export const inboundSchema = MarkUnplayedResponse$inboundSchema; - /** @deprecated use `MarkUnplayedResponse$outboundSchema` instead. */ - export const outboundSchema = MarkUnplayedResponse$outboundSchema; - /** @deprecated use `MarkUnplayedResponse$Outbound` instead. */ - export type Outbound = MarkUnplayedResponse$Outbound; + /** @deprecated use `MarkUnplayedResponse$inboundSchema` instead. */ + export const inboundSchema = MarkUnplayedResponse$inboundSchema; + /** @deprecated use `MarkUnplayedResponse$outboundSchema` instead. */ + export const outboundSchema = MarkUnplayedResponse$outboundSchema; + /** @deprecated use `MarkUnplayedResponse$Outbound` instead. */ + export type Outbound = MarkUnplayedResponse$Outbound; } diff --git a/src/sdk/models/operations/performsearch.ts b/src/sdk/models/operations/performsearch.ts index 831f3c19..37f4899e 100644 --- a/src/sdk/models/operations/performsearch.ts +++ b/src/sdk/models/operations/performsearch.ts @@ -2,66 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PerformSearchRequest = { - /** - * The query term - */ - query: string; - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - sectionId?: number | undefined; - /** - * The number of items to return per hub - */ - limit?: number | undefined; + /** + * The query term + */ + query: string; + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + sectionId?: number | undefined; + /** + * The number of items to return per hub + */ + limit?: number | undefined; }; export type PerformSearchResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const PerformSearchRequest$inboundSchema: z.ZodType< - PerformSearchRequest, - z.ZodTypeDef, - unknown + PerformSearchRequest, + z.ZodTypeDef, + unknown > = z.object({ - query: z.string(), - sectionId: z.number().optional(), - limit: z.number().default(3), + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().default(3), }); /** @internal */ export type PerformSearchRequest$Outbound = { - query: string; - sectionId?: number | undefined; - limit: number; + query: string; + sectionId?: number | undefined; + limit: number; }; /** @internal */ export const PerformSearchRequest$outboundSchema: z.ZodType< - PerformSearchRequest$Outbound, - z.ZodTypeDef, - PerformSearchRequest + PerformSearchRequest$Outbound, + z.ZodTypeDef, + PerformSearchRequest > = z.object({ - query: z.string(), - sectionId: z.number().optional(), - limit: z.number().default(3), + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().default(3), }); /** @@ -69,70 +69,66 @@ export const PerformSearchRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformSearchRequest$ { - /** @deprecated use `PerformSearchRequest$inboundSchema` instead. */ - export const inboundSchema = PerformSearchRequest$inboundSchema; - /** @deprecated use `PerformSearchRequest$outboundSchema` instead. */ - export const outboundSchema = PerformSearchRequest$outboundSchema; - /** @deprecated use `PerformSearchRequest$Outbound` instead. */ - export type Outbound = PerformSearchRequest$Outbound; + /** @deprecated use `PerformSearchRequest$inboundSchema` instead. */ + export const inboundSchema = PerformSearchRequest$inboundSchema; + /** @deprecated use `PerformSearchRequest$outboundSchema` instead. */ + export const outboundSchema = PerformSearchRequest$outboundSchema; + /** @deprecated use `PerformSearchRequest$Outbound` instead. */ + export type Outbound = PerformSearchRequest$Outbound; } /** @internal */ export const PerformSearchResponse$inboundSchema: z.ZodType< - PerformSearchResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PerformSearchResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PerformSearchResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const PerformSearchResponse$outboundSchema: z.ZodType< - PerformSearchResponse$Outbound, - z.ZodTypeDef, - PerformSearchResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PerformSearchResponse$Outbound, + z.ZodTypeDef, + PerformSearchResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformSearchResponse$ { - /** @deprecated use `PerformSearchResponse$inboundSchema` instead. */ - export const inboundSchema = PerformSearchResponse$inboundSchema; - /** @deprecated use `PerformSearchResponse$outboundSchema` instead. */ - export const outboundSchema = PerformSearchResponse$outboundSchema; - /** @deprecated use `PerformSearchResponse$Outbound` instead. */ - export type Outbound = PerformSearchResponse$Outbound; + /** @deprecated use `PerformSearchResponse$inboundSchema` instead. */ + export const inboundSchema = PerformSearchResponse$inboundSchema; + /** @deprecated use `PerformSearchResponse$outboundSchema` instead. */ + export const outboundSchema = PerformSearchResponse$outboundSchema; + /** @deprecated use `PerformSearchResponse$Outbound` instead. */ + export type Outbound = PerformSearchResponse$Outbound; } diff --git a/src/sdk/models/operations/performvoicesearch.ts b/src/sdk/models/operations/performvoicesearch.ts index fa190f71..745742bc 100644 --- a/src/sdk/models/operations/performvoicesearch.ts +++ b/src/sdk/models/operations/performvoicesearch.ts @@ -2,66 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type PerformVoiceSearchRequest = { - /** - * The query term - */ - query: string; - /** - * This gives context to the search, and can result in re-ordering of search result hubs - */ - sectionId?: number | undefined; - /** - * The number of items to return per hub - */ - limit?: number | undefined; + /** + * The query term + */ + query: string; + /** + * This gives context to the search, and can result in re-ordering of search result hubs + */ + sectionId?: number | undefined; + /** + * The number of items to return per hub + */ + limit?: number | undefined; }; export type PerformVoiceSearchResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const PerformVoiceSearchRequest$inboundSchema: z.ZodType< - PerformVoiceSearchRequest, - z.ZodTypeDef, - unknown + PerformVoiceSearchRequest, + z.ZodTypeDef, + unknown > = z.object({ - query: z.string(), - sectionId: z.number().optional(), - limit: z.number().default(3), + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().default(3), }); /** @internal */ export type PerformVoiceSearchRequest$Outbound = { - query: string; - sectionId?: number | undefined; - limit: number; + query: string; + sectionId?: number | undefined; + limit: number; }; /** @internal */ export const PerformVoiceSearchRequest$outboundSchema: z.ZodType< - PerformVoiceSearchRequest$Outbound, - z.ZodTypeDef, - PerformVoiceSearchRequest + PerformVoiceSearchRequest$Outbound, + z.ZodTypeDef, + PerformVoiceSearchRequest > = z.object({ - query: z.string(), - sectionId: z.number().optional(), - limit: z.number().default(3), + query: z.string(), + sectionId: z.number().optional(), + limit: z.number().default(3), }); /** @@ -69,70 +69,66 @@ export const PerformVoiceSearchRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformVoiceSearchRequest$ { - /** @deprecated use `PerformVoiceSearchRequest$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchRequest$inboundSchema; - /** @deprecated use `PerformVoiceSearchRequest$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchRequest$outboundSchema; - /** @deprecated use `PerformVoiceSearchRequest$Outbound` instead. */ - export type Outbound = PerformVoiceSearchRequest$Outbound; + /** @deprecated use `PerformVoiceSearchRequest$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchRequest$inboundSchema; + /** @deprecated use `PerformVoiceSearchRequest$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchRequest$outboundSchema; + /** @deprecated use `PerformVoiceSearchRequest$Outbound` instead. */ + export type Outbound = PerformVoiceSearchRequest$Outbound; } /** @internal */ export const PerformVoiceSearchResponse$inboundSchema: z.ZodType< - PerformVoiceSearchResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + PerformVoiceSearchResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type PerformVoiceSearchResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const PerformVoiceSearchResponse$outboundSchema: z.ZodType< - PerformVoiceSearchResponse$Outbound, - z.ZodTypeDef, - PerformVoiceSearchResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + PerformVoiceSearchResponse$Outbound, + z.ZodTypeDef, + PerformVoiceSearchResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PerformVoiceSearchResponse$ { - /** @deprecated use `PerformVoiceSearchResponse$inboundSchema` instead. */ - export const inboundSchema = PerformVoiceSearchResponse$inboundSchema; - /** @deprecated use `PerformVoiceSearchResponse$outboundSchema` instead. */ - export const outboundSchema = PerformVoiceSearchResponse$outboundSchema; - /** @deprecated use `PerformVoiceSearchResponse$Outbound` instead. */ - export type Outbound = PerformVoiceSearchResponse$Outbound; + /** @deprecated use `PerformVoiceSearchResponse$inboundSchema` instead. */ + export const inboundSchema = PerformVoiceSearchResponse$inboundSchema; + /** @deprecated use `PerformVoiceSearchResponse$outboundSchema` instead. */ + export const outboundSchema = PerformVoiceSearchResponse$outboundSchema; + /** @deprecated use `PerformVoiceSearchResponse$Outbound` instead. */ + export type Outbound = PerformVoiceSearchResponse$Outbound; } diff --git a/src/sdk/models/operations/postuserssignindata.ts b/src/sdk/models/operations/postuserssignindata.ts index 59ad3655..2fcf2992 100644 --- a/src/sdk/models/operations/postuserssignindata.ts +++ b/src/sdk/models/operations/postuserssignindata.ts @@ -2,357 +2,363 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export const PostUsersSignInDataServerList = ["https://plex.tv/api/v2/"] as const; +export const PostUsersSignInDataServerList = [ + "https://plex.tv/api/v2/", +] as const; export type PostUsersSignInDataGlobals = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; }; /** * Login credentials */ export type PostUsersSignInDataRequestBody = { - login: string; - password: string; - rememberMe?: boolean | undefined; - verificationCode?: string | undefined; + login: string; + password: string; + rememberMe?: boolean | undefined; + verificationCode?: string | undefined; }; export type PostUsersSignInDataRequest = { - /** - * The unique identifier for the client application - * - * @remarks - * This is used to track the client application and its usage - * (UUID, serial number, or other number unique per device) - * - */ - xPlexClientIdentifier?: string | undefined; - /** - * Login credentials - */ - requestBody?: PostUsersSignInDataRequestBody | undefined; + /** + * The unique identifier for the client application + * + * @remarks + * This is used to track the client application and its usage + * (UUID, serial number, or other number unique per device) + */ + xPlexClientIdentifier?: string | undefined; + /** + * Login credentials + */ + requestBody?: PostUsersSignInDataRequestBody | undefined; }; /** * Your current mailing list status */ export enum PostUsersSignInDataMailingListStatus { - Active = "active", - Unsubscribed = "unsubscribed", + Active = "active", + Unsubscribed = "unsubscribed", } /** * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) */ export enum PostUsersSignInDataAutoSelectSubtitle { - Zero = "0", - One = "1", + Zero = "0", + One = "1", } /** * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) */ export enum PostUsersSignInDataDefaultSubtitleAccessibility { - Zero = "0", - One = "1", + Zero = "0", + One = "1", } /** * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) */ export enum PostUsersSignInDataDefaultSubtitleForced { - Zero = "0", - One = "1", + Zero = "0", + One = "1", } export enum PostUsersSignInDataWatchedIndicator { - Zero = "0", - One = "1", + Zero = "0", + One = "1", } export enum PostUsersSignInDataMediaReviewsVisibility { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type PostUsersSignInDataUserProfile = { - /** - * If the account has automatically select audio and subtitle tracks enabled - */ - autoSelectAudio?: boolean | undefined; - /** - * The preferred audio language for the account - */ - defaultAudioLanguage: string | null; - /** - * The preferred subtitle language for the account - */ - defaultSubtitleLanguage: string | null; - /** - * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) - */ - autoSelectSubtitle?: PostUsersSignInDataAutoSelectSubtitle | undefined; - /** - * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) - */ - defaultSubtitleAccessibility?: PostUsersSignInDataDefaultSubtitleAccessibility | undefined; - /** - * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) - */ - defaultSubtitleForced?: PostUsersSignInDataDefaultSubtitleForced | undefined; - watchedIndicator?: PostUsersSignInDataWatchedIndicator | undefined; - mediaReviewsVisibility?: PostUsersSignInDataMediaReviewsVisibility | undefined; + /** + * If the account has automatically select audio and subtitle tracks enabled + */ + autoSelectAudio?: boolean | undefined; + /** + * The preferred audio language for the account + */ + defaultAudioLanguage: string | null; + /** + * The preferred subtitle language for the account + */ + defaultSubtitleLanguage: string | null; + /** + * The auto-select subtitle mode (0 = Manually selected, 1 = Shown with foreign audio, 2 = Always enabled) + */ + autoSelectSubtitle?: PostUsersSignInDataAutoSelectSubtitle | undefined; + /** + * The subtitles for the deaf or hard-of-hearing (SDH) searches mode (0 = Prefer non-SDH subtitles, 1 = Prefer SDH subtitles, 2 = Only show SDH subtitles, 3 = Only shown non-SDH subtitles) + */ + defaultSubtitleAccessibility?: + | PostUsersSignInDataDefaultSubtitleAccessibility + | undefined; + /** + * The forced subtitles searches mode (0 = Prefer non-forced subtitles, 1 = Prefer forced subtitles, 2 = Only show forced subtitles, 3 = Only show non-forced subtitles) + */ + defaultSubtitleForced?: PostUsersSignInDataDefaultSubtitleForced | undefined; + watchedIndicator?: PostUsersSignInDataWatchedIndicator | undefined; + mediaReviewsVisibility?: + | PostUsersSignInDataMediaReviewsVisibility + | undefined; }; export enum PostUsersSignInDataStatus { - Online = "online", - Offline = "offline", + Online = "online", + Offline = "offline", } export type PostUsersSignInDataServices = { - identifier: string; - endpoint: string; - token: string | null; - secret: string | null; - status: PostUsersSignInDataStatus; + identifier: string; + endpoint: string; + token: string | null; + secret: string | null; + status: PostUsersSignInDataStatus; }; export enum PostUsersSignInDataFeatures { - AndroidDolbyVision = "Android - Dolby Vision", - AndroidPiP = "Android - PiP", - CUSunset = "CU Sunset", - HRKEnableEUR = "HRK_enable_EUR", - TREBLEShowFeatures = "TREBLE-show-features", - AdCountdownTimer = "ad-countdown-timer", - AdaptiveBitrate = "adaptive_bitrate", - AmazonLoopDebug = "amazon-loop-debug", - AvodAdAnalysis = "avod-ad-analysis", - AvodNewMedia = "avod-new-media", - BlacklistGetSignin = "blacklist_get_signin", - ClientRadioStations = "client-radio-stations", - CloudflareTurnstileRequired = "cloudflare-turnstile-required", - Collections = "collections", - CommentsAndRepliesPushNotifications = "comments_and_replies_push_notifications", - CommunityAccessPlexTv = "community_access_plex_tv", - CompanionsSonos = "companions_sonos", - CustomHomeRemoval = "custom-home-removal", - DisableHomeUserFriendships = "disable_home_user_friendships", - DisableSharingFriendships = "disable_sharing_friendships", - DrmSupport = "drm_support", - ExcludeRestrictions = "exclude restrictions", - FederatedAuth = "federated-auth", - FriendRequestPushNotifications = "friend_request_push_notifications", - GuidedUpgrade = "guided-upgrade", - Home = "home", - IncreasePasswordComplexity = "increase-password-complexity", - Ios14PrivacyBanner = "ios14-privacy-banner", - IterableNotificationTokens = "iterable-notification-tokens", - KeepPaymentMethod = "keep-payment-method", - KevinBacon = "kevin-bacon", - KoreaConsent = "korea-consent", - LeIsrgRootX1 = "le_isrg_root_x1", - LetsEncrypt = "lets_encrypt", - LightningDvrPivot = "lightning-dvr-pivot", - LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", - Livetv = "livetv", - MetadataSearch = "metadata_search", - NewPlexPassPrices = "new_plex_pass_prices", - NewsProviderSunsetModal = "news-provider-sunset-modal", - PhotosFavorites = "photos-favorites", - PhotosMetadataEdition = "photos-metadata-edition", - PmsHealth = "pms_health", - Radio = "radio", - RateLimitClientToken = "rate-limit-client-token", - ScrobblingServicePlexTv = "scrobbling-service-plex-tv", - SharedServerNotification = "shared_server_notification", - SharedSourceNotification = "shared_source_notification", - SigninWithApple = "signin_with_apple", - SpringServeAdProvider = "spring_serve_ad_provider", - TranscoderCache = "transcoder_cache", - TunerSharing = "tuner-sharing", - TwoFactorAuthentication = "two-factor-authentication", - Unsupportedtuners = "unsupportedtuners", - Upgrade3ds2 = "upgrade-3ds2", - VodSchema = "vod-schema", - VodCloudflare = "vod_cloudflare", - WatchTogetherInvite = "watch-together-invite", - WebServerDashboard = "web_server_dashboard", + AndroidDolbyVision = "Android - Dolby Vision", + AndroidPiP = "Android - PiP", + CUSunset = "CU Sunset", + HRKEnableEUR = "HRK_enable_EUR", + TREBLEShowFeatures = "TREBLE-show-features", + AdCountdownTimer = "ad-countdown-timer", + AdaptiveBitrate = "adaptive_bitrate", + AmazonLoopDebug = "amazon-loop-debug", + AvodAdAnalysis = "avod-ad-analysis", + AvodNewMedia = "avod-new-media", + BlacklistGetSignin = "blacklist_get_signin", + ClientRadioStations = "client-radio-stations", + CloudflareTurnstileRequired = "cloudflare-turnstile-required", + Collections = "collections", + CommentsAndRepliesPushNotifications = + "comments_and_replies_push_notifications", + CommunityAccessPlexTv = "community_access_plex_tv", + CompanionsSonos = "companions_sonos", + CustomHomeRemoval = "custom-home-removal", + DisableHomeUserFriendships = "disable_home_user_friendships", + DisableSharingFriendships = "disable_sharing_friendships", + DrmSupport = "drm_support", + ExcludeRestrictions = "exclude restrictions", + FederatedAuth = "federated-auth", + FriendRequestPushNotifications = "friend_request_push_notifications", + GuidedUpgrade = "guided-upgrade", + Home = "home", + IncreasePasswordComplexity = "increase-password-complexity", + Ios14PrivacyBanner = "ios14-privacy-banner", + IterableNotificationTokens = "iterable-notification-tokens", + KeepPaymentMethod = "keep-payment-method", + KevinBacon = "kevin-bacon", + KoreaConsent = "korea-consent", + LeIsrgRootX1 = "le_isrg_root_x1", + LetsEncrypt = "lets_encrypt", + LightningDvrPivot = "lightning-dvr-pivot", + LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", + Livetv = "livetv", + MetadataSearch = "metadata_search", + NewPlexPassPrices = "new_plex_pass_prices", + NewsProviderSunsetModal = "news-provider-sunset-modal", + PhotosFavorites = "photos-favorites", + PhotosMetadataEdition = "photos-metadata-edition", + PmsHealth = "pms_health", + Radio = "radio", + RateLimitClientToken = "rate-limit-client-token", + ScrobblingServicePlexTv = "scrobbling-service-plex-tv", + SharedServerNotification = "shared_server_notification", + SharedSourceNotification = "shared_source_notification", + SigninWithApple = "signin_with_apple", + SpringServeAdProvider = "spring_serve_ad_provider", + TranscoderCache = "transcoder_cache", + TunerSharing = "tuner-sharing", + TwoFactorAuthentication = "two-factor-authentication", + Unsupportedtuners = "unsupportedtuners", + Upgrade3ds2 = "upgrade-3ds2", + VodSchema = "vod-schema", + VodCloudflare = "vod_cloudflare", + WatchTogetherInvite = "watch-together-invite", + WebServerDashboard = "web_server_dashboard", } /** * String representation of subscriptionActive */ export enum PostUsersSignInDataAuthenticationStatus { - Inactive = "Inactive", - Active = "Active", + Inactive = "Inactive", + Active = "Active", } /** * If the account’s Plex Pass subscription is active */ export type PostUsersSignInDataSubscription = { - /** - * List of features allowed on your Plex Pass subscription - */ - features?: Array | undefined; - /** - * If the account's Plex Pass subscription is active - */ - active?: boolean | undefined; - /** - * Date the account subscribed to Plex Pass - */ - subscribedAt?: string | null | undefined; - /** - * String representation of subscriptionActive - */ - status?: PostUsersSignInDataAuthenticationStatus | undefined; - /** - * Payment service used for your Plex Pass subscription - */ - paymentService?: string | null | undefined; - /** - * Name of Plex Pass subscription plan - */ - plan?: string | null | undefined; + /** + * List of features allowed on your Plex Pass subscription + */ + features?: Array | undefined; + /** + * If the account's Plex Pass subscription is active + */ + active?: boolean | undefined; + /** + * Date the account subscribed to Plex Pass + */ + subscribedAt?: string | null | undefined; + /** + * String representation of subscriptionActive + */ + status?: PostUsersSignInDataAuthenticationStatus | undefined; + /** + * Payment service used for your Plex Pass subscription + */ + paymentService?: string | null | undefined; + /** + * Name of Plex Pass subscription plan + */ + plan?: string | null | undefined; }; export enum PostUsersSignInDataAuthenticationFeatures { - AndroidDolbyVision = "Android - Dolby Vision", - AndroidPiP = "Android - PiP", - CUSunset = "CU Sunset", - HRKEnableEUR = "HRK_enable_EUR", - TREBLEShowFeatures = "TREBLE-show-features", - AdCountdownTimer = "ad-countdown-timer", - AdaptiveBitrate = "adaptive_bitrate", - AmazonLoopDebug = "amazon-loop-debug", - AvodAdAnalysis = "avod-ad-analysis", - AvodNewMedia = "avod-new-media", - BlacklistGetSignin = "blacklist_get_signin", - ClientRadioStations = "client-radio-stations", - CloudflareTurnstileRequired = "cloudflare-turnstile-required", - Collections = "collections", - CommentsAndRepliesPushNotifications = "comments_and_replies_push_notifications", - CommunityAccessPlexTv = "community_access_plex_tv", - CompanionsSonos = "companions_sonos", - CustomHomeRemoval = "custom-home-removal", - DisableHomeUserFriendships = "disable_home_user_friendships", - DisableSharingFriendships = "disable_sharing_friendships", - DrmSupport = "drm_support", - ExcludeRestrictions = "exclude restrictions", - FederatedAuth = "federated-auth", - FriendRequestPushNotifications = "friend_request_push_notifications", - GuidedUpgrade = "guided-upgrade", - Home = "home", - IncreasePasswordComplexity = "increase-password-complexity", - Ios14PrivacyBanner = "ios14-privacy-banner", - IterableNotificationTokens = "iterable-notification-tokens", - KeepPaymentMethod = "keep-payment-method", - KevinBacon = "kevin-bacon", - KoreaConsent = "korea-consent", - LeIsrgRootX1 = "le_isrg_root_x1", - LetsEncrypt = "lets_encrypt", - LightningDvrPivot = "lightning-dvr-pivot", - LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", - Livetv = "livetv", - MetadataSearch = "metadata_search", - NewPlexPassPrices = "new_plex_pass_prices", - NewsProviderSunsetModal = "news-provider-sunset-modal", - PhotosFavorites = "photos-favorites", - PhotosMetadataEdition = "photos-metadata-edition", - PmsHealth = "pms_health", - Radio = "radio", - RateLimitClientToken = "rate-limit-client-token", - ScrobblingServicePlexTv = "scrobbling-service-plex-tv", - SharedServerNotification = "shared_server_notification", - SharedSourceNotification = "shared_source_notification", - SigninWithApple = "signin_with_apple", - SpringServeAdProvider = "spring_serve_ad_provider", - TranscoderCache = "transcoder_cache", - TunerSharing = "tuner-sharing", - TwoFactorAuthentication = "two-factor-authentication", - Unsupportedtuners = "unsupportedtuners", - Upgrade3ds2 = "upgrade-3ds2", - VodSchema = "vod-schema", - VodCloudflare = "vod_cloudflare", - WatchTogetherInvite = "watch-together-invite", - WebServerDashboard = "web_server_dashboard", + AndroidDolbyVision = "Android - Dolby Vision", + AndroidPiP = "Android - PiP", + CUSunset = "CU Sunset", + HRKEnableEUR = "HRK_enable_EUR", + TREBLEShowFeatures = "TREBLE-show-features", + AdCountdownTimer = "ad-countdown-timer", + AdaptiveBitrate = "adaptive_bitrate", + AmazonLoopDebug = "amazon-loop-debug", + AvodAdAnalysis = "avod-ad-analysis", + AvodNewMedia = "avod-new-media", + BlacklistGetSignin = "blacklist_get_signin", + ClientRadioStations = "client-radio-stations", + CloudflareTurnstileRequired = "cloudflare-turnstile-required", + Collections = "collections", + CommentsAndRepliesPushNotifications = + "comments_and_replies_push_notifications", + CommunityAccessPlexTv = "community_access_plex_tv", + CompanionsSonos = "companions_sonos", + CustomHomeRemoval = "custom-home-removal", + DisableHomeUserFriendships = "disable_home_user_friendships", + DisableSharingFriendships = "disable_sharing_friendships", + DrmSupport = "drm_support", + ExcludeRestrictions = "exclude restrictions", + FederatedAuth = "federated-auth", + FriendRequestPushNotifications = "friend_request_push_notifications", + GuidedUpgrade = "guided-upgrade", + Home = "home", + IncreasePasswordComplexity = "increase-password-complexity", + Ios14PrivacyBanner = "ios14-privacy-banner", + IterableNotificationTokens = "iterable-notification-tokens", + KeepPaymentMethod = "keep-payment-method", + KevinBacon = "kevin-bacon", + KoreaConsent = "korea-consent", + LeIsrgRootX1 = "le_isrg_root_x1", + LetsEncrypt = "lets_encrypt", + LightningDvrPivot = "lightning-dvr-pivot", + LiveTvSupportIncompleteSegments = "live-tv-support-incomplete-segments", + Livetv = "livetv", + MetadataSearch = "metadata_search", + NewPlexPassPrices = "new_plex_pass_prices", + NewsProviderSunsetModal = "news-provider-sunset-modal", + PhotosFavorites = "photos-favorites", + PhotosMetadataEdition = "photos-metadata-edition", + PmsHealth = "pms_health", + Radio = "radio", + RateLimitClientToken = "rate-limit-client-token", + ScrobblingServicePlexTv = "scrobbling-service-plex-tv", + SharedServerNotification = "shared_server_notification", + SharedSourceNotification = "shared_source_notification", + SigninWithApple = "signin_with_apple", + SpringServeAdProvider = "spring_serve_ad_provider", + TranscoderCache = "transcoder_cache", + TunerSharing = "tuner-sharing", + TwoFactorAuthentication = "two-factor-authentication", + Unsupportedtuners = "unsupportedtuners", + Upgrade3ds2 = "upgrade-3ds2", + VodSchema = "vod-schema", + VodCloudflare = "vod_cloudflare", + WatchTogetherInvite = "watch-together-invite", + WebServerDashboard = "web_server_dashboard", } /** * String representation of subscriptionActive */ export enum PostUsersSignInDataAuthenticationResponseStatus { - Inactive = "Inactive", - Active = "Active", + Inactive = "Inactive", + Active = "Active", } export type PostUsersSignInDataAuthenticationSubscription = { - /** - * List of features allowed on your Plex Pass subscription - */ - features?: Array | undefined; - /** - * If the account's Plex Pass subscription is active - */ - active?: boolean | undefined; - /** - * Date the account subscribed to Plex Pass - */ - subscribedAt?: string | null | undefined; - /** - * String representation of subscriptionActive - */ - status?: PostUsersSignInDataAuthenticationResponseStatus | undefined; - /** - * Payment service used for your Plex Pass subscription - */ - paymentService?: string | null | undefined; - /** - * Name of Plex Pass subscription plan - */ - plan?: string | null | undefined; + /** + * List of features allowed on your Plex Pass subscription + */ + features?: Array | undefined; + /** + * If the account's Plex Pass subscription is active + */ + active?: boolean | undefined; + /** + * Date the account subscribed to Plex Pass + */ + subscribedAt?: string | null | undefined; + /** + * String representation of subscriptionActive + */ + status?: PostUsersSignInDataAuthenticationResponseStatus | undefined; + /** + * Payment service used for your Plex Pass subscription + */ + paymentService?: string | null | undefined; + /** + * Name of Plex Pass subscription plan + */ + plan?: string | null | undefined; }; export enum PostUsersSignInDataState { - Ended = "ended", + Ended = "ended", } export type InternalPaymentMethod = {}; export type Billing = { - internalPaymentMethod: InternalPaymentMethod; - paymentMethodId: number | null; + internalPaymentMethod: InternalPaymentMethod; + paymentMethodId: number | null; }; export type PastSubscription = { - id: string | null; - mode: string | null; - renewsAt: number | null; - endsAt: number | null; - canceled?: boolean | undefined; - gracePeriod?: boolean | undefined; - onHold?: boolean | undefined; - canReactivate?: boolean | undefined; - canUpgrade?: boolean | undefined; - canDowngrade?: boolean | undefined; - canConvert?: boolean | undefined; - type: string; - transfer: string | null; - state: PostUsersSignInDataState; - billing: Billing; + id: string | null; + mode: string | null; + renewsAt: number | null; + endsAt: number | null; + canceled?: boolean | undefined; + gracePeriod?: boolean | undefined; + onHold?: boolean | undefined; + canReactivate?: boolean | undefined; + canUpgrade?: boolean | undefined; + canDowngrade?: boolean | undefined; + canConvert?: boolean | undefined; + type: string; + transfer: string | null; + state: PostUsersSignInDataState; + billing: Billing; }; export type Trials = {}; @@ -361,260 +367,256 @@ export type Trials = {}; * Returns the user account data with a valid auth token */ export type PostUsersSignInDataUserPlexAccount = { - /** - * Unknown - */ - adsConsent: boolean | null; - /** - * Unknown - */ - adsConsentReminderAt: Date | null; - /** - * Unknown - */ - adsConsentSetAt: Date | null; - /** - * Unknown - */ - anonymous?: boolean | null | undefined; - /** - * The account token - */ - authToken: string; - /** - * If the two-factor authentication backup codes have been created - */ - backupCodesCreated?: boolean | undefined; - /** - * If the account has been confirmed - */ - confirmed?: boolean | undefined; - /** - * The account country - */ - country: string; - /** - * The account email address - */ - email: string; - /** - * If login with email only is enabled - */ - emailOnlyAuth?: boolean | undefined; - /** - * If experimental features are enabled - */ - experimentalFeatures?: boolean | undefined; - /** - * Your account full name - */ - friendlyName: string; - /** - * List of devices your allowed to use with this account - */ - entitlements: Array; - /** - * If the account is a Plex Home guest user - */ - guest?: boolean | undefined; - /** - * If the account has a password - */ - hasPassword?: boolean | undefined; - /** - * If the account is a Plex Home user - */ - home?: boolean | undefined; - /** - * If the account is the Plex Home admin - */ - homeAdmin?: boolean | undefined; - /** - * The number of accounts in the Plex Home - */ - homeSize: number; - /** - * The Plex account ID - */ - id: number; - /** - * Unix epoch datetime - */ - joinedAt: number; - /** - * The account locale - */ - locale: string | null; - /** - * If you are subscribed to the Plex newsletter - */ - mailingListActive?: boolean | undefined; - /** - * Your current mailing list status - */ - mailingListStatus: PostUsersSignInDataMailingListStatus; - /** - * The maximum number of accounts allowed in the Plex Home - */ - maxHomeSize: number; - /** - * [Might be removed] The hashed Plex Home PIN - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - pin?: string | undefined; - profile: PostUsersSignInDataUserProfile; - /** - * If the account has a Plex Home PIN enabled - */ - protected?: boolean | undefined; - /** - * Unix epoch datetime - */ - rememberExpiresAt: number; - /** - * If the account is a Plex Home managed user - */ - restricted?: boolean | undefined; - /** - * [Might be removed] List of account roles. Plexpass membership listed here - */ - roles?: Array | undefined; - /** - * Unknown - */ - scrobbleTypes: string; - services: Array; - /** - * If the account’s Plex Pass subscription is active - */ - subscription: PostUsersSignInDataSubscription; - /** - * Description of the Plex Pass subscription - */ - subscriptionDescription: string | null; - subscriptions: Array; - /** - * URL of the account thumbnail - */ - thumb: string; - /** - * The title of the account (username or friendly name) - */ - title: string; - /** - * If two-factor authentication is enabled - */ - twoFactorEnabled?: boolean | undefined; - /** - * The account username - */ - username: string; - /** - * The account UUID - */ - uuid: string; - pastSubscriptions: Array; - trials: Array; + /** + * Unknown + */ + adsConsent: boolean | null; + /** + * Unknown + */ + adsConsentReminderAt: Date | null; + /** + * Unknown + */ + adsConsentSetAt: Date | null; + /** + * Unknown + */ + anonymous?: boolean | null | undefined; + /** + * The account token + */ + authToken: string; + /** + * If the two-factor authentication backup codes have been created + */ + backupCodesCreated?: boolean | undefined; + /** + * If the account has been confirmed + */ + confirmed?: boolean | undefined; + /** + * The account country + */ + country: string; + /** + * The account email address + */ + email: string; + /** + * If login with email only is enabled + */ + emailOnlyAuth?: boolean | undefined; + /** + * If experimental features are enabled + */ + experimentalFeatures?: boolean | undefined; + /** + * Your account full name + */ + friendlyName: string; + /** + * List of devices your allowed to use with this account + */ + entitlements: Array; + /** + * If the account is a Plex Home guest user + */ + guest?: boolean | undefined; + /** + * If the account has a password + */ + hasPassword?: boolean | undefined; + /** + * If the account is a Plex Home user + */ + home?: boolean | undefined; + /** + * If the account is the Plex Home admin + */ + homeAdmin?: boolean | undefined; + /** + * The number of accounts in the Plex Home + */ + homeSize: number; + /** + * The Plex account ID + */ + id: number; + /** + * Unix epoch datetime + */ + joinedAt: number; + /** + * The account locale + */ + locale: string | null; + /** + * If you are subscribed to the Plex newsletter + */ + mailingListActive?: boolean | undefined; + /** + * Your current mailing list status + */ + mailingListStatus: PostUsersSignInDataMailingListStatus; + /** + * The maximum number of accounts allowed in the Plex Home + */ + maxHomeSize: number; + /** + * [Might be removed] The hashed Plex Home PIN + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + pin?: string | undefined; + profile: PostUsersSignInDataUserProfile; + /** + * If the account has a Plex Home PIN enabled + */ + protected?: boolean | undefined; + /** + * Unix epoch datetime + */ + rememberExpiresAt: number; + /** + * If the account is a Plex Home managed user + */ + restricted?: boolean | undefined; + /** + * [Might be removed] List of account roles. Plexpass membership listed here + */ + roles?: Array | undefined; + /** + * Unknown + */ + scrobbleTypes: string; + services: Array; + /** + * If the account’s Plex Pass subscription is active + */ + subscription: PostUsersSignInDataSubscription; + /** + * Description of the Plex Pass subscription + */ + subscriptionDescription: string | null; + subscriptions: Array; + /** + * URL of the account thumbnail + */ + thumb: string; + /** + * The title of the account (username or friendly name) + */ + title: string; + /** + * If two-factor authentication is enabled + */ + twoFactorEnabled?: boolean | undefined; + /** + * The account username + */ + username: string; + /** + * The account UUID + */ + uuid: string; + pastSubscriptions: Array; + trials: Array; }; export type PostUsersSignInDataResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; - /** - * Returns the user account data with a valid auth token - */ - userPlexAccount?: PostUsersSignInDataUserPlexAccount | undefined; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; + /** + * Returns the user account data with a valid auth token + */ + userPlexAccount?: PostUsersSignInDataUserPlexAccount | undefined; }; /** @internal */ export const PostUsersSignInDataGlobals$inboundSchema: z.ZodType< - PostUsersSignInDataGlobals, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - }); - }); + PostUsersSignInDataGlobals, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + }); +}); /** @internal */ export type PostUsersSignInDataGlobals$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; + "X-Plex-Client-Identifier"?: string | undefined; }; /** @internal */ export const PostUsersSignInDataGlobals$outboundSchema: z.ZodType< - PostUsersSignInDataGlobals$Outbound, - z.ZodTypeDef, - PostUsersSignInDataGlobals -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - }); - }); + PostUsersSignInDataGlobals$Outbound, + z.ZodTypeDef, + PostUsersSignInDataGlobals +> = z.object({ + xPlexClientIdentifier: z.string().optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataGlobals$ { - /** @deprecated use `PostUsersSignInDataGlobals$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataGlobals$inboundSchema; - /** @deprecated use `PostUsersSignInDataGlobals$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataGlobals$outboundSchema; - /** @deprecated use `PostUsersSignInDataGlobals$Outbound` instead. */ - export type Outbound = PostUsersSignInDataGlobals$Outbound; + /** @deprecated use `PostUsersSignInDataGlobals$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataGlobals$inboundSchema; + /** @deprecated use `PostUsersSignInDataGlobals$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataGlobals$outboundSchema; + /** @deprecated use `PostUsersSignInDataGlobals$Outbound` instead. */ + export type Outbound = PostUsersSignInDataGlobals$Outbound; } /** @internal */ export const PostUsersSignInDataRequestBody$inboundSchema: z.ZodType< - PostUsersSignInDataRequestBody, - z.ZodTypeDef, - unknown + PostUsersSignInDataRequestBody, + z.ZodTypeDef, + unknown > = z.object({ - login: z.string(), - password: z.string(), - rememberMe: z.boolean().default(false), - verificationCode: z.string().optional(), + login: z.string(), + password: z.string(), + rememberMe: z.boolean().default(false), + verificationCode: z.string().optional(), }); /** @internal */ export type PostUsersSignInDataRequestBody$Outbound = { - login: string; - password: string; - rememberMe: boolean; - verificationCode?: string | undefined; + login: string; + password: string; + rememberMe: boolean; + verificationCode?: string | undefined; }; /** @internal */ export const PostUsersSignInDataRequestBody$outboundSchema: z.ZodType< - PostUsersSignInDataRequestBody$Outbound, - z.ZodTypeDef, - PostUsersSignInDataRequestBody + PostUsersSignInDataRequestBody$Outbound, + z.ZodTypeDef, + PostUsersSignInDataRequestBody > = z.object({ - login: z.string(), - password: z.string(), - rememberMe: z.boolean().default(false), - verificationCode: z.string().optional(), + login: z.string(), + password: z.string(), + rememberMe: z.boolean().default(false), + verificationCode: z.string().optional(), }); /** @@ -622,237 +624,257 @@ export const PostUsersSignInDataRequestBody$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataRequestBody$ { - /** @deprecated use `PostUsersSignInDataRequestBody$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataRequestBody$inboundSchema; - /** @deprecated use `PostUsersSignInDataRequestBody$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataRequestBody$outboundSchema; - /** @deprecated use `PostUsersSignInDataRequestBody$Outbound` instead. */ - export type Outbound = PostUsersSignInDataRequestBody$Outbound; + /** @deprecated use `PostUsersSignInDataRequestBody$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataRequestBody$inboundSchema; + /** @deprecated use `PostUsersSignInDataRequestBody$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataRequestBody$outboundSchema; + /** @deprecated use `PostUsersSignInDataRequestBody$Outbound` instead. */ + export type Outbound = PostUsersSignInDataRequestBody$Outbound; } /** @internal */ export const PostUsersSignInDataRequest$inboundSchema: z.ZodType< - PostUsersSignInDataRequest, - z.ZodTypeDef, - unknown -> = z - .object({ - "X-Plex-Client-Identifier": z.string().optional(), - RequestBody: z.lazy(() => PostUsersSignInDataRequestBody$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - "X-Plex-Client-Identifier": "xPlexClientIdentifier", - RequestBody: "requestBody", - }); - }); + PostUsersSignInDataRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "X-Plex-Client-Identifier": z.string().optional(), + RequestBody: z.lazy(() => PostUsersSignInDataRequestBody$inboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + "X-Plex-Client-Identifier": "xPlexClientIdentifier", + "RequestBody": "requestBody", + }); +}); /** @internal */ export type PostUsersSignInDataRequest$Outbound = { - "X-Plex-Client-Identifier"?: string | undefined; - RequestBody?: PostUsersSignInDataRequestBody$Outbound | undefined; + "X-Plex-Client-Identifier"?: string | undefined; + RequestBody?: PostUsersSignInDataRequestBody$Outbound | undefined; }; /** @internal */ export const PostUsersSignInDataRequest$outboundSchema: z.ZodType< - PostUsersSignInDataRequest$Outbound, - z.ZodTypeDef, - PostUsersSignInDataRequest -> = z - .object({ - xPlexClientIdentifier: z.string().optional(), - requestBody: z.lazy(() => PostUsersSignInDataRequestBody$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - xPlexClientIdentifier: "X-Plex-Client-Identifier", - requestBody: "RequestBody", - }); - }); + PostUsersSignInDataRequest$Outbound, + z.ZodTypeDef, + PostUsersSignInDataRequest +> = z.object({ + xPlexClientIdentifier: z.string().optional(), + requestBody: z.lazy(() => PostUsersSignInDataRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + xPlexClientIdentifier: "X-Plex-Client-Identifier", + requestBody: "RequestBody", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataRequest$ { - /** @deprecated use `PostUsersSignInDataRequest$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataRequest$inboundSchema; - /** @deprecated use `PostUsersSignInDataRequest$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataRequest$outboundSchema; - /** @deprecated use `PostUsersSignInDataRequest$Outbound` instead. */ - export type Outbound = PostUsersSignInDataRequest$Outbound; + /** @deprecated use `PostUsersSignInDataRequest$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataRequest$inboundSchema; + /** @deprecated use `PostUsersSignInDataRequest$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataRequest$outboundSchema; + /** @deprecated use `PostUsersSignInDataRequest$Outbound` instead. */ + export type Outbound = PostUsersSignInDataRequest$Outbound; } /** @internal */ -export const PostUsersSignInDataMailingListStatus$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataMailingListStatus -> = z.nativeEnum(PostUsersSignInDataMailingListStatus); +export const PostUsersSignInDataMailingListStatus$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + PostUsersSignInDataMailingListStatus, + ); /** @internal */ -export const PostUsersSignInDataMailingListStatus$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataMailingListStatus -> = PostUsersSignInDataMailingListStatus$inboundSchema; +export const PostUsersSignInDataMailingListStatus$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataMailingListStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataMailingListStatus$ { - /** @deprecated use `PostUsersSignInDataMailingListStatus$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataMailingListStatus$inboundSchema; - /** @deprecated use `PostUsersSignInDataMailingListStatus$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataMailingListStatus$outboundSchema; + /** @deprecated use `PostUsersSignInDataMailingListStatus$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataMailingListStatus$inboundSchema; + /** @deprecated use `PostUsersSignInDataMailingListStatus$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataMailingListStatus$outboundSchema; } /** @internal */ -export const PostUsersSignInDataAutoSelectSubtitle$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAutoSelectSubtitle -> = z.nativeEnum(PostUsersSignInDataAutoSelectSubtitle); +export const PostUsersSignInDataAutoSelectSubtitle$inboundSchema: + z.ZodNativeEnum = z.nativeEnum( + PostUsersSignInDataAutoSelectSubtitle, + ); /** @internal */ -export const PostUsersSignInDataAutoSelectSubtitle$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAutoSelectSubtitle -> = PostUsersSignInDataAutoSelectSubtitle$inboundSchema; +export const PostUsersSignInDataAutoSelectSubtitle$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataAutoSelectSubtitle$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAutoSelectSubtitle$ { - /** @deprecated use `PostUsersSignInDataAutoSelectSubtitle$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAutoSelectSubtitle$inboundSchema; - /** @deprecated use `PostUsersSignInDataAutoSelectSubtitle$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAutoSelectSubtitle$outboundSchema; + /** @deprecated use `PostUsersSignInDataAutoSelectSubtitle$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAutoSelectSubtitle$inboundSchema; + /** @deprecated use `PostUsersSignInDataAutoSelectSubtitle$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAutoSelectSubtitle$outboundSchema; } /** @internal */ -export const PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataDefaultSubtitleAccessibility -> = z.nativeEnum(PostUsersSignInDataDefaultSubtitleAccessibility); +export const PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataDefaultSubtitleAccessibility); /** @internal */ -export const PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataDefaultSubtitleAccessibility -> = PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema; +export const PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataDefaultSubtitleAccessibility$ { - /** @deprecated use `PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema; - /** @deprecated use `PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema; + /** @deprecated use `PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema; + /** @deprecated use `PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema; } /** @internal */ -export const PostUsersSignInDataDefaultSubtitleForced$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataDefaultSubtitleForced -> = z.nativeEnum(PostUsersSignInDataDefaultSubtitleForced); +export const PostUsersSignInDataDefaultSubtitleForced$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataDefaultSubtitleForced); /** @internal */ -export const PostUsersSignInDataDefaultSubtitleForced$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataDefaultSubtitleForced -> = PostUsersSignInDataDefaultSubtitleForced$inboundSchema; +export const PostUsersSignInDataDefaultSubtitleForced$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataDefaultSubtitleForced$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataDefaultSubtitleForced$ { - /** @deprecated use `PostUsersSignInDataDefaultSubtitleForced$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataDefaultSubtitleForced$inboundSchema; - /** @deprecated use `PostUsersSignInDataDefaultSubtitleForced$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataDefaultSubtitleForced$outboundSchema; + /** @deprecated use `PostUsersSignInDataDefaultSubtitleForced$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataDefaultSubtitleForced$inboundSchema; + /** @deprecated use `PostUsersSignInDataDefaultSubtitleForced$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataDefaultSubtitleForced$outboundSchema; } /** @internal */ export const PostUsersSignInDataWatchedIndicator$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataWatchedIndicator + typeof PostUsersSignInDataWatchedIndicator > = z.nativeEnum(PostUsersSignInDataWatchedIndicator); /** @internal */ -export const PostUsersSignInDataWatchedIndicator$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataWatchedIndicator -> = PostUsersSignInDataWatchedIndicator$inboundSchema; +export const PostUsersSignInDataWatchedIndicator$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataWatchedIndicator$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataWatchedIndicator$ { - /** @deprecated use `PostUsersSignInDataWatchedIndicator$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataWatchedIndicator$inboundSchema; - /** @deprecated use `PostUsersSignInDataWatchedIndicator$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataWatchedIndicator$outboundSchema; + /** @deprecated use `PostUsersSignInDataWatchedIndicator$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataWatchedIndicator$inboundSchema; + /** @deprecated use `PostUsersSignInDataWatchedIndicator$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataWatchedIndicator$outboundSchema; } /** @internal */ -export const PostUsersSignInDataMediaReviewsVisibility$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataMediaReviewsVisibility -> = z.nativeEnum(PostUsersSignInDataMediaReviewsVisibility); +export const PostUsersSignInDataMediaReviewsVisibility$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataMediaReviewsVisibility); /** @internal */ -export const PostUsersSignInDataMediaReviewsVisibility$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataMediaReviewsVisibility -> = PostUsersSignInDataMediaReviewsVisibility$inboundSchema; +export const PostUsersSignInDataMediaReviewsVisibility$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataMediaReviewsVisibility$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataMediaReviewsVisibility$ { - /** @deprecated use `PostUsersSignInDataMediaReviewsVisibility$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataMediaReviewsVisibility$inboundSchema; - /** @deprecated use `PostUsersSignInDataMediaReviewsVisibility$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataMediaReviewsVisibility$outboundSchema; + /** @deprecated use `PostUsersSignInDataMediaReviewsVisibility$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataMediaReviewsVisibility$inboundSchema; + /** @deprecated use `PostUsersSignInDataMediaReviewsVisibility$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataMediaReviewsVisibility$outboundSchema; } /** @internal */ export const PostUsersSignInDataUserProfile$inboundSchema: z.ZodType< - PostUsersSignInDataUserProfile, - z.ZodTypeDef, - unknown + PostUsersSignInDataUserProfile, + z.ZodTypeDef, + unknown > = z.object({ - autoSelectAudio: z.boolean().default(true), - defaultAudioLanguage: z.nullable(z.string()), - defaultSubtitleLanguage: z.nullable(z.string()), - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$inboundSchema.optional(), - defaultSubtitleAccessibility: - PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema.optional(), - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$inboundSchema.optional(), - watchedIndicator: PostUsersSignInDataWatchedIndicator$inboundSchema.optional(), - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility$inboundSchema.optional(), + autoSelectAudio: z.boolean().default(true), + defaultAudioLanguage: z.nullable(z.string()), + defaultSubtitleLanguage: z.nullable(z.string()), + autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$inboundSchema + .optional(), + defaultSubtitleAccessibility: + PostUsersSignInDataDefaultSubtitleAccessibility$inboundSchema.optional(), + defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$inboundSchema + .optional(), + watchedIndicator: PostUsersSignInDataWatchedIndicator$inboundSchema + .optional(), + mediaReviewsVisibility: + PostUsersSignInDataMediaReviewsVisibility$inboundSchema.optional(), }); /** @internal */ export type PostUsersSignInDataUserProfile$Outbound = { - autoSelectAudio: boolean; - defaultAudioLanguage: string | null; - defaultSubtitleLanguage: string | null; - autoSelectSubtitle?: string | undefined; - defaultSubtitleAccessibility?: string | undefined; - defaultSubtitleForced?: string | undefined; - watchedIndicator?: string | undefined; - mediaReviewsVisibility?: number | undefined; + autoSelectAudio: boolean; + defaultAudioLanguage: string | null; + defaultSubtitleLanguage: string | null; + autoSelectSubtitle?: string | undefined; + defaultSubtitleAccessibility?: string | undefined; + defaultSubtitleForced?: string | undefined; + watchedIndicator?: string | undefined; + mediaReviewsVisibility?: number | undefined; }; /** @internal */ export const PostUsersSignInDataUserProfile$outboundSchema: z.ZodType< - PostUsersSignInDataUserProfile$Outbound, - z.ZodTypeDef, - PostUsersSignInDataUserProfile + PostUsersSignInDataUserProfile$Outbound, + z.ZodTypeDef, + PostUsersSignInDataUserProfile > = z.object({ - autoSelectAudio: z.boolean().default(true), - defaultAudioLanguage: z.nullable(z.string()), - defaultSubtitleLanguage: z.nullable(z.string()), - autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$outboundSchema.optional(), - defaultSubtitleAccessibility: - PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema.optional(), - defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$outboundSchema.optional(), - watchedIndicator: PostUsersSignInDataWatchedIndicator$outboundSchema.optional(), - mediaReviewsVisibility: PostUsersSignInDataMediaReviewsVisibility$outboundSchema.optional(), + autoSelectAudio: z.boolean().default(true), + defaultAudioLanguage: z.nullable(z.string()), + defaultSubtitleLanguage: z.nullable(z.string()), + autoSelectSubtitle: PostUsersSignInDataAutoSelectSubtitle$outboundSchema + .optional(), + defaultSubtitleAccessibility: + PostUsersSignInDataDefaultSubtitleAccessibility$outboundSchema.optional(), + defaultSubtitleForced: PostUsersSignInDataDefaultSubtitleForced$outboundSchema + .optional(), + watchedIndicator: PostUsersSignInDataWatchedIndicator$outboundSchema + .optional(), + mediaReviewsVisibility: + PostUsersSignInDataMediaReviewsVisibility$outboundSchema.optional(), }); /** @@ -860,22 +882,22 @@ export const PostUsersSignInDataUserProfile$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataUserProfile$ { - /** @deprecated use `PostUsersSignInDataUserProfile$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataUserProfile$inboundSchema; - /** @deprecated use `PostUsersSignInDataUserProfile$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataUserProfile$outboundSchema; - /** @deprecated use `PostUsersSignInDataUserProfile$Outbound` instead. */ - export type Outbound = PostUsersSignInDataUserProfile$Outbound; + /** @deprecated use `PostUsersSignInDataUserProfile$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataUserProfile$inboundSchema; + /** @deprecated use `PostUsersSignInDataUserProfile$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataUserProfile$outboundSchema; + /** @deprecated use `PostUsersSignInDataUserProfile$Outbound` instead. */ + export type Outbound = PostUsersSignInDataUserProfile$Outbound; } /** @internal */ export const PostUsersSignInDataStatus$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataStatus + typeof PostUsersSignInDataStatus > = z.nativeEnum(PostUsersSignInDataStatus); /** @internal */ export const PostUsersSignInDataStatus$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataStatus + typeof PostUsersSignInDataStatus > = PostUsersSignInDataStatus$inboundSchema; /** @@ -883,45 +905,45 @@ export const PostUsersSignInDataStatus$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataStatus$ { - /** @deprecated use `PostUsersSignInDataStatus$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataStatus$inboundSchema; - /** @deprecated use `PostUsersSignInDataStatus$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataStatus$outboundSchema; + /** @deprecated use `PostUsersSignInDataStatus$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataStatus$inboundSchema; + /** @deprecated use `PostUsersSignInDataStatus$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataStatus$outboundSchema; } /** @internal */ export const PostUsersSignInDataServices$inboundSchema: z.ZodType< - PostUsersSignInDataServices, - z.ZodTypeDef, - unknown + PostUsersSignInDataServices, + z.ZodTypeDef, + unknown > = z.object({ - identifier: z.string(), - endpoint: z.string(), - token: z.nullable(z.string()), - secret: z.nullable(z.string()), - status: PostUsersSignInDataStatus$inboundSchema, + identifier: z.string(), + endpoint: z.string(), + token: z.nullable(z.string()), + secret: z.nullable(z.string()), + status: PostUsersSignInDataStatus$inboundSchema, }); /** @internal */ export type PostUsersSignInDataServices$Outbound = { - identifier: string; - endpoint: string; - token: string | null; - secret: string | null; - status: string; + identifier: string; + endpoint: string; + token: string | null; + secret: string | null; + status: string; }; /** @internal */ export const PostUsersSignInDataServices$outboundSchema: z.ZodType< - PostUsersSignInDataServices$Outbound, - z.ZodTypeDef, - PostUsersSignInDataServices + PostUsersSignInDataServices$Outbound, + z.ZodTypeDef, + PostUsersSignInDataServices > = z.object({ - identifier: z.string(), - endpoint: z.string(), - token: z.nullable(z.string()), - secret: z.nullable(z.string()), - status: PostUsersSignInDataStatus$outboundSchema, + identifier: z.string(), + endpoint: z.string(), + token: z.nullable(z.string()), + secret: z.nullable(z.string()), + status: PostUsersSignInDataStatus$outboundSchema, }); /** @@ -929,22 +951,22 @@ export const PostUsersSignInDataServices$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataServices$ { - /** @deprecated use `PostUsersSignInDataServices$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataServices$inboundSchema; - /** @deprecated use `PostUsersSignInDataServices$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataServices$outboundSchema; - /** @deprecated use `PostUsersSignInDataServices$Outbound` instead. */ - export type Outbound = PostUsersSignInDataServices$Outbound; + /** @deprecated use `PostUsersSignInDataServices$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataServices$inboundSchema; + /** @deprecated use `PostUsersSignInDataServices$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataServices$outboundSchema; + /** @deprecated use `PostUsersSignInDataServices$Outbound` instead. */ + export type Outbound = PostUsersSignInDataServices$Outbound; } /** @internal */ export const PostUsersSignInDataFeatures$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataFeatures + typeof PostUsersSignInDataFeatures > = z.nativeEnum(PostUsersSignInDataFeatures); /** @internal */ export const PostUsersSignInDataFeatures$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataFeatures + typeof PostUsersSignInDataFeatures > = PostUsersSignInDataFeatures$inboundSchema; /** @@ -952,69 +974,71 @@ export const PostUsersSignInDataFeatures$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataFeatures$ { - /** @deprecated use `PostUsersSignInDataFeatures$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataFeatures$inboundSchema; - /** @deprecated use `PostUsersSignInDataFeatures$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataFeatures$outboundSchema; + /** @deprecated use `PostUsersSignInDataFeatures$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataFeatures$inboundSchema; + /** @deprecated use `PostUsersSignInDataFeatures$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataFeatures$outboundSchema; } /** @internal */ -export const PostUsersSignInDataAuthenticationStatus$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationStatus -> = z.nativeEnum(PostUsersSignInDataAuthenticationStatus); +export const PostUsersSignInDataAuthenticationStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataAuthenticationStatus); /** @internal */ -export const PostUsersSignInDataAuthenticationStatus$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationStatus -> = PostUsersSignInDataAuthenticationStatus$inboundSchema; +export const PostUsersSignInDataAuthenticationStatus$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataAuthenticationStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAuthenticationStatus$ { - /** @deprecated use `PostUsersSignInDataAuthenticationStatus$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationStatus$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationStatus$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationStatus$outboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationStatus$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAuthenticationStatus$inboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationStatus$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAuthenticationStatus$outboundSchema; } /** @internal */ export const PostUsersSignInDataSubscription$inboundSchema: z.ZodType< - PostUsersSignInDataSubscription, - z.ZodTypeDef, - unknown + PostUsersSignInDataSubscription, + z.ZodTypeDef, + unknown > = z.object({ - features: z.array(PostUsersSignInDataFeatures$inboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: PostUsersSignInDataAuthenticationStatus$inboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), + features: z.array(PostUsersSignInDataFeatures$inboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: PostUsersSignInDataAuthenticationStatus$inboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), }); /** @internal */ export type PostUsersSignInDataSubscription$Outbound = { - features?: Array | undefined; - active?: boolean | undefined; - subscribedAt?: string | null | undefined; - status?: string | undefined; - paymentService?: string | null | undefined; - plan?: string | null | undefined; + features?: Array | undefined; + active?: boolean | undefined; + subscribedAt?: string | null | undefined; + status?: string | undefined; + paymentService?: string | null | undefined; + plan?: string | null | undefined; }; /** @internal */ export const PostUsersSignInDataSubscription$outboundSchema: z.ZodType< - PostUsersSignInDataSubscription$Outbound, - z.ZodTypeDef, - PostUsersSignInDataSubscription + PostUsersSignInDataSubscription$Outbound, + z.ZodTypeDef, + PostUsersSignInDataSubscription > = z.object({ - features: z.array(PostUsersSignInDataFeatures$outboundSchema).optional(), - active: z.boolean().optional(), - subscribedAt: z.nullable(z.string()).optional(), - status: PostUsersSignInDataAuthenticationStatus$outboundSchema.optional(), - paymentService: z.nullable(z.string()).optional(), - plan: z.nullable(z.string()).optional(), + features: z.array(PostUsersSignInDataFeatures$outboundSchema).optional(), + active: z.boolean().optional(), + subscribedAt: z.nullable(z.string()).optional(), + status: PostUsersSignInDataAuthenticationStatus$outboundSchema.optional(), + paymentService: z.nullable(z.string()).optional(), + plan: z.nullable(z.string()).optional(), }); /** @@ -1022,115 +1046,127 @@ export const PostUsersSignInDataSubscription$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataSubscription$ { - /** @deprecated use `PostUsersSignInDataSubscription$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataSubscription$inboundSchema; - /** @deprecated use `PostUsersSignInDataSubscription$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataSubscription$outboundSchema; - /** @deprecated use `PostUsersSignInDataSubscription$Outbound` instead. */ - export type Outbound = PostUsersSignInDataSubscription$Outbound; + /** @deprecated use `PostUsersSignInDataSubscription$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataSubscription$inboundSchema; + /** @deprecated use `PostUsersSignInDataSubscription$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataSubscription$outboundSchema; + /** @deprecated use `PostUsersSignInDataSubscription$Outbound` instead. */ + export type Outbound = PostUsersSignInDataSubscription$Outbound; } /** @internal */ -export const PostUsersSignInDataAuthenticationFeatures$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationFeatures -> = z.nativeEnum(PostUsersSignInDataAuthenticationFeatures); +export const PostUsersSignInDataAuthenticationFeatures$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataAuthenticationFeatures); /** @internal */ -export const PostUsersSignInDataAuthenticationFeatures$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationFeatures -> = PostUsersSignInDataAuthenticationFeatures$inboundSchema; +export const PostUsersSignInDataAuthenticationFeatures$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataAuthenticationFeatures$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAuthenticationFeatures$ { - /** @deprecated use `PostUsersSignInDataAuthenticationFeatures$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationFeatures$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationFeatures$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationFeatures$outboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationFeatures$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAuthenticationFeatures$inboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationFeatures$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAuthenticationFeatures$outboundSchema; } /** @internal */ -export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationResponseStatus -> = z.nativeEnum(PostUsersSignInDataAuthenticationResponseStatus); +export const PostUsersSignInDataAuthenticationResponseStatus$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(PostUsersSignInDataAuthenticationResponseStatus); /** @internal */ -export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataAuthenticationResponseStatus -> = PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; +export const PostUsersSignInDataAuthenticationResponseStatus$outboundSchema: + z.ZodNativeEnum = + PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAuthenticationResponseStatus$ { - /** @deprecated use `PostUsersSignInDataAuthenticationResponseStatus$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationResponseStatus$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationResponseStatus$outboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationResponseStatus$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAuthenticationResponseStatus$inboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationResponseStatus$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAuthenticationResponseStatus$outboundSchema; } /** @internal */ -export const PostUsersSignInDataAuthenticationSubscription$inboundSchema: z.ZodType< +export const PostUsersSignInDataAuthenticationSubscription$inboundSchema: + z.ZodType< PostUsersSignInDataAuthenticationSubscription, z.ZodTypeDef, unknown -> = z.object({ - features: z.array(PostUsersSignInDataAuthenticationFeatures$inboundSchema).optional(), + > = z.object({ + features: z.array(PostUsersSignInDataAuthenticationFeatures$inboundSchema) + .optional(), active: z.boolean().optional(), subscribedAt: z.nullable(z.string()).optional(), - status: PostUsersSignInDataAuthenticationResponseStatus$inboundSchema.optional(), + status: PostUsersSignInDataAuthenticationResponseStatus$inboundSchema + .optional(), paymentService: z.nullable(z.string()).optional(), plan: z.nullable(z.string()).optional(), -}); + }); /** @internal */ export type PostUsersSignInDataAuthenticationSubscription$Outbound = { - features?: Array | undefined; - active?: boolean | undefined; - subscribedAt?: string | null | undefined; - status?: string | undefined; - paymentService?: string | null | undefined; - plan?: string | null | undefined; + features?: Array | undefined; + active?: boolean | undefined; + subscribedAt?: string | null | undefined; + status?: string | undefined; + paymentService?: string | null | undefined; + plan?: string | null | undefined; }; /** @internal */ -export const PostUsersSignInDataAuthenticationSubscription$outboundSchema: z.ZodType< +export const PostUsersSignInDataAuthenticationSubscription$outboundSchema: + z.ZodType< PostUsersSignInDataAuthenticationSubscription$Outbound, z.ZodTypeDef, PostUsersSignInDataAuthenticationSubscription -> = z.object({ - features: z.array(PostUsersSignInDataAuthenticationFeatures$outboundSchema).optional(), + > = z.object({ + features: z.array(PostUsersSignInDataAuthenticationFeatures$outboundSchema) + .optional(), active: z.boolean().optional(), subscribedAt: z.nullable(z.string()).optional(), - status: PostUsersSignInDataAuthenticationResponseStatus$outboundSchema.optional(), + status: PostUsersSignInDataAuthenticationResponseStatus$outboundSchema + .optional(), paymentService: z.nullable(z.string()).optional(), plan: z.nullable(z.string()).optional(), -}); + }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataAuthenticationSubscription$ { - /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataAuthenticationSubscription$inboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataAuthenticationSubscription$outboundSchema; - /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$Outbound` instead. */ - export type Outbound = PostUsersSignInDataAuthenticationSubscription$Outbound; + /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$inboundSchema` instead. */ + export const inboundSchema = + PostUsersSignInDataAuthenticationSubscription$inboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataAuthenticationSubscription$outboundSchema; + /** @deprecated use `PostUsersSignInDataAuthenticationSubscription$Outbound` instead. */ + export type Outbound = PostUsersSignInDataAuthenticationSubscription$Outbound; } /** @internal */ export const PostUsersSignInDataState$inboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataState + typeof PostUsersSignInDataState > = z.nativeEnum(PostUsersSignInDataState); /** @internal */ export const PostUsersSignInDataState$outboundSchema: z.ZodNativeEnum< - typeof PostUsersSignInDataState + typeof PostUsersSignInDataState > = PostUsersSignInDataState$inboundSchema; /** @@ -1138,17 +1174,17 @@ export const PostUsersSignInDataState$outboundSchema: z.ZodNativeEnum< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataState$ { - /** @deprecated use `PostUsersSignInDataState$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataState$inboundSchema; - /** @deprecated use `PostUsersSignInDataState$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataState$outboundSchema; + /** @deprecated use `PostUsersSignInDataState$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataState$inboundSchema; + /** @deprecated use `PostUsersSignInDataState$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataState$outboundSchema; } /** @internal */ export const InternalPaymentMethod$inboundSchema: z.ZodType< - InternalPaymentMethod, - z.ZodTypeDef, - unknown + InternalPaymentMethod, + z.ZodTypeDef, + unknown > = z.object({}); /** @internal */ @@ -1156,9 +1192,9 @@ export type InternalPaymentMethod$Outbound = {}; /** @internal */ export const InternalPaymentMethod$outboundSchema: z.ZodType< - InternalPaymentMethod$Outbound, - z.ZodTypeDef, - InternalPaymentMethod + InternalPaymentMethod$Outbound, + z.ZodTypeDef, + InternalPaymentMethod > = z.object({}); /** @@ -1166,30 +1202,35 @@ export const InternalPaymentMethod$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace InternalPaymentMethod$ { - /** @deprecated use `InternalPaymentMethod$inboundSchema` instead. */ - export const inboundSchema = InternalPaymentMethod$inboundSchema; - /** @deprecated use `InternalPaymentMethod$outboundSchema` instead. */ - export const outboundSchema = InternalPaymentMethod$outboundSchema; - /** @deprecated use `InternalPaymentMethod$Outbound` instead. */ - export type Outbound = InternalPaymentMethod$Outbound; + /** @deprecated use `InternalPaymentMethod$inboundSchema` instead. */ + export const inboundSchema = InternalPaymentMethod$inboundSchema; + /** @deprecated use `InternalPaymentMethod$outboundSchema` instead. */ + export const outboundSchema = InternalPaymentMethod$outboundSchema; + /** @deprecated use `InternalPaymentMethod$Outbound` instead. */ + export type Outbound = InternalPaymentMethod$Outbound; } /** @internal */ -export const Billing$inboundSchema: z.ZodType = z.object({ +export const Billing$inboundSchema: z.ZodType = + z.object({ internalPaymentMethod: z.lazy(() => InternalPaymentMethod$inboundSchema), paymentMethodId: z.nullable(z.number().int()), -}); + }); /** @internal */ export type Billing$Outbound = { - internalPaymentMethod: InternalPaymentMethod$Outbound; - paymentMethodId: number | null; + internalPaymentMethod: InternalPaymentMethod$Outbound; + paymentMethodId: number | null; }; /** @internal */ -export const Billing$outboundSchema: z.ZodType = z.object({ - internalPaymentMethod: z.lazy(() => InternalPaymentMethod$outboundSchema), - paymentMethodId: z.nullable(z.number().int()), +export const Billing$outboundSchema: z.ZodType< + Billing$Outbound, + z.ZodTypeDef, + Billing +> = z.object({ + internalPaymentMethod: z.lazy(() => InternalPaymentMethod$outboundSchema), + paymentMethodId: z.nullable(z.number().int()), }); /** @@ -1197,74 +1238,77 @@ export const Billing$outboundSchema: z.ZodType = - z.object({ - id: z.nullable(z.string()), - mode: z.nullable(z.string()), - renewsAt: z.nullable(z.number().int()), - endsAt: z.nullable(z.number().int()), - canceled: z.boolean().default(false), - gracePeriod: z.boolean().default(false), - onHold: z.boolean().default(false), - canReactivate: z.boolean().default(false), - canUpgrade: z.boolean().default(false), - canDowngrade: z.boolean().default(false), - canConvert: z.boolean().default(false), - type: z.string(), - transfer: z.nullable(z.string()), - state: PostUsersSignInDataState$inboundSchema, - billing: z.lazy(() => Billing$inboundSchema), - }); +export const PastSubscription$inboundSchema: z.ZodType< + PastSubscription, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.nullable(z.string()), + mode: z.nullable(z.string()), + renewsAt: z.nullable(z.number().int()), + endsAt: z.nullable(z.number().int()), + canceled: z.boolean().default(false), + gracePeriod: z.boolean().default(false), + onHold: z.boolean().default(false), + canReactivate: z.boolean().default(false), + canUpgrade: z.boolean().default(false), + canDowngrade: z.boolean().default(false), + canConvert: z.boolean().default(false), + type: z.string(), + transfer: z.nullable(z.string()), + state: PostUsersSignInDataState$inboundSchema, + billing: z.lazy(() => Billing$inboundSchema), +}); /** @internal */ export type PastSubscription$Outbound = { - id: string | null; - mode: string | null; - renewsAt: number | null; - endsAt: number | null; - canceled: boolean; - gracePeriod: boolean; - onHold: boolean; - canReactivate: boolean; - canUpgrade: boolean; - canDowngrade: boolean; - canConvert: boolean; - type: string; - transfer: string | null; - state: string; - billing: Billing$Outbound; + id: string | null; + mode: string | null; + renewsAt: number | null; + endsAt: number | null; + canceled: boolean; + gracePeriod: boolean; + onHold: boolean; + canReactivate: boolean; + canUpgrade: boolean; + canDowngrade: boolean; + canConvert: boolean; + type: string; + transfer: string | null; + state: string; + billing: Billing$Outbound; }; /** @internal */ export const PastSubscription$outboundSchema: z.ZodType< - PastSubscription$Outbound, - z.ZodTypeDef, - PastSubscription + PastSubscription$Outbound, + z.ZodTypeDef, + PastSubscription > = z.object({ - id: z.nullable(z.string()), - mode: z.nullable(z.string()), - renewsAt: z.nullable(z.number().int()), - endsAt: z.nullable(z.number().int()), - canceled: z.boolean().default(false), - gracePeriod: z.boolean().default(false), - onHold: z.boolean().default(false), - canReactivate: z.boolean().default(false), - canUpgrade: z.boolean().default(false), - canDowngrade: z.boolean().default(false), - canConvert: z.boolean().default(false), - type: z.string(), - transfer: z.nullable(z.string()), - state: PostUsersSignInDataState$outboundSchema, - billing: z.lazy(() => Billing$outboundSchema), + id: z.nullable(z.string()), + mode: z.nullable(z.string()), + renewsAt: z.nullable(z.number().int()), + endsAt: z.nullable(z.number().int()), + canceled: z.boolean().default(false), + gracePeriod: z.boolean().default(false), + onHold: z.boolean().default(false), + canReactivate: z.boolean().default(false), + canUpgrade: z.boolean().default(false), + canDowngrade: z.boolean().default(false), + canConvert: z.boolean().default(false), + type: z.string(), + transfer: z.nullable(z.string()), + state: PostUsersSignInDataState$outboundSchema, + billing: z.lazy(() => Billing$outboundSchema), }); /** @@ -1272,194 +1316,193 @@ export const PastSubscription$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PastSubscription$ { - /** @deprecated use `PastSubscription$inboundSchema` instead. */ - export const inboundSchema = PastSubscription$inboundSchema; - /** @deprecated use `PastSubscription$outboundSchema` instead. */ - export const outboundSchema = PastSubscription$outboundSchema; - /** @deprecated use `PastSubscription$Outbound` instead. */ - export type Outbound = PastSubscription$Outbound; + /** @deprecated use `PastSubscription$inboundSchema` instead. */ + export const inboundSchema = PastSubscription$inboundSchema; + /** @deprecated use `PastSubscription$outboundSchema` instead. */ + export const outboundSchema = PastSubscription$outboundSchema; + /** @deprecated use `PastSubscription$Outbound` instead. */ + export type Outbound = PastSubscription$Outbound; } /** @internal */ -export const Trials$inboundSchema: z.ZodType = z.object({}); +export const Trials$inboundSchema: z.ZodType = z + .object({}); /** @internal */ export type Trials$Outbound = {}; /** @internal */ -export const Trials$outboundSchema: z.ZodType = z.object({}); +export const Trials$outboundSchema: z.ZodType< + Trials$Outbound, + z.ZodTypeDef, + Trials +> = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Trials$ { - /** @deprecated use `Trials$inboundSchema` instead. */ - export const inboundSchema = Trials$inboundSchema; - /** @deprecated use `Trials$outboundSchema` instead. */ - export const outboundSchema = Trials$outboundSchema; - /** @deprecated use `Trials$Outbound` instead. */ - export type Outbound = Trials$Outbound; + /** @deprecated use `Trials$inboundSchema` instead. */ + export const inboundSchema = Trials$inboundSchema; + /** @deprecated use `Trials$outboundSchema` instead. */ + export const outboundSchema = Trials$outboundSchema; + /** @deprecated use `Trials$Outbound` instead. */ + export type Outbound = Trials$Outbound; } /** @internal */ export const PostUsersSignInDataUserPlexAccount$inboundSchema: z.ZodType< - PostUsersSignInDataUserPlexAccount, - z.ZodTypeDef, - unknown + PostUsersSignInDataUserPlexAccount, + z.ZodTypeDef, + unknown > = z.object({ - adsConsent: z.nullable(z.boolean()), - adsConsentReminderAt: z.nullable( - z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - ), - adsConsentSetAt: z.nullable( - z - .string() - .datetime({ offset: true }) - .transform((v) => new Date(v)) - ), - anonymous: z.nullable(z.boolean().default(false)), - authToken: z.string(), - backupCodesCreated: z.boolean().default(false), - confirmed: z.boolean().default(false), - country: z.string(), - email: z.string(), - emailOnlyAuth: z.boolean().default(false), - experimentalFeatures: z.boolean().default(false), - friendlyName: z.string(), - entitlements: z.array(z.string()), - guest: z.boolean().default(false), - hasPassword: z.boolean().default(true), - home: z.boolean().default(false), - homeAdmin: z.boolean().default(false), - homeSize: z.number().int(), - id: z.number().int(), - joinedAt: z.number().int(), - locale: z.nullable(z.string()), - mailingListActive: z.boolean().default(false), - mailingListStatus: PostUsersSignInDataMailingListStatus$inboundSchema, - maxHomeSize: z.number().int(), - pin: z.string().optional(), - profile: z.lazy(() => PostUsersSignInDataUserProfile$inboundSchema), - protected: z.boolean().default(false), - rememberExpiresAt: z.number().int(), - restricted: z.boolean().default(false), - roles: z.array(z.string()).optional(), - scrobbleTypes: z.string(), - services: z.array(z.lazy(() => PostUsersSignInDataServices$inboundSchema)), - subscription: z.lazy(() => PostUsersSignInDataSubscription$inboundSchema), - subscriptionDescription: z.nullable(z.string()), - subscriptions: z.array( - z.lazy(() => PostUsersSignInDataAuthenticationSubscription$inboundSchema) - ), - thumb: z.string(), - title: z.string(), - twoFactorEnabled: z.boolean().default(false), - username: z.string(), - uuid: z.string(), - pastSubscriptions: z.array(z.lazy(() => PastSubscription$inboundSchema)), - trials: z.array(z.lazy(() => Trials$inboundSchema)), + adsConsent: z.nullable(z.boolean()), + adsConsentReminderAt: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + adsConsentSetAt: z.nullable( + z.string().datetime({ offset: true }).transform(v => new Date(v)), + ), + anonymous: z.nullable(z.boolean().default(false)), + authToken: z.string(), + backupCodesCreated: z.boolean().default(false), + confirmed: z.boolean().default(false), + country: z.string(), + email: z.string(), + emailOnlyAuth: z.boolean().default(false), + experimentalFeatures: z.boolean().default(false), + friendlyName: z.string(), + entitlements: z.array(z.string()), + guest: z.boolean().default(false), + hasPassword: z.boolean().default(true), + home: z.boolean().default(false), + homeAdmin: z.boolean().default(false), + homeSize: z.number().int(), + id: z.number().int(), + joinedAt: z.number().int(), + locale: z.nullable(z.string()), + mailingListActive: z.boolean().default(false), + mailingListStatus: PostUsersSignInDataMailingListStatus$inboundSchema, + maxHomeSize: z.number().int(), + pin: z.string().optional(), + profile: z.lazy(() => PostUsersSignInDataUserProfile$inboundSchema), + protected: z.boolean().default(false), + rememberExpiresAt: z.number().int(), + restricted: z.boolean().default(false), + roles: z.array(z.string()).optional(), + scrobbleTypes: z.string(), + services: z.array(z.lazy(() => PostUsersSignInDataServices$inboundSchema)), + subscription: z.lazy(() => PostUsersSignInDataSubscription$inboundSchema), + subscriptionDescription: z.nullable(z.string()), + subscriptions: z.array( + z.lazy(() => PostUsersSignInDataAuthenticationSubscription$inboundSchema), + ), + thumb: z.string(), + title: z.string(), + twoFactorEnabled: z.boolean().default(false), + username: z.string(), + uuid: z.string(), + pastSubscriptions: z.array(z.lazy(() => PastSubscription$inboundSchema)), + trials: z.array(z.lazy(() => Trials$inboundSchema)), }); /** @internal */ export type PostUsersSignInDataUserPlexAccount$Outbound = { - adsConsent: boolean | null; - adsConsentReminderAt: string | null; - adsConsentSetAt: string | null; - anonymous: boolean | null; - authToken: string; - backupCodesCreated: boolean; - confirmed: boolean; - country: string; - email: string; - emailOnlyAuth: boolean; - experimentalFeatures: boolean; - friendlyName: string; - entitlements: Array; - guest: boolean; - hasPassword: boolean; - home: boolean; - homeAdmin: boolean; - homeSize: number; - id: number; - joinedAt: number; - locale: string | null; - mailingListActive: boolean; - mailingListStatus: string; - maxHomeSize: number; - pin?: string | undefined; - profile: PostUsersSignInDataUserProfile$Outbound; - protected: boolean; - rememberExpiresAt: number; - restricted: boolean; - roles?: Array | undefined; - scrobbleTypes: string; - services: Array; - subscription: PostUsersSignInDataSubscription$Outbound; - subscriptionDescription: string | null; - subscriptions: Array; - thumb: string; - title: string; - twoFactorEnabled: boolean; - username: string; - uuid: string; - pastSubscriptions: Array; - trials: Array; + adsConsent: boolean | null; + adsConsentReminderAt: string | null; + adsConsentSetAt: string | null; + anonymous: boolean | null; + authToken: string; + backupCodesCreated: boolean; + confirmed: boolean; + country: string; + email: string; + emailOnlyAuth: boolean; + experimentalFeatures: boolean; + friendlyName: string; + entitlements: Array; + guest: boolean; + hasPassword: boolean; + home: boolean; + homeAdmin: boolean; + homeSize: number; + id: number; + joinedAt: number; + locale: string | null; + mailingListActive: boolean; + mailingListStatus: string; + maxHomeSize: number; + pin?: string | undefined; + profile: PostUsersSignInDataUserProfile$Outbound; + protected: boolean; + rememberExpiresAt: number; + restricted: boolean; + roles?: Array | undefined; + scrobbleTypes: string; + services: Array; + subscription: PostUsersSignInDataSubscription$Outbound; + subscriptionDescription: string | null; + subscriptions: Array; + thumb: string; + title: string; + twoFactorEnabled: boolean; + username: string; + uuid: string; + pastSubscriptions: Array; + trials: Array; }; /** @internal */ export const PostUsersSignInDataUserPlexAccount$outboundSchema: z.ZodType< - PostUsersSignInDataUserPlexAccount$Outbound, - z.ZodTypeDef, - PostUsersSignInDataUserPlexAccount + PostUsersSignInDataUserPlexAccount$Outbound, + z.ZodTypeDef, + PostUsersSignInDataUserPlexAccount > = z.object({ - adsConsent: z.nullable(z.boolean()), - adsConsentReminderAt: z.nullable(z.date().transform((v) => v.toISOString())), - adsConsentSetAt: z.nullable(z.date().transform((v) => v.toISOString())), - anonymous: z.nullable(z.boolean().default(false)), - authToken: z.string(), - backupCodesCreated: z.boolean().default(false), - confirmed: z.boolean().default(false), - country: z.string(), - email: z.string(), - emailOnlyAuth: z.boolean().default(false), - experimentalFeatures: z.boolean().default(false), - friendlyName: z.string(), - entitlements: z.array(z.string()), - guest: z.boolean().default(false), - hasPassword: z.boolean().default(true), - home: z.boolean().default(false), - homeAdmin: z.boolean().default(false), - homeSize: z.number().int(), - id: z.number().int(), - joinedAt: z.number().int(), - locale: z.nullable(z.string()), - mailingListActive: z.boolean().default(false), - mailingListStatus: PostUsersSignInDataMailingListStatus$outboundSchema, - maxHomeSize: z.number().int(), - pin: z.string().optional(), - profile: z.lazy(() => PostUsersSignInDataUserProfile$outboundSchema), - protected: z.boolean().default(false), - rememberExpiresAt: z.number().int(), - restricted: z.boolean().default(false), - roles: z.array(z.string()).optional(), - scrobbleTypes: z.string(), - services: z.array(z.lazy(() => PostUsersSignInDataServices$outboundSchema)), - subscription: z.lazy(() => PostUsersSignInDataSubscription$outboundSchema), - subscriptionDescription: z.nullable(z.string()), - subscriptions: z.array( - z.lazy(() => PostUsersSignInDataAuthenticationSubscription$outboundSchema) - ), - thumb: z.string(), - title: z.string(), - twoFactorEnabled: z.boolean().default(false), - username: z.string(), - uuid: z.string(), - pastSubscriptions: z.array(z.lazy(() => PastSubscription$outboundSchema)), - trials: z.array(z.lazy(() => Trials$outboundSchema)), + adsConsent: z.nullable(z.boolean()), + adsConsentReminderAt: z.nullable(z.date().transform(v => v.toISOString())), + adsConsentSetAt: z.nullable(z.date().transform(v => v.toISOString())), + anonymous: z.nullable(z.boolean().default(false)), + authToken: z.string(), + backupCodesCreated: z.boolean().default(false), + confirmed: z.boolean().default(false), + country: z.string(), + email: z.string(), + emailOnlyAuth: z.boolean().default(false), + experimentalFeatures: z.boolean().default(false), + friendlyName: z.string(), + entitlements: z.array(z.string()), + guest: z.boolean().default(false), + hasPassword: z.boolean().default(true), + home: z.boolean().default(false), + homeAdmin: z.boolean().default(false), + homeSize: z.number().int(), + id: z.number().int(), + joinedAt: z.number().int(), + locale: z.nullable(z.string()), + mailingListActive: z.boolean().default(false), + mailingListStatus: PostUsersSignInDataMailingListStatus$outboundSchema, + maxHomeSize: z.number().int(), + pin: z.string().optional(), + profile: z.lazy(() => PostUsersSignInDataUserProfile$outboundSchema), + protected: z.boolean().default(false), + rememberExpiresAt: z.number().int(), + restricted: z.boolean().default(false), + roles: z.array(z.string()).optional(), + scrobbleTypes: z.string(), + services: z.array(z.lazy(() => PostUsersSignInDataServices$outboundSchema)), + subscription: z.lazy(() => PostUsersSignInDataSubscription$outboundSchema), + subscriptionDescription: z.nullable(z.string()), + subscriptions: z.array( + z.lazy(() => PostUsersSignInDataAuthenticationSubscription$outboundSchema), + ), + thumb: z.string(), + title: z.string(), + twoFactorEnabled: z.boolean().default(false), + username: z.string(), + uuid: z.string(), + pastSubscriptions: z.array(z.lazy(() => PastSubscription$outboundSchema)), + trials: z.array(z.lazy(() => Trials$outboundSchema)), }); /** @@ -1467,75 +1510,76 @@ export const PostUsersSignInDataUserPlexAccount$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataUserPlexAccount$ { - /** @deprecated use `PostUsersSignInDataUserPlexAccount$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataUserPlexAccount$inboundSchema; - /** @deprecated use `PostUsersSignInDataUserPlexAccount$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataUserPlexAccount$outboundSchema; - /** @deprecated use `PostUsersSignInDataUserPlexAccount$Outbound` instead. */ - export type Outbound = PostUsersSignInDataUserPlexAccount$Outbound; + /** @deprecated use `PostUsersSignInDataUserPlexAccount$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataUserPlexAccount$inboundSchema; + /** @deprecated use `PostUsersSignInDataUserPlexAccount$outboundSchema` instead. */ + export const outboundSchema = + PostUsersSignInDataUserPlexAccount$outboundSchema; + /** @deprecated use `PostUsersSignInDataUserPlexAccount$Outbound` instead. */ + export type Outbound = PostUsersSignInDataUserPlexAccount$Outbound; } /** @internal */ export const PostUsersSignInDataResponse$inboundSchema: z.ZodType< - PostUsersSignInDataResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - UserPlexAccount: z.lazy(() => PostUsersSignInDataUserPlexAccount$inboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - UserPlexAccount: "userPlexAccount", - }); - }); + PostUsersSignInDataResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), + UserPlexAccount: z.lazy(() => + PostUsersSignInDataUserPlexAccount$inboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + "UserPlexAccount": "userPlexAccount", + }); +}); /** @internal */ export type PostUsersSignInDataResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; - UserPlexAccount?: PostUsersSignInDataUserPlexAccount$Outbound | undefined; + ContentType: string; + StatusCode: number; + RawResponse: never; + UserPlexAccount?: PostUsersSignInDataUserPlexAccount$Outbound | undefined; }; /** @internal */ export const PostUsersSignInDataResponse$outboundSchema: z.ZodType< - PostUsersSignInDataResponse$Outbound, - z.ZodTypeDef, - PostUsersSignInDataResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - userPlexAccount: z.lazy(() => PostUsersSignInDataUserPlexAccount$outboundSchema).optional(), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - userPlexAccount: "UserPlexAccount", - }); - }); + PostUsersSignInDataResponse$Outbound, + z.ZodTypeDef, + PostUsersSignInDataResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), + userPlexAccount: z.lazy(() => + PostUsersSignInDataUserPlexAccount$outboundSchema + ).optional(), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + userPlexAccount: "UserPlexAccount", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostUsersSignInDataResponse$ { - /** @deprecated use `PostUsersSignInDataResponse$inboundSchema` instead. */ - export const inboundSchema = PostUsersSignInDataResponse$inboundSchema; - /** @deprecated use `PostUsersSignInDataResponse$outboundSchema` instead. */ - export const outboundSchema = PostUsersSignInDataResponse$outboundSchema; - /** @deprecated use `PostUsersSignInDataResponse$Outbound` instead. */ - export type Outbound = PostUsersSignInDataResponse$Outbound; + /** @deprecated use `PostUsersSignInDataResponse$inboundSchema` instead. */ + export const inboundSchema = PostUsersSignInDataResponse$inboundSchema; + /** @deprecated use `PostUsersSignInDataResponse$outboundSchema` instead. */ + export const outboundSchema = PostUsersSignInDataResponse$outboundSchema; + /** @deprecated use `PostUsersSignInDataResponse$Outbound` instead. */ + export type Outbound = PostUsersSignInDataResponse$Outbound; } diff --git a/src/sdk/models/operations/startalltasks.ts b/src/sdk/models/operations/startalltasks.ts index fb74fe0d..2e22a5db 100644 --- a/src/sdk/models/operations/startalltasks.ts +++ b/src/sdk/models/operations/startalltasks.ts @@ -2,80 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StartAllTasksResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const StartAllTasksResponse$inboundSchema: z.ZodType< - StartAllTasksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + StartAllTasksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StartAllTasksResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StartAllTasksResponse$outboundSchema: z.ZodType< - StartAllTasksResponse$Outbound, - z.ZodTypeDef, - StartAllTasksResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StartAllTasksResponse$Outbound, + z.ZodTypeDef, + StartAllTasksResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartAllTasksResponse$ { - /** @deprecated use `StartAllTasksResponse$inboundSchema` instead. */ - export const inboundSchema = StartAllTasksResponse$inboundSchema; - /** @deprecated use `StartAllTasksResponse$outboundSchema` instead. */ - export const outboundSchema = StartAllTasksResponse$outboundSchema; - /** @deprecated use `StartAllTasksResponse$Outbound` instead. */ - export type Outbound = StartAllTasksResponse$Outbound; + /** @deprecated use `StartAllTasksResponse$inboundSchema` instead. */ + export const inboundSchema = StartAllTasksResponse$inboundSchema; + /** @deprecated use `StartAllTasksResponse$outboundSchema` instead. */ + export const outboundSchema = StartAllTasksResponse$outboundSchema; + /** @deprecated use `StartAllTasksResponse$Outbound` instead. */ + export type Outbound = StartAllTasksResponse$Outbound; } diff --git a/src/sdk/models/operations/starttask.ts b/src/sdk/models/operations/starttask.ts index 8362851f..117d0a6e 100644 --- a/src/sdk/models/operations/starttask.ts +++ b/src/sdk/models/operations/starttask.ts @@ -2,86 +2,91 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * the name of the task to be started. */ export enum TaskName { - BackupDatabase = "BackupDatabase", - BuildGracenoteCollections = "BuildGracenoteCollections", - CheckForUpdates = "CheckForUpdates", - CleanOldBundles = "CleanOldBundles", - CleanOldCacheFiles = "CleanOldCacheFiles", - DeepMediaAnalysis = "DeepMediaAnalysis", - GenerateAutoTags = "GenerateAutoTags", - GenerateChapterThumbs = "GenerateChapterThumbs", - GenerateMediaIndexFiles = "GenerateMediaIndexFiles", - OptimizeDatabase = "OptimizeDatabase", - RefreshLibraries = "RefreshLibraries", - RefreshLocalMedia = "RefreshLocalMedia", - RefreshPeriodicMetadata = "RefreshPeriodicMetadata", - UpgradeMediaAnalysis = "UpgradeMediaAnalysis", + BackupDatabase = "BackupDatabase", + BuildGracenoteCollections = "BuildGracenoteCollections", + CheckForUpdates = "CheckForUpdates", + CleanOldBundles = "CleanOldBundles", + CleanOldCacheFiles = "CleanOldCacheFiles", + DeepMediaAnalysis = "DeepMediaAnalysis", + GenerateAutoTags = "GenerateAutoTags", + GenerateChapterThumbs = "GenerateChapterThumbs", + GenerateMediaIndexFiles = "GenerateMediaIndexFiles", + OptimizeDatabase = "OptimizeDatabase", + RefreshLibraries = "RefreshLibraries", + RefreshLocalMedia = "RefreshLocalMedia", + RefreshPeriodicMetadata = "RefreshPeriodicMetadata", + UpgradeMediaAnalysis = "UpgradeMediaAnalysis", } export type StartTaskRequest = { - /** - * the name of the task to be started. - */ - taskName: TaskName; + /** + * the name of the task to be started. + */ + taskName: TaskName; }; export type StartTaskResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const TaskName$inboundSchema: z.ZodNativeEnum = z.nativeEnum(TaskName); +export const TaskName$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(TaskName); /** @internal */ -export const TaskName$outboundSchema: z.ZodNativeEnum = TaskName$inboundSchema; +export const TaskName$outboundSchema: z.ZodNativeEnum = + TaskName$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TaskName$ { - /** @deprecated use `TaskName$inboundSchema` instead. */ - export const inboundSchema = TaskName$inboundSchema; - /** @deprecated use `TaskName$outboundSchema` instead. */ - export const outboundSchema = TaskName$outboundSchema; + /** @deprecated use `TaskName$inboundSchema` instead. */ + export const inboundSchema = TaskName$inboundSchema; + /** @deprecated use `TaskName$outboundSchema` instead. */ + export const outboundSchema = TaskName$outboundSchema; } /** @internal */ -export const StartTaskRequest$inboundSchema: z.ZodType = - z.object({ - taskName: TaskName$inboundSchema, - }); +export const StartTaskRequest$inboundSchema: z.ZodType< + StartTaskRequest, + z.ZodTypeDef, + unknown +> = z.object({ + taskName: TaskName$inboundSchema, +}); /** @internal */ export type StartTaskRequest$Outbound = { - taskName: string; + taskName: string; }; /** @internal */ export const StartTaskRequest$outboundSchema: z.ZodType< - StartTaskRequest$Outbound, - z.ZodTypeDef, - StartTaskRequest + StartTaskRequest$Outbound, + z.ZodTypeDef, + StartTaskRequest > = z.object({ - taskName: TaskName$outboundSchema, + taskName: TaskName$outboundSchema, }); /** @@ -89,67 +94,66 @@ export const StartTaskRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartTaskRequest$ { - /** @deprecated use `StartTaskRequest$inboundSchema` instead. */ - export const inboundSchema = StartTaskRequest$inboundSchema; - /** @deprecated use `StartTaskRequest$outboundSchema` instead. */ - export const outboundSchema = StartTaskRequest$outboundSchema; - /** @deprecated use `StartTaskRequest$Outbound` instead. */ - export type Outbound = StartTaskRequest$Outbound; + /** @deprecated use `StartTaskRequest$inboundSchema` instead. */ + export const inboundSchema = StartTaskRequest$inboundSchema; + /** @deprecated use `StartTaskRequest$outboundSchema` instead. */ + export const outboundSchema = StartTaskRequest$outboundSchema; + /** @deprecated use `StartTaskRequest$Outbound` instead. */ + export type Outbound = StartTaskRequest$Outbound; } /** @internal */ -export const StartTaskResponse$inboundSchema: z.ZodType = - z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); +export const StartTaskResponse$inboundSchema: z.ZodType< + StartTaskResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StartTaskResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StartTaskResponse$outboundSchema: z.ZodType< - StartTaskResponse$Outbound, - z.ZodTypeDef, - StartTaskResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StartTaskResponse$Outbound, + z.ZodTypeDef, + StartTaskResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartTaskResponse$ { - /** @deprecated use `StartTaskResponse$inboundSchema` instead. */ - export const inboundSchema = StartTaskResponse$inboundSchema; - /** @deprecated use `StartTaskResponse$outboundSchema` instead. */ - export const outboundSchema = StartTaskResponse$outboundSchema; - /** @deprecated use `StartTaskResponse$Outbound` instead. */ - export type Outbound = StartTaskResponse$Outbound; + /** @deprecated use `StartTaskResponse$inboundSchema` instead. */ + export const inboundSchema = StartTaskResponse$inboundSchema; + /** @deprecated use `StartTaskResponse$outboundSchema` instead. */ + export const outboundSchema = StartTaskResponse$outboundSchema; + /** @deprecated use `StartTaskResponse$Outbound` instead. */ + export type Outbound = StartTaskResponse$Outbound; } diff --git a/src/sdk/models/operations/startuniversaltranscode.ts b/src/sdk/models/operations/startuniversaltranscode.ts index b5d1ed72..9695555b 100644 --- a/src/sdk/models/operations/startuniversaltranscode.ts +++ b/src/sdk/models/operations/startuniversaltranscode.ts @@ -2,157 +2,157 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StartUniversalTranscodeRequest = { - /** - * Whether the media item has MDE - */ - hasMDE: number; - /** - * The path to the media item to transcode - */ - path: string; - /** - * The index of the media item to transcode - */ - mediaIndex: number; - /** - * The index of the part to transcode - */ - partIndex: number; - /** - * The protocol to use for the transcode session - */ - protocol: string; - /** - * Whether to use fast seek or not - */ - fastSeek?: number | undefined; - /** - * Whether to use direct play or not - */ - directPlay?: number | undefined; - /** - * Whether to use direct stream or not - */ - directStream?: number | undefined; - /** - * The size of the subtitles - */ - subtitleSize?: number | undefined; - /** - * The subtitles - */ - subtites?: string | undefined; - /** - * The audio boost - */ - audioBoost?: number | undefined; - /** - * The location of the transcode session - */ - location?: string | undefined; - /** - * The size of the media buffer - */ - mediaBufferSize?: number | undefined; - /** - * The session ID - */ - session?: string | undefined; - /** - * Whether to add a debug overlay or not - */ - addDebugOverlay?: number | undefined; - /** - * Whether to auto adjust quality or not - */ - autoAdjustQuality?: number | undefined; + /** + * Whether the media item has MDE + */ + hasMDE: number; + /** + * The path to the media item to transcode + */ + path: string; + /** + * The index of the media item to transcode + */ + mediaIndex: number; + /** + * The index of the part to transcode + */ + partIndex: number; + /** + * The protocol to use for the transcode session + */ + protocol: string; + /** + * Whether to use fast seek or not + */ + fastSeek?: number | undefined; + /** + * Whether to use direct play or not + */ + directPlay?: number | undefined; + /** + * Whether to use direct stream or not + */ + directStream?: number | undefined; + /** + * The size of the subtitles + */ + subtitleSize?: number | undefined; + /** + * The subtitles + */ + subtites?: string | undefined; + /** + * The audio boost + */ + audioBoost?: number | undefined; + /** + * The location of the transcode session + */ + location?: string | undefined; + /** + * The size of the media buffer + */ + mediaBufferSize?: number | undefined; + /** + * The session ID + */ + session?: string | undefined; + /** + * Whether to add a debug overlay or not + */ + addDebugOverlay?: number | undefined; + /** + * Whether to auto adjust quality or not + */ + autoAdjustQuality?: number | undefined; }; export type StartUniversalTranscodeResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const StartUniversalTranscodeRequest$inboundSchema: z.ZodType< - StartUniversalTranscodeRequest, - z.ZodTypeDef, - unknown + StartUniversalTranscodeRequest, + z.ZodTypeDef, + unknown > = z.object({ - hasMDE: z.number(), - path: z.string(), - mediaIndex: z.number(), - partIndex: z.number(), - protocol: z.string(), - fastSeek: z.number().optional(), - directPlay: z.number().optional(), - directStream: z.number().optional(), - subtitleSize: z.number().optional(), - subtites: z.string().optional(), - audioBoost: z.number().optional(), - location: z.string().optional(), - mediaBufferSize: z.number().optional(), - session: z.string().optional(), - addDebugOverlay: z.number().optional(), - autoAdjustQuality: z.number().optional(), + hasMDE: z.number(), + path: z.string(), + mediaIndex: z.number(), + partIndex: z.number(), + protocol: z.string(), + fastSeek: z.number().optional(), + directPlay: z.number().optional(), + directStream: z.number().optional(), + subtitleSize: z.number().optional(), + subtites: z.string().optional(), + audioBoost: z.number().optional(), + location: z.string().optional(), + mediaBufferSize: z.number().optional(), + session: z.string().optional(), + addDebugOverlay: z.number().optional(), + autoAdjustQuality: z.number().optional(), }); /** @internal */ export type StartUniversalTranscodeRequest$Outbound = { - hasMDE: number; - path: string; - mediaIndex: number; - partIndex: number; - protocol: string; - fastSeek?: number | undefined; - directPlay?: number | undefined; - directStream?: number | undefined; - subtitleSize?: number | undefined; - subtites?: string | undefined; - audioBoost?: number | undefined; - location?: string | undefined; - mediaBufferSize?: number | undefined; - session?: string | undefined; - addDebugOverlay?: number | undefined; - autoAdjustQuality?: number | undefined; + hasMDE: number; + path: string; + mediaIndex: number; + partIndex: number; + protocol: string; + fastSeek?: number | undefined; + directPlay?: number | undefined; + directStream?: number | undefined; + subtitleSize?: number | undefined; + subtites?: string | undefined; + audioBoost?: number | undefined; + location?: string | undefined; + mediaBufferSize?: number | undefined; + session?: string | undefined; + addDebugOverlay?: number | undefined; + autoAdjustQuality?: number | undefined; }; /** @internal */ export const StartUniversalTranscodeRequest$outboundSchema: z.ZodType< - StartUniversalTranscodeRequest$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeRequest + StartUniversalTranscodeRequest$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeRequest > = z.object({ - hasMDE: z.number(), - path: z.string(), - mediaIndex: z.number(), - partIndex: z.number(), - protocol: z.string(), - fastSeek: z.number().optional(), - directPlay: z.number().optional(), - directStream: z.number().optional(), - subtitleSize: z.number().optional(), - subtites: z.string().optional(), - audioBoost: z.number().optional(), - location: z.string().optional(), - mediaBufferSize: z.number().optional(), - session: z.string().optional(), - addDebugOverlay: z.number().optional(), - autoAdjustQuality: z.number().optional(), + hasMDE: z.number(), + path: z.string(), + mediaIndex: z.number(), + partIndex: z.number(), + protocol: z.string(), + fastSeek: z.number().optional(), + directPlay: z.number().optional(), + directStream: z.number().optional(), + subtitleSize: z.number().optional(), + subtites: z.string().optional(), + audioBoost: z.number().optional(), + location: z.string().optional(), + mediaBufferSize: z.number().optional(), + session: z.string().optional(), + addDebugOverlay: z.number().optional(), + autoAdjustQuality: z.number().optional(), }); /** @@ -160,70 +160,66 @@ export const StartUniversalTranscodeRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartUniversalTranscodeRequest$ { - /** @deprecated use `StartUniversalTranscodeRequest$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeRequest$inboundSchema; - /** @deprecated use `StartUniversalTranscodeRequest$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeRequest$outboundSchema; - /** @deprecated use `StartUniversalTranscodeRequest$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeRequest$Outbound; + /** @deprecated use `StartUniversalTranscodeRequest$inboundSchema` instead. */ + export const inboundSchema = StartUniversalTranscodeRequest$inboundSchema; + /** @deprecated use `StartUniversalTranscodeRequest$outboundSchema` instead. */ + export const outboundSchema = StartUniversalTranscodeRequest$outboundSchema; + /** @deprecated use `StartUniversalTranscodeRequest$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeRequest$Outbound; } /** @internal */ export const StartUniversalTranscodeResponse$inboundSchema: z.ZodType< - StartUniversalTranscodeResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + StartUniversalTranscodeResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StartUniversalTranscodeResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StartUniversalTranscodeResponse$outboundSchema: z.ZodType< - StartUniversalTranscodeResponse$Outbound, - z.ZodTypeDef, - StartUniversalTranscodeResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StartUniversalTranscodeResponse$Outbound, + z.ZodTypeDef, + StartUniversalTranscodeResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StartUniversalTranscodeResponse$ { - /** @deprecated use `StartUniversalTranscodeResponse$inboundSchema` instead. */ - export const inboundSchema = StartUniversalTranscodeResponse$inboundSchema; - /** @deprecated use `StartUniversalTranscodeResponse$outboundSchema` instead. */ - export const outboundSchema = StartUniversalTranscodeResponse$outboundSchema; - /** @deprecated use `StartUniversalTranscodeResponse$Outbound` instead. */ - export type Outbound = StartUniversalTranscodeResponse$Outbound; + /** @deprecated use `StartUniversalTranscodeResponse$inboundSchema` instead. */ + export const inboundSchema = StartUniversalTranscodeResponse$inboundSchema; + /** @deprecated use `StartUniversalTranscodeResponse$outboundSchema` instead. */ + export const outboundSchema = StartUniversalTranscodeResponse$outboundSchema; + /** @deprecated use `StartUniversalTranscodeResponse$Outbound` instead. */ + export type Outbound = StartUniversalTranscodeResponse$Outbound; } diff --git a/src/sdk/models/operations/stopalltasks.ts b/src/sdk/models/operations/stopalltasks.ts index f97e4cad..ae87f9ba 100644 --- a/src/sdk/models/operations/stopalltasks.ts +++ b/src/sdk/models/operations/stopalltasks.ts @@ -2,80 +2,76 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StopAllTasksResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const StopAllTasksResponse$inboundSchema: z.ZodType< - StopAllTasksResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + StopAllTasksResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StopAllTasksResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StopAllTasksResponse$outboundSchema: z.ZodType< - StopAllTasksResponse$Outbound, - z.ZodTypeDef, - StopAllTasksResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StopAllTasksResponse$Outbound, + z.ZodTypeDef, + StopAllTasksResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopAllTasksResponse$ { - /** @deprecated use `StopAllTasksResponse$inboundSchema` instead. */ - export const inboundSchema = StopAllTasksResponse$inboundSchema; - /** @deprecated use `StopAllTasksResponse$outboundSchema` instead. */ - export const outboundSchema = StopAllTasksResponse$outboundSchema; - /** @deprecated use `StopAllTasksResponse$Outbound` instead. */ - export type Outbound = StopAllTasksResponse$Outbound; + /** @deprecated use `StopAllTasksResponse$inboundSchema` instead. */ + export const inboundSchema = StopAllTasksResponse$inboundSchema; + /** @deprecated use `StopAllTasksResponse$outboundSchema` instead. */ + export const outboundSchema = StopAllTasksResponse$outboundSchema; + /** @deprecated use `StopAllTasksResponse$Outbound` instead. */ + export type Outbound = StopAllTasksResponse$Outbound; } diff --git a/src/sdk/models/operations/stoptask.ts b/src/sdk/models/operations/stoptask.ts index b883bb1d..98a9c72d 100644 --- a/src/sdk/models/operations/stoptask.ts +++ b/src/sdk/models/operations/stoptask.ts @@ -2,88 +2,93 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * The name of the task to be started. */ export enum PathParamTaskName { - BackupDatabase = "BackupDatabase", - BuildGracenoteCollections = "BuildGracenoteCollections", - CheckForUpdates = "CheckForUpdates", - CleanOldBundles = "CleanOldBundles", - CleanOldCacheFiles = "CleanOldCacheFiles", - DeepMediaAnalysis = "DeepMediaAnalysis", - GenerateAutoTags = "GenerateAutoTags", - GenerateChapterThumbs = "GenerateChapterThumbs", - GenerateMediaIndexFiles = "GenerateMediaIndexFiles", - OptimizeDatabase = "OptimizeDatabase", - RefreshLibraries = "RefreshLibraries", - RefreshLocalMedia = "RefreshLocalMedia", - RefreshPeriodicMetadata = "RefreshPeriodicMetadata", - UpgradeMediaAnalysis = "UpgradeMediaAnalysis", + BackupDatabase = "BackupDatabase", + BuildGracenoteCollections = "BuildGracenoteCollections", + CheckForUpdates = "CheckForUpdates", + CleanOldBundles = "CleanOldBundles", + CleanOldCacheFiles = "CleanOldCacheFiles", + DeepMediaAnalysis = "DeepMediaAnalysis", + GenerateAutoTags = "GenerateAutoTags", + GenerateChapterThumbs = "GenerateChapterThumbs", + GenerateMediaIndexFiles = "GenerateMediaIndexFiles", + OptimizeDatabase = "OptimizeDatabase", + RefreshLibraries = "RefreshLibraries", + RefreshLocalMedia = "RefreshLocalMedia", + RefreshPeriodicMetadata = "RefreshPeriodicMetadata", + UpgradeMediaAnalysis = "UpgradeMediaAnalysis", } export type StopTaskRequest = { - /** - * The name of the task to be started. - */ - taskName: PathParamTaskName; + /** + * The name of the task to be started. + */ + taskName: PathParamTaskName; }; export type StopTaskResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const PathParamTaskName$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(PathParamTaskName); +export const PathParamTaskName$inboundSchema: z.ZodNativeEnum< + typeof PathParamTaskName +> = z.nativeEnum(PathParamTaskName); /** @internal */ -export const PathParamTaskName$outboundSchema: z.ZodNativeEnum = - PathParamTaskName$inboundSchema; +export const PathParamTaskName$outboundSchema: z.ZodNativeEnum< + typeof PathParamTaskName +> = PathParamTaskName$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PathParamTaskName$ { - /** @deprecated use `PathParamTaskName$inboundSchema` instead. */ - export const inboundSchema = PathParamTaskName$inboundSchema; - /** @deprecated use `PathParamTaskName$outboundSchema` instead. */ - export const outboundSchema = PathParamTaskName$outboundSchema; + /** @deprecated use `PathParamTaskName$inboundSchema` instead. */ + export const inboundSchema = PathParamTaskName$inboundSchema; + /** @deprecated use `PathParamTaskName$outboundSchema` instead. */ + export const outboundSchema = PathParamTaskName$outboundSchema; } /** @internal */ -export const StopTaskRequest$inboundSchema: z.ZodType = - z.object({ - taskName: PathParamTaskName$inboundSchema, - }); +export const StopTaskRequest$inboundSchema: z.ZodType< + StopTaskRequest, + z.ZodTypeDef, + unknown +> = z.object({ + taskName: PathParamTaskName$inboundSchema, +}); /** @internal */ export type StopTaskRequest$Outbound = { - taskName: string; + taskName: string; }; /** @internal */ export const StopTaskRequest$outboundSchema: z.ZodType< - StopTaskRequest$Outbound, - z.ZodTypeDef, - StopTaskRequest + StopTaskRequest$Outbound, + z.ZodTypeDef, + StopTaskRequest > = z.object({ - taskName: PathParamTaskName$outboundSchema, + taskName: PathParamTaskName$outboundSchema, }); /** @@ -91,66 +96,66 @@ export const StopTaskRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTaskRequest$ { - /** @deprecated use `StopTaskRequest$inboundSchema` instead. */ - export const inboundSchema = StopTaskRequest$inboundSchema; - /** @deprecated use `StopTaskRequest$outboundSchema` instead. */ - export const outboundSchema = StopTaskRequest$outboundSchema; - /** @deprecated use `StopTaskRequest$Outbound` instead. */ - export type Outbound = StopTaskRequest$Outbound; + /** @deprecated use `StopTaskRequest$inboundSchema` instead. */ + export const inboundSchema = StopTaskRequest$inboundSchema; + /** @deprecated use `StopTaskRequest$outboundSchema` instead. */ + export const outboundSchema = StopTaskRequest$outboundSchema; + /** @deprecated use `StopTaskRequest$Outbound` instead. */ + export type Outbound = StopTaskRequest$Outbound; } /** @internal */ -export const StopTaskResponse$inboundSchema: z.ZodType = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); +export const StopTaskResponse$inboundSchema: z.ZodType< + StopTaskResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StopTaskResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StopTaskResponse$outboundSchema: z.ZodType< - StopTaskResponse$Outbound, - z.ZodTypeDef, - StopTaskResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StopTaskResponse$Outbound, + z.ZodTypeDef, + StopTaskResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTaskResponse$ { - /** @deprecated use `StopTaskResponse$inboundSchema` instead. */ - export const inboundSchema = StopTaskResponse$inboundSchema; - /** @deprecated use `StopTaskResponse$outboundSchema` instead. */ - export const outboundSchema = StopTaskResponse$outboundSchema; - /** @deprecated use `StopTaskResponse$Outbound` instead. */ - export type Outbound = StopTaskResponse$Outbound; + /** @deprecated use `StopTaskResponse$inboundSchema` instead. */ + export const inboundSchema = StopTaskResponse$inboundSchema; + /** @deprecated use `StopTaskResponse$outboundSchema` instead. */ + export const outboundSchema = StopTaskResponse$outboundSchema; + /** @deprecated use `StopTaskResponse$Outbound` instead. */ + export type Outbound = StopTaskResponse$Outbound; } diff --git a/src/sdk/models/operations/stoptranscodesession.ts b/src/sdk/models/operations/stoptranscodesession.ts index 6794f61e..5c48e290 100644 --- a/src/sdk/models/operations/stoptranscodesession.ts +++ b/src/sdk/models/operations/stoptranscodesession.ts @@ -2,52 +2,52 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type StopTranscodeSessionRequest = { - /** - * the Key of the transcode session to stop - */ - sessionKey: string; + /** + * the Key of the transcode session to stop + */ + sessionKey: string; }; export type StopTranscodeSessionResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const StopTranscodeSessionRequest$inboundSchema: z.ZodType< - StopTranscodeSessionRequest, - z.ZodTypeDef, - unknown + StopTranscodeSessionRequest, + z.ZodTypeDef, + unknown > = z.object({ - sessionKey: z.string(), + sessionKey: z.string(), }); /** @internal */ export type StopTranscodeSessionRequest$Outbound = { - sessionKey: string; + sessionKey: string; }; /** @internal */ export const StopTranscodeSessionRequest$outboundSchema: z.ZodType< - StopTranscodeSessionRequest$Outbound, - z.ZodTypeDef, - StopTranscodeSessionRequest + StopTranscodeSessionRequest$Outbound, + z.ZodTypeDef, + StopTranscodeSessionRequest > = z.object({ - sessionKey: z.string(), + sessionKey: z.string(), }); /** @@ -55,70 +55,66 @@ export const StopTranscodeSessionRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTranscodeSessionRequest$ { - /** @deprecated use `StopTranscodeSessionRequest$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionRequest$inboundSchema; - /** @deprecated use `StopTranscodeSessionRequest$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionRequest$outboundSchema; - /** @deprecated use `StopTranscodeSessionRequest$Outbound` instead. */ - export type Outbound = StopTranscodeSessionRequest$Outbound; + /** @deprecated use `StopTranscodeSessionRequest$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionRequest$inboundSchema; + /** @deprecated use `StopTranscodeSessionRequest$outboundSchema` instead. */ + export const outboundSchema = StopTranscodeSessionRequest$outboundSchema; + /** @deprecated use `StopTranscodeSessionRequest$Outbound` instead. */ + export type Outbound = StopTranscodeSessionRequest$Outbound; } /** @internal */ export const StopTranscodeSessionResponse$inboundSchema: z.ZodType< - StopTranscodeSessionResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + StopTranscodeSessionResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type StopTranscodeSessionResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const StopTranscodeSessionResponse$outboundSchema: z.ZodType< - StopTranscodeSessionResponse$Outbound, - z.ZodTypeDef, - StopTranscodeSessionResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + StopTranscodeSessionResponse$Outbound, + z.ZodTypeDef, + StopTranscodeSessionResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace StopTranscodeSessionResponse$ { - /** @deprecated use `StopTranscodeSessionResponse$inboundSchema` instead. */ - export const inboundSchema = StopTranscodeSessionResponse$inboundSchema; - /** @deprecated use `StopTranscodeSessionResponse$outboundSchema` instead. */ - export const outboundSchema = StopTranscodeSessionResponse$outboundSchema; - /** @deprecated use `StopTranscodeSessionResponse$Outbound` instead. */ - export type Outbound = StopTranscodeSessionResponse$Outbound; + /** @deprecated use `StopTranscodeSessionResponse$inboundSchema` instead. */ + export const inboundSchema = StopTranscodeSessionResponse$inboundSchema; + /** @deprecated use `StopTranscodeSessionResponse$outboundSchema` instead. */ + export const outboundSchema = StopTranscodeSessionResponse$outboundSchema; + /** @deprecated use `StopTranscodeSessionResponse$Outbound` instead. */ + export type Outbound = StopTranscodeSessionResponse$Outbound; } diff --git a/src/sdk/models/operations/updateplaylist.ts b/src/sdk/models/operations/updateplaylist.ts index 62d9be61..443e389b 100644 --- a/src/sdk/models/operations/updateplaylist.ts +++ b/src/sdk/models/operations/updateplaylist.ts @@ -2,66 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdatePlaylistRequest = { - /** - * the ID of the playlist - */ - playlistID: number; - /** - * name of the playlist - */ - title?: string | undefined; - /** - * summary description of the playlist - */ - summary?: string | undefined; + /** + * the ID of the playlist + */ + playlistID: number; + /** + * name of the playlist + */ + title?: string | undefined; + /** + * summary description of the playlist + */ + summary?: string | undefined; }; export type UpdatePlaylistResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const UpdatePlaylistRequest$inboundSchema: z.ZodType< - UpdatePlaylistRequest, - z.ZodTypeDef, - unknown + UpdatePlaylistRequest, + z.ZodTypeDef, + unknown > = z.object({ - playlistID: z.number(), - title: z.string().optional(), - summary: z.string().optional(), + playlistID: z.number(), + title: z.string().optional(), + summary: z.string().optional(), }); /** @internal */ export type UpdatePlaylistRequest$Outbound = { - playlistID: number; - title?: string | undefined; - summary?: string | undefined; + playlistID: number; + title?: string | undefined; + summary?: string | undefined; }; /** @internal */ export const UpdatePlaylistRequest$outboundSchema: z.ZodType< - UpdatePlaylistRequest$Outbound, - z.ZodTypeDef, - UpdatePlaylistRequest + UpdatePlaylistRequest$Outbound, + z.ZodTypeDef, + UpdatePlaylistRequest > = z.object({ - playlistID: z.number(), - title: z.string().optional(), - summary: z.string().optional(), + playlistID: z.number(), + title: z.string().optional(), + summary: z.string().optional(), }); /** @@ -69,70 +69,66 @@ export const UpdatePlaylistRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlaylistRequest$ { - /** @deprecated use `UpdatePlaylistRequest$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistRequest$inboundSchema; - /** @deprecated use `UpdatePlaylistRequest$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistRequest$outboundSchema; - /** @deprecated use `UpdatePlaylistRequest$Outbound` instead. */ - export type Outbound = UpdatePlaylistRequest$Outbound; + /** @deprecated use `UpdatePlaylistRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistRequest$inboundSchema; + /** @deprecated use `UpdatePlaylistRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistRequest$outboundSchema; + /** @deprecated use `UpdatePlaylistRequest$Outbound` instead. */ + export type Outbound = UpdatePlaylistRequest$Outbound; } /** @internal */ export const UpdatePlaylistResponse$inboundSchema: z.ZodType< - UpdatePlaylistResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UpdatePlaylistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UpdatePlaylistResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const UpdatePlaylistResponse$outboundSchema: z.ZodType< - UpdatePlaylistResponse$Outbound, - z.ZodTypeDef, - UpdatePlaylistResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UpdatePlaylistResponse$Outbound, + z.ZodTypeDef, + UpdatePlaylistResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlaylistResponse$ { - /** @deprecated use `UpdatePlaylistResponse$inboundSchema` instead. */ - export const inboundSchema = UpdatePlaylistResponse$inboundSchema; - /** @deprecated use `UpdatePlaylistResponse$outboundSchema` instead. */ - export const outboundSchema = UpdatePlaylistResponse$outboundSchema; - /** @deprecated use `UpdatePlaylistResponse$Outbound` instead. */ - export type Outbound = UpdatePlaylistResponse$Outbound; + /** @deprecated use `UpdatePlaylistResponse$inboundSchema` instead. */ + export const inboundSchema = UpdatePlaylistResponse$inboundSchema; + /** @deprecated use `UpdatePlaylistResponse$outboundSchema` instead. */ + export const outboundSchema = UpdatePlaylistResponse$outboundSchema; + /** @deprecated use `UpdatePlaylistResponse$Outbound` instead. */ + export type Outbound = UpdatePlaylistResponse$Outbound; } diff --git a/src/sdk/models/operations/updateplayprogress.ts b/src/sdk/models/operations/updateplayprogress.ts index abe1763a..32ecefcf 100644 --- a/src/sdk/models/operations/updateplayprogress.ts +++ b/src/sdk/models/operations/updateplayprogress.ts @@ -2,66 +2,66 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; export type UpdatePlayProgressRequest = { - /** - * the media key - */ - key: string; - /** - * The time, in milliseconds, used to set the media playback progress. - */ - time: number; - /** - * The playback state of the media item. - */ - state: string; + /** + * the media key + */ + key: string; + /** + * The time, in milliseconds, used to set the media playback progress. + */ + time: number; + /** + * The playback state of the media item. + */ + state: string; }; export type UpdatePlayProgressResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ export const UpdatePlayProgressRequest$inboundSchema: z.ZodType< - UpdatePlayProgressRequest, - z.ZodTypeDef, - unknown + UpdatePlayProgressRequest, + z.ZodTypeDef, + unknown > = z.object({ - key: z.string(), - time: z.number(), - state: z.string(), + key: z.string(), + time: z.number(), + state: z.string(), }); /** @internal */ export type UpdatePlayProgressRequest$Outbound = { - key: string; - time: number; - state: string; + key: string; + time: number; + state: string; }; /** @internal */ export const UpdatePlayProgressRequest$outboundSchema: z.ZodType< - UpdatePlayProgressRequest$Outbound, - z.ZodTypeDef, - UpdatePlayProgressRequest + UpdatePlayProgressRequest$Outbound, + z.ZodTypeDef, + UpdatePlayProgressRequest > = z.object({ - key: z.string(), - time: z.number(), - state: z.string(), + key: z.string(), + time: z.number(), + state: z.string(), }); /** @@ -69,70 +69,66 @@ export const UpdatePlayProgressRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlayProgressRequest$ { - /** @deprecated use `UpdatePlayProgressRequest$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressRequest$inboundSchema; - /** @deprecated use `UpdatePlayProgressRequest$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressRequest$outboundSchema; - /** @deprecated use `UpdatePlayProgressRequest$Outbound` instead. */ - export type Outbound = UpdatePlayProgressRequest$Outbound; + /** @deprecated use `UpdatePlayProgressRequest$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressRequest$inboundSchema; + /** @deprecated use `UpdatePlayProgressRequest$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressRequest$outboundSchema; + /** @deprecated use `UpdatePlayProgressRequest$Outbound` instead. */ + export type Outbound = UpdatePlayProgressRequest$Outbound; } /** @internal */ export const UpdatePlayProgressResponse$inboundSchema: z.ZodType< - UpdatePlayProgressResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UpdatePlayProgressResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UpdatePlayProgressResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const UpdatePlayProgressResponse$outboundSchema: z.ZodType< - UpdatePlayProgressResponse$Outbound, - z.ZodTypeDef, - UpdatePlayProgressResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UpdatePlayProgressResponse$Outbound, + z.ZodTypeDef, + UpdatePlayProgressResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdatePlayProgressResponse$ { - /** @deprecated use `UpdatePlayProgressResponse$inboundSchema` instead. */ - export const inboundSchema = UpdatePlayProgressResponse$inboundSchema; - /** @deprecated use `UpdatePlayProgressResponse$outboundSchema` instead. */ - export const outboundSchema = UpdatePlayProgressResponse$outboundSchema; - /** @deprecated use `UpdatePlayProgressResponse$Outbound` instead. */ - export type Outbound = UpdatePlayProgressResponse$Outbound; + /** @deprecated use `UpdatePlayProgressResponse$inboundSchema` instead. */ + export const inboundSchema = UpdatePlayProgressResponse$inboundSchema; + /** @deprecated use `UpdatePlayProgressResponse$outboundSchema` instead. */ + export const outboundSchema = UpdatePlayProgressResponse$outboundSchema; + /** @deprecated use `UpdatePlayProgressResponse$Outbound` instead. */ + export type Outbound = UpdatePlayProgressResponse$Outbound; } diff --git a/src/sdk/models/operations/uploadplaylist.ts b/src/sdk/models/operations/uploadplaylist.ts index 9561305c..808c5ae5 100644 --- a/src/sdk/models/operations/uploadplaylist.ts +++ b/src/sdk/models/operations/uploadplaylist.ts @@ -2,8 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { remap as remap$ } from "../../../lib/primitives.js"; import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; /** * Force overwriting of duplicate playlists. @@ -12,96 +12,95 @@ import * as z from "zod"; * By default, a playlist file uploaded with the same path will overwrite the existing playlist. * The `force` argument is used to disable overwriting. * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - * */ export enum QueryParamForce { - Zero = 0, - One = 1, + Zero = 0, + One = 1, } export type UploadPlaylistRequest = { - /** - * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. - * - * @remarks - * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. - * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. - * The GUID of each playlist is based on the filename. - * - */ - path: string; - /** - * Force overwriting of duplicate playlists. - * - * @remarks - * By default, a playlist file uploaded with the same path will overwrite the existing playlist. - * The `force` argument is used to disable overwriting. - * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. - * - */ - force: QueryParamForce; + /** + * absolute path to a directory on the server where m3u files are stored, or the absolute path to a playlist file on the server. + * + * @remarks + * If the `path` argument is a directory, that path will be scanned for playlist files to be processed. + * Each file in that directory creates a separate playlist, with a name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + * If the `path` argument is a file, that file will be used to create a new playlist, with the name based on the filename of the file that created it. + * The GUID of each playlist is based on the filename. + */ + path: string; + /** + * Force overwriting of duplicate playlists. + * + * @remarks + * By default, a playlist file uploaded with the same path will overwrite the existing playlist. + * The `force` argument is used to disable overwriting. + * If the `force` argument is set to 0, a new playlist will be created suffixed with the date and time that the duplicate was uploaded. + */ + force: QueryParamForce; }; export type UploadPlaylistResponse = { - /** - * HTTP response content type for this operation - */ - contentType: string; - /** - * HTTP response status code for this operation - */ - statusCode: number; - /** - * Raw HTTP response; suitable for custom response parsing - */ - rawResponse: Response; + /** + * HTTP response content type for this operation + */ + contentType: string; + /** + * HTTP response status code for this operation + */ + statusCode: number; + /** + * Raw HTTP response; suitable for custom response parsing + */ + rawResponse: Response; }; /** @internal */ -export const QueryParamForce$inboundSchema: z.ZodNativeEnum = - z.nativeEnum(QueryParamForce); +export const QueryParamForce$inboundSchema: z.ZodNativeEnum< + typeof QueryParamForce +> = z.nativeEnum(QueryParamForce); /** @internal */ -export const QueryParamForce$outboundSchema: z.ZodNativeEnum = - QueryParamForce$inboundSchema; +export const QueryParamForce$outboundSchema: z.ZodNativeEnum< + typeof QueryParamForce +> = QueryParamForce$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace QueryParamForce$ { - /** @deprecated use `QueryParamForce$inboundSchema` instead. */ - export const inboundSchema = QueryParamForce$inboundSchema; - /** @deprecated use `QueryParamForce$outboundSchema` instead. */ - export const outboundSchema = QueryParamForce$outboundSchema; + /** @deprecated use `QueryParamForce$inboundSchema` instead. */ + export const inboundSchema = QueryParamForce$inboundSchema; + /** @deprecated use `QueryParamForce$outboundSchema` instead. */ + export const outboundSchema = QueryParamForce$outboundSchema; } /** @internal */ export const UploadPlaylistRequest$inboundSchema: z.ZodType< - UploadPlaylistRequest, - z.ZodTypeDef, - unknown + UploadPlaylistRequest, + z.ZodTypeDef, + unknown > = z.object({ - path: z.string(), - force: QueryParamForce$inboundSchema, + path: z.string(), + force: QueryParamForce$inboundSchema, }); /** @internal */ export type UploadPlaylistRequest$Outbound = { - path: string; - force: number; + path: string; + force: number; }; /** @internal */ export const UploadPlaylistRequest$outboundSchema: z.ZodType< - UploadPlaylistRequest$Outbound, - z.ZodTypeDef, - UploadPlaylistRequest + UploadPlaylistRequest$Outbound, + z.ZodTypeDef, + UploadPlaylistRequest > = z.object({ - path: z.string(), - force: QueryParamForce$outboundSchema, + path: z.string(), + force: QueryParamForce$outboundSchema, }); /** @@ -109,70 +108,66 @@ export const UploadPlaylistRequest$outboundSchema: z.ZodType< * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadPlaylistRequest$ { - /** @deprecated use `UploadPlaylistRequest$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistRequest$inboundSchema; - /** @deprecated use `UploadPlaylistRequest$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistRequest$outboundSchema; - /** @deprecated use `UploadPlaylistRequest$Outbound` instead. */ - export type Outbound = UploadPlaylistRequest$Outbound; + /** @deprecated use `UploadPlaylistRequest$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistRequest$inboundSchema; + /** @deprecated use `UploadPlaylistRequest$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistRequest$outboundSchema; + /** @deprecated use `UploadPlaylistRequest$Outbound` instead. */ + export type Outbound = UploadPlaylistRequest$Outbound; } /** @internal */ export const UploadPlaylistResponse$inboundSchema: z.ZodType< - UploadPlaylistResponse, - z.ZodTypeDef, - unknown -> = z - .object({ - ContentType: z.string(), - StatusCode: z.number().int(), - RawResponse: z.instanceof(Response), - }) - .transform((v) => { - return remap$(v, { - ContentType: "contentType", - StatusCode: "statusCode", - RawResponse: "rawResponse", - }); - }); + UploadPlaylistResponse, + z.ZodTypeDef, + unknown +> = z.object({ + ContentType: z.string(), + StatusCode: z.number().int(), + RawResponse: z.instanceof(Response), +}).transform((v) => { + return remap$(v, { + "ContentType": "contentType", + "StatusCode": "statusCode", + "RawResponse": "rawResponse", + }); +}); /** @internal */ export type UploadPlaylistResponse$Outbound = { - ContentType: string; - StatusCode: number; - RawResponse: never; + ContentType: string; + StatusCode: number; + RawResponse: never; }; /** @internal */ export const UploadPlaylistResponse$outboundSchema: z.ZodType< - UploadPlaylistResponse$Outbound, - z.ZodTypeDef, - UploadPlaylistResponse -> = z - .object({ - contentType: z.string(), - statusCode: z.number().int(), - rawResponse: z.instanceof(Response).transform(() => { - throw new Error("Response cannot be serialized"); - }), - }) - .transform((v) => { - return remap$(v, { - contentType: "ContentType", - statusCode: "StatusCode", - rawResponse: "RawResponse", - }); - }); + UploadPlaylistResponse$Outbound, + z.ZodTypeDef, + UploadPlaylistResponse +> = z.object({ + contentType: z.string(), + statusCode: z.number().int(), + rawResponse: z.instanceof(Response).transform(() => { + throw new Error("Response cannot be serialized"); + }), +}).transform((v) => { + return remap$(v, { + contentType: "ContentType", + statusCode: "StatusCode", + rawResponse: "RawResponse", + }); +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UploadPlaylistResponse$ { - /** @deprecated use `UploadPlaylistResponse$inboundSchema` instead. */ - export const inboundSchema = UploadPlaylistResponse$inboundSchema; - /** @deprecated use `UploadPlaylistResponse$outboundSchema` instead. */ - export const outboundSchema = UploadPlaylistResponse$outboundSchema; - /** @deprecated use `UploadPlaylistResponse$Outbound` instead. */ - export type Outbound = UploadPlaylistResponse$Outbound; + /** @deprecated use `UploadPlaylistResponse$inboundSchema` instead. */ + export const inboundSchema = UploadPlaylistResponse$inboundSchema; + /** @deprecated use `UploadPlaylistResponse$outboundSchema` instead. */ + export const outboundSchema = UploadPlaylistResponse$outboundSchema; + /** @deprecated use `UploadPlaylistResponse$Outbound` instead. */ + export type Outbound = UploadPlaylistResponse$Outbound; } diff --git a/src/sdk/models/shared/security.ts b/src/sdk/models/shared/security.ts index 37c72148..df78a3b7 100644 --- a/src/sdk/models/shared/security.ts +++ b/src/sdk/models/shared/security.ts @@ -5,34 +5,41 @@ import * as z from "zod"; export type Security = { - accessToken?: string | undefined; + accessToken?: string | undefined; }; /** @internal */ -export const Security$inboundSchema: z.ZodType = z.object({ - accessToken: z.string().optional(), +export const Security$inboundSchema: z.ZodType< + Security, + z.ZodTypeDef, + unknown +> = z.object({ + accessToken: z.string().optional(), }); /** @internal */ export type Security$Outbound = { - accessToken?: string | undefined; + accessToken?: string | undefined; }; /** @internal */ -export const Security$outboundSchema: z.ZodType = - z.object({ - accessToken: z.string().optional(), - }); +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + accessToken: z.string().optional(), +}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; + /** @deprecated use `Security$inboundSchema` instead. */ + export const inboundSchema = Security$inboundSchema; + /** @deprecated use `Security$outboundSchema` instead. */ + export const outboundSchema = Security$outboundSchema; + /** @deprecated use `Security$Outbound` instead. */ + export type Outbound = Security$Outbound; } diff --git a/src/sdk/playlists.ts b/src/sdk/playlists.ts index 3352a387..6410e146 100644 --- a/src/sdk/playlists.ts +++ b/src/sdk/playlists.ts @@ -16,144 +16,177 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Playlists extends ClientSDK { - /** - * Create a Playlist - * - * @remarks - * Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: - * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). - * - `playQueueID` - To create a playlist from an existing play queue. - * - */ - async createPlaylist( - request: operations.CreatePlaylistRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsCreatePlaylist(this, request, options)); - } + /** + * Create a Playlist + * + * @remarks + * Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass: + * - `uri` - The content URI for what we're playing (e.g. `server://1234/com.plexapp.plugins.library/library/metadata/1`). + * - `playQueueID` - To create a playlist from an existing play queue. + */ + async createPlaylist( + request: operations.CreatePlaylistRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsCreatePlaylist( + this, + request, + options, + )); + } - /** - * Get All Playlists - * - * @remarks - * Get All Playlists given the specified filters. - */ - async getPlaylists( - playlistType?: operations.PlaylistType | undefined, - smart?: operations.QueryParamSmart | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsGetPlaylists(this, playlistType, smart, options)); - } + /** + * Get All Playlists + * + * @remarks + * Get All Playlists given the specified filters. + */ + async getPlaylists( + playlistType?: operations.PlaylistType | undefined, + smart?: operations.QueryParamSmart | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsGetPlaylists( + this, + playlistType, + smart, + options, + )); + } - /** - * Retrieve Playlist - * - * @remarks - * Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: - * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. - * - */ - async getPlaylist( - playlistID: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsGetPlaylist(this, playlistID, options)); - } + /** + * Retrieve Playlist + * + * @remarks + * Gets detailed metadata for a playlist. A playlist for many purposes (rating, editing metadata, tagging), can be treated like a regular metadata item: + * Smart playlist details contain the `content` attribute. This is the content URI for the generator. This can then be parsed by a client to provide smart playlist editing. + */ + async getPlaylist( + playlistID: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsGetPlaylist( + this, + playlistID, + options, + )); + } - /** - * Deletes a Playlist - * - * @remarks - * This endpoint will delete a playlist - * - */ - async deletePlaylist( - playlistID: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsDeletePlaylist(this, playlistID, options)); - } + /** + * Deletes a Playlist + * + * @remarks + * This endpoint will delete a playlist + */ + async deletePlaylist( + playlistID: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsDeletePlaylist( + this, + playlistID, + options, + )); + } - /** - * Update a Playlist - * - * @remarks - * From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` - * - */ - async updatePlaylist( - playlistID: number, - title?: string | undefined, - summary?: string | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsUpdatePlaylist(this, playlistID, title, summary, options)); - } + /** + * Update a Playlist + * + * @remarks + * From PMS version 1.9.1 clients can also edit playlist metadata using this endpoint as they would via `PUT /library/metadata/{playlistID}` + */ + async updatePlaylist( + playlistID: number, + title?: string | undefined, + summary?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsUpdatePlaylist( + this, + playlistID, + title, + summary, + options, + )); + } - /** - * Retrieve Playlist Contents - * - * @remarks - * Gets the contents of a playlist. Should be paged by clients via standard mechanisms. - * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. - * For example, you could use this to display a list of recently added albums vis a smart playlist. - * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. - * - */ - async getPlaylistContents( - playlistID: number, - type: operations.GetPlaylistContentsQueryParamType, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsGetPlaylistContents(this, playlistID, type, options)); - } + /** + * Retrieve Playlist Contents + * + * @remarks + * Gets the contents of a playlist. Should be paged by clients via standard mechanisms. + * By default leaves are returned (e.g. episodes, movies). In order to return other types you can use the `type` parameter. + * For example, you could use this to display a list of recently added albums vis a smart playlist. + * Note that for dumb playlists, items have a `playlistItemID` attribute which is used for deleting or moving items. + */ + async getPlaylistContents( + playlistID: number, + type: operations.GetPlaylistContentsQueryParamType, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsGetPlaylistContents( + this, + playlistID, + type, + options, + )); + } - /** - * Delete Playlist Contents - * - * @remarks - * Clears a playlist, only works with dumb playlists. Returns the playlist. - * - */ - async clearPlaylistContents( - playlistID: number, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsClearPlaylistContents(this, playlistID, options)); - } + /** + * Delete Playlist Contents + * + * @remarks + * Clears a playlist, only works with dumb playlists. Returns the playlist. + */ + async clearPlaylistContents( + playlistID: number, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsClearPlaylistContents( + this, + playlistID, + options, + )); + } - /** - * Adding to a Playlist - * - * @remarks - * Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. - * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. - * - */ - async addPlaylistContents( - playlistID: number, - uri: string, - playQueueID?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - playlistsAddPlaylistContents(this, playlistID, uri, playQueueID, options) - ); - } + /** + * Adding to a Playlist + * + * @remarks + * Adds a generator to a playlist, same parameters as the POST to create. With a dumb playlist, this adds the specified items to the playlist. + * With a smart playlist, passing a new `uri` parameter replaces the rules for the playlist. Returns the playlist. + */ + async addPlaylistContents( + playlistID: number, + uri: string, + playQueueID?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsAddPlaylistContents( + this, + playlistID, + uri, + playQueueID, + options, + )); + } - /** - * Upload Playlist - * - * @remarks - * Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. - * - */ - async uploadPlaylist( - path: string, - force: operations.QueryParamForce, - options?: RequestOptions - ): Promise { - return unwrapAsync(playlistsUploadPlaylist(this, path, force, options)); - } + /** + * Upload Playlist + * + * @remarks + * Imports m3u playlists by passing a path on the server to scan for m3u-formatted playlist files, or a path to a single playlist file. + */ + async uploadPlaylist( + path: string, + force: operations.QueryParamForce, + options?: RequestOptions, + ): Promise { + return unwrapAsync(playlistsUploadPlaylist( + this, + path, + force, + options, + )); + } } diff --git a/src/sdk/plex.ts b/src/sdk/plex.ts index 6e848acd..d9f597ab 100644 --- a/src/sdk/plex.ts +++ b/src/sdk/plex.ts @@ -14,91 +14,126 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Plex extends ClientSDK { - /** - * Get Companions Data - * - * @remarks - * Get Companions Data - */ - async getCompanionsData( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetCompanionsData(this, options)); - } + /** + * Get Companions Data + * + * @remarks + * Get Companions Data + */ + async getCompanionsData( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetCompanionsData( + this, + options, + )); + } - /** - * Get list of friends of the user logged in - * - * @remarks - * Get friends of provided auth token. - */ - async getUserFriends( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetUserFriends(this, options)); - } + /** + * Get list of friends of the user logged in + * + * @remarks + * Get friends of provided auth token. + */ + async getUserFriends( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetUserFriends( + this, + options, + )); + } - /** - * Get Geo Data - * - * @remarks - * Returns the geolocation and locale data of the caller - */ - async getGeoData( - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetGeoData(this, options)); - } + /** + * Get Geo Data + * + * @remarks + * Returns the geolocation and locale data of the caller + */ + async getGeoData( + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetGeoData( + this, + options, + )); + } - /** - * Get Plex Home Data - * - * @remarks - * Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. - */ - async getHomeData(options?: RequestOptions): Promise { - return unwrapAsync(plexGetHomeData(this, options)); - } + /** + * Get Plex Home Data + * + * @remarks + * Retrieves the home data for the authenticated user, including details like home ID, name, guest access information, and subscription status. + */ + async getHomeData( + options?: RequestOptions, + ): Promise { + return unwrapAsync(plexGetHomeData( + this, + options, + )); + } - /** - * Get Server Resources - * - * @remarks - * Get Plex server access tokens and server connections - */ - async getServerResources( - request: operations.GetServerResourcesRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetServerResources(this, request, options)); - } + /** + * Get Server Resources + * + * @remarks + * Get Plex server access tokens and server connections + */ + async getServerResources( + xPlexClientIdentifier?: string | undefined, + includeHttps?: operations.IncludeHttps | undefined, + includeRelay?: operations.IncludeRelay | undefined, + includeIPv6?: operations.IncludeIPv6 | undefined, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetServerResources( + this, + xPlexClientIdentifier, + includeHttps, + includeRelay, + includeIPv6, + options, + )); + } - /** - * Get a Pin - * - * @remarks - * Retrieve a Pin from Plex.tv for authentication flows - */ - async getPin( - strong?: boolean | undefined, - xPlexClientIdentifier?: string | undefined, - xPlexProduct?: string | undefined, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetPin(this, strong, xPlexClientIdentifier, xPlexProduct, options)); - } + /** + * Get a Pin + * + * @remarks + * Retrieve a Pin from Plex.tv for authentication flows + */ + async getPin( + strong?: boolean | undefined, + xPlexClientIdentifier?: string | undefined, + xPlexProduct?: string | undefined, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetPin( + this, + strong, + xPlexClientIdentifier, + xPlexProduct, + options, + )); + } - /** - * Get Access Token by PinId - * - * @remarks - * Retrieve an Access Token from Plex.tv after the Pin has been authenticated - */ - async getTokenByPinId( - pinID: number, - xPlexClientIdentifier?: string | undefined, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(plexGetTokenByPinId(this, pinID, xPlexClientIdentifier, options)); - } + /** + * Get Access Token by PinId + * + * @remarks + * Retrieve an Access Token from Plex.tv after the Pin has been authenticated + */ + async getTokenByPinId( + pinID: number, + xPlexClientIdentifier?: string | undefined, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(plexGetTokenByPinId( + this, + pinID, + xPlexClientIdentifier, + options, + )); + } } diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 81bdd08c..47b2af32 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -21,83 +21,83 @@ import { Video } from "./video.js"; import { Watchlist } from "./watchlist.js"; export class PlexAPI extends ClientSDK { - private _server?: Server; - get server(): Server { - return (this._server ??= new Server(this.options$)); - } + private _server?: Server; + get server(): Server { + return (this._server ??= new Server(this.options$)); + } - private _media?: Media; - get media(): Media { - return (this._media ??= new Media(this.options$)); - } + private _media?: Media; + get media(): Media { + return (this._media ??= new Media(this.options$)); + } - private _video?: Video; - get video(): Video { - return (this._video ??= new Video(this.options$)); - } + private _video?: Video; + get video(): Video { + return (this._video ??= new Video(this.options$)); + } - private _activities?: Activities; - get activities(): Activities { - return (this._activities ??= new Activities(this.options$)); - } + private _activities?: Activities; + get activities(): Activities { + return (this._activities ??= new Activities(this.options$)); + } - private _butler?: Butler; - get butler(): Butler { - return (this._butler ??= new Butler(this.options$)); - } + private _butler?: Butler; + get butler(): Butler { + return (this._butler ??= new Butler(this.options$)); + } - private _plex?: Plex; - get plex(): Plex { - return (this._plex ??= new Plex(this.options$)); - } + private _plex?: Plex; + get plex(): Plex { + return (this._plex ??= new Plex(this.options$)); + } - private _hubs?: Hubs; - get hubs(): Hubs { - return (this._hubs ??= new Hubs(this.options$)); - } + private _hubs?: Hubs; + get hubs(): Hubs { + return (this._hubs ??= new Hubs(this.options$)); + } - private _search?: Search; - get search(): Search { - return (this._search ??= new Search(this.options$)); - } + private _search?: Search; + get search(): Search { + return (this._search ??= new Search(this.options$)); + } - private _library?: Library; - get library(): Library { - return (this._library ??= new Library(this.options$)); - } + private _library?: Library; + get library(): Library { + return (this._library ??= new Library(this.options$)); + } - private _watchlist?: Watchlist; - get watchlist(): Watchlist { - return (this._watchlist ??= new Watchlist(this.options$)); - } + private _watchlist?: Watchlist; + get watchlist(): Watchlist { + return (this._watchlist ??= new Watchlist(this.options$)); + } - private _log?: Log; - get log(): Log { - return (this._log ??= new Log(this.options$)); - } + private _log?: Log; + get log(): Log { + return (this._log ??= new Log(this.options$)); + } - private _playlists?: Playlists; - get playlists(): Playlists { - return (this._playlists ??= new Playlists(this.options$)); - } + private _playlists?: Playlists; + get playlists(): Playlists { + return (this._playlists ??= new Playlists(this.options$)); + } - private _authentication?: Authentication; - get authentication(): Authentication { - return (this._authentication ??= new Authentication(this.options$)); - } + private _authentication?: Authentication; + get authentication(): Authentication { + return (this._authentication ??= new Authentication(this.options$)); + } - private _statistics?: Statistics; - get statistics(): Statistics { - return (this._statistics ??= new Statistics(this.options$)); - } + private _statistics?: Statistics; + get statistics(): Statistics { + return (this._statistics ??= new Statistics(this.options$)); + } - private _sessions?: Sessions; - get sessions(): Sessions { - return (this._sessions ??= new Sessions(this.options$)); - } + private _sessions?: Sessions; + get sessions(): Sessions { + return (this._sessions ??= new Sessions(this.options$)); + } - private _updater?: Updater; - get updater(): Updater { - return (this._updater ??= new Updater(this.options$)); - } + private _updater?: Updater; + get updater(): Updater { + return (this._updater ??= new Updater(this.options$)); + } } diff --git a/src/sdk/search.ts b/src/sdk/search.ts index 664af601..cbdab66c 100644 --- a/src/sdk/search.ts +++ b/src/sdk/search.ts @@ -10,62 +10,76 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Search extends ClientSDK { - /** - * Perform a search - * - * @remarks - * This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). - * - * In the response's items, the following extra attributes are returned to further describe or disambiguate the result: - * - * - `reason`: The reason for the result, if not because of a direct search term match; can be either: - * - `section`: There are multiple identical results from different sections. - * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). - * - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` - * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). - * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. - * - * This request is intended to be very fast, and called as the user types. - * - */ - async performSearch( - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(searchPerformSearch(this, query, sectionId, limit, options)); - } + /** + * Perform a search + * + * @remarks + * This endpoint performs a search across all library sections, or a single section, and returns matches as hubs, split up by type. It performs spell checking, looks for partial matches, and orders the hubs based on quality of results. In addition, based on matches, it will return other related matches (e.g. for a genre match, it may return movies in that genre, or for an actor match, movies with that actor). + * + * In the response's items, the following extra attributes are returned to further describe or disambiguate the result: + * + * - `reason`: The reason for the result, if not because of a direct search term match; can be either: + * - `section`: There are multiple identical results from different sections. + * - `originalTitle`: There was a search term match from the original title field (sometimes those can be very different or in a foreign language). + * - ``: If the reason for the result is due to a result in another hub, the source hub identifier is returned. For example, if the search is for "dylan" then Bob Dylan may be returned as an artist result, an a few of his albums returned as album results with a reason code of `artist` (the identifier of that particular hub). Or if the search is for "arnold", there might be movie results returned with a reason of `actor` + * - `reasonTitle`: The string associated with the reason code. For a section reason, it'll be the section name; For a hub identifier, it'll be a string associated with the match (e.g. `Arnold Schwarzenegger` for movies which were returned because the search was for "arnold"). + * - `reasonID`: The ID of the item associated with the reason for the result. This might be a section ID, a tag ID, an artist ID, or a show ID. + * + * This request is intended to be very fast, and called as the user types. + */ + async performSearch( + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchPerformSearch( + this, + query, + sectionId, + limit, + options, + )); + } - /** - * Perform a voice search - * - * @remarks - * This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. - * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. - * Whenever possible, clients should limit the search to the appropriate type. - * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. - * - */ - async performVoiceSearch( - query: string, - sectionId?: number | undefined, - limit?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(searchPerformVoiceSearch(this, query, sectionId, limit, options)); - } + /** + * Perform a voice search + * + * @remarks + * This endpoint performs a search specifically tailored towards voice or other imprecise input which may work badly with the substring and spell-checking heuristics used by the `/hubs/search` endpoint. + * It uses a [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance) heuristic to search titles, and as such is much slower than the other search endpoint. + * Whenever possible, clients should limit the search to the appropriate type. + * Results, as well as their containing per-type hubs, contain a `distance` attribute which can be used to judge result quality. + */ + async performVoiceSearch( + query: string, + sectionId?: number | undefined, + limit?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchPerformVoiceSearch( + this, + query, + sectionId, + limit, + options, + )); + } - /** - * Get Search Results - * - * @remarks - * This will search the database for the string provided. - */ - async getSearchResults( - query: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(searchGetSearchResults(this, query, options)); - } + /** + * Get Search Results + * + * @remarks + * This will search the database for the string provided. + */ + async getSearchResults( + query: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(searchGetSearchResults( + this, + query, + options, + )); + } } diff --git a/src/sdk/server.ts b/src/sdk/server.ts index 239c3cc7..3efa889c 100644 --- a/src/sdk/server.ts +++ b/src/sdk/server.ts @@ -16,108 +16,142 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Server extends ClientSDK { - /** - * Get Server Capabilities - * - * @remarks - * Get Server Capabilities - */ - async getServerCapabilities( - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetServerCapabilities(this, options)); - } + /** + * Get Server Capabilities + * + * @remarks + * Get Server Capabilities + */ + async getServerCapabilities( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetServerCapabilities( + this, + options, + )); + } - /** - * Get Server Preferences - * - * @remarks - * Get Server Preferences - */ - async getServerPreferences( - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetServerPreferences(this, options)); - } + /** + * Get Server Preferences + * + * @remarks + * Get Server Preferences + */ + async getServerPreferences( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetServerPreferences( + this, + options, + )); + } - /** - * Get Available Clients - * - * @remarks - * Get Available Clients - */ - async getAvailableClients( - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetAvailableClients(this, options)); - } + /** + * Get Available Clients + * + * @remarks + * Get Available Clients + */ + async getAvailableClients( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetAvailableClients( + this, + options, + )); + } - /** - * Get Devices - * - * @remarks - * Get Devices - */ - async getDevices(options?: RequestOptions): Promise { - return unwrapAsync(serverGetDevices(this, options)); - } + /** + * Get Devices + * + * @remarks + * Get Devices + */ + async getDevices( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetDevices( + this, + options, + )); + } - /** - * Get Server Identity - * - * @remarks - * This request is useful to determine if the server is online or offline - */ - async getServerIdentity( - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetServerIdentity(this, options)); - } + /** + * Get Server Identity + * + * @remarks + * This request is useful to determine if the server is online or offline + */ + async getServerIdentity( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetServerIdentity( + this, + options, + )); + } - /** - * Get MyPlex Account - * - * @remarks - * Returns MyPlex Account Information - */ - async getMyPlexAccount(options?: RequestOptions): Promise { - return unwrapAsync(serverGetMyPlexAccount(this, options)); - } + /** + * Get MyPlex Account + * + * @remarks + * Returns MyPlex Account Information + */ + async getMyPlexAccount( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetMyPlexAccount( + this, + options, + )); + } - /** - * Get a Resized Photo - * - * @remarks - * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. - * - */ - async getResizedPhoto( - request: operations.GetResizedPhotoRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetResizedPhoto(this, request, options)); - } + /** + * Get a Resized Photo + * + * @remarks + * Plex's Photo transcoder is used throughout the service to serve images at specified sizes. + */ + async getResizedPhoto( + request: operations.GetResizedPhotoRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetResizedPhoto( + this, + request, + options, + )); + } - /** - * Get Media Providers - * - * @remarks - * Retrieves media providers and their features from the Plex server. - */ - async getMediaProviders( - xPlexToken: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(serverGetMediaProviders(this, xPlexToken, options)); - } + /** + * Get Media Providers + * + * @remarks + * Retrieves media providers and their features from the Plex server. + */ + async getMediaProviders( + xPlexToken: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetMediaProviders( + this, + xPlexToken, + options, + )); + } - /** - * Get Server List - * - * @remarks - * Get Server List - */ - async getServerList(options?: RequestOptions): Promise { - return unwrapAsync(serverGetServerList(this, options)); - } + /** + * Get Server List + * + * @remarks + * Get Server List + */ + async getServerList( + options?: RequestOptions, + ): Promise { + return unwrapAsync(serverGetServerList( + this, + options, + )); + } } diff --git a/src/sdk/sessions.ts b/src/sdk/sessions.ts index ad4e31fd..7fdd450a 100644 --- a/src/sdk/sessions.ts +++ b/src/sdk/sessions.ts @@ -11,56 +11,73 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Sessions extends ClientSDK { - /** - * Get Active Sessions - * - * @remarks - * This will retrieve the "Now Playing" Information of the PMS. - */ - async getSessions(options?: RequestOptions): Promise { - return unwrapAsync(sessionsGetSessions(this, options)); - } + /** + * Get Active Sessions + * + * @remarks + * This will retrieve the "Now Playing" Information of the PMS. + */ + async getSessions( + options?: RequestOptions, + ): Promise { + return unwrapAsync(sessionsGetSessions( + this, + options, + )); + } - /** - * Get Session History - * - * @remarks - * This will Retrieve a listing of all history views. - */ - async getSessionHistory( - sort?: string | undefined, - accountId?: number | undefined, - filter?: operations.QueryParamFilter | undefined, - librarySectionID?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync( - sessionsGetSessionHistory(this, sort, accountId, filter, librarySectionID, options) - ); - } + /** + * Get Session History + * + * @remarks + * This will Retrieve a listing of all history views. + */ + async getSessionHistory( + sort?: string | undefined, + accountId?: number | undefined, + filter?: operations.QueryParamFilter | undefined, + librarySectionID?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sessionsGetSessionHistory( + this, + sort, + accountId, + filter, + librarySectionID, + options, + )); + } - /** - * Get Transcode Sessions - * - * @remarks - * Get Transcode Sessions - */ - async getTranscodeSessions( - options?: RequestOptions - ): Promise { - return unwrapAsync(sessionsGetTranscodeSessions(this, options)); - } + /** + * Get Transcode Sessions + * + * @remarks + * Get Transcode Sessions + */ + async getTranscodeSessions( + options?: RequestOptions, + ): Promise { + return unwrapAsync(sessionsGetTranscodeSessions( + this, + options, + )); + } - /** - * Stop a Transcode Session - * - * @remarks - * Stop a Transcode Session - */ - async stopTranscodeSession( - sessionKey: string, - options?: RequestOptions - ): Promise { - return unwrapAsync(sessionsStopTranscodeSession(this, sessionKey, options)); - } + /** + * Stop a Transcode Session + * + * @remarks + * Stop a Transcode Session + */ + async stopTranscodeSession( + sessionKey: string, + options?: RequestOptions, + ): Promise { + return unwrapAsync(sessionsStopTranscodeSession( + this, + sessionKey, + options, + )); + } } diff --git a/src/sdk/statistics.ts b/src/sdk/statistics.ts index 9b1c17c0..c6859a48 100644 --- a/src/sdk/statistics.ts +++ b/src/sdk/statistics.ts @@ -10,42 +10,54 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Statistics extends ClientSDK { - /** - * Get Media Statistics - * - * @remarks - * This will return the media statistics for the server - */ - async getStatistics( - timespan?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(statisticsGetStatistics(this, timespan, options)); - } + /** + * Get Media Statistics + * + * @remarks + * This will return the media statistics for the server + */ + async getStatistics( + timespan?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(statisticsGetStatistics( + this, + timespan, + options, + )); + } - /** - * Get Resources Statistics - * - * @remarks - * This will return the resources for the server - */ - async getResourcesStatistics( - timespan?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(statisticsGetResourcesStatistics(this, timespan, options)); - } + /** + * Get Resources Statistics + * + * @remarks + * This will return the resources for the server + */ + async getResourcesStatistics( + timespan?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(statisticsGetResourcesStatistics( + this, + timespan, + options, + )); + } - /** - * Get Bandwidth Statistics - * - * @remarks - * This will return the bandwidth statistics for the server - */ - async getBandwidthStatistics( - timespan?: number | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(statisticsGetBandwidthStatistics(this, timespan, options)); - } + /** + * Get Bandwidth Statistics + * + * @remarks + * This will return the bandwidth statistics for the server + */ + async getBandwidthStatistics( + timespan?: number | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(statisticsGetBandwidthStatistics( + this, + timespan, + options, + )); + } } diff --git a/src/sdk/types/index.ts b/src/sdk/types/index.ts index dbaa5e6e..e124e817 100644 --- a/src/sdk/types/index.ts +++ b/src/sdk/types/index.ts @@ -2,10 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export { RFCDate } from "./rfcdate.js"; export { blobLikeSchema, isBlobLike } from "./blobs.js"; -export type { Paginator, PageIterator } from "./operations.js"; -export { createPageIterator } from "./operations.js"; export { catchUnrecognizedEnum } from "./enums.js"; -export type { OpenEnum, ClosedEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; export type { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/src/sdk/updater.ts b/src/sdk/updater.ts index 200ca92b..f4cc119f 100644 --- a/src/sdk/updater.ts +++ b/src/sdk/updater.ts @@ -10,41 +10,54 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Updater extends ClientSDK { - /** - * Querying status of updates - * - * @remarks - * Querying status of updates - */ - async getUpdateStatus(options?: RequestOptions): Promise { - return unwrapAsync(updaterGetUpdateStatus(this, options)); - } + /** + * Querying status of updates + * + * @remarks + * Querying status of updates + */ + async getUpdateStatus( + options?: RequestOptions, + ): Promise { + return unwrapAsync(updaterGetUpdateStatus( + this, + options, + )); + } - /** - * Checking for updates - * - * @remarks - * Checking for updates - */ - async checkForUpdates( - download?: operations.Download | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(updaterCheckForUpdates(this, download, options)); - } + /** + * Checking for updates + * + * @remarks + * Checking for updates + */ + async checkForUpdates( + download?: operations.Download | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(updaterCheckForUpdates( + this, + download, + options, + )); + } - /** - * Apply Updates - * - * @remarks - * Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed - * - */ - async applyUpdates( - tonight?: operations.Tonight | undefined, - skip?: operations.Skip | undefined, - options?: RequestOptions - ): Promise { - return unwrapAsync(updaterApplyUpdates(this, tonight, skip, options)); - } + /** + * Apply Updates + * + * @remarks + * Note that these two parameters are effectively mutually exclusive. The `tonight` parameter takes precedence and `skip` will be ignored if `tonight` is also passed + */ + async applyUpdates( + tonight?: operations.Tonight | undefined, + skip?: operations.Skip | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(updaterApplyUpdates( + this, + tonight, + skip, + options, + )); + } } diff --git a/src/sdk/video.ts b/src/sdk/video.ts index 2ec694b0..a45703a4 100644 --- a/src/sdk/video.ts +++ b/src/sdk/video.ts @@ -9,29 +9,37 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Video extends ClientSDK { - /** - * Get the timeline for a media item - * - * @remarks - * Get the timeline for a media item - */ - async getTimeline( - request: operations.GetTimelineRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(videoGetTimeline(this, request, options)); - } + /** + * Get the timeline for a media item + * + * @remarks + * Get the timeline for a media item + */ + async getTimeline( + request: operations.GetTimelineRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(videoGetTimeline( + this, + request, + options, + )); + } - /** - * Start Universal Transcode - * - * @remarks - * Begin a Universal Transcode Session - */ - async startUniversalTranscode( - request: operations.StartUniversalTranscodeRequest, - options?: RequestOptions - ): Promise { - return unwrapAsync(videoStartUniversalTranscode(this, request, options)); - } + /** + * Start Universal Transcode + * + * @remarks + * Begin a Universal Transcode Session + */ + async startUniversalTranscode( + request: operations.StartUniversalTranscodeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(videoStartUniversalTranscode( + this, + request, + options, + )); + } } diff --git a/src/sdk/watchlist.ts b/src/sdk/watchlist.ts index f3e25af3..b34544fd 100644 --- a/src/sdk/watchlist.ts +++ b/src/sdk/watchlist.ts @@ -8,16 +8,20 @@ import * as operations from "./models/operations/index.js"; import { unwrapAsync } from "./types/fp.js"; export class Watchlist extends ClientSDK { - /** - * Get User Watchlist - * - * @remarks - * Get User Watchlist - */ - async getWatchList( - request: operations.GetWatchListRequest, - options?: RequestOptions & { serverURL?: string } - ): Promise { - return unwrapAsync(watchlistGetWatchList(this, request, options)); - } + /** + * Get User Watchlist + * + * @remarks + * Get User Watchlist + */ + async getWatchList( + request: operations.GetWatchListRequest, + options?: RequestOptions & { serverURL?: string }, + ): Promise { + return unwrapAsync(watchlistGetWatchList( + this, + request, + options, + )); + } }